/* ============================================================
   AIVYNTRAX — El Escenario
   Sistema de diseño: oscuro · minimalista · acento verde lima
   ============================================================ */

:root {
  --bg: #060607;
  --bg-2: #0a0a0c;
  --panel: #0e0e11;
  --panel-2: #131316;
  --ink: #f1f1ea;
  --muted: #8d8d86;
  --line: rgba(241, 241, 234, 0.10);
  --line-2: rgba(241, 241, 234, 0.22);
  --accent: #c6ff3e;
  --accent-soft: rgba(198, 255, 62, 0.14);
  --accent-glow: rgba(198, 255, 62, 0.30);
  --font-d: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-b: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #0a0a0a; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1d1d20; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #2c2c30; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

.x { color: var(--accent); }
em { font-style: normal; color: var(--accent); }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader-mark {
  font-family: var(--font-d);
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  animation: preIn 0.9s var(--ease) both;
}
@keyframes preIn {
  from { opacity: 0; transform: translateY(18px); letter-spacing: 0.4em; filter: blur(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Cursor / ambiente ---------- */
.cursor-glow {
  position: fixed; top: 0; left: 0;
  width: 620px; height: 620px;
  margin: -310px 0 0 -310px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(198, 255, 62, 0.09), transparent 70%);
  pointer-events: none; z-index: 3;
  opacity: 0; transition: opacity 0.5s;
  mix-blend-mode: screen;
}
.cursor-glow.on { opacity: 1; }

.dust {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

/* Barra de progreso de la historia */
.story-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px; z-index: 60;
  pointer-events: none;
}
.story-progress i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  box-shadow: 0 0 10px var(--accent-glow);
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.15rem clamp(1.5rem, 6vw, 4.5rem);
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(6, 6, 7, 0.72);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-logo {
  font-family: var(--font-d);
  font-weight: 700; font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  color: var(--muted); font-size: 0.9rem; font-weight: 500;
  transition: color 0.25s;
  position: relative;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.nav-cta {
  color: var(--accent);
  border: 1px solid var(--accent-glow);
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  background: var(--accent-soft);
  transition: background 0.25s, transform 0.25s;
}
.nav-links a.nav-cta:hover { background: var(--accent); color: #0a0a0a; transform: translateY(-1px); }

/* ---------- Riel de escenas ---------- */
.rail {
  position: fixed; right: 2.2rem; top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: flex; flex-direction: column; gap: 1.1rem;
}
.rail-dot {
  position: relative;
  width: 9px; height: 9px; border-radius: 50%;
  background: #2b2b2e;
  transition: background 0.3s, box-shadow 0.3s;
  align-self: flex-end;
}
.rail-dot span {
  position: absolute; right: 20px; top: 50%;
  transform: translateY(-50%) translateX(6px);
  white-space: nowrap;
  font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink); background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.28rem 0.6rem; border-radius: 6px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}
.rail-dot:hover span { opacity: 1; transform: translateY(-50%) translateX(0); }
.rail-dot.is-active {
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
}
.rail-dot.is-active span { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-d);
  font-weight: 600; font-size: 0.95rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, color 0.25s, border-color 0.25s;
}
.btn-solid {
  background: var(--accent); color: #0a0a0a;
  box-shadow: 0 0 0 0 rgba(198, 255, 62, 0);
}
.btn-solid:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px -10px var(--accent-glow);
}
.btn-ghost {
  border: 1px solid var(--line-2);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-arrow { transition: transform 0.25s var(--ease); display: inline-block; }
.btn:hover .btn-arrow { transform: translateY(2px) translateX(2px); }

/* ============================================================
   HERO — scrub visual
   ============================================================ */
.hero { position: relative; height: 320vh; }

.hero-scrub {
  position: sticky; top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
  display: grid; place-items: center;
  padding: 0 1.5rem;
}
.hero-light {
  position: absolute; left: 50%; top: 50%;
  width: 130vmin; height: 130vmin;
  transform: translate(-50%, -50%) scale(0.5);
  background: radial-gradient(circle, rgba(198, 255, 62, 0.10) 0%, rgba(198, 255, 62, 0.03) 42%, transparent 68%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  will-change: transform, opacity;
}
.hero-canvas, .hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 1;
}
.hero-video { display: none; object-fit: cover; }
.hero-video.on { display: block; }
.hero-veil {
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(6, 6, 7, 0.6) 100%),
    linear-gradient(180deg, rgba(6, 6, 7, 0.7), transparent 22%, transparent 68%, var(--bg) 100%);
}
.hero-inner {
  position: absolute; inset: 0; z-index: 3;
  display: grid; place-items: center;
  align-content: center;
  text-align: center;
  padding: 2rem;
  will-change: opacity, transform;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 2.2rem;
  justify-self: center;
}
.hero-eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent-glow);
}
.hero-title {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(3.4rem, 14vw, 11rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
  margin-bottom: 2.2rem;
  will-change: opacity, transform;
}
.hero-sub {
  max-width: 640px; margin: 0 auto 3rem;
  color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.2rem);
}
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-manifesto {
  position: absolute; left: 0; right: 0; bottom: 16%;
  text-align: center; z-index: 3;
  font-family: var(--font-d);
  font-size: clamp(1.35rem, 3.6vw, 2.4rem);
  font-weight: 600; letter-spacing: -0.02em;
  opacity: 0; transform: translateY(26px);
  pointer-events: none;
  will-change: opacity, transform;
}
.hero-manifesto span {
  display: block;
  margin-top: 0.8rem;
  font-family: var(--font-b);
  font-size: 0.72rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--muted); font-weight: 500;
}
.hero-scrollhint {
  position: absolute; bottom: 2.4rem; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.8rem;
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--muted);
  z-index: 3;
}
.hero-scrollline {
  width: 1px; height: 34px; display: block;
  background: linear-gradient(var(--accent), transparent);
  animation: drop 1.8s var(--ease) infinite;
}
@keyframes drop {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}
.hero-progress {
  position: absolute; left: 1.5rem; top: 50%;
  transform: translateY(-50%);
  width: 1px; height: 26vh;
  background: rgba(241, 241, 234, 0.10);
  z-index: 3;
  overflow: hidden;
}
.hero-progress i {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 0%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ============================================================
   ESCENAS (scrolltelling)
   ============================================================ */
.scenes { position: relative; z-index: 1; }

.scene-wrap { height: 300vh; position: relative; }

.scene-pin {
  position: sticky; top: 0;
  height: 100vh;
  overflow: hidden;
  display: grid; align-items: center;
  background: var(--bg);
}

.scene-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 0%, #0b0b0e 0%, var(--bg) 55%),
    radial-gradient(80% 60% at 85% 85%, rgba(255, 255, 255, 0.025), transparent 60%);
}
.scene-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(46vmax 46vmax at 68% 50%, var(--accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity 0.6s;
  mix-blend-mode: screen;
}
/* Hilo escénico superior e inferior */
.scene-pin::before, .scene-pin::after {
  content: ""; position: absolute; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
  opacity: 0; transition: opacity 0.5s;
}
.scene-pin::before { top: 4.6rem; }
.scene-pin::after { bottom: 4.6rem; }
.scene-pin.lit::before, .scene-pin.lit::after { opacity: 1; }

.scene-grid {
  position: relative; z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: center;
  padding: 8rem clamp(1.5rem, 6vw, 7rem) 4rem;
}

/* Meta (índice + etiqueta) */
.scene-meta {
  position: absolute; top: 6.4rem; left: clamp(1.5rem, 6vw, 7rem);
  display: flex; align-items: baseline; gap: 1rem;
  z-index: 3;
}
.scene-idx {
  font-family: var(--font-d);
  font-size: 0.85rem; font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.scene-tag {
  font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--muted);
}

/* Copia */
.scene-copy {
  max-width: 520px;
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.scene-copy h2 {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.4vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 1.4rem;
}
.scene-desc { color: var(--muted); margin-bottom: 1.8rem; font-size: 1.02rem; }
.scene-feats { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; margin-bottom: 2.2rem; }
.scene-feats li {
  font-size: 0.82rem; color: var(--ink);
  padding-left: 1.1rem; position: relative;
}
.scene-feats li::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); transform: translateY(-50%);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Escenario (el telón) */
.scene-stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 440px;
  perspective: 1400px;
  opacity: 0; transform: translateY(26%);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  will-change: transform, opacity;
}

/* Scrub video de la sección (secuencia contada con el scroll) */
.scene-scrub {
  display: none;
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.scene.has-scrub .scene-scrub { display: block; }
.scene.has-scrub .mw { display: none; }
.scene.has-scrub .scene-stage { min-height: clamp(280px, 46vh, 480px); }
.scene.has-scrub .scene-stage::after {
  content: "";
  position: absolute; inset: 0; z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(70% 70% at 30% 50%, transparent 40%, rgba(6, 6, 7, 0.55) 100%),
    linear-gradient(180deg, rgba(6, 6, 7, 0.45), transparent 30%, transparent 62%, rgba(6, 6, 7, 0.6) 100%);
}

/* ---------- Mockup base ---------- */
.mw {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow:
    0 40px 90px -30px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  animation: floaty 8s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-0.4deg); }
  50% { transform: translateY(-12px) rotate(0.4deg); }
}
.mw-bar {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: #0c0c0f;
}
.mw-dots { display: flex; gap: 5px; }
.mw-dots i { width: 8px; height: 8px; border-radius: 50%; background: #26262a; }
.mw-dots i:first-child { background: rgba(198, 255, 62, 0.5); }
.mw-url {
  font-size: 0.68rem; color: var(--muted);
  background: #17171b; border: 1px solid var(--line);
  padding: 0.18rem 0.8rem; border-radius: 999px;
  margin-left: auto; margin-right: auto;
}

/* ---------- Mockup 01 · Web ---------- */
.mw-browser { width: min(560px, 88%); }
.mw-page {
  background: linear-gradient(180deg, #101013, #0c0c0f);
  padding: 1.4rem 1.6rem 1.6rem;
  display: flex; flex-direction: column; gap: 1.3rem;
}
.pg-nav { display: flex; align-items: center; justify-content: space-between; }
.pg-logo { font-size: 0.8rem; font-weight: 600; color: var(--ink); }
.pg-links { display: flex; gap: 0.6rem; }
.pg-links i { width: 34px; height: 6px; border-radius: 4px; background: #222226; }
.pg-hero { display: flex; flex-direction: column; align-items: flex-start; gap: 0.55rem; }
.pg-h { font-family: var(--font-d); font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.pg-line {
  width: 78%; height: 7px; border-radius: 4px;
  background: linear-gradient(100deg, #1b1b1f 40%, #26262b 50%, #1b1b1f 60%);
  background-size: 200% 100%;
  animation: shimmer 1.8s linear infinite;
}
.pg-line.short { width: 52%; }
.pg-btn {
  margin-top: 0.5rem;
  font-size: 0.72rem; font-weight: 600;
  color: #0a0a0a; background: var(--accent);
  padding: 0.4rem 1rem; border-radius: 999px;
}
.pg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.pg-card {
  height: 84px; border-radius: 10px;
  background: linear-gradient(160deg, #17171b, #111114);
  border: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.pg-card::after {
  content: ""; position: absolute; left: 10%; right: 10%; top: 30%;
  height: 6px; border-radius: 4px;
  background: linear-gradient(100deg, #1d1d21 40%, #28282d 50%, #1d1d21 60%);
  background-size: 200% 100%;
  animation: shimmer 2.2s linear infinite;
}
.pg-foot { display: flex; flex-direction: column; gap: 0.45rem; }

/* Reveal del renderizado "línea a línea" — pausado hasta que el telón sube */
.scene [style*="--i"] {
  animation: riseIn 0.9s calc(var(--i) * 0.14s + 0.2s) var(--ease) both;
  animation-play-state: paused;
}
.scene.show [style*="--i"] { animation-play-state: running; }
@keyframes riseIn {
  from { opacity: 0; transform: translateY(26px); filter: blur(5px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Mockup 02 · Landing ---------- */
.mw-landing { width: min(480px, 82%); }
.mw-view {
  height: 330px; overflow: hidden;
  position: relative;
}
.mw-view::after {
  content: ""; position: absolute; inset: 0;
  pointer-events: none;
  box-shadow: inset 0 30px 40px -30px rgba(0,0,0,.8), inset 0 -30px 40px -30px rgba(0,0,0,.8);
}
.landing-scroll { animation: landingScroll 9s linear infinite; }
@keyframes landingScroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-46%); }
}
.ld-hero {
  padding: 1.6rem 1.4rem 1.3rem;
  background: linear-gradient(160deg, rgba(198,255,62,0.10), transparent 60%), #111114;
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.5rem;
}
.ld-kicker { font-size: 0.62rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.ld-title { font-family: var(--font-d); font-size: 1.55rem; font-weight: 600; letter-spacing: -0.02em; }
.ld-btn {
  font-size: 0.7rem; font-weight: 600; color: #0a0a0a;
  background: var(--accent); padding: 0.42rem 1rem; border-radius: 999px;
}
.ld-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; padding: 1rem 1.4rem; }
.ld-card {
  height: 92px; border-radius: 10px;
  background: linear-gradient(160deg, #1a1a1e, #121215);
  border: 1px solid var(--line);
  animation: shimmer 2.4s linear infinite;
  background-size: 200% 100%;
}
.ld-form {
  margin: 0.6rem 1.4rem 1.4rem;
  padding: 1.2rem;
  border: 1px dashed var(--line-2); border-radius: 12px;
  display: flex; flex-direction: column; gap: 0.6rem; align-items: flex-start;
}
.ld-line { width: 70%; height: 6px; border-radius: 4px; background: #1d1d21; }
.ld-line.short { width: 44%; }

/* Teléfono espejo */
.mini-phone { width: 118px; height: 230px; border-radius: 22px; margin-left: -1.4rem; }
.phone-notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 42%; height: 14px; border-radius: 999px;
  background: #000; z-index: 2;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04);
}
.phone-screen {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #131316, #0d0d10);
  padding: 2.1rem 0.9rem 0.9rem;
  display: flex; flex-direction: column; gap: 0.4rem;
}
.ph-kicker { font-size: 0.55rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.ph-title { font-family: var(--font-d); font-size: 1.05rem; font-weight: 600; }
.ph-btn {
  align-self: flex-start; font-size: 0.58rem; font-weight: 600;
  color: #0a0a0a; background: var(--accent);
  padding: 0.3rem 0.7rem; border-radius: 999px;
}

/* ---------- Mockup 03 · App móvil ---------- */
.big-phone {
  width: 200px; height: 400px;
  border-radius: 34px;
  border: 1px solid var(--line-2);
  animation: floatSpin 10s ease-in-out infinite;
}
@keyframes floatSpin {
  0%, 100% { transform: rotateY(-13deg) rotateX(4deg) translateY(0); }
  50% { transform: rotateY(9deg) rotateX(-3deg) translateY(-14px); }
}
.big-phone .phone-screen { padding: 2.4rem 1rem 1rem; }
.app-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.8rem;
}
.app-hello { font-family: var(--font-d); font-size: 0.95rem; font-weight: 600; }
.app-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #4e7a12);
}
.app-cards { display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.app-card {
  display: flex; align-items: center; gap: 0.6rem;
  background: #141418; border: 1px solid var(--line);
  border-radius: 12px; padding: 0.6rem 0.7rem;
}
.app-card b { font-size: 0.78rem; font-weight: 500; color: var(--ink); }
.app-ico { width: 30px; height: 30px; border-radius: 8px; }
.ico-a { background: linear-gradient(135deg, rgba(198,255,62,.5), rgba(198,255,62,.15)); }
.ico-b { background: linear-gradient(135deg, #3e8bff, rgba(62,139,255,.15)); }
.ico-c { background: linear-gradient(135deg, #ff5fa2, rgba(255,95,162,.15)); }
.app-nav { display: flex; justify-content: space-around; padding-top: 0.6rem; }
.app-nav i { width: 22px; height: 3px; border-radius: 2px; background: #242428; transition: background .3s; }
.app-nav i.on { background: var(--accent); }

/* ---------- Mockup 04 · Menú interactivo ---------- */
.mw-menu { width: min(430px, 86%); border-radius: 20px; }
.menu-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(198,255,62,0.07), transparent 55%), #0d0d10;
}
.menu-brand { font-family: var(--font-d); font-weight: 600; font-size: 1.05rem; }
.menu-live {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.menu-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1.6s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.menu-tabs { display: flex; gap: 0.5rem; padding: 0.9rem 1.2rem 0.4rem; }
.menu-tab {
  font-size: 0.74rem; font-weight: 500; color: var(--muted);
  padding: 0.42rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--line);
  transition: all 0.25s;
}
.menu-tab:hover { color: var(--ink); border-color: var(--line-2); }
.menu-tab.is-active {
  color: #0a0a0a; background: var(--accent); border-color: var(--accent);
  font-weight: 600;
}
.menu-panel { padding: 0.6rem 1.2rem 1.3rem; }
.menu-list { display: none; }
.menu-list.is-active { display: flex; flex-direction: column; }
.menu-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.62rem 0;
  border-bottom: 1px dashed rgba(241,241,234,0.08);
  animation: itemIn 0.5s var(--ease) both;
}
.menu-item:nth-child(2) { animation-delay: 0.08s; }
.menu-item:nth-child(3) { animation-delay: 0.16s; }
@keyframes itemIn {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: none; }
}
.dish {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  font-family: var(--font-d);
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.03em;
  color: var(--ink);
  background: #15151a; border-radius: 9px;
  border: 1px solid var(--line);
}
.m-name { font-size: 0.8rem; font-weight: 500; white-space: nowrap; }
.m-dots { flex: 1; border-bottom: 1px dotted #333338; margin: 0 0.3rem 0.28rem; }
.m-price { font-family: var(--font-d); font-size: 0.8rem; font-weight: 600; color: var(--accent); }

/* ---------- Mockup 05 · Dashboard (SaaS / POS realista) ---------- */
.mw-dash {
  width: min(580px, 94%);
  border-radius: 16px;
  background: #08080a;
  border: 1px solid var(--line-2);
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  overflow: hidden;
}

.dash-app {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #08080a;
}

/* Barra superior */
.dash-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.85rem;
  background: #060608;
  border-bottom: 1px solid var(--line);
}
.dash-top-left { display: flex; align-items: center; gap: 0.6rem; }
.dash-window-dots { display: flex; gap: 5px; }
.d-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.d-dot-red { background: #ff5f56; }
.d-dot-yel { background: #ffbd2e; }
.d-dot-grn { background: #27c93f; }

.dash-brand { display: flex; align-items: center; gap: 0.4rem; }
.dash-brand-icon {
  width: 18px; height: 18px; border-radius: 4px;
  background: var(--accent-soft); border: 1px solid rgba(198,255,62,0.3);
  display: flex; align-items: center; justify-content: center;
}
.dash-brand-name {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.dash-badge-version {
  font-size: 0.55rem;
  padding: 0.06rem 0.35rem;
  border-radius: 4px;
  background: rgba(241, 241, 234, 0.06);
  color: var(--muted);
  border: 1px solid var(--line);
}

.dash-top-center { display: flex; align-items: center; gap: 0.5rem; }
.dash-live-badge {
  display: inline-flex; align-items: center; gap: 0.32rem;
  font-size: 0.58rem; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(198, 255, 62, 0.3);
  border-radius: 999px; padding: 0.12rem 0.5rem;
}
.dash-live-pulse {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
  animation: pulseGreen 1.6s infinite;
}
@keyframes pulseGreen {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}
.dash-service-meta { color: var(--muted); font-size: 0.6rem; }

.dash-top-right { display: flex; align-items: center; gap: 0.6rem; }
.dash-time-indicator {
  font-family: var(--font-d);
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
}
.dash-user-chip { display: flex; align-items: center; }
.dash-avatar {
  width: 20px; height: 20px; border-radius: 50%;
  background: #18181d; border: 1px solid var(--line-2);
  display: grid; place-items: center;
  font-size: 0.55rem; font-weight: 700; color: var(--ink);
}

/* Cuerpo: barra lateral + contenido */
.dash-body {
  display: grid;
  grid-template-columns: 46px 1fr;
  min-height: 380px;
}

/* Navegación lateral */
.dash-side {
  background: #08080a;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 0.3rem;
}
.dash-nav-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--muted);
  background: transparent;
  transition: all 0.2s;
  position: relative;
  border: 1px solid transparent;
}
.dash-nav-btn:hover {
  color: var(--ink);
  background: rgba(241, 241, 234, 0.05);
  border-color: var(--line);
}
.dash-nav-btn.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(198, 255, 62, 0.35);
  box-shadow: 0 0 12px rgba(198, 255, 62, 0.15);
}
.dash-nav-badge {
  position: absolute; top: 1px; right: 1px;
  background: #e04838; color: #fff;
  font-size: 0.5rem; font-weight: 700;
  width: 13px; height: 13px; border-radius: 50%;
  display: grid; place-items: center;
  line-height: 1;
}
.dash-nav-sync { margin-top: auto; color: var(--muted); }

/* Iconos vectoriales CSS para la barra lateral */
.d-ico {
  display: inline-block;
  width: 14px; height: 14px;
  position: relative;
}
.d-ico-brand {
  width: 10px; height: 10px;
  border: 1.5px solid var(--accent);
  transform: rotate(45deg);
}
.d-ico-dash {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 13px; height: 13px;
}
.d-ico-dash::before, .d-ico-dash::after,
.d-ico-dash span {
  content: ""; display: block; background: currentColor; border-radius: 1.5px;
}
.d-ico-order {
  border: 1.5px solid currentColor;
  border-radius: 2px;
  width: 12px; height: 14px;
}
.d-ico-order::after {
  content: ""; position: absolute; left: 2px; top: 3px; right: 2px;
  height: 1.5px; background: currentColor;
  box-shadow: 0 3px 0 0 currentColor;
}
.d-ico-table {
  border: 1.5px solid currentColor;
  border-radius: 50%;
  width: 13px; height: 13px;
}
.d-ico-table::after {
  content: ""; position: absolute; inset: 3px;
  background: currentColor; border-radius: 50%;
}
.d-ico-stock {
  border: 1.5px solid currentColor;
  border-radius: 2px;
  width: 13px; height: 13px;
}
.d-ico-stock::after {
  content: ""; position: absolute; left: 0; top: 4px; right: 0;
  height: 1.5px; background: currentColor;
}
.d-ico-sync {
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  width: 12px; height: 12px;
}

/* Área principal */
.dash-main {
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: #0b0b0e;
}

/* Tarjetas KPI */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}
.dash-kpi {
  background: #111115;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transition: border-color 0.25s, transform 0.25s;
}
.dash-kpi:hover {
  border-color: var(--line-2);
  transform: translateY(-1px);
}
.k-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.k-label {
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.k-trend {
  font-size: 0.53rem;
  font-weight: 600;
  padding: 0.06rem 0.28rem;
  border-radius: 999px;
  white-space: nowrap;
}
.k-trend.k-up {
  color: var(--accent);
  background: rgba(198, 255, 62, 0.12);
}
.k-trend.k-flat {
  color: var(--muted);
  background: rgba(241, 241, 234, 0.06);
}
.k-value {
  font-family: var(--font-d);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}
.k-progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: 0.1rem;
}
.k-progress-bar {
  width: 100%; height: 3px;
  background: rgba(241, 241, 234, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.k-progress-fill {
  display: block; height: 100%;
  width: var(--p, 0%);
  background: var(--accent);
  border-radius: 999px;
  transition: width 1s var(--ease);
}
.k-progress-fill.k-lime { background: var(--accent); }
.k-sub { font-size: 0.53rem; color: var(--muted); white-space: nowrap; }

/* Tarjeta Gráfico Canvas */
.dash-chart-card {
  background: #101014;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.dash-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dash-chart-title-group { display: flex; align-items: center; gap: 0.5rem; }
.dash-chart-title {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--ink);
  font-family: var(--font-d);
  letter-spacing: 0.02em;
}
.dash-chart-live-dot {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.54rem;
  color: var(--muted);
}
.dash-chart-legend { display: flex; gap: 0.65rem; }
.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.54rem;
  color: var(--muted);
}
.legend-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.lime {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent-glow);
}
.legend-dot.muted { background: #4a4a52; }

/* Contenedor del Canvas */
.dash-canvas-container {
  position: relative;
  width: 100%;
  height: 108px;
  cursor: crosshair;
}
.dash-chart-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Tooltip interactivo del Canvas */
.dash-canvas-tooltip {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%);
  margin-top: -8px;
  background: rgba(10, 10, 13, 0.95);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-size: 0.58rem;
  color: var(--ink);
  white-space: nowrap;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.8), 0 0 10px rgba(198, 255, 62, 0.2);
  transition: opacity 0.15s, transform 0.15s;
  z-index: 10;
}
.dash-canvas-tooltip.is-active { opacity: 1; }

/* Tarjeta Feed de Comandas */
.dash-feed-card {
  background: #101014;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.5rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.dash-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(241, 241, 234, 0.06);
}
.dash-feed-title {
  font-size: 0.63rem;
  font-weight: 600;
  color: var(--ink);
  font-family: var(--font-d);
}
.dash-feed-counter { font-size: 0.54rem; color: var(--muted); }

.dash-feed {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}
.dash-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.32rem 0.45rem;
  border-radius: 6px;
  background: rgba(241, 241, 234, 0.02);
  border: 1px solid rgba(241, 241, 234, 0.05);
  font-size: 0.65rem;
  animation: feedIn 0.45s var(--ease) both;
  transition: background 0.2s, border-color 0.2s;
}
.dash-order:hover {
  background: rgba(241, 241, 234, 0.05);
  border-color: var(--line-2);
}
.o-main {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
  max-width: 70%;
}
.o-id {
  font-family: var(--font-d);
  font-size: 0.56rem;
  color: var(--muted);
  font-weight: 600;
  flex-shrink: 0;
}
.o-table {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  flex-shrink: 0;
}
.o-items {
  color: var(--muted);
  font-size: 0.58rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.o-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.o-price {
  font-family: var(--font-d);
  font-weight: 700;
  color: var(--ink);
  font-size: 0.65rem;
}
.o-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  font-size: 0.53rem;
  font-weight: 600;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  text-transform: capitalize;
}
.dash-micro-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.o-kitchen {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.o-ready {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(198, 255, 62, 0.35);
}
.o-served {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.35);
}
.o-paid {
  background: rgba(241, 241, 234, 0.08);
  color: var(--muted);
  border: 1px solid var(--line);
}

/* Vistas conmutables del Dashboard */
.dash-view {
  display: none;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  animation: viewFadeIn 0.3s var(--ease) both;
}
.dash-view.is-active { display: flex; }
@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- VISTA 2 · KDS / Comandas ---------- */
.kds-panel {
  background: #101014;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.kds-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(241, 241, 234, 0.06);
}
.kds-title-wrap { display: flex; flex-direction: column; gap: 0.1rem; }
.kds-title {
  font-family: var(--font-d);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink);
}
.kds-meta { font-size: 0.53rem; color: var(--muted); }
.kds-filters { display: flex; gap: 0.3rem; }
.kds-filter {
  font-size: 0.53rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(241, 241, 234, 0.04);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.kds-filter:hover, .kds-filter.is-active {
  color: var(--ink);
  background: var(--accent-soft);
  border-color: rgba(198, 255, 62, 0.35);
}
.kds-filter.is-active { color: var(--accent); }

.kds-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.45rem;
}
.kds-card {
  background: #0b0b0e;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: all 0.25s;
}
.kds-card:hover { border-color: var(--line-2); }
.kds-card.is-ready {
  border-color: rgba(198, 255, 62, 0.3);
  background: rgba(198, 255, 62, 0.02);
}
.kds-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kds-num { font-family: var(--font-d); font-weight: 700; font-size: 0.62rem; color: var(--muted); }
.kds-table { font-weight: 600; font-size: 0.64rem; color: var(--ink); }
.kds-timer {
  font-size: 0.52rem;
  font-weight: 600;
  padding: 0.06rem 0.3rem;
  border-radius: 999px;
  background: rgba(241, 241, 234, 0.06);
  color: var(--muted);
}
.kds-timer-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.kds-timer-ok {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(198, 255, 62, 0.3);
}
.kds-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  font-size: 0.58rem;
  color: var(--ink);
}
.kds-items small { color: var(--muted); font-size: 0.52rem; margin-left: 0.2rem; }
.kds-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.25rem;
  border-top: 1px dashed rgba(241, 241, 234, 0.06);
  margin-top: auto;
}
.kds-total { font-family: var(--font-d); font-weight: 700; font-size: 0.64rem; color: var(--ink); }
.kds-action-btn {
  font-size: 0.52rem;
  font-weight: 600;
  padding: 0.16rem 0.45rem;
  border-radius: 5px;
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  cursor: pointer;
  transition: all 0.2s;
}
.kds-action-btn:hover { background: rgba(245, 158, 11, 0.28); }
.kds-btn-done {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(198, 255, 62, 0.35);
}
.kds-btn-done:hover { background: rgba(198, 255, 62, 0.24); }

/* ---------- VISTA 3 · Plano de Mesas ---------- */
.floor-panel {
  background: #101014;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.floor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(241, 241, 234, 0.06);
}
.floor-title-wrap { display: flex; flex-direction: column; gap: 0.1rem; }
.floor-title {
  font-family: var(--font-d);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink);
}
.floor-stats { font-size: 0.53rem; color: var(--muted); }
.floor-legend { display: flex; gap: 0.5rem; }
.fl-tag { font-size: 0.52rem; }
.fl-busy { color: var(--accent); }
.fl-free { color: var(--muted); }
.fl-res { color: #fbbf24; }

.floor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}
.table-node {
  background: #0b0b0e;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  cursor: pointer;
  transition: all 0.22s;
  text-align: center;
}
.table-node:hover {
  transform: translateY(-2px);
  border-color: var(--line-2);
}
.table-node.is-busy {
  border-color: rgba(198, 255, 62, 0.28);
  background: rgba(198, 255, 62, 0.03);
}
.table-node.is-res {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.03);
}
.table-node.is-free {
  border-color: rgba(241, 241, 234, 0.08);
  opacity: 0.75;
}
.table-node.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(198, 255, 62, 0.25);
  background: var(--accent-soft);
}
.t-id { font-family: var(--font-d); font-weight: 700; font-size: 0.72rem; color: var(--ink); }
.t-pax { font-size: 0.52rem; color: var(--muted); }
.t-bill { font-family: var(--font-d); font-weight: 600; font-size: 0.58rem; color: var(--accent); }
.table-node.is-res .t-bill { color: #fbbf24; }
.table-node.is-free .t-bill { color: var(--muted); }

.floor-detail-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.6rem;
  border-radius: 7px;
  background: #08080a;
  border: 1px solid var(--line);
}
.fdb-left { display: flex; flex-direction: column; gap: 0.1rem; }
.fdb-name { font-size: 0.62rem; font-weight: 600; color: var(--ink); }
.fdb-info { font-size: 0.53rem; color: var(--muted); }
.fdb-right { display: flex; align-items: center; gap: 0.5rem; }
.fdb-amount { font-family: var(--font-d); font-weight: 700; font-size: 0.75rem; color: var(--accent); }
.fdb-btn {
  font-size: 0.53rem;
  font-weight: 600;
  padding: 0.18rem 0.5rem;
  border-radius: 5px;
  background: var(--accent);
  color: #08080a;
  cursor: pointer;
  transition: opacity 0.2s;
}
.fdb-btn:hover { opacity: 0.88; }

/* ---------- VISTA 4 · Control de Stock ---------- */
.stock-panel {
  background: #101014;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.stock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(241, 241, 234, 0.06);
}
.stock-title-wrap { display: flex; flex-direction: column; gap: 0.1rem; }
.stock-title {
  font-family: var(--font-d);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--ink);
}
.stock-stats { font-size: 0.53rem; color: var(--muted); }
.stock-badges-top { display: flex; gap: 0.35rem; }
.st-chip {
  font-size: 0.52rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}
.st-chip-alert {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.st-chip-ok {
  background: rgba(241, 241, 234, 0.06);
  color: var(--muted);
  border: 1px solid var(--line);
}

.stock-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.stock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.32rem 0.45rem;
  border-radius: 6px;
  background: rgba(241, 241, 234, 0.02);
  border: 1px solid rgba(241, 241, 234, 0.05);
  font-size: 0.6rem;
  gap: 0.5rem;
}
.sr-info { display: flex; flex-direction: column; width: 34%; }
.sr-name { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-cat { font-size: 0.5rem; color: var(--muted); }
.sr-bar-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1;
}
.sr-bar {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(241, 241, 234, 0.08);
  overflow: hidden;
}
.sr-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s var(--ease);
}
.sr-warn { background: #fbbf24; }
.sr-crit { background: #e04838; }
.sr-ok { background: var(--accent); }
.sr-qty { font-family: var(--font-d); font-size: 0.56rem; color: var(--muted); white-space: nowrap; }
.sr-badge {
  font-size: 0.5rem;
  font-weight: 600;
  padding: 0.08rem 0.32rem;
  border-radius: 999px;
  white-space: nowrap;
}
.sr-b-warn { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.sr-b-crit { background: rgba(224, 72, 56, 0.15); color: #f87171; }
.sr-b-ok { background: var(--accent-soft); color: var(--accent); }
.sr-btn {
  font-size: 0.52rem;
  font-weight: 600;
  padding: 0.16rem 0.42rem;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(198, 255, 62, 0.35);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.sr-btn:hover { background: rgba(198, 255, 62, 0.25); }
.sr-btn-muted {
  background: rgba(241, 241, 234, 0.05);
  color: var(--muted);
  border-color: var(--line);
}
.sr-btn-muted:hover { color: var(--ink); background: rgba(241, 241, 234, 0.1); }

/* Barra de estado inferior */
.dash-statusbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.3rem 0.45rem 0.1rem;
  font-size: 0.55rem;
  color: var(--muted);
  border-top: 1px solid rgba(241, 241, 234, 0.06);
  margin-top: 0.1rem;
}
.dsb-item { display: inline-flex; align-items: center; }
.dsb-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-right: 0.3rem;
  box-shadow: 0 0 5px var(--accent-glow);
}
.dsb-right { margin-left: auto; }

/* ---------- Ranura de medios reales (sustituye la maqueta) ---------- */
.mw-media { position: relative; }
.mw-shot, .mw-reel { display: none; width: 100%; object-fit: cover; object-position: top; }
.mw-shot { aspect-ratio: 16 / 10; }
.mw-reel { aspect-ratio: 16 / 10; }
.mw-media.has-shot .mw-fallback, .mw-media.has-reel .mw-fallback { display: none; }
.mw-media.has-shot .mw-shot { display: block; }
.mw-media.has-reel .mw-shot { display: none; }
.mw-media.has-reel .mw-reel { display: block; }

.mw-browser .mw-shot, .mw-browser .mw-reel { aspect-ratio: 16 / 10; }
.mw-landing .mw-shot, .mw-landing .mw-reel { aspect-ratio: 16 / 9; }
.mw-menu .mw-shot, .mw-menu .mw-reel { aspect-ratio: 4 / 5; }
.mw-dash .mw-shot, .mw-dash .mw-reel { aspect-ratio: 16 / 10; }
.big-phone .mw-shot, .big-phone .mw-reel { aspect-ratio: 9 / 19; border-radius: 26px 26px 30px 30px; }
.mini-phone .mw-shot, .mini-phone .mw-reel { aspect-ratio: 9 / 19; border-radius: 16px 16px 18px 18px; }
.big-phone .mw-media, .mini-phone .mw-media { position: absolute; inset: 0; }
.mini-phone .mw-shot, .mini-phone .mw-reel { object-position: top; }

/* ---------- Chips flotantes ---------- */
.float-chip {
  position: absolute;
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-d);
  font-size: 0.72rem; font-weight: 600;
  color: var(--ink);
  background: rgba(14, 14, 17, 0.85);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  animation: chipFloat 7s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  z-index: 3;
  white-space: nowrap;
}
@keyframes chipFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-16px) rotate(2deg); }
}
.chip-unit { color: var(--muted); font-weight: 500; }
.chip-ok { color: var(--accent); }
.chip-accent { color: var(--accent); }
.chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: blink 1.6s infinite; }

.chip-seo { top: 6%; right: 2%; }
.chip-core { bottom: 10%; left: 0; }
.chip-conv { top: 4%; right: 0; }
.chip-ctr { bottom: 14%; left: 6%; }
.chip-ios { top: 8%; left: 8%; }
.chip-android { top: 30%; right: 0; }
.chip-store { bottom: 8%; left: 4%; }
.chip-qr { top: 4%; right: 2%; }
.chip-idio { bottom: 10%; left: 0; }
.chip-tiempo { top: 5%; right: 2%; }
.chip-multi { bottom: 12%; left: 2%; }

/* ============================================================
   CONTACTO
   ============================================================ */
.contact {
  position: relative; z-index: 1;
  padding: clamp(6rem, 14vh, 10rem) 1.5rem;
  background:
    radial-gradient(60% 50% at 50% 110%, var(--accent-soft), transparent 70%),
    var(--bg);
}
.contact-inner { max-width: 720px; margin: 0 auto; }
.contact-eyebrow {
  font-size: 0.78rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.2rem;
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.contact-eyebrow::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent-glow);
}
.contact-title {
  font-family: var(--font-d);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.05;
  margin-bottom: 1.2rem;
}
.contact-sub { color: var(--muted); margin-bottom: 3rem; max-width: 520px; }

.contact-form { display: flex; flex-direction: column; gap: 1.4rem; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.f-field { display: flex; flex-direction: column; gap: 0.45rem; }
.f-field span {
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}
.f-field input, .f-field select, .f-field textarea {
  font-family: var(--font-b);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  transition: border-color 0.25s, box-shadow 0.25s;
  resize: vertical;
  width: 100%;
}
.f-field select { appearance: none; cursor: pointer; }
.f-field select option { background: var(--panel); color: var(--ink); }
.f-field input:focus, .f-field select:focus, .f-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.btn-submit { align-self: flex-start; }
.form-ok { color: var(--accent); font-size: 0.9rem; line-height: 1.4; }
.form-err { color: #f87171; font-size: 0.9rem; line-height: 1.4; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap;
  padding: 2rem clamp(1.5rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}
.footer-brand { font-family: var(--font-d); font-weight: 700; color: var(--ink); font-size: 1rem; }
.footer-tag { letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.7rem; }

/* ============================================================
   OVERLAY DE SERVICIO
   ============================================================ */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  padding: 1.5rem;
}
.overlay[hidden] { display: none; }
.overlay-backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 4, 5, 0.78);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s both;
}
.overlay-panel {
  position: relative;
  width: min(620px, 100%);
  max-height: 88vh; overflow: auto;
  background: linear-gradient(170deg, #101013, #0b0b0e);
  border: 1px solid var(--line-2);
  border-radius: 22px;
  padding: clamp(1.8rem, 5vw, 3rem);
  box-shadow: 0 60px 120px -40px rgba(0, 0, 0, 0.95);
  animation: panelUp 0.45s var(--ease) both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes panelUp {
  from { opacity: 0; transform: translateY(34px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.overlay-close {
  position: absolute; top: 1.1rem; right: 1.1rem;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  transition: all 0.25s;
}
.overlay-close:hover { color: var(--ink); border-color: var(--accent); transform: rotate(90deg); }
.overlay-idx {
  font-family: var(--font-d);
  font-size: 0.8rem; font-weight: 600; color: var(--accent);
  letter-spacing: 0.14em;
}
.overlay-title {
  font-family: var(--font-d);
  font-size: clamp(1.7rem, 4.5vw, 2.4rem);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1.1;
  margin: 0.6rem 0 1.1rem;
}
.overlay-desc { color: var(--muted); margin-bottom: 1.6rem; }
.overlay-feats { list-style: none; display: grid; gap: 0.7rem; margin-bottom: 1.8rem; }
.overlay-feats li {
  display: flex; gap: 0.8rem; align-items: baseline;
  font-size: 0.94rem;
}
.overlay-feats li::before {
  content: "→"; color: var(--accent);
  font-family: var(--font-d); font-weight: 600;
}
.overlay-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.overlay-tags span {
  font-size: 0.72rem; color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px; padding: 0.35rem 0.85rem;
  background: var(--accent-soft);
}

/* ============================================================
   RESPONSIVE — mobile-first
   ============================================================ */

/* Tablets / pantallas medianas: columna única antes de que apriete */
@media (max-width: 900px) {
  .scene-grid { grid-template-columns: 1fr; gap: 1.4rem; padding-top: 7rem; padding-bottom: 2.4rem; }
  .scene-copy { max-width: 560px; }
  .scene-stage { min-height: 340px; }
  .scene-meta { top: 5.6rem; }
  .mw-browser, .mw-dash { width: min(500px, 94%); }
  .mw-landing { width: min(430px, 92%); }
  .mw-menu { width: min(400px, 92%); }
}

/* Móvil (≤720px): layout compacto y equilibrado */
@media (max-width: 720px) {
  .rail { display: none; }
  .nav { padding: 0.9rem 1.1rem; }
  .nav-logo { font-size: 1.1rem; }
  .nav-links { gap: 0.8rem; }
  .nav-links a.nav-cta { padding: 0.42rem 0.95rem; font-size: 0.8rem; }

  .hero-scrub { height: 100vh; height: 100svh; }
  .hero-inner { padding: 4.5rem 1.25rem 3rem; }
  .hero-eyebrow { font-size: 0.68rem; margin-bottom: 1.6rem; }
  .hero-title { font-size: clamp(3rem, 16.5vw, 5.2rem); margin-bottom: 1.6rem; }
  .hero-sub { font-size: 1rem; margin-bottom: 2.2rem; }
  .hero-scrollhint { display: none; }
  .hero-cta .btn { padding: 0.75rem 1.3rem; font-size: 0.88rem; }
  .hero-manifesto { bottom: 13%; font-size: clamp(1.2rem, 5.5vw, 1.7rem); }
  .hero-manifesto span { font-size: 0.62rem; }
  .hero-progress { left: 0.9rem; height: 20vh; }

  /* Escenas: pin estable (svh) y ritmo más ágil */
  .scene-pin { height: 100vh; height: 100svh; }
  .scene-wrap { height: 300vh; }
  .scene-grid {
    display: flex; flex-direction: column; justify-content: center;
    align-items: stretch;
    gap: 1rem;
    padding: 6rem 1.1rem 1.8rem;
  }
  .scene-meta { top: 4.9rem; left: 1.1rem; gap: 0.7rem; }
  .scene-idx { font-size: 0.72rem; }
  .scene-tag { font-size: 0.6rem; letter-spacing: 0.18em; }

  .scene-copy { max-width: 100%; }
  .scene-copy h2 { font-size: clamp(1.4rem, 6.4vw, 1.85rem); line-height: 1.12; margin-bottom: 0.7rem; }
  .scene-desc { font-size: 0.88rem; line-height: 1.5; margin-bottom: 0.9rem; }
  .scene-feats { gap: 0.35rem 0.8rem; margin-bottom: 1.1rem; }
  .scene-feats li { font-size: 0.7rem; padding-left: 0.95rem; }
  .scene-copy .btn-ghost { padding: 0.6rem 1.15rem; font-size: 0.84rem; }

  .scene-stage { min-height: 0; }

  /* Mockups compactos */
  .mw-browser, .mw-dash { width: min(420px, 96%); }
  .mw-landing { width: min(380px, 94%); }
  .mw-menu { width: min(360px, 94%); }
  .big-phone { width: 148px; height: 300px; }
  .mini-phone { width: 100px; height: 200px; margin-left: -0.7rem; }
  .mw-view { height: 200px; }
  .mw-page { padding: 1rem 1.1rem 1.2rem; gap: 1rem; }
  .pg-h { font-size: 1.15rem; }
  .pg-card { height: 60px; }
  .pg-links i { width: 26px; }
  .dash-main { padding: 0.65rem 0.65rem 0.8rem; gap: 0.5rem; }
  .dash-body { grid-template-columns: 36px 1fr; min-height: 320px; }
  .dash-side { padding: 0.6rem 0.2rem; gap: 0.4rem; }
  .dash-nav-btn { width: 28px; height: 28px; }
  .dash-service-meta { display: none; }
  .dash-kpis { grid-template-columns: repeat(2, 1fr); gap: 0.35rem; }
  .dash-kpi { padding: 0.4rem 0.5rem; }
  .k-label { font-size: 0.52rem; }
  .k-value { font-size: 0.95rem; }
  .dash-canvas-container { height: 85px; }
  .o-items { display: none; }
  .dash-order { font-size: 0.62rem; padding: 0.28rem 0.35rem; }
  .menu-tabs { padding: 0.65rem 0.9rem 0.3rem; }
  .menu-tab { font-size: 0.68rem; padding: 0.36rem 0.75rem; }
  .menu-panel { padding: 0.45rem 0.9rem 1rem; }
  .menu-item { padding: 0.48rem 0; }
  .m-name { font-size: 0.72rem; }
  .dish { width: 26px; height: 26px; }
  .menu-head { padding: 0.85rem 0.9rem; }

  /* Chips: solo el principal por escena para no amontonar */
  .float-chip { font-size: 0.6rem; padding: 0.3rem 0.65rem; }
  .chip-seo, .chip-conv, .chip-ios, .chip-qr, .chip-tiempo { display: none; }

  .contact { padding: 4.5rem 1.25rem; }
  .contact-eyebrow { font-size: 0.68rem; }
  .contact-title { font-size: clamp(1.85rem, 8.5vw, 2.6rem); margin-bottom: 1rem; }
  .contact-sub { font-size: 0.92rem; margin-bottom: 2.2rem; }
  .contact-form { gap: 1.15rem; }
  .f-row { grid-template-columns: 1fr; gap: 1.15rem; }
  .btn-submit { width: 100%; justify-content: center; }

  .footer { flex-direction: column; gap: 0.35rem; justify-content: center; text-align: center; }
}

/* Móvil pequeño (≤420px): máximo ahorro de espacio */
@media (max-width: 420px) {
  .scene-wrap { height: 290vh; }
  .scene-grid { gap: 0.85rem; }
  .scene-copy h2 { font-size: clamp(1.3rem, 7vw, 1.6rem); }
  .scene-desc { font-size: 0.84rem; }
  .scene-feats li { font-size: 0.66rem; }
  .pg-card { height: 52px; }
  .big-phone { width: 136px; height: 276px; }
  .mw-view { height: 180px; }
  .dash-chart { height: 62px; }
  .overlay-panel { padding: 1.6rem 1.25rem; }
  .float-chip { display: none; }
}

/* Landscape en móviles: apretar aún más */
@media (orientation: landscape) and (max-height: 540px) {
  .scene-grid { padding-top: 4.2rem; padding-bottom: 1.4rem; gap: 0.8rem; }
  .scene-copy h2 { font-size: clamp(1.2rem, 4vw, 1.5rem); margin-bottom: 0.5rem; }
  .scene-desc { margin-bottom: 0.6rem; }
  .scene-feats { display: none; }
  .scene-stage { min-height: 0; }
  .mw-view { height: 160px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scene-wrap { height: auto; }
  .scene-pin { position: relative; height: auto; padding: 8rem 0; }
  .scene-stage { opacity: 1; transform: none; }
  .scene-copy { opacity: 1; transform: none; }
  .cursor-glow { display: none; }
}
