/* =========================================================
   SPOTLIVE — EXTERNAL HARDENED STYLESHEET (ZERO UNSAFE-INLINE)
========================================================= */
:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  --bg-page: #ffffff;
  --bg-subtle: #f5f7fb;
  --bg-card: rgba(255, 255, 255, 0.94);
  --bg-card-solid: #ffffff;
  --bg-studio: #f1f5f9;
  --dot-grid: rgba(15, 23, 42, 0.1);

  --text-1: #0f172a;
  --text-2: #475569;
  --text-3: #64748b;

  --border-1: rgba(15, 23, 42, 0.08);
  --border-2: rgba(15, 23, 42, 0.14);
  --sticky-bg: rgba(255, 255, 255, 0.92);

  --blue: #2563eb;
  --cyan: #0284c7;
  --teal: #14b8a6;
  --teal-dark: #0d9488;
  --coral: #f43f5e;
  --coral-soft: #fb7185;
  --amber: #f59e0b;
  --emerald: #059669;

  --shadow-sm: 0 4px 16px -4px rgba(15, 23, 42, 0.07);
  --shadow-xl: 0 24px 60px -18px rgba(15, 23, 42, 0.13), 0 0 0 1px rgba(15, 23, 42, 0.05);

  /* Deep Navy Mobile App Surface */
  --app-bg: #081020;
  --app-sheet: #0e192f;
  --app-card: #13213d;
  --app-border: rgba(148, 163, 184, 0.16);
  --app-text: #f8fafc;
  --app-muted: #94a3b8;
}

html[data-theme="dark"] {
  --bg-page: #060a14;
  --bg-subtle: #0b1120;
  --bg-card: rgba(15, 23, 42, 0.8);
  --bg-card-solid: #0f172a;
  --bg-studio: #090e1c;
  --dot-grid: rgba(148, 163, 184, 0.14);

  --text-1: #f8fafc;
  --text-2: #94a3b8;
  --text-3: #64748b;

  --border-1: rgba(255, 255, 255, 0.08);
  --border-2: rgba(255, 255, 255, 0.14);
  --sticky-bg: rgba(6, 10, 20, 0.9);

  --shadow-sm: 0 6px 20px -4px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 30px 70px -20px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; max-width: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--text-1);
  line-height: 1.58;
  overflow-x: clip;
  max-width: 100%;
  transition: background-color 0.4s var(--ease-out), color 0.4s var(--ease-out);
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, 0.28); border-radius: 99px; }
* { scrollbar-width: thin; scrollbar-color: rgba(100, 116, 139, 0.28) transparent; }

.is-hidden { display: none !important; }
.is-visible-block { display: block !important; }

.scroll-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 1200;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--emerald));
  transition: width 0.08s linear;
}

.brand-logo-badge {
  width: 30px; height: 30px; border-radius: 9px; background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08); padding: 3px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.08);
}
.brand-logo-badge img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-logo-lg { width: 42px; height: 42px; border-radius: 12px; padding: 4px; }
.brand-logo-sm { width: 26px; height: 26px; border-radius: 8px; padding: 2px; }

/* =========================================================
   HEADER & NAVIGATION
========================================================= */
.sticky-bar {
  position: sticky; top: 0; z-index: 900;
  background: var(--sticky-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-1);
}
.announce-bar {
  background: linear-gradient(90deg, #0f172a, #1e3a8a, #0f766e);
  color: #ffffff;
  font-size: 0.78rem; font-weight: 500;
  padding: 7px 16px; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
}
.announce-cta {
  background: rgba(255, 255, 255, 0.18); color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px;
  padding: 3px 11px; font-family: inherit; font-size: 0.72rem; font-weight: 700; cursor: pointer;
  transition: background 0.2s ease, transform 0.2s var(--ease-spring);
}
.announce-cta:hover { background: rgba(255, 255, 255, 0.3); transform: translateY(-1px); }

.nav-main {
  max-width: 1280px; margin: 0 auto; padding: 11px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.brand-link {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text-1); font-weight: 800; font-size: 1.08rem; letter-spacing: -0.025em;
  flex-shrink: 0;
}
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.7); animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(20,184,166,0.7); }
  70% { box-shadow: 0 0 0 8px rgba(20,184,166,0); }
  100% { box-shadow: 0 0 0 0 rgba(20,184,166,0); }
}
.nav-links { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-pill {
  color: var(--text-2); text-decoration: none; font-size: 0.84rem; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-pill:hover { color: var(--blue); background: rgba(37, 99, 235, 0.08); }
.nav-right { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: none; border-radius: 999px; font-family: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform 0.22s var(--ease-spring), box-shadow 0.25s ease, border-color 0.25s ease;
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: linear-gradient(135deg, #2563eb, #0d9488);
  color: #fff; padding: 8px 16px; font-size: 0.82rem;
  box-shadow: 0 8px 22px -6px rgba(37, 99, 235, 0.45);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -6px rgba(37, 99, 235, 0.6); }
.btn-ghost {
  background: var(--bg-card-solid); color: var(--text-1); border: 1px solid var(--border-2);
  padding: 7px 12px; font-size: 0.78rem; box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { transform: translateY(-1px); border-color: var(--blue); }
.btn-mini { padding: 4px 10px; font-size: 0.72rem; }
.btn-lg { padding: 13px 24px; font-size: 0.94rem; }

/* =========================================================
   SECTIONS & EDITORIAL LAYOUT
========================================================= */
main { position: relative; z-index: 1; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 22px; }
section { padding: 62px 0; }
.band-tinted { background: var(--bg-subtle); border-top: 1px solid var(--border-1); border-bottom: 1px solid var(--border-1); }

.pill-kicker {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--blue); background: rgba(37, 99, 235, 0.08); border: 1px solid rgba(37, 99, 235, 0.2);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.kicker-tight { margin-bottom: 4px; }
.kicker-rose { color: var(--coral); background: rgba(244,63,94,0.08); border-color: rgba(244,63,94,0.2); }
.kicker-teal { color: var(--teal-dark); background: rgba(20,184,166,0.1); border-color: rgba(20,184,166,0.28); }

.sec-title { font-size: clamp(1.75rem, 3.1vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.14; margin-bottom: 12px; }
.sec-lead { font-size: 1.02rem; color: var(--text-2); max-width: 720px; margin-bottom: 30px; }
.sec-title-tight { margin-bottom: 8px; }
.sec-lead-tight { margin-bottom: 0; }

.grad-text {
  background: linear-gradient(120deg, #2563eb, #0284c7 52%, #0d9488);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
html[data-theme="dark"] .grad-text {
  background: linear-gradient(120deg, #38bdf8, #818cf8 52%, #14b8a6);
  -webkit-background-clip: text; background-clip: text;
}

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.08s; } .d2 { transition-delay: 0.16s; } .d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .live-dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* =========================================================
   HERO + 3D STAGE
========================================================= */
.hero { padding: 38px 0 54px; }
.hero-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 34px; align-items: center; }
.hero-title { font-size: clamp(2.1rem, 4vw, 3.35rem); font-weight: 850; line-height: 1.06; letter-spacing: -0.035em; margin-bottom: 16px; }
.hero-sub { font-size: 1.03rem; color: var(--text-2); max-width: 540px; margin-bottom: 24px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.stats-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat-box { background: var(--bg-card-solid); border: 1px solid var(--border-1); border-radius: 16px; padding: 12px; box-shadow: var(--shadow-sm); }
.stat-box strong { display: block; font-size: 1.15rem; font-weight: 800; color: var(--blue); }
.stat-box span { font-size: 0.72rem; color: var(--text-2); }

.stage-3d-shell {
  position: relative; height: 470px; border-radius: 26px; overflow: hidden;
  background: #eef3fb; border: 1px solid var(--border-2); box-shadow: var(--shadow-xl);
  cursor: grab; user-select: none;
}
.stage-3d-shell:active { cursor: grabbing; }
#threeCanvasMount { width: 100%; height: 100%; position: relative; }
#threeCanvasMount canvas { display: block; width: 100% !important; height: 100% !important; }

.hud-top {
  position: absolute; top: 14px; left: 14px; right: 14px; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; pointer-events: none;
}
.hud-pill {
  pointer-events: auto; background: rgba(255, 255, 255, 0.94);
  color: #0f172a; border: 1px solid rgba(15, 23, 42, 0.1); border-radius: 999px;
  padding: 6px 12px; font-size: 0.72rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.hud-bottom {
  position: absolute; bottom: 14px; left: 14px; right: 14px; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; pointer-events: none;
}
.cam-pills { display: flex; gap: 5px; flex-wrap: wrap; pointer-events: auto; }
.cam-btn {
  background: rgba(255, 255, 255, 0.94); color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.12); border-radius: 999px; padding: 5px 11px;
  font-family: inherit; font-size: 0.7rem; font-weight: 700; cursor: pointer;
  transition: all 0.2s var(--ease-spring); box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}
.cam-btn:hover { transform: translateY(-1px); }
.cam-btn.active { background: #2563eb; color: #fff; border-color: transparent; }
.mood-btn.active { background: #0d9488; color: #fff; border-color: transparent; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-1); border-radius: 20px; padding: 22px; box-shadow: var(--shadow-xl);
  transition: transform 0.3s var(--ease-spring), border-color 0.25s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-6px) scale(1.01); border-color: rgba(37, 99, 235, 0.4); box-shadow: 0 28px 64px -18px rgba(37, 99, 235, 0.16); }
.card h3 { font-size: 1.03rem; font-weight: 700; margin-bottom: 6px; }
.card p { font-size: 0.88rem; color: var(--text-2); }

.fun-badge-saved {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.74rem; font-weight: 800; color: #b45309;
  background: rgba(245, 158, 11, 0.14); border: 1px solid rgba(245, 158, 11, 0.32);
  padding: 5px 12px; border-radius: 999px;
  transition: transform 0.3s var(--ease-spring);
}
html[data-theme="dark"] .fun-badge-saved { color: #fbbf24; }
.fun-badge-saved.bump { transform: scale(1.12); }

.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

.icon-pill {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px;
  background: rgba(37, 99, 235, 0.1); color: var(--blue);
  transition: transform 0.35s var(--ease-spring);
}
.card:hover .icon-pill { transform: rotate(-6deg) scale(1.1); }
.icon-pill.em { background: rgba(13, 148, 136, 0.12); color: var(--teal-dark); }
.icon-pill.am { background: rgba(217, 119, 6, 0.1); color: var(--amber); }
.icon-pill.ro { background: rgba(225, 29, 72, 0.1); color: var(--coral); }
.hero-kicker-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hero-kicker-row .pill-kicker { margin-bottom: 0; }

.pov-strip {
  margin-top: 22px; padding: 18px 22px; border-radius: 18px;
  background: var(--bg-card-solid); border: 1px solid var(--border-1);
  border-left: 4px solid var(--blue); box-shadow: var(--shadow-sm); font-size: 0.94rem;
}
.pov-label { color: var(--blue); }

/* Before vs After */
.compare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.compare-card { background: var(--bg-card-solid); border: 1px solid var(--border-1); border-radius: 22px; padding: 24px; box-shadow: var(--shadow-xl); }
.compare-card.after { border-color: rgba(13, 148, 136, 0.35); }
.compare-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.compare-desc { font-size: 0.86rem; color: var(--text-2); }
.cmp-row { margin-top: 14px; }
.cmp-head { display: flex; justify-content: space-between; font-size: 0.84rem; font-weight: 600; margin-bottom: 6px; }
.cmp-track { height: 8px; border-radius: 99px; background: rgba(100, 116, 139, 0.14); overflow: hidden; }
.cmp-fill { height: 100%; border-radius: 99px; }
.fill-coral { width: 88%; background: var(--coral); }
.fill-amber { width: 76%; background: var(--amber); }
.fill-coral-sm { width: 85%; background: var(--coral); }
.fill-teal-10 { width: 10%; background: var(--teal); }
.fill-teal-8 { width: 8%; background: var(--teal); }
.fill-blue-5 { width: 5%; background: var(--blue); }
.txt-coral { color: var(--coral); }
.txt-teal { color: var(--teal-dark); }

/* Cloud Pipeline */
.pipeline-row { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 10px; }
.pipe-step {
  background: var(--bg-card-solid); border: 1px solid var(--border-1); border-radius: 16px; padding: 18px;
  transition: border-color 0.3s ease, transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}
.pipe-step.active { border-color: var(--teal); transform: translateY(-3px); box-shadow: 0 12px 26px -10px rgba(20, 184, 166, 0.28); }
.pipe-kicker { display: block; font-size: 0.74rem; color: var(--teal-dark); margin-bottom: 4px; font-weight: 700; }
.pipe-h3 { margin-bottom: 4px; }
.pipe-arrow { width: 34px; height: 3px; background: rgba(100,116,139,0.2); border-radius: 99px; position: relative; overflow: hidden; }
.pipe-arrow::after {
  content: ""; position: absolute; inset: 0; width: 45%; left: -45%;
  background: linear-gradient(90deg, transparent, var(--blue), var(--teal));
  animation: flow 1.7s linear infinite;
}
@keyframes flow { 0% { left: -45%; } 100% { left: 105%; } }

/* =========================================================
   STUDIO + MOBILE SIMULATOR (396px CENTERED)
========================================================= */
.studio-head-row {
  display: flex; justify-content: space-between; align-items: flex-end;
  flex-wrap: wrap; gap: 16px; margin-bottom: 24px;
}
.studio-shell {
  background: var(--bg-studio);
  background-image: radial-gradient(var(--dot-grid) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  border: 1px solid var(--border-2); border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-xl);
}
.studio-dock-slot { display: none; padding: 18px 22px 0; }
.studio-dock-slot.open { display: block; }
.studio-dock-slot .stage-3d-shell { height: 330px; border-radius: 20px; }

.cloud-strip {
  background: var(--bg-card-solid); border-bottom: 1px solid var(--border-1);
  padding: 10px 22px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.cloud-nodes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.75rem; font-weight: 600; }
.c-node {
  padding: 4px 10px; border-radius: 999px; background: var(--bg-subtle); border: 1px solid var(--border-1);
  color: var(--text-2); transition: all 0.3s ease;
}
.c-node.lit { background: rgba(20, 184, 166, 0.14); border-color: var(--teal); color: var(--teal-dark); }
html[data-theme="dark"] .c-node.lit { color: #5eead4; }
.ai-sync-badge {
  font-size: 0.72rem; font-weight: 700; color: var(--blue);
  background: rgba(37, 99, 235, 0.08); border: 1px solid rgba(37, 99, 235, 0.2);
  padding: 4px 11px; border-radius: 999px;
}

.studio-body { display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: stretch; }
.phone-stage { padding: 28px 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; }

.phone-wrap { position: relative; display: flex; justify-content: center; width: 100%; max-width: 396px; }
.hw-btn { position: absolute; width: 3px; background: #94a3b8; border-radius: 2px; }
.hw-v1 { left: -3px; top: 132px; height: 42px; }
.hw-v2 { left: -3px; top: 184px; height: 42px; }
.hw-pwr { right: -3px; top: 155px; height: 64px; }

.phone-bezel {
  width: 100%; max-width: 396px; height: 760px;
  background: linear-gradient(155deg, #334155, #0f172a 42%, #1e293b);
  border-radius: 50px; padding: 11px; position: relative;
  box-shadow: 0 36px 80px -20px rgba(15, 23, 42, 0.42), 0 0 0 1.5px rgba(255, 255, 255, 0.24);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s ease;
  user-select: none; -webkit-user-select: none;
}
.phone-bezel.spotlight { animation: spotlight 1.4s var(--ease-out); }
@keyframes spotlight {
  0% { box-shadow: 0 36px 80px -20px rgba(15,23,42,0.42), 0 0 0 4px var(--teal), 0 0 50px 8px rgba(20,184,166,0.38); transform: scale(1.02); }
  100% { box-shadow: 0 36px 80px -20px rgba(15,23,42,0.42), 0 0 0 1.5px rgba(255,255,255,0.24); transform: scale(1); }
}

.phone-screen {
  width: 100%; height: 100%; background: var(--app-bg); color: var(--app-text);
  border-radius: 40px; overflow: hidden; display: flex; flex-direction: column; position: relative;
}

.ios-status {
  height: 44px; padding: 13px 26px 4px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.75rem; font-weight: 700; position: relative; z-index: 20; flex-shrink: 0; color: #f8fafc;
}
.dynamic-island {
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  width: 102px; height: 24px; background: #020617; border-radius: 999px;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 8px;
  border: 1px solid rgba(255,255,255,0.08);
}
.island-cam { width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #38bdf8, #0f172a 75%); }
.status-right { display: flex; align-items: center; gap: 5px; }
.status-5g { font-size: 0.68rem; }

/* App Top Header + Zone Tabs */
.app-head-bar { padding: 6px 14px 8px; background: var(--app-sheet); border-bottom: 1px solid var(--app-border); flex-shrink: 0; }
.app-brand-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.app-brand-left { display: flex; align-items: center; gap: 8px; }
.app-brand-title { font-size: 0.84rem; font-weight: 800; line-height: 1.1; color: #f8fafc; }
.app-brand-sub { font-size: 0.62rem; color: #94a3b8; }

.zone-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.z-tab {
  background: var(--app-card); border: 1px solid var(--app-border); color: var(--app-muted);
  padding: 6px 4px; border-radius: 10px; font-family: inherit; font-size: 0.68rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s ease; white-space: nowrap;
}
.z-tab.active { background: linear-gradient(135deg, #0d9488, #2563eb); color: #ffffff; border-color: transparent; }

.app-viewport { flex: 1; position: relative; overflow: hidden; }
.app-screen {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden;
  padding: 11px 14px 18px;
  opacity: 0; pointer-events: none; transform: translateX(26px);
  transition: transform 0.34s var(--ease-out), opacity 0.24s ease;
  scrollbar-width: none;
}
.app-screen::-webkit-scrollbar { display: none; }
.app-screen.active { opacity: 1; pointer-events: auto; transform: translateX(0); }
.app-screen.prev { opacity: 0; transform: translateX(-26px); }

.app-toast {
  position: absolute; top: 8px; left: 12px; right: 12px; z-index: 50;
  background: #0f172a; color: #fff; border: 1px solid rgba(20, 184, 166, 0.5);
  border-radius: 13px; padding: 8px 12px; font-size: 0.72rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px; box-shadow: 0 14px 28px rgba(0,0,0,0.45);
  transform: translateY(-140%); opacity: 0;
  transition: transform 0.32s var(--ease-spring), opacity 0.22s ease;
}
.app-toast.show { transform: translateY(0); opacity: 1; }

/* Creative Vehicle Vibe Bar inside Mobile App */
.vibe-bar {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-bottom: 9px;
}
.vibe-pill {
  background: var(--app-card); border: 1px solid var(--app-border); color: var(--app-muted);
  border-radius: 10px; padding: 5px 4px; font-family: inherit; font-size: 0.62rem; font-weight: 700;
  cursor: pointer; text-align: center; transition: all 0.2s var(--ease-spring);
}
.vibe-pill.active {
  background: rgba(20, 184, 166, 0.16); border-color: #2dd4bf; color: #f8fafc; transform: translateY(-1px);
}

.zone-summary-strip {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--app-card); border: 1px solid var(--app-border); border-radius: 14px;
  padding: 8px 12px; margin-bottom: 9px;
}
.zone-sum-title { font-size: 0.8rem; font-weight: 800; }
.zone-sum-sub { font-size: 0.64rem; color: #94a3b8; }
.zone-sum-rate { font-size: 0.66rem; font-weight: 700; color: #2dd4bf; }

.teal-pill {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 800;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(20, 184, 166, 0.16); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, 0.35);
}

.navy-deck {
  background: #070d1a; border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 18px; padding: 11px; margin-bottom: 9px;
}
.deck-gate-row {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono); font-size: 0.61rem; color: #94a3b8;
  margin-bottom: 9px; padding-bottom: 6px; border-bottom: 1px dashed rgba(148,163,184,0.2);
}
.dot-teal { color: #2dd4bf; }
.dot-coral { color: #fb7185; }

.grid-2x2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.bay-tile {
  height: 84px; border-radius: 14px; padding: 9px; position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  cursor: pointer; border: 1.5px solid transparent; font-family: inherit;
  transition: transform 0.2s var(--ease-spring), border-color 0.2s ease, box-shadow 0.2s ease;
}
.bay-tile.free { background: rgba(20, 184, 166, 0.13); border-color: rgba(20, 184, 166, 0.55); color: #f8fafc; }
.bay-tile.free:hover { transform: scale(1.03); border-color: #2dd4bf; }
.bay-tile.selected {
  background: rgba(20, 184, 166, 0.24); border-color: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.28); transform: scale(1.03);
}
.bay-tile.full { background: rgba(244, 63, 94, 0.12); border-color: rgba(251, 113, 133, 0.35); color: #fda4af; cursor: not-allowed; }
.bay-tile.held { background: rgba(37, 99, 235, 0.24); border-color: #60a5fa; color: #eff6ff; }
.bay-led { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; }
.bay-tile.free .bay-led, .bay-tile.selected .bay-led { background: #2dd4bf; box-shadow: 0 0 8px #2dd4bf; }
.bay-tile.full .bay-led { background: #fb7185; box-shadow: 0 0 6px #fb7185; }
.bay-tile.held .bay-led { background: #60a5fa; box-shadow: 0 0 8px #60a5fa; }
.bay-id-txt { font-family: var(--font-mono); font-size: 0.96rem; font-weight: 800; }
.bay-sub-txt { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

.ev-tag {
  position: absolute; top: 6px; left: 7px; font-size: 0.56rem; font-weight: 800; padding: 2px 6px;
  border-radius: 999px; background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4);
}
.lane-divider {
  margin: 8px 0; padding: 5px 10px; border-radius: 8px;
  background: rgba(148, 163, 184, 0.1); color: #94a3b8;
  display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.08em;
}

.reserve-card { background: var(--app-sheet); border: 1px solid var(--app-border); border-radius: 16px; padding: 10px; margin-bottom: 6px; }
.reserve-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.reserve-status { font-size: 0.72rem; font-weight: 700; }
.reserve-tag { font-size: 0.64rem; color: #2dd4bf; font-weight: 700; }
.reserve-ready { color: #2dd4bf; }

.pass-toggle-row {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
  background: var(--app-bg); padding: 4px; border-radius: 11px; margin-bottom: 8px;
}
.pt-btn {
  background: transparent; border: none; color: var(--app-muted);
  padding: 6px; border-radius: 8px; font-family: inherit; font-size: 0.68rem; font-weight: 700; cursor: pointer;
}
.pt-btn.active { background: var(--blue); color: #fff; }

.cta-teal {
  width: 100%; padding: 11px 14px; border: none; border-radius: 13px;
  font-family: inherit; font-size: 0.83rem; font-weight: 800; color: #042f2e;
  background: linear-gradient(135deg, #2dd4bf, #14b8a6);
  cursor: pointer; box-shadow: 0 8px 22px -6px rgba(20, 184, 166, 0.55);
  transition: transform 0.2s var(--ease-spring), opacity 0.2s ease;
}
.cta-teal:hover:not(:disabled) { transform: translateY(-1.5px); }
.cta-teal:disabled { opacity: 0.4; cursor: not-allowed; box-shadow: none; }

.walkin-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 0.68rem; color: var(--app-muted); }
.walkin-btn {
  background: rgba(148, 163, 184, 0.14); border: 1px solid var(--app-border);
  color: var(--app-text); padding: 4px 9px; border-radius: 999px; font-size: 0.66rem; font-weight: 700; cursor: pointer;
}
.btn-full-ghost { width: 100%; padding: 9px; border-radius: 12px; }

/* Screen 2: Navigate */
.nav-route-card { background: var(--app-card); border: 1px solid rgba(45, 212, 191, 0.35); border-radius: 18px; padding: 14px; margin-bottom: 12px; }
.nav-top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.nav-timer { font-family: var(--font-mono); font-size: 0.84rem; font-weight: 800; color: #fbbf24; }
.nav-headline { font-size: 0.98rem; font-weight: 800; margin-bottom: 3px; }
.nav-sub { font-size: 0.72rem; color: #94a3b8; }
.route-steps { display: grid; gap: 10px; margin-top: 10px; }
.r-step {
  display: flex; align-items: center; gap: 10px; font-size: 0.78rem; font-weight: 600;
  padding: 8px 10px; border-radius: 12px; background: var(--app-bg); border: 1px solid var(--app-border);
}
.r-num {
  width: 24px; height: 24px; border-radius: 50%; background: rgba(20, 184, 166, 0.18); color: #2dd4bf;
  display: grid; place-items: center; font-size: 0.72rem; font-weight: 800; flex-shrink: 0;
}
.cta-space-bottom { margin-bottom: 8px; }

/* Screen 3: QR Pass + Downloadable Card + Confetti Receipt */
.qr-pass-card { background: #ffffff; color: #0f172a; border-radius: 20px; overflow: hidden; margin-bottom: 10px; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35); }
.qr-pass-top { background: linear-gradient(135deg, #0f172a, #1e3a8a); color: #fff; padding: 11px 14px; display: flex; justify-content: space-between; align-items: center; }
.qr-pass-kicker { font-size: 0.62rem; opacity: 0.85; text-transform: uppercase; font-weight: 700; }
.qr-pass-title { font-size: 0.96rem; font-weight: 800; }
.offline-badge { font-size: 0.62rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(20,184,166,0.22); color: #5eead4; }
.qr-center-pad { padding: 8px 14px 4px; text-align: center; }
.qr-box { width: 138px; height: 138px; margin: 6px auto 6px; padding: 8px; border: 1px solid #e2e8f0; border-radius: 12px; position: relative; overflow: hidden; }
.qr-laser { position: absolute; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, transparent, #14b8a6, #2563eb, transparent); box-shadow: 0 0 10px #14b8a6; opacity: 0; }
.qr-box.scanning .qr-laser { opacity: 1; animation: laser 0.85s ease-in-out 2; }
@keyframes laser { 0% { top: 8%; } 50% { top: 90%; } 100% { top: 8%; } }
.qr-token { font-family: var(--font-mono); font-size: 0.66rem; color: #2563eb; font-weight: 700; }

.pass-meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; padding: 9px 14px 11px; border-top: 1px dashed #cbd5e1; text-align: left; }
.pm-item.span2 { grid-column: 1 / -1; }
.pm-item span { display: block; font-size: 0.58rem; color: #64748b; text-transform: uppercase; font-weight: 700; }
.pm-item strong { font-size: 0.74rem; font-weight: 800; color: #0f172a; }

.pass-actions-mini { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-bottom: 9px; }
.mini-share-btn {
  background: var(--app-card); border: 1px solid var(--app-border); color: #e2e8f0;
  padding: 7px 8px; border-radius: 11px; font-family: inherit; font-size: 0.68rem; font-weight: 700; cursor: pointer;
}
.mini-share-btn:hover { border-color: #2dd4bf; color: #2dd4bf; }

.receipt-celebrate {
  position: relative; overflow: hidden;
  background: var(--app-card); border: 1px solid rgba(20,184,166,0.45);
  border-radius: 20px; padding: 24px 16px; text-align: center;
  animation: popIn 0.4s var(--ease-spring);
}
@keyframes popIn { 0% { opacity: 0; transform: scale(0.9); } 100% { opacity: 1; transform: scale(1); } }
.receipt-icon-ring {
  width: 54px; height: 54px; border-radius: 50%; background: rgba(20,184,166,0.18); color: #2dd4bf;
  display: grid; place-items: center; margin: 0 auto 12px;
}
.receipt-title { font-size: 1.08rem; font-weight: 800; margin-bottom: 6px; color: #f8fafc; }
.receipt-sub { font-size: 0.78rem; color: #94a3b8; margin-bottom: 14px; }
.speed-badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px; margin-bottom: 16px;
  background: rgba(245, 158, 11, 0.16); color: #fbbf24; font-size: 0.7rem; font-weight: 700;
}

/* Confetti dots */
.confetti-piece {
  position: absolute; top: 10px; width: 7px; height: 7px; border-radius: 2px;
  animation: confettiFall 1.4s ease-out forwards;
}
@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(210px) rotate(360deg); opacity: 0; }
}

.app-tabbar { background: var(--app-sheet); border-top: 1px solid var(--app-border); display: grid; grid-template-columns: repeat(3, 1fr); padding: 6px 8px 4px; flex-shrink: 0; }
.tab-btn { background: none; border: none; color: var(--app-muted); display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 5px 4px; border-radius: 10px; font-family: inherit; font-size: 0.66rem; font-weight: 600; cursor: pointer; }
.tab-btn.active { color: #2dd4bf; }
.home-bar-wrap { background: var(--app-sheet); padding: 3px 0 8px; display: flex; justify-content: center; flex-shrink: 0; }
.home-bar { width: 118px; height: 4px; border-radius: 99px; background: var(--app-muted); opacity: 0.3; }

/* =========================================================
   RIGHT PANEL: LIVE PARKING SENSOR PANEL
========================================================= */
.sensor-deck {
  background: var(--bg-card-solid); border-left: 1px solid var(--border-1);
  padding: 26px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
}
.sensor-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sensor-title { font-size: 1.22rem; font-weight: 800; }
.sensor-sub { font-size: 0.85rem; color: var(--text-2); margin-bottom: 14px; }

.deck-card { background: var(--bg-subtle); border: 1px solid var(--border-1); border-radius: 16px; padding: 15px; margin-bottom: 12px; }
.deck-card:last-child { margin-bottom: 0; }
.deck-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.sync-label { color: var(--teal-dark); }

.iot-switches-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.iot-sw-card {
  background: var(--bg-card-solid); border: 1px solid var(--border-1); border-radius: 12px;
  padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.sw-name { font-size: 0.84rem; font-weight: 800; }
.sw-state { font-size: 0.7rem; font-weight: 700; }
.sw-state.free { color: var(--teal-dark); }
.sw-state.full { color: var(--coral); }
.sw-state.held { color: var(--blue); }

.switch-pill {
  width: 44px; height: 24px; border-radius: 999px; border: none; cursor: pointer; position: relative;
  background: #14b8a6; transition: background 0.25s ease; flex-shrink: 0;
}
.switch-pill::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform 0.25s var(--ease-spring);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.switch-pill.occupied { background: #f43f5e; }
.switch-pill.occupied::after { transform: translateX(20px); }

.ctrl-pair { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.c-btn {
  padding: 11px 13px; border-radius: 12px; border: 1px solid var(--border-2);
  font-family: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: transform 0.2s var(--ease-spring), border-color 0.2s ease;
}
.c-btn:active { transform: scale(0.97); }
.c-btn.sim { background: linear-gradient(135deg, #0d9488, #2563eb); color: #fff; border-color: transparent; }
.c-btn.rst { background: var(--bg-card-solid); color: var(--text-1); }

.telemetry-feed { background: var(--bg-card-solid); border: 1px solid var(--border-1); border-radius: 12px; padding: 8px 12px; font-size: 0.78rem; height: 150px; overflow-y: auto; }
.t-row { padding: 6px 0; border-bottom: 1px solid var(--border-1); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.t-row:last-child { border-bottom: none; }
.t-msg { display: flex; align-items: center; gap: 8px; color: var(--text-1); font-weight: 500; }
.t-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.t-dot.free { background: var(--teal); } .t-dot.full { background: var(--coral); } .t-dot.info { background: var(--blue); }
.t-ts { color: var(--text-3); font-size: 0.7rem; flex-shrink: 0; }

/* Benchmarks & Footer */
.bench-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bench-title { margin: 0; }
.region-tag { font-size: 0.7rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(37,99,235,0.1); color: var(--blue); }
.bench-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border-1); font-size: 0.8rem; font-weight: 600; color: var(--teal-dark); }

footer { border-top: 1px solid var(--border-1); background: var(--bg-subtle); padding: 56px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 0.65fr 1.45fr; gap: 36px; padding-bottom: 34px; border-bottom: 1px solid var(--border-1); }
.footer-brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand-name { font-size: 1.18rem; font-weight: 800; letter-spacing: -0.02em; }
.footer-brand-sub { font-size: 0.78rem; color: var(--text-2); }
.footer-brand-desc { font-size: 0.88rem; color: var(--text-2); max-width: 340px; }
.footer-col-title { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 14px; }
.footer-links { display: grid; gap: 9px; }
.footer-links a { color: var(--text-2); text-decoration: none; font-size: 0.88rem; font-weight: 500; transition: color 0.2s ease; }
.footer-links a:hover { color: var(--blue); }
.team-grid-compact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.team-card { background: var(--bg-card-solid); border: 1px solid var(--border-1); border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-sm); }
.team-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.social-ig-link {
  display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px;
  color: #e1306c; background: rgba(225, 48, 108, 0.08); border: 1px solid rgba(225, 48, 108, 0.18);
  text-decoration: none; flex-shrink: 0; transition: transform 0.2s var(--ease-spring), background 0.2s ease, color 0.2s ease;
}
.social-ig-link:hover { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); color: #fff; border-color: transparent; transform: translateY(-1px) scale(1.06); }
.team-name { font-weight: 700; font-size: 0.9rem; margin-bottom: 2px; }
.team-meta { font-size: 0.74rem; color: var(--text-2); }
.footer-bottom { padding-top: 22px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 0.8rem; color: var(--text-3); }

@media (max-width: 960px) {
  .hero-grid, .studio-body, .compare-grid, .footer-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .stage-3d-shell { height: 380px; }
  .sensor-deck { border-left: none; border-top: 1px solid var(--border-1); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pipeline-row { grid-template-columns: 1fr; gap: 8px; }
  .pipe-arrow { width: 3px; height: 24px; margin: 0 auto; }
}

@media (max-width: 768px) {
  .container { padding: 0 14px; }
  section { padding: 44px 0; }
  .hero { padding: 24px 0 38px; }
  .stage-3d-shell { height: 310px; border-radius: 20px; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4, .grid-3, .grid-2, .ctrl-pair, .team-grid-compact, .iot-switches-grid { grid-template-columns: 1fr; }
  .nav-main { padding: 10px 14px; }
  .announce-bar { font-size: 0.72rem; padding: 6px 10px; }
  .phone-stage { padding: 14px 10px; }
  .sensor-deck { padding: 18px 14px; }
}

@media (max-width: 560px) {
  .hw-btn, .ios-status, .home-bar-wrap { display: none; }
  .phone-wrap { max-width: 100%; }
  .phone-bezel {
    width: 100%; max-width: 100%; height: 635px;
    background: transparent; padding: 0; border-radius: 24px;
    box-shadow: 0 16px 40px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px var(--border-2);
  }
  .phone-screen { border-radius: 24px; }
}
