/* ==========================================================================
   LAYERIS — Hardware-Adaptive LLM Frontend Design System
   Color Palettes, Typography, Glassmorphism, 3D Strata Aesthetics
   ========================================================================== */

:root {
  /* Color Tokens - Deep Midnight Obsidian with Image 2 Stratum Palette */
  --bg-dark: #070913;
  --bg-card: rgba(13, 18, 34, 0.84);
  --bg-card-hover: rgba(20, 28, 52, 0.94);
  --bg-card-inner: rgba(9, 13, 26, 0.88);
  --border-subtle: rgba(99, 102, 241, 0.16);
  --border-glow: rgba(129, 140, 248, 0.35);
  --border-active: rgba(168, 85, 247, 0.55);

  /* Tier Accent System — 100% Harmonized with Image 2 Layers */
  --tier-nvme: #38bdf8;       /* Layer 0 / Storage: Crystalline Ice Cyan */
  --tier-nvme-glow: rgba(56, 189, 248, 0.28);
  --tier-ram: #6366f1;        /* Layer 1 / Host DDR5: Vibrant Royal Cobalt Indigo */
  --tier-ram-glow: rgba(99, 102, 241, 0.28);
  --tier-vram: #a855f7;       /* Layer 2 / GPU VRAM: Radiant Electric Violet */
  --tier-vram-glow: rgba(168, 85, 247, 0.32);
  --tier-compute: #818cf8;    /* Compute Core: Luminous Electric Lavender */
  --tier-compute-glow: rgba(129, 140, 248, 0.28);

  /* Neutrals & Text */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-cyan: #38bdf8;
  --accent-indigo: #6366f1;
  --accent-violet: #a855f7;
  --accent-lavender: #c084fc;

  /* Typography */
  --font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* UI Metrics */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: all 0.2s ease;
  --shadow-glass: 0 8px 32px rgba(7, 9, 19, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: clip;
  position: relative;
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--tier-ram);
}

/* Lightweight Ambient Backdrop - Image 2 Gradient Atmosphere */
.bg-strata-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image: 
    radial-gradient(circle at 18% 18%, rgba(56, 189, 248, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 82% 42%, rgba(99, 102, 241, 0.09) 0%, transparent 48%),
    radial-gradient(circle at 45% 82%, rgba(168, 85, 247, 0.08) 0%, transparent 50%);
}

/* Clean, Simple Glass Panel Utility */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
  transition: var(--transition);
}

.glass-panel:hover {
  border-color: rgba(129, 140, 248, 0.35);
}

.glass-inner-panel {
  background: var(--bg-card-inner);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

/* Typography Helpers */
.gradient-text-accent {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 48%, #c084fc 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-cyan { color: var(--tier-nvme) !important; }
.text-indigo { color: var(--tier-ram) !important; }
.text-purple, .text-violet { color: var(--tier-vram) !important; }
.text-green { color: var(--tier-ram) !important; }
.text-danger { color: #f87171 !important; }
.text-warning { color: #f43f5e !important; }


/* Buttons & Interactive Elements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.75rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, #38bdf8 0%, #6366f1 50%, #a855f7 100%);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #60a5fa 0%, #818cf8 50%, #c084fc 100%);
  box-shadow: 0 6px 26px rgba(168, 85, 247, 0.55);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border-color: var(--border-subtle);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-subtle);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--tier-ram);
  color: var(--tier-ram);
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.w-full { width: 100%; }

/* Navigation Bar */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(7, 9, 14, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.header-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0.6rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

.logo-icon-svg-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
  filter: drop-shadow(0 4px 14px rgba(99, 102, 241, 0.35));
}

.brand-logo:hover .logo-icon-svg-wrap {
  transform: translateY(-2px) scale(1.06);
  filter: drop-shadow(0 6px 22px rgba(168, 85, 247, 0.55));
}

.layeris-brand-mark {
  display: block;
  width: 56px;
  height: 42px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1;
  display: flex;
  align-items: center;
}

.brand-dot-wrap {
  position: relative;
  display: inline-block;
  line-height: 1;
}

.brand-i-dot {
  position: absolute;
  top: -2.5px;
  left: 2px;
  width: 5.5px;
  height: 5.5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #a855f7);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.65);
}

.brand-tag {
  font-family: var(--font-body);
  font-size: 0.58rem;
  letter-spacing: 0.22em;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-item:hover, .nav-item.active-nav {
  color: #fff;
}

.nav-item.active-nav::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--tier-ram);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-actions .btn {
  padding: 0.45rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 50px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.header-actions .btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.header-actions .btn-outline:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: var(--tier-nvme);
  color: #fff;
  transform: translateY(-1px);
}

.header-actions .btn-primary {
  padding: 0.45rem 1.3rem;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.header-actions .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(168, 85, 247, 0.5);
}

/* Hero Section */
.hero-section {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

.hero-grid-container {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 2.0rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--tier-vram);
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 2.7vw, 2.7rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
}

.hero-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.1rem;
  max-width: 540px;
}

.hero-subtitle strong {
  color: #fff;
}

.hero-actions {
  display: flex;
  gap: 1.0rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.hero-btn-main {
  padding: 0.75rem 1.4rem;
  font-size: 0.92rem;
}

.hero-btn-sec {
  padding: 0.75rem 1.3rem;
  font-size: 0.92rem;
}

/* Hero Metrics Strip */
.hero-metrics-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem 1.2rem;
  background: rgba(15, 20, 32, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.1rem;
  backdrop-filter: blur(10px);
}

.metric-card {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.15rem;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.metric-sub {
  font-size: 0.70rem;
  color: var(--text-muted);
}

.metric-divider {
  display: none;
}

/* Hero Container for Architecture & 3D Layer Visualizer */
.hero-scrolly-container {
  position: relative;
  width: 100%;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

.hero-sticky-frame {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* Hero Section inside Pinned Frame */
.hero-section {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.5rem 2rem;
}

/* 3D Visualizer Stage & Side Process Pipeline HUD */
.hero-visualizer-col {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 680px;
  margin-left: auto;
}

.visualizer-split-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: min(620px, calc(100vh - 90px));
  min-height: 520px;
  position: relative;
}

.visualizer-split-stage::before {
  content: '';
  position: absolute;
  width: 90%;
  height: 90%;
  background: radial-gradient(circle at 40% 50%, rgba(99, 102, 241, 0.12) 0%, rgba(56, 189, 248, 0.06) 50%, transparent 75%);
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(20px);
}


.process-hud-col {
  display: none !important;
}

.canvas-wrapper-3d {
  position: relative;
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
}

.canvas-wrapper-3d:active {
  cursor: grabbing;
}

#layeris-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
}

/* Side Process Pipeline HUD Column */
.process-hud-col {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
  z-index: 10;
}

.process-card {
  position: relative;
  background: rgba(13, 18, 34, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.05rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.52;
}

.process-card:hover,
.process-card.active {
  opacity: 1.0;
  transform: translateX(-4px);
}

.process-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #475569;
  transition: all 0.25s ease;
}

.process-card.tier-0::before { background: #f59e0b; }
.process-card.tier-1::before { background: #06b6d4; }
.process-card.tier-2::before { background: #a855f7; }

.process-card.active.tier-0 {
  border-color: #f59e0b;
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.12);
}
.process-card.active.tier-1 {
  border-color: #06b6d4;
  box-shadow: 0 6px 24px rgba(6, 182, 212, 0.28);
  background: rgba(6, 182, 212, 0.12);
}
.process-card.active.tier-2 {
  border-color: #a855f7;
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.28);
  background: rgba(168, 85, 247, 0.12);
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.28rem;
}

.card-tier-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}
.tier-0 .card-tier-tag { color: #f59e0b; }
.tier-1 .card-tier-tag { color: #38bdf8; }
.tier-2 .card-tier-tag { color: #c084fc; }

.card-status-pill {
  font-family: var(--font-mono);
  font-size: 0.63rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.process-card.active .card-status-pill {
  background: #ffffff;
  color: #090d16;
  border-color: #ffffff;
  font-weight: 800;
}

.card-flow-title {
  font-size: 0.81rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.flow-arrow {
  color: var(--tier-ram);
  font-weight: 800;
}

.card-desc-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}
.card-desc-text code {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.25rem;
  border-radius: 4px;
  color: var(--text-main);
}


/* Sections Common */
.section-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-header {
  margin-bottom: 3.5rem;
}
.section-header.text-center {
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.section-sub {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 0.6rem;
  color: var(--tier-ram);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Strata Cards (Architecture Pipeline) */
.strata-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.strata-card {
  padding: 2.2rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.strata-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0.8;
  transition: var(--transition);
}

.strata-card[data-tier="storage"]::before { background: var(--tier-nvme); }
.strata-card[data-tier="ram"]::before { background: var(--tier-ram); }
.strata-card[data-tier="vram"]::before { background: var(--tier-vram); }

.card-icon-wrapper {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.tier-color-nvme { background: rgba(56, 189, 248, 0.15); color: var(--tier-nvme); border: 1px solid rgba(56, 189, 248, 0.35); }
.tier-color-ram { background: rgba(99, 102, 241, 0.15); color: var(--tier-ram); border: 1px solid rgba(99, 102, 241, 0.35); }
.tier-color-vram { background: rgba(168, 85, 247, 0.15); color: var(--tier-vram); border: 1px solid rgba(168, 85, 247, 0.35); }

.tier-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}

.strata-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.strata-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1.8rem;
  flex-grow: 1;
}

.strata-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.feature-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* Calculator Section */
.calculator-panel {
  padding: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.calc-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2.5rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.calc-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.calc-subtitle {
  color: var(--text-muted);
  max-width: 650px;
  font-size: 1rem;
}

.calc-preset-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.preset-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  font-weight: 600;
}

.preset-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.preset-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.preset-btn.active {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--tier-vram);
  color: #fff;
  font-weight: 600;
}

.calculator-body-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: start;
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.calc-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
}

.field-help {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--tier-ram);
  background: rgba(6, 182, 212, 0.12);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.field-number-val {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: #fff;
}

.field-number-val strong {
  font-size: 1.3rem;
  color: var(--tier-vram);
}

.custom-select {
  width: 100%;
  padding: 0.85rem 1rem;
  background: rgba(9, 12, 19, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.custom-select:focus {
  border-color: var(--tier-ram);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.2);
}

.custom-select option {
  background: #0f131d;
  color: #fff;
}

/* Segmented Control (Quantization buttons) */
.segmented-control {
  display: flex;
  background: rgba(9, 12, 19, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}

.seg-btn {
  flex: 1;
  padding: 0.6rem 0.4rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.seg-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.seg-btn.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(99, 102, 241, 0.3));
  border: 1px solid rgba(168, 85, 247, 0.5);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Range Sliders */
.custom-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  outline: none;
  background: #182030;
  cursor: pointer;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: var(--transition);
}

.range-vram::-webkit-slider-thumb {
  background: var(--tier-vram);
  box-shadow: 0 0 12px var(--tier-vram);
}

.range-ram::-webkit-slider-thumb {
  background: var(--tier-ram);
  box-shadow: 0 0 12px var(--tier-ram);
}

.range-ticks {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* Drive Radio Buttons */
.drive-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.drive-radio {
  cursor: pointer;
}

.drive-radio input {
  display: none;
}

.radio-card {
  display: flex;
  flex-direction: column;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(9, 12, 19, 0.7);
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
  text-align: center;
}

.radio-card .r-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.radio-card .r-speed {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--tier-nvme);
  font-weight: 600;
}

.drive-radio input:checked + .radio-card {
  border-color: var(--tier-nvme);
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.2);
}

/* Calculator Results Panel */
.calc-results {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.result-status-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.2rem;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.verdict-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.verdict-text h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--tier-nvme);
  margin-bottom: 0.2rem;
}

.verdict-text p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Allocation Bar */
.allocation-stack-container {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.stack-title-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.allocation-bar {
  display: flex;
  height: 24px;
  border-radius: 6px;
  overflow: hidden;
  background: #111420;
  border: 1px solid var(--border-subtle);
}

.bar-segment {
  height: 100%;
  transition: width 0.4s ease;
  position: relative;
}

.seg-vram {
  background: linear-gradient(90deg, #7e22ce, var(--tier-vram));
}
.seg-ram {
  background: linear-gradient(90deg, #4338ca, var(--tier-ram));
}
.seg-nvme {
  background: linear-gradient(90deg, #0284c7, var(--tier-nvme));
}

.stack-legend {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.swatch-vram { background: var(--tier-vram); }
.swatch-ram { background: var(--tier-ram); }
.swatch-nvme { background: var(--tier-nvme); }

/* Metrics Subgrid */
.metrics-subgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.calc-metric-box {
  background: rgba(15, 20, 32, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.c-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.c-val {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.c-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

/* Model Stratum Catalog */
.catalog-filters {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(15, 20, 32, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  min-width: 280px;
}

.search-input-wrap svg {
  color: var(--text-dim);
}

.search-input-wrap input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.9rem;
  width: 100%;
}

.filter-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
}

.filter-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.filter-pill.active {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--tier-vram);
  color: #fff;
  font-weight: 600;
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(390px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

/* Individual Model Card */
.model-card {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  border: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.model-card:hover {
  transform: translateY(-4px);
  border-color: rgba(168, 85, 247, 0.4);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 25px rgba(168, 85, 247, 0.15);
}

.model-card.featured-card {
  border-color: rgba(168, 85, 247, 0.4);
  background: linear-gradient(180deg, rgba(25, 21, 44, 0.75) 0%, rgba(15, 19, 29, 0.75) 100%);
}

.model-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.param-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.15);
  color: var(--tier-vram);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.param-badge.badge-titan {
  background: rgba(56, 189, 248, 0.15);
  color: var(--tier-nvme);
  border-color: rgba(56, 189, 248, 0.35);
}

.layer-count-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.model-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.model-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

/* Layer Architecture Spec Strip */
.model-spec-matrix {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: rgba(9, 12, 19, 0.75);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  margin-bottom: 1.4rem;
}

.spec-cell {
  display: flex;
  flex-direction: column;
}

.spec-cell .sc-k {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
}

.spec-cell .sc-v {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

/* Requirement Meter */
.req-meter-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1.5rem;
}

.req-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.req-bar-track {
  height: 6px;
  background: #111624;
  border-radius: 3px;
  overflow: hidden;
}

.req-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--tier-compute), var(--tier-ram), var(--tier-vram));
}

.model-card-actions {
  display: flex;
  gap: 0.75rem;
}

/* Terminal & Docs Section */
.quickstart-container {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 2.5rem;
  padding: 2.5rem;
  align-items: center;
}

.terminal-window {
  background: #080a10;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.2rem;
  background: #0e121d;
  border-bottom: 1px solid var(--border-subtle);
}

.term-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot.red { background: #f43f5e; }
.dot.yellow, .dot.cyan { background: #38bdf8; }
.dot.green, .dot.violet { background: #a855f7; }

.term-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.term-copy-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: var(--transition);
}
.term-copy-btn:hover {
  color: #fff;
}

.terminal-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.6;
}

.c-comment { color: #64748b; }
.c-prompt { color: var(--tier-ram); font-weight: 700; }
.c-cmd { color: #f1f5f9; font-weight: 600; }
.c-out { color: #818cf8; font-size: 0.8rem; }

.integration-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.integ-item {
  padding: 1.2rem;
  background: rgba(9, 12, 19, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.integ-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}

.integ-icon {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.integ-item h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  color: #fff;
}

.integ-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Benchmark Comparison Table */
.comparison-table-wrap {
  padding: 2.5rem;
  overflow-x: auto;
}

.benchmark-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.benchmark-table th {
  padding: 1.2rem 1.4rem;
  font-family: var(--font-display);
  font-weight: 700;
  border-bottom: 2px solid var(--border-subtle);
  color: var(--text-muted);
}

.benchmark-table td {
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.col-highlight {
  background: rgba(168, 85, 247, 0.08);
  border-left: 1px solid rgba(168, 85, 247, 0.2);
  border-right: 1px solid rgba(168, 85, 247, 0.2);
}

th.col-highlight {
  color: var(--tier-vram);
  font-size: 1.05rem;
}

/* Modals & Drawers */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.modal-window {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 50px rgba(168, 85, 247, 0.2);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.open .modal-window {
  transform: translateY(0) scale(1);
}

.modal-medium {
  max-width: 580px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.8rem 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--tier-ram);
  display: inline-block;
  margin-bottom: 0.3rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text-dim);
  cursor: pointer;
  transition: var(--transition);
}
.modal-close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-quant-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.modal-quant-card {
  padding: 0.85rem;
  background: rgba(9, 12, 19, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.modal-quant-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.modal-quant-card.selected {
  border-color: var(--tier-vram);
  background: rgba(168, 85, 247, 0.15);
}

.modal-quant-card .mq-name {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.modal-quant-card .mq-size {
  font-size: 0.75rem;
  color: var(--tier-ram);
  margin-top: 0.2rem;
}

.download-modes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mode-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(9, 12, 19, 0.7);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: var(--transition);
}

.mode-card input {
  margin-top: 0.25rem;
}

.mode-card.active {
  border-color: var(--tier-ram);
  background: rgba(6, 182, 212, 0.1);
}

.mode-content .m-title {
  font-weight: 600;
  font-size: 0.92rem;
  display: block;
  color: #fff;
}

.mode-content .m-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.slices-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.slice-item {
  padding: 0.5rem;
  background: rgba(9, 12, 19, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}

.modal-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #090b12;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.2rem;
}

.modal-code-box code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--tier-compute);
  word-break: break-all;
}

.direct-dl-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* OS Installation Box */
.os-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.os-tab {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.os-tab.active {
  background: var(--tier-ram);
  color: #07090e;
  font-weight: 700;
  border-color: var(--tier-ram);
}

.os-install-box {
  background: #090c14;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.code-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 1rem;
  background: #0e121e;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.os-code {
  padding: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--tier-compute);
  overflow-x: auto;
}

.install-tips {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tip-item {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Toast System */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  background: rgba(15, 20, 32, 0.92);
  border: 1px solid var(--tier-ram);
  color: #fff;
  padding: 0.9rem 1.4rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-family: var(--font-body);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  animation: slideToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideToast {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #05070a;
  padding: 5rem 2rem 3rem;
  margin-top: 4rem;
}

.footer-grid {
  max-width: 1380px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: 4rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.footer-motto {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 360px;
  line-height: 1.6;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.footer-links-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.f-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
  margin-bottom: 0.4rem;
}

.footer-links-group a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: var(--transition);
}

.footer-links-group a:hover {
  color: var(--tier-ram);
}

.hidden {
  display: none !important;
}

/* Responsive Media Queries */
@media (max-width: 1080px) {
  .hero-grid-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .visualizer-split-stage {
    grid-template-columns: 1fr;
    height: auto;
    gap: 1.5rem;
  }
  .canvas-wrapper-3d {
    height: 480px;
  }
  .calculator-body-grid {
    grid-template-columns: 1fr;
  }
  .strata-grid {
    grid-template-columns: 1fr;
  }
  .quickstart-container {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0.8rem 1rem;
  }
  .nav-links {
    display: none;
  }
  .hero-section {
    padding: 2.5rem 1rem 1.5rem;
  }
  .section-container {
    padding: 3.5rem 1rem;
  }
  .calculator-panel {
    padding: 1.5rem;
  }
  .models-grid {
    grid-template-columns: 1fr;
  }
  .drive-options {
    grid-template-columns: repeat(2, 1fr);
  }
  .hero-metrics-strip {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  .metric-divider {
    display: none;
  }
  .vis-telemetry {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
