/* =========================================================
   Diquej — estilos globales
   ========================================================= */
:root {
  --bg: #020814;
  --bg-2: #04101f;
  --deep: #061a33;
  --surface: rgba(10, 32, 60, 0.55);
  --surface-solid: #0a2038;
  --line: rgba(120, 200, 255, 0.12);
  --line-strong: rgba(120, 200, 255, 0.28);
  --text: #eaf6ff;
  --muted: #93b3cc;
  --faint: #5f7d96;
  --cyan: #3fd0ff;
  --blue: #1e7bff;
  --violet: #8b5cff;
  --gold: #f5c542;
  --radius: 22px;
  --max: 1180px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  font-family: var(--font-body);
  background: transparent;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.02em; line-height: 1.1; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* ---------- Fondo tecnológico vivo (toda la web) ---------- */
.fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: radial-gradient(ellipse at 50% -10%, #0a2348 0%, var(--bg) 55%); }
.aurora { position: absolute; border-radius: 50%; filter: blur(90px); mix-blend-mode: screen; will-change: transform; }
.a1 { width: 62vmax; height: 62vmax; top: -24vmax; left: -18vmax; background: radial-gradient(circle, rgba(30, 123, 255, .55), transparent 65%); animation: drift1 28s ease-in-out infinite alternate; }
.a2 { width: 58vmax; height: 58vmax; bottom: -26vmax; right: -20vmax; background: radial-gradient(circle, rgba(139, 92, 255, .45), transparent 65%); animation: drift2 34s ease-in-out infinite alternate; }
.a3 { width: 42vmax; height: 42vmax; top: 32%; left: 38%; background: radial-gradient(circle, rgba(0, 212, 255, .28), transparent 65%); animation: drift3 40s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vw, 22vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-22vw, -18vh) scale(1.2); } }
@keyframes drift3 { 0% { transform: translate(-20vw, -10vh); } 100% { transform: translate(15vw, 20vh) scale(1.3); } }
.fx-grid {
  position: absolute; left: -50%; right: -50%; bottom: -10%; height: 70%;
  background-image:
    linear-gradient(rgba(63, 208, 255, .13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 208, 255, .13) 1px, transparent 1px);
  background-size: 72px 72px;
  transform: perspective(520px) rotateX(64deg); transform-origin: 50% 100%;
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,.9), transparent 75%);
  mask-image: linear-gradient(to top, rgba(0,0,0,.9), transparent 75%);
  animation: gridrun 5s linear infinite;
}
@keyframes gridrun { to { background-position: 0 72px, 0 0; } }
#net { position: absolute; inset: 0; width: 100%; height: 100%; }
.theme-gold .a1 { background: radial-gradient(circle, rgba(245, 197, 66, .35), transparent 65%); }
.theme-gold .a2 { background: radial-gradient(circle, rgba(200, 120, 20, .32), transparent 65%); }
.theme-gold .a3 { background: radial-gradient(circle, rgba(255, 220, 120, .18), transparent 65%); }
.theme-gold .fx { background: radial-gradient(ellipse at 50% -10%, #2a1d04 0%, #050402 55%); }
.theme-gold .fx-grid { background-image: linear-gradient(rgba(245, 197, 66, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(245, 197, 66, .12) 1px, transparent 1px); }
body:has(.legal) .fx-grid { display: none; }
body:has(.legal) #net { opacity: .45; }

/* Línea de luz que separa secciones */
main > section + section::before, .ocean-band + section::before {
  content: ""; position: absolute; top: 0; left: 50%; translate: -50% 0; width: min(900px, 80%); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(63, 208, 255, .45), transparent);
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.top.scrolled { background: rgba(2, 8, 20, 0.78); backdrop-filter: blur(14px); border-color: var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-family: var(--font-head); font-weight: 700; letter-spacing: 0.22em; font-size: 1rem; }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 0 22px rgba(63, 208, 255, .45); }
.nav { display: flex; align-items: center; gap: 26px; font-size: 0.94rem; }
.nav a { color: var(--muted); transition: color .2s; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav .btn { padding: 9px 18px; font-size: .9rem; }
.menu-btn { display: none; background: none; border: 1px solid var(--line-strong); color: var(--text); border-radius: 12px; width: 42px; height: 42px; font-size: 1.2rem; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; font-weight: 600; font-size: 0.98rem;
  border: 1px solid var(--line-strong); color: var(--text); background: rgba(10, 32, 60, .6);
  backdrop-filter: blur(8px);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s;
  cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); border-color: rgba(120, 200, 255, .5); }
.btn.primary {
  background: linear-gradient(120deg, var(--cyan), var(--blue) 60%, var(--violet));
  border: none; color: #fff;
  box-shadow: 0 10px 40px rgba(30, 123, 255, .45), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn.primary:hover { box-shadow: 0 14px 50px rgba(63, 208, 255, .55), inset 0 1px 0 rgba(255,255,255,.3); }
.btn.gold { background: linear-gradient(120deg, #ffe08a, var(--gold) 50%, #c8901a); color: #1b1200; border: none; box-shadow: 0 10px 40px rgba(245, 197, 66, .35); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; overflow: hidden;
  padding: 110px 0 80px;
}
#scene, .scene-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 160px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(2, 8, 20, .35));
}
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan);
  padding: 7px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(4, 16, 31, .5);
  backdrop-filter: blur(6px); margin-bottom: 26px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.7rem); font-weight: 700; line-height: 1.08; }
.grad {
  background: linear-gradient(100deg, #fff 10%, var(--cyan) 45%, var(--violet) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { margin-top: 24px; font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 54ch; }
.actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 14px; }
.stats { margin-top: 48px; display: flex; flex-wrap: wrap; gap: 36px; }
.stats div { font-family: var(--font-head); }
.stats b { display: block; font-size: 1.7rem; color: var(--text); }
.stats span { font-size: .85rem; color: var(--faint); font-family: var(--font-body); }

/* Logo flotante 3D */
.logo-stage { perspective: 1000px; display: flex; justify-content: center; }
.logo-3d {
  position: relative; width: min(380px, 78vw); aspect-ratio: 1;
  transform-style: preserve-3d; transition: transform .15s linear;
  animation: float 7s ease-in-out infinite;
}
.logo-3d img {
  width: 100%; height: 100%; border-radius: 26%;
  object-fit: cover;
  box-shadow: 0 0 80px rgba(63, 208, 255, .45), 0 40px 80px rgba(0, 0, 0, .6);
  transform: translateZ(40px);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 62%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 50%, #000 62%, transparent 72%);
}
.logo-3d .halo {
  position: absolute; inset: -14%; border-radius: 50%;
  background: radial-gradient(circle, rgba(63, 208, 255, .35), transparent 62%);
  filter: blur(20px); transform: translateZ(-60px);
}
@keyframes float { 0%, 100% { translate: 0 -10px; } 50% { translate: 0 12px; } }

.scroll-hint { position: absolute; left: 50%; bottom: 28px; z-index: 3; translate: -50% 0; color: var(--faint); font-size: .75rem; letter-spacing: .2em; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.scroll-hint i { width: 1px; height: 38px; background: linear-gradient(var(--cyan), transparent); animation: drip 2s infinite; }
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---------- Sections ---------- */
section { position: relative; padding: 110px 0; }
.kicker { font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); margin-bottom: 14px; display: block; }
.section-title { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 700; margin-bottom: 16px; max-width: 20ch; }
.section-sub { color: var(--muted); margin-bottom: 52px; max-width: 62ch; font-size: 1.08rem; }

.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Tarjetas con tilt 3D */
.card {
  position: relative; border-radius: var(--radius); padding: 32px;
  background: linear-gradient(160deg, rgba(14, 44, 80, .7), rgba(4, 14, 28, .85));
  border: 1px solid var(--line);
  transform-style: preserve-3d; transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0));
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
  overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(63, 208, 255, .16), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.card:hover { border-color: var(--line-strong); box-shadow: 0 30px 60px rgba(0, 0, 0, .45); }
.card:hover::before { opacity: 1; }
.card > * { transform: translateZ(28px); }
.card h3 { font-size: 1.35rem; margin: 18px 0 10px; }
.card p { color: var(--muted); }
.icon {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(63, 208, 255, .22), rgba(139, 92, 255, .2));
  border: 1px solid var(--line-strong);
}
.icon svg { width: 26px; height: 26px; stroke: var(--cyan); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; padding: 5px 11px; border-radius: 999px; font-weight: 600; letter-spacing: .02em; }
.tag.live { background: rgba(46, 230, 140, .12); color: #4ff0a0; border: 1px solid rgba(46, 230, 140, .25); }
.tag.soon { background: rgba(245, 197, 66, .1); color: var(--gold); border: 1px solid rgba(245, 197, 66, .25); }
.tag.blue { background: rgba(63, 208, 255, .1); color: var(--cyan); border: 1px solid var(--line-strong); }

/* ---------- Proyectos ---------- */
.project {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 0; align-items: stretch;
  border-radius: 28px; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(14, 44, 80, .6), rgba(4, 14, 28, .9));
  margin-bottom: 32px;
}
.project.reverse { grid-template-columns: 1.1fr 1fr; }
.project.reverse .project-media { order: 2; }
.project-media { position: relative; min-height: 360px; overflow: hidden; }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.project:hover .project-media img { transform: scale(1.05); }
.project-body { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.project-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.project-head img { width: 64px; height: 64px; border-radius: 18px; }
.project-head h3 { font-size: 2rem; }
.project-body p { color: var(--muted); margin-bottom: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chips span { font-size: .8rem; color: var(--muted); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(4, 16, 31, .5); }
.project .actions { margin-top: 0; }
.project.gold { background: linear-gradient(160deg, rgba(60, 42, 6, .55), rgba(10, 8, 2, .92)); border-color: rgba(245, 197, 66, .2); }
.project.gold .chips span { border-color: rgba(245, 197, 66, .2); }
.project.gold .kicker { color: var(--gold); }

/* ---------- Banda océano (parallax) ---------- */
.ocean-band { position: relative; padding: 170px 0; overflow: hidden; }
.ocean-band .bg {
  position: absolute; top: -20%; bottom: -20%; left: -6%; width: 150%;
  background: url("/img/ocean.webp") center / cover no-repeat;
  will-change: transform; filter: saturate(1.1);
}
.ocean-band::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, rgba(2, 8, 20, .92) 0%, rgba(2, 8, 20, .6) 38%, transparent 62%),
    linear-gradient(180deg, var(--bg) 0%, transparent 25%, transparent 75%, var(--bg) 100%);
}
.ocean-band .wrap { position: relative; z-index: 2; }
.ocean-band h2 { font-size: clamp(2.2rem, 5vw, 4rem); max-width: 14ch; text-shadow: 0 10px 40px rgba(0, 0, 0, .7); }
.ocean-band p { margin-top: 20px; max-width: 46ch; color: #cfe6f7; text-shadow: 0 4px 20px rgba(0, 0, 0, .8); font-size: 1.1rem; }
@media (max-width: 720px) {
  .ocean-band .bg { left: -40%; width: 220%; }
  .ocean-band::before { background: linear-gradient(180deg, var(--bg) 0%, rgba(2, 8, 20, .75) 30%, rgba(2, 8, 20, .75) 70%, var(--bg) 100%); }
}

/* ---------- Sección "Lo profundo" ---------- */
.deep { position: relative; min-height: 100vh; min-height: 100svh; padding: 140px 0 120px; overflow: hidden; display: flex; align-items: center; isolation: isolate; }
.deep-bg { position: absolute; inset: 0; z-index: -5; overflow: hidden; }
.deep-img {
  position: absolute; top: -12%; bottom: -12%; left: -6%; width: 150%;
  background: url("/img/ocean.webp") center / cover no-repeat;
  transform: scale(var(--zoom, 1.25)) translate3d(var(--px, 0), var(--py, 0), 0);
  transform-origin: 69% 50%; will-change: transform; filter: saturate(1.25) contrast(1.05);
}
.deep-caustics { position: absolute; inset: 0; z-index: -4; width: 100%; height: 100%; mix-blend-mode: screen; opacity: .22; pointer-events: none; }
.deep-rays { position: absolute; inset: -10% 0 0; z-index: -3; pointer-events: none; mix-blend-mode: screen; }
.deep-rays i {
  position: absolute; top: -20%; width: 9vw; height: 130%;
  background: linear-gradient(180deg, rgba(160, 230, 255, .5), rgba(63, 208, 255, .12) 45%, transparent 80%);
  filter: blur(14px); transform-origin: 50% 0; animation: ray 9s ease-in-out infinite;
}
.deep-rays i:nth-child(1) { left: 48%; transform: rotate(14deg); animation-delay: 0s; }
.deep-rays i:nth-child(2) { left: 58%; width: 5vw; transform: rotate(8deg); animation-delay: -2s; }
.deep-rays i:nth-child(3) { left: 66%; width: 12vw; transform: rotate(2deg); animation-delay: -4s; }
.deep-rays i:nth-child(4) { left: 76%; width: 6vw; transform: rotate(-6deg); animation-delay: -6s; }
.deep-rays i:nth-child(5) { left: 86%; width: 8vw; transform: rotate(-12deg); animation-delay: -3s; }
@keyframes ray { 0%, 100% { opacity: .25; } 50% { opacity: .85; } }
.deep-bubbles { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.deep-bubbles span {
  position: absolute; bottom: -40px; border-radius: 50%;
  border: 1px solid rgba(190, 240, 255, .65); background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .7), rgba(120, 220, 255, .08) 40%, transparent 70%);
  animation: bubble linear infinite;
}
@keyframes bubble {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: .9; }
  50% { transform: translate(18px, -55vh); }
  100% { transform: translate(-12px, -115vh); opacity: 0; }
}
.deep-sonar { position: absolute; left: 69%; top: 50%; z-index: -2; pointer-events: none; }
.deep-sonar i {
  position: absolute; left: 0; top: 0; width: 24vmin; height: 24vmin; margin: -12vmin 0 0 -12vmin; border-radius: 50%;
  border: 2px solid rgba(63, 208, 255, .8); box-shadow: 0 0 30px rgba(63, 208, 255, .6), inset 0 0 30px rgba(63, 208, 255, .35);
  animation: sonar 4.5s cubic-bezier(.2, .6, .3, 1) infinite;
}
.deep-sonar i:nth-child(2) { animation-delay: 1.5s; }
.deep-sonar i:nth-child(3) { animation-delay: 3s; }
@keyframes sonar { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(3.4); opacity: 0; } }
.deep-shade {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(2, 8, 20, .94) 0%, rgba(2, 8, 20, .7) 34%, rgba(2, 8, 20, .1) 60%, transparent 75%),
    linear-gradient(180deg, rgba(2, 8, 20, .9) 0%, transparent 18%, transparent 82%, rgba(2, 8, 20, .9) 100%);
}
.deep-content { position: relative; }
.deep-kicker { opacity: 0; transform: translateY(20px); transition: all .8s var(--ease); }
.deep-title { font-size: clamp(2.6rem, 6.6vw, 5.6rem); line-height: 1.02; max-width: 12ch; text-shadow: 0 12px 50px rgba(0, 0, 0, .6); }
.deep-title .w { display: inline-block; opacity: 0; transform: translateY(60px) rotateX(-50deg); transform-origin: 50% 100%; filter: blur(8px); transition: opacity .9s var(--ease), transform .9s var(--ease), filter .9s var(--ease); }
.deep-title .shine {
  background: linear-gradient(100deg, var(--cyan) 0%, #fff 20%, var(--cyan) 40%, var(--violet) 70%, var(--cyan) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s linear infinite; text-shadow: none; filter: drop-shadow(0 0 28px rgba(63, 208, 255, .45));
}
@keyframes shine { to { background-position: -250% 0; } }
.deep-lead { margin-top: 26px; max-width: 46ch; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #d4ebfa; opacity: 0; transform: translateY(24px); transition: all .9s var(--ease) .5s; }
.deep-steps { margin-top: 54px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-width: 760px; }
.deep-step {
  position: relative; padding: 24px 22px; border-radius: 20px;
  background: rgba(4, 18, 36, .55); border: 1px solid rgba(120, 200, 255, .22); backdrop-filter: blur(12px);
  transform: perspective(800px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(30px); opacity: 0;
  transition: transform .3s var(--ease), opacity .9s var(--ease), border-color .3s;
  overflow: hidden;
}
.deep-step::after { content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 100%; background: linear-gradient(90deg, var(--cyan), var(--violet)); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease); }
.deep-step:hover { border-color: rgba(120, 200, 255, .5); }
.ds-n { font-family: var(--font-head); font-size: .85rem; letter-spacing: .15em; color: var(--cyan); }
.deep-step h3 { font-size: 1.25rem; margin: 8px 0 8px; }
.deep-step p { color: var(--muted); font-size: .93rem; }
.deep.in .deep-kicker, .deep.in .deep-lead { opacity: 1; transform: none; }
.deep.in .deep-title .w { opacity: 1; transform: none; filter: none; }
.deep.in .deep-title .w:nth-child(2) { transition-delay: .08s; } .deep.in .deep-title .w:nth-child(3) { transition-delay: .16s; }
.deep.in .deep-title .w:nth-child(4) { transition-delay: .24s; } .deep.in .deep-title .w:nth-child(5) { transition-delay: .34s; }
.deep.in .deep-step { opacity: 1; transform: perspective(800px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); }
.deep.in .deep-step:nth-child(1) { transition-delay: 0s, .7s, 0s; } .deep.in .deep-step:nth-child(2) { transition-delay: 0s, .85s, 0s; } .deep.in .deep-step:nth-child(3) { transition-delay: 0s, 1s, 0s; }
.deep.in .deep-step::after { transform: scaleX(1); transition-delay: 1.2s; }

.depth-gauge { position: absolute; left: max(14px, calc((100vw - var(--max)) / 2 - 70px)); top: 50%; translate: 0 -50%; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 12px; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; color: var(--cyan); }
.dg-label { writing-mode: vertical-rl; transform: rotate(180deg); font-size: .66rem; letter-spacing: .35em; opacity: .7; }
.dg-track { width: 2px; height: 180px; background: rgba(120, 200, 255, .18); border-radius: 2px; overflow: hidden; }
.dg-fill { width: 100%; height: 0; background: linear-gradient(var(--cyan), var(--violet)); box-shadow: 0 0 10px var(--cyan); }
.dg-value { font-size: .72rem; white-space: nowrap; }
.dg-value b { font-size: .95rem; color: #fff; }

.deep-bg, .deep-caustics, .deep-rays, .deep-shade {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 82%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 82%, transparent 100%);
}
@media (max-width: 1399px) { .depth-gauge { display: none; } }
@media (max-width: 960px) {
  .deep-steps { grid-template-columns: 1fr; max-width: 520px; }
}
@media (max-width: 720px) {
  .deep { display: block; padding: 0 0 90px; }
  .deep-img {
    left: -40%; width: 180%; top: 0; bottom: auto; height: 62vh; transform-origin: 50% 50%;
    -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent);
  }
  .deep-sonar { left: 50%; top: 31vh; }
  .deep-sonar i { width: 30vmin; height: 30vmin; margin: -15vmin 0 0 -15vmin; }
  .deep-shade { background: linear-gradient(180deg, rgba(2, 8, 20, .5) 0%, transparent 20%, transparent 40%, rgba(2, 8, 20, .7) 58%, rgba(2, 8, 20, .4) 100%); }
  .deep-content { padding-top: 56vh; }
  .deep-rays i { width: 16vw; }
}
@media (prefers-reduced-motion: reduce) {
  .deep-title .w, .deep-lead, .deep-kicker, .deep-step { opacity: 1 !important; transform: none !important; filter: none !important; }
}

/* ---------- Impresión 3D ---------- */
.print { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.print-stage { position: relative; aspect-ratio: 1; border-radius: 28px; overflow: hidden; border: 1px solid var(--line); background: radial-gradient(circle at 50% 70%, #0b2a4d, #020814 70%); }
.print-stage .readout { position: absolute; left: 20px; bottom: 18px; z-index: 2; font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .78rem; color: var(--cyan); opacity: .85; }
.print ul { list-style: none; margin: 26px 0 32px; display: grid; gap: 12px; }
.print li { display: flex; gap: 12px; color: var(--muted); }
.print li::before { content: ""; flex-shrink: 0; margin-top: 9px; width: 8px; height: 8px; border-radius: 2px; background: var(--gold); box-shadow: 0 0 10px var(--gold); }

/* ---------- Video ---------- */
.video {
  position: relative; aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden;
  border: 1px solid var(--line-strong); background: #000; cursor: pointer;
  box-shadow: 0 40px 100px rgba(30, 123, 255, .25);
}
.video img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .6s; filter: brightness(.8); }
.video:hover img { transform: scale(1.03); filter: brightness(.95); }
.video .play {
  position: absolute; inset: 0; margin: auto; width: 92px; height: 92px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(140deg, var(--cyan), var(--blue)); display: grid; place-items: center;
  box-shadow: 0 0 0 14px rgba(63, 208, 255, .18), 0 20px 50px rgba(0, 0, 0, .5);
  transition: transform .25s var(--ease);
}
.video:hover .play { transform: scale(1.08); }
.video .play svg { width: 34px; height: 34px; fill: #fff; margin-left: 5px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Galería ---------- */
.gallery { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 10px 20px 26px; margin: 0 -20px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.gallery img { flex: 0 0 min(78vw, 620px); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; scroll-snap-align: center; border: 1px solid var(--line); }

/* ---------- Carrusel 3D ---------- */
.carousel { position: relative; outline: none; }
.car-stage {
  position: relative; height: clamp(230px, 40vw, 470px);
  perspective: 1400px; transform-style: preserve-3d; overflow: hidden;
  touch-action: pan-y; user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.car-slide {
  position: absolute; left: 50%; top: 50%; width: min(64%, 760px); aspect-ratio: 16 / 9; margin: 0;
  border-radius: 22px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line-strong); background: #000;
  transition: transform .8s var(--ease), opacity .8s var(--ease), box-shadow .8s;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55);
}
.car-slide.active { cursor: default; box-shadow: 0 30px 90px rgba(30, 123, 255, .35), 0 0 0 1px rgba(120, 200, 255, .35); }
.theme-gold .car-slide.active { box-shadow: 0 30px 90px rgba(245, 197, 66, .3), 0 0 0 1px rgba(245, 197, 66, .4); }
.car-slide img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.car-btn {
  position: absolute; top: 50%; z-index: 30; translate: 0 -70%;
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: rgba(4, 16, 31, .75); border: 1px solid var(--line-strong); backdrop-filter: blur(8px);
  transition: transform .2s var(--ease), background .2s;
}
.car-btn:hover { transform: scale(1.08); background: rgba(10, 40, 75, .9); }
.car-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.car-btn.prev { left: 6px; } .car-btn.next { right: 6px; }
.car-dots { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.car-dots button { width: 9px; height: 9px; padding: 0; border-radius: 99px; border: none; cursor: pointer; background: var(--line-strong); transition: width .3s var(--ease), background .3s; }
.car-dots button.on { width: 28px; background: var(--cyan); }
.car-progress { width: 120px; height: 2px; margin: 14px auto 0; background: var(--line); border-radius: 2px; overflow: hidden; }
.car-progress i { display: block; height: 100%; width: 0; background: var(--cyan); }

/* Presentación en tarjetas de proyecto */
.project-media .slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.1s var(--ease); }
.project-media .slide-img.on { opacity: 1; animation: kenburns 7s ease-out both; }
@keyframes kenburns { from { transform: scale(1.12) translate(1.5%, 1%); } to { transform: scale(1) translate(0, 0); } }
.slide-dots { position: absolute; left: 50%; bottom: 16px; translate: -50% 0; z-index: 2; display: flex; gap: 6px; padding: 6px 10px; border-radius: 99px; background: rgba(2, 8, 20, .55); backdrop-filter: blur(6px); }
.slide-dots i { width: 6px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .35); transition: width .4s var(--ease), background .4s; }
.slide-dots i.on { width: 20px; background: #fff; }

/* Ventana de correo */
.mail-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(1, 4, 10, .72); backdrop-filter: blur(8px); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
.mail-modal.open { opacity: 1; pointer-events: auto; }
.mail-box { position: relative; width: min(440px, 100%); border-radius: 26px; padding: 34px 28px 28px; border: 1px solid var(--line-strong); background: linear-gradient(170deg, #0b2442, #040e1c); box-shadow: 0 40px 100px rgba(0, 0, 0, .6); transform: translateY(14px) scale(.97); transition: transform .3s var(--ease); }
.mail-modal.open .mail-box { transform: none; }
.mail-box h3 { font-size: 1.5rem; margin-bottom: 16px; }
.mail-x { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--muted); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.mail-x:hover { color: var(--text); border-color: var(--line-strong); }
.mail-meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .92rem; margin-bottom: 24px; padding: 14px 16px; border-radius: 14px; background: rgba(2, 8, 20, .5); border: 1px solid var(--line); }
.mail-meta dt { color: var(--faint); } .mail-meta dd { color: var(--text); word-break: break-word; }
.mail-opts { display: grid; gap: 10px; }
.mail-opts .btn { width: 100%; }

/* ---------- Contacto ---------- */
.contact { text-align: center; border-radius: 32px; padding: 80px 28px; border: 1px solid var(--line-strong); background: radial-gradient(circle at 50% 0%, rgba(30, 123, 255, .28), transparent 60%), linear-gradient(180deg, rgba(10, 32, 60, .6), rgba(2, 8, 20, .9)); }
.contact h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); margin-bottom: 14px; }
.contact p { color: var(--muted); max-width: 52ch; margin: 0 auto 32px; }
.contact .actions { justify-content: center; margin-top: 0; }

/* ---------- App page hero ---------- */
.app-hero { position: relative; padding: 150px 0 90px; overflow: hidden; }
.app-hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .35; filter: blur(2px) saturate(1.2); transform: scale(1.05); }
.app-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2, 8, 20, .55), transparent); }
.app-hero .bg { -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent); mask-image: linear-gradient(180deg, #000 50%, transparent); }
.theme-gold .app-hero::after { background: linear-gradient(180deg, rgba(5, 4, 2, .55), transparent); }
.app-hero .wrap { position: relative; z-index: 2; }
.app-title { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.app-title img { width: 104px; height: 104px; border-radius: 28px; box-shadow: 0 20px 60px rgba(63, 208, 255, .35); }
.app-title h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
.app-title .by { color: var(--muted); font-size: .95rem; margin-top: 6px; }
.store-badges { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.features { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.feature-emoji { font-size: 1.8rem; }

.theme-gold { --cyan: #f5c542; --line: rgba(245, 197, 66, .14); --line-strong: rgba(245, 197, 66, .32); }
.theme-gold .card { background: linear-gradient(160deg, rgba(60, 42, 6, .5), rgba(10, 8, 2, .9)); }
.theme-gold .app-title img { box-shadow: 0 20px 60px rgba(245, 197, 66, .3); }
.theme-gold .app-hero .bg { opacity: .22; filter: blur(7px) saturate(1.2); }
.theme-gold .logo-3d img { box-shadow: 0 0 80px rgba(245, 197, 66, .4), 0 40px 80px rgba(0, 0, 0, .6); -webkit-mask-image: none; mask-image: none; border-radius: 22%; }
.theme-gold .logo-3d .halo { background: radial-gradient(circle, rgba(245, 197, 66, .3), transparent 62%); }
.app-hero .logo-3d { width: min(320px, 70vw); }
.app-hero .logo-3d img { -webkit-mask-image: none; mask-image: none; border-radius: 24%; }

/* ---------- Legal ---------- */
.legal { padding: 140px 0 90px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal .updated { color: var(--faint); margin: 12px 0 40px; font-size: .92rem; }
.legal h2 { font-size: 1.3rem; margin: 40px 0 12px; }
.legal p, .legal li { color: var(--muted); }
.legal ul, .legal ol { padding-left: 22px; margin: 10px 0; }
.legal li { margin: 7px 0; }
.legal strong { color: var(--text); }
.legal .box { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 26px 28px; background: var(--surface); margin: 22px 0; }
.lang-switch { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--line-strong); margin-bottom: 26px; }
.lang-switch button { background: none; border: none; color: var(--muted); padding: 7px 16px; border-radius: 999px; cursor: pointer; font: inherit; font-size: .88rem; }
.lang-switch button[aria-pressed="true"] { background: var(--surface-solid); color: var(--text); }
[data-lang-block][hidden] { display: none; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 56px 0 40px; color: var(--faint); font-size: .9rem; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.foot h4 { color: var(--text); font-family: var(--font-head); font-size: .95rem; margin-bottom: 14px; }
.foot ul { list-style: none; display: grid; gap: 9px; }
.foot a { color: var(--muted); }
.foot .brand { margin-bottom: 14px; }
.copy { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .print, .project, .project.reverse { grid-template-columns: 1fr; }
  .project.reverse .project-media { order: 0; }
  .project-media { min-height: 240px; aspect-ratio: 16 / 9; }
  .project-body { padding: 32px 26px; }
  .logo-stage { order: -1; }
  .logo-3d { width: min(250px, 62vw); }
  .app-hero .logo-stage { display: none; }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .menu-btn { display: block; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(2, 8, 20, .96); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
    padding: 8px 20px 20px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 14px; border-bottom: none; }
  section { padding: 80px 0; }
  .hero { padding-top: 96px; }
  .stats { gap: 24px; }
  .ocean-band { padding: 110px 0; }
  .contact { padding: 56px 20px; }
  .foot { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Tema rojo (SEEN 03:33) ---------- */
.theme-red { --cyan: #ff3b4e; --violet: #b3122b; --line: rgba(255, 59, 78, .14); --line-strong: rgba(255, 59, 78, .34); }
.theme-red .fx { background: radial-gradient(ellipse at 50% -10%, #2a0409 0%, #060103 55%); }
.theme-red .a1 { background: radial-gradient(circle, rgba(255, 40, 70, .32), transparent 65%); }
.theme-red .a2 { background: radial-gradient(circle, rgba(140, 0, 30, .38), transparent 65%); }
.theme-red .a3 { background: radial-gradient(circle, rgba(255, 120, 120, .14), transparent 65%); }
.theme-red .fx-grid { background-image: linear-gradient(rgba(255, 59, 78, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 59, 78, .12) 1px, transparent 1px); }
.theme-red .card { background: linear-gradient(160deg, rgba(70, 6, 16, .5), rgba(12, 2, 4, .92)); }
.theme-red .app-title img { box-shadow: 0 20px 60px rgba(255, 40, 70, .35); }
.theme-red .app-hero .bg { opacity: .28; filter: blur(5px) saturate(1.2); }
.theme-red .app-hero::after { background: linear-gradient(180deg, rgba(6, 1, 3, .55), transparent); }
.theme-red .logo-3d img { box-shadow: 0 0 80px rgba(255, 40, 70, .45), 0 40px 80px rgba(0, 0, 0, .6); -webkit-mask-image: none; mask-image: none; border-radius: 22%; }
.theme-red .logo-3d .halo { background: radial-gradient(circle, rgba(255, 40, 70, .32), transparent 62%); }
.theme-red .car-slide.active { box-shadow: 0 30px 90px rgba(255, 40, 70, .3), 0 0 0 1px rgba(255, 59, 78, .4); }
.btn.red { background: linear-gradient(120deg, #ff6b78, #e5122d 55%, #8f0718); color: #fff; border: none; box-shadow: 0 10px 40px rgba(229, 18, 45, .4); }
.project.red { background: linear-gradient(160deg, rgba(70, 6, 16, .6), rgba(12, 2, 4, .94)); border-color: rgba(255, 59, 78, .22); }
.project.red .chips span { border-color: rgba(255, 59, 78, .22); }
.project.red .kicker { color: #ff5a6a; }
.glitch { position: relative; display: inline-block; color: #ff3b4e; text-shadow: 0 0 18px rgba(255, 40, 70, .55); }
.glitch::before, .glitch::after { content: attr(data-text); position: absolute; inset: 0; pointer-events: none; }
.glitch::before { color: #3fd0ff; animation: glitch 3.2s infinite steps(1); mix-blend-mode: screen; }
.glitch::after { color: #fff; animation: glitch 2.7s infinite reverse steps(1); opacity: .6; }
@keyframes glitch {
  0%, 86%, 95%, 100% { transform: none; clip-path: inset(0 0 100% 0); }
  88% { transform: translate(-3px, 1px); clip-path: inset(20% 0 50% 0); }
  90% { transform: translate(3px, -1px); clip-path: inset(60% 0 10% 0); }
  93% { transform: translate(-2px, 0); clip-path: inset(40% 0 35% 0); }
}

/* ---------- Tarjetas de servicios animadas ---------- */
.card.svc { padding: 0 0 30px; display: flex; flex-direction: column; }
.card.svc > :not(.viz) { margin-left: 30px; margin-right: 30px; }
.card.svc .tag { align-self: flex-start; }
.card.svc .icon { margin-top: -27px; position: relative; z-index: 2; background: linear-gradient(140deg, #0b2a4d, #1b1446); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.viz { position: relative; height: 190px; overflow: hidden; transform: none !important; border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 50% 60%, rgba(63, 208, 255, .16), transparent 60%), linear-gradient(180deg, rgba(4, 20, 40, .9), rgba(3, 10, 22, .6)); }
.viz::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(63, 208, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(63, 208, 255, .07) 1px, transparent 1px);
  background-size: 22px 22px; -webkit-mask-image: linear-gradient(transparent, #000 40%, transparent); mask-image: linear-gradient(transparent, #000 40%, transparent); }
.card.svc:hover .viz { background-color: rgba(10, 40, 70, .5); }

/* Apps: teléfono con iconos en órbita */
.viz-apps .phone { position: absolute; left: 50%; top: 50%; width: 62px; height: 118px; translate: -50% -50%; border-radius: 14px;
  border: 2px solid rgba(160, 220, 255, .7); background: linear-gradient(170deg, #0e3a66, #060f22); box-shadow: 0 0 40px rgba(63, 208, 255, .45); z-index: 2; padding: 16px 8px; display: flex; flex-direction: column; gap: 7px; }
.viz-apps .phone i { position: absolute; top: 6px; left: 50%; width: 18px; height: 3px; translate: -50% 0; border-radius: 3px; background: rgba(160, 220, 255, .6); }
.viz-apps .phone b { display: block; height: 10px; border-radius: 4px; background: linear-gradient(90deg, var(--cyan), var(--violet)); opacity: .3; animation: bars 2.4s infinite; }
.viz-apps .phone b:nth-of-type(2) { width: 70%; animation-delay: .4s; }
.viz-apps .phone b:nth-of-type(3) { width: 85%; animation-delay: .8s; }
@keyframes bars { 50% { opacity: 1; } }
.viz-apps .ring { position: absolute; left: 50%; top: 50%; width: 230px; height: 90px; translate: -50% -50%; border-radius: 50%; border: 1px dashed rgba(63, 208, 255, .35); }
.viz-apps .orbit { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px; animation: orbit 9s linear infinite; }
.viz-apps .orbit img { width: 100%; height: 100%; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .6); }
.viz-apps .o2 { animation-delay: -3s; } .viz-apps .o3 { animation-delay: -6s; }
@keyframes orbit {
  0% { transform: translate(115px, 0) scale(.9); z-index: 3; }
  25% { transform: translate(0, 45px) scale(1.15); z-index: 3; }
  50% { transform: translate(-115px, 0) scale(.9); z-index: 1; }
  75% { transform: translate(0, -45px) scale(.65); z-index: 1; opacity: .55; }
  100% { transform: translate(115px, 0) scale(.9); z-index: 3; }
}

/* IA: red neuronal (canvas) */
.viz-ai canvas { width: 100%; height: 100%; display: block; }

/* Código: terminal que se escribe sola */
.viz-code { padding: 14px 16px; background: linear-gradient(180deg, rgba(3, 12, 26, .95), rgba(4, 18, 36, .8)); }
.term-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; position: relative; z-index: 1; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 8px; font-size: .72rem; color: var(--faint); font-family: ui-monospace, Consolas, monospace; }
.term { margin: 0; font: 500 .7rem/1.45 ui-monospace, "Cascadia Code", Consolas, monospace; color: #cfe8ff; white-space: pre; position: relative; z-index: 1; }
.term .k { color: #c792ea; } .term .s { color: #c3e88d; } .term .f { color: #82aaff; } .term .c { color: #5c7a99; } .term .n { color: #f78c6c; }
.term .cur { display: inline-block; width: 7px; height: 1em; background: var(--cyan); vertical-align: -2px; animation: pulse 1s steps(1) infinite; }

/* Impresión 3D: cubo que se imprime girando */
.viz-3d { perspective: 600px; }
.viz-3d .cube { position: absolute; left: 50%; top: 46%; width: 70px; height: 70px; margin: -35px 0 0 -35px; transform-style: preserve-3d; animation: spin3d 8s linear infinite; }
.viz-3d .cube i { position: absolute; inset: 0; border: 1.5px solid rgba(245, 197, 66, .85); background: linear-gradient(0deg, rgba(245, 197, 66, .35) 0 var(--fill, 0%), rgba(245, 197, 66, .04) var(--fill, 0%));
  box-shadow: inset 0 0 18px rgba(245, 197, 66, .25); animation: fill 4s ease-in-out infinite; }
.viz-3d .f1 { transform: translateZ(35px); } .viz-3d .f2 { transform: rotateY(180deg) translateZ(35px); }
.viz-3d .f3 { transform: rotateY(90deg) translateZ(35px); } .viz-3d .f4 { transform: rotateY(-90deg) translateZ(35px); }
.viz-3d .f5 { transform: rotateX(90deg) translateZ(35px); } .viz-3d .f6 { transform: rotateX(-90deg) translateZ(35px); }
@property --fill { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@keyframes fill { 0% { --fill: 0%; } 70%, 100% { --fill: 100%; } }
@keyframes spin3d { from { transform: rotateX(-22deg) rotateY(0); } to { transform: rotateX(-22deg) rotateY(360deg); } }
.viz-3d .nozzle { position: absolute; left: 50%; top: 14px; width: 16px; height: 22px; margin-left: -8px; clip-path: polygon(0 0, 100% 0, 70% 70%, 50% 100%, 30% 70%); background: linear-gradient(#ddd, #888); animation: nozzle 1.6s ease-in-out infinite alternate; }
.viz-3d .nozzle::after { content: ""; position: absolute; left: 50%; bottom: -3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #ffb347; box-shadow: 0 0 10px #ffb347; }
@keyframes nozzle { from { translate: -40px 0; } to { translate: 40px 0; } }
.viz-3d .bed { position: absolute; left: 50%; bottom: 26px; width: 150px; height: 26px; margin-left: -75px; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(245, 197, 66, .35), transparent 70%); border: 1px solid rgba(245, 197, 66, .25); }
@media (prefers-reduced-motion: reduce) { .viz *, .glitch::before, .glitch::after { animation: none !important; } }
/* =========================================================
   Escenarios propios de cada app
   ========================================================= */
.app-stage { position: relative; width: min(420px, 86vw); aspect-ratio: 1; margin: 0 auto; }

/* ---- Nexturix: espectro circular ---- */
.nx-stage canvas { position: absolute; inset: -12%; width: 124%; height: 124%; }
.nx-logo { position: absolute; left: 50%; top: 50%; width: 44%; height: 44%; translate: -50% -50%; border-radius: 50%; object-fit: cover;
  scale: var(--kick, 1); box-shadow: 0 0 calc(30px + var(--glow, 0) * 60px) rgba(63, 208, 255, .7), 0 0 0 3px rgba(63, 208, 255, .35); }
.nx-now { position: absolute; left: 50%; bottom: -4%; translate: -50% 0; display: flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(3, 14, 30, .75); backdrop-filter: blur(8px); font-size: .82rem; }
.nx-now .dot { width: 8px; height: 8px; border-radius: 50%; background: #ff4d6d; box-shadow: 0 0 10px #ff4d6d; animation: pulse 1s infinite; }
.nx-now b { font-family: var(--font-head); }
.nx-now .nx-mode { color: var(--cyan); font-weight: 600; transition: color .4s; }
.nx-now i { color: var(--faint); font-style: normal; font-variant-numeric: tabular-nums; }

.nx-analyzer { position: relative; border-radius: 26px; overflow: hidden; border: 1px solid var(--line-strong);
  background: radial-gradient(ellipse at 50% 50%, rgba(30, 123, 255, .16), transparent 70%), linear-gradient(180deg, rgba(4, 16, 34, .9), rgba(2, 8, 20, .95)); }
.nx-analyzer canvas { display: block; width: 100%; height: 300px; }
.nx-hud { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.nx-hud .m { padding: 18px 22px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.nx-hud .m:last-child { border-right: 0; }
.nx-hud span { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.nx-hud b { font-family: var(--font-head); font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.nx-hud i { height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.nx-hud em { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--violet)); transition: width .15s linear; }
.nx-label { transition: color .4s, text-shadow .4s; }
.nx-label.suave { color: #4ff0c8; text-shadow: 0 0 20px rgba(79, 240, 200, .5); }
.nx-label.normal { color: #5aa8ff; text-shadow: 0 0 20px rgba(90, 168, 255, .5); }
.nx-label.agresiva { color: #ff4d6d; text-shadow: 0 0 20px rgba(255, 77, 109, .6); }

/* ---- Yitadee: vinilo dorado ---- */
.yt-stage canvas { position: absolute; inset: -15% -15% 0; width: 130%; height: 115%; pointer-events: none; }
.vinyl { position: absolute; inset: 6%; border-radius: 50%; animation: spin 2.4s linear infinite;
  background: radial-gradient(circle, #1a1405 0 31%, #0b0903 31.5% 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 60px rgba(245, 197, 66, .25), inset 0 0 0 2px rgba(245, 197, 66, .3); }
.vinyl .grooves { position: absolute; inset: 0; border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(255, 255, 255, .045) 0 1px, transparent 1px 4px);
  -webkit-mask-image: radial-gradient(circle, transparent 33%, #000 34%, #000 97%, transparent 98%); mask-image: radial-gradient(circle, transparent 33%, #000 34%, #000 97%, transparent 98%); }
.vinyl .sheen { position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 20deg, transparent 0 8%, rgba(255, 220, 120, .28) 12%, transparent 18% 50%, rgba(255, 220, 120, .2) 62%, transparent 68%); animation: spin 2.4s linear infinite reverse; }
.vinyl img { position: absolute; left: 50%; top: 50%; width: 38%; height: 38%; translate: -50% -50%; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px #1a1405, 0 0 0 6px rgba(245, 197, 66, .6); }
.vinyl::after { content: ""; position: absolute; left: 50%; top: 50%; width: 3%; height: 3%; translate: -50% -50%; border-radius: 50%; background: #0b0903; box-shadow: 0 0 0 2px rgba(245, 197, 66, .8); }
@keyframes spin { to { rotate: 360deg; } }
.tonearm { position: absolute; right: -2%; top: -4%; width: 34%; height: 70%; transform-origin: 80% 8%; rotate: 6deg; animation: arm 6s ease-in-out infinite; }
.tonearm::before { content: ""; position: absolute; right: 12%; top: 0; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3c4, #c8901a 60%, #5a3d05); box-shadow: 0 8px 20px rgba(0, 0, 0, .6); }
.tonearm i { position: absolute; right: calc(12% + 14px); top: 17px; width: 6px; height: 80%; border-radius: 6px; background: linear-gradient(90deg, #8a6410, #ffe08a, #8a6410); transform-origin: top; rotate: 12deg; box-shadow: 0 6px 16px rgba(0, 0, 0, .5); }
.tonearm i::after { content: ""; position: absolute; left: -8px; bottom: -6px; width: 22px; height: 30px; border-radius: 5px; background: linear-gradient(#ffe08a, #a87714); rotate: 18deg; }
@keyframes arm { 0%, 100% { rotate: 6deg; } 50% { rotate: 8.5deg; } }
.yt-eq { position: absolute; left: 50%; bottom: -8%; translate: -50% 0; display: flex; gap: 5px; align-items: flex-end; height: 34px; }
.yt-eq i { width: 6px; border-radius: 3px; background: linear-gradient(#ffe08a, var(--gold)); animation: eq 1s ease-in-out infinite; box-shadow: 0 0 10px rgba(245, 197, 66, .5); }
.yt-eq i:nth-child(1) { animation-delay: -.2s; } .yt-eq i:nth-child(2) { animation-delay: -.5s; } .yt-eq i:nth-child(3) { animation-delay: -.1s; }
.yt-eq i:nth-child(4) { animation-delay: -.7s; } .yt-eq i:nth-child(5) { animation-delay: -.35s; }
@keyframes eq { 0%, 100% { height: 20%; } 50% { height: 100%; } }

.levels { border-radius: 26px; padding: 34px; border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 15% 0%, rgba(245, 197, 66, .18), transparent 55%), linear-gradient(160deg, rgba(60, 42, 6, .5), rgba(10, 8, 2, .92)); }
.lv-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.lv-points b { font-family: var(--font-head); font-size: clamp(2.4rem, 6vw, 3.6rem); background: linear-gradient(100deg, #fff6d6, var(--gold), #c8901a); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.lv-points span { display: block; color: var(--muted); font-size: .9rem; }
.lv-badge { padding: 10px 20px; border-radius: 999px; font-family: var(--font-head); font-weight: 700; letter-spacing: .06em; color: #1b1200;
  background: linear-gradient(120deg, #ffe08a, var(--gold) 50%, #c8901a); box-shadow: 0 10px 40px rgba(245, 197, 66, .35); transition: transform .3s var(--ease); }
.lv-badge.pop { transform: scale(1.18); }
.lv-track { height: 14px; border-radius: 14px; background: rgba(255, 255, 255, .06); overflow: hidden; border: 1px solid rgba(245, 197, 66, .2); }
.lv-fill { display: block; height: 100%; width: 0; border-radius: inherit; transition: width .6s var(--ease);
  background: linear-gradient(90deg, #a87714, #ffe08a, var(--gold)); background-size: 200% 100%; animation: shimmer 2s linear infinite; box-shadow: 0 0 20px rgba(245, 197, 66, .6); }
@keyframes shimmer { to { background-position: -200% 0; } }
.lv-steps { display: flex; justify-content: space-between; margin-top: 12px; font-size: .82rem; color: var(--faint); }
.lv-steps span.on { color: var(--gold); font-weight: 600; }
.lv-feed { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 8px; min-height: 132px; }
.lv-feed li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-radius: 12px; background: rgba(245, 197, 66, .06); border: 1px solid rgba(245, 197, 66, .14); font-size: .9rem; color: var(--muted); animation: feedIn .5s var(--ease); }
.lv-feed li b { color: var(--gold); }
@keyframes feedIn { from { opacity: 0; transform: translateY(-10px); } }

/* ---- SEEN 03:33: teléfono poseído ---- */
.seen-stage { display: grid; place-items: center; aspect-ratio: auto; }
.sphone { position: relative; width: min(300px, 78vw); height: 520px; border-radius: 40px; padding: 14px; overflow: hidden;
  background: linear-gradient(170deg, #1a0508, #050102); border: 2px solid rgba(255, 59, 78, .35);
  box-shadow: 0 0 0 8px #0d0204, 0 40px 100px rgba(0, 0, 0, .8), 0 0 80px rgba(255, 30, 60, .25); animation: float 7s ease-in-out infinite; }
.sphone.shake { animation: shake .09s linear 10; }
@keyframes shake { 25% { translate: -4px 2px; } 50% { translate: 3px -3px; } 75% { translate: -2px -1px; } }
.sp-top { display: flex; justify-content: space-between; padding: 4px 14px 10px; font: 600 .8rem var(--font-head); color: #ffb3bb; }
.sp-time { color: #ff3b4e; text-shadow: 0 0 10px rgba(255, 59, 78, .8); }
.sp-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 59, 78, .07); border: 1px solid rgba(255, 59, 78, .14); }
.sp-head i { width: 36px; height: 36px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, #3a0a10, #0a0203); border: 1px solid rgba(255, 59, 78, .4); position: relative; }
.sp-head i::after { content: "?"; position: absolute; inset: 0; display: grid; place-items: center; color: #ff3b4e; font-weight: 700; }
.sp-head b { font-size: .95rem; display: block; }
.sp-head small { color: #ff6b78; font-size: .74rem; }
.sp-chat { display: flex; flex-direction: column; gap: 8px; padding: 14px 4px; height: 380px; justify-content: flex-end; overflow: hidden; }
.sp-msg { max-width: 80%; padding: 9px 13px; border-radius: 16px; font-size: .86rem; line-height: 1.35; animation: feedIn .35s var(--ease); }
.sp-msg.them { align-self: flex-start; background: #2a0a0f; border: 1px solid rgba(255, 59, 78, .25); color: #ffd6da; border-bottom-left-radius: 4px; }
.sp-msg.me { align-self: flex-end; background: #1b2430; color: #dfe9f5; border-bottom-right-radius: 4px; }
.sp-msg.seen { align-self: flex-end; background: none; padding: 0 4px; font-size: .7rem; color: #ff6b78; letter-spacing: .04em; }
.sp-msg.typing { display: flex; gap: 4px; padding: 12px 14px; }
.sp-msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: #ff6b78; animation: bars 1s infinite; }
.sp-msg.typing i:nth-child(2) { animation-delay: .2s; } .sp-msg.typing i:nth-child(3) { animation-delay: .4s; }
.sp-eye { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle, rgba(120, 0, 15, .85), #000 75%); opacity: 0; pointer-events: none; transition: opacity .2s; }
.sp-eye img { width: 70%; border-radius: 24px; filter: drop-shadow(0 0 40px rgba(255, 30, 60, .8)); }
.sphone.possessed .sp-eye { opacity: 1; }
.sp-noise { position: absolute; inset: 0; pointer-events: none; opacity: .08; mix-blend-mode: screen;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .5) 0 1px, transparent 1px 3px); animation: scan 6s linear infinite; }
.sphone.possessed .sp-noise { opacity: .35; }
@keyframes scan { to { background-position: 0 300px; } }

.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.meter { padding: 22px; border-radius: 20px; border: 1px solid var(--line-strong); background: linear-gradient(160deg, rgba(70, 6, 16, .5), rgba(12, 2, 4, .92)); display: grid; grid-template-columns: 1fr auto; gap: 12px 10px; align-items: center; }
.meter span { font-size: .78rem; letter-spacing: .18em; text-transform: uppercase; color: #ffb3bb; }
.meter b { font: 700 1.5rem var(--font-head); color: #ff3b4e; font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(255, 59, 78, .6); }
.meter i { grid-column: 1 / -1; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.meter em { display: block; height: 100%; width: 50%; background: linear-gradient(90deg, #8f0718, #ff3b4e); box-shadow: 0 0 12px #ff3b4e; transition: width .8s var(--ease); }
.meter.glitch-on b { animation: glitch-txt .3s steps(2) 2; }
@keyframes glitch-txt { 50% { translate: 2px 0; color: #3fd0ff; } }

/* Ambiente CRT en la página de SEEN */
.theme-red::after { content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; animation: flicker 7s infinite; }
@keyframes flicker { 0%, 96%, 100% { opacity: .5; } 97% { opacity: .9; } 98% { opacity: .3; } }

/* ---------- Mejoras generales ---------- */
.feature-emoji { width: 56px; height: 56px; display: grid; place-items: center; font-size: 1.6rem; border-radius: 16px;
  background: linear-gradient(140deg, rgba(63, 208, 255, .18), rgba(139, 92, 255, .16)); border: 1px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .08); }
.theme-gold .feature-emoji { background: linear-gradient(140deg, rgba(245, 197, 66, .2), rgba(120, 70, 10, .2)); }
.theme-red .feature-emoji { background: linear-gradient(140deg, rgba(255, 59, 78, .2), rgba(90, 0, 15, .3)); }
.scroll-bar { position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 120; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--cyan), var(--violet)); box-shadow: 0 0 10px var(--cyan); pointer-events: none; }
.app-title h1 { background: linear-gradient(100deg, #fff 30%, var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.theme-red .app-title h1 { background: none; color: var(--text); }

@media (max-width: 960px) {
  .app-stage { margin-top: 56px; width: min(340px, 82vw); }
  .seen-stage { width: auto; }
  .nx-hud { grid-template-columns: repeat(2, 1fr); }
  .nx-hud .m:nth-child(2) { border-right: 0; }
  .nx-hud .m:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .nx-analyzer canvas { height: 220px; }
  .sphone { height: 470px; } .sp-chat { height: 330px; }
}
@media (prefers-reduced-motion: reduce) { .vinyl, .vinyl .sheen, .tonearm, .yt-eq i, .sphone, .theme-red::after, .lv-fill { animation: none !important; } }