:root {
  --bg: #05070b;
  --ink: #eef3f8;
  --ink-2: #a9b4c2;
  --ink-3: #6c7787;
  --accent: #4fe3ff;
  --accent-2: #8a7bff;
  --warn: #ffb547;
  --glass: rgba(12, 17, 26, .52);
  --glass-line: rgba(160, 200, 255, .14);
  --radius: 18px;
  --display: 'Space Grotesk', system-ui, sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; }

#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; }
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-4%)} 60%{transform:translate(-4%,-2%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }
.letterbox { position: fixed; left: 0; right: 0; height: 6vh; background: #000; z-index: 2; pointer-events: none; transition: height 1.2s cubic-bezier(.7,0,.2,1); }
.letterbox.top { top: 0; } .letterbox.bottom { bottom: 0; }
body.scrolled .letterbox { height: 0; }

/* Loader */
#loader {
  position: fixed; inset: 0; z-index: 50; background: var(--bg); display: grid; place-content: center; gap: 18px; text-align: center;
  transition: opacity .9s ease, visibility .9s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-mark { font: 600 clamp(28px, 5vw, 44px)/1 var(--display); letter-spacing: .55em; padding-left: .55em; }
.loader-bar { width: min(280px, 60vw); height: 2px; background: rgba(255,255,255,.08); overflow: hidden; border-radius: 2px; }
.loader-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .3s; }
.loader-note { font: 400 12px var(--mono); color: var(--ink-3); letter-spacing: .12em; text-transform: uppercase; }

/* Nav */
.nav {
  position: fixed; z-index: 10; top: calc(6vh + 14px); left: 0; right: 0; margin: 0 auto; width: min(1180px, calc(100% - 32px));
  display: flex; align-items: center; gap: 24px; padding: 10px 12px 10px 18px; border-radius: 999px;
  background: rgba(8, 11, 17, .35); border: 1px solid var(--glass-line); backdrop-filter: blur(14px) saturate(140%);
  transition: top 1.2s cubic-bezier(.7,0,.2,1);
}
body.scrolled .nav { top: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 18px var(--display); letter-spacing: .02em; }
.brand svg { width: 26px; height: 26px; color: var(--accent); }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--ink-2); font-size: 14px; transition: color .2s; }
.nav-links a:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px;
  font: 500 15px var(--body); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .2s, box-shadow .3s, background .3s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #6aa8ff 60%, var(--accent-2)); color: #031018; font-weight: 600; box-shadow: 0 10px 40px -10px rgba(79, 227, 255, .6); }
.btn-primary:hover { box-shadow: 0 14px 50px -8px rgba(79, 227, 255, .8); }
.btn-ghost { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.16); color: var(--ink); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255,255,255,.09); }

/* HUD */
.hud {
  position: fixed; z-index: 5; right: max(24px, calc((100vw - 1180px) / 2)); bottom: calc(6vh + 24px);
  font: 500 11px/1.9 var(--mono); color: var(--ink-2); letter-spacing: .06em; text-align: right; text-transform: uppercase;
  transition: bottom 1.2s cubic-bezier(.7,0,.2,1), opacity .6s;
}
body.scrolled .hud { bottom: 24px; }
body.at-end .hud { opacity: 0; }
.hud-row { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #3dff9e; box-shadow: 0 0 10px #3dff9e; }
.dot.live { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Seções */
main { position: relative; z-index: 3; }
section { min-height: 100vh; display: flex; align-items: center; padding: 0 max(24px, calc((100vw - 1180px) / 2)); }
.hero { flex-direction: column; justify-content: flex-end; align-items: flex-start; padding-bottom: calc(6vh + 72px); min-height: 100svh; }
.eyebrow { font: 500 12px var(--mono); letter-spacing: .28em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
.title {
  font: 600 clamp(44px, 8.2vw, 116px)/.95 var(--display); letter-spacing: -.035em; margin: 0 0 22px;
  text-shadow: 0 10px 60px rgba(0,0,0,.6);
}
.title em { font-style: normal; background: linear-gradient(100deg, #fff 10%, var(--accent) 55%, var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 560px; font-size: clamp(16px, 1.6vw, 19px); color: var(--ink-2); margin: 0 0 32px; text-shadow: 0 2px 20px rgba(0,0,0,.8); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.scroll-cue { margin-top: 56px; display: flex; align-items: center; gap: 12px; font: 400 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); }
.scroll-cue span { width: 1px; height: 38px; background: linear-gradient(var(--accent), transparent); animation: cue 2s infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

.chapter { min-height: 130vh; }
.chapter.right { justify-content: flex-end; }
.glass { background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(18px) saturate(150%); border-radius: var(--radius); box-shadow: 0 30px 80px -30px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.05); }
.card {
  max-width: 470px; padding: 32px 32px 30px; opacity: 0; transform: translateY(40px) scale(.98); filter: blur(6px);
  transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1), filter 1s;
}
.card.in { opacity: 1; transform: none; filter: none; }
.chip { display: inline-block; font: 500 11px var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); padding: 6px 10px; border: 1px solid rgba(79,227,255,.3); border-radius: 999px; background: rgba(79,227,255,.06); }
.chip.warn { color: var(--warn); border-color: rgba(255,181,71,.35); background: rgba(255,181,71,.07); }
.card h2 { font: 600 clamp(26px, 3vw, 36px)/1.1 var(--display); letter-spacing: -.02em; margin: 18px 0 12px; }
.card p { color: var(--ink-2); margin: 0; }
.facts { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 0; margin: 24px 0 0; }
.facts li { padding: 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); }
.facts b { display: block; font: 600 22px var(--display); color: var(--ink); }
.facts span { font-size: 12px; color: var(--ink-3); line-height: 1.3; display: block; }

.how { flex-direction: column; justify-content: center; padding-top: 120px; padding-bottom: 0; background: linear-gradient(180deg, transparent, rgba(5,7,11,.86) 18%, var(--bg) 40%); }
.how-inner { width: 100%; }
.how-title { font: 600 clamp(32px, 4.4vw, 56px)/1.05 var(--display); letter-spacing: -.03em; margin: 0 0 40px; max-width: 700px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.steps li { padding: 28px; position: relative; counter-increment: s; }
.steps li::after { content: "0" counter(s); position: absolute; top: 22px; right: 24px; font: 500 12px var(--mono); color: var(--ink-3); }
.steps svg { width: 34px; height: 34px; color: var(--accent); }
.steps h3 { font: 600 20px var(--display); margin: 16px 0 8px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 15px; }
.final { margin-top: 18px; padding: 28px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: linear-gradient(120deg, rgba(79,227,255,.10), rgba(138,123,255,.08)); }
.final h3 { font: 600 22px var(--display); margin: 0 0 6px; }
.final p { margin: 0; color: var(--ink-2); max-width: 620px; }
.foot { width: 100%; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 56px 0 32px; color: var(--ink-3); font-size: 13px; border-top: 1px solid rgba(255,255,255,.06); margin-top: 72px; }
.noscript { position: fixed; inset: auto 0 0; z-index: 60; padding: 16px; text-align: center; background: #111; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav .btn { margin-left: auto; height: 38px; padding: 0 16px; font-size: 14px; }
  .steps { grid-template-columns: 1fr; }
  .final { flex-direction: column; align-items: flex-start; }
  .chapter, .chapter.right { justify-content: center; align-items: flex-end; padding-bottom: 14vh; }
  .card { padding: 24px; }
  .hud { display: none; }
  .facts b { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .dot.live, .scroll-cue span { animation: none; }
  .card { transition: none; }
}
