:root {
  --bg: #041c26;
  --ink: #f3f7f8;
  --muted: #86a0ab;
  --line: rgba(190, 225, 236, .13);
  --brand: #d40000;
  --accent: #ff5a4f;
  --display: "Urbanist", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- capas fijas ---------- */
#stage { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.glow {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60vmax 60vmax at 72% 48%, rgba(26, 127, 156, .26), transparent 62%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 88px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 88px 100%;
  -webkit-mask-image: radial-gradient(120vmax 90vmax at 60% 50%, #000 20%, transparent 75%);
          mask-image: radial-gradient(120vmax 90vmax at 60% 50%, #000 20%, transparent 75%);
  opacity: .55;
  transition: background 1.2s ease;
}

.top {
  position: fixed; z-index: 5; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px clamp(20px, 5vw, 64px);
  font-family: var(--mono); font-size: 13px; letter-spacing: .04em;
}
.brand { color: var(--ink); text-decoration: none; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.brand em { font-style: normal; font-weight: 400; color: var(--muted); }
.brand i { width: 10px; height: 10px; border-radius: 2px; background: var(--brand); transition: background .8s, box-shadow .8s; }
.chapter { display: flex; gap: 12px; color: var(--muted); text-transform: uppercase; }
.chapter b { color: var(--accent); transition: color .8s; }

.dots {
  position: fixed; z-index: 5; right: clamp(14px, 2.2vw, 30px); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px;
}
.dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--muted);
  background: transparent; cursor: pointer; padding: 0; transition: all .4s;
}
.dots button.on { background: var(--accent); border-color: var(--accent); transform: scale(1.5); }

.hint {
  position: fixed; z-index: 5; left: clamp(20px, 5vw, 64px); bottom: 22px;
  font-family: var(--mono); font-size: 12px; color: var(--muted); transition: opacity .6s;
}
kbd { border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; font-family: inherit; }

/* ---------- etiquetas 3D ---------- */
.tags { position: fixed; inset: 0; z-index: 3; pointer-events: none; }
.tag {
  --c: var(--ink);
  position: absolute; left: 0; top: 0; opacity: 0; white-space: nowrap; will-change: transform, opacity;
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--c); padding: 5px 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(4, 28, 38, .82);
}
.tag-left { border: 0; background: none; padding: 0 44px 0 0; }
.tag-left::after { content: ""; position: absolute; right: 0; top: 50%; width: 34px; height: 1px; background: var(--c); }
.tag-core { color: var(--bg); background: var(--ink); border-color: var(--ink); }

.link { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; opacity: 0; }
.link path { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-dasharray: 1; stroke-linejoin: round; }
.link circle { fill: var(--accent); transition: opacity .3s; }

/* ---------- escenas ---------- */
main { position: relative; z-index: 2; }
.scene { height: 170vh; position: relative; }
.stick {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; align-items: center;
  padding: 90px clamp(20px, 7vw, 110px) 70px;
  pointer-events: none; will-change: opacity, transform;
}
.copy { max-width: 560px; }
.copy > * + * { margin-top: 22px; }
.copy-center { max-width: 760px; margin: 0 auto; text-align: center; }
.stick-duo { flex-direction: column; justify-content: space-between; }
.stick-end { align-items: flex-end; padding-bottom: 9vh; }

.eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
h1, h2 { font-weight: 700; line-height: 1.06; letter-spacing: -.022em; text-wrap: balance; }
h1 { font-size: clamp(36px, 4.3vw, 62px); }
h2 { font-size: clamp(32px, 3.8vw, 54px); }
.lead { font-size: clamp(17px, 1.45vw, 21px); line-height: 1.5; color: #bcd0d7; font-weight: 400; }
.note { font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 14px; }

.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.wi { display: inline-block; transform: translateY(115%); will-change: transform; }
.rise { opacity: 0; }

.list { list-style: none; }
.list li { display: flex; gap: 16px; align-items: baseline; padding: 15px 0; border-top: 1px solid var(--line); font-size: clamp(17px, 1.45vw, 21px); line-height: 1.35; }
.list li:last-child { border-bottom: 1px solid var(--line); }
.list i { font-style: normal; font-family: var(--mono); font-size: 14px; color: var(--accent); min-width: 22px; }

.num {
  font-family: var(--mono); font-size: clamp(56px, 6vw, 88px); font-weight: 500; line-height: 1; letter-spacing: -.04em;
  color: var(--accent);
}
.num + h2 { margin-top: 10px; width: fit-content; }

.btn {
  display: inline-flex; align-items: center; gap: 12px; pointer-events: auto;
  background: var(--ink); color: var(--bg); text-decoration: none; font-weight: 500; font-size: 16px;
  padding: 15px 24px; border-radius: 10px; transition: background .3s, transform .3s;
}
.btn:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }
.btn span { font-family: var(--mono); }

.duo { width: 100%; display: flex; justify-content: space-between; gap: 24px; }
.card {
  width: min(340px, 44%); padding: 26px; border: 1px solid var(--line); border-radius: 18px;
  background: rgba(9, 44, 58, .72); backdrop-filter: blur(8px);
}
.card h3 { font-size: 24px; font-weight: 700; letter-spacing: -.015em; margin-bottom: 10px; color: var(--ink); }
.card p { color: #bcd0d7; line-height: 1.5; font-size: 17px; }

/* ---------- móvil: el objeto queda de fondo ---------- */
@media (max-width: 820px) {
  #stage { opacity: .38; }
  .tags, .hint { display: none; }
  .stick { padding: 80px 22px 50px; }
  .duo { flex-direction: column; }
  .card { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .wi { transform: none; }
  .rise { opacity: 1; }
}

/* modo captura (?og) para generar preview.jpg */
.og .hint, .og .dots, .og .chapter, .og .btn { display: none; }
