/* ==========================================================================
   Kites.Dev — Precision Design System (Awwwards / Linear / Apple Level)
   ========================================================================== */

:root {
  /* Surface Ladder */
  --bg-canvas: #040508;
  --bg-surface-1: #090a0f;
  --bg-surface-2: #0f1118;
  --bg-surface-3: #151722;
  --bg-glass: rgba(12, 14, 20, 0.72);
  --bg-glass-card: rgba(15, 17, 24, 0.65);
  --bg-glass-card-hover: rgba(22, 25, 36, 0.85);

  /* Accents */
  --accent-cyan: #38bdf8;
  --accent-indigo: #6366f1;
  --accent-indigo-glow: rgba(99, 102, 241, 0.25);
  --accent-emerald: #10b981;
  --accent-violet: #a855f7;
  --accent-amber: #f59e0b;

  /* Specular Highlights & Hairlines */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-highlight: rgba(255, 255, 255, 0.14);
  --border-active: rgba(99, 102, 241, 0.4);
  --specular-inner: inset 0 1px 0 0 rgba(255, 255, 255, 0.12);

  /* Typography */
  --text-primary: #f5f5f7;
  --text-secondary: #8e94a5;
  --text-muted: #565c6e;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;

  /* Shadows */
  --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.8), inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
  --shadow-glow-cyan: 0 0 40px rgba(56, 189, 248, 0.18);
  --shadow-glow-indigo: 0 0 50px rgba(99, 102, 241, 0.2);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  /* Animations & Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Grid Canvas */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
}

/* Typography Standards */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  text-wrap: balance;
}

p {
  color: var(--text-secondary);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* Containers */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: 860px;
}

.section-spacing {
  padding: 110px 0;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 56px auto;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  align-self: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin-bottom: 20px;
  box-shadow: var(--specular-inner);
}

.cta-banner-box {
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(99, 102, 241, 0.22) 0%, rgba(14, 16, 23, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-xl);
  padding: 72px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.2), 0 30px 60px -15px rgba(0, 0, 0, 0.9), 0 0 50px rgba(99, 102, 241, 0.15);
}

.section-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 18px;
}

.section-subtitle {
  font-size: 1.12rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* -----------------------------
   Navigation Bar
   ----------------------------- */
.navbar-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 24px;
  transition: padding 0.3s var(--ease-spring);
}

.navbar-wrapper.scrolled {
  padding: 10px 24px;
}

.navbar {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 10px 22px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-card);
  transition: all 0.3s var(--ease-spring);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.brand-logo:hover .brand-logo-img {
  transform: scale(1.03);
}

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

.nav-item a {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all 0.15s ease;
}

.nav-item a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Command Palette Trigger Button (⌘K) */
.cmd-k-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  box-shadow: var(--specular-inner);
  transition: all 0.15s ease;
}

.cmd-k-trigger:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-highlight);
  color: #ffffff;
}

.cmd-k-kbd {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

/* Status Indicator */
.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 500;
  color: #34d399;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  border: 1px solid var(--accent-emerald);
  animation: pulseDot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 0; transform: scale(2); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s var(--ease-spring);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(180deg, #ffffff 0%, #d4d4d8 100%);
  color: #040508;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.35);
  color: #000000;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: var(--border-subtle);
  box-shadow: var(--specular-inner);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-highlight);
  transform: translateY(-2px);
  color: #ffffff;
}

.btn-sm {
  padding: 7px 16px;
  font-size: 0.84rem;
}

.btn-lg {
  padding: 15px 30px;
  font-size: 1rem;
}

/* -----------------------------
   Hero Stage (Apple Pro Keynote)
   ----------------------------- */
.hero-section {
  padding-top: 175px;
  padding-bottom: 90px;
  text-align: center;
  position: relative;
}

.hero-pill-announcement {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 18px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent-cyan);
  margin-bottom: 28px;
  box-shadow: var(--specular-inner);
  transition: all 0.2s ease;
}

.hero-pill-announcement:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.4);
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.04;
  max-width: 980px;
  margin: 0 auto 24px auto;
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 45%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: clamp(1.1rem, 1.8vw, 1.28rem);
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 36px auto;
  line-height: 1.65;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

/* -----------------------------
   Interactive Sandbox Widget
   ----------------------------- */
.hero-sandbox-container {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card), var(--shadow-glow-indigo);
}

.sandbox-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-subtle);
}

.sandbox-window-controls {
  display: flex;
  gap: 8px;
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.window-dot.red { background-color: #ef4444; }
.window-dot.yellow { background-color: #f59e0b; }
.window-dot.green { background-color: #10b981; }

.sandbox-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

.sandbox-tab-btn {
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.sandbox-tab-btn:hover {
  color: #ffffff;
}

.sandbox-tab-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.sandbox-body {
  padding: 40px;
  min-height: 420px;
  background: radial-gradient(circle at 50% 10%, rgba(99, 102, 241, 0.06) 0%, var(--bg-surface-1) 80%);
}

.sandbox-panel {
  display: none;
  animation: fadeIn 0.35s ease-out forwards;
}

.sandbox-panel.active {
  display: block;
}

.sandbox-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  text-align: left;
}

.product-feature-grid,
.feature-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
}

.feature-split-grid.reverse {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
}

.two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 900px) {
  .sandbox-body {
    padding: 24px 16px;
  }
  .sandbox-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
  }
  .sandbox-tabs {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    display: flex;
    gap: 6px;
    scrollbar-width: none;
  }
  .sandbox-tabs::-webkit-scrollbar {
    display: none;
  }
  .sandbox-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .product-feature-grid,
  .feature-split-grid,
  .feature-split-grid.reverse {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .feature-split-grid.reverse > div:first-child {
    order: 2;
  }
  .feature-split-grid.reverse > div:last-child {
    order: 1;
  }
  .two-col-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .bento-card {
    padding: 24px 18px !important;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* -----------------------------
   Metrics Bar
   ----------------------------- */
.metrics-section {
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(9, 10, 15, 0.5);
  backdrop-filter: blur(16px);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}

.metric-value {
  font-size: clamp(2.2rem, 3.2vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #ffffff;
  margin-bottom: 4px;
  font-family: var(--font-mono);
}

.metric-label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* -----------------------------
   Linear/Apple Bento Cards
   ----------------------------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.bento-card {
  background: var(--bg-glass-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.25s var(--ease-spring);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-card:hover {
  background: var(--bg-glass-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-3px);
}

.bento-span-8 { grid-column: span 8; }
.bento-span-7 { grid-column: span 7; }
.bento-span-6 { grid-column: span 6; }
.bento-span-5 { grid-column: span 5; }
.bento-span-4 { grid-column: span 4; }
.bento-span-12 { grid-column: span 12; }

.bento-title {
  font-size: 1.55rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.bento-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.bento-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent-cyan);
  transition: gap 0.15s ease;
}

.bento-link:hover {
  gap: 9px;
  color: #ffffff;
}

.comparison-slider-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 10;
  max-height: 250px;
  overflow: hidden;
  border-radius: var(--radius-md);
  user-select: none;
  background: #090a0f;
  border: 1px solid var(--border-subtle);
  --pos: 50%;
  box-sizing: border-box;
}

.slider-img-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
}

.slider-img-after-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  pointer-events: none;
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
  -webkit-clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
  z-index: 2;
}

.slider-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos, 50%);
  width: 2px;
  background: #ffffff;
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.7);
  z-index: 5;
  pointer-events: none;
  transform: translateX(-50%);
}

.slider-handle-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  color: #040508;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  font-size: 0.75rem;
  font-weight: 800;
}

.slider-range-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 10;
  -webkit-appearance: none;
  appearance: none;
}

.slider-label {
  position: absolute;
  bottom: 12px;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: #ffffff;
  z-index: 6;
  pointer-events: none;
}

.slider-label.before { left: 12px; }
.slider-label.after { right: 12px; }

/* -----------------------------
   Interactive Project Configurator
   ----------------------------- */
.planner-card {
  background: var(--bg-surface-1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 44px;
  box-shadow: var(--shadow-card), var(--shadow-glow-indigo);
}

.planner-step {
  margin-bottom: 32px;
}

.planner-step-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.planner-step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
}

.choice-pills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.choice-pill input[type="radio"],
.choice-pill input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.choice-pill label {
  display: block;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.choice-pill input:checked + label {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--accent-indigo);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.2);
}

.choice-pill label:hover {
  border-color: var(--border-highlight);
  background: rgba(255, 255, 255, 0.05);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-control,
.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  box-sizing: border-box;
  outline: none;
  transition: all 0.15s ease;
}

.form-control:focus,
.form-input:focus {
  border-color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

textarea.form-control,
textarea.form-input {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

/* -----------------------------
   Command Palette Modal (Raycast Style)
   ----------------------------- */
.cmd-palette-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 5, 8, 0.85);
  backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 14vh;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.cmd-palette-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.cmd-palette-dialog {
  width: 100%;
  max-width: 620px;
  background: var(--bg-surface-2);
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), var(--shadow-glow-indigo);
  overflow: hidden;
  transform: scale(0.97);
  transition: transform 0.2s var(--ease-spring);
}

.cmd-palette-backdrop.open .cmd-palette-dialog {
  transform: scale(1);
}

.cmd-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.cmd-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 500;
  outline: none;
}

.cmd-results-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 10px;
  list-style: none;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.12s ease;
}

.cmd-item:hover, .cmd-item.selected {
  background: rgba(99, 102, 241, 0.15);
  color: #ffffff;
}

.cmd-footer {
  display: flex;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--bg-surface-1);
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* -----------------------------
   Footer
   ----------------------------- */
.footer {
  background: var(--bg-surface-1);
  border-top: 1px solid var(--border-subtle);
  padding: 80px 0 36px 0;
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr 1.6fr;
  gap: 36px;
  margin-bottom: 60px;
}

.footer-heading {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 18px;
}

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

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: #ffffff;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.social-icon-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.social-icon-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-highlight);
  color: #ffffff;
  transform: translateY(-2px);
}

.footer-newsletter-form {
  margin-top: 8px;
}

.footer-newsletter-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 4px 5px 4px 14px;
  box-shadow: var(--specular-inner);
  transition: all 0.2s ease;
}

.footer-newsletter-input-wrap:focus-within {
  border-color: var(--accent-indigo);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.footer-newsletter-input {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
}

.footer-newsletter-input::placeholder {
  color: var(--text-muted);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* -----------------------------
   Toast UI
   ----------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-highlight);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  color: #ffffff;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Mobile Nav */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #ffffff;
  cursor: pointer;
}

.mobile-nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(4, 5, 8, 0.98);
  backdrop-filter: blur(30px);
  z-index: 1500;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-nav-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-drawer a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.mobile-nav-drawer a:hover,
.mobile-nav-drawer a.active {
  color: #ffffff;
}

@media (max-width: 1024px) {
  .bento-span-8, .bento-span-7, .bento-span-5, .bento-span-4, .bento-span-6 {
    grid-column: span 12;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links, .cmd-k-trigger, .status-badge {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
