@font-face {
  font-family: 'Schibsted Grotesk';
  src: url('/assets/schibsted-grotesk-latin-variable.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

/* Headings. */
@font-face {
  font-family: 'Manrope';
  src: url('/assets/manrope-latin-variable.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* Warm whites, light oak surfaces, walnut accents. */
:root {
  --ground: #fbf8f4;
  --surface: #ffffff;
  --oak: #f3eadf;
  --oak-deep: #e6d7c6;
  --walnut: #6e4528;
  --walnut-hover: #8a5a37;
  --walnut-dark: #3b2719;
  --ink: #241a14;
  --muted: #6b5e54;
  --line: #e9e0d5;
  --whatsapp: #1b7a4b;
  --whatsapp-hover: #146039;
  --body: 'Schibsted Grotesk', 'Segoe UI', Arial, sans-serif;
  --heading: 'Manrope', 'Segoe UI', Arial, sans-serif;
  --page: min(1200px, 100% - 2.5rem);
  --header-h: 4.75rem;
  --section-space: clamp(4.5rem, 9vw, 7.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--walnut);
  outline-offset: 3px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--heading);
  font-weight: 700;
  text-wrap: balance;
}

h1 em,
h2 em {
  color: var(--walnut);
  font-style: normal;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 50;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--ink);
  color: var(--surface);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--walnut);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.review-note {
  width: var(--page);
  margin: 2rem auto 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

.review-note::before {
  content: 'Para revisão';
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: var(--oak);
  color: var(--walnut);
  font-weight: 600;
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgb(251 248 244 / 0.94);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: var(--page);
  min-height: var(--header-h);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  text-decoration: none;
}

.brand img {
  width: 2.5rem;
  height: 2.5rem;
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

.site-nav a:not(.nav-cta):hover {
  color: var(--walnut);
}

.site-nav .nav-cta {
  padding: 0 1.125rem;
  border-radius: 12px;
  background: var(--walnut);
  color: var(--surface);
  font-weight: 600;
  transition: background-color 160ms ease;
}

.site-nav .nav-cta:hover {
  background: var(--walnut-hover);
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 3.25rem;
  padding: 0 1.375rem;
  border-radius: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    transform 160ms ease;
}

.button:active {
  transform: translateY(1px);
}

/* WhatsApp green, darkened from the brand color so white text passes AA. */
.button-whatsapp {
  background: var(--whatsapp);
  color: #fff;
}

.button-whatsapp:hover {
  background: var(--whatsapp-hover);
}

.button-outline {
  border: 1px solid var(--oak-deep);
  background: var(--surface);
  color: var(--ink);
}

.button-outline:hover {
  border-color: var(--walnut);
  background: var(--oak);
}

/* Hero */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(2.5rem, 6vw, 5rem);
  width: var(--page);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 4.5rem);
}

.hero h1 {
  /* Sized so "Transformando" fits its column at every width. */
  font-size: clamp(3rem, 5.4vw, 4.75rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero h1 em {
  display: block;
}

.hero-lede {
  max-width: 32rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 1.1875rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.tooth-stage {
  position: relative;
  padding: clamp(2rem, 4vw, 3rem) clamp(2.5rem, 6vw, 4.5rem);
  border-radius: 32px;
  background: var(--oak);
}

.tooth {
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
}

.tooth path,
.tooth rect {
  fill: none;
  stroke: var(--walnut);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tooth .crown {
  fill: var(--surface);
  stroke: none;
}

.tooth .thin {
  stroke-width: 2;
  opacity: 0.55;
}

.tooth .soft {
  stroke: var(--oak-deep);
  stroke-width: 8;
}

.tooth .accent {
  stroke: #b8693d;
  stroke-width: 2.5;
}

.tooth .gum {
  stroke: #c98a74;
}

.tooth .bone {
  stroke: #bfa891;
  stroke-width: 2;
  stroke-dasharray: 3 7;
}

.tooth .bracket {
  fill: var(--surface);
  stroke-width: 2.5;
}

.chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 10px 24px -14px rgb(59 39 25 / 0.45);
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  transform: translateY(-50%);
}

.chip::before {
  content: '';
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: var(--walnut);
}

.chip-left {
  left: 1rem;
}

.chip-right {
  right: 1rem;
}

.chip-placa {
  top: 9%;
}

.chip-orto {
  top: 27%;
}

.chip-protese {
  top: 36%;
}

.chip-perio {
  top: 55%;
}

.chip-endo {
  top: 72%;
}

.chip-cirurgia {
  top: 91%;
}

/* Contact strip under the hero */

.info-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: var(--page);
  margin: 0 auto;
  border-block: 1px solid var(--line);
}

.info-strip a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-height: 4.5rem;
  font-weight: 600;
  text-decoration: none;
}

.info-strip a:nth-child(2) {
  justify-content: center;
}

.info-strip a:nth-child(3) {
  justify-content: flex-end;
}

.info-strip a:hover {
  color: var(--walnut);
}

.info-strip span {
  color: var(--muted);
  font-weight: 400;
}

.info-strip .icon {
  color: var(--walnut);
}

/* Sections */

.specialties,
.team,
.cases,
.units {
  padding-top: var(--section-space);
}

.section-head {
  width: var(--page);
  margin: 0 auto clamp(2rem, 5vw, 3.5rem);
}

.section-head-split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  flex-wrap: wrap;
}

.section-lede {
  max-width: 36rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.125rem;
}

/* Specialties */

.specialty-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: var(--page);
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.specialty-grid li {
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  transition:
    background-color 200ms ease,
    border-color 200ms ease,
    translate 200ms ease;
}

.specialty-grid li:hover {
  border-color: var(--oak-deep);
  background: var(--oak);
  translate: 0 -3px;
}

.s-num {
  display: block;
  margin-bottom: 2.5rem;
  color: var(--walnut);
  font-size: 0.875rem;
  font-weight: 600;
}

.specialty-grid h3 {
  font-size: 1.3125rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.specialty-grid p {
  margin-top: 0.5rem;
  color: var(--muted);
}

/* Team */

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: var(--page);
  margin: 0 auto;
}

.person {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: 28px;
  background: var(--oak);
}

.monogram {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  flex: none;
  border-radius: 50%;
  background: var(--walnut);
  color: var(--surface);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.person h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.person p {
  margin-top: 0.25rem;
  color: var(--muted);
}

.person .cro {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.125rem 0.75rem;
  border: 1px solid var(--oak-deep);
  border-radius: 999px;
  background: var(--surface);
  color: var(--walnut);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* Cases */

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  width: var(--page);
  margin: 0 auto;
}

.case {
  margin: 0;
}

.case img {
  width: 100%;
  border-radius: 24px;
}

.case figcaption {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: 0.875rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.case figcaption span {
  color: var(--walnut);
  font-weight: 600;
}

/* Units */

.unit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  width: var(--page);
  margin: 0 auto;
}

.unit {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
}

.unit-map {
  margin: 0;
}

.map-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.map-link img {
  width: 100%;
  transition: transform 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.map-link:hover img {
  transform: scale(1.04);
}

.map-open {
  position: absolute;
  right: 0.875rem;
  bottom: 0.875rem;
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 1rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 10px 24px -12px rgb(59 39 25 / 0.5);
  font-size: 0.875rem;
  font-weight: 600;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.map-link:hover .map-open {
  background: var(--walnut);
  color: var(--surface);
}

.unit-map figcaption {
  padding: 0.625rem clamp(1.5rem, 3vw, 2rem) 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.unit-map figcaption a {
  text-underline-offset: 0.2em;
}

.unit-body {
  padding: 1rem clamp(1.5rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2rem);
}

.unit h3 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.unit address {
  margin-top: 0.75rem;
  font-style: normal;
}

.unit-phone {
  margin-top: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.unit-phone a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration-color: var(--oak-deep);
  text-underline-offset: 0.3em;
}

.unit-hours {
  color: var(--muted);
  font-size: 0.9375rem;
}

.unit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Closing call to action */

.contact {
  padding: var(--section-space) 0;
}

.contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
  width: var(--page);
  margin: 0 auto;
  padding: clamp(2.25rem, 5vw, 4rem);
  border-radius: 32px;
  background: var(--walnut-dark);
  color: var(--oak);
}

.contact h2 {
  color: var(--surface);
}

.contact-inner p {
  margin-top: 0.75rem;
  font-size: 1.125rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  width: var(--page);
  margin: 0 auto;
  padding: 2rem 0;
}

.footer-inner strong {
  color: var(--ink);
  font-weight: 600;
}

.footer-instagram {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.footer-instagram:hover {
  color: var(--walnut);
}

.footer-instagram .icon {
  color: var(--walnut);
}

.mobile-bar {
  display: none;
}

/* Responsive */

@media (max-width: 900px) {
  .hero,
  .unit-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero h1 {
    font-size: clamp(2.25rem, 9vw + 0.25rem, 4.5rem);
  }

  .specialty-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-strip {
    grid-template-columns: minmax(0, 1fr);
    padding: 0.5rem 0;
  }

  .info-strip a,
  .info-strip a:nth-child(2),
  .info-strip a:nth-child(3) {
    justify-content: flex-start;
    min-height: 3rem;
  }
}

@media (max-width: 700px) {
  :root {
    --header-h: 7rem;
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 0;
    padding-top: 0.625rem;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.5rem;
  }

  /* The fixed WhatsApp bar carries scheduling on phones. */
  .site-nav .nav-cta {
    display: none;
  }

  .hero-actions .button,
  .unit-actions .button,
  .contact-actions .button {
    flex: 1 1 100%;
  }

  .specialty-grid,
  .team-grid,
  .case-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .s-num {
    margin-bottom: 1rem;
  }

  /* No room for floating labels beside the drawing: list them below it. */
  .tooth-stage {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.75rem 1.25rem;
  }

  .tooth {
    flex: 0 0 100%;
    max-width: 15rem;
    margin-bottom: 1rem;
  }

  .chip {
    position: static;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    transform: none;
  }

  .map-open {
    right: 0.5rem;
    bottom: 0.5rem;
    min-height: 2.125rem;
    padding: 0 0.875rem;
    font-size: 0.8125rem;
  }

  .person {
    align-items: flex-start;
  }

  /* Full-bleed on phones so the one-line WhatsApp buttons fit. */
  .contact-inner {
    width: 100%;
    padding: 2.5rem 1.25rem;
    border-radius: 0;
  }

  .monogram {
    width: 3.5rem;
    height: 3.5rem;
    font-size: 1rem;
  }

  .mobile-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem calc(0.625rem + env(safe-area-inset-bottom));
    background: rgb(251 248 244 / 0.96);
    border-top: 1px solid var(--line);
    transition: transform 250ms ease;
  }

  /* mobile-bar.js reveals the bar between the hero and closing buttons. */
  .mobile-bar.is-hidden {
    visibility: hidden;
    transform: translateY(110%);
    transition:
      transform 250ms ease,
      visibility 0s 250ms;
  }

  .mobile-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    border-radius: 12px;
    background: var(--whatsapp);
    color: #fff;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
  }
}

@media (max-width: 400px) {
  .site-nav {
    font-size: 0.8125rem;
  }

  .hero-actions .button,
  .contact-actions .button {
    padding-inline: 1rem;
    font-size: 1rem;
  }

  .mobile-bar a {
    font-size: 0.875rem;
  }
}

/* Motion: entrance on load, then scroll-linked reveals where supported. */

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * {
    animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero-copy > :nth-child(2) {
    animation-delay: 80ms;
  }

  .hero-copy > :nth-child(3) {
    animation-delay: 160ms;
  }

  .hero-copy > :nth-child(4) {
    animation-delay: 240ms;
  }

  .tooth-stage {
    animation: rise 800ms cubic-bezier(0.2, 0.7, 0.2, 1) 120ms both;
  }

  .tooth .draw {
    stroke-dasharray: 1;
    animation: draw 1600ms cubic-bezier(0.45, 0, 0.2, 1) 300ms both;
  }

  .tooth .crown,
  .tooth .bone,
  .tooth .bracket {
    animation: appear 600ms ease 1200ms both;
  }

  .chip {
    animation: pop 500ms cubic-bezier(0.3, 1.4, 0.5, 1) both;
  }

  .chip-placa {
    animation-delay: 1100ms;
  }

  .chip-orto {
    animation-delay: 1200ms;
  }

  .chip-protese {
    animation-delay: 1300ms;
  }

  .chip-perio {
    animation-delay: 1400ms;
  }

  .chip-endo {
    animation-delay: 1500ms;
  }

  .chip-cirurgia {
    animation-delay: 1600ms;
  }

  /* Phones list the chips statically, so they fade in without the offset. */
  @media (max-width: 700px) {
    .chip {
      animation-name: appear;
    }
  }

  @supports (animation-timeline: view()) {
    .section-head,
    .specialty-grid li,
    .person,
    .case,
    .unit,
    .contact-inner {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 1;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes appear {
  from {
    opacity: 0;
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-50%) scale(0.85);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-bar,
  .mobile-bar.is-hidden {
    transition: none;
  }
}
