/* ============ Fontes (self-host, variáveis, subset latin) ============ */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/fraunces-var.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/fraunces-italic-var.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/hanken-grotesk-var.woff2") format("woff2");
}

/* ============ Tokens (azul quente índigo + neutros quentes Mio Spa) ============ */
:root {
  --ink:      #1A2230;
  --paper:    #F2ECE2;
  --sand:     #E6DAC8;
  --azul-700: #2A4068;
  --azul-500: #3C5A88;
  --azul-300: #8AA2C4;
  --azul-100: #DFE7F1;
  --brasa:    #C39A5B;   /* uso mínimo: só fios/assinatura */

  --foco: var(--azul-700);

  --serif: "Fraunces", Georgia, serif;
  --sans:  "Hanken Grotesk", system-ui, sans-serif;

  /* escala de espaçamento base 0.3rem. Antes eram 21 valores rem soltos; todos
     caíam a <=0.1rem (1,6px) de um degrau desta escala. Os clamp() das seções
     continuam como estão — são ritmo fluido, não espaçamento de componente. */
  --sp-half: 0.15rem;
  --sp-1: 0.3rem;   --sp-2: 0.6rem;   --sp-3: 0.9rem;
  --sp-4: 1.2rem;   --sp-5: 1.5rem;   --sp-6: 1.8rem;
  --sp-7: 2.1rem;   --sp-8: 2.4rem;   --sp-9: 2.7rem;   --sp-10: 3rem;
  /* recuo pendurado do traço brasa: precisa casar com o left do ::before */
  --indent: 1.7rem;

  --maxw: 1180px;
  --gut: clamp(1.25rem, 5vw, 5rem);
  /* uma coluna de conteúdo só. As seções centradas (.hero, .modes, .tele,
     .areas, .pledge, .foot) usam max-width + margin auto + padding --gut, o que
     põe o texto em (100% - maxw)/2 + gut. As faixas full-bleed (.top, .approach,
     .about, .contact, .divider) reproduzem a mesma borda com este padding —
     antes usavam só --gut e ficavam 1 gut à esquerda de todo o resto. */
  --col-pad: max(var(--gut), calc((100% - var(--maxw)) / 2 + var(--gut)));

  --step--1: clamp(0.84rem, 0.8rem + 0.2vw, 0.95rem);
  --step-0:  clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  --step-1:  clamp(1.3rem, 1.15rem + 0.7vw, 1.6rem);
  --step-2:  clamp(1.7rem, 1.4rem + 1.4vw, 2.4rem);
  --step-3:  clamp(2.3rem, 1.7rem + 2.8vw, 3.8rem);
  --step-4:  clamp(3rem, 1.9rem + 5.2vw, 6.5rem);
}

* { box-sizing: border-box; }
/* âncoras (#atendimento, #contato) não somem sob o header fixo */
html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
::selection { background: var(--azul-700); color: var(--paper); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.04em; font-weight: 500; }

a { color: inherit; }

/* quebra tipográfica: títulos equilibrados, parágrafos sem linhas órfãs */
h2, .contact__h, .areas__lead { text-wrap: balance; }
/* títulos display não herdam o 1.6 do body (mesmo registro do .pledge__q) */
.approach__h, .tele__h, .areas__h, .contact__h { line-height: 1.18; }
p { text-wrap: pretty; }

/* ============ Acessibilidade ============ */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper);
  padding: 0.7em 1.1em; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid var(--foco);
  outline-offset: 3px;
  border-radius: 2px;
}
/* anel de foco legível sobre as faixas escuras (azul-700 não contrasta no escuro) */
.approach :focus-visible, .contact :focus-visible { outline-color: var(--azul-100); }

/* ============ Header ============ */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--col-pad);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 9%, transparent);
}
.brand { display: inline-flex; align-items: center; gap: var(--sp-2); text-decoration: none; color: var(--azul-700); }
.brand__mark { width: 44px; height: 28px; }
.brand__name { font-family: var(--serif); font-weight: 500; font-size: var(--step-0); color: var(--ink); letter-spacing: 0.01em; }
.brand__name span { color: var(--azul-500); font-style: italic; }
.top__cta {
  font-size: var(--step--1); font-weight: 600; text-decoration: none;
  color: var(--azul-700); padding: 0.7em 1.2em;
  border: 1.5px solid var(--azul-500); border-radius: 999px;
  transition: background .25s, color .25s;
}
.top__cta:hover { background: var(--azul-700); color: var(--paper); border-color: var(--azul-700); }
.top__cta:active { transform: scale(.97); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-weight: 600; text-decoration: none; cursor: pointer;
  padding: 0.85em 1.5em; border-radius: 999px;
  font-size: var(--step-0);
  transition: transform .2s, background .25s, color .25s, box-shadow .25s;
}
.btn--primary { background: var(--azul-700); color: var(--paper); }
.btn--primary:hover { background: var(--azul-500); transform: translateY(-2px); box-shadow: 0 8px 20px -12px var(--azul-700); }
.btn--ghost { color: var(--azul-700); border: 1.5px solid color-mix(in srgb, var(--azul-500) 75%, transparent); }
.btn--ghost:hover { border-color: var(--azul-700); background: var(--azul-100); }
.btn:active { transform: translateY(0) scale(.98); }

/* ============ HERO ============ */
.hero {
  position: relative;
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 8rem) var(--gut) clamp(6.5rem, 13vw, 11rem);
}
.hero__eyebrow { font-size: var(--step--1); letter-spacing: 0.12em; text-transform: uppercase; color: var(--azul-700); margin: 0 0 var(--sp-5); }
.hero__thesis {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--step-4); line-height: 0.98; letter-spacing: -0.02em;
  margin: 0; max-width: 14ch;
}
.hero__thesis .line { display: block; }
.hero__thesis em { font-style: italic; color: var(--azul-500); }
.hero__sub { max-width: 46ch; margin: var(--sp-6) 0 0; color: color-mix(in srgb, var(--ink) 82%, var(--paper)); font-size: var(--step-1); line-height: 1.5; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-8); }
.hero__portrait {
  position: relative; z-index: 3; /* acima da lifeline (.ecg--hero z-index 2): a foto sobrepõe a linha */
  display: block;
  width: min(72vw, 340px); height: auto;
  margin: var(--sp-9) auto 0;
  filter: drop-shadow(0 22px 28px color-mix(in srgb, var(--azul-700) 28%, transparent));
}

.ecg { display: block; width: 100%; color: var(--azul-500); }
.ecg--hero {
  position: absolute; left: 0; right: 0; bottom: clamp(1.5rem, 5vw, 3.5rem);
  height: clamp(70px, 9vw, 120px); color: color-mix(in srgb, var(--azul-500) 65%, transparent);
  z-index: 2; /* a linha de cuidado passa na frente do retrato */
  pointer-events: none;
  /* a linha viva emerge e some nas margens — não é um fio rígido de borda a borda */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

/* traçado da "linha de cuidado": desenha-se */
.ecg path {
  stroke-dasharray: var(--len, 3000);
  stroke-dashoffset: var(--len, 3000);
}
.ecg.is-drawn path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s cubic-bezier(.4,.05,.2,1); }
.ecg--hero.is-drawn path { transition-duration: 2.1s; }

/* ============ ABORDAGEM (faixa escura) ============ */
.approach {
  background: var(--azul-700); color: var(--paper);
  padding: clamp(3.5rem, 8vw, 7rem) var(--col-pad);
}
.approach__h {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: var(--step-3); margin: 0 0 var(--sp-5); color: var(--azul-100);
}
.approach__body {
  display: grid; gap: var(--sp-5); grid-template-columns: 1fr;
  max-inline-size: 62ch;
}
.approach__body p { margin: 0; font-size: var(--step-1); line-height: 1.55; color: color-mix(in srgb, var(--paper) 92%, var(--azul-300)); }

/* ============ MODALIDADES (linha, não cards) ============ */
.modes { max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 6vw, 5.5rem) var(--gut); }
.section-label { font-size: var(--step--1); letter-spacing: 0.16em; text-transform: uppercase; color: var(--azul-700); margin: 0 0 var(--sp-8); font-weight: 600; }
.modes__list { list-style: none; margin: 0; padding: 0; }
.mode {
  padding: clamp(1.4rem, 3vw, 2.2rem) 0;
  border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
}
.mode:last-child { border-bottom: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); }
/* âncora-assinatura (traço --brasa, decorativo) no lugar do índice ordinal — não há sequência real */
.mode__t { position: relative; margin: 0 0 0 var(--indent); font-family: var(--serif); font-weight: 500; font-size: var(--step-2); line-height: 1.05; }
.mode__t::before { content: ""; position: absolute; left: calc(var(--indent) * -1); top: 0.62em; width: 0.8rem; height: 2px; background: var(--brasa); }
.mode__d { margin: var(--sp-1) 0 0 var(--indent); max-width: 50ch; color: color-mix(in srgb, var(--ink) 78%, var(--paper)); }
/* dados de contato são pares rótulo/valor — <dl> em vez de <p> + <br> + <strong>,
   para que leitor de tela anuncie a relação em vez de uma linha corrida */
.mode__data {
  margin: var(--sp-3) 0 0 var(--indent); max-width: 50ch;
  display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-1) var(--sp-4);
  color: color-mix(in srgb, var(--ink) 78%, var(--paper));
}
.mode__data dt { font-weight: 600; }
.mode__data dd { margin: 0; }
/* rótulos longos ("Telefone e WhatsApp") espremem o valor em telas estreitas */
@media (max-width: 599.98px) {
  .mode__data { grid-template-columns: 1fr; gap: var(--sp-half); }
  .mode__data dd { margin-bottom: var(--sp-2); }
  .mode__data dd:last-child { margin-bottom: 0; }
}
.mode__link { display: inline-block; margin: var(--sp-3) 0 0 var(--indent); font-weight: 600; font-size: var(--step--1); color: var(--azul-700); text-underline-offset: 3px; }

/* ============ TELECONSULTA (detalhe da modalidade; listas em <details>) ============ */
.tele {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3rem, 6vw, 5.5rem) var(--gut);
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
}
.tele__h { font-family: var(--serif); font-weight: 400; font-size: var(--step-3); margin: 0 0 var(--sp-2); letter-spacing: -0.01em; }
.tele__h em { font-style: italic; color: var(--azul-500); }
.tele__lead { margin: 0; color: color-mix(in srgb, var(--ink) 82%, var(--paper)); max-width: 52ch; }
/* contrapeso honesto da seção: mesmo tom tipográfico do compromisso */
.tele__note {
  font-family: var(--serif); font-style: italic; color: var(--azul-500);
  font-size: var(--step-1); line-height: 1.45; margin: var(--sp-5) 0 0; max-width: 38ch;
}
.tele__sub { font-size: var(--step--1); letter-spacing: 0.16em; text-transform: uppercase; color: var(--azul-700); font-weight: 600; margin: 0 0 var(--sp-4); }
/* .tele na frente: .areas__list (definido depois no arquivo) zera margin/padding com a mesma especificidade */
.tele .tele__who { margin: 0 0 var(--sp-8); }
/* linhas com a mesma altura visual dos grupos abaixo */
.tele .tele__who li { padding-top: var(--sp-4); padding-bottom: var(--sp-4); }
.tele__group { border-top: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); }
.tele__group:last-of-type { border-bottom: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); }
.tele__group summary {
  position: relative; list-style: none; cursor: pointer;
  padding: var(--sp-3) var(--sp-7) var(--sp-3) var(--indent);
  font-family: var(--serif); font-weight: 500; font-size: var(--step-1); line-height: 1.2;
}
.tele__group summary::-webkit-details-marker { display: none; }
/* traço-assinatura brasa, mesmo idioma do .mode__t — centrado na linha do título */
.tele__group summary::before { content: ""; position: absolute; left: 0; top: 50%; margin-top: -1px; width: 0.8rem; height: 2px; background: var(--brasa); }
.tele__group summary::after { content: "+" / ""; position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%); font-family: var(--sans); font-weight: 500; color: var(--azul-500); }
.tele__group[open] summary::after { content: "−" / ""; }
.tele__group .areas__list { margin: 0 0 var(--sp-5); }
.tele__also { margin: var(--sp-7) 0 0; color: color-mix(in srgb, var(--ink) 78%, var(--paper)); max-width: 52ch; }

/* ============ Divider ECG ============ */
.divider { color: color-mix(in srgb, var(--azul-300) 80%, transparent); padding: 0 var(--col-pad); }
.divider .ecg { height: 56px; }

/* ============ ÁREAS (lista editorial) ============ */
.areas {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3rem, 6vw, 5.5rem) var(--gut);
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
}
.areas__h { font-family: var(--serif); font-weight: 400; font-size: var(--step-3); margin: 0 0 var(--sp-2); letter-spacing: -0.01em; }
.areas__lead { margin: 0; color: var(--azul-700); font-size: var(--step-1); max-width: 36ch; }
.areas__list { list-style: none; margin: 0; padding: 0; columns: 1; }
.areas__list li {
  padding: var(--sp-3) 0 var(--sp-3) var(--sp-5); position: relative;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  break-inside: avoid;
}
.areas__list li::before {
  content: ""; position: absolute; left: 0; top: 1.4em;
  width: 0.6rem; height: 1.5px; background: var(--brasa);
}

/* ============ SOBRE (assimétrico) ============ */
.about {
  background: var(--sand);
  padding: clamp(3.5rem, 8vw, 7rem) var(--col-pad);
}
.about__years {
  font-family: var(--serif); font-style: italic; color: var(--azul-500);
  font-size: var(--step-1); margin: 0 0 var(--sp-5);
}
.about__years span { font-size: var(--step-3); font-style: normal; display: inline-block; margin-right: var(--sp-1); color: var(--azul-700); }
.about__grid { display: grid; gap: var(--sp-7); }
.about__photo { margin: 0; max-inline-size: 360px; }
.about__photo img {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 18px 28px rgb(31 42 68 / 0.18));
  -webkit-mask-image: linear-gradient(to bottom, black 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 88%, transparent 100%);
}
.about__text { display: grid; gap: var(--sp-4); max-inline-size: 60ch; }
.about__h { font-family: var(--serif); font-weight: 400; font-size: var(--step-2); margin: 0; }
.about__text p { margin: 0; color: color-mix(in srgb, var(--ink) 86%, var(--sand)); }
.about__text a { color: var(--azul-700); text-decoration: underline; text-underline-offset: 3px; }

/* ============ COMPROMISSO ============ */
.pledge { padding: clamp(4rem, 10vw, 9rem) var(--gut); max-width: var(--maxw); margin: 0 auto; }
.pledge__q {
  font-family: var(--serif); font-weight: 400;
  font-size: var(--step-3); line-height: 1.18; letter-spacing: -0.015em;
  margin: 0; max-width: 22ch; text-wrap: balance;
}
.pledge__q em { font-style: italic; color: var(--azul-500); }

/* ============ CONTATO ============ */
.contact {
  background: var(--ink); color: var(--paper);
  padding: clamp(4rem, 9vw, 8rem) var(--col-pad);
  text-align: left;
}
.contact__h { font-family: var(--serif); font-weight: 400; font-size: var(--step-3); margin: 0; max-width: 18ch; letter-spacing: -0.01em; }
.contact__sub { margin: var(--sp-3) 0 var(--sp-8); color: var(--azul-300); font-size: var(--step-1); }
.contact__links { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.contact .btn--ghost { color: var(--paper); border-color: color-mix(in srgb, var(--azul-300) 70%, transparent); }
.contact .btn--ghost:hover { background: var(--azul-700); border-color: var(--azul-300); }

/* ============ Footer ============ */
.foot { padding: var(--sp-8) var(--gut); max-width: var(--maxw); margin: 0 auto; display: grid; gap: var(--sp-1); }
.foot__id { margin: 0; font-weight: 500; }
.foot__note { margin: 0; font-size: var(--step--1); color: color-mix(in srgb, var(--ink) 72%, var(--paper)); }

/* ============ Reveal (motion) — coreografia variada por seção ============ */
/* só esconde quando o JS está vivo (.js): se o script falhar, conteúdo aparece */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* herói: linhas da tese escalonadas */
.hero__thesis .line:nth-child(1) { transition-delay: .05s; }
.hero__thesis .line:nth-child(2) { transition-delay: .18s; }
.hero__thesis .line:nth-child(3) { transition-delay: .31s; }
.js .hero__portrait.reveal { transition-delay: .35s; }

/* abordagem (faixa escura): desliza da esquerda — não é fade-up.
   :not(.is-visible) p/ a variante não vencer o reset transform:none ao revelar */
.js .approach .reveal:not(.is-visible) { transform: translateX(-26px); }
.approach__body p.reveal:nth-child(2) { transition-delay: .12s; }

/* áreas: a lista cascateia item a item */
.js .areas__list li.reveal:nth-child(2n) { transition-delay: .07s; }
.js .areas__list li.reveal:nth-child(3n) { transition-delay: .13s; }

/* compromisso: a âncora tipográfica cresce um toque ao entrar */
.js .pledge__q.reveal:not(.is-visible) { transform: scale(.965); transform-origin: left center; }

/* ============ Responsivo ============ */
@media (max-width: 899.98px) {
  .hero { padding-bottom: 0; }
  .ecg--hero { bottom: clamp(1rem, 4vw, 2rem); }
}

/* telas estreitas: as 3 linhas fixas do h1 quebram mal ("muito" órfão) — quebra natural */
@media (max-width: 599.98px) {
  .hero__thesis { text-wrap: balance; }
  .hero__thesis .line { display: inline; }
}

@media (min-width: 720px) {
  .areas { grid-template-columns: 0.8fr 1.2fr; align-items: start; }
  .areas__list { columns: 2; column-gap: var(--sp-10); }
  .tele { grid-template-columns: 0.8fr 1.2fr; align-items: start; }
  /* dentro dos <details> a lista fica em coluna única — grupos já são curtos */
  .tele__group .areas__list, .tele__who { columns: 1; }
  .about__years { text-align: right; }
  .about__grid { grid-template-columns: minmax(220px, 300px) 1fr; gap: var(--sp-10); align-items: start; }
}

@media (min-width: 900px) {
  .hero { min-height: 560px; }
  .hero__sub {
    max-width: min(46ch, calc(100% - clamp(300px, 31%, 380px) - 2rem));
  }
  .hero__portrait {
    position: absolute;
    right: 0; bottom: 0; /* sobrepõe a lifeline; o corte da imagem coincide com o início da faixa azul */
    filter: none; /* sem sombra: rente à faixa azul ela vazaria um borrão sobre o fundo escuro */
    /* 31%: a borda esquerda cai logo após o pico da lifeline (termina em ~67,8% do path) */
    width: clamp(300px, 31%, 380px);
    margin: 0;
  }
}

/* ============ Reduced motion: ótimo parado ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .js .reveal { opacity: 1; transform: none; transition: none; }
  .ecg path { stroke-dashoffset: 0 !important; transition: none !important; }
  .btn, .top__cta { transition: none; }
}
