/* ==========================================================================
   ÆTHERIS X-80 STYLESHEET
   Premium Custom Mechanical Keyboard Landing Page
   ========================================================================== */

/* Design Tokens & Theme Variables */
:root {
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-accent: 'Orbitron', monospace;

  /* Colors */
  --bg-dark: #07080b;
  --bg-card: rgba(18, 20, 29, 0.7);
  --bg-card-hover: rgba(26, 29, 41, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(168, 85, 247, 0.5);

  --text-white: #ffffff;
  --text-light: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Glow Accents */
  --color-primary: #a855f7;       /* Violet */
  --color-primary-rgb: 168, 85, 247;
  --color-secondary: #06b6d4;     /* Cyan */
  --color-secondary-rgb: 6, 182, 212;
  --color-accent: #f43f5e;        /* Rose */
  
  /* Shadows & Gradients */
  --grad-primary: linear-gradient(135deg, var(--color-primary), #6366f1);
  --grad-dark: linear-gradient(180deg, #0f1016, #07080b);
  --grad-cyan: linear-gradient(135deg, #06b6d4, #3b82f6);
  --shadow-premium: 0 20px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(168, 85, 247, 0.25);
  --shadow-glow-cyan: 0 0 30px rgba(6, 182, 212, 0.25);
  
  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* Base Settings */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: var(--font-main);
}

body {
  position: relative;
  min-height: 100vh;
  line-height: 1.6;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #1e2030;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* Background Ambient Glows */
.glow-accent-1 {
  position: absolute;
  top: 10%;
  left: 60%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, rgba(0,0,0,0) 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(80px);
  animation: floatGlow 15s infinite ease-in-out alternate;
}

.glow-accent-2 {
  position: absolute;
  top: 60%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, rgba(0,0,0,0) 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(100px);
  animation: floatGlow 20s infinite ease-in-out alternate-reverse;
}

@keyframes floatGlow {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, -50px) scale(1.1); }
  100% { transform: translate(-30px, 40px) scale(0.9); }
}

/* Typography & Layouts */
h1, h2, h3, h4 {
  font-family: var(--font-accent);
  color: var(--text-white);
  letter-spacing: 1px;
}

h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 900;
  text-transform: uppercase;
  background: linear-gradient(to right, #ffffff, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

p {
  color: var(--text-muted);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

.badge {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-primary);
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  padding: 0.35rem 0.85rem;
  border-radius: 4px;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 4rem auto;
  padding: 0 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.85rem 1.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--grad-primary);
  color: var(--text-white);
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-white);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-large {
  padding: 1.1rem 2.2rem;
  font-size: 0.95rem;
}

.btn-block {
  width: 100%;
}

/* Header & Navigation */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 5%;
  background: rgba(7, 8, 11, 0.7);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  transition: var(--transition-smooth);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.logo-symbol {
  font-family: var(--font-accent);
  font-weight: 900;
  font-size: 1.75rem;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.logo-text {
  font-family: var(--font-accent);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text-white);
}

.nav-links {
  display: flex;
  gap: 2.25rem;
  margin-left: auto;
  margin-right: 3rem;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.nav-links a:hover {
  color: var(--text-white);
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 5% 4rem 5%;
  overflow-x: hidden; /* Clips absolute glow accents and rotated 3D items horizontally */
  background-color: #07080b; /* Explicit solid background to prevent transparent composting seams */
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    radial-gradient(rgba(168, 85, 247, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 3rem;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

.hero-subtitle {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
  max-width: 550px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.75rem;
  max-width: 480px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-val {
  font-family: var(--font-accent);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
}

.stat-lbl {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.25rem;
}

/* Hero Visual (3D & Parallax Showcase) */
.hero-visual {
  position: relative;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
}

.keyboard-glow-effect {
  position: absolute;
  width: 80%;
  height: 60%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.2) 0%, rgba(6, 182, 212, 0.05) 50%, transparent 70%);
  filter: blur(40px);
  z-index: 1;
  pointer-events: none;
}

/* Floating Items */
.floating-switch, .floating-keycap {
  position: absolute;
  z-index: 5;
  filter: drop-shadow(0 15px 25px rgba(0,0,0,0.5));
  transition: transform 0.1s ease;
  pointer-events: none;
}

.floating-switch {
  width: 70px;
  height: 70px;
  animation: hoverFloat 5s infinite ease-in-out alternate;
}

.switch-left {
  top: 15%;
  left: 5%;
}

.floating-keycap {
  width: 60px;
  height: 60px;
  background: #1e2030;
  border: 1px solid rgba(255,255,255,0.1);
  border-bottom: 4px solid #10111a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 700;
  animation: hoverFloat 6s infinite ease-in-out alternate-reverse;
}

.keycap-right {
  bottom: 15%;
  right: 5%;
}

.keycap-top {
  top: 8%;
  right: 20%;
  animation-duration: 4.5s;
}

.kc-inner {
  text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}

@keyframes hoverFloat {
  0% { transform: translateY(0px) rotate(0deg); }
  100% { transform: translateY(-15px) rotate(8deg); }
}

/* 3D Keyboard Styling */
.hero-kbd-wrapper {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 480px;
  transform-style: preserve-3d;
  transition: transform 0.5s ease-out;
}

.hero-kbd-3d {
  width: 100%;
  transform: rotateX(25deg) rotateY(-20deg) rotateZ(5deg);
  transform-style: preserve-3d;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
  border-radius: 12px;
}

/* Simulated Keyboard Board Elements */
.kbd-shell {
  background: #13141b;
  border: 4px solid #20222f;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 
    inset 0 1px 3px rgba(255,255,255,0.1),
    0 10px 0px #0b0c10,
    0 20px 30px rgba(0,0,0,0.7);
  transform-style: preserve-3d;
}

.kbd-plate, .preview-plate {
  display: flex;
  flex-direction: column;
  background: #090a0f;
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.03);
  width: 100%;
}

.kbd-row, .preview-row {
  display: flex;
  gap: 4px;
  width: 100%;
  margin-bottom: 4px;
}

.kbd-row:last-child, .preview-row:last-child {
  margin-bottom: 0;
}

.kbd-key, .pk {
  background: #1a1c27;
  border-radius: 4px;
  border-bottom: 2px solid #0d0f17;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.kbd-key span, .pk span {
  pointer-events: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kbd-key:hover, .pk:hover {
  background: #252839;
  color: var(--text-white);
  transform: translateY(-1px);
}

.kbd-key:active, .kbd-key.active-glow {
  background: var(--color-primary);
  color: var(--text-white);
  box-shadow: 0 0 10px var(--color-primary);
  border-bottom-width: 0;
  transform: translateY(1px);
}

/* Row-based keycap scaling sizes */
.u-1 { flex: 100 100 0%; aspect-ratio: 1 / 1; }
.u-1-25 { flex: 125 125 0%; aspect-ratio: 1.25 / 1; }
.u-1-5 { flex: 150 150 0%; aspect-ratio: 1.5 / 1; }
.u-1-75 { flex: 175 175 0%; aspect-ratio: 1.75 / 1; }
.u-2 { flex: 200 200 0%; aspect-ratio: 2 / 1; }
.u-2-25 { flex: 225 225 0%; aspect-ratio: 2.25 / 1; }
.u-6-25 { flex: 625 625 0%; aspect-ratio: 6.25 / 1; }

.key-esc { background: var(--color-accent); color: white; }
.key-del { background: #3b3f58; color: white; }
.key-enter { background: var(--color-primary); color: white; }
.key-arrow { background: #222535; }

/* Exploded View Section */
.layers-section {
  padding: 8rem 5%;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    radial-gradient(rgba(168, 85, 247, 0.02) 1px, transparent 1px),
    linear-gradient(180deg, #07080b, #0f1016);
  background-size: 40px 40px, 40px 40px, 100% 100%;
  background-position: 0 0, 20px 20px, 0 0;
  background-repeat: repeat, repeat, no-repeat;
  position: relative;
  margin-top: -2px; /* Overlaps previous section to hide GPU boundary seams */
  z-index: 2;
}

.layers-container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.layers-visual-sticky {
  position: sticky;
  top: 15vh;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px; /* Added for 3D depth perspective rendering */
  align-self: start; /* Fix: prevents grid stretched items, enabling sticky slide runway */
}

.layers-stack {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 400px;
  transform: rotateX(32deg) rotateY(-28deg) rotateZ(8deg); /* Sleek card deck tilt */
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Layer graphics (stacked visually with transforms) */
.layer-item-graphic {
  position: absolute;
  width: 320px;
  height: 180px;
  background: rgba(18, 20, 29, 0.6); /* Slightly more opaque glass for stacking contrast */
  border: 2px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s, border-color 0.4s, box-shadow 0.4s;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

.graphic-label {
  position: absolute;
  bottom: -15px; /* floats slightly overlapping the bottom border in 3D */
  left: 50%;
  transform: translateX(-50%) translateZ(8px); /* floats parallel above the tilted panel */
  width: 80%;
  max-width: 250px;
  text-align: center;
  font-family: var(--font-main); /* Inter font for clean Cyrillic proportions */
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.65;
  transition: var(--transition-smooth);
  pointer-events: none;
  background: rgba(7, 8, 11, 0.9); /* glassmorphic spec plate */
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 12px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  line-height: 1.3;
  white-space: normal;
}

.row-flex {
  display: flex;
  gap: 12px;
}

/* 3D stacked deck initial positions */
.layer-graphic-keycaps { transform: translate3d(0, 0, 0) scale(1); opacity: 1; z-index: 10; }
.layer-graphic-switches { transform: translate3d(12px, -12px, -35px) scale(0.965); opacity: 0.53; z-index: 9; }
.layer-graphic-plate { transform: translate3d(24px, -24px, -70px) scale(0.93); opacity: 0.41; z-index: 8; }
.layer-graphic-pcb { transform: translate3d(36px, -36px, -105px) scale(0.895); opacity: 0.29; z-index: 7; }
.layer-graphic-silicone { transform: translate3d(48px, -48px, -140px) scale(0.86); opacity: 0.17; z-index: 6; }
.layer-graphic-case { transform: translate3d(60px, -60px, -175px) scale(0.825); opacity: 0.05; z-index: 5; }

/* Color themed glows for active layers */
.layer-graphic-keycaps.active { border-color: #a855f7; box-shadow: 0 0 25px rgba(168, 85, 247, 0.3); }
.layer-graphic-switches.active { border-color: #f43f5e; box-shadow: 0 0 25px rgba(244, 63, 94, 0.3); }
.layer-graphic-plate.active { border-color: #ea580c; box-shadow: 0 0 25px rgba(234, 88, 12, 0.3); }
.layer-graphic-pcb.active { border-color: #10b981; box-shadow: 0 0 25px rgba(16, 185, 129, 0.3); }
.layer-graphic-silicone.active { border-color: #06b6d4; box-shadow: 0 0 25px rgba(6, 182, 212, 0.3); }
.layer-graphic-case.active { border-color: #eab308; box-shadow: 0 0 25px rgba(234, 179, 8, 0.3); }

/* Color themed glows for active tags */
.layer-graphic-keycaps.active .graphic-label {
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.4);
  color: #fff;
  text-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
  transform: translateX(-50%) translateZ(14px); /* lifts up on active */
  opacity: 1;
}
.layer-graphic-switches.active .graphic-label {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fff;
  text-shadow: 0 0 8px rgba(244, 63, 94, 0.6);
  transform: translateX(-50%) translateZ(14px);
  opacity: 1;
}
.layer-graphic-plate.active .graphic-label {
  background: rgba(234, 88, 12, 0.15);
  border-color: rgba(234, 88, 12, 0.4);
  color: #fff;
  text-shadow: 0 0 8px rgba(234, 88, 12, 0.6);
  transform: translateX(-50%) translateZ(14px);
  opacity: 1;
}
.layer-graphic-pcb.active .graphic-label {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #fff;
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  transform: translateX(-50%) translateZ(14px);
  opacity: 1;
}
.layer-graphic-silicone.active .graphic-label {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: #fff;
  text-shadow: 0 0 8px rgba(6, 182, 212, 0.6);
  transform: translateX(-50%) translateZ(14px);
  opacity: 1;
}
.layer-graphic-case.active .graphic-label {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.4);
  color: #fff;
  text-shadow: 0 0 8px rgba(234, 179, 8, 0.6);
  transform: translateX(-50%) translateZ(14px);
  opacity: 1;
}

/* Specific details on layer items */
.cap-unit {
  width: 32px;
  height: 32px;
  background: #1e2030;
  border-radius: 4px;
  border-bottom: 2px solid #0d0f17;
  font-family: var(--font-accent);
  font-size: 0.75rem;
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.switch-unit {
  width: 28px;
  height: 28px;
  background: #272a33;
  border: 1px solid #4a4f5d;
  border-radius: 4px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.switch-unit .stem {
  width: 12px;
  height: 12px;
  background: var(--color-primary);
  border-radius: 2px;
}

.plate-strip {
  width: 80%;
  height: 15px;
  background: #101115;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 10px;
  position: relative;
}

.gasket-ear {
  width: 12px;
  height: 4px;
  background: #ea580c;
  position: absolute;
  top: -4px;
}

.gasket-ear.long { left: 15%; }
.gasket-ear.short { right: 15%; }

.plate-cut {
  width: 14px;
  height: 8px;
  background: transparent;
  border: 1px solid #334155;
  border-radius: 1px;
}

.pcb-board {
  width: 85%;
  height: 70%;
  background: #0f4c3a;
  border-radius: 4px;
  position: relative;
  border: 1px solid #1b7a5e;
}

.diode {
  width: 4px;
  height: 6px;
  background: #111;
  position: absolute;
}
.diode:nth-child(1) { top: 20%; left: 20%; }
.diode:nth-child(2) { bottom: 20%; right: 20%; }

.gold-traces {
  position: absolute;
  top: 30%;
  left: 30%;
  width: 40%;
  height: 2px;
  background: #fbbf24;
}

.foam-slice {
  width: 80%;
  height: 10px;
  background: #0b0c10;
  border: 1px dashed #4b5563;
  border-radius: 2px;
}

.case-base {
  width: 90%;
  height: 80%;
  background: #252835;
  border: 2px solid #3e4257;
  border-radius: 6px;
  position: relative;
}

.brass-weight-bar {
  width: 50%;
  height: 20%;
  background: #eab308;
  border-radius: 1px;
  position: absolute;
  bottom: 10px;
  left: 25%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* Scrolling Cards (Right Side) */
.layers-scrolling-content {
  display: flex;
  flex-direction: column;
  gap: 15vh;
  padding-bottom: 20vh;
}

.layer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 3rem 2.5rem;
  backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.layer-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.layer-number {
  font-family: var(--font-accent);
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.layer-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.layer-card p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.layer-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.layer-bullets li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

.bullet-icon {
  width: 14px;
  height: 14px;
  color: var(--color-secondary);
}

/* Sound Test Section */
.sound-section {
  padding: 8rem 5%;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    radial-gradient(rgba(168, 85, 247, 0.02) 1px, transparent 1px),
    linear-gradient(180deg, #0f1016, #090a0f); /* smooth color transition from layers section */
  background-size: 40px 40px, 40px 40px, 100% 100%;
  background-position: 0 0, 20px 20px, 0 0;
  background-repeat: repeat, repeat, no-repeat;
  position: relative;
  margin-top: -2px; /* Overlaps previous section to hide GPU boundary seams */
  z-index: 2;
}

.sound-container {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}

.sound-controls {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.switch-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.switch-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: transparent;
  transition: var(--transition-fast);
}

.switch-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.switch-card.active {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-active);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.switch-card.active::before {
  background: var(--color-primary);
}

/* Switch graphic inside card */
.switch-icon {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  position: relative;
  flex-shrink: 0;
}

.switch-icon::after {
  content: '';
  position: absolute;
  top: 13px;
  left: 13px;
  width: 14px;
  height: 14px;
  border-radius: 2px;
}

.linear-red { background: #2f1d24; border: 1.5px solid #ff4a6b; }
.linear-red::after { background: #ff4a6b; }

.tactile-brown { background: #2b221d; border: 1.5px solid #d97706; }
.tactile-brown::after { background: #d97706; }

.clicky-blue { background: #1c2833; border: 1.5px solid #06b6d4; }
.clicky-blue::after { background: #06b6d4; }

.switch-meta {
  flex-grow: 1;
}

.switch-meta h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.switch-meta span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.actuation-force {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.switch-card.active .actuation-force {
  color: var(--text-light);
}

/* Visualizer Canvas Box */
.sound-board-visualizer {
  background: #111218;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-premium);
}

.visualizer-header {
  padding: 1.25rem 1.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.active-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary);
  animation: pulseGlow 1.5s infinite alternate;
}

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

.visualizer-title {
  font-family: var(--font-accent);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
}

.visualizer-hint {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.canvas-container {
  position: relative;
  height: 250px;
  background: radial-gradient(circle at center, #151722, #0b0c10);
}

#sound-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Typable Overlay Area */
.tap-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(11, 12, 16, 0.35);
  backdrop-filter: blur(1px);
  pointer-events: auto;
  color: var(--text-light);
  text-align: center;
}

.keyboard-tap-icon {
  width: 44px;
  height: 44px;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.tap-overlay p {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

#sound-typing-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-white);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  width: 180px;
  text-align: center;
  font-family: var(--font-main);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-fast);
}

#sound-typing-input:focus {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.2);
}

/* Configurator Section */
.configurator-section {
  padding: 8rem 5%;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    radial-gradient(rgba(168, 85, 247, 0.02) 1px, transparent 1px),
    linear-gradient(180deg, #0f1016, #07080b); /* matches specs section bottom and transitions back to dark theme bg */
  background-size: 40px 40px, 40px 40px, 100% 100%;
  background-position: 0 0, 20px 20px, 0 0;
  background-repeat: repeat, repeat, no-repeat;
  overflow: visible; /* Allows sticky preview panel to function */
  position: relative;
  margin-top: -2px; /* Overlaps previous section to hide GPU boundary seams */
  z-index: 2;
}

.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

/* Live Preview Panel (Left) */
.config-preview-panel {
  background: radial-gradient(circle at center, #1b1e2b, #111218);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 4rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 15vh;
  box-shadow: var(--shadow-premium);
}

.preview-sticker {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-family: var(--font-accent);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 2px;
  background: var(--color-secondary);
  color: #000;
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
}

/* Keyboard Preview Box styling */
.preview-keyboard-wrapper {
  width: 100%;
  max-width: 480px;
  margin: 2rem 0;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.6));
}

.preview-kbd {
  /* Dynamic CSS variables injected here */
  width: 100%;
  background: var(--case-color);
  border: 5px solid rgba(255,255,255,0.05);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.1), var(--rgb-glow);
  padding: 10px;
  border-radius: 12px;
  transition: var(--transition-smooth);
}

.preview-shell {
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  padding: 4px;
}

/* preview-plate covered by global kbd-plate styles */

/* Config key specific styles */
.pk {
  border-radius: 3px;
  font-size: 0.5rem;
  color: var(--text-white);
  transition: var(--transition-smooth);
}

/* Dynamic configurable colors mapping */
.alpha-key { 
  background: var(--alpha-key-color); 
  color: var(--alpha-text-color, var(--text-white));
}
.func-key { background: #2d303f; color: rgba(255,255,255,0.6); }
.accent-key { 
  background: var(--accent-key-color); 
  color: var(--accent-text-color, var(--text-white));
}

.preview-spec-badge {
  display: flex;
  gap: 1.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  width: 100%;
  justify-content: center;
}

.preview-spec-badge strong {
  color: var(--text-white);
}

/* Configurator controls (Right) */
.config-controls-panel {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.control-group h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  color: var(--text-white);
  font-family: var(--font-accent);
}

.option-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.config-option {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  user-select: none;
}

.config-option input[type="radio"] {
  display: none;
}

.config-option:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

.config-option.active {
  border-color: var(--border-active);
  background: rgba(168, 85, 247, 0.05);
}

.color-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  flex-shrink: 0;
}

.option-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.option-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-white);
}

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

.price-mod {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.config-option.active .price-mod {
  color: var(--color-primary);
}

/* upgrade checkboxes */
.option-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkbox-option {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.checkbox-option input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkbox-option:hover {
  background: var(--bg-card-hover);
}

.checkbox-option.active {
  border-color: var(--border-active);
  background: rgba(168, 85, 247, 0.05);
}

.checkbox-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Configurator Sticky Total Footer */
.configurator-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 2rem;
  margin-top: 1rem;
}

.config-price-box {
  display: flex;
  flex-direction: column;
}

.price-lbl {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.price-val {
  font-family: var(--font-accent);
  font-size: 2rem;
  font-weight: 900;
  color: var(--text-white);
  line-height: 1.2;
}

/* Specifications Grid */
.specs-section {
  padding: 8rem 5%;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    radial-gradient(rgba(168, 85, 247, 0.02) 1px, transparent 1px),
    linear-gradient(180deg, #090a0f, #0f1016); /* matches sound section bottom and starts dark blue transition */
  background-size: 40px 40px, 40px 40px, 100% 100%;
  background-position: 0 0, 20px 20px, 0 0;
  background-repeat: repeat, repeat, no-repeat;
  position: relative;
  margin-top: -2px; /* Overlaps previous section to hide GPU boundary seams */
  z-index: 2;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.spec-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 2.5rem 2rem;
  transition: var(--transition-smooth);
}

.spec-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-5px);
}

.spec-icon {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
}

.spec-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.spec-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Sliding Pre-Order Drawer */
.buy-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.4s;
}

.buy-drawer.open {
  pointer-events: auto;
  visibility: visible;
}

.drawer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.buy-drawer.open .drawer-overlay {
  opacity: 1;
}

.drawer-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 500px;
  height: 100%;
  background: #0f1016;
  border-left: 1px solid var(--border-color);
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.buy-drawer.open .drawer-content {
  transform: translateX(0);
}

.drawer-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.5rem;
  transition: var(--transition-fast);
}

.drawer-close:hover {
  color: var(--text-white);
}

.buy-drawer h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.drawer-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 2rem;
}

/* Receipt Block */
.receipt-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.receipt-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.receipt-item span.item-title span {
  color: var(--text-light);
}

.receipt-divider {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 1rem 0;
}

.receipt-total {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-accent);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
}

/* Checkout Form styling */
.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  color: var(--text-white);
  font-family: var(--font-main);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-group input:focus {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.08);
}

.form-row {
  display: flex;
  gap: 1rem;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

/* Success module */
.checkout-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1rem;
}

.success-icon {
  width: 64px;
  height: 64px;
  color: #10b981;
  margin-bottom: 1.5rem;
}

.checkout-success h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.checkout-success p {
  font-size: 0.85rem;
  max-width: 320px;
}

/* Footer styling */
.main-footer {
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    radial-gradient(rgba(168, 85, 247, 0.02) 1px, transparent 1px),
    linear-gradient(180deg, #07080b, #040507); /* matches specifications bottom and transitions to deep black footer */
  background-size: 40px 40px, 40px 40px, 100% 100%;
  background-position: 0 0, 20px 20px, 0 0;
  background-repeat: repeat, repeat, no-repeat;
  padding: 4rem 5% 2rem 5%;
  position: relative;
  margin-top: -2px; /* Overlaps previous section to hide GPU boundary seams */
  z-index: 2;
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto 3rem auto;
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.85rem;
  max-width: 280px;
}

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

.footer-links-group h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-white);
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.footer-links-group a {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.footer-links-group a:hover {
  color: var(--text-white);
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Responsive Rules */
@media (max-width: 1024px) {
  h1 { font-size: 2.75rem; }
  .hero-container { grid-template-columns: 1fr; text-align: center; gap: 4rem; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { margin: 1.5rem auto 0 auto; justify-content: center; }
  
  .hero-kbd-3d {
    transform: rotateX(25deg) rotateY(-20deg) rotateZ(5deg) scale(0.85);
  }

  /* Sticky Visual for Exploded Architecture on mobile */
  .layers-container { 
    grid-template-columns: 1fr; 
    gap: 2rem; 
  }
  .layers-visual-sticky { 
    position: sticky; 
    top: 70px; 
    height: 250px; 
    z-index: 10; 
    background: #07080b;
    background: linear-gradient(180deg, #07080b 80%, rgba(7, 8, 11, 0) 100%);
    width: 100%;
    margin-bottom: 2rem;
    padding-top: 10px;
    padding-bottom: 20px;
    perspective: 1000px; /* Mobile perspective */
  }
  .layers-stack { 
    transform: rotateX(32deg) rotateY(-28deg) rotateZ(8deg) scale(0.65); 
    height: 250px;
  }
  .graphic-label {
    font-size: 0.9rem;
    bottom: -20px;
    max-width: 280px;
  }
  
  .sound-container { grid-template-columns: 1fr; gap: 3rem; }
  .config-grid { grid-template-columns: 1fr; gap: 3rem; }
  .config-preview-panel { position: relative; top: 0; padding: 2rem 1rem; }
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .main-header { padding: 1rem 5%; }
  .hero-stats { gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
  .specs-grid { grid-template-columns: 1fr; }
  .footer-container { grid-template-columns: 1fr; gap: 2rem; }
  .option-grid { grid-template-columns: 1fr; }
  
  /* Disable absolute glows to save performance and prevent scrolling bugs */
  .glow-accent-1, .glow-accent-2 {
    display: none !important;
  }

  /* Checkout drawer full screen on mobile */
  .drawer-content {
    max-width: 100%;
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 2.1rem; }
  .badge { font-size: 0.65rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; width: 100%; }
  .hero-actions .btn { width: 100%; }
  
  /* Scale rotated 3D keyboard visual down so it fits screen width */
  .hero-kbd-3d {
    transform: rotateX(25deg) rotateY(-20deg) rotateZ(5deg) scale(0.65) translateY(-30px);
    transform-origin: center center;
  }

  /* Squeezing keycaps text sizes to prevent wrapping */
  .kbd-key, .pk {
    font-size: 0.4rem;
    border-radius: 2px;
    border-bottom-width: 1px;
    height: auto;
  }
  .kbd-key span, .pk span {
    font-size: 0.4rem;
  }
  
  /* Make sound visuals compact */
  .canvas-container { height: 180px; }
  .tap-overlay p { font-size: 0.8rem; }
  
  /* Dynamic keyboard size container */
  .preview-keyboard-wrapper, .hero-kbd-wrapper {
    max-width: 100%;
  }
  
  .layers-visual-sticky {
    height: 200px;
    perspective: 800px; /* Small mobile perspective */
  }
  .layers-stack {
    transform: rotateX(32deg) rotateY(-28deg) rotateZ(8deg) scale(0.5);
    height: 200px;
  }
  .graphic-label {
    font-size: 1.15rem;
    bottom: -25px;
    max-width: 260px;
  }
  .layer-card {
    padding: 2rem 1.5rem;
  }
}
