/* Clínica Erica Ellen — padrão de clínica boutique: chão claro e quente, um rosa terroso, texto cacau, fotos reais. */
:root {
  --sand: #F6EFEA;
  --blush: #EFE2DB;
  --white: #FFFCFA;
  --cocoa: #2F2220;
  --cocoa-soft: #5C4843;
  --rose: #9A4855;
  --rose-deep: #7E3542;
  --rose-tint: #F3DCDD;
  --line: #9A8076;
  --hairline: #DCCBC2;
  --error: #A3262F;

  --font-display: "Libre Caslon Display", "Times New Roman", serif;
  --font-body: "Albert Sans", system-ui, sans-serif;

  --step-hero: clamp(2.6rem, 1.6rem + 4.2vw, 5.25rem);
  --step-h2: clamp(2.1rem, 1.5rem + 2.4vw, 3.6rem);
  --step-h3: clamp(1.6rem, 1.3rem + 1vw, 2.15rem);
  --step-lead: clamp(1.08rem, 1rem + 0.35vw, 1.25rem);

  --gutter: clamp(1.25rem, 0.6rem + 3.2vw, 4.5rem);
  /* Um só contêiner: todas as seções alinham pela mesma borda esquerda. */
  --content-max: 1312px;
  --pad-x: max(var(--gutter), calc((100% - var(--content-max)) / 2));
  --section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --radius-photo: clamp(18px, 1rem + 1vw, 28px);
  --header-h: 72px;
  --banner-h: 40px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 700ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--sand);
  color: var(--cocoa);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--rose-tint); color: var(--cocoa); }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration-color: var(--rose); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: var(--rose-deep); }
:focus-visible { outline: 2px solid var(--rose-deep); outline-offset: 3px; border-radius: 4px; }
[id] { scroll-margin-top: calc(var(--header-h) + var(--banner-h) + 16px); }
input, textarea { scroll-margin-top: calc(var(--header-h) + var(--banner-h) + 56px); }
.sprite { position: absolute; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.soft { color: var(--cocoa-soft); }

.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: var(--cocoa); color: var(--white); padding: 0.7rem 1rem; border-radius: 999px; }
.skip-link:focus { top: 1rem; }
.skip-link:hover { color: var(--white); background: var(--rose-deep); }

/* Banner de demonstração */
.demo-banner {
  position: sticky; top: 0; z-index: 30;
  min-height: var(--banner-h);
  display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.45rem var(--gutter);
  background: var(--cocoa); color: var(--sand);
  font-size: 0.875rem; line-height: 1.35; text-align: center;
}
.demo-banner strong { font-weight: 600; letter-spacing: 0.02em; }
.demo-short { display: none; }

/* Cabeçalho */
.header {
  position: sticky; top: var(--banner-h); z-index: 25;
  height: var(--header-h);
  display: flex; align-items: center; gap: 2rem;
  padding: 0 var(--gutter);
  background: var(--sand);
  transition: box-shadow 300ms ease;
}
.header.is-scrolled { box-shadow: 0 6px 18px -12px rgba(47, 34, 32, 0.35); }
.wordmark { display: flex; flex-direction: column; text-decoration: none; line-height: 1; }
.wordmark-name { font-family: var(--font-display); font-size: 1.75rem; }
.wordmark-sub { font-size: 0.8125rem; color: var(--cocoa-soft); margin-top: 0.3rem; letter-spacing: 0.04em; }
.nav { display: flex; gap: 1.75rem; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 500; font-size: 0.98rem; padding: 0.5rem 0; }
.nav a:hover { text-decoration: underline; }
.nav .nav-cta { display: none; }
.menu-toggle { display: none; }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 52px; padding: 0.85rem 1.6rem;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color 200ms ease, transform 200ms var(--ease-out), box-shadow 200ms ease;
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--cocoa); color: var(--white); }
.btn-solid:hover { background: var(--rose-deep); color: var(--white); box-shadow: 0 8px 20px -10px rgba(126, 53, 66, 0.7); }
.btn-solid[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.btn-light { background: var(--white); color: var(--cocoa); }
.btn-light:hover { background: var(--rose-tint); color: var(--cocoa); }
.btn-small { min-height: 44px; padding: 0.6rem 1.2rem; font-size: 0.95rem; }
.btn-block { width: 100%; }

.text-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 600; color: var(--rose-deep); text-decoration: none;
  padding: 0.35rem 0;
}
.text-link .icon { transition: transform 250ms var(--ease-out); }
.text-link:hover { text-decoration: underline; }
.text-link:hover .icon { transform: translateX(4px); }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 1rem + 4vw, 6rem); align-items: center;
  padding: clamp(1.5rem, 0.5rem + 2.5vw, 3rem) var(--pad-x) var(--section);
}
.hero h1 { font-size: var(--step-hero); max-width: 13ch; }
.hero-lead { font-size: var(--step-lead); color: var(--cocoa-soft); margin-top: 1.4rem; max-width: 46ch; }
.hero-photo { position: relative; }
.hero-photo img { width: 100%; aspect-ratio: 5 / 5.6; max-height: calc(100vh - var(--header-h) - var(--banner-h) - 7rem); object-fit: cover; object-position: 50% 70%; border-radius: var(--radius-photo); }
.hero-photo figcaption { margin-top: 0.75rem; font-size: 0.92rem; color: var(--cocoa-soft); }
.js .hero-photo img { animation: photo-rise 1100ms var(--ease-out) both; }
@keyframes photo-rise {
  from { clip-path: inset(18% 0 0 0 round var(--radius-photo)); transform: translateY(24px); }
  to { clip-path: inset(0 0 0 0 round var(--radius-photo)); transform: none; }
}

/* Formulários */
.quick-form { margin-top: 2rem; max-width: 34rem; }
.choices-field { border: 0; padding: 0; margin: 0; }
.choices-field legend { font-weight: 600; margin-bottom: 0.75rem; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choices label { position: relative; }
.choices input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choices span {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0.55rem 1.1rem;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--white);
  font-weight: 500; cursor: pointer; transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.choices label:hover span { border-color: var(--cocoa); }
.choices input:checked + span { background: var(--cocoa); border-color: var(--cocoa); color: var(--white); }
.choices input:focus-visible + span { outline: 2px solid var(--rose-deep); outline-offset: 3px; }
.quick-row { display: flex; gap: 0.6rem; margin-top: 1.1rem; }
.quick-row .field-inline { flex: 1; }

.field { display: grid; gap: 0.45rem; font-weight: 600; }
.field em { font-style: normal; font-weight: 400; color: var(--cocoa-soft); }
.field input, .field textarea {
  width: 100%; min-height: 52px; padding: 0.8rem 1.1rem;
  font: 400 1rem/1.4 var(--font-body); color: var(--cocoa);
  background: var(--white); border: 1.5px solid var(--line); border-radius: 14px;
  caret-color: var(--rose-deep);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.field-inline input { border-radius: 999px; }
.field input::placeholder { color: var(--cocoa-soft); opacity: 1; }
.field input:hover, .field textarea:hover { border-color: var(--cocoa-soft); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--rose-deep); box-shadow: 0 0 0 3px var(--rose-tint), 0 0 0 4.5px var(--rose-deep); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field textarea { resize: vertical; min-height: 6rem; }
.field-error { color: var(--error); font-weight: 600; font-size: 0.95rem; margin-top: 0.5rem; }
.form-fallback { margin-top: 0.75rem; font-size: 0.95rem; }

.rating {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1.6rem;
  text-decoration: none; color: var(--cocoa-soft); font-size: 0.98rem;
}
.rating strong { color: var(--cocoa); }
.rating:hover span:last-child { text-decoration: underline; }
.stars { display: inline-flex; gap: 2px; color: var(--rose); }
.stars svg { width: 16px; height: 16px; }

/* Cabeçalhos de seção */
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: end; margin-bottom: clamp(2rem, 1rem + 3vw, 4rem); }
.section-head h2, .method h2, .team h2, .booking h2 { font-size: var(--step-h2); }
.section-head p { color: var(--cocoa-soft); font-size: var(--step-lead); max-width: 44ch; }

/* Tratamentos */
.treatments { padding: var(--section) var(--pad-x); background: var(--white); }
.treat-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(1.5rem, 1rem + 2vw, 3rem); }
.treat h3 { font-size: var(--step-h3); margin-bottom: 0.9rem; }
.treat p { color: var(--cocoa-soft); max-width: 46ch; }
.treat .text-link { margin-top: 1.2rem; }
.treat-body { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(1.5rem, 1rem + 3vw, 4.5rem); align-items: center; }
.treat-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-photo); }
.treat-list { list-style: none; padding: 0; margin: 1.5rem 0 0; border-top: 1px solid var(--hairline); max-width: 30rem; }
.treat-list li { padding: 0.75rem 0; border-bottom: 1px solid var(--hairline); font-weight: 500; }
.treat-small { grid-column: span 6; padding-top: 2rem; border-top: 1px solid var(--hairline); }

/* Crio da Erica */
.crio {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 1rem + 4vw, 6rem); align-items: center;
  padding: var(--section) var(--pad-x);
  background: var(--rose-deep); color: var(--white);
}
.crio-photo img { width: 100%; max-width: 520px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; border-radius: var(--radius-photo); }
.crio h2 { font-size: var(--step-h2); max-width: 18ch; }
.crio h2 em { font-style: normal; color: var(--rose-tint); }
.crio p { margin: 1.5rem 0 2rem; font-size: var(--step-lead); max-width: 44ch; color: #F7E6E6; }

/* Como funciona */
.method {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 6rem); align-items: center;
  padding: var(--section) var(--pad-x);
}
.method-photo { order: 2; }
.method-photo img { width: 100%; aspect-ratio: 720 / 440; object-fit: cover; border-radius: var(--radius-photo); }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 2.5rem 0 0; display: grid; gap: 2rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; column-gap: 1rem; }
.steps li::before {
  content: counter(step);
  grid-row: span 2; width: 2.6rem; height: 2.6rem; border-radius: 50%;
  display: grid; place-items: center;
  border: 1.5px solid var(--rose); color: var(--rose-deep);
  font: 600 1rem var(--font-body); font-variant-numeric: lining-nums;
}
.steps h3 { font-family: var(--font-body); font-weight: 600; font-size: 1.2rem; line-height: 1.3; margin: 0.35rem 0 0.35rem; }
.steps p { color: var(--cocoa-soft); }

/* Equipe */
.team {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 1rem + 4vw, 6rem); align-items: center;
  padding: var(--section) var(--pad-x); background: var(--blush);
}
.team-text > p:first-of-type { margin-top: 1.5rem; font-size: var(--step-lead); }
.team-quote { margin: 2rem 0; padding: 0; }
.team-quote p { font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem); line-height: 1.2; }
.team-quote footer { margin-top: 0.6rem; font-size: 0.95rem; color: var(--cocoa-soft); }
.team-photos { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 1.25rem; align-items: end; }
.team-photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-photo); }
.team-side { margin-bottom: 3rem; }
.team-main figcaption { margin-top: 0.75rem; font-size: 0.92rem; color: var(--cocoa-soft); }

/* Depoimentos */
.voices { padding: var(--section) var(--pad-x); }
.voices .voice-main { margin-top: 0; }
/* Fotos vêm do Instagram (720–900px): limitar a largura exibida mantém nitidez em telas 2x. */
.hero-photo { max-width: 600px; justify-self: end; width: 100%; }
.treat-photo, .crio-photo, .booking-photo { max-width: 480px; width: 100%; }
/* A foto da avaliação não tem recorte alto sem a legenda gravada; ocupa a coluna inteira (densidade ~1.2x aceita). */
.method-photo { width: 100%; }
.booking-info { max-width: 480px; width: 100%; }
.crio-photo { justify-self: end; }
.voice-main { margin: 2.5rem 0 3rem; }
.voice-main blockquote { margin: 0; }
.voice-main p { font-family: var(--font-display); font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.6rem); line-height: 1.12; max-width: 24ch; }
.voice-main figcaption { margin-top: 1.1rem; color: var(--cocoa-soft); }
.voice-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; padding-top: 2rem; border-top: 1px solid var(--hairline); margin-bottom: 2.5rem; }
.voice-list figure blockquote { margin: 0; }
.voice-list p { font-size: 1.15rem; line-height: 1.45; }
.voice-list figcaption { margin-top: 0.6rem; color: var(--cocoa-soft); font-size: 0.95rem; }

/* Agendamento */
.booking {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  grid-template-areas: "head info" "form info";
  grid-template-rows: auto 1fr;
  column-gap: clamp(2rem, 1rem + 4vw, 6rem); row-gap: 2rem;
  padding: var(--section) var(--pad-x); background: var(--white);
}
.booking-head { grid-area: head; }
.booking-head p { margin-top: 1rem; font-size: var(--step-lead); color: var(--cocoa-soft); max-width: 42ch; }
.form { grid-area: form; display: grid; gap: 1.4rem; max-width: 40rem; align-content: start; }
.form .field-error { margin-top: -0.9rem; }
.form-proof { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; color: var(--cocoa-soft); font-size: 0.95rem; }
.booking-info { grid-area: info; align-self: start; }
.booking-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-photo); }
.booking dl { margin: 2rem 0 0; display: grid; gap: 1.25rem; }
.booking dl div { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--hairline); }
.booking dt { font-weight: 600; }
.booking dd { margin: 0; }

/* Rodapé */
.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem;
  padding: 3.5rem var(--pad-x) 6rem; background: var(--cocoa); color: var(--sand);
}
.footer .wordmark-name { font-size: 2rem; }
.footer-brand p { margin-top: 0.5rem; color: var(--hairline); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.footer-links a { color: var(--sand); text-decoration-color: rgba(246, 239, 234, 0.5); }
.footer-links a:hover { color: var(--white); }
.footer :focus-visible { outline-color: var(--sand); }

/* CTA fixo (mobile) */
.sticky-cta { display: none; }

/* Revelação das seções: visível por padrão, só anima com JS */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Tablet */
@media (max-width: 1024px) {
  .nav { gap: 1.2rem; }
  .crio, .team { grid-template-columns: 1fr 1fr; }
}

/* Mobile */
@media (max-width: 820px) {
  :root { --header-h: 64px; --banner-h: 44px; }
  .demo-banner { font-size: 0.8125rem; flex-wrap: nowrap; white-space: nowrap; }
  .demo-long { display: none; }
  .demo-short { display: inline; }
  .header-cta { display: none; }
  .menu-toggle {
    display: grid; place-content: center; gap: 6px; margin-left: auto;
    width: 48px; height: 48px; border: 0; border-radius: 50%; background: transparent; cursor: pointer;
  }
  .menu-toggle span { display: block; width: 24px; height: 2px; background: var(--cocoa); transition: transform 250ms var(--ease-out); }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: fixed; left: 0; right: 0; top: calc(var(--banner-h) + var(--header-h));
    flex-direction: column; gap: 0; margin: 0; padding: 0.5rem var(--gutter) 1.5rem;
    background: var(--sand); box-shadow: 0 18px 24px -18px rgba(47, 34, 32, 0.4);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity 220ms ease, transform 220ms var(--ease-out), visibility 0s linear 220ms;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav a { padding: 0.95rem 0; border-bottom: 1px solid var(--hairline); font-size: 1.1rem; }
  .nav .nav-cta {
    display: flex; justify-content: center; margin-top: 1.25rem; border: 0;
    background: var(--cocoa); color: var(--white); border-radius: 999px; font-weight: 600;
  }
  .nav .nav-cta:hover { background: var(--rose-deep); color: var(--white); text-decoration: none; }

  /* Hero compacto: título, uma frase, foto em faixa e o formulário inteiro dentro de 390x844. */
  .hero { grid-template-columns: 1fr; padding-top: 1rem; gap: 1rem; }
  .hero-copy { display: contents; }
  .hero h1 { order: 1; max-width: 15ch; font-size: 2.35rem; }
  .hero-lead { order: 2; margin-top: 0; font-size: 1.05rem; }
  .lead-more { display: none; }
  .hero-photo { order: 3; }
  .hero-photo img { aspect-ratio: 16 / 8.2; max-height: none; object-position: 50% 40%; border-radius: var(--radius-photo); }
  .hero-photo { max-width: none; }
  .hero-photo figcaption {
    position: absolute; left: 0.6rem; bottom: 0.6rem; margin: 0;
    padding: 0.3rem 0.7rem; border-radius: 999px;
    background: rgba(47, 34, 32, 0.82); color: var(--white); font-size: 0.8125rem; font-weight: 500;
  }
  .treat-photo, .crio-photo, .method-photo, .booking-photo { max-width: none; }
  .quick-form { order: 4; margin-top: 0.25rem; }
  .choices-field legend { margin-bottom: 0.5rem; }
  .quick-form .choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
  .quick-form .choices span { width: 100%; justify-content: center; min-height: 44px; padding: 0.45rem 0.6rem; }
  .quick-row { flex-direction: column; gap: 0.45rem; margin-top: 0.6rem; }
  .quick-row .field-inline input, .quick-row .btn { min-height: 48px; }
  .rating { order: 5; margin-top: 0; }

  .section-head { grid-template-columns: 1fr; gap: 1rem; }
  .treat-body { grid-template-columns: 1fr; }
  .treat-small { grid-column: 1 / -1; }
  .crio, .method, .team { grid-template-columns: 1fr; }
  .crio-photo img { margin: 0; max-width: none; aspect-ratio: 4 / 4.4; object-position: 50% 8%; }
  .team-side { margin-bottom: 0; }
  .voice-list { grid-template-columns: 1fr; gap: 1.5rem; }

  .booking { grid-template-columns: 1fr; grid-template-areas: "head" "form" "info"; grid-template-rows: auto; }
  .booking dl div { grid-template-columns: 1fr; gap: 0.2rem; }

  .sticky-cta {
    display: flex; align-items: center; justify-content: center; gap: 0.55rem;
    position: fixed; left: 1rem; right: 1rem; bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 20; min-height: 54px; border-radius: 999px;
    background: var(--cocoa); color: var(--white); font-weight: 600; text-decoration: none;
    box-shadow: 0 12px 28px -12px rgba(47, 34, 32, 0.6);
    transform: translateY(160%); transition: transform 350ms var(--ease-out);
  }
  .sticky-cta.is-visible { transform: none; }
  .sticky-cta:hover { color: var(--white); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
