/* ═══════════════════════════════════════════════════════════════════
   NomadStart — Marketing Website (Premium v2)
   Linear / Vercel / Framer-inspired dark aesthetic
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Backgrounds */
  --bg:           #050508;
  --bg-2:         #0a0a12;
  --card:         #14141f;
  --card-2:       #1a1a26;

  /* Borders + glass */
  --border:       rgba(139, 92, 246, 0.10);
  --border-2:     rgba(139, 92, 246, 0.20);
  --glass-bg:     rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* Brand */
  --accent:       #8B5CF6;
  --accent-2:     #6D28D9;
  --accent-pink:  #EC4899;
  --accent-cyan:  #06B6D4;
  --accent-glow:  rgba(139, 92, 246, 0.35);

  /* Premium gradients (matching admin) */
  --gradient-primary:   linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
  --gradient-secondary: linear-gradient(135deg, #06B6D4 0%, #8B5CF6 100%);
  --gradient-text:      linear-gradient(135deg, #FAFAFA 0%, #C4B5FD 60%, #F0ABFC 100%);
  --gradient-mesh:      radial-gradient(at 27% 37%, rgba(139,92,246,0.18) 0px, transparent 50%),
                        radial-gradient(at 97% 21%, rgba(236,72,153,0.12) 0px, transparent 50%),
                        radial-gradient(at 52% 99%, rgba(6,182,212,0.10) 0px, transparent 50%),
                        radial-gradient(at 10% 99%, rgba(139,92,246,0.08) 0px, transparent 50%);

  /* Text */
  --text:         #FAFAFA;
  --muted:        #8B8BA8;
  --dim:          #5A5A72;

  /* States */
  --green:        #10B981;
  --red:          #EF4444;
  --amber:        #F59E0B;
  --blue:         #3B82F6;
  --cyan:         #06B6D4;

  /* Shadows */
  --shadow-lg:    0 20px 40px rgba(0,0,0,0.5);
  --shadow:       0 4px 12px rgba(0,0,0,0.35);
  --shadow-glow:  0 0 60px rgba(139, 92, 246, 0.35);

  /* Layout */
  --nav-h:        68px;
  --radius-lg:    20px;
  --radius:       14px;

  /* Animation timings */
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:  cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mesh gradient backdrop for entire page */
body::before {
  content: ""; position: fixed; inset: 0;
  background: var(--gradient-mesh);
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}

/* Premium animation library */
@keyframes fadeInUp     { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInScale  { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
@keyframes float        { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes glow         { 0%, 100% { box-shadow: 0 0 30px rgba(139,92,246,0.25); } 50% { box-shadow: 0 0 60px rgba(139,92,246,0.5); } }
@keyframes shimmer-text {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes snowfall {
  0%   { transform: translate3d(0, -10vh, 0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.6; }
  100% { transform: translate3d(20px, 110vh, 0) rotate(360deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* In-view scroll-triggered fade-in (set by IntersectionObserver in script.js) */
.will-animate {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.will-animate.in-view {
  opacity: 1;
  transform: translateY(0);
}
/* Slight stagger when the same section has multiple cards */
.feature-card.will-animate,
.pricing-card.will-animate,
.step-card.will-animate,
.review-card.will-animate {
  transition-delay: calc(var(--idx, 0) * 0.08s);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  background: var(--bg);
}
html, body {
  margin: 0; padding: 0;
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; margin: 0; }

[hidden] { display: none !important; }

/* ═══════════════ Helpers ═══════════════ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 760px; }

.logo {
  font-size: 24px; font-weight: 800; letter-spacing: -0.5px;
  color: var(--text);
}
.logo span { color: var(--accent); }

.accent { color: var(--accent); }
.dim    { color: var(--dim); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700; font-size: 14px;
  cursor: pointer;
  transition: transform 0.05s, background 0.15s, border-color 0.15s, box-shadow 0.2s;
  background: transparent;
  color: var(--text);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 15px 28px; font-size: 15px; }
.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), filter 0.2s;
}
.btn-primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.2s;
  z-index: -1;
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 40px var(--accent-glow), 0 0 0 1px rgba(255,255,255,0.1);
  filter: brightness(1.08);
}
.btn-primary:hover::before { opacity: 1; }
.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); background: var(--card); }

/* ═══════════════ NAV ═══════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.nav.scrolled { background: rgba(10, 10, 15, 0.95); }
.nav-inner {
  height: var(--nav-h);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
}
.nav-links {
  display: flex; gap: 28px;
  margin: 0 auto 0 30px;
}
.nav-links a {
  color: var(--muted);
  font-weight: 600; font-size: 14px;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--accent); }

/* 3D demo link — purple pill highlight */
.nav-links a.nav-3d {
  background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(236,72,153,0.10));
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  transition: all 0.18s;
}
.nav-links a.nav-3d:hover {
  background: linear-gradient(135deg, rgba(139,92,246,0.30), rgba(236,72,153,0.20));
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.4);
  color: #fff;
}

.nav-cta { padding: 10px 18px; font-size: 14px; }

.nav-burger {
  display: none;
  background: transparent; border: none;
  width: 36px; height: 36px;
  flex-direction: column; justify-content: space-between; align-items: center;
  padding: 9px 6px;
}
.nav-burger span {
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  position: absolute; top: var(--nav-h); left: 0; right: 0;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  display: none;
  flex-direction: column;
  gap: 6px;
}
.nav-mobile.open { display: flex; animation: slideDown 0.25s ease-out; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.nav-mobile a {
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text);
  font-weight: 600;
}
.nav-mobile a:hover { background: var(--card-2); }
.nav-mobile .btn-primary { margin-top: 8px; }

@media (max-width: 820px) {
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
}

/* ═══════════════ HERO ═══════════════ */
.hero {
  min-height: 100vh;
  padding: calc(var(--nav-h) + 40px) 20px 60px;
  position: relative;
  display: flex; align-items: center;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(139, 92, 246, 0.20), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(236, 72, 153, 0.15), transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(6, 182, 212, 0.10), transparent 60%),
    var(--bg);
  overflow: hidden;
}
/* Floating orbs for hero depth */
.hero::before, .hero::after {
  content: ""; position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}
.hero::before {
  width: 400px; height: 400px;
  background: rgba(139, 92, 246, 0.18);
  top: 10%; left: -10%;
  animation: float 8s ease-in-out infinite;
}
.hero::after {
  width: 350px; height: 350px;
  background: rgba(236, 72, 153, 0.14);
  bottom: 5%; right: -5%;
  animation: float 10s ease-in-out infinite reverse;
}
.hero-content {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px;
  align-items: center;
  position: relative;
  z-index: 20;          /* sits above all depth/lighting/shadow layers */
  isolation: isolate;   /* breaks out of mix-blend-mode darkening */
}

.hero-text { animation: heroFadeIn 0.8s ease-out; }
@keyframes heroFadeIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.hero-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 92, 246, 0.30);
  color: var(--accent);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.15);
  animation: glow 4s ease-in-out infinite;
}
.hero-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 0 0 18px;
  color: #FAFAFA;
  text-shadow:
    0 2px 14px rgba(139, 92, 246, 0.4),
    0 0 50px rgba(0, 0, 0, 0.6);
}
/* Highlight one accent word inside title with gradient clip (only THAT child) */
.hero-title .accent {
  background: var(--gradient-text);
  background-size: 200% auto;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
          text-fill-color: transparent;
  animation: shimmer-text 8s linear infinite;
}
.hero-sub {
  font-size: clamp(15px, 2vw, 19px);
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 540px;
}
.hero-sub strong { color: var(--amber); font-weight: 700; }

.hero-cta { display: flex; gap: 12px; margin-bottom: 32px; flex-wrap: wrap; }

.hero-trust {
  display: flex; flex-wrap: wrap; gap: 6px 20px;
  font-size: 13px; color: var(--muted);
}

/* Hero visual — temperature journey */
/* ═════════════ PREMIUM HERO BACKGROUND ═════════════ */
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; isolation: isolate; }
.hero-grid {
  position: absolute; inset: -40%;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 65%);
          mask-image: radial-gradient(ellipse at center, #000 0%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 65%);
  animation: gridDrift 30s linear infinite;
  opacity: 0.5;
}
@keyframes gridDrift { to { transform: translate(56px, 56px); } }

/* ═══════════════ LAYERED PARALLAX DEPTH SCENE (with lighting + shadows) ═══════════════ */
.hero-depth { perspective: 1500px; }

/* Combine scroll-Y (--sy) + mouse-XY (--mx, --my) into a single transform.
   JS lerp already smooths, so transition is short (anti-aliasing between rAF frames).
   When user scrolls fast, depth layers don't snap but glide. */
[data-depth] {
  transform: translate3d(var(--mx, 0), calc(var(--sy, 0px) + var(--my, 0px)), 0);
  transition: transform 0.08s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.depth-layer,
.depth-haze,
.depth-light,
.depth-cast-shadow {
  position: absolute;
  pointer-events: none;
  will-change: transform;
}

/* ───── ATMOSPHERIC HAZE (depth via fog between layers) ───── */
.depth-haze-far {
  bottom: 28%; left: 0; right: 0;
  height: 25vh;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(120, 90, 180, 0.10) 40%,
    rgba(80, 60, 140, 0.18) 100%);
  filter: blur(8px);
  /* Removed mix-blend — keep haze below content z-stack instead */
}
.depth-haze-mid {
  bottom: 16%; left: 0; right: 0;
  height: 18vh;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(60, 40, 100, 0.18) 50%,
    rgba(30, 20, 60, 0.28) 100%);
  filter: blur(6px);
}

/* ───── LIGHTING ───── */

/* Warm sunrise rim from horizon — bottom glow */
.depth-sunrise {
  bottom: 8%; left: 0; right: 0;
  height: 35vh;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255, 160, 80, 0.28) 0%, rgba(255, 100, 140, 0.10) 35%, transparent 65%);
  mix-blend-mode: screen;
  filter: blur(2px);
  animation: sunriseBreath 12s ease-in-out infinite;
}
@keyframes sunriseBreath {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1.0; }
}

/* Cool moonlight wash from above */
.depth-moonlight {
  top: 0; left: 0; right: 0;
  height: 50vh;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(180, 200, 255, 0.10) 0%, transparent 60%);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Volumetric god rays — top-right diagonal beams */
.depth-godrays {
  top: 0; right: 0;
  width: 60%; height: 70%;
  mix-blend-mode: screen;
  opacity: 0.7;
  pointer-events: none;
  animation: godrayShift 14s ease-in-out infinite;
}
@keyframes godrayShift {
  0%, 100% { opacity: 0.5; transform: translate3d(var(--mx, 0), calc(var(--sy, 0px) + var(--my, 0px)), 0); }
  50%      { opacity: 0.85; }
}

/* Bottom warm bounce light off snow ground */
.depth-bounce {
  bottom: 0; left: 0; right: 0;
  height: 12vh;
  background: linear-gradient(180deg,
    transparent 0%,
    rgba(245, 160, 95, 0.08) 50%,
    rgba(255, 200, 130, 0.16) 100%);
  mix-blend-mode: screen;
}

/* ───── SHADOWS ───── */

/* Cast shadow projecting from near hill onto frost */
.depth-cast-shadow {
  bottom: 0; left: 0; right: 0;
  height: 8vh;
  background: linear-gradient(180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.18) 50%,
    transparent 100%);
  filter: blur(2px);
}

/* Stronger drop shadows on mountain SVGs (replace previous) */
.depth-mtn-far  { filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.55)); }
.depth-mtn-mid  { filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.65)); }
.depth-hill-near{ filter: drop-shadow(0 14px 36px rgba(0, 0, 0, 0.75)); }

/* Stronger vignette for cinematic edge falloff. NO mix-blend (would darken text). */
.depth-vignette {
  background:
    radial-gradient(ellipse at center, transparent 50%, rgba(5, 5, 8, 0.35) 80%, rgba(5, 5, 8, 0.65) 100%);
}

/* Layer 0: Sky base */
.depth-sky {
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(139, 92, 246, 0.18), transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(236, 72, 153, 0.14), transparent 55%),
    linear-gradient(180deg, #0a0612 0%, #1a0e2a 60%, #2a0e3e 100%);
}

/* Layer 1 + 3: Mountain ridge SVGs */
.depth-mtn-far {
  bottom: 18%; left: -5%; right: -5%; width: 110%;
  height: 36vh;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}
.depth-mtn-mid {
  bottom: 12%; left: -5%; right: -5%; width: 110%;
  height: 32vh;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.6));
}

/* Layer 5: Near hill */
.depth-hill-near {
  bottom: 0; left: -5%; right: -5%; width: 110%;
  height: 22vh;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.7));
}

/* Layer 6: Frost / snow texture */
.depth-frost {
  bottom: 0; left: 0; right: 0;
  height: 10vh;
  background:
    linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.04) 60%, rgba(255, 255, 255, 0.10) 100%),
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 12px,
      rgba(255, 255, 255, 0.02) 12px,
      rgba(255, 255, 255, 0.02) 14px);
}

/* Layer 7: Vignette + lens flare */
.depth-vignette {
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(5, 5, 8, 0.55) 100%);
  mix-blend-mode: multiply;
}
.depth-flare {
  top: 12%; right: 8%;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255, 200, 120, 0.12), transparent 60%);
  filter: blur(20px);
  border-radius: 50%;
  animation: flarePulse 6s ease-in-out infinite;
}
@keyframes flarePulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 0.9; transform: scale(1.15); }
}

.hero-orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
}
.hero-orb-1 { top: 10%; left: -8%; width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(139,92,246,0.55), transparent 70%);
  animation: orbDrift1 14s ease-in-out infinite; }
.hero-orb-2 { bottom: 5%; right: -8%; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(236,72,153,0.45), transparent 70%);
  animation: orbDrift2 18s ease-in-out infinite; }
.hero-orb-3 { top: 50%; left: 50%; width: 360px; height: 360px; margin: -180px 0 0 -180px;
  background: radial-gradient(circle, rgba(6,182,212,0.30), transparent 70%);
  animation: orbDrift3 22s ease-in-out infinite; }
@keyframes orbDrift1 { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(40px, 30px); } }
@keyframes orbDrift2 { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(-30px, -40px); } }
@keyframes orbDrift3 { 0%, 100% { transform: translate(0,0) scale(1); } 50% { transform: translate(20px, -20px) scale(1.05); } }

/* Pill dot — pulsing live indicator */
.hero-pill-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: dotPulse 1.6s ease-in-out infinite;
}
@keyframes dotPulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.7); } }

/* Letter-by-letter reveal effect for h1 / hero-sub (script.js wraps each char in <span class="lr">) */
[data-reveal] .lr {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em);
  animation: letterIn 0.55s var(--ease-out) forwards;
}

@keyframes letterIn { to { opacity: 1; transform: translateY(0); } }

/* ═════════════ HERO SHOWCASE — single card with opening lid ═════════════ */
.hero-showcase {
  position: relative;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1.05 / 1;
  margin: 0 auto;
  perspective: 1400px;
  animation: heroFadeIn 1s 0.2s var(--ease-out) backwards;
}

/* INSIDE PCB — visible when lid lifts */
.hs-inside {
  position: absolute;
  inset: 16% 6% 6% 6%;
  background: linear-gradient(135deg, #0a4332 0%, #062a20 100%);
  border-radius: 18px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 28px 22px 22px;
  box-shadow: inset 0 4px 12px rgba(0, 0, 0, 0.5);
  display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
.hs-inside-grid {
  position: absolute; inset: 0; border-radius: 18px;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 12px 12px;
  pointer-events: none;
  opacity: 0.5;
}
.hs-chip {
  width: 110px; height: 110px;
  margin: 12px auto;
  background: linear-gradient(135deg, #1a1a2e, #050508);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  text-align: center; line-height: 1.2;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55), 0 0 20px rgba(0, 245, 180, 0.15);
  position: relative;
  z-index: 1;
}
.hs-chip-shine {
  position: absolute; inset: 0; border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent 50%);
}

/* 4 relay LEDs at corners around chip */
.hs-relay {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green), 0 0 24px rgba(16, 185, 129, 0.5);
  z-index: 2;
}
.hs-relay-1 { top: 36%;    left: 22%; animation: relayBlinkLg 2s ease-in-out 0.0s infinite; }
.hs-relay-2 { top: 36%;    right: 22%; animation: relayBlinkLg 2s ease-in-out 0.4s infinite; background: var(--amber); box-shadow: 0 0 12px var(--amber), 0 0 24px rgba(245, 158, 11, 0.5); }
.hs-relay-3 { bottom: 32%; left: 22%; animation: relayBlinkLg 2s ease-in-out 0.8s infinite; }
.hs-relay-4 { bottom: 32%; right: 22%; animation: relayBlinkLg 2s ease-in-out 1.2s infinite; background: rgba(255,255,255,0.2); box-shadow: none; }
@keyframes relayBlinkLg { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }

.hs-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(16, 185, 129, 0.85);
  padding: 8px 12px;
  border: 1px dashed rgba(16, 185, 129, 0.3);
  border-radius: 6px;
  display: flex; align-items: center; gap: 8px;
  position: relative; z-index: 2;
}
.hs-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
  animation: dotPulse 1.6s ease-in-out infinite;
}
.hs-status-text { flex: 1; }
.hs-status-rssi { color: rgba(255, 255, 255, 0.65); }

/* LID — top half that lifts open as user scrolls through hero (scroll-driven) */
.hs-lid {
  position: absolute;
  inset: 4% 4% 50% 4%;
  background: linear-gradient(135deg, #1a1a26 0%, #0a0a14 100%);
  border-radius: 20px 20px 4px 4px;
  border: 1.5px solid rgba(139, 92, 246, 0.4);
  padding: 28px 24px 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 30px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(139, 92, 246, 0.4);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  transform-origin: bottom center;
  transform-style: preserve-3d;
  z-index: 5;
  /* Scroll-driven: rotates -110° as user scrolls from 0 → 80% of hero.
     Falls back to time-loop when --p var hasn't been set yet (initial paint, JS off). */
  --lid-deg: calc(min(var(--p, 0), 0.8) * -137.5deg);   /* 0..0.8 → 0..-110deg */
  transform: rotateX(var(--lid-deg));
  transition: transform 0.12s var(--ease-out);
}
/* Fallback time-loop only if scroll progress hasn't been set yet */
@supports not (animation-timeline: scroll()) {
  /* Modern browsers will use the scroll-driven --p var. The time-loop only
     activates as a tiny grace period before scroll JS attaches. */
  .hs-lid:not([style*="--p"]) {
    animation: lidCycle 8s ease-in-out infinite;
  }
}
.hs-lid-glow {
  position: absolute; inset: -2px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(236, 72, 153, 0.4));
  border-radius: 20px 20px 4px 4px;
  filter: blur(20px);
  opacity: 0.5;
  z-index: -1;
  animation: pulseGlow 3s ease-in-out infinite;
}

/* Open/close cycle — lid lifts to reveal interior, then closes */
@keyframes lidCycle {
  0%   { transform: rotateX(0deg)  translateY(0); }
  20%  { transform: rotateX(-110deg) translateY(0); }   /* lid open */
  70%  { transform: rotateX(-110deg) translateY(0); }   /* hold open */
  90%  { transform: rotateX(0deg)  translateY(0); }     /* close */
  100% { transform: rotateX(0deg)  translateY(0); }
}

/* On hover — force lid fully open regardless of scroll position */
.hero-showcase:hover .hs-lid { transform: rotateX(-110deg); transition: transform 0.5s var(--ease-spring); }
.hero-showcase:hover .hs-tag { opacity: 1; }

/* NomadStart logo on the lid */
.hs-brand {
  display: flex; align-items: center; gap: 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.02em;
  color: #fff;
}
.hs-brand-mark {
  width: 36px; height: 36px;
  background: var(--gradient-primary);
  clip-path: polygon(20% 0%, 100% 0%, 80% 100%, 0% 100%);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
  animation: hueRotate 6s linear infinite;
}
@keyframes hueRotate { to { filter: hue-rotate(360deg); } }
.hs-brand-text span {
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hs-tagline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}
.hs-leds {
  display: flex; gap: 14px;
  margin-top: 4px;
}
.hs-led {
  width: 8px; height: 8px; border-radius: 50%;
}
.hs-led-1 { background: var(--blue);   box-shadow: 0 0 12px var(--blue);   animation: ledBlinkHs 2s ease-in-out 0.0s infinite; }
.hs-led-2 { background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: ledBlinkHs 2s ease-in-out 0.3s infinite; }
.hs-led-3 { background: var(--cyan);   box-shadow: 0 0 12px var(--cyan);   animation: ledBlinkHs 2s ease-in-out 0.6s infinite; }
@keyframes ledBlinkHs { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* Floating accent tags around the showcase */
.hs-tag {
  position: absolute;
  background: rgba(20, 14, 30, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 24px rgba(139,92,246,0.3);
  pointer-events: none;
  z-index: 6;
  opacity: 0;
  animation: hsTagDrift 8s ease-in-out infinite, hsTagEnter 0.6s var(--ease-spring) forwards;
}
.hs-tag-1 { top: -8px;     left: -16px;  animation-delay: 1.6s, 1.6s; border-color: rgba(245, 158, 11, 0.4); }
.hs-tag-2 { top: 12%;      right: -30px; animation-delay: 2.0s, 2.0s; border-color: rgba(239, 68, 68, 0.4); }
.hs-tag-3 { bottom: 18%;   left: -24px;  animation-delay: 2.4s, 2.4s; border-color: rgba(6, 182, 212, 0.4); }
.hs-tag-4 { bottom: -8px;  right: 0;     animation-delay: 2.8s, 2.8s; border-color: rgba(16, 185, 129, 0.4); }

@keyframes hsTagEnter { to { opacity: 1; } }
@keyframes hsTagDrift {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -6px; }
}

@media (max-width: 900px) {
  .hero-showcase { max-width: 380px; }
  .hs-tag-2, .hs-tag-3 { display: none; }
}
@media (max-width: 540px) {
  .hero-showcase { max-width: 320px; }
  .hs-tag { font-size: 10px; padding: 5px 10px; }
  .hs-tag-1, .hs-tag-4 { display: none; }
}

.demo-card {
  position: relative;
  padding: 16px 16px 18px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s, border-color 0.35s;
  isolation: isolate;
  overflow: hidden;
}
.demo-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(139,92,246,0.08), transparent 60%);
  z-index: -1;
  border-radius: var(--radius-lg);
  opacity: 0;
  transition: opacity 0.35s;
}
.demo-card:hover {
  transform: translateY(-6px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}
.demo-card:hover::before { opacity: 1; }

.demo-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.demo-label span {
  background: var(--gradient-primary);
  color: #fff; padding: 2px 7px; border-radius: 4px;
  font-weight: 700;
}

/* ── Component 1: Phone (App demo) ── */
.phone-3d {
  position: relative; display: flex; justify-content: center;
  perspective: 1000px;
}
.phone-3d-frame {
  width: 100%; max-width: 240px;
  background: linear-gradient(135deg, #14141f, #1a1a26);
  border-radius: 32px;
  padding: 14px 10px 16px;
  border: 1.5px solid rgba(139, 92, 246, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    0 0 0 1px rgba(0,0,0,0.4),
    0 24px 60px rgba(0,0,0,0.6),
    0 0 80px rgba(139, 92, 246, 0.25);
  position: relative;
  transform: rotateY(-4deg) rotateX(2deg);
  transition: transform 0.5s var(--ease-out);
}
.demo-card:hover .phone-3d-frame { transform: rotateY(0deg) rotateX(0deg); }
.phone-3d-notch {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 70px; height: 18px;
  background: #000; border-radius: 0 0 12px 12px;
  z-index: 2;
}
.phone-3d-screen {
  background: linear-gradient(180deg, #050508 0%, #0f0c1a 100%);
  border-radius: 22px;
  padding: 28px 14px 14px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 380px;
  position: relative;
  overflow: hidden;
}
/* Subtle ambient glow inside phone screen */
.phone-3d-screen::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(139,92,246,0.18), transparent 60%);
  pointer-events: none;
}
.app-statusbar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; color: var(--muted);
}
.app-time { font-family: 'JetBrains Mono', monospace; }
.app-greet { margin-top: 4px; }
.app-greet small { font-size: 11px; color: var(--muted); }
.app-greet h4 {
  margin: 2px 0 0; font-size: 18px; font-weight: 700;
  letter-spacing: -0.01em;
}
.app-temp-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(239, 68, 68, 0.06));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.app-tlabel { font-size: 10px; color: var(--muted); display: block; text-transform: uppercase; letter-spacing: 0.06em; }
.app-tval {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 22px; color: var(--amber);
  text-shadow: 0 0 14px rgba(245,158,11,0.4);
}
.app-temp-pulse { display: flex; gap: 3px; align-items: flex-end; height: 22px; }
.app-temp-pulse span {
  width: 3px; background: var(--amber); border-radius: 2px;
  animation: bar 1.2s ease-in-out infinite;
}
.app-temp-pulse span:nth-child(1) { height: 40%; animation-delay: 0s; }
.app-temp-pulse span:nth-child(2) { height: 70%; animation-delay: 0.15s; }
.app-temp-pulse span:nth-child(3) { height: 50%; animation-delay: 0.30s; }
@keyframes bar { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0.4); } }

.app-status-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.app-status-tile {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.app-status-tile span:first-child { font-size: 14px; }
.app-status-tile strong {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 12px;
}
.app-status-tile small { font-size: 9px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

.app-start-btn {
  position: relative;
  background: var(--gradient-primary);
  color: #fff; border: none;
  padding: 12px 14px;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 600; font-size: 13px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  margin-top: auto;
  isolation: isolate;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
  overflow: hidden;
}
.app-start-glow {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent 60%);
  z-index: -1;
  animation: shimmer-text 4s ease-in-out infinite;
}
.app-start-icon { font-size: 14px; }

.app-toast {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--green);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 11px; font-weight: 500;
  text-align: center;
  margin-top: 6px;
  animation: toastIn 0.5s 0.8s var(--ease-out) backwards;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ── Component 2: ESP32 Hardware demo ── */
.demo-hw .hw-board {
  background: linear-gradient(135deg, #0a4332 0%, #062a20 100%);
  border-radius: 14px;
  padding: 22px 16px;
  position: relative;
  border: 1px solid rgba(16, 185, 129, 0.25);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 12px 30px rgba(0,0,0,0.5),
    0 0 50px rgba(16, 185, 129, 0.18);
  min-height: 380px;
  display: flex; flex-direction: column; gap: 16px;
}
/* PCB texture — green dots */
.demo-hw .hw-board::before {
  content: ""; position: absolute; inset: 0; border-radius: 14px;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 12px 12px;
  pointer-events: none;
  opacity: 0.5;
}

.hw-chip {
  align-self: center;
  width: 130px; height: 130px;
  background: linear-gradient(135deg, #1a1a2e, #050508);
  border-radius: 8px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.85);
  text-align: center;
  letter-spacing: 0.06em;
}
.hw-chip-shine {
  position: absolute; inset: 0; border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), transparent 50%);
  pointer-events: none;
}
.hw-chip-label { position: relative; z-index: 1; line-height: 1.2; }
.hw-pin {
  position: absolute; width: 4px; height: 4px; border-radius: 50%;
  background: rgba(255, 200, 100, 0.8);
  box-shadow: 0 0 4px rgba(255, 200, 100, 0.6);
}
.hw-pin-tl { top: 8px; left: 8px; }
.hw-pin-tr { top: 8px; right: 8px; }
.hw-pin-bl { bottom: 8px; left: 8px; }
.hw-pin-br { bottom: 8px; right: 8px; }

.hw-relays {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
  position: relative; z-index: 1;
}
.hw-relays li {
  display: flex; align-items: center; gap: 10px;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(16, 185, 129, 0.18);
  padding: 8px 12px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.04em;
}
.hw-relay-led {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
  background: rgba(255,255,255,0.2);
  transition: background 0.2s, box-shadow 0.2s;
}
.hw-relay-led.on    { background: var(--green); box-shadow: 0 0 8px var(--green), 0 0 16px rgba(16,185,129,0.6); }
.hw-relay-led.pulse { background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: relayPulse 1.4s ease-in-out infinite; }
.hw-relay-led.off   { background: rgba(255,255,255,0.15); }
@keyframes relayPulse {
  0%, 100% { box-shadow: 0 0 4px var(--amber), 0 0 0 0 rgba(245,158,11,0.5); transform: scale(1); }
  50%      { box-shadow: 0 0 16px var(--amber), 0 0 0 8px rgba(245,158,11,0); transform: scale(1.15); }
}
.hw-relay-name { flex: 1; }
.hw-relay-state {
  font-weight: 700; color: rgba(255,255,255,0.95);
  font-size: 10px; letter-spacing: 0.1em;
}

.hw-conn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(16, 185, 129, 0.85);
  padding: 8px 12px;
  border: 1px dashed rgba(16, 185, 129, 0.25);
  border-radius: 6px;
  display: flex; align-items: center; gap: 8px;
  position: relative; z-index: 1;
}
.hw-conn-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
  animation: dotPulse 1.6s ease-in-out infinite;
}
.hw-conn-rssi { margin-left: auto; color: rgba(255,255,255,0.6); }

/* Animated link line (hidden on mobile) */
.demo-link {
  position: absolute;
  left: calc(50% - 100px); top: 50%;
  width: 200px; height: 40px;
  pointer-events: none;
  opacity: 0.6;
}
@media (max-width: 900px) { .demo-link { display: none; } }

/* Snowflakes */
.snowflakes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}
.snowflakes span {
  position: absolute;
  color: rgba(255,255,255,0.35);
  font-size: 14px;
  animation: snowFall linear infinite;
  top: -5%;
}
@keyframes snowFall {
  to { transform: translateY(110vh) translateX(40px) rotate(360deg); }
}
.snowflakes span:nth-child(1)  { left: 5%;  animation-duration: 12s; animation-delay: 0s;  font-size: 14px; }
.snowflakes span:nth-child(2)  { left: 15%; animation-duration: 14s; animation-delay: 2s;  font-size: 10px; }
.snowflakes span:nth-child(3)  { left: 25%; animation-duration: 10s; animation-delay: 4s;  font-size: 16px; }
.snowflakes span:nth-child(4)  { left: 35%; animation-duration: 13s; animation-delay: 1s;  font-size: 12px; }
.snowflakes span:nth-child(5)  { left: 45%; animation-duration: 15s; animation-delay: 3s;  font-size: 14px; }
.snowflakes span:nth-child(6)  { left: 55%; animation-duration: 11s; animation-delay: 5s;  font-size: 10px; }
.snowflakes span:nth-child(7)  { left: 65%; animation-duration: 14s; animation-delay: 0.5s;font-size: 16px; }
.snowflakes span:nth-child(8)  { left: 75%; animation-duration: 12s; animation-delay: 2.5s;font-size: 12px; }
.snowflakes span:nth-child(9)  { left: 85%; animation-duration: 13s; animation-delay: 4.5s;font-size: 14px; }
.snowflakes span:nth-child(10) { left: 95%; animation-duration: 11s; animation-delay: 1.5s;font-size: 10px; }
.snowflakes span:nth-child(11) { left: 10%; animation-duration: 16s; animation-delay: 6s;  font-size: 12px; }
.snowflakes span:nth-child(12) { left: 30%; animation-duration: 14s; animation-delay: 7s;  font-size: 14px; }
.snowflakes span:nth-child(13) { left: 50%; animation-duration: 13s; animation-delay: 8s;  font-size: 10px; }
.snowflakes span:nth-child(14) { left: 70%; animation-duration: 12s; animation-delay: 9s;  font-size: 16px; }
.snowflakes span:nth-child(15) { left: 90%; animation-duration: 15s; animation-delay: 3.5s;font-size: 12px; }

@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-trust { justify-content: center; }
  .hero-cta { justify-content: center; }
  /* Stack the two demo cards vertically on mobile — App first, Hardware below */
  .hero-demo {
    grid-template-columns: 1fr;
    gap: 18px;
    max-width: 380px;
    margin: 0 auto;
  }
  .demo-hw .hw-board { min-height: auto; }
  .phone-3d-frame { transform: none; }
  /* Reduce animation complexity on mobile for performance */
  .hero-orb { filter: blur(60px); animation-duration: 24s; }
  .hero-grid { display: none; }
}
@media (max-width: 520px) {
  .phone-3d-frame { max-width: 220px; }
}

/* ═══════════════ SECTIONS ═══════════════ */
.section {
  padding: 90px 20px;
  position: relative;
}

.section-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent);
  display: block; margin-bottom: 14px;
  opacity: 0.8;
}

/* ═══════════════ CINEMATIC SCENES (scroll-driven) ═══════════════ */
.cinema-scene {
  position: relative;
  min-height: 180vh;
  z-index: 2;
}
.cinema-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  overflow: hidden;
}
.cinema-text {
  /* Slides up + fades in based on parent --p */
  transform: translateY(calc((1 - min(var(--p, 0) * 2.5, 1)) * 40px));
  opacity: min(var(--p, 0) * 3, 1);
  transition: transform 0.1s linear, opacity 0.1s linear;
  position: relative; z-index: 10;
}
.cinema-pin > .scene-phone-mock,
.cinema-pin > .scene-hw-stage,
.cinema-pin > .signal-svg,
.cinema-pin > .signal-latency,
.warm-content {
  position: relative; z-index: 10;
}
/* Cinema-grid + warm-bg are pure decoration — keep them well below */
.cinema-grid, .warm-bg, .phone-backdrop { z-index: 0 !important; }
.cinema-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent); display: block; margin-bottom: 14px; opacity: 0.8;
}
.cinema-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700; line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  background: var(--gradient-text);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.cinema-sub {
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 18px);
  max-width: 460px;
  margin: 0;
}
.cinema-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse at center, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ─── SCENE 2 · Phone closeup ─── */
.scene-phone {}
.phone-backdrop {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(139, 92, 246, 0.20), transparent 55%),
    radial-gradient(ellipse at 30% 70%, rgba(236, 72, 153, 0.12), transparent 50%);
  pointer-events: none;
  z-index: 0;
}
.scene-phone-mock {
  position: relative;
  display: flex; justify-content: center; align-items: center;
  /* Slides in from right + scales as scroll progresses through the scene */
  transform:
    translateX(calc((1 - min(var(--p, 0) * 2, 1)) * 100px))
    scale(calc(0.85 + min(var(--p, 0) * 1.2, 1) * 0.15));
  opacity: min(var(--p, 0) * 2, 1);
  transition: transform 0.1s linear, opacity 0.1s linear;
}
.spm-frame {
  position: relative;
  width: 280px;
  background: linear-gradient(135deg, #14141f, #1a1a26);
  border-radius: 32px;
  padding: 14px 10px 16px;
  border: 1.5px solid rgba(139, 92, 246, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 100px rgba(139, 92, 246, 0.35);
}
.spm-notch {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  width: 80px; height: 22px; background: #000; border-radius: 0 0 14px 14px; z-index: 2;
}
.spm-screen {
  background: linear-gradient(180deg, #050508 0%, #0f0c1a 100%);
  border-radius: 22px;
  padding: 36px 16px 16px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 460px;
  position: relative;
  overflow: hidden;
}
.spm-screen::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(139,92,246,0.18), transparent 60%);
  pointer-events: none;
}
.spm-time {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted);
}
.spm-greet { font-size: 13px; color: var(--muted); }
.spm-card {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(239, 68, 68, 0.06));
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: center;
}
.spm-card small { font-size: 11px; color: var(--muted); display: block; text-transform: uppercase; letter-spacing: 0.06em; }
.spm-card strong {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 18px; color: var(--amber);
  text-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
}
.spm-bars { display: flex; gap: 4px; align-items: flex-end; height: 28px; }
.spm-bars span {
  width: 4px; background: var(--amber); border-radius: 2px;
  animation: bar 1.2s ease-in-out infinite;
}
.spm-bars span:nth-child(1) { height: 40%; }
.spm-bars span:nth-child(2) { height: 70%; animation-delay: 0.15s; }
.spm-bars span:nth-child(3) { height: 50%; animation-delay: 0.30s; }

.spm-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.spm-tile {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 12px; padding: 10px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.spm-tile span:first-child { font-size: 16px; }
.spm-tile strong {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 13px;
}

.spm-btn {
  position: relative;
  background: var(--gradient-primary);
  color: #fff; padding: 14px 18px;
  border-radius: 14px;
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 14px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: auto;
  box-shadow: 0 10px 30px rgba(139, 92, 246, 0.5);
  isolation: isolate;
  overflow: hidden;
}
.spm-btn-pulse {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent 60%);
  animation: shimmer-text 4s ease-in-out infinite;
  z-index: -1;
}

/* Tap ripple — appears at button position, scales out as scroll past button-press point */
.scene-tap-ripple {
  position: absolute;
  bottom: 18%; left: 50%;
  width: 80px; height: 80px;
  margin-left: -40px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  pointer-events: none;
  opacity: calc(min(max(var(--p, 0) - 0.4, 0) * 2, 1));
  transform: translate(-50%, -50%) scale(calc(1 + max(var(--p, 0) - 0.4, 0) * 4));
  transition: opacity 0.1s linear, transform 0.1s linear;
}

/* ─── SCENE 3 · Signal travels ─── */
.scene-signal {}
.scene-signal .cinema-pin {
  grid-template-columns: 1fr;
  text-align: center;
}
.scene-signal .cinema-text {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.scene-signal .cinema-sub { margin-left: auto; margin-right: auto; }

.signal-svg {
  width: 100%; max-width: 900px;
  height: auto;
  margin: 30px auto 0;
  display: block;
}

.signal-path-trail {
  opacity: 0.15;
  stroke-width: 8;
}
.signal-path-main {
  /* Stroke-dasharray = path length, stroke-dashoffset interpolates with scroll */
  stroke-dasharray: 1000;
  stroke-dashoffset: calc(1000 - var(--p, 0) * 1100);
  transition: stroke-dashoffset 0.1s linear;
}

.sig-node {
  opacity: 0;
  transform-origin: center;
  transform-box: fill-box;
  transition: opacity 0.2s linear, transform 0.2s var(--ease-spring);
}
/* Phone node visible at any scroll into scene */
.sig-node-phone  { opacity: calc(min(var(--p, 0) * 4, 1)); }
/* Server node fades in around 30% */
.sig-node-server { opacity: calc(min(max(var(--p, 0) - 0.30, 0) * 4, 1)); }
/* Car node fades in around 60% */
.sig-node-car    { opacity: calc(min(max(var(--p, 0) - 0.60, 0) * 4, 1)); }

/* Hide the SVG-animateMotion pulse if scroll is at start (lets static look clean) */
.signal-pulse {
  opacity: calc(min(var(--p, 0) * 4, 1));
}

.signal-latency {
  position: absolute;
  bottom: 12%; right: 8%;
  background: rgba(20, 14, 30, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 10px 16px;
  border-radius: 999px;
  display: flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  /* Appears around 75% of scroll */
  opacity: calc(min(max(var(--p, 0) - 0.75, 0) * 8, 1));
  transform: translateY(calc((1 - min(max(var(--p, 0) - 0.75, 0) * 8, 1)) * 12px));
  transition: opacity 0.1s linear, transform 0.1s linear;
}
.signal-latency-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 10px var(--green);
  animation: dotPulse 1.6s ease-in-out infinite;
}
.signal-latency strong { color: var(--green); font-weight: 700; }

/* ─── SCENE 4 · Hardware reveal (exploded view) ─── */
.scene-hw-stage {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  perspective: 1200px;
  transform: translateY(calc((1 - min(var(--p, 0) * 2, 1)) * 40px));
  opacity: min(var(--p, 0) * 2, 1);
  transition: transform 0.1s linear, opacity 0.1s linear;
}
.hw-explode {
  position: relative;
  width: 320px; height: 320px;
  transform-style: preserve-3d;
  /* Rotates as scroll progresses — Y-axis turn */
  transform: rotateY(calc(var(--p, 0) * 35deg)) rotateX(calc(15deg + var(--p, 0) * -5deg));
  transition: transform 0.1s linear;
}

/* Layers — base / pcb / lid — separated on Z by scroll progress */
.hw-layer {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  transform-style: preserve-3d;
  transition: transform 0.12s linear;
}
.hw-layer-base {
  background: linear-gradient(135deg, #1a1a26, #0a0a14);
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 30px 60px rgba(0,0,0,0.6), 0 0 80px rgba(139, 92, 246, 0.2);
  /* Sits at -40px Z by default; goes deeper as scroll progresses */
  transform: translateZ(calc(-30px - var(--p, 0) * 50px));
}
.hw-layer-pcb {
  background: linear-gradient(135deg, #0a4332 0%, #062a20 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 30px 24px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  /* PCB sits in middle — slight up-shift on scroll */
  transform: translateZ(calc(0px + var(--p, 0) * 10px));
}
.hw-traces {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, transparent 49.5%, rgba(255, 200, 100, 0.15) 49.5%, rgba(255, 200, 100, 0.15) 50.5%, transparent 50.5%);
  background-size: 12px 12px, 100% 18px;
  border-radius: 18px;
  opacity: 0.5;
}
.hw-chip-3d {
  position: relative;
  width: 110px; height: 110px;
  background: linear-gradient(135deg, #1a1a2e, #050508);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  text-align: center; line-height: 1.2;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.55);
  z-index: 2;
  transform: translateZ(calc(8px + var(--p, 0) * 30px));
}
.hw-chip-3d .hw-chip-shine {
  position: absolute; inset: 0; border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent 50%);
}
.hw-chip-3d > span { position: relative; z-index: 1; }

.hw-relay-3d {
  position: absolute;
  width: 28px; height: 18px;
  background: #2c2c2c;
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
  transform: translateZ(calc(4px + var(--p, 0) * 20px));
}
.hw-relay-3d > span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
}
.hw-r1 { bottom: 50px; left: 36px;  }
.hw-r2 { bottom: 50px; left: 76px;  }
.hw-r3 { bottom: 50px; right: 76px; }
.hw-r3 > span { background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: relayBlinkLg 1.4s ease-in-out infinite; }
.hw-r4 { bottom: 50px; right: 36px; }
.hw-r4 > span { background: rgba(255, 255, 255, 0.2); box-shadow: none; }

.hw-layer-lid {
  background: linear-gradient(135deg, #1a1a26 0%, #0a0a14 100%);
  border: 1px solid rgba(139, 92, 246, 0.4);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  /* Lid lifts UPWARDS as scroll progresses (Y axis), exposing PCB beneath */
  transform: translateZ(calc(40px + var(--p, 0) * 50px)) translateY(calc(var(--p, 0) * -100px));
  opacity: calc(1 - var(--p, 0) * 0.55);  /* fades partially as it rises */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 50px rgba(139, 92, 246, 0.25);
}
.hw-lid-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 18px;
  color: #fff;
}
.hw-lid-logo .hs-brand-mark { width: 22px; height: 22px; }

/* Floating spec callouts — slide in around 50% scroll */
.hw-spec {
  position: absolute;
  background: rgba(20, 14, 30, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(139, 92, 246, 0.4);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  color: #fff;
  z-index: 3;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  opacity: calc(min(max(var(--p, 0) - 0.3, 0) * 3, 1));
  transform: translateY(calc((1 - min(max(var(--p, 0) - 0.3, 0) * 3, 1)) * 12px));
  transition: opacity 0.1s linear, transform 0.1s linear;
}
.hw-spec-1 { top: -10px;   left: -30px;  border-color: rgba(139, 92, 246, 0.5); }
.hw-spec-2 { top: 25%;     right: -50px; border-color: rgba(6, 182, 212, 0.5); }
.hw-spec-3 { bottom: 25%;  left: -50px;  border-color: rgba(245, 158, 11, 0.5); }
.hw-spec-4 { bottom: -10px; right: -30px; border-color: rgba(16, 185, 129, 0.5); }

/* ─── SCENE 5 · Warm car (final CTA) ─── */
.scene-warm-pin {
  grid-template-columns: 1fr;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.warm-bg {
  position: absolute; inset: 0;
  z-index: 0; pointer-events: none;
}
.warm-sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    #1a0e2a 0%,
    #3a1850 25%,
    #b85bc0 60%,
    #f5a05f 88%,
    #fcd86b 100%);
}
.warm-mtns {
  position: absolute; bottom: 25%; left: 0; right: 0;
  height: 40%;
  background:
    linear-gradient(180deg, transparent 60%, rgba(10,10,30,0.4) 100%),
    /* mountain silhouette using clip-path */
    rgba(20, 10, 40, 0.85);
  clip-path: polygon(0 70%, 8% 50%, 18% 65%, 28% 35%, 42% 55%, 58% 30%, 72% 50%, 86% 40%, 100% 60%, 100% 100%, 0 100%);
}
.warm-snow {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 30%;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.18) 50%, rgba(245,160,95,0.25) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.warm-car {
  position: absolute;
  bottom: 18%; left: 50%; transform: translateX(-50%);
  width: 220px; height: 100px;
  display: flex; align-items: flex-end; justify-content: center;
}
.warm-car-body {
  font-size: 100px;
  filter: drop-shadow(0 14px 30px rgba(0,0,0,0.6));
  animation: floatCar 3s ease-in-out infinite;
}
@keyframes floatCar { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.warm-car-headlights {
  position: absolute;
  bottom: 30%; left: 50%; transform: translateX(-50%);
  width: 320px; height: 120px;
  background: radial-gradient(ellipse at center, rgba(255, 240, 180, 0.4), transparent 60%);
  filter: blur(20px);
  pointer-events: none;
  z-index: -1;
}
.warm-car-exhaust {
  position: absolute;
  bottom: 25%; right: 18%;
  width: 60px; height: 80px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent 70%);
  filter: blur(8px);
  border-radius: 50%;
  animation: exhaust 2.5s ease-out infinite;
}
@keyframes exhaust {
  0%   { transform: translate(0, 0) scale(0.5); opacity: 0.8; }
  100% { transform: translate(40px, -80px) scale(2); opacity: 0; }
}
.warm-car-glow {
  position: absolute;
  bottom: 20%; left: 50%; transform: translateX(-50%);
  width: 280px; height: 60px;
  background: radial-gradient(ellipse, rgba(245, 158, 11, 0.5), transparent 70%);
  filter: blur(20px);
  z-index: -2;
}
.warm-foreground {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 8%;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.5));
}

.warm-content {
  position: relative; z-index: 2;
  max-width: 720px;
  margin: 0 auto;
  padding-top: 8vh;
  /* Headline rises gently as scroll progresses */
  transform: translateY(calc((1 - min(var(--p, 0) * 2, 1)) * 30px));
  opacity: min(var(--p, 0) * 2, 1);
  transition: transform 0.1s linear, opacity 0.1s linear;
}
.warm-title {
  background: linear-gradient(135deg, #fff 0%, #f5a05f 50%, #fcd86b 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.warm-sub strong { color: var(--amber); }

.warm-cta {
  margin: 36px 0 24px;
  display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.warm-cta-primary {
  /* Pulsing scale for the final CTA */
  animation: ctaPulse 2.4s ease-in-out infinite;
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.6), 0 0 80px rgba(245, 160, 95, 0.4);
}
@keyframes ctaPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
.warm-cta-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--muted);
  letter-spacing: 0.04em;
}
.warm-trust {
  display: flex; gap: 24px; justify-content: center; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
  margin-top: 14px;
}
.warm-trust span { white-space: nowrap; }

/* Steam particles drifting up */
.warm-steam {
  position: absolute; bottom: 28%; right: 14%;
  width: 60px; height: 200px;
  pointer-events: none;
  z-index: 1;
}
.warm-steam span {
  position: absolute;
  bottom: 0;
  width: 12px; height: 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  filter: blur(4px);
  animation: steamRise 4s ease-out infinite;
}
.warm-steam span:nth-child(1) { left:  0%; animation-delay: 0s;   }
.warm-steam span:nth-child(2) { left: 20%; animation-delay: 0.6s; }
.warm-steam span:nth-child(3) { left: 40%; animation-delay: 1.2s; }
.warm-steam span:nth-child(4) { left: 60%; animation-delay: 1.8s; }
.warm-steam span:nth-child(5) { left: 80%; animation-delay: 2.4s; }
.warm-steam span:nth-child(6) { left: 30%; animation-delay: 3.0s; }
@keyframes steamRise {
  0%   { transform: translateY(0) scale(0.6); opacity: 0.6; }
  100% { transform: translateY(-200px) scale(2); opacity: 0; }
}

/* Cinematic scene mobile layout */
@media (max-width: 900px) {
  .cinema-scene { min-height: 150vh; }
  .cinema-pin {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
    padding: 60px 20px;
  }
  .cinema-sub { margin-left: auto; margin-right: auto; }
  .scene-phone-mock { transform: scale(0.85); }
  .signal-latency { right: 50%; transform: translateX(50%); }
  .hw-explode { width: 260px; height: 260px; }
  .hw-spec-2, .hw-spec-3 { display: none; }
  .warm-trust { flex-direction: column; gap: 6px; }
}
@media (max-width: 540px) {
  .spm-frame { width: 240px; }
  .scene-phone-mock { transform: scale(0.7); }
  .scene-tap-ripple { display: none; }
  .hw-explode { width: 220px; height: 220px; }
  .hw-spec { font-size: 9px; padding: 4px 10px; }
  .hw-spec-1, .hw-spec-4 { display: none; }
  .warm-car { width: 180px; }
  .warm-car-body { font-size: 80px; }
}

/* ═══════════════ PRODUCT GALLERY (CSS-only mosaic) ═══════════════ */
.section-product { padding: 100px 20px 80px; }

.product-gallery {
  max-width: 1200px;
  margin: 0 auto;
}

/* 8-tile mosaic — hero spans 2 cols 2 rows on desktop, others fill around */
.pg-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 14px;
}

.pg-cell {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.35s var(--ease-out), border-color 0.35s, box-shadow 0.35s;
  isolation: isolate;
}
.pg-cell::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at top, rgba(139,92,246,0.18), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.pg-cell:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 40px rgba(139,92,246,0.25);
}

/* Floating tag at the bottom of each tile */
.pg-tag {
  position: absolute;
  bottom: 12px; left: 12px;
  background: rgba(20, 14, 30, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
  z-index: 3;
}

/* ── Hero tile (large) ── */
.pg-cell-hero {
  grid-column: span 2;
  grid-row: span 2;
  background: radial-gradient(ellipse at center, #2a1850, #050508);
}
.pg-cell-hero::before { background: radial-gradient(ellipse at center, rgba(139,92,246,0.35), transparent 70%); }
.pg-device {
  position: relative;
  width: 60%; aspect-ratio: 1.4 / 1;
  perspective: 800px;
  z-index: 1;
}
.pg-device-body {
  position: relative;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a1a26 0%, #0a0a14 100%);
  border-radius: 14px;
  border: 1px solid rgba(139, 92, 246, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 30px 60px rgba(0,0,0,0.7),
    0 0 80px rgba(139, 92, 246, 0.4);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  transform: rotateY(-12deg) rotateX(8deg);
  animation: deviceSpin 10s ease-in-out infinite alternate;
}
@keyframes deviceSpin {
  0%   { transform: rotateY(-14deg) rotateX(8deg); }
  100% { transform: rotateY(14deg) rotateX(-2deg); }
}
.pg-device-glow {
  position: absolute; inset: -2px;
  background: linear-gradient(135deg, rgba(139,92,246,0.5), rgba(236,72,153,0.5));
  border-radius: 14px;
  filter: blur(20px);
  opacity: 0.6;
  z-index: -1;
  animation: pulseGlow 3s ease-in-out infinite;
}
@keyframes pulseGlow { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }

.pg-device-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 20px;
  color: #fff;
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -0.02em;
}
.pg-logo-mark {
  width: 22px; height: 22px;
  background: var(--gradient-primary);
  clip-path: polygon(20% 0%, 100% 0%, 80% 100%, 0% 100%);
  box-shadow: 0 0 16px rgba(139,92,246,0.7);
}
.pg-device-leds {
  display: flex; gap: 12px;
}
.pg-led {
  width: 8px; height: 8px; border-radius: 50%;
}
.pg-led-blue   { background: var(--blue);  box-shadow: 0 0 12px var(--blue);  animation: ledBlink 2s ease-in-out infinite; }
.pg-led-purple { background: var(--accent);box-shadow: 0 0 12px var(--accent);animation: ledBlink 2s ease-in-out 0.3s infinite; }
.pg-led-cyan   { background: var(--cyan);  box-shadow: 0 0 12px var(--cyan);  animation: ledBlink 2s ease-in-out 0.6s infinite; }
@keyframes ledBlink { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* ── ESP32 chip tile ── */
.pg-cell-esp {
  background: linear-gradient(135deg, #0a4332 0%, #062a20 100%);
}
.pg-cell-esp::before { background: radial-gradient(ellipse at top, rgba(16,185,129,0.2), transparent 60%); }
.pg-esp {
  position: relative; z-index: 1;
  width: 65%; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
}
.pg-esp-chip {
  width: 80%; height: 80%;
  background: linear-gradient(135deg, #1a1a2e, #050508);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  color: rgba(255,255,255,0.85);
  text-align: center; line-height: 1.2;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  position: relative;
}
.pg-esp-shine {
  position: absolute; inset: 0; border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent 50%);
}
.pg-esp-pin {
  position: absolute;
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255, 200, 100, 0.9);
  box-shadow: 0 0 6px rgba(255, 200, 100, 0.6);
}
.pg-esp-pin-1 { top: 10%; left: 10%; }
.pg-esp-pin-2 { top: 10%; right: 10%; }
.pg-esp-pin-3 { bottom: 10%; left: 10%; }
.pg-esp-pin-4 { bottom: 10%; right: 10%; }

/* ── Relay LEDs tile ── */
.pg-cell-relay {
  background: linear-gradient(135deg, #2a1858 0%, #0a0a14 100%);
}
.pg-relay-board {
  display: flex; flex-direction: column; gap: 14px;
  z-index: 1;
}
.pg-relay-led {
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  position: relative;
}
.pg-relay-led.on    { background: var(--green); box-shadow: 0 0 12px var(--green), 0 0 24px rgba(16,185,129,0.5); }
.pg-relay-led.pulse { background: var(--amber); box-shadow: 0 0 12px var(--amber); animation: relayPulseLg 1.4s ease-in-out infinite; }
.pg-relay-led.off   { background: rgba(255,255,255,0.15); }
@keyframes relayPulseLg {
  0%, 100% { box-shadow: 0 0 6px var(--amber), 0 0 0 0 rgba(245,158,11,0.5); transform: scale(1); }
  50%      { box-shadow: 0 0 20px var(--amber), 0 0 0 10px rgba(245,158,11,0); transform: scale(1.2); }
}

/* ── Phone tile ── */
.pg-cell-phone { background: linear-gradient(135deg, #1a1a2e 0%, #050508 100%); }
.pg-phone {
  width: 60px; height: 110px;
  background: linear-gradient(135deg, #14141f, #1a1a26);
  border-radius: 12px;
  border: 1.5px solid rgba(139, 92, 246, 0.4);
  padding: 5px 4px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.6), 0 0 30px rgba(139,92,246,0.3);
  z-index: 1;
}
.pg-phone-screen {
  background: linear-gradient(180deg, #050508, #0f0c1a);
  border-radius: 8px;
  height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 6px 4px;
  position: relative;
  overflow: hidden;
}
.pg-phone-bar {
  height: 4px; background: rgba(255,255,255,0.1);
  border-radius: 2px;
}
.pg-phone-pulse {
  position: relative;
  flex: 1;
  display: flex; align-items: center; justify-content: center;
}
.pg-phone-pulse span {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: phonePulse 1.6s ease-in-out infinite;
}
@keyframes phonePulse { 0%, 100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.3); opacity: 1; } }
.pg-phone-btn {
  background: var(--gradient-primary);
  color: #fff; font-size: 10px;
  text-align: center; padding: 4px 0;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(139,92,246,0.5);
}

/* ── Engine bay tile ── */
.pg-cell-engine {
  background: linear-gradient(135deg, #0f1424 0%, #050508 100%);
}
.pg-engine {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.pg-engine-icon { font-size: 44px; filter: drop-shadow(0 0 12px rgba(139,92,246,0.4)); }
.pg-engine-wires {
  display: flex; gap: 4px;
}
.pg-engine-wires span {
  width: 14px; height: 3px; border-radius: 2px;
  animation: wireBlink 2s ease-in-out infinite;
}
.pg-engine-wires span:nth-child(1) { background: var(--red);   animation-delay: 0s; }
.pg-engine-wires span:nth-child(2) { background: var(--blue);  animation-delay: 0.4s; }
.pg-engine-wires span:nth-child(3) { background: var(--amber); animation-delay: 0.8s; }
.pg-engine-wires span:nth-child(4) { background: var(--green); animation-delay: 1.2s; }
@keyframes wireBlink { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; box-shadow: 0 0 8px currentColor; } }

/* ── Cold weather tile ── */
.pg-cell-cold {
  background: linear-gradient(135deg, #0c1d3a 0%, #050508 100%);
}
.pg-cell-cold::before { background: radial-gradient(ellipse at top, rgba(59,130,246,0.18), transparent 60%); }
.pg-cold {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.pg-cold-temp {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 32px;
  background: linear-gradient(135deg, #fff, #06B6D4);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  letter-spacing: -0.03em;
  text-shadow: 0 0 24px rgba(6, 182, 212, 0.5);
}
.pg-cold-snow {
  font-size: 16px; opacity: 0.7;
  animation: snowSway 3s ease-in-out infinite;
}
@keyframes snowSway { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }

/* ── Gift box tile ── */
.pg-cell-box {
  background: linear-gradient(135deg, #2a1858 0%, #050508 100%);
}
.pg-box {
  position: relative; z-index: 1;
  width: 70px; height: 70px;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
  filter: drop-shadow(0 0 16px rgba(236, 72, 153, 0.4));
  animation: boxBounce 2.5s ease-in-out infinite;
}
@keyframes boxBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ── Made in Mongolia tile ── */
.pg-cell-flag {
  background: linear-gradient(135deg, #2a0e1a 0%, #050508 100%);
}
.pg-cell-flag::before { background: radial-gradient(ellipse at top, rgba(239, 68, 68, 0.2), transparent 60%); }
.pg-flag {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
}
.pg-flag-emoji { font-size: 38px; animation: flagWave 3s ease-in-out infinite; }
@keyframes flagWave { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.pg-flag strong {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; line-height: 1.2;
  letter-spacing: -0.01em;
}

/* Mosaic responsive */
@media (max-width: 900px) {
  .pg-mosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }
  .pg-cell-hero { grid-column: span 2; grid-row: span 2; }
}
@media (max-width: 540px) {
  .pg-mosaic {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 130px;
    gap: 10px;
  }
  .pg-cell-hero { grid-column: span 2; grid-row: span 2; }
  .pg-tag { font-size: 9px; padding: 4px 8px; }
}

/* Caption strip — 4 thumbnail tiles below the hero image */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 24px;
}
.gs-tile {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex; flex-direction: column;
  gap: 4px;
  transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
}
.gs-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4), 0 0 30px rgba(139,92,246,0.18);
}
.gs-tile span { font-size: 22px; }
.gs-tile strong { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }
.gs-tile small { color: var(--muted); font-size: 12px; line-height: 1.4; }

@media (max-width: 900px) {
  .gallery-strip { grid-template-columns: repeat(2, 1fr); }
  .gal-tag { font-size: 10px; padding: 6px 10px; }
  .gallery-frame { border-radius: 14px; }
  /* Hide the bottom tags on small screens — too cramped */
  .gal-tag-3, .gal-tag-4 { display: none; }
}
@media (max-width: 540px) {
  .gallery-strip { grid-template-columns: 1fr; }
  /* Reduce ken-burns intensity on phones (battery + perf) */
  .gallery-img { animation-duration: 30s; }
}
.section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 50px;
}
.section-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 0 10px;
}
.section-sub {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  transition-delay: var(--delay, 0s);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════ HOW IT WORKS ═══════════════ */
.section-how {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 60px;
  left: 16%; right: 16%;
  height: 2px;
  background: linear-gradient(to right, var(--border), var(--accent), var(--border));
  z-index: 0;
}
.step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  text-align: center;
  position: relative;
  z-index: 1;
  transition: transform 0.2s, border-color 0.2s;
}
.step:hover { transform: translateY(-4px); border-color: var(--accent); }
.step-num {
  font-size: 13px; color: var(--accent);
  font-weight: 800; letter-spacing: 2px;
  margin-bottom: 12px;
}
.step-icon {
  font-size: 56px;
  margin-bottom: 14px;
}
.step-title {
  font-size: 20px; font-weight: 700;
  margin: 0 0 8px;
}
.step-text {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}
@media (max-width: 800px) {
  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
}

/* ═══════════════ FEATURES ═══════════════ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feat-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 24px;
  transition: transform 0.2s, border-color 0.2s;
  overflow: hidden;
}
.feat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, transparent, var(--accent), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s;
}
.feat-card:hover { transform: translateY(-4px); }
.feat-card:hover::before { opacity: 1; }
.feat-icon {
  font-size: 40px;
  margin-bottom: 14px;
}
.feat-card h3 {
  font-size: 18px; font-weight: 700;
  margin: 0 0 8px;
}
.feat-card p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
  line-height: 1.6;
}
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features-grid { grid-template-columns: 1fr; } }

/* ═══════════════ PACKAGES ═══════════════ */
.section-packages {
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
}
.packages-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
.pkg {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  display: flex; flex-direction: column;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  position: relative;
}
.pkg:hover { transform: translateY(-6px); border-color: var(--accent); }
.pkg-featured {
  border: 2px solid var(--accent);
  box-shadow: 0 20px 50px rgba(139, 92, 246, 0.2);
  transform: scale(1.03);
}
.pkg-featured:hover { transform: scale(1.03) translateY(-6px); }
.pkg-badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.pkg-head { text-align: center; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.pkg-name {
  font-size: 14px; font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.pkg-price {
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1.1;
}
.pkg-featured .pkg-price { color: var(--accent); }
.pkg-price-sub { color: var(--muted); font-size: 12px; margin-top: 6px; }
.pkg-list {
  flex: 1;
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 26px;
  font-size: 14px;
}
.pkg-list li { padding: 2px 0; }
.pkg-list li.dim { color: var(--dim); }
.pkg-list li strong { color: var(--accent); }
.pkg-btn { width: 100%; }

@media (max-width: 900px) { .packages-grid { grid-template-columns: 1fr; } .pkg-featured { transform: none; } .pkg-featured:hover { transform: translateY(-6px); } }

/* ═══════════════ ORDER FORM ═══════════════ */
.section-order {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}
.order-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-full { grid-column: 1 / -1; }
.field > span, .field-lbl {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.field input, .field textarea, .field select {
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}
.field input:focus, .field textarea:focus { border-color: var(--accent); background: var(--bg); }
.field textarea { resize: vertical; min-height: 70px; }
.field input[type="file"] { padding: 8px; cursor: pointer; }
.field input.error, .field textarea.error { border-color: var(--red); animation: shake 0.3s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

.radio-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 6px;
}
.radio { cursor: pointer; }
.radio input { display: none; }
.radio-box {
  position: relative;
  background: var(--bg-2);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  transition: all 0.15s;
}
.radio:hover .radio-box { border-color: var(--border-2); }
.radio input:checked + .radio-box {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.08);
  box-shadow: 0 0 0 1px var(--accent);
}
.radio-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.radio-price { color: var(--muted); font-size: 13px; }
.radio input:checked + .radio-box .radio-price { color: var(--accent); font-weight: 700; }
.radio-badge {
  position: absolute;
  top: -9px; left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.total-box {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 24px 0;
  display: flex; justify-content: space-between; align-items: center;
}
.total-lbl { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-right: 10px; }
.total-amt { font-size: 28px; font-weight: 800; color: var(--accent); letter-spacing: -0.5px; }

.payment-box {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 22px;
}
.payment-head { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.payment-info { font-size: 14px; color: var(--muted); }
.payment-info ul { list-style: disc; padding-left: 20px; margin: 10px 0; }
.payment-info ul li { margin: 5px 0; }
.payment-info strong, .payment-info code { color: var(--text); }
.tag {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  font-family: 'SFMono-Regular', monospace;
  font-size: 12px;
  color: var(--accent) !important;
}
.payment-preview {
  margin-top: 12px;
  text-align: center;
}
.payment-preview img {
  max-width: 260px; max-height: 260px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.btn-submit { width: 100%; padding: 18px; font-size: 16px; }

/* Compatibility result */
.compat-result {
  margin-top: 6px; margin-bottom: 6px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid;
  font-size: 14px;
  line-height: 1.6;
  animation: fadeIn 0.25s ease-out;
}
.compat-result.compat-full {
  background: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--text);
}
.compat-result.compat-partial {
  background: rgba(245, 158, 11, 0.10);
  border-color: rgba(245, 158, 11, 0.4);
}
.compat-result.compat-incompatible {
  background: rgba(239, 68, 68, 0.10);
  border-color: rgba(239, 68, 68, 0.4);
}
.compat-result.compat-unknown {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.35);
}
.compat-result strong { display: block; font-size: 15px; margin-bottom: 4px; }
.compat-result .meta { color: var(--muted); font-size: 12px; margin-top: 6px; }

.form-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--red);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-top: 14px;
  text-align: center;
  animation: shake 0.3s;
}

@media (max-width: 700px) {
  .order-form { padding: 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .radio-group { grid-template-columns: 1fr; }
}

/* ═══════════════ TESTIMONIALS ═══════════════ */
.section-testimonials {
  background: var(--bg-2);
}
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testi {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin: 0;
  transition: transform 0.2s;
}
.testi:hover { transform: translateY(-4px); }
.testi-stars {
  font-size: 14px;
  margin-bottom: 14px;
  letter-spacing: 2px;
}
.testi blockquote {
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 16px;
  color: var(--text);
  font-style: italic;
  position: relative;
}
.testi figcaption {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
@media (max-width: 900px) { .testimonials { grid-template-columns: 1fr; } }

/* ═══════════════ FAQ ═══════════════ */
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.faq details[open] {
  border-color: var(--accent);
  background: linear-gradient(180deg, var(--card), var(--card-2));
}
.faq summary {
  list-style: none;
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq .chevron {
  font-size: 22px;
  color: var(--muted);
  transition: transform 0.2s, color 0.15s;
  font-weight: 300;
  flex-shrink: 0; margin-left: 10px;
}
.faq details[open] .chevron { transform: rotate(45deg); color: var(--accent); }
.faq p {
  padding: 0 22px 20px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* ═══════════════ CONTACT ═══════════════ */
.section-contact { background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 40px;
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  transition: transform 0.2s, border-color 0.2s;
  color: inherit;
}
.contact-card:hover { transform: translateY(-4px); border-color: var(--accent); }
.contact-icon { font-size: 36px; margin-bottom: 10px; }
.contact-lbl { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; }
.contact-val { font-size: 20px; font-weight: 700; margin: 6px 0 2px; color: var(--accent); }
.contact-sub { color: var(--muted); font-size: 12px; }
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }

.map-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 320px;
  border: 1px solid var(--border);
  filter: grayscale(0.3) brightness(0.9);
}

/* ═══════════════ FOOTER ═══════════════ */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 50px 20px 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 30px;
}
.footer-grid > div > h4 {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 0 14px;
  font-weight: 700;
}
.footer-grid > div > a {
  display: block;
  color: var(--muted);
  font-size: 14px;
  padding: 4px 0;
  transition: color 0.15s;
}
.footer-grid > div > a:hover { color: var(--accent); }
.footer-tag { color: var(--muted); font-size: 13px; margin: 10px 0 0; max-width: 300px; }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--dim);
  font-size: 12px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; } }

/* ═══════════════ MODAL ═══════════════ */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  padding: 20px;
  animation: fadeIn 0.2s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-success {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 32px;
  max-width: 440px; width: 100%;
  text-align: center;
  animation: bounceIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes bounceIn {
  0% { transform: scale(0.6); opacity: 0; }
  80% { transform: scale(1.04); }
  100% { transform: scale(1); opacity: 1; }
}
.modal-icon {
  font-size: 64px;
  margin-bottom: 14px;
  animation: pop 0.5s 0.2s backwards;
}
@keyframes pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.2); }
  100% { transform: scale(1); }
}
.modal-success h3 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 14px;
}
.modal-order {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin: 16px 0;
  font-size: 13px;
  color: var(--muted);
}
.modal-order strong {
  color: var(--accent);
  font-size: 20px;
  font-family: 'SFMono-Regular', monospace;
  display: inline-block;
  margin-top: 4px;
  letter-spacing: 1px;
}
.modal-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 22px;
}

/* ═══════════════ TOAST ═══════════════ */
.toast-container {
  position: fixed;
  bottom: 20px; right: 20px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 300;
  pointer-events: none;
}
@media (max-width: 700px) {
  .toast-container { top: 80px; bottom: auto; right: 12px; left: 12px; }
}
.toast {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  min-width: 240px;
  box-shadow: var(--shadow);
  pointer-events: auto;
  animation: slideInRight 0.2s ease-out;
}
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.toast-success { border-left: 3px solid var(--green); }
.toast-error   { border-left: 3px solid var(--red); }
.toast-info    { border-left: 3px solid var(--accent); }

/* ═══════════════════════════════════════════════════════════════════
   TESLA-STYLE PANELS · full-viewport snap sections
   Each panel: large background + minimal copy + 2 CTAs at bottom.
   ═══════════════════════════════════════════════════════════════════ */
.tpanel {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  isolation: isolate;
}
.tpanel-bg {
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
}
.tpanel-content {
  position: relative;
  z-index: 2;
  display: flex; flex-direction: column;
  justify-content: space-between;     /* push title to top, CTA to bottom */
  align-items: center;
  text-align: center;
  width: 100%;
  padding: 14vh 24px 6vh;
}
.tpanel-top { max-width: 760px; }
.tpanel-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(38px, 6vw, 76px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
  margin: 0 0 16px;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
}
.tpanel-sub {
  font-size: clamp(15px, 1.6vw, 18px);
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
  font-weight: 400;
  line-height: 1.5;
  max-width: 520px;
}
.tpanel-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.tbtn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 240px;
  padding: 13px 22px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-size: 15px; font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s var(--ease-out), background 0.18s, color 0.18s, border-color 0.18s;
}
.tbtn-light {
  background: rgba(255, 255, 255, 0.92);
  color: #14141f;
}
.tbtn-light:hover { background: #fff; transform: translateY(-1px); }
.tbtn-ghost {
  background: rgba(20, 14, 30, 0.45);
  color: #fff;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.tbtn-ghost:hover { background: rgba(20, 14, 30, 0.7); border-color: rgba(255, 255, 255, 0.5); }

/* ── PANEL 01 · Cold Mongolia (deep blue night sky → snowfield) ── */
.tpanel-bg-cold {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(255, 255, 255, 0.18) 0%, transparent 40%),
    linear-gradient(180deg, #0a0c20 0%, #1a1d3a 30%, #2a3060 65%, #c7d4e8 100%);
}
.tpanel-bg-cold::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0;
  height: 28%;
  background:
    repeating-linear-gradient(45deg, transparent 0, transparent 14px, rgba(255,255,255,0.06) 14px, rgba(255,255,255,0.06) 16px),
    linear-gradient(180deg, transparent 0%, rgba(200, 215, 235, 0.4) 50%, rgba(255, 255, 255, 0.6) 100%);
}

/* ── PANEL 02 · Phone control ── */
.tpanel-bg-app {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(139, 92, 246, 0.35), transparent 55%),
    linear-gradient(135deg, #0f0820 0%, #1f0e3e 50%, #2a0e3e 100%);
  display: flex; align-items: center; justify-content: center;
}
.tpanel-phone {
  width: 240px;
  background: linear-gradient(135deg, #14141f, #1a1a26);
  border-radius: 28px;
  padding: 12px 8px 14px;
  border: 1.5px solid rgba(139, 92, 246, 0.4);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 100px rgba(139, 92, 246, 0.4);
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -52%);
}
.tpanel-phone-screen {
  background: linear-gradient(180deg, #050508, #0f0c1a);
  border-radius: 18px;
  padding: 22px 14px;
  display: flex; flex-direction: column; gap: 12px;
  height: 380px;
}
.tps-time { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: rgba(255,255,255,0.6); text-align: right; }
.tps-h { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -0.01em; }
.tps-temp {
  font-family: 'JetBrains Mono', monospace;
  font-size: 38px; font-weight: 700;
  background: linear-gradient(135deg, #f5a05f, #fcd86b);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  margin-top: 12px;
}
.tps-btn {
  margin-top: auto;
  padding: 14px;
  background: var(--gradient-primary);
  color: #fff; font-weight: 600;
  text-align: center;
  border-radius: 12px;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.5);
}

/* ── PANEL 03 · Hardware ── */
.tpanel-bg-hw {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(16, 185, 129, 0.18), transparent 55%),
    linear-gradient(135deg, #04140e 0%, #0a2a20 50%, #042418 100%);
  display: flex; align-items: center; justify-content: center;
}
.tpanel-device {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: clamp(280px, 35vw, 420px);
  aspect-ratio: 1.4 / 1;
  background: linear-gradient(135deg, #1a1a26 0%, #0a0a14 100%);
  border-radius: 18px;
  border: 1.5px solid rgba(139, 92, 246, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 100px rgba(139, 92, 246, 0.4);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  font-family: 'Space Grotesk', sans-serif;
}
.tpd-mark {
  width: 38px; height: 38px;
  background: var(--gradient-primary);
  clip-path: polygon(20% 0%, 100% 0%, 80% 100%, 0% 100%);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
}
.tpd-text {
  font-size: 26px; font-weight: 700; color: #fff;
  letter-spacing: -0.02em;
}
.tpd-leds {
  display: flex; gap: 14px;
}
.tpd-leds span {
  width: 10px; height: 10px; border-radius: 50%;
}
.tpd-leds span:nth-child(1) { background: var(--blue);   box-shadow: 0 0 14px var(--blue);   animation: ledBlinkHs 2s ease-in-out 0.0s infinite; }
.tpd-leds span:nth-child(2) { background: var(--accent); box-shadow: 0 0 14px var(--accent); animation: ledBlinkHs 2s ease-in-out 0.3s infinite; }
.tpd-leds span:nth-child(3) { background: var(--cyan);   box-shadow: 0 0 14px var(--cyan);   animation: ledBlinkHs 2s ease-in-out 0.6s infinite; }

/* ── PANEL 04 · Schedule (analog clock) ── */
.tpanel-bg-schedule {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(245, 160, 95, 0.20), transparent 55%),
    linear-gradient(135deg, #1a0e0a 0%, #2a0e1a 50%, #3a1a0e 100%);
  display: flex; align-items: center; justify-content: center;
}
.tpanel-clock {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 240px; height: 240px;
}
.tpc-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 4px solid rgba(245, 160, 95, 0.4);
  box-shadow: 0 0 40px rgba(245, 160, 95, 0.4), inset 0 0 30px rgba(245, 160, 95, 0.1);
}
.tpc-ring::before, .tpc-ring::after {
  content: ""; position: absolute;
  width: 4px; height: 12px;
  background: rgba(255, 255, 255, 0.6);
  left: 50%; transform: translateX(-50%);
}
.tpc-ring::before { top: 6px; }
.tpc-ring::after  { bottom: 6px; }
.tpc-hand-h, .tpc-hand-m {
  position: absolute; left: 50%; bottom: 50%;
  transform-origin: bottom center;
  background: #fff;
  border-radius: 4px;
}
.tpc-hand-h {
  width: 5px; height: 70px;
  margin-left: -2.5px;
  transform: rotate(210deg); /* points to ~7 o'clock */
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}
.tpc-hand-m {
  width: 3px; height: 100px;
  margin-left: -1.5px;
  transform: rotate(0deg);   /* points to 12 (00) */
  background: var(--amber);
  box-shadow: 0 0 12px var(--amber);
}
.tpc-center {
  position: absolute; top: 50%; left: 50%;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 16px var(--amber);
}

/* ── DOT NAVIGATION ── */
.tpanel-dots {
  position: fixed;
  right: 22px; top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 10px;
  z-index: 50;
  background: rgba(20, 14, 30, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.tdot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: background 0.18s, transform 0.18s;
  display: block;
}
.tdot:hover { background: rgba(255, 255, 255, 0.7); transform: scale(1.4); }
.tdot.active { background: #fff; transform: scale(1.5); box-shadow: 0 0 8px rgba(255, 255, 255, 0.8); }

/* Mobile — stack panels naturally, simplify visuals */
@media (max-width: 900px) {
  .tpanel-content { padding: 10vh 20px 4vh; }
  .tpanel-cta { flex-direction: column; width: 100%; max-width: 320px; }
  .tbtn { width: 100%; min-width: 0; }
  .tpanel-phone { width: 200px; }
  .tpanel-phone-screen { height: 320px; }
  .tpanel-clock { width: 180px; height: 180px; }
  .tpc-hand-h { height: 50px; }
  .tpc-hand-m { height: 75px; }
  .tpanel-dots { right: 12px; padding: 8px 6px; }
  .tdot { width: 7px; height: 7px; }
}
