/* ──────────────────────────────────────────────────────────────
   Histórias Inspiradoras — Liceu Jardim
   Página escura, editorial. Fraunces (títulos) + Asap Condensed (texto).
   ────────────────────────────────────────────────────────────── */

@font-face { font-family: Fraunces; src: url("fonts/fraunces-variable.woff2") format("woff2"); font-style: normal; font-weight: 100 900; font-display: swap; }
@font-face { font-family: Fraunces; src: url("fonts/fraunces-variable-italic.woff2") format("woff2"); font-style: italic; font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Asap Condensed"; src: url("fonts/asap-condensed-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Asap Condensed"; src: url("fonts/asap-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Asap Condensed"; src: url("fonts/asap-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --ink: #030f18;
  --deep: #041a29;
  --navy: #001829;
  --cream: #f5f0e7;
  --gold: #e5c39a;
  --gold-2: #c9a273;
  --line: rgba(229, 195, 154, .2);
  --line-soft: rgba(229, 195, 154, .12);
  --text-2: rgba(245, 240, 231, .7);
  --text-3: rgba(245, 240, 231, .45);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --rail-w: 0px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: "Asap Condensed", "Arial Narrow", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, blockquote { margin: 0; }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; font-weight: 300; }
em { font-style: italic; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }

.container { width: min(100% - 48px, 1240px); margin-inline: auto; }
@media (min-width: 1100px) { :root { --rail-w: 164px; } .container { width: min(100% - 2 * var(--rail-w) - 48px, 1240px); } }

.eyebrow {
  color: var(--gold-2);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
}

/* Grão de filme sutil sobre a página inteira */
.grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
}

/* Barra de progresso (celular) */
.progress { position: fixed; inset: 0 0 auto; z-index: 55; height: 2px; pointer-events: none; }
.progress span { display: block; height: 100%; background: var(--gold); transform-origin: left; transform: scaleX(var(--p, 0)); }
@media (min-width: 1100px) { .progress { display: none; } }

/* ─── Cabeçalho ─────────────────────────────────────────────── */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background .5s var(--ease), border-color .5s, transform .6s var(--ease);
}
.site-header.is-solid { background: rgba(3, 15, 24, .82); border-color: var(--line-soft); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.site-header.is-hidden { transform: translateY(-100%); }
.header-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { width: 150px; height: auto; }
.header-link {
  border: 1px solid rgba(229, 195, 154, .4); padding: 12px 18px;
  color: var(--gold); font-size: .68rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  transition: background .3s, color .3s;
}
.header-link:hover { background: var(--gold); color: var(--ink); }
.header-link span { margin-left: 8px; }

/* ─── Índice lateral ────────────────────────────────────────── */
.rail {
  position: fixed; left: 0; top: 50%; z-index: 40; width: var(--rail-w); padding-left: 22px;
  display: none; transform: translateY(-50%);
}
@media (min-width: 1100px) { .rail { display: flex; } }
.rail ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 22px; }
.rail a {
  white-space: nowrap;
  position: relative; display: flex; align-items: center; gap: 10px; max-width: 112px; line-height: 1.35;
  color: var(--text-3); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  transition: color .4s;
}
.rail a::before { content: ""; flex: none; width: 0; height: 2px; background: var(--gold); transition: width .5s var(--ease); }
.rail a:hover { color: var(--cream); }
.rail a[aria-current="true"] { color: var(--cream); }
.rail a[aria-current="true"]::before { width: 22px; }

/* ─── Abertura ──────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  overflow: hidden; isolation: isolate;
  background:
    radial-gradient(ellipse 70% 55% at 72% 38%, rgba(201, 162, 115, .16), transparent 70%),
    radial-gradient(ellipse 60% 60% at 10% 100%, rgba(0, 60, 100, .35), transparent 70%),
    linear-gradient(180deg, var(--navy) 0%, var(--ink) 100%);
}
.hero-rings { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ring { position: absolute; border: 1px solid rgba(229, 195, 154, .13); border-radius: 50%; }
.ring-1 { width: 74vmax; height: 74vmax; right: -24vmax; top: -18vmax; }
.ring-2 { width: 40vmax; height: 40vmax; right: 8vmax; top: 22vh; border-color: rgba(229, 195, 154, .08); }
.ring-3 { width: 60vmax; height: 60vmax; left: -36vmax; bottom: -40vmax; border-color: rgba(229, 195, 154, .07); }

.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: center;
  gap: clamp(32px, 6vw, 96px); padding-block: 140px 120px;
}
.hero-eyebrow { letter-spacing: .38em; }
.hero-title {
  margin-top: 30px;
  font-size: clamp(3.4rem, 9.4vw, 9.5rem); line-height: .92; letter-spacing: -.045em;
  font-variation-settings: "opsz" 144;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero-title .line > * { display: inline-block; }
.hero-title .line-indent { padding-left: clamp(24px, 8vw, 140px); }
.hero-title em { color: var(--gold); font-weight: 300; }
.hero-foot { display: flex; align-items: flex-start; gap: 28px; margin-top: 44px; max-width: 560px; }
.hero-rule { flex: none; width: 64px; height: 1px; margin-top: 15px; background: var(--gold-2); }
.hero-intro { color: var(--text-2); font-size: 1.18rem; line-height: 1.75; }

.hero-gallery { position: relative; justify-self: end; width: min(100%, 400px); aspect-ratio: 4 / 5; }
.hero-gallery-track { position: absolute; inset: 0; }
.hero-card {
  position: absolute; inset: 0; overflow: hidden; background: var(--deep);
  box-shadow: 0 40px 80px rgba(0, 0, 0, .45);
  transform: translate(calc(var(--k, 0) * -9%), calc(var(--k, 0) * 6%)) rotate(calc(var(--k, 0) * -4deg));
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(245, 240, 231, .35); }
.hero-card-caption {
  position: absolute; inset: auto 0 0; z-index: 1; display: flex; justify-content: space-between; align-items: end;
  padding: 80px 30px 30px; background: linear-gradient(to top, rgba(3, 15, 24, .9), transparent);
  font-size: .66rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase;
}
.hero-card-course { color: var(--gold); }
.hero-card-caption strong { display: block; margin-top: 6px; font-family: Fraunces, Georgia, serif; font-size: 1.5rem; font-weight: 300; letter-spacing: -.01em; text-transform: none; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 34px; display: flex; flex-direction: column; align-items: center; gap: 14px;
  color: var(--text-3); font-size: .64rem; font-weight: 700; letter-spacing: .3em; text-transform: uppercase;
  transform: translateX(-50%);
}
.scroll-line { position: relative; width: 1px; height: 56px; overflow: hidden; background: rgba(229, 195, 154, .18); }
.scroll-line::after { content: ""; position: absolute; inset: 0; background: var(--gold); animation: cue 2.4s var(--ease-in-out) infinite; }
@keyframes cue { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }

/* Animação de entrada da abertura */
.js [data-intro] { opacity: 0; transform: translateY(40px); transition: opacity 1.2s var(--ease), transform 1.4s var(--ease); transition-delay: calc(var(--d, 0) * 140ms + 150ms); }
.js .hero-title [data-intro] { opacity: 1; transform: translateY(108%); }
.js .hero-gallery { opacity: 0; transform: translateY(50px) scale(.96); transition: opacity 1.6s var(--ease) .5s, transform 1.8s var(--ease) .5s; }
.js .scroll-cue[data-intro] { transform: translate(-50%, 20px); }
.is-loaded [data-intro] { opacity: 1 !important; transform: none !important; }
.is-loaded .scroll-cue[data-intro] { transform: translateX(-50%) !important; }
.is-loaded .hero-gallery { opacity: 1; transform: none; }

/* ─── Manifesto ─────────────────────────────────────────────── */
.manifesto { position: relative; padding-block: clamp(120px, 18vw, 220px); background: var(--ink); }
.manifesto-inner { max-width: 1040px; }
.manifesto-text {
  margin-top: 0;
  font-family: Fraunces, Georgia, serif; font-size: clamp(1.9rem, 4.1vw, 3.6rem); font-weight: 300;
  line-height: 1.22; letter-spacing: -.02em; text-wrap: pretty;
}
.manifesto-text .w { opacity: .14; transition: opacity .35s linear, color .35s; }
.manifesto-text .w.is-lit { opacity: 1; }
.manifesto-text .w.is-gold { color: var(--gold); font-style: italic; }

/* ─── Histórias ─────────────────────────────────────────────── */
.stories { padding-bottom: clamp(80px, 10vw, 140px); }
.story {
  width: min(100% - 48px, 1240px); margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(40px, 7vw, 120px);
  align-items: start; padding-block: clamp(60px, 8vw, 110px);
  border-top: 1px solid var(--line-soft); scroll-margin-top: 90px;
}
@media (min-width: 1100px) { .story { width: min(100% - 2 * var(--rail-w) - 48px, 1240px); } }
.story:nth-of-type(even) { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.story:nth-of-type(even) .story-media { order: 2; }

.story-media { position: sticky; top: 110px; }
.portrait {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0;
  background: var(--deep); cursor: pointer; text-align: left;
}
.portrait-clip { position: absolute; inset: 0; overflow: hidden; }
.portrait-clip img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.14) translateY(var(--py, 0px)); transition: filter .8s var(--ease); will-change: transform; }
.js .portrait-clip { clip-path: inset(100% 0 0 0); transition: clip-path 1.6s var(--ease-in-out); }
.js [data-reveal-media].is-in .portrait-clip { clip-path: inset(0 0 0 0); }
.portrait-frame { position: absolute; inset: 22px; border: 1px solid rgba(245, 240, 231, .35); pointer-events: none; transition: inset .7s var(--ease), border-color .5s; }
.portrait:hover .portrait-frame { inset: 14px; border-color: rgba(229, 195, 154, .85); }
.portrait-caption {
  position: absolute; inset: auto 0 0; display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 100px 44px 42px; background: linear-gradient(to top, rgba(3, 15, 24, .88), transparent);
  font-size: .68rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
}
.portrait-arrow { color: var(--gold); font-size: 1.6rem; font-weight: 400; transition: transform .45s var(--ease); }
.portrait:hover .portrait-arrow { transform: translate(5px, -5px); }

.story-body { padding-top: clamp(0px, 3vw, 40px); }
.story-index { display: flex; align-items: center; gap: 20px; }
.story-rule { width: 48px; height: 1px; background: var(--gold-2); transform-origin: left; }
.js .story-index .story-rule { transform: scaleX(0); transition: transform 1.2s var(--ease) .3s; }
.js .story-index.is-in .story-rule { transform: scaleX(1); }

.story-name {
  margin-top: 0;
  font-size: clamp(3.2rem, 6.4vw, 6.6rem); line-height: .95; letter-spacing: -.045em;
  font-variation-settings: "opsz" 144;
}
/* Títulos com revelação palavra a palavra */
.js [data-split] .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.js [data-split] .word > span { display: inline-block; transform: translateY(105%); transition: transform 1.2s var(--ease); transition-delay: calc(var(--w, 0) * 90ms); }
.js [data-split].is-in .word > span { transform: none; }

.story-result {
  display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px 32px;
  margin-top: 46px; padding-block: 30px; border-block: 1px solid var(--line);
}
.result-figure { display: flex; align-items: baseline; gap: 14px; font-family: Fraunces, Georgia, serif; font-weight: 200; line-height: .9; color: var(--gold); }
.result-figure [data-count] { font-size: clamp(5rem, 9vw, 8.5rem); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.result-of { font-size: clamp(1.6rem, 2.4vw, 2.2rem); font-style: italic; color: rgba(229, 195, 154, .7); }
.result-label { max-width: 180px; padding-bottom: 10px; color: var(--text-2); font-size: .7rem; font-weight: 700; letter-spacing: .22em; line-height: 1.7; text-transform: uppercase; }
.story-summary { max-width: 560px; margin-top: 28px; color: rgba(245, 240, 231, .8); font-size: 1.2rem; line-height: 1.75; }

.story-toggle {
  display: inline-flex; align-items: center; gap: 18px; margin-top: 38px; padding: 0; border: 0; background: none;
  color: var(--gold); font-size: .74rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; cursor: pointer;
}
.toggle-icon { position: relative; width: 54px; height: 54px; border: 1px solid rgba(229, 195, 154, .6); border-radius: 50%; transition: background .4s var(--ease), border-color .4s, transform .6s var(--ease); }
.toggle-icon span { position: absolute; left: 50%; top: 50%; width: 16px; height: 1px; background: currentColor; transform: translate(-50%, -50%); transition: transform .6s var(--ease), background .3s; }
.toggle-icon span:last-child { transform: translate(-50%, -50%) rotate(90deg); }
.story-toggle:hover .toggle-icon { background: var(--gold); color: var(--ink); }
.story-toggle:hover .toggle-label { color: var(--cream); }
.toggle-label { transition: color .3s; }
.story.is-open .toggle-icon { transform: rotate(180deg); }
.story.is-open .toggle-icon span:last-child { transform: translate(-50%, -50%) rotate(0deg); }

/* Expansão da história na própria página */
.story-details { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 1s var(--ease); }
.story.is-open .story-details { grid-template-rows: 1fr; }
.details-inner { min-height: 0; overflow: hidden; }
.details-inner > *,
.details-text > p,
.approvals-list > li,
.approvals-head { --step: 90ms; }
.story-details [style*="--i"] {
  opacity: 0; transform: translateY(26px); filter: blur(6px);
  transition: opacity .9s var(--ease), transform 1.1s var(--ease), filter .9s var(--ease);
  transition-delay: 0s;
}
.story.is-open .story-details [style*="--i"] {
  opacity: 1; transform: none; filter: none;
  transition-delay: calc(var(--i) * 95ms + 220ms);
}

.details-quote { margin-top: 56px; padding-left: 28px; border-left: 1px solid var(--gold); }
.details-quote p { font-family: Fraunces, Georgia, serif; font-size: clamp(1.6rem, 2.6vw, 2.25rem); font-style: italic; font-weight: 300; line-height: 1.3; color: var(--gold); }
.details-text { margin-top: 40px; display: grid; gap: 20px; max-width: 620px; }
.details-text p { color: var(--text-2); font-size: 1.08rem; line-height: 1.9; }
.details-text p:first-child::first-letter {
  float: left; margin: 6px 12px 0 0; font-family: Fraunces, Georgia, serif; font-size: 4.2rem; line-height: .8; color: var(--gold);
}

.approvals { margin-top: 72px; }
.approvals-head h3 { margin-top: 0; text-wrap: balance; font-size: clamp(2rem, 3vw, 2.8rem); line-height: 1.1; }
.approvals-head h3 em { color: var(--gold); font-weight: 300; }

/* Logos das universidades */
.seals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 36px 0 0; padding: 0; list-style: none; }
.seal {
  position: relative; display: grid; place-items: center; justify-self: center;
  width: 100%; max-width: 190px; min-width: 0; padding: 0; aspect-ratio: 1;
  border: 1px solid rgba(229, 195, 154, .5); border-radius: 50%; background: transparent;
}
.seal::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(229, 195, 154, .2); border-radius: 50%; pointer-events: none; }
.university-logo { display: block; width: 68%; height: 68%; object-fit: contain; }

/* Revelação genérica ao rolar */
.js [data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity 1.1s var(--ease), transform 1.2s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ─── Encerramento ──────────────────────────────────────────── */
.closing {
  position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(140px, 18vw, 240px); text-align: center;
  background: radial-gradient(ellipse 60% 60% at 50% 100%, rgba(201, 162, 115, .14), transparent 70%), var(--ink);
  border-top: 1px solid var(--line-soft);
}
.closing-rings { position: absolute; inset: 0; z-index: -1; display: grid; place-items: center; pointer-events: none; }
.closing-rings .ring { position: relative; width: 70vmin; height: 70vmin; }
.closing-title {
  max-width: 980px; margin: 0 auto;
  font-size: clamp(2.8rem, 7vw, 6.4rem); line-height: 1; letter-spacing: -.045em; text-wrap: balance;
  font-variation-settings: "opsz" 144;
}
.closing-link {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 52px; padding: 18px 30px;
  border: 1px solid rgba(229, 195, 154, .5); color: var(--gold);
  font-size: .74rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  transition: background .4s var(--ease), color .4s;
}
.closing-link:hover { background: var(--gold); color: var(--ink); }

/* ─── Rodapé ────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--navy); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 36px; }
.footer-inner img { width: 140px; height: auto; }
.footer-inner small { color: var(--text-3); font-size: .8rem; }

/* ─── Responsivo ────────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-block: 120px 140px; }
  .hero-gallery { justify-self: start; width: min(78%, 340px); margin-left: clamp(0px, 8vw, 80px); }
  .story, .story:nth-of-type(even) { grid-template-columns: 1fr; gap: 36px; }
  .story:nth-of-type(even) .story-media { order: 0; }
  .story-media { position: relative; top: 0; max-width: 560px; }
}
@media (max-width: 600px) {
  .container, .story { width: min(100% - 32px, 1240px); }
  .header-inner { min-height: 66px; }
  .brand img { width: 120px; }
  .header-link { padding: 10px 12px; font-size: .58rem; letter-spacing: .12em; }
  .hero-inner { padding-block: 110px 130px; gap: 48px; }
  .hero-title { font-size: clamp(3rem, 15vw, 4.6rem); }
  .hero-title .line-indent { padding-left: 18px; }
  .hero-foot { gap: 18px; margin-top: 30px; }
  .hero-rule { width: 36px; }
  .hero-intro { font-size: 1.04rem; }
  .hero-gallery { width: 72%; margin-left: auto; margin-right: 6%; }
  .scroll-cue { display: none; }
  .hero { min-height: auto; }
  .hero-inner { padding-block: 110px 90px; }
  .manifesto-text { font-size: 1.85rem; }
  .story-name { font-size: 3.3rem; }
  .portrait-frame { inset: 16px; }
  .portrait-caption { padding: 80px 30px 30px; }
  .seals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 18px; }
  .closing-title { font-size: 2.7rem; }
  .footer-inner img { width: 115px; }
}

/* Movimento reduzido: tudo aparece sem animar */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain { animation: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js [data-intro], .js [data-reveal], .js .hero-gallery { opacity: 1; transform: none; }
  .js .portrait-clip { clip-path: none; }
  .js [data-split] .word > span { transform: none; }
  .manifesto-text .w { opacity: 1; }
}
