/* ============================================================
   IMV Academy - Pos-Graduacao em Metabologia Evolutiva
   Landing page (variantes A e B)

   TOKENS DE MARCA extraidos da paleta global do Elementor
   do site atual (wp-content/uploads/elementor/css/post-6.css):
     imv_gold        #CDB99F
     imv_brown_med   #745550
     imv_dark_deeper #110B0A
     imv_dark_base   #16100D
     imv_dark_medium #261E1C
     imv_offwhite    #F9F6F2
   Tipografia da marca: abril-display (Adobe Fonts, kit ooa5gus)
   + Inter Tight (auto-hospedada em assets/fonts).

   SISTEMA DE FORMA (regra unica, aplicada em toda a pagina):
     botoes e pills ......... border-radius 999px
     cards, midia, inputs ... border-radius 14px
   ============================================================ */

/* ---------- 1. Tokens ---------- */

:root {
  color-scheme: dark light;

  /* superficie (modo escuro = expressao dominante da marca) */
  --bg:          #110B0A;
  --bg-2:        #16100D;
  --bg-3:        #261E1C;
  --ink:         #F9F6F2;
  --ink-2:       #C9BFB6;
  --line:        rgb(249 246 242 / .12);
  --line-strong: rgb(249 246 242 / .26);

  /* acento unico da pagina */
  --accent:      #CDB99F;
  --accent-ink:  #CDB99F;   /* acento usado como texto */
  --on-accent:   #16100D;   /* texto sobre o acento */
  --accent-soft: rgb(205 185 159 / .12);

  --scrim:       rgb(17 11 10 / .72);
  --shadow:      0 24px 60px rgb(10 6 5 / .55);

  /* forma */
  --r-card:      14px;
  --r-pill:      999px;

  /* tipografia */
  --font-display: "abril-display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans:    "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* ritmo */
  --pad-x:   clamp(1.25rem, 5vw, 4rem);
  --sect-y:  clamp(4.5rem, 9vw, 8rem);
  --maxw:    1240px;

  /* camadas (escala documentada, nada de z-index avulso) */
  --z-base:   0;
  --z-raised: 10;
  --z-nav:    40;
  --z-dialog: 60;

  --ease: cubic-bezier(.16, 1, .3, 1);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:          #F9F6F2;
    --bg-2:        #FFFFFF;
    --bg-3:        #F1EBE3;
    --ink:         #16100D;
    --ink-2:       #5C514A;
    --line:        rgb(22 16 13 / .14);
    --line-strong: rgb(22 16 13 / .28);

    --accent:      #CDB99F;
    --accent-ink:  #7A5A38;   /* 5.8:1 sobre #F9F6F2 - o dourado puro nao passa AA como texto */
    --on-accent:   #16100D;
    --accent-soft: rgb(205 185 159 / .28);

    --scrim:       rgb(17 11 10 / .62);
    --shadow:      0 20px 50px rgb(70 56 46 / .14);
  }
}

/* ---------- 2. Reset ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent); color: var(--on-accent); }

.skip-link {
  position: absolute; left: -9999px;
  z-index: var(--z-dialog);
  background: var(--accent); color: var(--on-accent);
  padding: .75rem 1.25rem; border-radius: var(--r-pill);
  font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- 3. Tipografia ---------- */

.display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -.015em;
  text-wrap: balance;
}

.h1     { font-size: clamp(2.1rem, 1.15rem + 3.9vw, 3.9rem); }
.h2     { font-size: clamp(1.75rem, 1.05rem + 2.9vw, 3.05rem); }
.h3     { font-size: clamp(1.2rem, 1rem + .7vw, 1.5rem); }

/* italico no display precisa de folga para o descendente (g, p, q, y) */
.display em { font-style: italic; line-height: 1.12; padding-bottom: .08em; display: inline-block; }

.lede {
  font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem);
  line-height: 1.62;
  color: var(--ink-2);
  max-width: 56ch;
}

.eyebrow {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.small { font-size: .875rem; color: var(--ink-2); }

/* ---------- 4. Layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

section { padding-block: var(--sect-y); }

.sect-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.sect-head .lede { margin-top: 1.1rem; }

/* ---------- 5. Botoes ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .6rem;
  white-space: nowrap;
  padding: .95rem 1.7rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .92rem;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .22s var(--ease), transform .12s var(--ease),
              border-color .22s var(--ease), color .22s var(--ease);
}
.btn .ico { width: 1.05em; height: 1.05em; flex: none; }

/* primario: dourado com texto quase-preto = 9.9:1 nos dois modos */
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #DCCAB3; }
.btn-primary:active { transform: translateY(1px) scale(.985); }

.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent-ink); color: var(--accent-ink); }
.btn-ghost:active { transform: translateY(1px) scale(.985); }

.btn-sm { padding: .68rem 1.2rem; font-size: .84rem; }

/* bloco de CTA repetido ao longo da pagina */
.cta-block {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: .8rem; margin-top: clamp(2rem, 4vw, 3rem);
}
.cta-block .scarcity {
  font-size: .84rem; font-weight: 600; color: var(--accent-ink);
  letter-spacing: .01em;
}
.cta-block.is-center { align-items: center; text-align: center; }

/* ---------- 6. Navegacao ---------- */

.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  height: 68px;
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
.nav.is-stuck { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 95%, transparent); }

.nav-inner {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: var(--pad-x);
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem);
}
.nav-logo { display: flex; align-items: center; flex: none; }
.nav-logo img { height: 30px; width: auto; }

.nav-links {
  display: flex; align-items: center; gap: clamp(.9rem, 2vw, 1.75rem);
  margin-inline-start: auto;
}
.nav-links a {
  font-size: .875rem; font-weight: 500; color: var(--ink-2);
  text-decoration: none; white-space: nowrap;
  transition: color .2s var(--ease);
}
.nav-links a:hover { color: var(--ink); }

.nav-cta { flex: none; margin-inline-start: clamp(.75rem, 2vw, 1.5rem); }
/* no desktop o CTA vive na barra; no mobile ele vive dentro do painel aberto.
   Mesmo rotulo nos dois casos, so um visivel de cada vez. */
.nav-cta-mobile { display: none; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  margin-inline-start: auto;
  width: 44px; height: 44px;          /* alvo de toque minimo */
  place-items: center;
}
.nav-toggle .ico { width: 26px; height: 26px; }

/* o sentinel alimenta o IntersectionObserver do estado "stuck" (sem listener de scroll) */
.nav-sentinel { position: absolute; top: 0; height: 1px; width: 100%; pointer-events: none; }

@media (max-width: 979px) {
  .nav-links {
    position: fixed; inset: 68px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2);
    border-block: 1px solid var(--line);
    padding: .5rem var(--pad-x) 1.25rem;
    margin: 0;
    display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav-toggle { display: grid; }
  .nav-cta { display: none; }
  .nav-cta-mobile {
    display: inline-flex; margin-top: 1rem; border-bottom: 0;
    justify-content: center; color: var(--on-accent);
  }
  .nav-links a.nav-cta-mobile { padding: .95rem 1.7rem; }
}

/* ---------- 7. Hero ---------- */

.hero { padding-top: clamp(2.5rem, 5vw, 4.5rem); padding-bottom: clamp(3rem, 6vw, 5rem); }

/* variante A: split assimetrico 7/5, com a coluna de texto e a imagem
   centradas uma em relacao a outra. O titulo fica DENTRO da coluna e pode
   quebrar em 3 linhas: em largura total ele criava um vao morto entre a
   headline e o resto do bloco. Ritmo vertical por margem em cada elemento,
   nao por gap uniforme, para o bloco respirar como no site original. */
.hero-split .hero-grid {
  display: grid; align-items: center;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem);
}
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
.hero-split .hero-copy .eyebrow { margin-bottom: 1.15rem; }
.hero-split .hero-copy .h1 {
  font-size: clamp(2.1rem, 1.05rem + 3.5vw, 3.5rem);
  margin-bottom: 1.6rem;
}
.hero-copy .lede { max-width: 42ch; }
.hero-split .hero-copy .cta-block { margin-top: 2.1rem; }

.hero-figure {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--bg-3);
  aspect-ratio: 4 / 5;
  max-height: 46svh;
  margin-left: auto;
  width: 100%;
}
.hero-figure img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }

/* a colagem do site original tem fundo transparente: nada de moldura nem corte */
.hero-figure.is-cutout {
  background: none; border-radius: 0; overflow: visible;
  aspect-ratio: auto; max-height: none;
  display: grid; place-items: center;
}
/* a imagem se dimensiona sozinha, so com teto de altura: fixar aspect-ratio
   no container faria a colagem sobrar caixa vazia dos lados. */
.hero-figure.is-cutout img {
  width: auto; height: auto;
  max-width: 100%; max-height: min(52svh, 470px);
  object-fit: contain;
  filter: drop-shadow(0 26px 46px rgb(10 6 5 / .42));
}
@media (prefers-color-scheme: light) {
  .hero-figure.is-cutout img { filter: drop-shadow(0 22px 40px rgb(70 56 46 / .22)); }
}

@media (max-width: 899px) {
  .hero-split .hero-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .hero-figure { aspect-ratio: 3 / 4; max-height: 52svh; }
  .hero-copy { align-items: flex-start; }
}

/* ---------- 8. Barra de prova (abaixo do hero) ---------- */

.proofbar { padding-block: clamp(1.75rem, 3.5vw, 2.5rem); border-block: 1px solid var(--line); }
.proofbar-grid {
  display: grid; gap: clamp(1rem, 3vw, 2.25rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
}
.proof-item { display: flex; gap: .7rem; align-items: flex-start; font-size: .93rem; line-height: 1.5; }
.proof-item .ico { width: 1.15rem; height: 1.15rem; flex: none; color: var(--accent-ink); margin-top: .18rem; }

/* O selo e a arte oficial da marca, com transparencia. Nao leva moldura
   nem legenda ao lado: o proprio medalhao ja diz "Aprovada pelo MEC". */
.seal { margin: 0; display: flex; justify-content: flex-end; }
.seal img {
  width: clamp(84px, 9vw, 118px); height: auto;
  filter: drop-shadow(0 10px 22px rgb(10 6 5 / .45));
}
@media (prefers-color-scheme: light) {
  .seal img { filter: drop-shadow(0 8px 18px rgb(70 56 46 / .22)); }
}
@media (max-width: 899px) { .seal { justify-content: flex-start; } }

@media (max-width: 899px) {
  .proofbar-grid { grid-template-columns: 1fr; }
}

/* ---------- 9. Video + diferenciais ---------- */

.pitch-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* fachada de video: nada de terceiros carregado antes do clique */
.video-facade {
  position: relative; width: 100%;
  border: 0; padding: 0; margin: 0;
  border-radius: var(--r-card); overflow: hidden;
  background: var(--bg-3);
  cursor: pointer;
  display: block;
}
.video-facade img { width: 100%; height: 100%; object-fit: cover; }
.video-facade.is-vertical { aspect-ratio: 9 / 16; max-height: 78svh; margin-inline: auto; }
.video-facade.is-wide { aspect-ratio: 16 / 10; }
.video-facade .play {
  position: absolute; inset: 0; margin: auto;
  width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  transition: transform .22s var(--ease);
}
.video-facade .play .ico { width: 30px; height: 30px; margin-left: 3px; }
.video-facade:hover .play { transform: scale(1.06); }
.video-facade .facade-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.5rem 1.15rem .95rem;
  background: linear-gradient(to top, rgb(17 11 10 / .85), transparent);
  color: #F9F6F2; font-size: .85rem; font-weight: 500; text-align: left;
}
.video-facade iframe,
.video-facade video { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.video-facade video { object-fit: contain; }


.pitch-claim { font-size: clamp(1.15rem, 1rem + .8vw, 1.5rem); line-height: 1.35; max-width: 22ch; }

.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 2rem; margin-top: 1.75rem; }
.checklist li { display: flex; gap: .7rem; align-items: flex-start; font-size: .95rem; line-height: 1.5; }
.checklist .ico { width: 1.1rem; height: 1.1rem; flex: none; color: var(--accent-ink); margin-top: .24rem; }

@media (max-width: 899px) {
  .pitch-grid { grid-template-columns: 1fr; }
  .checklist { grid-template-columns: 1fr; }
  .video-facade.is-vertical { max-width: 340px; }
}

/* ---------- 10. Para quem e ---------- */

.audience-cols {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  border-top: 1px solid var(--line); padding-top: clamp(1.75rem, 3vw, 2.5rem);
}
.audience-cols > ul { display: flex; flex-direction: column; gap: 1.35rem; }
.audience-cols > ul + ul { border-left: 1px solid var(--line); padding-left: clamp(1.5rem, 4vw, 3.5rem); }
.audience-cols li { display: flex; gap: .85rem; align-items: flex-start; font-size: 1.02rem; line-height: 1.5; }
.audience-cols .ico { width: 1.05rem; height: 1.05rem; flex: none; color: var(--accent-ink); margin-top: .38rem; }
.audience-lead { font-size: clamp(1.05rem, 1rem + .5vw, 1.3rem); color: var(--ink); margin-bottom: 1.5rem; }

@media (max-width: 767px) {
  .audience-cols { grid-template-columns: 1fr; }
  .audience-cols > ul + ul { border-left: 0; padding-left: 0; }
}

/* ---------- 11. Mosaico de fotos ---------- */

.mosaic { padding-block: 0; }
.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(150px, 20vw, 260px);
  gap: clamp(.5rem, 1vw, .85rem);
}
.mosaic-grid figure { margin: 0; border-radius: var(--r-card); overflow: hidden; background: var(--bg-3); }
.mosaic-grid img { width: 100%; height: 100%; object-fit: cover; }
.mosaic-grid figure:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.mosaic-grid figure:nth-child(2) { grid-column: span 2; }
.mosaic-grid figure:nth-child(3),
.mosaic-grid figure:nth-child(4) { grid-column: span 1; }

@media (max-width: 767px) {
  /* colapso explicito: vira faixa horizontal com snap, sem empilhar 4 fotos altas */
  .mosaic-grid {
    display: flex; grid-auto-rows: auto;
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding-bottom: .75rem;
    -webkit-overflow-scrolling: touch;
  }
  .mosaic-grid figure { flex: 0 0 78%; height: 240px; scroll-snap-align: center; }
}

/* ---------- 12. Bento dos 5 pilares ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(.75rem, 1.4vw, 1.1rem);
}
.bento-cell {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(1.4rem, 2.4vw, 2rem);
  background: var(--bg-2);
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 220px;
  overflow: hidden;
  isolation: isolate;
}
.bento-cell h3 { margin-bottom: .6rem; }
.bento-cell p { font-size: .95rem; line-height: 1.55; color: var(--ink-2); max-width: 42ch; }

/* celulas com imagem real: o texto fica sobre scrim fixo, legivel nos dois modos */
.bento-cell.has-media { min-height: 340px; border-color: transparent; }
.bento-cell.has-media img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
}
.bento-cell.has-media::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgb(17 11 10 / .93) 18%, rgb(17 11 10 / .55) 62%, rgb(17 11 10 / .25));
}
.bento-cell.has-media h3 { color: #F9F6F2; }
.bento-cell.has-media p { color: #D8D0C7; }

.bento-cell.is-tint { background: var(--accent-soft); border-color: transparent; }

.bento-cell:nth-child(1) { grid-column: span 7; }
.bento-cell:nth-child(2) { grid-column: span 5; }
.bento-cell:nth-child(3) { grid-column: span 5; }
.bento-cell:nth-child(4) { grid-column: span 3; }
.bento-cell:nth-child(5) { grid-column: span 4; }

@media (max-width: 979px) {
  .bento-cell:nth-child(n) { grid-column: span 6; }
}
@media (max-width: 639px) {
  .bento-cell:nth-child(n) { grid-column: span 12; }
  .bento-cell.has-media { min-height: 280px; }
}

/* ---------- 12b. Contexto de categoria (dado do CBAEM) ---------- */

.context { background: var(--bg-2); border-block: 1px solid var(--line); }
.context-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.context .lede { max-width: 60ch; }

.stat-pair {
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 2rem);
  margin: clamp(1.75rem, 3vw, 2.5rem) 0;
  padding-block: clamp(1.25rem, 2.5vw, 1.75rem);
  border-block: 1px solid var(--line);
}
.stat { display: flex; flex-direction: column; gap: .15rem; }
.stat-num {
  font-family: var(--font-display); font-weight: 700; line-height: 1;
  font-size: clamp(2.5rem, 1.6rem + 3vw, 4.25rem);
  color: var(--accent-ink);
}
.stat-label { font-size: .82rem; color: var(--ink-2); letter-spacing: .02em; }
.stat-arrow { color: var(--accent-ink); opacity: .6; }
.stat-arrow .ico { width: 1.6rem; height: 1.6rem; }

.context-figure {
  margin: 0; border-radius: var(--r-card); overflow: hidden;
  background: var(--bg-3); aspect-ratio: 4 / 5;
}
.context-figure img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }

@media (max-width: 899px) {
  .context-grid { grid-template-columns: 1fr; }
  .context-figure { aspect-ratio: 3 / 2; }
}
@media (max-width: 479px) {
  .stat-pair { gap: .85rem; }
  .stat-arrow .ico { width: 1.2rem; height: 1.2rem; }
}

/* ---------- 13. Corpo docente ---------- */

.faculty {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
}
.faculty-card {
  display: flex; flex-direction: column; gap: .85rem;
  text-align: left; background: none; border: 0; padding: 0;
  cursor: default;
}
.faculty-card[data-dialog] { cursor: pointer; }
/* Os retratos ja vem do site como cartoes 319x250 com cantos arredondados
   assados em transparencia. Nada de moldura nem recorte por cima: qualquer
   aspect-ratio diferente de 319/250 corta o rosto. */
.faculty-portrait {
  background: none; border-radius: 0; overflow: visible;
  aspect-ratio: 319 / 250;
}
.faculty-portrait img {
  width: 100%; height: 100%; object-fit: cover;
  transition: filter .4s var(--ease);
  filter: saturate(.9);
}
.faculty-card[data-dialog]:hover .faculty-portrait img { filter: saturate(1.05); }
.faculty-name { font-size: 1rem; font-weight: 600; line-height: 1.3; }
.faculty-role { font-size: .82rem; color: var(--ink-2); line-height: 1.45; }
.faculty-more {
  font-size: .78rem; font-weight: 600; color: var(--accent-ink);
  display: inline-flex; align-items: center; gap: .3rem; margin-top: .1rem;
}
.faculty-more .ico { width: .85rem; height: .85rem; }

/* ---------- 14. Modulos (trilho horizontal com snap) ---------- */

.track-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.track-nav { display: flex; gap: .5rem; flex: none; }
.track-btn {
  width: 44px; height: 44px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: transparent;
  display: grid; place-items: center; cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease), transform .12s var(--ease);
}
.track-btn:hover:not(:disabled) { border-color: var(--accent-ink); color: var(--accent-ink); }
.track-btn:active:not(:disabled) { transform: scale(.94); }
.track-btn:disabled { opacity: .35; cursor: not-allowed; }
.track-btn .ico { width: 1.2rem; height: 1.2rem; }

.track {
  display: flex; gap: clamp(.85rem, 1.6vw, 1.25rem);
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: clamp(1.75rem, 3vw, 2.5rem) 0 1rem;
  scrollbar-width: thin;
}
.track::-webkit-scrollbar { height: 4px; }
.track::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }

.module-card {
  flex: 0 0 min(330px, 82vw);
  scroll-snap-align: start;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(1.35rem, 2vw, 1.75rem);
  background: var(--bg-2);
  display: flex; flex-direction: column; gap: .85rem;
}
.module-num {
  font-family: var(--font-display); font-size: 1.5rem;
  color: var(--accent-ink); line-height: 1;
}
.module-card h3 { font-size: 1.08rem; font-weight: 600; line-height: 1.32; font-family: var(--font-sans); }
.module-topics { font-size: .875rem; color: var(--ink-2); line-height: 1.55; }
.module-case {
  margin-top: auto; padding-top: .95rem; border-top: 1px solid var(--line);
  font-size: .84rem; line-height: 1.5; color: var(--ink-2);
}
.module-case b { color: var(--accent-ink); font-weight: 600; }

/* ---------- 15. Quem e a IMV ---------- */

.about-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
/* O Reel e 9:16. Sem teto ele passaria de 900px de altura na coluna.
   A altura manda e a largura sai do aspect-ratio: com max-height e
   max-width juntos a caixa deixava de ser 9:16 e a capa era cortada. */
.video-facade.is-about {
  height: min(62svh, 560px);
  width: auto; max-width: 100%;
  margin-inline: auto;
}
@media (max-width: 899px) {
  .about-grid { grid-template-columns: 1fr; justify-items: center; }
  .about-grid > div:first-child { justify-self: stretch; }
  .video-facade.is-about { height: min(62svh, 520px); }
}

/* ---------- 16. Linha do tempo da candidatura ---------- */

.steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
  border-top: 1px solid var(--line); padding-top: clamp(1.75rem, 3vw, 2.5rem);
}
.steps { position: relative; }
.steps::before {
  content: ""; position: absolute; top: -1px; left: 0; right: 0; height: 1px;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
}
.step { display: flex; flex-direction: column; gap: .6rem; position: relative; }
.step-ord {
  font-size: .74rem; font-weight: 600; letter-spacing: .12em;
  color: var(--accent-ink);
}
.step h3 { font-size: 1.08rem; font-weight: 600; font-family: var(--font-sans); line-height: 1.3; }
.step p { font-size: .92rem; color: var(--ink-2); line-height: 1.55; }
.step::before {
  content: ""; position: absolute; top: calc(-1 * clamp(1.75rem, 3vw, 2.5rem) - 1px);
  left: 0; width: 34px; height: 3px; background: var(--accent);
}
@media (max-width: 979px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; } }
@media (max-width: 599px) { .steps { grid-template-columns: 1fr; } }

/* ---------- 17. FAQ ---------- */

.faq { max-width: 820px; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; text-align: left;
  padding: 1.35rem 0; background: none; border: 0; cursor: pointer;
  font-size: 1.02rem; font-weight: 500; line-height: 1.45;
  transition: color .2s var(--ease);
}
.faq-q:hover { color: var(--accent-ink); }
.faq-q .ico { width: 1.25rem; height: 1.25rem; flex: none; color: var(--accent-ink); transition: transform .3s var(--ease); }
.faq-q[aria-expanded="true"] .ico { transform: rotate(180deg); }
/* altura animada em pixels via JS. A variante com grid-template-rows 0fr/1fr
   nao e confiavel: em container de altura automatica o fr resolve para 0. */
.faq-a { height: 0; overflow: hidden; transition: height .35s var(--ease); }
.faq-a p { padding-bottom: 1.4rem; color: var(--ink-2); font-size: .96rem; line-height: 1.65; max-width: 68ch; }
/* sem JS o conteudo continua acessivel */
.no-js .faq-a { height: auto; }

/* ---------- 18. Formulario ---------- */

.apply { background: var(--bg-2); border-block: 1px solid var(--line); }
.apply-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}
@media (max-width: 899px) { .apply-grid { grid-template-columns: 1fr; } }

.form-card {
  border: 1px solid var(--line); border-radius: var(--r-card);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--bg);
}
.field { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.15rem; }
.field label { font-size: .84rem; font-weight: 600; letter-spacing: .01em; }
.field .helper { font-size: .78rem; color: var(--ink-2); }
.field input {
  font: inherit; font-size: .98rem;
  padding: .85rem 1rem;
  border-radius: var(--r-card);
  border: 1px solid var(--line-strong);
  background: var(--bg-2); color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  width: 100%;
}
.field input::placeholder { color: var(--ink-2); opacity: .85; }
.field input:focus { outline: 0; border-color: var(--accent-ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input[aria-invalid="true"] { border-color: var(--err); }
.field .error {
  font-size: .8rem; font-weight: 600; color: var(--err);
  display: none; align-items: center; gap: .35rem;
}
.field .error .ico { width: .95rem; height: .95rem; flex: none; }
.field input[aria-invalid="true"] ~ .error { display: flex; }

:root { --err: #E4877A; }
@media (prefers-color-scheme: light) { :root { --err: #A8352A; } }

.form-card .btn-primary { width: 100%; margin-top: .35rem; }
.form-legal { font-size: .78rem; color: var(--ink-2); margin-top: 1rem; line-height: 1.5; }

.spin { animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-status[hidden] { display: none; }
.form-status {
  border: 1px solid var(--accent); border-radius: var(--r-card);
  padding: 1.5rem; background: var(--accent-soft);
  display: flex; gap: .85rem; align-items: flex-start;
}
.form-status .ico { width: 1.4rem; height: 1.4rem; flex: none; color: var(--accent-ink); margin-top: .1rem; }
.form-status h3 { font-size: 1.05rem; font-weight: 600; font-family: var(--font-sans); margin-bottom: .3rem; }
.form-status p { font-size: .9rem; color: var(--ink-2); }

/* ---------- 19. Rodape ---------- */

.footer { padding-block: clamp(3rem, 5vw, 4rem) 2.5rem; border-top: 1px solid var(--line); }
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem; align-items: start;
}
.footer-logo img { height: 34px; width: auto; margin-bottom: 1.1rem; }
.footer-contact { display: flex; flex-wrap: wrap; gap: .75rem; }
.footer-note {
  margin-top: clamp(2rem, 4vw, 3rem); padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: .78rem; color: var(--ink-2); line-height: 1.6; max-width: 78ch;
}
@media (max-width: 767px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 20. Dialogo do docente ---------- */

dialog.docente {
  border: 1px solid var(--line-strong); border-radius: var(--r-card);
  background: var(--bg-2); color: var(--ink);
  padding: 0; max-width: 660px; width: min(660px, calc(100vw - 2rem));
  max-height: min(86svh, 900px);
  box-shadow: var(--shadow);
}
dialog.docente::backdrop { background: rgb(10 6 5 / .7); backdrop-filter: blur(3px); }
.docente-head {
  display: flex; gap: 1.1rem; align-items: flex-start;
  padding: 1.6rem 1.6rem 1.15rem; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg-2); border-radius: var(--r-card) var(--r-card) 0 0;
}
.docente-head img { width: 62px; height: 62px; border-radius: var(--r-card); object-fit: cover; flex: none; }
.docente-head h3 { font-size: 1.2rem; font-weight: 600; font-family: var(--font-sans); }
.docente-head .small { margin-top: .2rem; }
.docente-close {
  margin-left: auto; flex: none;
  width: 38px; height: 38px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: none; cursor: pointer;
  display: grid; place-items: center;
}
.docente-close:hover { border-color: var(--accent-ink); color: var(--accent-ink); }
.docente-close .ico { width: 1.1rem; height: 1.1rem; }
.docente-body { padding: 1.4rem 1.6rem 1.9rem; overflow-y: auto; }
.docente-body h4 {
  font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-ink); margin: 1.5rem 0 .65rem;
}
.docente-body h4:first-child { margin-top: 0; }
.docente-body p { font-size: .93rem; line-height: 1.6; color: var(--ink-2); }
.docente-body ul { display: flex; flex-direction: column; gap: .5rem; }
.docente-body ul li {
  font-size: .93rem; line-height: 1.5; color: var(--ink-2);
  display: flex; gap: .6rem; align-items: flex-start;
}
.docente-body ul li::before {
  content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); margin-top: .58rem;
}

/* ---------- 20b. Pagina de obrigado ---------- */

.thanks-hero { padding-top: clamp(3rem, 6vw, 5rem); padding-bottom: clamp(3rem, 6vw, 5rem); }
.thanks-grid {
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
}
.thanks-grid .h1 { font-size: clamp(2.1rem, 1.05rem + 3.5vw, 3.5rem); margin-bottom: 1.5rem; }
.thanks-grid .lede { max-width: 46ch; }

.thanks-mark {
  display: inline-grid; place-items: center;
  width: 56px; height: 56px; margin-bottom: 1.5rem;
  border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent-ink);
}
.thanks-mark .ico { width: 1.9rem; height: 1.9rem; }

.thanks-seal { margin: 0; display: flex; justify-content: center; }
.thanks-seal img {
  width: clamp(140px, 16vw, 220px); height: auto;
  filter: drop-shadow(0 16px 32px rgb(10 6 5 / .45));
}
@media (prefers-color-scheme: light) {
  .thanks-seal img { filter: drop-shadow(0 12px 26px rgb(70 56 46 / .22)); }
}

.thanks-video { background: var(--bg-2); border-top: 1px solid var(--line); }

/* a linha do tempo aqui tem 3 passos, nao 4 */
.page-obrigado .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 899px) {
  .thanks-grid { grid-template-columns: 1fr; }
  .thanks-seal { justify-content: flex-start; order: -1; }
}
@media (max-width: 599px) {
  .page-obrigado .steps { grid-template-columns: 1fr; }
}

/* ==========================================================
   21. Movimento

   MOTION_INTENSITY 7. Cada efeito abaixo tem uma funcao declarada.
   Nada anima por enfeite, e tudo colapsa em prefers-reduced-motion.

   progresso ....... orientacao numa pagina longa
   revelar ......... hierarquia de leitura, na ordem em que se le
   parallax ........ profundidade entre foto e texto
   contador ........ narrativa, o crescimento e o argumento
   regua dos passos  narrativa, a sequencia se desenha
   hover ........... affordance, diz o que e clicavel
   sheen / imas .... feedback no controle mais importante da pagina
   spotlight ....... materialidade das celulas do bento

   Regras de performance: so transform, opacity e clip-path. Efeitos de
   ponteiro so em (hover: hover) and (pointer: fine). Scroll dirigido pelo
   compositor via animation-timeline, nunca por listener de scroll.
   ========================================================== */

/* barra de progresso de leitura */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px;
  background: var(--accent); transform: scaleX(0); transform-origin: 0 50%;
  z-index: calc(var(--z-nav) + 1); pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .progress { animation: barGrow linear both; animation-timeline: scroll(root block); }
  }
}
@keyframes barGrow { to { transform: scaleX(1); } }

@media (prefers-reduced-motion: no-preference) {

  /* --- revelar ao entrar --- */
  .reveal { opacity: 0; transform: translateY(22px); }
  .reveal.is-in {
    opacity: 1; transform: none;
    transition: opacity .75s var(--ease), transform .75s var(--ease);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
  /* titulos de secao entram com corte, nao so com deslocamento */
  .sect-head .h2, .hero-copy .h1 {
    clip-path: inset(0 0 105% 0);
    transition: clip-path .9s var(--ease);
  }
  .reveal.is-in .h2, .reveal.is-in .h1,
  .is-in.sect-head .h2, .is-in.hero-copy .h1 { clip-path: inset(0 0 -20% 0); }

  /* --- scroll dirigido: profundidade --- */
  @supports (animation-timeline: view()) {
    /* o recorte do hero sobe mais devagar que o texto ao sair */
    .hero-figure.is-cutout img {
      animation: driftOut linear both;
      animation-timeline: view();
      animation-range: exit 0% exit 100%;
      will-change: transform;
    }
    /* cada foto do mosaico chega num ritmo levemente diferente */
    .mosaic-grid figure {
      animation: riseIn linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 38%;
    }
    .mosaic-grid figure:nth-child(2) { animation-range: entry 0% cover 46%; }
    .mosaic-grid figure:nth-child(4) { animation-range: entry 10% cover 34%; }

    .context-figure img {
      animation: driftOut linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
    /* a regua da linha do tempo se desenha conforme a secao entra */
    .steps::before {
      animation: drawLine linear both;
      animation-timeline: view();
      animation-range: entry 30% cover 55%;
    }
  }

  @keyframes driftOut { from { transform: translateY(3%) scale(1.03); } to { transform: translateY(-6%) scale(1); } }
  @keyframes riseIn   { from { transform: translateY(34px); } to { transform: translateY(0); } }
  @keyframes drawLine { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .sect-head .h2, .hero-copy .h1 { clip-path: none; }
  .progress { display: none; }
  .faq-a { transition: none; }
  .spin { animation: none; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ==========================================================
   22. Estados de hover e ponteiro
   ========================================================== */

/* sublinhado que corre sob o link da navegacao */
.nav-links a { position: relative; }
@media (hover: hover) {
  .nav-links a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
    background: var(--accent); transform: scaleX(0); transform-origin: 0 50%;
    transition: transform .32s var(--ease);
  }
  .nav-links a:hover::after { transform: scaleX(1); }
}

/* CTA primario: brilho que atravessa, mais deslocamento magnetico via --mx/--my */
.btn-primary {
  position: relative; overflow: hidden; isolation: isolate;
  transform: translate(var(--mx, 0px), var(--my, 0px));
  transition: background-color .22s var(--ease), transform .28s var(--ease);
}
.btn-primary::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 38%, rgb(255 255 255 / .45) 50%, transparent 62%);
  transform: translateX(-120%);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn-primary:hover::after { transform: translateX(120%); transition: transform .75s var(--ease); }
}
.btn-primary:active { transform: translate(var(--mx, 0px), calc(var(--my, 0px) + 1px)) scale(.985); }

/* cartao de docente: sobe, retrato aproxima, regua dourada cresce sob o nome */
.faculty-card[data-dialog] {
  transition: transform .4s var(--ease);
}
.faculty-name { position: relative; display: inline-block; }
.faculty-name::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .4s var(--ease);
}
.faculty-more { transition: gap .3s var(--ease); }
@media (hover: hover) {
  .faculty-card[data-dialog]:hover { transform: translateY(-6px); }
  .faculty-card[data-dialog]:hover .faculty-name::after { transform: scaleX(1); }
  .faculty-card[data-dialog]:hover .faculty-more { gap: .55rem; }
}
.faculty-card[data-dialog]:focus-visible { transform: translateY(-6px); }

/* cartao de modulo */
.module-card { transition: transform .4s var(--ease), border-color .4s var(--ease); }
.module-num { transition: color .4s var(--ease), transform .4s var(--ease); transform-origin: 0 50%; }
@media (hover: hover) {
  .module-card:hover { transform: translateY(-5px); border-color: var(--line-strong); }
  .module-card:hover .module-num { transform: scale(1.12); }
}

/* celula do bento: luz que segue o cursor, alimentada por --mx/--my no JS */
.bento-cell::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%),
              rgb(205 185 159 / .16), transparent 62%);
  opacity: 0; transition: opacity .35s var(--ease);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .bento-cell:hover::before { opacity: 1; }
}
.bento-cell.has-media img { transition: transform .7s var(--ease); }
@media (hover: hover) {
  .bento-cell.has-media:hover img { transform: scale(1.05); }
}

/* fotos do mosaico */
.mosaic-grid img { transition: transform .7s var(--ease); }
@media (hover: hover) {
  .mosaic-grid figure:hover img { transform: scale(1.05); }
}

/* itens de lista com icone: a seta avanca */
.audience-cols .ico, .faq-q .ico { transition: transform .3s var(--ease); }
@media (hover: hover) {
  .audience-cols li:hover .ico { transform: translateX(3px); }
}

/* a ficha entra com um leve zoom */
dialog.docente[open] { animation: dlgIn .3s var(--ease); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(10px) scale(.985); } }

/* numeros do bloco de contexto */
.stat-num { font-variant-numeric: tabular-nums; }

/* ==========================================================
   23. Grao fixo (fora de qualquer container que rola)
   ========================================================== */

.grain {
  position: fixed; inset: 0; z-index: 50;
  pointer-events: none; opacity: .028; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
}
@media (prefers-reduced-transparency: reduce) { .grain { display: none; } }
