/* =============================================================
   Clinica Maki Yamaguchi, Ortopedia e Psicologia
   Sistema de layout e componentes.
   Depende de: tokens.css, fonts.css
   Movimento: js/main.js (Motion.dev). Os atributos data-* sao o
   contrato entre este CSS e aquele JS. Nao renomear.
   ============================================================= */

/* ---------------------------------------------------------------
   1. Reset e base
   --------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;   /* ancoras nao somem sob a barra flutuante */
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  letter-spacing: var(--ls-tight);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img { height: auto; }

a { color: inherit; text-decoration: none; }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul, ol { list-style: none; }

/* Nenhum italico no site. Se algum `<em>` ou `<i>` escapar de uma edicao
   futura, ele continua reto: a regra e de sistema, nao de disciplina de
   quem edita. */
em, i, cite, dfn, var, address { font-style: normal; }

:focus-visible {
  outline: 2px solid var(--indigo-ink);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Sobre o ceu e sobre a tinta, o anel precisa ser claro para continuar visivel */
.hero :focus-visible,
.footer :focus-visible,
.frame-dark :focus-visible { outline-color: var(--jade-pale); }

.skip-link {
  position: absolute;
  left: 50%;
  top: 8px;
  translate: -50% -200%;
  z-index: 200;
  padding: 12px 20px;
  border-radius: var(--r-lg);
  background: var(--sumi);
  color: var(--fg-on-dark);
  font-size: var(--t-sm);
  font-weight: 500;
  transition: translate var(--dur-fast) var(--ease-snap);
}
.skip-link:focus-visible { translate: -50% 0; }

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

/* ---------------------------------------------------------------
   2. Tipografia
   --------------------------------------------------------------- */
.display,
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--ls-display);
  line-height: var(--lh-tight);
  text-wrap: balance;
}

/* Enfase do display: COR e PESO. Nunca inclinacao. A Zen Kaku e estatica em
   400, 500 e 700, entao o 700 aqui e peso desenhado, nao bold sintetico. */
.display em,
h1 em, h2 em, h3 em,
.emph {
  font-style: var(--display-emph-style);
  font-weight: var(--display-emph-weight);
  color: var(--display-emph-color);
}

h1 { font-size: var(--t-h1); line-height: var(--lh-display); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }

h4, h5 {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: var(--ls-tight);
}
h4 { font-size: var(--t-h5); line-height: var(--lh-relaxed); }
h5 { font-size: var(--t-lead); line-height: var(--lh-snug); }

p { text-wrap: pretty; }

.lead {
  font-size: var(--t-lead);
  line-height: var(--lh-loose);
  color: var(--fg-muted);
  max-width: var(--maxw-text);
}

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--frente-ink);
  margin-bottom: var(--sp-xl);
}
/* O kicker ja da o respiro de cima, entao o titulo que vem logo depois
   nao acumula a propria margem. */
.kicker + h2, .kicker + h3 { margin-top: 0; }

/* Fecho de secao: a frase que arremata, um degrau abaixo do corpo */
.closing {
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: var(--sp-3xl);
  border-top: 1px solid var(--border);
  max-width: 68ch;
  font-size: var(--t-lead);
  line-height: var(--lh-loose);
  color: var(--fg);
}

/* Numero de dado (ano de fundacao, anos de porta aberta, frentes) */
.stat {
  font-family: var(--font-mono);
  font-size: var(--t-stat);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--frente-ink);
}

/* ---------------------------------------------------------------
   2b. As duas frentes
   A clinica tem duas portas. Quem chega com dor de coluna e quem chega
   para ser escutado nao chegam pelo mesmo motivo, e a pagina precisa
   deixar isso obvio antes da primeira linha de texto. Cada bloco de
   frente troca as quatro variaveis, e todo componente le a variavel.
   --------------------------------------------------------------- */
.frente--orto {
  --frente:      var(--indigo);
  --frente-ink:  var(--indigo-ink);
  --frente-pale: var(--indigo-pale);
  --frente-wash: var(--indigo-wash);
}
.frente--psico {
  --frente:      var(--jade);
  --frente-ink:  var(--jade-ink);
  --frente-pale: var(--jade-pale);
  --frente-wash: var(--jade-wash);
}

/* Etiqueta que nomeia a frente. Fica acima do titulo do bloco. */
.frente-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-md);
  padding: 6px 14px 6px 10px;
  border-radius: var(--r-pill);
  background: var(--frente-wash);
  color: var(--frente-ink);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.frente-tag::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--frente);
}

/* Bloco de uma frente: etiqueta em cima, grade de assuntos embaixo. Quando
   dois blocos se seguem, o segundo abre com um respiro maior para que a
   troca de frente seja lida como troca de assunto. */
.frente-block > .pill-grid { margin-top: var(--sp-2xl); }
.frente-block + .frente-block { margin-top: var(--sp-5xl); }

/* ---------------------------------------------------------------
   2c. Pills das especialidades
   Nome a esquerda, seta a direita, respiro grande entre os dois. A pill
   "& mais" e tracejada e sem preenchimento; a ultima e a de enfase, na
   cor da marca. Preto, nunca.
   --------------------------------------------------------------- */
.pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--sp-lg);
}

.pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2xl);
  min-height: 66px;
  padding: 16px 20px 16px 26px;
  background: var(--washi-claro);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  box-shadow: 0 1px 2px rgba(29, 42, 51, 0.05);
  color: var(--fg);
  transition:
    translate var(--dur-fast) var(--ease-snap),
    box-shadow var(--dur-fast) var(--ease-snap),
    border-color var(--dur-fast) var(--ease-snap),
    background-color var(--dur-fast) var(--ease-snap);
}
.pill:hover {
  translate: 0 -2px;
  border-color: var(--border-strong);
  box-shadow: 0 8px 20px rgba(29, 42, 51, 0.12);
}

.pill__label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--t-sm);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  text-wrap: balance;
}
.pill__arrow {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--frente-ink);
  transition: translate var(--dur-fast) var(--ease-snap);
}
.pill:hover .pill__arrow { translate: 3px 0; }

/* Um filete da cor da frente na borda de dentro: quem procura ortopedia
   enxerga o grupo dela sem precisar ler. */
.pill--orto,
.pill--psico { box-shadow: inset 4px 0 0 var(--frente), 0 1px 2px rgba(29, 42, 51, 0.05); }
.pill--orto:hover,
.pill--psico:hover { box-shadow: inset 4px 0 0 var(--frente), 0 8px 20px rgba(29, 42, 51, 0.12); }

/* "& mais": o convite a olhar o resto. Sem preenchimento, traco tracejado,
   tom apagado. Ela nao compete com a de enfase. */
.pill--more {
  background: transparent;
  border: 1px dashed var(--border-strong);
  box-shadow: none;
  color: var(--fg-muted);   /* 5.70:1 sobre --washi */
}
.pill--more:hover {
  background: transparent;
  border-color: var(--indigo-ink);
  box-shadow: none;
}
.pill--more .pill__arrow { color: var(--fg-muted); }

/* Enfase: cor primaria da marca. #2E6E8E com --fg-on-dark da 4.99:1. */
.pill--emph {
  background: var(--indigo);
  border-color: var(--indigo);
  color: var(--fg-on-dark);
  box-shadow: none;
}
.pill--emph:hover {
  background: var(--indigo-900);
  border-color: var(--indigo-900);
  box-shadow: 0 8px 22px rgba(29, 42, 51, 0.2);
}
.pill--emph .pill__arrow { color: currentColor; }

/* ---------------------------------------------------------------
   2d. Cards ilustrados
   Card claro arredondado, ilustracao sobre painel lavado da paleta.
   --------------------------------------------------------------- */
.pcards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.pcard {
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2vw, 28px);
  padding: clamp(14px, 1.4vw, 18px);
  background: var(--washi-claro);
  border-radius: var(--r-card);
  box-shadow: var(--inset-hairline);
}

/* Painel quadrado. As tres ilustracoes tem proporcoes diferentes (a porta e o
   celular sao retrato) e um painel deitado deixaria as duas minusculas.
   `min-height: 0` e o que segura o quadrado: sem isso, o minimo automatico do
   item de flex deixa a ilustracao retrato empurrar o painel para centenas de
   pixels a mais e desalinhar os tres cards. */
.pcard__panel {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  min-height: 0;
  overflow: hidden;
  padding: clamp(18px, 2.2vw, 30px);
  background: var(--frente-wash);
  border-radius: var(--r-lg);
}
.pcard__panel img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.pcard__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
  padding: 0 clamp(8px, 1vw, 14px) clamp(10px, 1.2vw, 16px);
}
.pcard__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--t-h4);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
}
.pcard__text {
  font-size: var(--t-sm);
  line-height: var(--lh-loose);
  color: var(--fg-muted);
}

/* O fecho com ilustracao ao lado. A regua e o respiro sao da linha, nao do
   paragrafo: senao o traco pararia na largura do texto e o desenho ficaria
   pendurado fora dele. O `.closing` solto, nas outras secoes, segue intacto. */
.closing-row {
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: var(--sp-3xl);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
}
.closing-row .closing {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.closing-row__art {
  flex: none;
  width: clamp(140px, 17vw, 230px);
  height: auto;
}

/* ---------------------------------------------------------------
   3. Layout
   --------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(48px, 6vw, 88px); }
.section--soft { background: var(--washi-fundo); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-3xl);
  margin-bottom: clamp(40px, 5vw, 72px);
}

.section-head__text { max-width: 46ch; }
.section-head__text .lead { margin-top: var(--sp-xl); }
.section-head__text .frente-tag { margin-bottom: var(--sp-xl); }

/* A ilustracao que ocupa o outro lado do cabecalho. A deitada e medida pela
   largura; a em pe (a porta, o celular) pela ALTURA, do contrario 300px de
   largura viriam com 400px de altura e o cabecalho inteiro cresceria atras. */
.section-head__art {
  flex: none;
  width: clamp(190px, 24vw, 300px);
  height: auto;
}
.section-head__art--tall {
  width: auto;
  height: clamp(180px, 22vw, 280px);
}

/* ---------------------------------------------------------------
   4. Botoes e links
   --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-md);
  padding: 16px 20px;
  border-radius: var(--r-lg);
  font-size: var(--t-sm);
  font-weight: 500;
  line-height: 1.1;
  text-wrap: nowrap;
  transition:
    background-color var(--dur-fast) var(--ease-snap),
    color var(--dur-fast) var(--ease-snap);
}

.btn svg { flex: none; width: 14px; height: 14px; }

.btn--primary {
  background: var(--indigo);
  color: var(--fg-on-dark);      /* 4.99:1 */
}
.btn--primary:hover { background: var(--indigo-900); }

.btn--light {
  background: var(--washi-claro);
  color: var(--indigo-ink);      /* 5.84:1 */
  box-shadow: var(--inset-hairline);
}
.btn--light:hover { background: var(--indigo-wash); }

.btn--outline {
  background: transparent;
  color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.btn--outline:hover { background: var(--washi-claro); color: var(--indigo-ink); }

/* Sobre o ceu, o botao secundario e um contorno claro */
.btn--onsky {
  background: transparent;
  color: var(--fg-on-dark);
  box-shadow: inset 0 0 0 1px rgba(246, 241, 230, 0.55);
}
.btn--onsky:hover { background: rgba(246, 241, 230, 0.16); }

/* `translate` (nao `transform`): o spring do Motion e dono do transform */
.btn:active { translate: 0 1px; }

.btn .arrow { transition: translate var(--dur-fast) var(--ease-snap); }
.btn:hover .arrow { translate: 3px 0; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--frente-ink);
}
.link-arrow svg { width: 16px; height: 16px; transition: translate var(--dur-fast) var(--ease-snap); }
.link-arrow:hover svg { translate: 4px 0; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-lg);
}

/* ---------------------------------------------------------------
   5. Header
   --------------------------------------------------------------- */
.header {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 100;
  padding-inline: var(--gutter);
  pointer-events: none;
}

.header__bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3xl);
  max-width: 1124px;
  min-height: 68px;
  margin-inline: auto;
  padding-inline: var(--sp-3xl);
  border-radius: var(--r-2xl);
  color: var(--fg);
  background: transparent;
  transition:
    background-color var(--dur-base) var(--ease-brand),
    backdrop-filter var(--dur-base) var(--ease-brand),
    color var(--dur-base) var(--ease-brand);
}

.header[data-scrolled='true'] .header__bar {
  background: rgba(246, 241, 230, 0.76);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: 0 1px 0 var(--border);
}

/* Sobre o ceu, antes de rolar: tudo em claro */
.header[data-onsky='true'][data-scrolled='false'] .header__bar { color: var(--fg-on-dark); }

/* Marca: carpa koi e assinatura em duas linhas */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-lg);
  color: inherit;
}
.brand__mark {
  width: 34px;
  height: 34px;
  flex: none;
  color: currentColor;
}
.brand__name {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.15;
  white-space: nowrap;
}
.brand__role {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.76;
  margin-top: 2px;
  white-space: nowrap;
}

.nav { display: flex; align-items: center; gap: var(--sp-3xl); }

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: var(--t-sm);
  font-weight: 500;
  color: inherit;
  padding-block: 8px;
}

.nav__link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  scale: 0 1;
  transform-origin: left;
  transition: scale var(--dur-base) var(--ease-brand);
}
.nav__link:hover::after,
.nav__link[aria-current='page']::after { scale: 1 1; }

.header__actions { display: flex; align-items: center; gap: var(--sp-xl); }

.btn--nav {
  background: var(--indigo);
  color: var(--fg-on-dark);
  padding: 12px 18px;
}
.btn--nav:hover { background: var(--indigo-900); }
.header[data-onsky='true'][data-scrolled='false'] .btn--nav {
  background: var(--washi-claro);
  color: var(--indigo-ink);
}
.header[data-onsky='true'][data-scrolled='false'] .btn--nav:hover { background: var(--indigo-wash); }

.nav-toggle { display: none; }
.mobile-nav { display: none; }

/* ---------------------------------------------------------------
   6. Hero: o cardume de carpas koi
   --------------------------------------------------------------- */
.hero {
  position: relative;
  height: 108vh;
  min-height: 700px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

/* z0: o ceu */
.sky {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 101%;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) var(--sky-stop));
  pointer-events: none;
}

/* z1: a faixa de nuvens */
.sky__clouds {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
/* Quatro nuvens pintadas na paleta da marca, em quatro profundidades. A
   opacidade de cada uma e um token proprio (--o) porque o JS precisa saber
   ate onde animar na entrada, e o fallback precisa saber para onde voltar
   se o Motion nao subir. */
.sky__cloud {
  position: absolute;
  max-width: none;          /* o reset global achataria as larguras em % */
  height: auto;
  opacity: var(--o);
  will-change: transform;
}

/* O ceu manda, a nuvem acompanha. O terco de cima fica limpo: e onde o titulo
   vive e onde o degrade ainda e escuro. A massa desce para o rodape, e as duas
   camadas altas sao so sugestao: longe, pequenas, quase transparentes. Nuvem
   clara atras de texto pequeno e o pior par possivel num ceu que ja clareou. */
.sky__cloud--1 { --o: 0.10; width:  28%; top:    17%; left:   4%; }
.sky__cloud--2 { --o: 0.12; width:  34%; top:    33%; right:  1%; }
.sky__cloud--3 { --o: 0.24; width:  62%; bottom:  4%; left: -14%; }
.sky__cloud--4 { --o: 0.34; width:  94%; bottom:-22%; right:-14%; }

/* z2: o cardume, dez carpas num palco de 880x620.
   A profundidade e fisica, nao pintada: quanto mais longe, menor a carpa,
   mais lavada na cor do ceu, menor o parallax e mais lenta a deriva. Sem
   sombra preta: uma carpa "longe" nao projeta sombra dura, ela DESAPARECE
   na cor da agua. Aqui isso e escala, opacidade (--o) e um veu de desfoque
   (--haze) nos planos distantes. */
.cardume {
  position: absolute;
  z-index: 2;
  bottom: 46px;
  left: 57%;
  translate: -50% 0;
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.cardume__stage {
  position: relative;
  width: 880px;
  height: 620px;
  flex: none;
}

/* A centragem da carpa 2 e por margem, nunca por `translate`: a deriva
   continua do Motion e dona dessa propriedade e apagaria o -50%. O `rotate`
   fica livre para a inclinacao organica logo abaixo. */
.koi {
  position: absolute;
  will-change: transform;
  opacity: var(--o, 1);
  filter: blur(var(--haze, 0px));
}
/* Proximas: grandes, nitidas, opacidade cheia. Proporcoes dos arquivos entre
   parenteses, para ninguem esticar uma carpa por engano. */
.koi--1 { left: 2px;    bottom: 4px;   width: 224px; --o: 1;    }              /* koi-1   (1.78) */
.koi--2 { left: 47%;    bottom: 58px;  width: 132px; --o: 0.95; margin-left: -66px; } /* koi-3 (0.77, a ascendente) */
.koi--3 { right: 64px;  bottom: 186px; width: 196px; --o: 0.96; }              /* koi-2   (1.43) */
.koi--4 { right: 2px;   top: 96px;     width: 168px; --o: 0.84; }              /* koi-x-1 (1.95) */
.koi--5 { right: 152px; top: 2px;      width: 158px; --o: 0.70; --haze: 0.4px; } /* koi-x-2 (2.72) */

/* As cinco de tras vivem em % do palco, e assim atravessam os tres
   breakpoints sem uma linha de reposicionamento. Nenhuma delas nada na mesma
   altura de outra: cardume de verdade nao faz fileira.

   E nenhuma delas passa ATRAS DO TEXTO. O palco cobre a coluna de leitura, e
   uma carpa cruzando a headline nao e profundidade, e ruido. Por isso os
   deslocamentos negativos: o cardume sangra pelas margens do hero,
   contornando o texto em vez de atravessa-lo. */
.koi--6  { left:  -8%;  top:    15%; width: 12.5%; --o: 0.58; --haze: 0.6px; } /* koi-x-3 (1.29) */
.koi--7  { right: -11%; top:     5%; width: 17.0%; --o: 0.78; --haze: 0.3px; } /* koi-x-2 (2.72) */
.koi--8  { left:  -5%;  bottom: 25%; width:  9.5%; --o: 0.48; --haze: 0.9px; } /* koi-x-1 (1.95) */
.koi--9  { right:  3%;  bottom:  3%; width: 13.0%; --o: 0.72; --haze: 0.4px; } /* koi-x-3 (1.29) */
.koi--10 { left: -13%;  top:     3%; width:  7.8%; --o: 0.42; --haze: 1.1px; } /* koi-1   (1.78) */

/* Deriva organica: o Motion move `translate`, o CSS inclina `rotate`. Sao
   propriedades individuais distintas, nao colidem. Periodos primos entre si
   para o cardume nunca cair em cadencia mecanica. */
@keyframes koi-tilt {
  0%, 100% { rotate: 0deg; }
  50%      { rotate: var(--tilt, 1.4deg); }
}
.koi { animation: koi-tilt var(--tilt-dur, 11s) var(--ease-drift) infinite; }
.koi--1  { --tilt:  1.6deg; --tilt-dur: 11s;   animation-delay: 0s; }
.koi--2  { --tilt: -1.2deg; --tilt-dur: 13s;   animation-delay: -2s; }
.koi--3  { --tilt:  2.0deg; --tilt-dur: 9.5s;  animation-delay: -4s; }
.koi--4  { --tilt: -1.8deg; --tilt-dur: 14.5s; animation-delay: -1s; }
.koi--5  { --tilt:  1.3deg; --tilt-dur: 12.5s; animation-delay: -6s; }
/* As distantes inclinam menos e demoram mais: distancia tambem e tempo. */
.koi--6  { --tilt: -0.9deg; --tilt-dur: 17s;   animation-delay: -3s; }
.koi--7  { --tilt:  1.1deg; --tilt-dur: 15.5s; animation-delay: -8s; }
.koi--8  { --tilt:  0.6deg; --tilt-dur: 21s;   animation-delay: -5s; }
.koi--9  { --tilt: -1.0deg; --tilt-dur: 16s;   animation-delay: -11s; }
.koi--10 { --tilt:  0.5deg; --tilt-dur: 23s;   animation-delay: -7s; }

/* z4: o veu. Escurece o ceu onde o texto vive, e da a profundidade
   atmosferica do cardume: as carpas do centro recuam, as das bordas ficam.

   Sao duas camadas. Um PISO vertical ancorado a ALTURA do hero, que segura a
   faixa inteira da leitura, e um radial por cima, que faz o miolo recuar. O
   piso sustenta 0.69 ate 78% porque e ali que vivem o botao de contorno e a
   microcopia; ele so solta depois disso, que e exatamente onde o cardume
   pousa. Medido nessa configuracao: corpo nunca abaixo de 5.8:1, enfase
   nunca abaixo de 4.2:1. Nao afrouxar sem medir de novo. */
.sky__veil {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(29, 42, 51, 0.58) 0%,
      rgba(29, 42, 51, 0.64) 24%,
      rgba(29, 42, 51, 0.69) 46%,
      rgba(29, 42, 51, 0.69) 78%,
      rgba(29, 42, 51, 0.30) 88%,
      rgba(29, 42, 51, 0) 100%
    ),
    radial-gradient(
      ellipse 82% 76% at 50% 44%,
      rgba(29, 42, 51, 0.22) 0%,
      rgba(29, 42, 51, 0.12) 54%,
      rgba(29, 42, 51, 0) 82%
    );
}

/* z5: o texto */
.hero__inner {
  position: relative;
  z-index: 5;
  width: 680px;
  max-width: 100%;
  padding-bottom: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-3xl);
  color: var(--fg-on-dark);
}

.hero__title {
  font-size: var(--t-display);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  color: var(--fg-on-dark);
  text-wrap: balance;
}
/* Sobre o ceu a enfase e o jade lavado, nao o azul profundo, que sumiria no
   fundo escuro. Peso, nunca inclinacao. */
.hero__title em {
  color: var(--jade-pale);
  font-weight: var(--display-emph-weight);
  font-style: normal;
}

/* Estes textos nao usam branco com alpha. Sobre uma superficie de luminosidade
   constante isso e hierarquia barata e funciona; sobre um CEU EM GRADIENTE e
   uma armadilha, porque o mesmo alpha rende 9:1 no topo e 3:1 embaixo. A
   hierarquia aqui se faz por TAMANHO, FAMILIA e ESPACAMENTO: a cor fica
   solida e o texto sobrevive ao ceu inteiro. */
.hero__sub {
  font-size: var(--t-lead);
  line-height: var(--lh-loose);
  color: var(--fg-on-dark);
  max-width: 54ch;
}

.hero__sig {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--fg-on-dark);
  text-wrap: balance;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-lg);
}

.hero__micro {
  font-size: var(--t-xs);
  line-height: var(--lh-loose);
  color: var(--fg-on-dark);
  max-width: 48ch;
}

/* ---------------------------------------------------------------
   7. Faixa de credibilidade
   --------------------------------------------------------------- */
.creds__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--sp-3xl);
}

.cred {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
  padding-top: var(--sp-xl);
  border-top: 2px solid var(--frente);
}

.cred__title {
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--frente-ink);
}
.cred__text {
  font-size: var(--t-xs);
  line-height: var(--lh-loose);
  color: var(--fg-muted);
}

/* ---------------------------------------------------------------
   8. Como funciona: passos com foto
   --------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3xl);
}

.step {
  display: flex;
  flex-direction: column;
  background: var(--washi-claro);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--inset-hairline);
  transition: transform var(--dur-base) var(--ease-brand);
}
.step:hover { transform: translateY(-4px); }

.step__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--washi-fundo);
}
.step__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale var(--dur-slow) var(--ease-brand);
}
.step:hover .step__media img { scale: 1.04; }

.step__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
  padding: clamp(24px, 3vw, 36px);
  flex: 1;
}

.step__num {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: var(--ls-caps);
  color: var(--frente-ink);
}

.step__title {
  font-family: var(--font-display);
  font-size: var(--t-h4);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
}

.step__text {
  font-size: var(--t-sm);
  line-height: var(--lh-loose);
  color: var(--fg-muted);
}

/* ---------------------------------------------------------------
   9. Sinais
   --------------------------------------------------------------- */
.signals {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-xl);
}

.signal {
  display: flex;
  gap: var(--sp-xl);
  padding: clamp(20px, 2.4vw, 28px);
  background: var(--washi-claro);
  border-radius: var(--r-xl);
  box-shadow: var(--inset-hairline);
  font-size: var(--t-lead);
  line-height: var(--lh-loose);
  color: var(--fg);
}
.signal::before {
  content: '';
  flex: none;
  width: 3px;
  border-radius: 2px;
  background: var(--frente);
}

/* ---------------------------------------------------------------
   10. Bloco escuro
   --------------------------------------------------------------- */
.frame-dark {
  position: relative;
  border-radius: var(--r-card);
  background: var(--sumi);
  color: var(--fg-on-dark);
  padding: clamp(36px, 6vw, 80px);
  overflow: hidden;
  isolation: isolate;
}

.frame-dark__head {
  position: relative;
  z-index: 2;
  max-width: 36ch;
  margin-bottom: clamp(36px, 4.5vw, 64px);
}
.frame-dark__head .kicker { color: var(--jade-pale); }

.frame-dark__title {
  font-size: var(--t-h2);
  line-height: var(--lh-tight);
}
.frame-dark__title em { color: var(--jade-pale); font-weight: var(--display-emph-weight); }

.benefit-list {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr));
  gap: var(--sp-xl);
}

.benefit {
  display: flex;
  flex-direction: column;
  gap: var(--sp-lg);
  padding: var(--sp-3xl);
  border-radius: var(--r-xl);
  background: rgba(246, 241, 230, 0.05);
  border: 1px solid rgba(246, 241, 230, 0.13);
}

.benefit__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: rgba(195, 213, 199, 0.14);
  color: var(--jade-pale);
}
.benefit__icon svg { width: 22px; height: 22px; }

.benefit__title {
  font-family: var(--font-body);
  font-size: var(--t-lead);
  font-weight: 600;
}
.benefit__text {
  font-size: var(--t-sm);
  line-height: var(--lh-loose);
  color: var(--fg-on-dark-mu);
}

/* Uma carpa so, muito discreta, no canto do bloco escuro */
.frame-dark__koi {
  position: absolute;
  right: -40px;
  bottom: -30px;
  width: clamp(180px, 26vw, 340px);
  z-index: 1;
  opacity: 0.1;
  pointer-events: none;
}

/* ---------------------------------------------------------------
   11. Sobre: foto e texto
   --------------------------------------------------------------- */
.bio {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.bio__media {
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--washi-fundo);
  box-shadow: var(--inset-hairline);
}
.bio__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 42%;
}

.bio__cred {
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--frente-ink);
  margin-top: var(--sp-lg);
}

.bio__body { margin-top: clamp(24px, 3vw, 36px); }
.bio__body p {
  font-size: var(--t-body);
  line-height: var(--lh-prose);
  color: var(--fg-muted);
  max-width: 58ch;
}
.bio__body p + p { margin-top: var(--sp-2xl); }

.bio__cta { margin-top: clamp(28px, 3.5vw, 40px); }

/* ---------------------------------------------------------------
   12. FAQ
   --------------------------------------------------------------- */
.faq__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.faq__more { margin-top: var(--sp-4xl); }

/* A coluna da esquerda termina cedo porque o titulo e curto. A carpa ocupa
   essa sobra sem competir com a leitura da lista ao lado. */
.faq__art {
  display: block;
  width: clamp(220px, 28vw, 330px);
  height: auto;
  margin-top: var(--sp-5xl);
  opacity: 0.85;
}

.faq__list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.faq-item { border-bottom: 1px solid var(--border); }

.faq-item__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3xl);
  padding-block: var(--sp-3xl);
  text-align: left;
  font-size: var(--t-lead);
  font-weight: 500;
  line-height: var(--lh-snug);
  color: var(--fg);
  transition: color var(--dur-fast) var(--ease-snap);
}
.faq-item__q:hover { color: var(--frente-ink); }

.faq-item__icon {
  flex: none;
  position: relative;
  width: 20px;
  height: 20px;
  color: var(--frente-ink);
}
.faq-item__icon::before,
.faq-item__icon::after {
  content: '';
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: rotate var(--dur-base) var(--ease-brand);
}
.faq-item__icon::after { rotate: 90deg; }
.faq-item[data-open='true'] .faq-item__icon::after { rotate: 0deg; }

/* Abertura sem medir altura em JS: 0fr para 1fr */
.faq-item__a {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows var(--dur-base) var(--ease-brand);
}
.faq-item[data-open='true'] .faq-item__a { grid-template-rows: 1fr; }

.faq-item__a-inner {
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
  padding-right: clamp(0px, 6vw, 56px);
  font-size: var(--t-sm);
  line-height: var(--lh-prose);
  color: var(--fg-muted);
  transition: padding-bottom var(--dur-base) var(--ease-brand);
}
.faq-item[data-open='true'] .faq-item__a-inner { padding-bottom: var(--sp-3xl); }

/* ---------------------------------------------------------------
   13. Bloco de resposta
   O produto deste site e conseguir marcar. Este bloco existe para dizer,
   sem rodeio, em quanto tempo a clinica responde e o que fazer se ela
   nao responder. Ele nunca some de uma pagina.
   --------------------------------------------------------------- */
.resposta {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 64px);
  padding: clamp(28px, 4vw, 52px);
  background: var(--indigo-wash);
  border-radius: var(--r-card);
  border-top: 3px solid var(--indigo);
}

.resposta__title {
  font-family: var(--font-display);
  font-size: var(--t-h3);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
}
.resposta__title em { color: var(--indigo-ink); font-weight: var(--display-emph-weight); }

.resposta__lead {
  margin-top: var(--sp-xl);
  font-size: var(--t-sm);
  line-height: var(--lh-prose);
  color: var(--fg-muted);
  max-width: 46ch;
}

.resposta__steps { display: flex; flex-direction: column; }

.resposta__step {
  display: flex;
  gap: var(--sp-2xl);
  padding-block: var(--sp-2xl);
  border-top: 1px solid rgba(29, 42, 51, 0.14);
}
.resposta__step:first-child { border-top: 0; padding-top: 0; }

.resposta__when {
  flex: none;
  width: 8.5ch;
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--indigo-ink);
  padding-top: 3px;
}
.resposta__what {
  font-size: var(--t-sm);
  line-height: var(--lh-prose);
  color: var(--fg);
}

.resposta__cta { margin-top: var(--sp-3xl); }

/* ---------------------------------------------------------------
   14. Aviso serio, nunca alarmista
   --------------------------------------------------------------- */
.alert {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 3vw, 40px);
  padding: clamp(28px, 4vw, 48px);
  background: var(--jade-wash);
  border-radius: var(--r-card);
  border-top: 3px solid var(--vermelhao);
}

/* Quando o aviso tem um bloco so, ele ocupa a largura inteira. */
.alert--single { grid-template-columns: 1fr; }

.alert__block h3 {
  font-family: var(--font-body);
  font-size: var(--t-lead);
  font-weight: 600;
  letter-spacing: var(--ls-tight);
  line-height: var(--lh-snug);
  margin-bottom: var(--sp-lg);
}
.alert__block p {
  font-size: var(--t-sm);
  line-height: var(--lh-prose);
  color: var(--fg-muted);
}

.alert__nums {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm) var(--sp-3xl);
  margin-top: var(--sp-xl);
}
.alert__num {
  display: inline-flex;
  align-items: baseline;
  gap: var(--sp-sm);
  font-family: var(--font-mono);
  font-size: var(--t-sm);
  color: var(--vermelhao-ink);   /* 5.24:1 sobre --washi */
}
.alert__num b {
  font-size: 1.375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
a.alert__num:hover { text-decoration: underline; text-underline-offset: 4px; }

.alert__closing { grid-column: 1 / -1; }

/* ---------------------------------------------------------------
   15. CTA final
   --------------------------------------------------------------- */
.cta {
  position: relative;
  text-align: center;
  padding-block: clamp(88px, 11vw, 168px);
  overflow: hidden;
  isolation: isolate;
}

.cta__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3xl);
}

.cta__title {
  font-size: var(--t-h1);
  line-height: var(--lh-display);
  max-width: 22ch;
}
.cta__lead {
  font-size: var(--t-lead);
  line-height: var(--lh-loose);
  color: var(--fg-muted);
  max-width: 54ch;
}
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-lg);
}
.cta__sig {
  margin-top: var(--sp-2xl);
  font-family: var(--font-mono);
  font-size: var(--t-xs);
  line-height: var(--lh-loose);
  color: var(--fg-muted);
  max-width: 66ch;
}

/* Duas carpas soltas, muito discretas, emoldurando o convite */
.cta__koi {
  position: absolute;
  z-index: 1;
  width: clamp(90px, 12vw, 168px);
  opacity: 0.22;
  pointer-events: none;
}
.cta__koi--l { left: 4%;  top: 18%;    rotate: -6deg; }
.cta__koi--r { right: 5%; bottom: 16%; rotate: 5deg; }

/* ---------------------------------------------------------------
   16. Botao flutuante do WhatsApp
   --------------------------------------------------------------- */
.wa-float {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-md);
  min-height: 52px;
  padding: 14px 20px;
  border-radius: var(--r-pill);
  background: var(--indigo);
  color: var(--fg-on-dark);
  font-size: var(--t-sm);
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 10px 30px rgba(29, 42, 51, 0.26);
  transition:
    background-color var(--dur-fast) var(--ease-snap),
    transform var(--dur-base) var(--ease-brand);
}
.wa-float:hover { background: var(--indigo-900); transform: translateY(-2px); }
.wa-float svg { flex: none; width: 22px; height: 22px; }

/* ---------------------------------------------------------------
   17. Footer
   --------------------------------------------------------------- */
.footer {
  position: relative;
  background: var(--sumi-900);
  color: var(--fg-on-dark);
  padding-block: clamp(64px, 8vw, 112px) var(--sp-5xl);
  overflow: hidden;
  isolation: isolate;
}

.footer__top {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 64px);
}

.footer__brand { display: flex; flex-direction: column; gap: var(--sp-3xl); align-items: flex-start; }
.footer__brand .brand__mark { width: 46px; height: 46px; }
.footer__brand .brand__name { font-size: 1.25rem; white-space: normal; }
.footer__brand .brand__role { white-space: normal; }

.footer__tagline {
  font-family: var(--font-display);
  font-size: var(--t-h4);
  font-weight: var(--display-weight);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  max-width: 22ch;
}

.footer__social { display: flex; gap: var(--sp-lg); }
.footer__social a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  border: 1px solid rgba(246, 241, 230, 0.24);
  color: var(--fg-on-dark);
  transition:
    background-color var(--dur-fast) var(--ease-snap),
    border-color var(--dur-fast) var(--ease-snap);
}
.footer__social a:hover {
  background: rgba(246, 241, 230, 0.1);
  border-color: rgba(246, 241, 230, 0.55);
}
.footer__social svg { width: 20px; height: 20px; }

.footer-col__title {
  font-size: var(--t-xs);
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: var(--ls-caps);
  text-transform: uppercase;
  color: var(--jade-pale);
  margin-bottom: var(--sp-xl);
}

.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-lg); }

.footer-col a,
.footer-col li {
  font-size: var(--t-sm);
  line-height: var(--lh-loose);
  color: var(--fg-on-dark-mu);
}
.footer-col a { transition: color var(--dur-fast) var(--ease-snap); }
.footer-col a:hover { color: var(--fg-on-dark); text-decoration: underline; text-underline-offset: 4px; }

.footer__bottom {
  position: relative;
  z-index: 2;
  margin-top: clamp(48px, 6vw, 88px);
  padding-top: var(--sp-3xl);
  border-top: 1px solid rgba(246, 241, 230, 0.16);
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-lg) var(--sp-3xl);
  font-size: var(--t-xs);
  color: var(--fg-on-dark-mu);
}
.footer__legal a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* Aviso legal: obrigatorio em todas as paginas */
.footer__disclaimer {
  font-size: var(--t-xs);
  line-height: var(--lh-prose);
  color: rgba(246, 241, 230, 0.64);
  max-width: 94ch;
}

.obliv-sig {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: rgba(246, 241, 230, 0.56);
}
.obliv-sig a { transition: color var(--dur-fast) var(--ease-snap); }
.obliv-sig a:hover { color: var(--fg-on-dark); }

.footer__koi {
  position: absolute;
  right: -20px;
  bottom: -10px;
  z-index: 1;
  width: clamp(160px, 22vw, 300px);
  opacity: 0.09;
  pointer-events: none;
}

/* ---------------------------------------------------------------
   18. Estado inicial das animacoes
   So quando o JS confirma suporte: sem JS, nada fica invisivel.
   --------------------------------------------------------------- */
.js-motion [data-reveal] {
  opacity: 0;
  transform: translateY(60px);
}

.js-motion [data-hero-line] {
  opacity: 0;
  transform: translateY(28px);
}

.js-motion .sky__cloud,
.js-motion .koi {
  opacity: 0;
}

/* Rede de seguranca: Motion fora do ar nao deixa nada invisivel */
html.motion-failed [data-reveal],
html.motion-failed [data-hero-line] {
  opacity: 1 !important;
  transform: none !important;
}
/* Ceu e cardume sao a excecao: em opacidade cheia a nuvem vira parede e o
   cardume perde a profundidade. Voltam para a opacidade de projeto da
   propria camada. */
html.motion-failed .sky__cloud,
html.motion-failed .koi {
  opacity: var(--o, 1) !important;
  transform: none !important;
}

/* ---------------------------------------------------------------
   19. Responsivo
   --------------------------------------------------------------- */

/* Tablet: 700px a 1199.98px */
@media (max-width: 1199.98px) {
  .creds__grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-2xl); }

  .faq__layout { grid-template-columns: 1fr; }

  .resposta { grid-template-columns: 1fr; }

  /* Empilhado, a foto vira quadrada: um corte panoramico perderia a cena. */
  .bio { grid-template-columns: 1fr; gap: var(--sp-4xl); }
  .bio__media { max-width: 460px; }
  .bio__media img { aspect-ratio: 1 / 1; object-position: 50% 45%; }

  .footer__top { grid-template-columns: repeat(2, 1fr); }
  .footer__brand { grid-column: 1 / -1; }

  .nav { gap: var(--sp-2xl); }

  /* Hero, tablet */
  .hero { height: 100vh; }
  .hero__inner { width: 500px; }

  /* O ceu e mais estreito, entao as nuvens crescem e se recolhem para as
     bordas: o miolo fica livre para o texto e para o cardume. */
  .sky__cloud--1 { width:  56%; top:  5%;     left:  -6%; }
  .sky__cloud--2 { width:  68%; top:  19%;    right: -10%; }
  .sky__cloud--3 { width: 104%; bottom: 18%;  left:  -22%; }
  .sky__cloud--4 { width: 132%; bottom: -10%; right: -26%; }

  .cardume {
    left: -24px;
    right: -60px;
    bottom: -44px;
    width: auto;
    max-width: none;
    translate: 0 0;
  }
  .koi--1 { left: 46px;  bottom: 78px;  width: 214px; }
  .koi--2 { left: 49%;   bottom: 148px; width: 128px; margin-left: -64px; }
  /* `left + right + width:auto` NAO estica uma imagem: em elemento
     substituido, `width:auto` resolve para a largura INTRINSECA e o `right` e
     descartado. Por isso largura explicita nestas tres. */
  .koi--3 { left: 566px; right: auto; bottom: 244px; width: 188px; }
  .koi--4 { left: 682px; right: auto; top: 100px;    width: 160px; }
  .koi--5 { left: 560px; right: auto; top: 2px;      width: 162px; }
}

/* ---------------------------------------------------------------
   Menu: o hamburguer assume a partir do tablet (ate 1023.98px)

   O menu em portugues e mais largo que o de um template em ingles: entre a
   marca e o CTA, "Especialidades" quebrava em tres linhas no tablet. Espremer
   fonte e gap so adiaria o problema. A barra passa a mostrar o hamburguer ja
   a partir daqui, e o painel carrega o menu inteiro.
   --------------------------------------------------------------- */
@media (max-width: 1023.98px) {
  .nav { display: none; }

  /* Abaixo do laptop, tres cards lado a lado espremeriam a ilustracao e o
     texto. Empilham, e ai o painel quadrado viraria um poster altissimo: ele
     passa a ter altura fixa, e a ilustracao continua contida. */
  .pcards { grid-template-columns: 1fr; gap: var(--sp-2xl); }
  .pcard__panel { aspect-ratio: auto; height: clamp(240px, 34vw, 320px); }

  /* Em 390px o botao da barra empurrava o hamburguer para fora da tela e o
     menu ficava inalcancavel. O CTA nao some do mobile: ele vive dentro do
     painel, junto do telefone, e o WhatsApp flutuante continua fixo. */
  .btn--nav { display: none; }

  .nav-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    color: inherit;
  }
  .nav-toggle span {
    position: relative;
    display: block;
    width: 20px;
    height: 1.5px;
    background: currentColor;
    transition: background-color var(--dur-fast) var(--ease-snap);
  }
  .nav-toggle span::before,
  .nav-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
    width: 20px;
    height: 1.5px;
    background: currentColor;
    transition: translate var(--dur-base) var(--ease-brand), rotate var(--dur-base) var(--ease-brand);
  }
  .nav-toggle span::before { translate: 0 -6px; }
  .nav-toggle span::after  { translate: 0 6px; }

  .nav-toggle[aria-expanded='true'] span { background: transparent; }
  .nav-toggle[aria-expanded='true'] span::before { translate: 0 0; rotate: 45deg; }
  .nav-toggle[aria-expanded='true'] span::after  { translate: 0 0; rotate: -45deg; }

  /* Painel mobile: abre abaixo da barra flutuante (12 + 68 + 12) */
  .mobile-nav {
    position: fixed;
    inset: 92px 0 0;
    z-index: 90;
    background: var(--washi);
    color: var(--sumi);
    padding: var(--sp-3xl) var(--gutter) var(--sp-6xl);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    translate: 0 -8px;
    opacity: 0;
    visibility: hidden;
    transition:
      opacity var(--dur-base) var(--ease-brand),
      translate var(--dur-base) var(--ease-brand),
      visibility var(--dur-base) var(--ease-brand);
  }
  .mobile-nav[data-open='true'] {
    opacity: 1;
    translate: 0 0;
    visibility: visible;
  }
  /* `>` e nao ` `: como descendente, esta regra venceria o `.btn--primary` por
     especificidade e pintaria o rotulo do CTA de tinta escura sobre o botao
     escuro. Ela vale so para os links do menu, que sao filhos diretos. */
  .mobile-nav > a {
    font-family: var(--font-display);
    font-size: var(--t-h4);
    font-weight: var(--display-weight);
    letter-spacing: var(--ls-display);
    color: var(--sumi);
    padding-block: var(--sp-xl);
    border-bottom: 1px solid var(--border);
  }
  .mobile-nav__actions {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xl);
    margin-top: var(--sp-4xl);
  }
  .mobile-nav__actions a { border-bottom: 0; padding-block: 0; }
  .mobile-nav .btn {
    justify-content: center;
    font-family: var(--font-body);
    font-size: var(--t-sm);
    font-weight: 500;
    letter-spacing: var(--ls-tight);
  }
}

/* Mobile: ate 699.98px */
@media (max-width: 699.98px) {
  :root { --section-y: 64px; }

  /* Uma coluna. Duas colunas aqui apertariam o nome contra a seta, e nome de
     especialidade nao se corta. */
  .pill-grid { grid-template-columns: 1fr; gap: var(--sp-md); }
  .pill { min-height: 60px; padding: 14px 18px 14px 22px; gap: var(--sp-xl); }

  .pcard__panel { height: 240px; }

  /* As ilustracoes passam para baixo do texto e se centram na coluna.
     `margin-inline: auto` e nao `align-self`: num flex em linha que quebrou,
     o eixo transversal e o vertical, e quem centra na horizontal e a margem. */
  .closing-row {
    flex-direction: column;
    align-items: center;
    gap: var(--sp-2xl);
  }
  .closing-row__art { width: min(230px, 60%); }

  .section-head__art {
    width: min(250px, 66%);
    margin-inline: auto;
  }
  .section-head__art--tall { width: auto; height: 220px; }

  .header__bar {
    padding-inline: var(--sp-2xl);
    background: rgba(246, 241, 230, 0.8);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    color: var(--fg);
  }
  /* No mobile a barra ja nasce fosca, entao o texto e sempre escuro */
  .header[data-onsky='true'][data-scrolled='false'] .header__bar { color: var(--fg); }
  .header[data-onsky='true'][data-scrolled='false'] .btn--nav {
    background: var(--indigo);
    color: var(--fg-on-dark);
  }

  .brand__mark { width: 30px; height: 30px; }
  .brand__name { font-size: 0.9375rem; }

  /* Hero, telefone. O texto ocupa o topo e o cardume nada embaixo, num espaco
     reservado so para ele: nenhuma linha cai sobre uma carpa. */
  .hero {
    height: auto;
    min-height: 100svh;
    padding-block: 132px 292px;
    justify-content: flex-start;
  }
  .hero__inner { width: 100%; padding-inline: var(--gutter); padding-bottom: 0; gap: var(--sp-2xl); }
  .hero__cta { width: 100%; flex-direction: column; align-items: stretch; }
  .hero__cta .btn { justify-content: center; }

  /* A tela e estreita demais para quatro camadas: vira ruido e peso. Ficam
     duas, e o veu vertical passa por cima delas. As duas descem para BAIXO da
     faixa de texto (que termina em 72%): viram a linha do horizonte, sob o
     cardume. */
  .sky__cloud--1,
  .sky__cloud--2 { display: none; }
  .sky__cloud--3 { --o: 0.30; width: 190%; bottom:  1%;  left: -45%; }
  .sky__cloud--4 { --o: 0.44; width: 240%; bottom: -11%; right: -62%; }

  /* No mobile o veu e uma linha vertical: firme onde o texto vive, aberto
     onde o cardume nada. O texto ocupa de 13% a 72% da altura do hero, e por
     isso o veu so solta aos 74%. */
  .sky__veil {
    background: linear-gradient(
      180deg,
      rgba(29, 42, 51, 0.60) 0%,
      rgba(29, 42, 51, 0.66) 38%,
      rgba(29, 42, 51, 0.68) 74%,
      rgba(29, 42, 51, 0.26) 86%,
      rgba(29, 42, 51, 0) 96%
    );
  }

  .cardume {
    left: 50%;
    top: auto;
    bottom: -10px;
    right: auto;
    width: min-content;
    max-width: none;
    height: 302px;
    align-items: center;
    translate: -50% 0;
  }
  .cardume__stage { width: 426px; height: 302px; }

  /* Num palco de 426px, dez carpas viram confusao. As duas mais distantes,
     que sao justamente as que quase nao se ve, saem de cena. */
  .koi--8,
  .koi--10 { display: none; }

  .koi--1 { left: 1px;   bottom: 4px;   top: auto; right: auto; width: 112px; }
  .koi--2 { left: 47%;   bottom: 44px;  top: auto; right: auto; width:  74px; margin-left: -37px; }
  .koi--3 { left: 292px; right: auto; bottom: 106px; top: auto; width: 116px; }
  .koi--4 { left: 268px; right: auto; top: 30px;  bottom: auto; width:  98px; }
  .koi--5 { left: 174px; right: auto; top: 14px;  bottom: auto; width:  84px; }

  .steps,
  .signals,
  .creds__grid,
  .alert { grid-template-columns: 1fr; }

  .section-head { align-items: flex-start; }

  .frame-dark,
  .alert,
  .resposta { border-radius: var(--r-xl); }

  .resposta__step { flex-direction: column; gap: var(--sp-sm); }
  .resposta__when { width: auto; padding-top: 0; }

  .footer__top { grid-template-columns: 1fr; }

  /* O flutuante vira icone no mobile: nao come a tela */
  .wa-float {
    min-height: 56px;
    width: 56px;
    padding: 0;
    justify-content: center;
  }
  .wa-float span { display: none; }
}

/* ---------------------------------------------------------------
   20. prefers-reduced-motion: estado final, nada invisivel
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Os keyframes da inclinacao comecam e terminam em 0deg: congeladas aqui,
     as carpas ficam retas, e nao travadas num angulo aleatorio. */
  .js-motion [data-reveal],
  .js-motion [data-hero-line] {
    opacity: 1 !important;
    transform: none !important;
  }
  .js-motion .sky__cloud,
  .js-motion .koi {
    opacity: var(--o, 1) !important;
    transform: none !important;
  }
}

/* faixa 1024-1200: cabecalho apertado */
@media (min-width: 1024px) and (max-width: 1199.98px) {
  .nav__link { white-space: nowrap; }
  .nav { gap: var(--sp-xl); }
  .header__bar { gap: var(--sp-xl); }
  .logo { min-width: 0; }
}
