/* ==========================================================================
   SUBTERFUGE // ANDROID CAR AUDIO LABORATORY PROMO
   Visuals: Void Obsidian · Carbon Fiber · Crimson Red · Raw Machined Steel · Gold
   Architect: Ben Haker · Canada 🇨🇦
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:ital,wdth,wght@0,100..125,300..900;1,100..125,300..900&family=Chakra+Petch:ital,wght@0,400;0,600;0,700;1,400;1,700&family=Martian+Mono:wght@400;600;800&family=Michroma&family=Syne:wght@700;800;900&display=swap');

:root {
  /* Aggressive Dark Palette */
  --bg-void: #040608;
  --bg-deep: #070a0e;
  --bg-panel: #0d1217;
  --bg-panel-raised: #141c24;
  --bg-well: #020305;

  /* Red Fire / Danger / Maple */
  --c-red: #ff2a2a;
  --c-red-glow: rgba(255, 42, 42, 0.45);
  --c-red-dark: #8b0000;
  --c-red-subtle: rgba(255, 42, 42, 0.12);

  /* Gold Machined Hardware */
  --c-gold: #d4af37;
  --c-gold-bright: #ffe082;
  --c-gold-glow: rgba(212, 175, 55, 0.35);

  /* Cyan Instrument Data */
  --c-cyan: #00f0ff;
  --c-cyan-bright: #8cfaff;
  --c-cyan-glow: rgba(0, 240, 255, 0.35);

  /* Steel & Text */
  --c-steel: #8a9ba8;
  --c-text: #c5d1dc;
  --c-text-white: #f0f6fc;
  --c-muted: #607282;

  /* Fonts */
  --font-display: 'Michroma', sans-serif;
  --font-title: 'Syne', sans-serif;
  --font-tech: 'Chakra Petch', sans-serif;
  --font-mono: 'Martian Mono', monospace;
  --font-body: 'Archivo', sans-serif;

  /* Rich Textures & Borders */
  --border-metal: 1px solid rgba(138, 155, 168, 0.18);
  --border-red: 1px solid rgba(255, 42, 42, 0.45);
  --border-gold: 1px solid rgba(212, 175, 55, 0.4);
  --border-cyan: 1px solid rgba(0, 240, 255, 0.35);

  --shadow-heavy: 0 24px 60px rgba(0, 0, 0, 0.88);
  --shadow-inset: inset 0 2px 10px rgba(0, 0, 0, 0.9);
  --bevel-milled: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 -1px 0 rgba(0, 0, 0, 0.8);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg-void);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

/* Carbon Fiber Background Pattern */
body {
  overflow-x: hidden;
  background-color: #040608;
  background-image: 
    radial-gradient(circle at 50% 15%, rgba(255, 42, 42, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, rgba(0, 240, 255, 0.04) 0%, transparent 50%),
    linear-gradient(27deg, #070a0e 5px, transparent 5px) 0 5px,
    linear-gradient(207deg, #070a0e 5px, transparent 5px) 10px 0px,
    linear-gradient(27deg, #0a0e14 5px, transparent 5px) 0px 10px,
    linear-gradient(207deg, #0a0e14 5px, transparent 5px) 10px 5px,
    linear-gradient(90deg, #040608 10px, transparent 10px),
    linear-gradient(#06090d 25%, #030507 25%, #030507 50%, #06090d 50%, #06090d 75%, #030507 75%, #030507 100%);
  background-size: 100% 100%, 100% 100%, 20px 20px, 20px 20px, 20px 20px, 20px 20px, 20px 20px, 20px 20px;
  background-attachment: fixed;
}

/* Gritty CRT Scanline Overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.22),
    rgba(0, 0, 0, 0.22) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 9999;
  opacity: 0.45;
}

::-webkit-scrollbar {
  width: 8px;
  background: #020304;
}
::-webkit-scrollbar-thumb {
  background: #202b36;
  border-radius: 4px;
  border: 1px solid rgba(255, 42, 42, 0.3);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--c-red);
}

/* Typography Helpers */
h1, h2, h3, h4 {
  color: var(--c-text-white);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.font-display { font-family: var(--font-display); }
.font-title { font-family: var(--font-title); }
.font-tech { font-family: var(--font-tech); }
.font-mono { font-family: var(--font-mono); }

.red-text { color: var(--c-red); text-shadow: 0 0 16px var(--c-red-glow); }
.gold-text { color: var(--c-gold-bright); text-shadow: 0 0 14px var(--c-gold-glow); }
.cyan-text { color: var(--c-cyan-bright); text-shadow: 0 0 14px var(--c-cyan-glow); }

/* Milled Steel Surface Panels */
.panel {
  position: relative;
  background: linear-gradient(145deg, #131b23, #090e13);
  border: var(--border-metal);
  border-radius: 10px;
  box-shadow: var(--shadow-heavy), var(--bevel-milled);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c-red) 0%, rgba(255,42,42,0.2) 40%, rgba(212,175,55,0.2) 70%, var(--c-gold) 100%);
  pointer-events: none;
}

.well {
  background: var(--bg-well);
  border: 1px solid rgba(138, 155, 168, 0.14);
  border-radius: 6px;
  box-shadow: var(--shadow-inset);
}

/* Global Navigation */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(4, 6, 8, 0.94);
  border-bottom: 1px solid rgba(255, 42, 42, 0.25);
  backdrop-filter: blur(20px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-svg {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 0 8px rgba(255, 42, 42, 0.6));
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.15em;
  color: #fff;
}

.brand-sub {
  font-family: var(--font-tech);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--c-red);
  text-transform: uppercase;
}

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

.nav-links a {
  font-family: var(--font-tech);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--c-text);
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.2s;
}
.nav-links a:hover {
  color: var(--c-red);
  text-shadow: 0 0 10px var(--c-red-glow);
}

/* Badass Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 6px;
  font-family: var(--font-tech);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
  white-space: nowrap;
}

.btn-red {
  background: linear-gradient(180deg, #ff2a2a 0%, #b30000 100%);
  color: #fff;
  border: 1px solid #ff7777;
  box-shadow: 0 4px 20px rgba(255, 42, 42, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-red:hover {
  background: linear-gradient(180deg, #ff4444 0%, #d40000 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255, 42, 42, 0.65), inset 0 1px 0 #fff;
}

.btn-gold {
  background: linear-gradient(180deg, #d4af37 0%, #997818 100%);
  color: #000;
  border: 1px solid #ffe082;
  box-shadow: 0 4px 18px rgba(212, 175, 55, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-gold:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #e6c24d 0%, #b38c20 100%);
  box-shadow: 0 6px 24px rgba(212, 175, 55, 0.55);
}

.btn-dark {
  background: linear-gradient(180deg, #1b242e 0%, #0c1116 100%);
  color: var(--c-text);
  border: var(--border-metal);
}
.btn-dark:hover {
  border-color: var(--c-red);
  color: #fff;
  transform: translateY(-2px);
}
.btn-dark.active {
  border-color: var(--c-red);
  color: #fff;
  background: rgba(255, 42, 42, 0.2);
}

/* Layout Containers */
.container {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-pad {
  padding: 96px 0;
  position: relative;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-tech);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--c-red);
  text-transform: uppercase;
  padding: 4px 14px;
  background: rgba(255, 42, 42, 0.08);
  border: 1px solid rgba(255, 42, 42, 0.3);
  border-radius: 999px;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-title);
  font-size: 2.6rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 14px;
}

.section-lead {
  max-width: 760px;
  font-size: 1.1rem;
  color: var(--c-muted);
  line-height: 1.6;
}

/* HERO SECTION */
.hero-section {
  position: relative;
  min-height: 100vh;
  padding-top: calc(72px + 28px);
  padding-bottom: 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 470px;
  gap: 28px;
}

.hero-viewport-card {
  position: relative;
  min-height: 680px;
  border-radius: 14px;
  overflow: hidden;
  background: #020305;
  border: 1px solid rgba(255, 42, 42, 0.3);
}

#three-driver-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hud-bar {
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}

.hud-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(5, 7, 10, 0.88);
  border: 1px solid rgba(255, 42, 42, 0.35);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.hud-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-red);
  box-shadow: 0 0 10px var(--c-red);
  animation: pulseRed 1.2s infinite;
}

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

.hud-cam-row {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  z-index: 10;
}

.cam-pill {
  padding: 6px 12px;
  font-family: var(--font-tech);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 4px;
  background: rgba(13, 18, 23, 0.85);
  border: 1px solid rgba(138, 155, 168, 0.2);
  color: var(--c-text);
  cursor: pointer;
}
.cam-pill:hover {
  border-color: var(--c-red);
  color: #fff;
}

.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-main-panel {
  padding: 28px;
}

.hero-h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 0.08em;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 12px;
}

.hero-copy {
  font-size: 0.95rem;
  color: var(--c-muted);
  line-height: 1.6;
  margin-bottom: 18px;
}

.driver-select-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.driver-select-btn {
  padding: 8px 0;
  font-family: var(--font-tech);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-well);
  border: 1px solid rgba(138, 155, 168, 0.2);
  border-radius: 4px;
  color: var(--c-muted);
  cursor: pointer;
  transition: 0.15s;
}
.driver-select-btn.active, .driver-select-btn:hover {
  border-color: var(--c-red);
  color: #fff;
  background: rgba(255, 42, 42, 0.15);
}

.telemetry-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.stat-box {
  padding: 10px 14px;
  background: var(--bg-well);
  border: 1px solid rgba(138, 155, 168, 0.14);
  border-radius: 6px;
}
.stat-k {
  font-family: var(--font-tech);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--c-muted);
  text-transform: uppercase;
}
.stat-v {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--c-cyan-bright);
  margin-top: 2px;
}

.slider-unit {
  margin-bottom: 12px;
}
.slider-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-tech);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 6px;
}

input[type=range] {
  width: 100%;
  height: 6px;
  appearance: none;
  background: linear-gradient(90deg, rgba(255, 42, 42, 0.4), rgba(212, 175, 55, 0.4));
  border-radius: 999px;
  outline: none;
}
input[type=range]::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #ff2a2a 70%);
  border: 1px solid #ff8888;
  box-shadow: 0 0 12px rgba(255, 42, 42, 0.7);
  cursor: pointer;
}

/* ==========================================================================
   3D CYBER BASS RACER ARCADE STYLES
   ========================================================================== */
.racer-card {
  padding: 24px;
  background: #06090d;
  border: 1px solid rgba(255, 42, 42, 0.4);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.08);
}

.racer-viewport-wrap {
  position: relative;
  width: 100%;
  height: 480px;
  background: #020305;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 240, 255, 0.3);
  cursor: crosshair;
}

#three-racer-container {
  width: 100%;
  height: 100%;
}

.racer-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 8, 0.88);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 24px;
  text-align: center;
  transition: opacity 0.3s;
}
.racer-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.racer-hud-top {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 10;
}

.racer-hud-badge {
  padding: 6px 14px;
  background: rgba(5, 7, 10, 0.85);
  border: 1px solid rgba(138, 155, 168, 0.25);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #fff;
}

.racer-veh-choice {
  padding: 8px 14px;
  font-family: var(--font-tech);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--bg-well);
  border: 1px solid rgba(138, 155, 168, 0.2);
  border-radius: 4px;
  color: var(--c-muted);
  cursor: pointer;
  transition: 0.15s;
}
.racer-veh-choice.active, .racer-veh-choice:hover {
  border-color: var(--c-red);
  color: #fff;
  background: rgba(255, 42, 42, 0.15);
}

.bar-track {
  height: 8px;
  background: #020305;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(138, 155, 168, 0.2);
  margin-top: 4px;
}
.bar-fill {
  height: 100%;
  width: 100%;
  transition: width 0.1s linear, background-color 0.2s;
}

/* SHOWCASE CARDS */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
}

.showcase-card {
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  transition: transform 0.2s, border-color 0.2s;
}
.showcase-card:hover {
  transform: translateY(-4px);
  border-color: var(--c-red);
}

.card-num {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--c-red);
  line-height: 1;
}

.showcase-card h3 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  margin-top: 4px;
}

.showcase-card p {
  color: var(--c-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* DEVELOPER BIO & MAPLE */
.dev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.dev-card {
  padding: 36px;
}

.dev-badge-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.dev-avatar-box {
  width: 68px;
  height: 68px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff2a2a, #8b0000);
  border: 2px solid #ff7777;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 1.8rem;
  color: #fff;
  box-shadow: 0 0 24px rgba(255, 42, 42, 0.5);
}

.contact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-well);
  border: 1px solid rgba(138, 155, 168, 0.15);
  border-radius: 8px;
  margin-top: 10px;
}
.contact-k {
  font-family: var(--font-tech);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--c-muted);
  text-transform: uppercase;
}
.contact-v {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
}

.maple-art-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

#maple-card-wrap {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1;
  cursor: grab;
  transform-style: preserve-3d;
}

#maple-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 28px rgba(255, 42, 42, 0.35));
}

.leaf-facet {
  fill: rgba(139, 0, 0, 0.85);
  stroke: #ff2a2a;
  stroke-width: 1.4;
  transition: fill 0.25s, stroke 0.25s;
}
.leaf-facet:hover {
  fill: rgba(255, 50, 50, 0.95);
  stroke: #ffe082;
}

.leaf-spine {
  stroke: #ff2a2a;
  stroke-width: 2.8;
  stroke-linecap: round;
}

.leaf-node {
  fill: #ffe082;
  filter: drop-shadow(0 0 6px #ffe082);
}

/* Footer */
.site-footer {
  padding: 48px 0;
  border-top: 1px solid rgba(255, 42, 42, 0.2);
  background: #020305;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .showcase-grid { grid-template-columns: 1fr 1fr; }
  .dev-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .site-header { padding: 0 18px; }
  .nav-links { display: none; }
  .showcase-grid { grid-template-columns: 1fr; }
  .racer-viewport-wrap { height: 380px; }
}
