/* Prêmio CBMM 2027 — paleta da proposta criativa */
:root {
  --black: #121212;
  --navy: #213769;
  --navy-deep: #0c1433;
  --blue: #2c4fff;
  --peach: #ffc29a;
  --orange: #e5721e;
  --magenta: #e321c5;
  --white: #ffffff;
  --gutter: max(4vw, 20px);
  --sq: clamp(120px, 8.5vw, 220px);   /* quadrado final em volta do logo */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #000;
  color: var(--white);
  font: 400 16px/1.5 Sora, system-ui, -apple-system, "Segoe UI", sans-serif;
}
img { display: block; max-width: 100%; height: auto; }

/* ---------- Hero ---------- */
/* ---------- Cena de rolagem ----------
   A cena é mais alta que a tela; o palco fica preso no topo enquanto a
   rolagem fecha o hero num quadrado (js/scene.js). */
.scene { position: relative; height: 1035vh; }
.scene__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

/* céu fixo atrás de tudo (altura da tela "grande" para não refazer as
   estrelas quando a barra do navegador do celular aparece e some) */
.sky { position: fixed; inset: 0 0 auto 0; width: 100%; height: 100vh; height: 100lvh; display: block; z-index: 0; }
main { position: relative; z-index: 1; }

.hero {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  isolation: isolate;
  /* fallback sem WebGL: mesma composição em CSS */
  background:
    linear-gradient(172deg, #bec8f8 0%, #2648ff 8%, #0e1638 13%, #0c1433 40%, #172a7a 58%, #2f55ff 68%, #a9b4f5 77%, #f9be8a 85%, #ee7a1c 90%, #e21ccb 95%, #f4b8da 100%);
}
.hero--gl { background: var(--navy-deep); }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: -1; }

/* logos dos cantos */
.hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  /* detalhes: bem no canto */
  padding: calc(clamp(14px, 1.6vw, 28px) + env(safe-area-inset-top, 0px)) clamp(16px, 1.8vw, 32px) 0;
}
.hero__logo { width: auto; }
.hero__logo--cbmm { height: clamp(13px, 1.15vw, 20px); }
.hero__logo--globalad { height: clamp(13px, 1.15vw, 20px); }

/* logo do prêmio no centro (compensa a altura do topo para ficar no centro da tela) */
.hero__center {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 0 var(--gutter);
}
.hero__award { width: clamp(200px, 22vw, 360px); }

@media (max-width: 599px) {
  .hero__award { width: min(62vw, 260px); }
}

/* ---------- Abertura ----------
   Logo do prêmio surge sobre preto; depois 5 colunas pretas recolhem para
   cima, da esquerda para a direita e revelam o fundo e os logos dos cantos.
   O logo central fica acima das colunas, então não se move. */
.intro { display: none; }
.has-intro body { overflow: hidden; }
.has-intro .intro {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  align-items: start;
  pointer-events: none;
}
.intro span {
  height: 100%;
  background: #000;
  margin-right: -1px;            /* evita fresta entre colunas */
}
/* logos fixos: ficam escondidos durante a abertura e surgem quando as colunas saem */
.hero__top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 9;
  pointer-events: none;
  transition: opacity .7s ease;
}
.has-intro .hero__top { opacity: 0; }
.hero__center { z-index: 2; }

.has-intro .hero__award { opacity: 0; }
.intro-play .hero__award { animation: intro-logo .9s cubic-bezier(.22, 1, .36, 1) .15s both; }

.intro-play .intro span {
  animation: intro-col 1.15s cubic-bezier(.25, .46, .076, 1) calc(1.25s + var(--i) * .04s) forwards;
}
/* fundo entra com um leve zoom de afastamento enquanto as colunas sobem */
.has-intro .hero__bg { transform: scale(1.18); }
.intro-play .hero__bg { animation: intro-zoom 2.2s cubic-bezier(.16, 1, .3, 1) 1.25s both; }

@keyframes intro-logo {
  from { opacity: 0; transform: translateY(14px) scale(.98); }
  to { opacity: 1; transform: none; }
}
@keyframes intro-zoom {
  from { transform: scale(1.18); }
  to { transform: none; }
}
@keyframes intro-col {
  to { height: 0; }
}

/* ---------- Liquid scroll ----------
   Faixa fixa na base da tela com desfoque progressivo: cada camada aplica
   um blur maior (até 22px) e saturação 1.15, recortada por um degradê, de
   modo que o conteúdo "derrete" ao passar por ela durante a rolagem. */
.liquid {
  position: fixed;
  inset: auto 0 0 0;
  height: 15vh;
  z-index: 8;
  pointer-events: none;
}
.liquid span {
  position: absolute;
  inset: 0;
  -webkit-backdrop-filter: blur(var(--b)) saturate(1.15);
  backdrop-filter: blur(var(--b)) saturate(1.15);
  -webkit-mask-image: linear-gradient(to bottom, transparent var(--a), #000 var(--z), #000 100%);
  mask-image: linear-gradient(to bottom, transparent var(--a), #000 var(--z), #000 100%);
}

/* ---------- Contexto / Objetivo ----------
   Dois textos, um de cada lado do quadrado. .about__gap é o lugar do
   quadrado final: o JS mede ele para saber para onde o hero fecha. */
.about {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr var(--sq) 1fr;
  align-items: center;
  column-gap: clamp(40px, 5.3vw, 120px);
  padding: 0 max(var(--gutter), 9.5vw);
  pointer-events: none;
}
.about__gap { width: var(--sq); height: var(--sq); }
.about__col { pointer-events: auto; }
.about__col--left { text-align: right; }
.about__label,
.about__text {
  margin: 0;
  font-weight: 300;
  font-size: clamp(14px, 1.02vw, 20px);
  line-height: 2;
  opacity: 0;
  will-change: opacity, transform;
}
.about__label { color: #4a4a4a; text-transform: uppercase; letter-spacing: .02em; }
.about__text { color: #e6e6e6; }

@media (max-width: 799px) {
  :root { --sq: clamp(104px, 28vw, 140px); }
  .about {
    grid-template-columns: 1fr;
    grid-template-rows: auto var(--sq) auto;
    justify-items: center;
    align-content: center;
    row-gap: clamp(20px, 4svh, 36px);
    padding: 0 var(--gutter);
  }
  .about__col { max-width: 46ch; text-align: center; }
  .about__col--left { text-align: center; }
  .about__label, .about__text { font-size: 13px; line-height: 1.75; }
}

/* ---------- Universo de ideias ----------
   Título sobre o céu estrelado. Cada linha: um retângulo branco entra da
   esquerda, o texto aparece por baixo e o retângulo sai pela direita, em
   cascata; no fim, um bloco azul marca "criação?". Toca com .is-on. */
.universe {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 var(--gutter);
  pointer-events: none;
}
.universe__title {
  margin: 0;
  font-weight: 400;
  font-size: clamp(28px, 4.2vw, 84px);
  line-height: 1.18;
  text-align: center;
  letter-spacing: -.005em;
  color: #fff;
}
.hl-line { display: block; white-space: nowrap; }
.hl-text { position: relative; display: inline-block; }
.hl-inner { position: relative; z-index: 1; opacity: 0; }
.hl-rect {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #fff;
  clip-path: inset(0 100% 0 0);
  pointer-events: none;
}
.hl-mark { position: relative; z-index: 0; }
.hl-mark::before {
  content: "";
  position: absolute;
  inset: .1em -.05em .02em -.05em;
  z-index: -1;
  background: var(--blue);
  clip-path: inset(0 100% 0 0);
}

.universe.is-on .hl-rect { animation: hl-wipe 1.4s calc(var(--d) * 1s) both; }
.universe.is-on .hl-inner { animation: hl-show 0s calc(var(--d) * 1s + .7s) both; }
.universe.is-on .hl-line:nth-child(1) { --d: 0; }
.universe.is-on .hl-line:nth-child(2) { --d: .35; }
.universe.is-on .hl-line:nth-child(3) { --d: .7; }
.universe.is-on .hl-mark::before { animation: hl-mark .8s cubic-bezier(.65, 0, .35, 1) 2.2s both; }

@keyframes hl-wipe {
  0% { clip-path: inset(0 100% 0 0); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  50% { clip-path: inset(0 0 0 0); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  100% { clip-path: inset(0 0 0 100%); }
}
@keyframes hl-show { from { opacity: 0; } to { opacity: 1; } }
@keyframes hl-mark { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

@media (max-width: 599px) {
  .universe__title { font-size: clamp(24px, 7.4vw, 40px); }
}
@media (prefers-reduced-motion: reduce) {
  .universe.is-on .hl-rect { animation: none; }
  .universe.is-on .hl-inner { animation: none; opacity: 1; }
  .universe.is-on .hl-mark::before { animation: none; clip-path: none; }
}

/* ---------- O que move uma descoberta ----------
   Segundo título (mesma revelação) e roda de 6 imagens que gira com a
   rolagem. A geometria (--card, --R, --step, --arc) vem do js/scene.js. */
.discover { will-change: transform; }

.wheel {
  position: absolute;
  inset: 0;
  pointer-events: none;
  visibility: hidden;
}
.wheel__swing {
  position: absolute;
  left: 50%;
  top: calc(var(--arc, 300px) + var(--R, 1400px));
  width: 0;
  height: 0;
  will-change: transform;
}
.wheel__ring {
  position: absolute;
  left: 0;
  top: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  will-change: transform;
}
.card {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  transform: rotate(calc(var(--i) * var(--step, 18deg)));
}
.card__box {
  position: absolute;
  left: calc(var(--card, 400px) / -2);
  top: calc(var(--R, 1400px) * -1);
  width: var(--card, 400px);
  aspect-ratio: 4 / 5;
  margin: 0;
  overflow: hidden;
  border-radius: 6.06% / 4.85%;   /* mesmo arredondamento das imagens */
  background: #0c1433;
}
.card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card__box::after {
  content: "";
  position: absolute;
  inset: 40% 0 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .78), transparent);
}
.card__text {
  position: absolute;
  z-index: 1;
  left: 7%;
  right: 7%;
  bottom: 6.5%;
  font-weight: 400;
  font-size: max(12px, calc(var(--card, 400px) * .058));
  line-height: 1.3;
  color: #fff;
}

/* ---------- Vozes ----------
   Palco preso na tela: o título é revelado, sai, e quatro vídeos entram um
   de cada vez (de baixo, cobrindo o anterior), com a frase ao lado. */
.voices { position: relative; height: 750vh; }
.voices__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.voices__head { will-change: transform, opacity; }
.voices__body {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 34rem);
  justify-content: center;
  align-items: center;
  column-gap: clamp(40px, 6vw, 120px);
  padding: 0 var(--gutter);
  pointer-events: none;
}
.voices__media {
  position: relative;
  height: min(72svh, 760px);
  aspect-ratio: 9 / 16;
}
.voice__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  background: #0c1433;
  transform: translateY(120svh);
  will-change: transform, opacity;
}
.voices__sound {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 16px;
  translate: -50% 0;
  font: 400 13px/1 Sora, system-ui, sans-serif;
  color: #fff;
  background: rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  padding: 10px 16px;
  min-height: 40px;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
}
.voices__sound.is-shown { opacity: 1; visibility: visible; }
.voices__sound:hover { background: rgba(0, 0, 0, .65); }
.voices__sound:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.voices__quotes { position: relative; display: grid; }
.voice__quote {
  grid-area: 1 / 1;          /* as quatro frases no mesmo lugar */
  align-self: center;
  margin: 0;
  opacity: 0;
  will-change: opacity, transform;
}
.voice__num {
  display: block;
  margin-bottom: 20px;
  font-size: 13px;
  letter-spacing: .08em;
  color: #6f7896;
}
.voice__quote p {
  margin: 0;
  font-weight: 300;
  font-size: clamp(18px, 1.7vw, 30px);
  line-height: 1.5;
  color: #f2f2f2;
}
.voice__quote footer { margin-top: 28px; display: grid; gap: 4px; }
.voice__quote cite { font-style: normal; font-weight: 400; font-size: clamp(15px, 1.1vw, 19px); color: #fff; }
.voice__quote footer span { font-weight: 300; font-size: clamp(13px, .9vw, 16px); color: #8f97b3; }

@media (max-width: 799px) {
  .voices__body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    justify-items: center;
    align-content: center;
    row-gap: 22px;
  }
  .voices__media { height: min(46svh, 420px); }
  .voices__quotes { max-width: 38ch; text-align: center; }
  .voice__num { margin-bottom: 10px; }
  .voice__quote p { font-size: 15px; line-height: 1.5; }
  .voice__quote footer { margin-top: 14px; }
  .voice__quote cite { font-size: 14px; }
  .voice__quote footer span { font-size: 12px; }
}
@media (max-width: 599px) {
  .voices__head .universe__title { font-size: clamp(20px, 6.2vw, 34px); }
}

/* ---------- Em números ----------
   Título (mesma revelação) e três blocos. Ao entrar na tela (.is-in), as
   linhas se desenham, os números contam e os textos sobem, em cascata. */
.numbers {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(110px, 18svh, 200px) var(--gutter) clamp(120px, 20svh, 220px);
}
.numbers__head {
  position: static;
  display: block;
  padding: 0;
  margin-bottom: clamp(64px, 10svh, 130px);
}
.numbers__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(40px, 4.8vw, 88px);
  row-gap: 72px;
  max-width: 1480px;
  margin: 0 auto;
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px);
  align-content: start;
  --d: calc(var(--g) * .18s);
}
.stats__title,
.stats__rule { grid-column: 1 / -1; }
.stats__title {
  margin: 0;
  font-weight: 600;
  font-size: clamp(20px, 2.1vw, 36px);
  line-height: 1.2;
}
.stats__rule {
  display: block;
  height: 1px;
  background: rgba(255, 255, 255, .38);
  margin: clamp(22px, 2.6vw, 44px) 0;
  transform: scaleX(0);
  transform-origin: left;
}
.stat__value {
  margin: 0;
  font-weight: 600;
  font-size: clamp(40px, 4.5vw, 84px);
  line-height: 1;
  letter-spacing: -.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.stat__value small {
  margin-left: .2em;
  font-weight: 400;
  font-size: .3em;
  letter-spacing: 0;
}
.stat__text {
  margin: 0;
  font-weight: 400;
  font-size: clamp(15px, 1.45vw, 24px);
  line-height: 1.45;
  color: #e9e9ee;
}
.numbers__sources {
  max-width: 1480px;
  margin: clamp(64px, 9svh, 110px) auto 0;
  font-size: 13px;
  line-height: 1.6;
  color: #6f7591;
}

/* estado inicial e entrada */
.stats__title, .stat__value, .stat__text, .numbers__sources { opacity: 0; transform: translateY(24px); }
.stats.is-in .stats__title,
.stats.is-in .stat__value,
.stats.is-in .stat__text,
.numbers__sources.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .8s ease, transform 1s cubic-bezier(.22, 1, .36, 1);
}
.stats.is-in .stats__title { transition-delay: var(--d); }
.stats.is-in .stats__rule { transform: none; transition: transform 1.1s cubic-bezier(.65, 0, .35, 1); }
.stats.is-in .stats__rule:nth-of-type(1) { transition-delay: calc(var(--d) + .1s); }
.stats.is-in .stats__rule:nth-of-type(2) { transition-delay: calc(var(--d) + .45s); }
.stats.is-in .stat__value { transition-delay: calc(var(--d) + .25s); }
.stats.is-in .stat__value:nth-of-type(2) { transition-delay: calc(var(--d) + .35s); }
.stats.is-in .stat__text { transition-delay: calc(var(--d) + .65s); }
.stats.is-in .stat__text:nth-of-type(4) { transition-delay: calc(var(--d) + .75s); }

@media (max-width: 999px) {
  .numbers__grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
  .stats { --d: 0s; }
}
@media (max-width: 599px) {
  .numbers__head .universe__title { font-size: clamp(20px, 6.3vw, 34px); }
}
@media (prefers-reduced-motion: reduce) {
  .stats__title, .stat__value, .stat__text, .numbers__sources, .stats__rule { opacity: 1; transform: none; }
}
