/* ============ 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;

  --maxw: 1180px;
  --gut: clamp(1.25rem, 5vw, 5rem);

  --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; }
:target { scroll-margin-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; }
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: 1rem;
  padding: 0.9rem var(--gut);
  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: 0.6rem; text-decoration: none; color: var(--azul-700); }
.brand__mark { width: 44px; height: 28px; }
.brand__name { font-family: var(--serif); font-weight: 500; font-size: 1.05rem; 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); }

/* ============ 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); }

/* ============ 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 1.4rem; }
.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: 1.8rem 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: 0.9rem; margin-top: 2.4rem; }

.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);
  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(--gut);
}
.approach__h {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: var(--step-3); margin: 0 0 1.5rem; color: var(--azul-100);
  max-width: var(--maxw); margin-inline: auto;
}
.approach__body {
  max-width: var(--maxw); margin-inline: auto;
  display: grid; gap: 1.4rem; 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 2.5rem; 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 1.7rem; font-family: var(--serif); font-weight: 500; font-size: var(--step-2); line-height: 1.05; }
.mode__t::before { content: ""; position: absolute; left: -1.7rem; top: 0.62em; width: 0.8rem; height: 2px; background: var(--brasa); }
.mode__d { margin: 0.4rem 0 0 1.7rem; max-width: 50ch; color: color-mix(in srgb, var(--ink) 78%, var(--paper)); }

/* ============ Divider ECG ============ */
.divider { color: color-mix(in srgb, var(--azul-300) 80%, transparent); padding: 0 var(--gut); }
.divider .ecg { height: 56px; max-width: var(--maxw); margin: 0 auto; }

/* ============ Á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 0.6rem; 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: 0.85rem 0 0.85rem 1.6rem; 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(--gut);
}
.about > * { max-width: var(--maxw); margin-inline: auto; }
.about__years {
  font-family: var(--serif); font-style: italic; color: var(--azul-500);
  font-size: var(--step-1); margin: 0 0 1.5rem;
}
.about__years span { font-size: var(--step-3); font-style: normal; display: inline-block; margin-right: 0.3rem; color: var(--azul-700); }
.about__text { display: grid; gap: 1.2rem; 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)); }

/* ============ 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(--gut);
  text-align: left;
}
.contact > * { max-width: var(--maxw); margin-inline: auto; }
.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: 1rem 0 2.4rem; color: var(--azul-300); font-size: var(--step-1); }
.contact__links { display: flex; flex-wrap: wrap; gap: 1rem; }
.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: 2.5rem var(--gut); max-width: var(--maxw); margin: 0 auto; display: grid; gap: 0.4rem; }
.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; }

/* 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 (min-width: 720px) {
  .areas { grid-template-columns: 0.8fr 1.2fr; align-items: start; }
  .areas__list { columns: 2; column-gap: 3rem; }
  .about__years { text-align: right; }
}

/* ============ 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; }
}
