/* ==========================================================================
   CABIN MAINTAINEROS — ULTRA HIGH-PERFORMANCE MAGIC UI STYLESHEET
   120FPS Scroll-Driven Dynamic Dark/Light Theme Morphing + Magic UI Dia Text Reveal
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---- CSS Variables & Design Tokens ---- */
:root {
  /* Dynamic Theme Variables (Default Dark Mode for Hero & Download) */
  --theme-bg: #000000;
  --theme-text-high: #ffffff;
  --theme-text-medium: #a1a1aa;
  --theme-text-muted: #71717a;
  --theme-card-bg: #09090b;
  --theme-card-subtle: #0f0f13;
  --theme-card-border: rgba(255, 255, 255, 0.08);
  --theme-card-border-hover: rgba(255, 255, 255, 0.28);
  --theme-card-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.08);
  
  /* Dock & Header */
  --theme-dock-bg: rgba(18, 18, 24, 0.85);
  --theme-dock-border: rgba(255, 255, 255, 0.22);
  --theme-dock-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.14);
  --theme-dock-item-bg: rgba(255, 255, 255, 0.06);
  --theme-dock-item-color: #f4f4f5;
  --theme-dock-item-hover-bg: #ffffff;
  --theme-dock-item-hover-color: #000000;
  --theme-header-bg: rgba(12, 12, 16, 0.75);
  --theme-header-border: rgba(255, 255, 255, 0.14);
  --theme-header-color: #ffffff;
  --theme-tag-bg: rgba(255, 255, 255, 0.04);
  --theme-tag-border: rgba(255, 255, 255, 0.14);
  --theme-tag-color: #a1a1aa;
  --theme-tag-dot: #ffffff;

  /* Accents */
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.35);
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-orange: #f59e0b;

  /* Typography Stacks */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Geometry & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-dock: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ---- Light Theme Overrides (Applied during scroll on middle sections) ---- */
body.light-theme {
  --theme-bg: #ffffff;
  --theme-text-high: #09090b;
  --theme-text-medium: #52525b;
  --theme-text-muted: #71717a;
  --theme-card-bg: #ffffff;
  --theme-card-subtle: #f8fafc;
  --theme-card-border: rgba(0, 0, 0, 0.09);
  --theme-card-border-hover: rgba(0, 0, 0, 0.25);
  --theme-card-shadow: 0 10px 35px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.06);

  /* Dock & Header */
  --theme-dock-bg: rgba(255, 255, 255, 0.85);
  --theme-dock-border: rgba(0, 0, 0, 0.12);
  --theme-dock-shadow: 0 20px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.08);
  --theme-dock-item-bg: rgba(0, 0, 0, 0.05);
  --theme-dock-item-color: #09090b;
  --theme-dock-item-hover-bg: #000000;
  --theme-dock-item-hover-color: #ffffff;
  --theme-header-bg: rgba(255, 255, 255, 0.85);
  --theme-header-border: rgba(0, 0, 0, 0.1);
  --theme-header-color: #09090b;
  --theme-tag-bg: rgba(0, 0, 0, 0.04);
  --theme-tag-border: rgba(0, 0, 0, 0.12);
  --theme-tag-color: #52525b;
  --theme-tag-dot: #09090b;
}

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

html {
  background-color: #000000;
  scroll-behavior: smooth;
}

html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body {
  font-family: var(--font-sans);
  background-color: var(--theme-bg);
  color: var(--theme-text-high);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  min-height: 100vh;
  transition: 
    background-color 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.5s ease;
}

::selection {
  background: #000000;
  color: #ffffff;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #3f3f46;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #71717a;
}

/* ---- Hardware Composited Canvas & Background ---- */
#particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  transform: translateZ(0);
  will-change: transform;
  transition: opacity 0.6s ease;
}

body.light-theme #particle-canvas {
  opacity: 0.15;
}

.retro-grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 70%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 0%, #000 70%, transparent 100%);
  transform: translateZ(0);
  transition: background-image 0.6s ease;
}

body.light-theme .retro-grid-bg {
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

.spotlight-ambient {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255, 255, 255, 0.12), transparent 80%);
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

/* ---- Section Headers & Labels ---- */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--theme-tag-bg);
  border: 1px solid var(--theme-tag-border);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--theme-tag-color);
  margin-bottom: 1rem;
  transform: translateZ(0);
  transition: background 0.4s ease, border-color 0.4s ease, color 0.4s ease;
}
.section-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--theme-tag-dot);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
  transition: background 0.4s ease;
}

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

.section-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--theme-text-high);
  margin-bottom: 1.2rem;
  transition: color 0.4s ease;
}

.section-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--theme-text-medium);
  line-height: 1.7;
  font-weight: 400;
  transition: color 0.4s ease;
}

/* ==========================================================================
   MAGIC UI: DIA TEXT REVEAL (24K Champagne & Radiant Gold Luxury Edition)
   Palette: Bronze (#b45309), Amber (#f59e0b), 24K Gold (#ffd700), Champagne (#fef08a)
   ========================================================================== */
.hero-title {
  font-size: clamp(2.8rem, 6.8vw, 5.2rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.045em;
  max-width: 980px;
  margin: 0 auto 1.5rem auto;
}

.dia-text-reveal {
  display: inline-block;
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    #ffffff 36%,
    #d97706 40%,
    #f59e0b 43%,
    #ffd700 46%,
    #fef08a 49%,
    #ffffff 51%,
    #fbbf24 54%,
    #b45309 58%,
    rgba(255, 255, 255, 0.18) 63%,
    rgba(255, 255, 255, 0.18) 100%
  );
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: dia-gold-reveal 4.6s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  transform: translateZ(0);
  will-change: background-position;
}

.dia-text-accent {
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    #ffffff 36%,
    #b45309 40%,
    #fbbf24 43%,
    #ffd700 46%,
    #fef08a 49%,
    #ffffff 51%,
    #f59e0b 54%,
    #d97706 58%,
    rgba(255, 255, 255, 0.18) 63%,
    rgba(255, 255, 255, 0.18) 100%
  );
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: dia-gold-reveal 4.6s cubic-bezier(0.16, 1, 0.3, 1) infinite;
  animation-delay: 0.35s;
  transform: translateZ(0);
  will-change: background-position;
}

@keyframes dia-gold-reveal {
  0% {
    background-position: 100% 0;
  }
  50%, 85% {
    background-position: 0% 0;
  }
  100% {
    background-position: 100% 0;
  }
}

/* Light Theme Luxury Gold Variant */
body.light-theme .dia-text-reveal {
  background: linear-gradient(
    90deg,
    #09090b 0%,
    #09090b 36%,
    #92400e 40%,
    #d97706 43%,
    #f59e0b 46%,
    #fbbf24 49%,
    #09090b 51%,
    #b45309 54%,
    #78350f 58%,
    rgba(9, 9, 11, 0.2) 63%,
    rgba(9, 9, 11, 0.2) 100%
  );
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .dia-text-accent {
  background: linear-gradient(
    90deg,
    #09090b 0%,
    #09090b 36%,
    #78350f 40%,
    #b45309 43%,
    #fbbf24 46%,
    #f59e0b 49%,
    #09090b 51%,
    #d97706 54%,
    #92400e 58%,
    rgba(9, 9, 11, 0.2) 63%,
    rgba(9, 9, 11, 0.2) 100%
  );
  background-size: 260% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ---- Shimmer Button (Magic UI Signature) ---- */
.shimmer-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 28px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #000000;
  background: #ffffff;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.9);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.25), 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-spring), background 0.25s ease;
  z-index: 1;
  transform: translateZ(0);
  will-change: transform;
}

body.light-theme .shimmer-button {
  color: #ffffff;
  background: #09090b;
  border-color: #09090b;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.shimmer-button::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    transparent,
    rgba(255, 255, 255, 0.8),
    transparent 30%
  );
  animation: rotate-border 4s linear infinite;
  z-index: -1;
  opacity: 0.6;
  transform: translateZ(0);
  will-change: transform;
}

.shimmer-button:hover {
  transform: translateY(-2px) scale(1.02) translateZ(0);
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.4), 0 8px 24px rgba(0, 0, 0, 0.6);
  background: #fafafa;
}

body.light-theme .shimmer-button:hover {
  background: #18181b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.shimmer-button:active {
  transform: translateY(0) scale(0.98) translateZ(0);
}

@keyframes rotate-border {
  100% { transform: rotate(1turn); }
}

.glass-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 26px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--theme-text-high);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--theme-card-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-full);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-smooth), background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  transform: translateZ(0);
  will-change: transform;
}

body.light-theme .glass-button {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
  color: #09090b;
}

.glass-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--theme-card-border-hover);
  color: var(--theme-text-high);
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

body.light-theme .glass-button:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.2);
  color: #000000;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.glass-button:active {
  transform: translateY(0) translateZ(0);
}

/* ==========================================================================
   TOP HEADER ISLAND (Minimalist Floating Header)
   ========================================================================== */
#top-header {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
  pointer-events: none;
  transform: translateZ(0);
}

.top-header-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 8px 18px;
  background: var(--theme-header-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--theme-header-border);
  border-radius: var(--radius-full);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  transition: 
    background 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--theme-header-color);
}

.header-logo-img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  object-fit: cover;
}

.header-brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--theme-header-color);
  transition: color 0.4s ease;
}



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

.header-nav-links a {
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--theme-text-medium);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  transition: color 0.2s ease, background 0.2s ease;
}

.header-nav-links a:hover {
  color: var(--theme-text-high);
  background: rgba(255, 255, 255, 0.08);
}

body.light-theme .header-nav-links a:hover {
  background: rgba(0, 0, 0, 0.06);
}

.header-cta-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-github-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--theme-text-high);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--theme-header-border);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body.light-theme .header-github-btn {
  background: rgba(0, 0, 0, 0.04);
  color: #09090b;
}

.header-github-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--theme-text-high);
}

body.light-theme .header-github-btn:hover {
  background: rgba(0, 0, 0, 0.08);
}

.header-download-btn {
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #000000;
  background: #ffffff;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

body.light-theme .header-download-btn {
  background: #09090b;
  color: #ffffff;
}

.header-download-btn:hover {
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   HERO SECTION (Always Dark / Obsidian Black)
   ========================================================================= */
#hero {
  position: relative;
  padding: 160px 0 100px 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  position: relative;
}

/* ==========================================================================
   MAGIC UI: ANIMATED GRID PATTERN (SVG Radial Mask + Flickering Tiles)
   ========================================================================== */
.animated-grid-pattern-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  color: rgba(255, 255, 255, 0.07);
  mask-image: radial-gradient(ellipse 80% 65% at 50% 30%, #000 20%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 30%, #000 20%, transparent 85%);
}

body.light-theme .animated-grid-pattern-svg {
  color: rgba(0, 0, 0, 0.05);
}

.grid-flicker-square {
  fill: rgba(255, 255, 255, 0.14);
  transition: fill 0.3s ease;
  will-change: opacity;
}

body.light-theme .grid-flicker-square {
  fill: rgba(0, 0, 0, 0.08);
}

.grid-flicker-square.f-1 { animation: grid-tile-flicker 4s ease-in-out infinite 0.2s; }
.grid-flicker-square.f-2 { animation: grid-tile-flicker 5s ease-in-out infinite 1.2s; }
.grid-flicker-square.f-3 { animation: grid-tile-flicker 3.8s ease-in-out infinite 0.7s; }
.grid-flicker-square.f-4 { animation: grid-tile-flicker 4.6s ease-in-out infinite 2.1s; }
.grid-flicker-square.f-5 { animation: grid-tile-flicker 5.2s ease-in-out infinite 1.5s; }
.grid-flicker-square.f-6 { animation: grid-tile-flicker 4.2s ease-in-out infinite 0.9s; }
.grid-flicker-square.f-7 { animation: grid-tile-flicker 4.8s ease-in-out infinite 2.6s; }
.grid-flicker-square.f-8 { animation: grid-tile-flicker 3.6s ease-in-out infinite 1.8s; }
.grid-flicker-square.f-9 { animation: grid-tile-flicker 5.5s ease-in-out infinite 0.4s; }

@keyframes grid-tile-flicker {
  0%, 100% { opacity: 0; }
  45%, 55% { opacity: 1; }
}

.hero-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transform: translateZ(0);
}

.hero-pill-badge::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%) translateZ(0);
  animation: shimmer-sweep 3.5s infinite;
}

@keyframes shimmer-sweep {
  100% { transform: translateX(100%); }
}

.badge-sparkle {
  color: #fbbf24;
  display: flex;
  align-items: center;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  line-height: 1.65;
  color: #a1a1aa;
  max-width: 720px;
  margin: 0 auto 2.5rem auto;
  font-weight: 400;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-proof-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: #71717a;
  margin-bottom: 4rem;
}

.proof-pill-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.proof-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #52525b;
}
.proof-dot.green {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* ---- 3D Hero Mockup Container ---- */
.hero-mockup-3d-scene {
  perspective: 1200px;
  width: 100%;
  max-width: 1060px;
  margin: 0 auto;
  position: relative;
  transform: translateZ(0);
}

.mockup-3d-chassis {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 
    0 30px 100px rgba(0, 0, 0, 0.95),
    0 0 80px rgba(255, 255, 255, 0.05);
  transform-style: preserve-3d;
  will-change: transform;
  overflow: hidden;
}

/* Magic UI Border Beam Animation */
.border-beam-layer {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  padding: 1.5px;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transform: translateZ(0);
}

.border-beam-layer::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(255, 255, 255, 0.95) 60deg,
    transparent 120deg
  );
  animation: border-beam-spin 6s linear infinite;
  transform: translateZ(0);
  will-change: transform;
}

@keyframes border-beam-spin {
  100% { transform: rotate(1turn); }
}

.mockup-screen-frame {
  background: #09090b;
  border-radius: calc(var(--radius-xl) - 4px);
  overflow: hidden;
  position: relative;
}

.mockup-window-header {
  height: 38px;
  background: #121216;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.window-dots {
  display: flex;
  gap: 7px;
}
.w-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.w-dot.red { background: #ff5f56; }
.w-dot.yellow { background: #ffbd2e; }
.w-dot.green { background: #27c93f; }

.window-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #71717a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mockup-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transform: translateZ(0);
}

.screen-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

/* ---- Floating Telemetry Badges ---- */
.hero-telemetry-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(12, 12, 16, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  z-index: 10;
  transform: translateZ(0);
  will-change: transform;
}

.telemetry-icon-box {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.telemetry-icon-box.emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.telemetry-icon-box.blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.telemetry-icon-box.white {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.telemetry-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
}

.telemetry-sub {
  font-size: 0.72rem;
  color: #a1a1aa;
}

.badge-top-left {
  top: 15%;
  left: -40px;
  animation: float-badge 5s ease-in-out infinite;
}

.badge-bottom-right {
  bottom: 12%;
  right: -40px;
  animation: float-badge 6s ease-in-out infinite 1s;
}

.badge-bottom-left {
  bottom: 8%;
  left: -20px;
  animation: float-badge 5.5s ease-in-out infinite 2s;
}

@keyframes float-badge {
  0%, 100% { transform: translateY(0px) translateZ(0); }
  50% { transform: translateY(-10px) translateZ(0); }
}

/* ==========================================================================
   INFINITE MARQUEE SECTION (Transition Zone)
   ========================================================================== */
.marquee-container {
  width: 100%;
  padding: 40px 0;
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.02) 50%, transparent 100%);
  border-top: 1px solid var(--theme-card-border);
  border-bottom: 1px solid var(--theme-card-border);
  transform: translateZ(0);
}

body.light-theme .marquee-container {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.02) 50%, transparent 100%);
}

.marquee-mask {
  display: flex;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-track {
  display: flex;
  gap: 2rem;
  white-space: nowrap;
  animation: marquee-scroll 35s linear infinite;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.marquee-track:hover {
  animation-play-state: paused;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  background: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--theme-text-high);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
  transform: translateZ(0);
}

.marquee-item:hover {
  border-color: var(--theme-card-border-hover);
  transform: translateY(-1px) translateZ(0);
}

.marquee-icon {
  display: flex;
  align-items: center;
  color: var(--theme-text-high);
}

@keyframes marquee-scroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* ==========================================================================
   BENTO GRID ARCHITECTURE (Light & Dark Adaptive)
   ========================================================================== */
/* ==========================================================================
   MAGIC UI BENTO GRID SPECIFICATION
   Layout: Asymmetric Grid with interactive background layers and hover CTAs
   ========================================================================== */
#features {
  padding: 120px 0 100px 0;
  position: relative;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-top: 3rem;
}

/* BentoCard Base Component */
.bento-card {
  position: relative;
  background: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 380px;
  box-shadow: var(--theme-card-shadow);
  transition: 
    background 0.4s ease,
    border-color 0.3s var(--ease-smooth),
    box-shadow 0.4s ease,
    transform 0.3s var(--ease-smooth);
  transform: translateZ(0);
  will-change: transform, border-color;
}

.bento-card:hover {
  border-color: var(--theme-card-border-hover);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

/* Dynamic Radial Mouse Spotlight */
.bento-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(255, 255, 255, 0.08),
    transparent 40%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  transform: translateZ(0);
  z-index: 2;
}

body.light-theme .bento-card::before {
  background: radial-gradient(
    600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(0, 0, 0, 0.05),
    transparent 40%
  );
}

.bento-card:hover::before {
  opacity: 1;
}

/* 1. Background Visual Layer (Top Half with Mask) */
.bento-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 24px;
  pointer-events: auto;
  mask-image: linear-gradient(to top, transparent 10%, #000 70%);
  -webkit-mask-image: linear-gradient(to top, transparent 10%, #000 70%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
  transform-origin: top center;
  z-index: 1;
}

.bento-card:hover .bento-card-bg {
  transform: scale(1.03);
}

/* 2. Bottom Content Body */
.bento-card-body {
  position: relative;
  z-index: 10;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
}

.bento-text-block {
  transform: translateY(0);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.bento-card:hover .bento-text-block {
  transform: translateY(-32px);
}

.bento-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  color: var(--theme-text-high);
  margin-bottom: 0.75rem;
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.bento-card:hover .bento-icon {
  transform: scale(0.85);
}

.bento-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--theme-text-high);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
  transition: color 0.4s ease;
}

.bento-card-desc {
  font-size: 0.9rem;
  color: var(--theme-text-medium);
  line-height: 1.5;
  transition: color 0.4s ease;
}

/* 3. CTA Action Button (Slides up and fades in on hover) */
.bento-cta-btn {
  position: absolute;
  bottom: 24px;
  left: 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--theme-text-high);
  text-decoration: none;
  opacity: 0;
  transform: translateY(14px);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.bento-card:hover .bento-cta-btn {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.bento-cta-btn i,
.bento-cta-btn svg {
  transition: transform 0.2s ease;
}

.bento-cta-btn:hover i,
.bento-cta-btn:hover svg {
  transform: translateX(4px);
}

/* Grid Spans */
.span-8 { grid-column: span 8; }
.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }
.span-12 { grid-column: span 12; }

.status-live-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.68rem;
  font-weight: 700;
  color: #10b981;
  letter-spacing: 0.05em;
}

/* ---- Card 1: Interactive 7-Stage Pipeline Visualizer ---- */
.pipeline-interactive-box {
  margin-top: 1.5rem;
  background: #09090c;
  border: 1px solid var(--theme-card-border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.pipeline-stage-list {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

.pipeline-stage-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: #a1a1aa;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  transform: translateZ(0);
}

.pipeline-stage-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.pipeline-stage-btn.active {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  font-weight: 600;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.pipeline-log-display {
  margin-top: 12px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #f4f4f5;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 0.15s ease;
}

.log-meta {
  color: var(--accent-emerald);
  font-size: 0.72rem;
  margin-bottom: 4px;
}

/* ---- Card 2: AI Review Terminal Streamer ---- */
.ai-terminal-mock {
  margin-top: 1.5rem;
  background: #000000;
  border: 1px solid var(--theme-card-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.ai-terminal-head {
  padding: 8px 14px;
  background: #111116;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #71717a;
  font-size: 0.75rem;
}

.ai-terminal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.finding-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
}
.finding-tag.crit {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.finding-tag.warn {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.finding-tag.info {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.finding-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
  color: #f4f4f5;
}

/* ---- Card 3: DCO & Commit Compliance ---- */
.dco-radar-visual {
  margin-top: 1.5rem;
  background: var(--theme-card-subtle);
  border: 1px solid var(--theme-card-border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.commit-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.commit-hash {
  color: var(--theme-text-muted);
}
.commit-msg {
  color: var(--theme-text-high);
  flex-grow: 1;
  margin: 0 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.commit-dco-badge {
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ---- Card 4: SQLite Audit Code Block ---- */
.sqlite-code-block {
  margin-top: 1.5rem;
  background: #09090c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: #f4f4f5;
}

.code-keyword { color: #f43f5e; font-weight: 600; }
.code-fn { color: #38bdf8; }
.code-str { color: #a3e635; }
.code-cmt { color: #52525b; font-style: italic; }

/* ==========================================================================
   INTERACTIVE WORKFLOW SECTION (Light & Dark Adaptive)
   ========================================================================== */
#how-it-works {
  padding: 120px 0;
  position: relative;
  border-top: 1px solid var(--theme-card-border);
}

/* ==========================================================================
   MAGIC UI: ANIMATED BEAM INTEGRATION NETWORK
   Exact Magic UI AnimatedBeam Component Layout (Dynamic Bezier Math)
   ========================================================================== */
.animated-beam-wrapper {
  position: relative;
  width: 100%;
  max-width: 820px;
  height: 420px;
  margin: 3.5rem auto 0 auto;
  background: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--theme-card-shadow);
  overflow: hidden;
  padding: 40px 30px;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.animated-beams-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
}

.beam-track {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 2.5;
  fill: none;
  transition: stroke 0.4s ease;
}

body.light-theme .beam-track {
  stroke: rgba(0, 0, 0, 0.1);
}

.beam-path-animated {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 60 220;
  will-change: stroke-dashoffset;
}

.beam-in-1 { animation: beam-flow-in 3.2s linear infinite; }
.beam-in-2 { animation: beam-flow-in 3.6s linear infinite 0.4s; }
.beam-in-3 { animation: beam-flow-in 3.4s linear infinite 0.8s; }

.beam-out-1 { animation: beam-flow-out 3.4s linear infinite 0.2s; }
.beam-out-2 { animation: beam-flow-out 3.6s linear infinite 0.6s; }
.beam-out-3 { animation: beam-flow-out 3.2s linear infinite 1.0s; }

@keyframes beam-flow-in {
  0% { stroke-dashoffset: 350; }
  100% { stroke-dashoffset: 0; }
}

@keyframes beam-flow-out {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -350; }
}

/* Matrix Layout of Circular Nodes */
.beam-matrix-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 660px;
  height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.beam-matrix-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.beam-circle-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
}

/* Solid Opaque Icon Badge (Covers SVG lines cleanly) */
.beam-icon-box {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #09090b;
  border: 2px solid rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: transform 0.25s var(--ease-smooth), border-color 0.25s var(--ease-smooth), box-shadow 0.25s ease, background 0.4s ease;
  position: relative;
  z-index: 10;
}

body.light-theme .beam-icon-box {
  background: #ffffff;
  border: 2px solid #e4e4e7;
  box-shadow: 
    0 10px 25px -5px rgba(0, 0, 0, 0.12),
    0 4px 10px rgba(0, 0, 0, 0.05);
}

.beam-icon-box svg {
  width: 26px;
  height: 26px;
  display: block;
}

/* High Contrast Brand Icon Themes */
.beam-icon-box.github {
  color: #ffffff;
}
body.light-theme .beam-icon-box.github {
  color: #181717;
}

.beam-icon-box.git {
  color: #F05032;
}

.beam-icon-box.ci {
  color: #10b981;
}

.beam-icon-box.ai {
  color: #a855f7;
}

.beam-icon-box.sqlite {
  color: #06b6d4;
}

.beam-icon-box.send {
  color: #3b82f6;
}

.beam-circle-node:hover .beam-icon-box {
  transform: scale(1.12);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.25);
}

body.light-theme .beam-circle-node:hover .beam-icon-box {
  border-color: #a1a1aa;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

/* Bold, High-Contrast Typography */
.beam-node-label {
  position: absolute;
  bottom: -26px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--theme-text-high);
  white-space: nowrap;
  letter-spacing: -0.015em;
  text-align: center;
  transition: color 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.beam-circle-node:hover .beam-node-label {
  transform: translateY(2px);
}

/* Center Hub (Cabin Core Engine) */
.beam-circle-hub {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
}

.hub-icon-core {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #09090b;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 0 45px rgba(255, 255, 255, 0.2),
    0 12px 35px rgba(0, 0, 0, 0.9);
  transition: transform 0.25s var(--ease-smooth), box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  z-index: 10;
}

body.light-theme .hub-icon-core {
  background: #ffffff;
  border: 2.5px solid #18181b;
  box-shadow: 
    0 0 35px rgba(0, 0, 0, 0.12),
    0 12px 30px rgba(0, 0, 0, 0.1);
}

.hub-core-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: block;
}

.beam-circle-hub:hover .hub-icon-core {
  transform: scale(1.1);
  border-color: #ffffff;
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.35);
}

body.light-theme .beam-circle-hub:hover .hub-icon-core {
  border-color: #000000;
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.22);
}

.hub-core-label {
  position: absolute;
  bottom: -28px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--theme-text-high);
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.workflow-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: center;
  margin-top: 3.5rem;
}

.workflow-steps-menu {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wf-step-card {
  padding: 22px;
  background: var(--theme-card-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--theme-card-shadow);
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transform: translateZ(0);
}

.wf-step-card:hover {
  background: var(--theme-card-subtle);
  border-color: var(--theme-card-border-hover);
}

.wf-step-card.active {
  background: var(--theme-card-subtle);
  border-color: var(--theme-text-high);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.08);
}

.wf-num-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--theme-tag-bg);
  border: 1px solid var(--theme-card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--theme-text-high);
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.wf-step-card.active .wf-num-badge {
  background: var(--theme-text-high);
  color: var(--theme-bg);
}

.wf-step-body h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--theme-text-high);
  margin-bottom: 4px;
  transition: color 0.4s ease;
}

.wf-step-body p {
  font-size: 0.9rem;
  color: var(--theme-text-medium);
  line-height: 1.5;
  transition: color 0.4s ease;
}

/* Workflow Stage Display Window */
.workflow-screen-container {
  background: #09090c;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  padding: 24px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

body.light-theme .workflow-screen-container {
  border-color: rgba(0, 0, 0, 0.15);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.wf-preview-pane {
  display: none;
  animation: fade-in-up 0.3s var(--ease-spring) forwards;
}

.wf-preview-pane.active {
  display: block;
}

@keyframes fade-in-up {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   PRODUCT TOUR SCREENSHOTS CAROUSEL
   ========================================================================== */
#screenshots {
  padding: 120px 0;
  position: relative;
  border-top: 1px solid var(--theme-card-border);
}

.tour-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.tour-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--theme-tag-bg);
  border: 1px solid var(--theme-card-border);
  border-radius: var(--radius-full);
  color: var(--theme-text-medium);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--ease-smooth);
  transform: translateZ(0);
}

.tour-tab-btn:hover {
  color: var(--theme-text-high);
  background: var(--theme-card-subtle);
}

.tour-tab-btn.active {
  background: var(--theme-text-high);
  color: var(--theme-bg);
  font-weight: 600;
  border-color: var(--theme-text-high);
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
}

.tour-showcase-frame {
  max-width: 1080px;
  margin: 0 auto;
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4);
  position: relative;
  transform: translateZ(0);
}

body.light-theme .tour-showcase-frame {
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.15);
}

.tour-frame-header {
  padding: 12px 20px;
  background: #111116;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #f4f4f5;
}

.tour-slide {
  display: none;
}
.tour-slide.active {
  display: block;
}

.tour-slide-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transform: translateZ(0);
}

.tour-slide-caption {
  padding: 24px 32px;
  background: #0a0a0e;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: #ffffff;
}

.caption-text h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.caption-text p {
  font-size: 0.92rem;
  color: #a1a1aa;
}

.tour-nav-arrows {
  display: flex;
  gap: 8px;
}

.tour-arrow-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  transform: translateZ(0);
}

.tour-arrow-btn:hover {
  background: #ffffff;
  color: #000000;
}

/* ==========================================================================
   DOWNLOAD HUB & TERMINAL (Transitions to Dark Theme)
   ========================================================================== */
#download {
  padding: 120px 0 100px 0;
  position: relative;
  border-top: 1px solid var(--theme-card-border);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 3.5rem;
}

.dl-platform-card {
  position: relative;
  background: #09090b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.25s var(--ease-smooth), border-color 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth);
  transform: translateZ(0);
}

.dl-platform-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px) translateZ(0);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.dl-platform-card.recommended {
  border-color: #ffffff;
  box-shadow: 0 0 35px rgba(255, 255, 255, 0.15);
}

.recommended-pill {
  position: absolute;
  top: -12px;
  background: #ffffff;
  color: #000000;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 12px;
  border-radius: var(--radius-full);
}

.dl-os-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  margin-bottom: 1.5rem;
}

.dl-card-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.dl-card-arch {
  font-size: 0.88rem;
  color: #a1a1aa;
  margin-bottom: 1.5rem;
}

.dl-card-btn {
  width: 100%;
  margin-top: auto;
}

/* Interactive Build Terminal */
.build-source-terminal {
  max-width: 860px;
  margin: 3.5rem auto 0 auto;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  transform: translateZ(0);
}

.source-terminal-header {
  padding: 10px 18px;
  background: #111116;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.source-terminal-code {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: #f4f4f5;
}

.copy-code-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
  transform: translateZ(0);
}

.copy-code-btn:hover {
  background: #ffffff;
  color: #000000;
}

/* ==========================================================================
   OPEN SOURCE STAR BANNER (Dark Theme)
   ========================================================================== */
#oss-callout {
  padding: 100px 0;
  position: relative;
}

.oss-banner-card {
  position: relative;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(255, 255, 255, 0.08), rgba(12, 12, 16, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.9);
  transform: translateZ(0);
}

.oss-banner-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.oss-banner-desc {
  font-size: 1.05rem;
  color: #a1a1aa;
  max-width: 620px;
  margin: 0 auto 2rem auto;
}

.oss-actions-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   MAGIC UI / MACOS FLOATING DOCK (Independent Icons & Layout Shift Physics)
   ========================================================================== */
#magic-dock-container {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  z-index: 9999;
  pointer-events: none;
  transform: translateZ(0);
}

.magic-dock {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  height: 64px;
  background: rgba(15, 15, 20, 0.75);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  transform: translateZ(0);
  transition: 
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

body.light-theme .magic-dock {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.04);
}

/* Independent Naked DockIcon (No circular background/border) */
.dock-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  border-radius: 12px;
  color: #a1a1aa;
  text-decoration: none;
  cursor: pointer;
  padding: 6px;
  flex-shrink: 0;
  transform: translateZ(0);
  transition: 
    color 0.2s ease,
    background 0.2s ease;
  will-change: width, height;
}

body.light-theme .dock-item {
  color: #52525b;
}

.dock-item svg,
.dock-item i {
  width: 100%;
  height: 100%;
  max-width: 28px;
  max-height: 28px;
  pointer-events: none;
  transition: color 0.2s ease;
}

.dock-item:hover {
  color: #ffffff;
}

body.light-theme .dock-item:hover {
  color: #09090b;
}

/* macOS Active Dot Indicator */
.dock-item.active::after {
  content: '';
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

body.light-theme .dock-item.active::after {
  background: #09090b;
  box-shadow: none;
}

.dock-item.active {
  color: #ffffff;
}

body.light-theme .dock-item.active {
  color: #09090b;
}

.dock-divider {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.16);
  margin: 0 2px;
  align-self: center;
  flex-shrink: 0;
}

body.light-theme .dock-divider {
  background: rgba(0, 0, 0, 0.12);
}

/* Floating Tooltips */
.dock-tooltip {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 10px;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

body.light-theme .dock-tooltip {
  background: #09090b;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
}

.dock-item:hover .dock-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   MONUMENTAL EDITORIAL FOOTER (Inspired by Reference Design)
   ========================================================================== */
#footer {
  padding: 100px 0 130px 0;
  background: #000000;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

/* 1. Top Primary Nav */
.footer-top-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-huge-link {
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #ffffff;
  text-decoration: none;
  line-height: 1.1;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.footer-huge-link:hover {
  color: #a1a1aa;
  transform: translateX(4px);
}

.footer-sub-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-sub-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: #71717a;
  text-decoration: none;
  transition: color 0.15s ease;
}

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

/* 2. Secondary Meta & Mission Bar */
.footer-meta-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: 28px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-mission-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.footer-mission-sub {
  font-size: 0.88rem;
  color: #71717a;
  max-width: 540px;
  line-height: 1.5;
}

.footer-social-tags {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.footer-social-pill {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #f4f4f5;
  text-decoration: none;
  transition: all 0.2s ease;
}

.footer-social-pill:hover {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.3);
}

/* 3. Monumental Wordmark & Glyph Row */
.footer-monumental-wrap {
  position: relative;
  width: 100%;
  margin: 10px 0 0 0;
  user-select: none;
}

.footer-glyph-row {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 16px;
}

.f-glyph {
  display: inline-block;
  background: rgba(255, 255, 255, 0.85);
  transition: transform 0.3s ease, background 0.3s ease;
}

.f-glyph:hover {
  background: #ffffff;
  transform: translateY(-3px) scale(1.1);
}

.glyph-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
}

.glyph-roof {
  width: 24px;
  height: 24px;
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
}

.glyph-hex {
  width: 24px;
  height: 24px;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
}

.glyph-square {
  width: 22px;
  height: 22px;
  border-radius: 4px;
}

.glyph-pill {
  width: 32px;
  height: 20px;
  border-radius: 10px;
}

.footer-giant-wordmark {
  font-size: clamp(4.5rem, 19.5vw, 17rem);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: -0.06em;
  text-transform: lowercase;
  color: #ffffff;
  background: linear-gradient(180deg, #ffffff 0%, #a1a1aa 65%, #3f3f46 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: -0.04em;
  pointer-events: none;
  transform: translateZ(0);
}

/* 4. Colophon Bottom Bar */
.footer-colophon-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.82rem;
  color: #71717a;
}

.footer-colophon-bar a {
  color: #f4f4f5;
  text-decoration: none;
}

.footer-colophon-bar a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
  .span-8, .span-6, .span-4 {
    grid-column: span 12;
  }
  .workflow-layout {
    grid-template-columns: 1fr;
  }
  .download-grid {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .hero-telemetry-card {
    display: none;
  }
}

@media (max-width: 768px) {
  .header-nav-links {
    display: none;
  }

  .hero-title {
    font-size: 2.5rem;
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-bottom-bar {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  .magic-dock {
    padding: 8px 12px;
    gap: 6px;
  }
  .dock-item {
    width: 38px;
    height: 38px;
  }
  .dock-item svg {
    width: 16px;
    height: 16px;
  }
  .tour-slide-caption {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .animated-beam-wrapper {
    height: auto;
    padding: 36px 16px;
  }
  .beam-matrix-container {
    height: auto;
    gap: 32px;
  }
  .beam-matrix-row {
    justify-content: space-around;
  }
  .animated-beams-svg {
    display: none;
  }
}
