:root {
  --void: #0a0812;
  --deep: #14101f;
  --star: #f0eaf9;
  --star-dim: rgba(240, 234, 249, 0.72);
  --star-faint: rgba(240, 234, 249, 0.42);
  --gold: #d9a23f;
  --gem: #d9a23f; /* cor da gema ativa — dirigida por JS */
  --line: rgba(240, 234, 249, 0.14);
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--star);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body[data-locked="true"] { overflow: hidden; }

.tag {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.tnum { font-variant-numeric: tabular-nums; }

h1, h2, .logo-main { font-family: "Sora", sans-serif; font-weight: 800; letter-spacing: -0.02em; }

/* ══ logo (draft v1) ══ */
.logo { display: flex; flex-direction: column; align-items: center; }

.logo-top {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.55em;
  text-indent: 0.55em;
  font-size: clamp(13px, 1.6vw, 18px);
  color: var(--gold);
}

.logo-main {
  font-size: clamp(56px, 11vw, 150px);
  line-height: 1.02;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--star) 55%, #9b8ac2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-gems { display: flex; gap: clamp(10px, 1.6vw, 20px); margin-top: clamp(10px, 2vh, 22px); }

.logo-gems i {
  width: clamp(10px, 1.2vw, 16px);
  height: clamp(10px, 1.2vw, 16px);
  rotate: 45deg;
  border-radius: 3px;
}

.logo-gems i:nth-child(1) { background: #3f7bf6; box-shadow: 0 0 14px #3f7bf6aa; }
.logo-gems i:nth-child(2) { background: #17b57b; box-shadow: 0 0 14px #17b57baa; }
.logo-gems i:nth-child(3) { background: #ec4899; box-shadow: 0 0 14px #ec4899aa; }
.logo-gems i:nth-child(4) { background: #f0a63a; box-shadow: 0 0 14px #f0a63aaa; }
.logo-gems i:nth-child(5) { background: #8b5cf6; box-shadow: 0 0 14px #8b5cf6aa; }

/* ══ gate ══ */
.gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background:
    radial-gradient(90% 70% at 50% 38%, rgba(139, 92, 246, 0.14), transparent 70%),
    var(--void);
  transition-property: opacity, filter;
  transition-duration: 0.9s;
  transition-timing-function: var(--ease);
}

.gate.out { opacity: 0; filter: blur(8px); pointer-events: none; }

.gate-inner { text-align: center; padding: 24px; }

.gate-kicker { color: var(--gold); margin-bottom: 18px; }

.gate-btn {
  position: relative;
  margin-top: 44px;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(240, 234, 249, 0.05);
  color: var(--star);
  cursor: pointer;
  transition-property: scale, border-color, background-color;
  transition-duration: 0.3s;
  transition-timing-function: var(--ease);
}

.gate-btn:not(:disabled):hover { border-color: var(--gold); background: rgba(217, 162, 63, 0.1); }
.gate-btn:not(:disabled):active { scale: 0.96; }
.gate-btn:disabled { cursor: default; color: var(--star-faint); }

.gate-btn-ring { position: absolute; inset: -14px; border-radius: 50%; border: 1px solid rgba(240, 234, 249, 0.12); }

.gate-btn:not(:disabled) .gate-btn-ring { animation: pulse 2.4s var(--ease) infinite; }

@keyframes pulse {
  0%   { transform: scale(0.94); opacity: 0; }
  40%  { opacity: 1; }
  100% { transform: scale(1.12); opacity: 0; }
}

.gate-sound { margin-top: 26px; display: flex; align-items: center; justify-content: center; gap: 12px; }

.gate-sound button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition-property: scale, border-color;
  transition-duration: 0.25s;
}

.gate-sound button:active { scale: 0.96; }

.gate-hint { margin-top: 34px; color: var(--star-faint); letter-spacing: 0.12em; }

/* ══ camadas fixas ══ */
#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
  /* hue dirigido por JS: o núcleo de energia vira a cor de cada gema */
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(10, 8, 18, 0.6) 0%, rgba(10, 8, 18, 0.15) 30%, rgba(10, 8, 18, 0.15) 70%, rgba(10, 8, 18, 0.6) 100%),
    radial-gradient(120% 90% at 50% 50%, transparent 55%, rgba(10, 8, 18, 0.55) 100%);
}

.dim { position: fixed; inset: 0; z-index: -1; background: #000; opacity: 0; }

.flash { position: fixed; inset: 0; z-index: 45; background: #fff; opacity: 0; pointer-events: none; }

.grain {
  position: fixed;
  inset: -100px;
  z-index: 40;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(4) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-32px, 18px); }
  50%  { transform: translate(24px, -26px); }
  75%  { transform: translate(-18px, -12px); }
  100% { transform: translate(0, 0); }
}

/* ══ nav ══ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  padding: 12px clamp(18px, 3vw, 40px);
  background: linear-gradient(180deg, rgba(10, 8, 18, 0.85), transparent);
}

.brand {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--star);
  text-decoration: none;
  white-space: nowrap;
}

.brand b { color: var(--gold); font-weight: 800; }

.nav-links { display: flex; gap: clamp(10px, 1.8vw, 24px); margin-left: auto; }

.nav-links a {
  color: var(--star-faint);
  text-decoration: none;
  padding: 14px 2px;
  transition-property: color;
  transition-duration: 0.25s;
}

.nav-links a:hover, .nav-links a.is-active { color: var(--star); }

.lang {
  min-width: 44px;
  min-height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--star);
  cursor: pointer;
  transition-property: scale, border-color;
  transition-duration: 0.25s;
}

.lang:hover { border-color: var(--gold); }
.lang:active { scale: 0.96; }

.sound-group { display: flex; align-items: center; gap: 10px; }

.vol { width: 74px; accent-color: var(--gold); cursor: pointer; }

.sound {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(10, 8, 18, 0.4);
  color: var(--star);
  cursor: pointer;
  transition-property: scale, border-color;
  transition-duration: 0.25s;
  transition-timing-function: var(--ease);
}

.sound:hover { border-color: var(--gold); }
.sound:active { scale: 0.96; }

.sound-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }

.sound-bars i { width: 2px; background: var(--gold); border-radius: 1px; animation: bar 1s ease-in-out infinite; }
.sound-bars i:nth-child(1) { height: 6px; }
.sound-bars i:nth-child(2) { height: 12px; animation-delay: 0.2s; }
.sound-bars i:nth-child(3) { height: 8px; animation-delay: 0.4s; }

@keyframes bar { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.4); } }

.sound[aria-pressed="false"] .sound-bars i { animation: none; transform: scaleY(0.25); opacity: 0.5; }

/* ══ trilho de gemas (progresso) ══ */
.gemrail {
  position: fixed;
  right: clamp(14px, 2.6vw, 32px);
  top: 50%;
  translate: 0 -50%;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  pointer-events: none;
}

.gemrail-line {
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: rgba(240, 234, 249, 0.15);
  border-radius: 999px;
  overflow: hidden;
}

.gemrail-line i {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--gold), var(--gem));
  transform-origin: top;
  transform: scaleY(0);
}

.gemdot {
  position: relative;
  width: 12px;
  height: 12px;
  rotate: 45deg;
  border-radius: 3px;
  background: rgba(240, 234, 249, 0.18);
  transition-property: background-color, box-shadow, scale;
  transition-duration: 0.4s;
  transition-timing-function: var(--ease);
}

.gemdot.on { scale: 1.15; }
.gemdot.on[data-dot="0"] { background: #3f7bf6; box-shadow: 0 0 12px #3f7bf6; }
.gemdot.on[data-dot="1"] { background: #17b57b; box-shadow: 0 0 12px #17b57b; }
.gemdot.on[data-dot="2"] { background: #ec4899; box-shadow: 0 0 12px #ec4899; }
.gemdot.on[data-dot="3"] { background: #f0a63a; box-shadow: 0 0 12px #f0a63a; }
.gemdot.on[data-dot="4"] { background: #8b5cf6; box-shadow: 0 0 12px #8b5cf6; }

/* ══ capítulos pinados ══ */
.pinwrap { position: relative; }

#s1 { height: 170vh; }
.chapter { height: 200vh; }


.pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 6vw, 96px) clamp(56px, 8vw, 120px);
}

.pin.center { align-items: center; text-align: center; }

.eyebrow { color: var(--gold); margin-bottom: 18px; display: block; }

.display {
  font-size: clamp(52px, 11vw, 150px);
  line-height: 0.98;
  text-transform: uppercase;
  text-wrap: balance;
}

h2 { font-size: clamp(38px, 6.5vw, 84px); line-height: 1.02; text-wrap: balance; }

.lede {
  margin-top: 20px;
  max-width: 52ch;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.55;
  color: var(--star-dim);
  text-wrap: balance;
}

.chnum { color: var(--gem); margin-bottom: 14px; }

.chapter h2 { color: var(--star); text-shadow: 0 0 60px color-mix(in srgb, var(--gem) 55%, transparent); }

.gem {
  display: block;
  width: clamp(34px, 4vw, 52px);
  height: clamp(34px, 4vw, 52px);
  margin: 0 auto 26px;
  rotate: 45deg;
  border-radius: 8px;
  background:
    radial-gradient(60% 60% at 35% 30%, rgba(255, 255, 255, 0.85), transparent 60%),
    var(--gem);
  box-shadow:
    0 0 24px var(--gem),
    0 0 90px color-mix(in srgb, var(--gem) 60%, transparent),
    inset 0 0 14px rgba(255, 255, 255, 0.35);
  animation: gemfloat 3.2s var(--ease) infinite;
}

@keyframes gemfloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.snapline { font-size: clamp(44px, 8vw, 110px); }

/* reveal (fade dirigido por JS) */
[data-fade] { will-change: opacity, transform, filter; }

.hint {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  bottom: max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--star-dim);
}

.hint-line {
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(180deg, transparent, var(--star));
  overflow: hidden;
  position: relative;
}

.hint-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--void);
  animation: drip 2s var(--ease) infinite;
}

@keyframes drip {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}

/* ══ pós-estalo: logo + detalhe + contato ══ */
.reveal-logo {
  position: relative;
  min-height: 120vh;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.logo-big .logo-main { font-size: clamp(64px, 14vw, 210px); }

.reveal-logo .lede { margin-inline: auto; }

.detail {
  position: relative;
  background: linear-gradient(180deg, #000, var(--deep) 30%, var(--void));
  padding: clamp(72px, 12vh, 140px) clamp(24px, 6vw, 96px);
  text-align: center;
}

.cards {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  max-width: 1240px;
  margin-inline: auto;
}

.card {
  text-align: left;
  padding: 26px 24px;
  border-radius: 18px;
  background: rgba(240, 234, 249, 0.04);
  box-shadow:
    inset 0 0 0 1px rgba(240, 234, 249, 0.1),
    inset 0 3px 0 var(--gemc),
    0 14px 40px rgba(0, 0, 0, 0.35);
  transition-property: translate, box-shadow;
  transition-duration: 0.3s;
  transition-timing-function: var(--ease);
}

.card:hover {
  translate: 0 -4px;
  box-shadow:
    inset 0 0 0 1px rgba(240, 234, 249, 0.16),
    inset 0 3px 0 var(--gemc),
    0 24px 60px rgba(0, 0, 0, 0.45),
    0 0 40px color-mix(in srgb, var(--gemc) 25%, transparent);
}

.card h3 { font-family: "Sora", sans-serif; font-weight: 600; font-size: 19px; margin-bottom: 14px; }

.card ul { list-style: none; }

.card li {
  position: relative;
  padding-left: 18px;
  margin-top: 9px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--star-dim);
  text-wrap: pretty;
}

.card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  rotate: 45deg;
  border-radius: 2px;
  background: var(--gemc);
}

/* contato */
.contact {
  position: relative;
  background: var(--void);
  padding: clamp(72px, 12vh, 140px) clamp(24px, 6vw, 96px) 48px;
  text-align: center;
}

.form {
  margin: 40px auto 0;
  width: min(520px, 94vw);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.form input, .form select, .form textarea {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(240, 234, 249, 0.05);
  color: var(--star);
  font-family: inherit;
  font-size: 15px;
  transition-property: border-color, background-color;
  transition-duration: 0.25s;
}

.form textarea { resize: vertical; }

.form :is(input, select, textarea):focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(240, 234, 249, 0.08);
}

.form ::placeholder { color: var(--star-faint); }

.form select:invalid { color: var(--star-faint); }
.form option { color: #111; }

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 34px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #e8b558, var(--gold));
  color: #241703;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(217, 162, 63, 0.3), 0 16px 44px rgba(217, 162, 63, 0.22);
  transition-property: scale, box-shadow;
  transition-duration: 0.25s;
  transition-timing-function: var(--ease);
}

.cta:hover { box-shadow: 0 6px 18px rgba(217, 162, 63, 0.4), 0 22px 60px rgba(217, 162, 63, 0.3); }
.cta:active { scale: 0.96; }
.cta.is-done { background: #1d7a3c; color: var(--star); }

.form-note { text-align: center; color: var(--star-faint); font-size: 9px; }

footer { margin-top: 72px; font-size: 12px; color: var(--star-faint); }

/* reveal IO (pós-estalo) */
.reveal > * {
  opacity: 0;
  translate: 0 26px;
  transition-property: opacity, translate;
  transition-duration: 0.9s;
  transition-timing-function: var(--ease);
}

.reveal.in > * { opacity: 1; translate: 0 0; }
.reveal.in > *:nth-child(2) { transition-delay: 0.12s; }
.reveal.in > *:nth-child(3) { transition-delay: 0.24s; }

/* ══ responsivo / a11y ══ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .lang { margin-left: auto; }
}

@media (max-width: 640px) {
  .pin { padding-left: 24px; padding-right: 56px; }
  .gemrail { right: 12px; gap: 14px; }
  .grain { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hint-line::after, .sound-bars i, .gate-btn-ring, .grain, .gem { animation: none; }
  .reveal > * { transition-duration: 0.01s; }
}

/* ═══ v2: snap com logo pinada + pop das gemas ═══ */
#snap { height: 340vh; }

.snapstack {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: min(92vw, 1100px);
  text-align: center;
  will-change: opacity, transform;
}

.logo-hold { opacity: 0; }
.logo-hold .lede { margin-inline: auto; }

.gem.pop { animation: gempop 0.55s var(--ease), gemfloat 3.2s var(--ease) infinite; }

@keyframes gempop {
  0% { filter: brightness(3.2); scale: 1.4; }
  100% { filter: brightness(1); scale: 1; }
}

/* ═══ v3: hero lockup + kicker maior + ledes centralizadas + cards ═══ */
.hero-lockup { display: flex; flex-direction: column; align-items: center; }
.hero-lockup .logo-top { font-size: clamp(15px, 2vw, 24px); }
.hero-lockup .logo-main { font-size: clamp(64px, 14vw, 200px); }

#s1 .eyebrow { font-size: clamp(13px, 1.5vw, 18px); letter-spacing: 0.3em; }

.pin.center .lede { margin-inline: auto; }

.cards { grid-template-columns: repeat(6, 1fr); gap: 20px; max-width: 1280px; }

.card { grid-column: span 2; padding: 34px 30px; border-radius: 22px; }
.card:nth-child(4) { grid-column: 2 / span 2; }
.card:nth-child(5) { grid-column: 4 / span 2; }

.card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }

.card-gem {
  width: 16px;
  height: 16px;
  rotate: 45deg;
  border-radius: 4px;
  background: var(--gemc);
  box-shadow: 0 0 14px var(--gemc);
  flex-shrink: 0;
}

.card-num { color: var(--gemc); }

.card h3 { font-size: clamp(24px, 2.1vw, 30px); font-weight: 800; margin-bottom: 16px; }

.card li { font-size: 15px; margin-top: 12px; }

@media (max-width: 980px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .card, .card:nth-child(4), .card:nth-child(5) { grid-column: auto; }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
}

.chapter .pin { padding-top: 34vh; }

/* ═══ v4: gemas coletadas permanentes acima dos títulos ═══ */
.collected {
  position: fixed;
  top: 30vh;
  left: 50%;
  z-index: 25;
  display: flex;
  gap: clamp(22px, 4.2vw, 54px);
  opacity: 0;
  transform: translateX(-50%);
  will-change: transform, opacity;
  pointer-events: none;
}

.cslot {
  width: clamp(38px, 4.4vw, 58px);
  height: clamp(38px, 4.4vw, 58px);
  rotate: 45deg;
  border-radius: clamp(8px, 1vw, 12px);
  border: 1px solid rgba(240, 234, 249, 0.3);
  background: transparent;
  transition-property: background-color, box-shadow, border-color;
  transition-duration: 0.35s;
  transition-timing-function: var(--ease);
}

.cslot.on { border-color: transparent; }
.cslot.on[data-slot="0"] { background: radial-gradient(60% 60% at 35% 30%, rgba(255,255,255,0.75), transparent 60%), #3f7bf6; box-shadow: 0 0 28px #3f7bf6, 0 0 90px #3f7bf666; }
.cslot.on[data-slot="1"] { background: radial-gradient(60% 60% at 35% 30%, rgba(255,255,255,0.75), transparent 60%), #17b57b; box-shadow: 0 0 28px #17b57b, 0 0 90px #17b57b66; }
.cslot.on[data-slot="2"] { background: radial-gradient(60% 60% at 35% 30%, rgba(255,255,255,0.75), transparent 60%), #ec4899; box-shadow: 0 0 28px #ec4899, 0 0 90px #ec489966; }
.cslot.on[data-slot="3"] { background: radial-gradient(60% 60% at 35% 30%, rgba(255,255,255,0.75), transparent 60%), #f0a63a; box-shadow: 0 0 28px #f0a63a, 0 0 90px #f0a63a66; }
.cslot.on[data-slot="4"] { background: radial-gradient(60% 60% at 35% 30%, rgba(255,255,255,0.75), transparent 60%), #8b5cf6; box-shadow: 0 0 28px #8b5cf6, 0 0 90px #8b5cf666; }
.cslot.pop { animation: gempop 0.5s var(--ease); }
