/* ==========================================================================
   HeanGate OS — Apple-Inspired Enterprise Biometric Experience
   Design Philosophy: Ultra-clean, high-contrast, centered hero, Apple Bento Grid,
   TrueDepth 3D Biometrics, and flawless mobile responsiveness.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Kantumruy+Pro:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  /* Calibrated Taste-Design Palette — Obsidian Dark (Default) */
  --bg-body: #090c15; /* Obsidian canvas, avoids pure dead black */
  --bg-surface: #0e1322; /* Calibrated deep slate surface */
  --bg-surface-elevated: #141a2c;
  --bg-surface-subtle: #192138;
  --bg-glass: rgba(9, 12, 21, 0.85);
  --bg-glass-card: rgba(14, 19, 34, 0.78);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-inverse: #090c15;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(56, 189, 248, 0.28);
  --border-card: rgba(255, 255, 255, 0.07);

  /* Calibrated Accent Colors (saturation restrained < 78%) */
  --accent-primary: #0284c7; /* Cobalt */
  --accent-primary-hover: #0369a1;
  --accent-cyan: #38bdf8; /* Titanium / Sky highlight */
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-indigo: #6366f1;

  /* Backward Compatibility Mappings */
  --apple-blue: var(--accent-primary);
  --apple-blue-hover: var(--accent-primary-hover);
  --apple-cyan: var(--accent-cyan);
  --apple-green: var(--accent-emerald);
  --apple-orange: var(--accent-amber);
  --apple-red: var(--accent-rose);
  --apple-purple: var(--accent-indigo);

  /* Typography */
  --font-display: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, monospace;
  --font-khmer: 'Kantumruy Pro', -apple-system, sans-serif;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 980px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.65);
  --shadow-device: 0 40px 100px -20px rgba(0, 0, 0, 0.85), 0 0 35px rgba(56, 189, 248, 0.12);

  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Mode Overrides (Editorial Slate Canvas) */
[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-glass: rgba(248, 250, 252, 0.88);
  --bg-glass-card: rgba(255, 255, 255, 0.92);

  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --text-inverse: #ffffff;

  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-glow: rgba(2, 132, 199, 0.22);
  --border-card: rgba(15, 23, 42, 0.06);

  --accent-primary: #0284c7;
  --accent-primary-hover: #0369a1;
  --accent-cyan: #0284c7;

  --apple-blue: #0284c7;
  --apple-cyan: #0284c7;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.09);
  --shadow-device: 0 30px 80px -15px rgba(15, 23, 42, 0.12), 0 0 25px rgba(2, 132, 199, 0.08);
}

/* Universal Reset & Strict Boundary Control (Prevents Mobile Overflow) */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

html[lang="km"] {
  font-family: var(--font-khmer), var(--font-sans);
}

body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  background-color: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  position: relative;
}

/* Apple Central Grid Container */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
  position: relative;
}

/* ==========================================================================
   1. Apple Global Navigation Bar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  height: 48px;
  background: var(--bg-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  transition: background var(--transition-fast);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.brand-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.brand-logo-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.brand-logo-img {
  width: 18px;
  height: 18px;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-khmer-sub {
  display: none; /* Keep Apple header ultra-minimal */
}

/* Center Desktop Navigation */
.primary-nav {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text-primary);
}

/* Nav Actions (Right side) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Language Toggle Pill */
.lang-toggle-group {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn.active {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Theme Button */
.theme-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color var(--transition-fast);
}

.theme-btn:hover {
  color: var(--text-primary);
}

/* Apple Pill Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  line-height: 1.35;
}

.btn:active,
button:active,
.theme-btn:active,
.lang-btn:active,
.kiosk-scan-btn:active,
.nav-tab-btn:active {
  transform: scale(0.97);
  transition: transform 0.08s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-icon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.btn:hover .btn-icon-svg {
  transform: translateX(2px);
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

[data-theme="light"] .btn-secondary {
  background: rgba(15, 23, 42, 0.04);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.btn-emerald {
  background: var(--accent-emerald);
  color: #064e3b;
  font-weight: 700;
}

.btn-emerald:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
}

/* Mobile Hamburger Toggle */
.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
}

/* ==========================================================================
   2. Apple Centered Hero Section (Like Apple Vision Pro / iPhone 16 Pro)
   ========================================================================== */
/* Global Ambient 3D Volumetric Neural Field Canvas (Body Background) */
.body-ambient-canvas,
.hero-ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

.hero-section {
  position: relative;
  z-index: 1;
  padding: clamp(48px, 8vw, 84px) 0 40px;
  text-align: center;
  overflow: hidden;
}

.section,
.site-footer {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 980px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-copy-column {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Apple Eyebrow Tag */
.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent-cyan);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 22px;
  text-transform: uppercase;
}

.badge-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: radarPulse 2s ease-in-out infinite;
  display: inline-block;
  flex-shrink: 0;
}

@keyframes radarPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.25); opacity: 1; box-shadow: 0 0 12px var(--accent-cyan); }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* Massive Iconic Headline */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero-accent {
  background: linear-gradient(180deg, #ffffff 15%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

[data-theme="light"] .hero-accent {
  background: linear-gradient(180deg, #0f172a 15%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  line-height: 1.45;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 32px;
  font-weight: 400;
}

/* Apple Centered Action Links / Hero Bar */
.hero-actions,
.hero-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.hero-actions .btn {
  font-size: 0.95rem;
  padding: 10px 24px;
}

.btn-hero-cta {
  font-size: 0.95rem;
  padding: 11px 24px;
  box-shadow: 0 4px 18px rgba(2, 132, 199, 0.4);
}

.btn-telegram-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  background: rgba(42, 171, 238, 0.14);
  border: 1px solid rgba(42, 171, 238, 0.36);
  color: #38bdf8;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
}

[data-theme="light"] .btn-telegram-hero {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.28);
  color: #0284c7;
}

.btn-telegram-hero:hover {
  background: rgba(42, 171, 238, 0.26);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(42, 171, 238, 0.35);
}

[data-theme="light"] .btn-telegram-hero:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.3);
}

.btn-telegram-hero:active {
  transform: scale(0.97);
}

.btn-hero-sim {
  font-size: 0.92rem;
  padding: 10px 22px;
}

/* Mobile Nav Drawer Demo Button */
.nav-item-demo-mobile {
  display: none;
}

.primary-nav.mobile-open .nav-item-demo-mobile {
  display: block;
  margin-top: 8px;
}

.nav-mobile-demo-btn {
  width: 100%;
  padding: 12px 20px;
}

/* Apple Clean Metric Row */
.hero-metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 780px;
  margin: 0 auto 48px;
  padding: 18px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.metric-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.metric-value {
  font-size: 1.55rem;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--apple-cyan);
  letter-spacing: -0.02em;
}

.metric-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 3px;
}

/* ==========================================================================
   3. Apple Floating Hardware Terminal (Hero Centerpiece)
   ========================================================================== */
.hero-visual-column {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-terminal-mockup {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-device);
  padding: 20px;
  overflow: hidden;
  text-align: left;
  transform-style: preserve-3d;
  perspective: 1200px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  will-change: transform;
}

.hero-terminal-mockup:hover {
  border-color: var(--border-glow);
  box-shadow: 0 45px 110px -15px rgba(0, 0, 0, 0.95), 0 0 50px rgba(41, 151, 255, 0.25);
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.terminal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--apple-green);
  box-shadow: 0 0 8px var(--apple-green);
}

.terminal-title-text {
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.terminal-fps-badge {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--apple-cyan);
  background: rgba(41, 151, 255, 0.12);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(41, 151, 255, 0.25);
}

/* Kiosk Source Mode Bar (Presets, Camera, Upload) */
.kiosk-source-bar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.kiosk-source-tabs {
  display: inline-flex;
  align-items: center;
  background: rgba(13, 19, 34, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 3px;
  backdrop-filter: blur(12px);
}

.kiosk-src-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  font-family: var(--font-sans);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.kiosk-src-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.kiosk-src-tab.active {
  background: var(--apple-blue);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 113, 227, 0.45);
}

.kiosk-tab-icon {
  flex-shrink: 0;
}

/* Kiosk Viewport Floating Overlays (Camera & Upload) */
.kiosk-viewport-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 8, 17, 0.82);
  backdrop-filter: blur(6px);
  z-index: 5;
  animation: kioskFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes kioskFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.kiosk-overlay-card {
  background: rgba(13, 19, 34, 0.94);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: var(--radius-lg);
  padding: 20px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
}

.kiosk-overlay-title {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.kiosk-overlay-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 16px;
}

.kiosk-cam-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.kiosk-dropzone {
  width: 100%;
  max-width: 380px;
  border: 2px dashed rgba(56, 189, 248, 0.35);
  background: rgba(13, 19, 34, 0.9);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.kiosk-dropzone:hover,
.kiosk-dropzone.drag-active {
  border-color: var(--apple-cyan);
  background: rgba(14, 165, 233, 0.12);
  transform: translateY(-2px);
}

.dropzone-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(2, 132, 199, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.dropzone-title {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dropzone-sub {
  display: block;
  font-size: 0.73rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 14px;
}

.dropzone-browse-btn {
  pointer-events: none;
}

/* 3D Viewport Hardware Screen */
.terminal-viewport,
.sandbox-canvas-wrapper {
  position: relative;
  width: 100%;
  height: clamp(280px, 42vw, 380px);
  background: radial-gradient(circle at 50% 50%, #0d1322 0%, #050811 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8);
}

.viewport-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}

.viewport-canvas:active {
  cursor: grabbing;
}

.viewport-hud-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  flex-wrap: wrap;
}

.hud-top-left,
.hud-top-right {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  flex-wrap: wrap;
}

.hud-tag {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.hud-mode-tag {
  color: var(--apple-cyan);
  border-color: rgba(41, 151, 255, 0.35);
  background: rgba(41, 151, 255, 0.14);
}

/* Apple Segmented 3D View Mode Toggle */
.view-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  padding: 2px;
  gap: 2px;
  backdrop-filter: blur(10px);
}

.view-mode-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.view-mode-btn:hover {
  color: var(--text-primary);
}

.view-mode-btn.active {
  background: var(--apple-blue);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(0, 113, 227, 0.4);
}

.hud-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-mono);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.hud-ready {
  background: rgba(41, 151, 255, 0.2);
  color: var(--apple-cyan);
  border: 1px solid var(--apple-cyan);
}
.hud-scanning {
  background: rgba(255, 159, 10, 0.2);
  color: var(--apple-orange);
  border: 1px solid var(--apple-orange);
}
.hud-verified {
  background: rgba(48, 209, 88, 0.2);
  color: var(--apple-green);
  border: 1px solid var(--apple-green);
}
.hud-rejected {
  background: rgba(255, 69, 58, 0.2);
  color: var(--apple-red);
  border: 1px solid var(--apple-red);
}

/* Viewport Bottom Telemetry HUD */
.viewport-bottom-hud {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--apple-cyan);
  background: rgba(0, 0, 0, 0.85);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.hud-drag-hint {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--apple-cyan);
  white-space: nowrap;
}

.hud-coords {
  font-size: 0.68rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--apple-green);
  white-space: nowrap;
}

/* Identity Selector Cards */
.terminal-employee-selector {
  margin-top: 16px;
}

.selector-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.selector-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-clear-custom {
  background: transparent;
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-clear-custom:hover {
  background: rgba(244, 63, 94, 0.15);
  border-color: #fb7185;
}

.emp-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.emp-select-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 6px;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-fast);
  user-select: none;
}

.emp-select-card:hover {
  border-color: var(--border-glow);
  background: var(--bg-surface-subtle);
}

.emp-select-card.active {
  border-color: var(--apple-blue);
  background: rgba(0, 113, 227, 0.14);
  box-shadow: 0 0 16px rgba(0, 113, 227, 0.3);
}

.emp-select-custom {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(2, 132, 199, 0.1);
}

.emp-card-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  overflow: hidden;
}

.emp-card-avatar-custom {
  background: linear-gradient(135deg, #0ea5e9, #06b6d4);
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.4);
}

.emp-custom-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.emp-card-name {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

/* Terminal Actions Bar */
.terminal-actions-bar {
  display: flex;
  gap: 10px;
}

.btn-terminal-scan {
  flex: 2;
  background: var(--apple-blue);
  color: #ffffff;
  border: none;
  font-weight: 700;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  transition: all var(--transition-fast);
}

.btn-terminal-scan:hover {
  background: var(--apple-blue-hover);
  transform: scale(1.01);
}

.btn-terminal-aux {
  flex: 1;
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  font-weight: 600;
  padding: 11px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 0.88rem;
  transition: all var(--transition-fast);
}

.btn-terminal-aux:hover {
  background: var(--bg-surface-subtle);
}

/* ==========================================================================
   4. Apple Bento Grid Sections (Features & Pillars)
   ========================================================================== */
.section {
  padding: clamp(60px, 9vw, 100px) 0;
  position: relative;
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto clamp(36px, 6vw, 64px);
}

.section-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Bento Grid Layouts */
.why-grid,
.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.why-card,
.security-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(26px, 4vw, 38px);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.why-card:hover,
.security-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: 0 12px 30px -10px rgba(2, 132, 199, 0.15);
}

.taste-icon-badge,
.why-icon-box,
.why-card-icon,
.security-icon-badge,
.feature-icon-bubble,
.arch-node-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(2, 132, 199, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  margin-bottom: 20px;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.why-card:hover .taste-icon-badge,
.security-card:hover .taste-icon-badge,
.feature-card:hover .taste-icon-badge,
.arch-node-card:hover .taste-icon-badge {
  background: rgba(2, 132, 199, 0.2);
  border-color: rgba(56, 189, 248, 0.45);
  color: #ffffff;
}

.taste-icon {
  display: inline-block;
  flex-shrink: 0;
}

.why-card-title,
.security-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.why-card-desc,
.security-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 16px;
}

.metric-pill,
.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  font-family: var(--font-mono);
  background: rgba(2, 132, 199, 0.12);
  color: var(--accent-cyan);
  align-self: flex-start;
  margin-top: auto;
}

/* Features Grid (12-Column Asymmetric Bento Grid Hierarchy) */
.features-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 22px;
}

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 30px 26px;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

/* Asymmetric Editorial Bento Spans (7:5, 5:7, 6:6) */
.feature-card:nth-child(1) {
  grid-column: span 7;
}
.feature-card:nth-child(2) {
  grid-column: span 5;
}
.feature-card:nth-child(3) {
  grid-column: span 5;
}
.feature-card:nth-child(4) {
  grid-column: span 7;
}
.feature-card:nth-child(5) {
  grid-column: span 6;
}
.feature-card:nth-child(6) {
  grid-column: span 6;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: 0 12px 30px -10px rgba(2, 132, 199, 0.15);
}

.feature-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.feature-icon-bubble {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(41, 151, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.feature-category-tag {
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--apple-cyan);
  background: rgba(41, 151, 255, 0.1);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.feature-title {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.feature-description {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 20px;
  flex-grow: 1;
}

.feature-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

.feature-check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.check-icon {
  color: var(--apple-green);
  font-weight: 700;
}

/* ==========================================================================
   5. Apple-Style Interactive Simulator / Sandbox
   ========================================================================== */
.simulator-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-device);
  overflow: hidden;
}

/* Apple Pill Segmented Tabs */
.simulator-tabs-header {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
}

.sim-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.sim-tab-btn:hover {
  color: var(--text-primary);
}

.sim-tab-btn.active {
  background: var(--apple-blue);
  color: #ffffff;
}

.sim-tab-pane {
  display: none;
  padding: clamp(20px, 4vw, 36px);
}

.sim-tab-pane.active {
  display: block;
}

/* Simulator Split Layout */
.sandbox-split-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

.sandbox-canvas-panel {
  display: flex;
  flex-direction: column;
}

.sandbox-controls-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.sandbox-details-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.personnel-details-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.detail-value {
  color: var(--text-primary);
  font-weight: 700;
  font-family: var(--font-mono);
}

.detail-value.badge-success {
  color: var(--apple-green);
}

/* Terminal Audit Stream */
.terminal-audit-box {
  background: #050811;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  flex-grow: 1;
}

.audit-box-header {
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--apple-cyan);
  margin-bottom: 10px;
}

.log-stream {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 160px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
}

.log-entry {
  display: flex;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 4px;
}

.log-time { color: var(--text-tertiary); flex-shrink: 0; }
.log-msg { color: var(--text-primary); }
.log-info { background: rgba(56, 189, 248, 0.08); }
.log-success { background: rgba(16, 185, 129, 0.12); color: var(--accent-emerald); }
.log-error { background: rgba(244, 63, 94, 0.14); color: var(--accent-rose); }

/* Monospace Status Tags */
.terminal-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 6px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.terminal-tag.tag-info {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.terminal-tag.tag-ok {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.terminal-tag.tag-warn {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.terminal-tag.tag-err {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Pane 2: Dynamic QR */
.qr-sandbox-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 32px;
  align-items: center;
}

.qr-terminal-display {
  background: linear-gradient(180deg, rgba(13, 21, 39, 0.75) 0%, rgba(5, 8, 17, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.qr-kiosk-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.terminal-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--apple-green);
  box-shadow: 0 0 8px var(--apple-green);
  display: inline-block;
  animation: pulse-dot 2s infinite;
}

.qr-canvas-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.qr-canvas-box canvas {
  display: block;
  width: 170px;
  height: 170px;
  border-radius: 4px;
}

.qr-countdown-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--apple-cyan);
}

.qr-timer-svg {
  width: 22px;
  height: 22px;
  transform: rotate(-90deg);
  flex-shrink: 0;
  fill: none;
  overflow: visible;
}

.qr-timer-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 5;
}

.qr-timer-fill {
  fill: none;
  stroke: var(--apple-cyan);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 176;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.85s linear;
}

.qr-terminal-hint {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
}

.qr-scanner-interaction {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qr-meta-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qr-token-pill {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--apple-cyan);
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  letter-spacing: 0.08em;
  display: inline-block;
  width: fit-content;
  margin: 2px 0 6px 0;
}

.qr-scanning-state {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  font-size: 0.85rem;
  color: var(--apple-cyan);
  margin-top: 12px;
}

.scanning-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(56, 189, 248, 0.25);
  border-top-color: var(--apple-cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.qr-success-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--text-primary);
  margin-top: 14px;
  animation: fadeInUp 0.3s ease-out;
}

.qr-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.2);
  color: var(--apple-green);
  flex-shrink: 0;
}

/* Pane 3: Shift & OT Calculator */
.calc-sandbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.calc-form-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calc-results-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.calc-result-banner {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(99, 102, 241, 0.08));
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
  margin-bottom: 8px;
}

.result-grand-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--apple-cyan);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.result-grand-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input,
.form-select {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus,
.form-select:focus {
  border-color: var(--apple-blue);
}

/* ==========================================================================
   6. Apple-Style Product Showcase (Hardware Family)
   ========================================================================== */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.showcase-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-smooth);
}

.showcase-card:hover {
  transform: translateY(-4px);
}

.showcase-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #050811;
}

.showcase-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.showcase-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.showcase-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.showcase-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   7. Apple-Style Architecture & Roles
   ========================================================================== */
.arch-nodes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.arch-node,
.arch-node-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.arch-node:hover,
.arch-node-card:hover {
  border-color: var(--apple-blue);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 113, 227, 0.15);
}

.arch-node-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.arch-node-badge {
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--apple-cyan);
  background: rgba(41, 151, 255, 0.12);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.arch-node-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.arch-node-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 14px;
  flex-grow: 1;
}

.arch-inspect-hint {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  color: var(--apple-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.arch-node-meta {
  font-size: 0.76rem;
  font-family: var(--font-mono);
  color: var(--apple-cyan);
}

/* Role Tabs */
.roles-tabs-nav,
.role-tabs-header {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.role-tab-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.role-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}

.role-tab-btn.active {
  background: var(--apple-blue);
  color: #ffffff;
  border-color: var(--apple-blue);
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.4);
}

.role-pane,
.role-tab-pane {
  display: none;
}

.role-pane.active,
.role-tab-pane.active {
  display: block;
}

.role-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 40px);
}

.role-feat-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.role-feat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text-primary);
}

/* ==========================================================================
   8. Apple-Style FAQ Accordion
   ========================================================================== */
.faq-accordion,
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-subtle);
}

.faq-item {
  border-bottom: 1px solid var(--border-subtle);
}

.faq-question {
  width: 100%;
  padding: 22px 0;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.08rem;
  font-weight: 600;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: color var(--transition-fast);
  gap: 16px;
}

.faq-question:hover {
  color: var(--accent-cyan);
}

.faq-arrow,
.faq-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: transform var(--transition-smooth), color var(--transition-fast);
  flex-shrink: 0;
}

.faq-chevron-svg {
  transition: transform var(--transition-smooth);
}

.faq-item.active .faq-chevron-svg,
.faq-item.open .faq-chevron-svg {
  transform: rotate(180deg);
  color: var(--accent-cyan);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer,
.faq-item.open .faq-answer {
  max-height: 280px;
  padding-bottom: 22px;
}

/* ==========================================================================
   9. Apple-Style Call to Action Unit
   ========================================================================== */
.cta-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: clamp(40px, 6vw, 72px) clamp(20px, 4vw, 48px);
  text-align: center;
  margin: 40px auto 0;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
  flex-wrap: wrap;
}

/* ==========================================================================
   10. Apple Minimalist Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-body);
  padding: 48px 0 32px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand-desc {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  max-width: 280px;
}

.footer-col-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--apple-cyan);
}

.footer-bottom-bar {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.footer-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--apple-green);
  font-family: var(--font-mono);
}

/* ==========================================================================
   Modals & Enterprise Consultation System
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.78);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-smooth);
  padding: clamp(16px, 4vw, 32px);
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  background-image: radial-gradient(ellipse 90% 40% at 50% 0%, rgba(2, 132, 199, 0.12) 0%, transparent 80%);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px -15px rgba(0, 0, 0, 0.9), 0 0 45px rgba(2, 132, 199, 0.12);
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  overflow-y: auto;
  padding: clamp(28px, 4.5vw, 42px);
  position: relative;
  transform: scale(0.96) translateY(14px);
  transition: transform var(--transition-smooth), opacity var(--transition-fast);
  overscroll-behavior: contain;
}

[data-theme="light"] .modal-card {
  background-color: #ffffff;
  background-image: radial-gradient(ellipse 90% 40% at 50% 0%, rgba(2, 132, 199, 0.08) 0%, transparent 80%);
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 25px 70px -10px rgba(15, 23, 42, 0.15), 0 0 30px rgba(2, 132, 199, 0.06);
}

.modal-overlay.show .modal-card {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
}

.modal-close-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-glow);
  transform: rotate(90deg);
  background: var(--bg-surface-subtle);
}

/* Modal Header & Typography */
.modal-header {
  margin-bottom: 24px;
  text-align: left;
}

.modal-eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 700;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-cyan);
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  margin-bottom: 12px;
}

.modal-heading {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.modal-subtext {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Bento 2-Column Form Pairing */
.modal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.form-group-full {
  grid-column: span 2;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.required-asterisk {
  color: var(--accent-cyan);
  font-weight: 700;
  margin-left: 3px;
}

.form-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.form-input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: color var(--transition-fast);
  z-index: 2;
}

.form-input-wrap:focus-within .form-input-icon {
  color: var(--accent-cyan);
}

.form-input,
.form-select {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 11px 14px 11px 42px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus {
  border-color: var(--accent-cyan);
  background: var(--bg-surface-subtle);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.select-wrap::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid var(--text-secondary);
  pointer-events: none;
}

.form-select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  cursor: pointer;
}

.form-textarea {
  padding: 12px 14px;
  min-height: 84px;
  resize: vertical;
  line-height: 1.5;
}

.modal-trust-footnote {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  margin-bottom: 22px;
  line-height: 1.4;
  text-align: left;
}

.modal-trust-footnote svg {
  flex-shrink: 0;
  color: var(--accent-cyan);
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-submit-btn {
  width: 100%;
  padding: 13px 24px;
  font-size: 0.94rem;
  font-weight: 700;
  gap: 10px;
  border-radius: var(--radius-pill);
}

.spinner-svg {
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

/* Success State & Receipt Card */
.modal-success-state {
  text-align: center;
  padding: 10px 0;
}

.modal-success-badge-wrap {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  animation: badgePop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes badgePop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-receipt-card {
  background: var(--bg-surface-elevated);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 22px 0 24px;
  text-align: left;
}

.receipt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.receipt-lbl {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
}

.receipt-ticket-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.receipt-ticket-id {
  font-family: var(--font-mono);
  font-size: 0.96rem;
  color: var(--accent-emerald);
  letter-spacing: 0.03em;
}

.btn-copy-ticket {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
}

[data-theme="light"] .btn-copy-ticket {
  background: rgba(15, 23, 42, 0.04);
}

.btn-copy-ticket:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-color: var(--accent-cyan);
}

.receipt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.receipt-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.receipt-key {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.receipt-val {
  font-size: 0.88rem;
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.receipt-highlight {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.modal-success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.modal-success-actions .btn {
  flex: 1;
  min-width: 180px;
  padding: 11px 20px;
}

/* ==========================================================================
   Telegram Direct Contact Styles (@k3n0r)
   ========================================================================== */

/* Vector Icon alignment */
.tg-svg-icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  transition: transform var(--transition-fast);
}

/* Nav Telegram Pill Button */
.nav-tg-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(42, 171, 238, 0.12);
  border: 1px solid rgba(42, 171, 238, 0.28);
  color: #38bdf8;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: var(--font-mono);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  line-height: 1.3;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

[data-theme="light"] .nav-tg-btn {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.22);
  color: #0284c7;
}

.nav-tg-btn:hover {
  background: rgba(42, 171, 238, 0.24);
  border-color: rgba(42, 171, 238, 0.55);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(42, 171, 238, 0.28);
}

[data-theme="light"] .nav-tg-btn:hover {
  background: rgba(2, 132, 199, 0.18);
  border-color: #0284c7;
  color: #0369a1;
  box-shadow: 0 3px 12px rgba(2, 132, 199, 0.18);
}

.nav-tg-btn:hover .tg-svg-icon {
  transform: scale(1.1) rotate(-4deg);
}

/* Mobile Drawer Telegram link */
.nav-item-tg-mobile {
  display: none;
}

.primary-nav.mobile-open .nav-item-tg-mobile {
  display: block;
  margin-top: 6px;
}

.nav-link-tg {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #38bdf8 !important;
  font-family: var(--font-mono);
}

/* Telegram CTA Button (Deploy Section & Modal Follow-up) */
.btn-telegram-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  background: rgba(42, 171, 238, 0.15);
  border: 1px solid rgba(42, 171, 238, 0.35);
  color: #ffffff;
  transition: all var(--transition-fast);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

[data-theme="light"] .btn-telegram-cta {
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.3);
  color: #0369a1;
}

.btn-telegram-cta:hover {
  background: rgba(42, 171, 238, 0.28);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(42, 171, 238, 0.35);
}

[data-theme="light"] .btn-telegram-cta:hover {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.3);
}

.btn-telegram-cta:hover .tg-svg-icon {
  transform: scale(1.1) rotate(-6deg);
}

.btn-telegram-cta:active,
.nav-tg-btn:active,
.btn-tg-direct:active,
.footer-tg-pill:active {
  transform: scale(0.97);
}

/* Modal Direct Telegram Bar */
.modal-direct-tg-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  background: rgba(42, 171, 238, 0.06);
  border: 1px dashed rgba(42, 171, 238, 0.3);
  border-radius: 12px;
}

[data-theme="light"] .modal-direct-tg-bar {
  background: rgba(2, 132, 199, 0.04);
  border-color: rgba(2, 132, 199, 0.22);
}

.tg-direct-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #38bdf8;
}

[data-theme="light"] .tg-direct-left {
  color: #0284c7;
}

.tg-direct-lbl {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.btn-tg-direct {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: #38bdf8;
  background: rgba(42, 171, 238, 0.12);
  border: 1px solid rgba(42, 171, 238, 0.3);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

[data-theme="light"] .btn-tg-direct {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.25);
  color: #0284c7;
}

.btn-tg-direct:hover {
  background: #0284c7;
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(2, 132, 199, 0.35);
}

.btn-tg-direct:hover .tg-svg-icon {
  transform: scale(1.12);
}

/* Receipt Card Direct Telegram Row */
.receipt-item-tg {
  border-left: 2px solid rgba(42, 171, 238, 0.4);
  padding-left: 8px;
}

.receipt-tg-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #38bdf8 !important;
  font-family: var(--font-mono);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

[data-theme="light"] .receipt-tg-link {
  color: #0284c7 !important;
}

.receipt-tg-link:hover {
  color: #ffffff !important;
  text-decoration: underline;
}

[data-theme="light"] .receipt-tg-link:hover {
  color: #0369a1 !important;
}

/* Footer Telegram Box & Links */
.footer-tg-pill-wrap {
  margin-top: 14px;
}

.footer-tg-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  background: rgba(42, 171, 238, 0.1);
  border: 1px solid rgba(42, 171, 238, 0.26);
  border-radius: var(--radius-pill);
  color: #38bdf8;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
  text-decoration: none;
  transition: all var(--transition-fast);
}

[data-theme="light"] .footer-tg-pill {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.22);
  color: #0284c7;
}

.footer-tg-pill:hover {
  background: rgba(42, 171, 238, 0.22);
  border-color: rgba(42, 171, 238, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(42, 171, 238, 0.25);
}

[data-theme="light"] .footer-tg-pill:hover {
  background: rgba(2, 132, 199, 0.16);
  color: #0369a1;
}

.footer-bottom-tg-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  transition: color var(--transition-fast);
}

.footer-bottom-tg-link:hover {
  color: #38bdf8;
}

[data-theme="light"] .footer-bottom-tg-link:hover {
  color: #0284c7;
}

/* Toast Notification Floating Pill */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  background: rgba(22, 22, 23, 0.95);
  border: 1px solid var(--apple-green);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lg);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Scroll Reveal */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   11. Strict Mobile Responsiveness (Zero Overflow, Perfect Alignment)
   ========================================================================== */

/* Tablets (<= 1024px) */
@media (max-width: 1024px) {
  .site-header.nav-expanded,
  .site-header:has(.mobile-open) {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #090c15;
  }
  [data-theme="light"] .site-header.nav-expanded,
  [data-theme="light"] .site-header:has(.mobile-open) {
    background: #ffffff;
  }

  .nav-links {
    display: none;
  }
  .primary-nav.mobile-open .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 48px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: calc(100vh - 48px);
    height: calc(100dvh - 48px);
    background: #090c15;
    padding: 28px 24px 40px;
    gap: 18px;
    z-index: 2000;
    overflow-y: auto;
  }
  [data-theme="light"] .primary-nav.mobile-open .nav-links {
    background: #ffffff;
  }
  .primary-nav.mobile-open .nav-link {
    font-size: 1.25rem;
    font-weight: 600;
  }
  .mobile-menu-btn {
    display: flex;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .feature-card:nth-child(n) {
    grid-column: span 1;
  }
  .arch-nodes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Portrait Tablets & Large Phones (<= 768px) */
@media (max-width: 768px) {
  .hero-metrics-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .why-grid,
  .security-grid,
  .features-grid,
  .showcase-grid,
  .sandbox-split-layout,
  .qr-sandbox-grid,
  .calc-sandbox-grid,
  .role-layout,
  .arch-nodes-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .feature-card:nth-child(n) {
    grid-column: span 1 !important;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .role-tabs-header {
    justify-content: flex-start;
    overflow-x: auto;
  }
}

/* Mobile Phones (<= 580px, including 355px, 375px, 390px) */
@media (max-width: 580px) {
  .container {
    padding: 0 16px;
  }
  .site-header {
    height: 48px;
  }
  .nav-actions .btn-primary {
    display: none; /* Hide top CTA to give logo and toggles breathing room */
  }
  .nav-tg-btn .nav-tg-handle {
    display: none;
  }
  .nav-tg-btn {
    padding: 5px 7px;
  }
  .modal-direct-tg-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .modal-direct-tg-bar .btn-tg-direct {
    width: 100%;
    justify-content: center;
  }
  .cta-actions .btn-telegram-cta {
    width: 100%;
  }

  .hero-section {
    padding: 36px 0 24px;
  }
  .hero-pill-badge {
    font-size: 0.72rem;
    padding: 5px 12px;
    white-space: normal;
    max-width: 100%;
    line-height: 1.35;
    margin-bottom: 16px;
  }
  .hero-title {
    font-size: clamp(1.6rem, 7.2vw, 2.3rem);
    line-height: 1.14;
    letter-spacing: -0.025em;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .hero-description {
    font-size: 0.98rem;
    margin-bottom: 24px;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  .hero-actions .btn {
    width: 100%;
  }

  /* 2x2 Metric Grid on Mobile */
  .hero-metrics-bar {
    grid-template-columns: repeat(2, 1fr);
    padding: 14px 16px;
    gap: 10px;
  }
  .metric-value {
    font-size: 1.35rem;
  }

  /* Centered Hardware Terminal on Mobile */
  .hero-terminal-mockup {
    padding: 14px;
    border-radius: var(--radius-lg);
  }
  .kiosk-source-bar {
    width: 100%;
    margin-bottom: 10px;
  }
  .kiosk-source-tabs {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 2px;
    padding: 2px;
  }
  .kiosk-src-tab {
    flex: 1;
    justify-content: center;
    padding: 5px 6px;
    font-size: 0.67rem;
    gap: 4px;
  }
  .kiosk-overlay-card,
  .kiosk-dropzone {
    padding: 14px 10px;
    max-width: 95%;
  }
  .kiosk-overlay-title,
  .dropzone-title {
    font-size: 0.84rem;
  }
  .kiosk-overlay-sub,
  .dropzone-sub {
    font-size: 0.68rem;
    margin-bottom: 10px;
  }
  .terminal-viewport,
  .sandbox-canvas-wrapper {
    height: 270px;
  }
  .viewport-hud-overlay {
    top: 6px;
    left: 6px;
    right: 6px;
    gap: 4px;
  }
  .hud-tag {
    font-size: 0.6rem;
    padding: 2px 5px;
  }
  .view-mode-btn {
    font-size: 0.58rem;
    padding: 2px 6px;
  }
  .viewport-bottom-hud {
    bottom: 6px;
    left: 6px;
    right: 6px;
    font-size: 0.64rem;
    padding: 3px 6px;
  }
  .hud-drag-hint {
    display: none; /* Keep clean on 355px */
  }

  /* 2x2 or auto-fit Employee Quick Selection */
  .emp-cards-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  /* Action Buttons Full Width */
  .terminal-actions-bar,
  .sandbox-controls-row {
    flex-direction: column;
  }
  .btn-terminal-scan,
  .btn-terminal-aux,
  .sandbox-controls-row .btn {
    width: 100%;
    min-height: 42px;
  }

  /* Simulator Tabs Scroll */
  .simulator-tabs-header {
    justify-content: flex-start;
    overflow-x: auto;
    padding: 10px 12px;
  }
  .sim-tab-btn {
    font-size: 0.8rem;
    padding: 6px 14px;
  }

  /* Toast Notification */
  .toast-notification {
    left: 12px;
    right: 12px;
    bottom: 16px;
    font-size: 0.78rem;
    justify-content: center;
  }

  /* Modal Mobile Adaptation */
  .modal-card {
    padding: 24px 18px 22px;
    border-radius: 20px;
    max-height: 94vh;
  }
  .modal-close-btn {
    top: 14px;
    right: 14px;
  }
  .modal-form-grid {
    grid-template-columns: 1fr;
    gap: 13px;
  }
  .form-group-full {
    grid-column: span 1;
  }
  .receipt-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .modal-success-actions {
    flex-direction: column;
  }
  .modal-success-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

/* Extra Compact Phones (<= 360px) */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.45rem;
    line-height: 1.16;
  }
  .metric-value {
    font-size: 1.2rem;
  }
  .terminal-viewport,
  .sandbox-canvas-wrapper {
    height: 250px;
  }
}

/* Accessibility Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-accent {
    animation: none !important;
  }
}
