:root {
  --bg: #0B0F19;
  --surface: #20294B;
  --border: #344999;
  --action: #436ACD;
  --route: #5E8ADB;
  --accent: #98BFFF;
  --soft: #C4DCFF;
  --text: #E6F0FF;
  --amber: #FFB020;
  --expo: cubic-bezier(.16, 1, .3, 1);
  --glow: 0 0 0 1px rgba(67, 106, 205, .45), 0 24px 70px -24px rgba(67, 106, 205, .65);
  --gutter: clamp(20px, 5vw, 72px);
  --nav: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav) + 20px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
h1, h2, h3, p, ol { margin: 0; padding: 0; }
ol { list-style: none; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h2 { font-size: clamp(32px, 6vw, 60px); line-height: 1.05; letter-spacing: -.03em; font-weight: 700; text-wrap: balance; }
[hidden] { display: none !important; }

.spark { color: var(--accent); }
.skip { position: fixed; left: 12px; top: -60px; z-index: 30; padding: 10px 16px; background: var(--surface); border-radius: 10px; }
.skip:focus { top: 10px; }

/* Navegación */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 20; height: var(--nav);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 clamp(16px, 5vw, 72px);
  background: rgba(11, 15, 25, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(52, 73, 153, .4);
}
.wordmark { font-size: 13px; font-weight: 700; letter-spacing: .24em; white-space: nowrap; }
.nav nav { display: flex; gap: clamp(2px, 2vw, 24px); }
.nav nav a { padding: 10px 5px; font-size: 13px; font-weight: 500; color: var(--soft); transition: color .2s; }
.nav nav a.active { color: var(--accent); }
@media (hover: hover) { .nav nav a:hover { color: var(--text); } }

/* Hero */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: flex; align-items: center;
  padding: calc(var(--nav) + 32px) var(--gutter) 48px;
}
.hero-copy { position: relative; z-index: 1; max-width: 860px; }
.hero-mark { font-size: 15px; font-weight: 600; letter-spacing: .34em; margin-bottom: 24px; color: var(--soft); }
h1 { font-size: clamp(44px, 9vw, 104px); line-height: 1; letter-spacing: -.04em; font-weight: 700; }
.word { display: inline-block; white-space: pre; }
.char { opacity: 0; }
.char.on { opacity: 1; }
.caret { display: inline-block; width: 0; position: relative; }
.caret::after {
  content: ""; position: absolute; left: 4px; bottom: -.08em; width: .06em; height: .92em;
  background: var(--accent); box-shadow: 0 0 14px var(--action); animation: blink 1s steps(2) infinite;
}
.lead { margin: 24px 0 36px; max-width: 34em; font-size: clamp(17px, 2vw, 21px); line-height: 1.5; color: var(--soft); }

.orbit {
  position: absolute; top: 30%; right: -46vw; width: min(120vw, 780px); aspect-ratio: 1;
  margin-top: calc(min(120vw, 780px) / -2); perspective: 1100px; opacity: .55;
}
.orbit-tilt { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(62deg) rotateZ(14deg); }
.ring { position: absolute; border-radius: 50%; border: 1.5px solid var(--border); box-shadow: 0 0 34px -8px var(--action); }
.r1 { inset: 0; border-style: dashed; border-color: var(--route); animation: spin 46s linear infinite; }
.r2 { inset: 13%; animation: spin3d 30s linear infinite; }
.r3 { inset: 28%; border-color: var(--accent); animation: spin3d 22s linear infinite reverse; }
.orbit-spark {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: clamp(48px, 9vw, 78px); font-weight: 400; color: var(--accent);
  text-shadow: 0 0 32px var(--action);
  transform: rotateZ(-14deg) rotateX(-62deg);
}
@media (min-width: 900px) { .orbit { top: 50%; right: -6vw; opacity: .9; } }

/* Botones y pastillas */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 24px; border-radius: 14px;
  font-size: 16px; font-weight: 600; line-height: 1.25; text-align: center;
  transition: transform .4s var(--expo), box-shadow .4s var(--expo), border-color .2s;
}
.btn-primary { background: var(--accent); color: var(--bg); box-shadow: 0 10px 40px -12px var(--action); }
.btn-secondary { background: var(--surface); border: 1px solid var(--border); }
.btn:active { transform: scale(.97); }
@media (hover: hover) {
  .btn:hover { transform: translateY(-2px); box-shadow: var(--glow); }
  .btn-secondary:hover { border-color: var(--accent); }
}
.btn.off { opacity: 1; color: var(--soft); pointer-events: none; }

.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: 14px; font-weight: 600;
}
.pill-quiet { background: transparent; color: var(--soft); border-style: dashed; border-color: var(--route); }
.measure { color: var(--amber); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.link { color: var(--accent); font-weight: 600; font-size: 16px; padding: 10px 0; }

/* Secciones */
.section { padding: clamp(72px, 12vw, 150px) var(--gutter); max-width: 1320px; margin: 0 auto; }
.piece-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 520px; margin: 0 auto 24px; }
.piece-body { display: grid; gap: 32px; justify-items: center; }
.piece-info { width: 100%; max-width: 520px; }
.piece-info h2 { margin-bottom: 16px; }
.piece-extra .piece-info h2 { font-size: clamp(26px, 4vw, 40px); }
.piece-info p { color: var(--soft); margin-bottom: 28px; }

.player {
  position: relative; width: 100%; aspect-ratio: 9 / 16; overflow: hidden;
  border-radius: 24px; background: var(--surface); box-shadow: var(--glow);
}
.player-main { max-width: min(100%, 440px, calc((100svh - 130px) * 9 / 16)); }
.player-small { max-width: min(78%, 330px); }
.player video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--bg); }
.player iframe, .deck iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.soon {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px;
  color: var(--soft); font-weight: 600;
}
.soon .spark { font-size: 32px; }


/* Enfoque */
#t-enfoque { margin-bottom: 40px; }
.focus { display: grid; gap: 32px; align-items: center; }
.ideas { display: grid; gap: 14px; }
.idea {
  display: flex; gap: 16px; padding: 24px; border-radius: 20px;
  background: rgba(32, 41, 75, .6); border: 1px solid rgba(52, 73, 153, .6);
}
.idea > .spark { font-size: 20px; line-height: 1.5; }
.idea h3 { font-size: 21px; line-height: 1.3; letter-spacing: -.015em; font-weight: 600; margin-bottom: 6px; }
.idea sup { color: var(--accent); font-size: .6em; margin-left: 2px; }
.idea p { color: var(--soft); }

.map { position: relative; width: min(100%, 340px); aspect-ratio: 1; margin: 0 auto; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.heat {
  position: absolute; inset: 22%; border-radius: 50%;
  background: radial-gradient(circle, #CD1C26 0, #FA9628 42%, #FFECA0 62%, transparent 72%);
  filter: blur(14px); opacity: .75; animation: beat 2.6s var(--expo) infinite;
}
.route, .route-dots { stroke-linecap: round; stroke-width: 3; }
.route { stroke: var(--bg); stroke-width: 6; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 2.2s cubic-bezier(.65, 0, .35, 1) .2s; }
.route-dots { stroke: var(--route); stroke-dasharray: 2 10; mask: none; }
.reveal.in .route { stroke-dashoffset: -1; }
.map-ring { stroke: var(--accent); stroke-width: 2; }
.cross { stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }

@media (min-width: 900px) {
  .focus { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; }
  .map { width: 100%; max-width: 420px; }
}

/* Presentación */
.deck-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 28px; }
.deck {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 20px; background: var(--surface); box-shadow: var(--glow);
}
.actions { display: grid; gap: 12px; margin-top: 28px; }
@media (min-width: 900px) { .actions { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; } }

/* Footer */
.footer { padding: 40px var(--gutter) calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(52, 73, 153, .4); text-align: center; }
.footer p { font-weight: 600; margin-bottom: 8px; }
.footer small { font-size: 13px; color: var(--soft); }

/* Entradas */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--expo), transform .9s var(--expo); }
.js .reveal.in { opacity: 1; transform: none; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin3d { from { transform: rotateY(0) rotateZ(0); } to { transform: rotateY(360deg) rotateZ(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes beat { 0%, 100% { transform: scale(.92); opacity: .6; } 30% { transform: scale(1.06); opacity: .85; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .route { stroke-dashoffset: -1; }
}
