/* ============================================
   VERVELIO - Design Tokens & Component Styles
   Three modes: green (terminal), black (dark), white (light)
   ============================================ */

/* --- TYPE SCALE --- */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  --text-lg: clamp(1.0625rem, 0.95rem + 0.6vw, 1.3125rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  /* SPACING */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* RADIUS */
  --radius-sm: 3px;
  --radius-md: 6px;
  --radius-lg: 8px;

  /* TRANSITIONS */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* FONTS */
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --font-body: 'JetBrains Mono', 'Courier New', monospace;
  --font-display: 'Inter', 'Helvetica Neue', sans-serif;

  /* CONTENT WIDTHS */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1100px;
}

/* ===========================================
   GREEN MODE (DEFAULT) - Terminal Aesthetic
   =========================================== */
[data-theme="green"] {
  --color-bg: #0a0a0a;
  --color-surface: #0f0f0f;
  --color-surface-2: #141414;
  --color-border: #1a3a1a;
  --color-border-bright: #2a5a2a;
  --color-text: #00cc00;
  --color-text-muted: #009800;
  --color-text-faint: #009000;
  --color-accent: #00ff41;
  --color-accent-dim: #00cc00;
  --color-glow: rgba(0, 255, 65, 0.08);
  --color-glow-strong: rgba(0, 255, 65, 0.15);
  --scanline-opacity: 0.03;
  --font-body: 'JetBrains Mono', 'Courier New', monospace;
}

/* ===========================================
   BLACK MODE - Minimal Dark
   =========================================== */
[data-theme="black"] {
  --color-bg: #0e0e0e;
  --color-surface: #151515;
  --color-surface-2: #1c1c1c;
  --color-border: #2a2a2a;
  --color-border-bright: #3a3a3a;
  --color-text: #d4d4d4;
  --color-text-muted: #888888;
  --color-text-faint: #7d7d7d;
  --color-accent: #ffffff;
  --color-accent-dim: #cccccc;
  --color-glow: rgba(255, 255, 255, 0.04);
  --color-glow-strong: rgba(255, 255, 255, 0.08);
  --scanline-opacity: 0;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
}

/* ===========================================
   WHITE MODE - Clean Light
   =========================================== */
[data-theme="white"] {
  --color-bg: #f5f5f0;
  --color-surface: #ffffff;
  --color-surface-2: #eaeae5;
  --color-border: #d0d0c8;
  --color-border-bright: #b0b0a8;
  --color-text: #1a1a1a;
  --color-text-muted: #6a6a6a;
  --color-text-faint: #6d6d6d;
  --color-accent: #1a1a1a;
  --color-accent-dim: #333333;
  --color-glow: rgba(0, 0, 0, 0.03);
  --color-glow-strong: rgba(0, 0, 0, 0.06);
  --scanline-opacity: 0;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
}

/* --- BODY FONT SWITCH --- */
body {
  font-family: var(--font-body);
}

/* ===========================================
   SCANLINE OVERLAY (green mode only)
   =========================================== */
.scanline-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, var(--scanline-opacity)) 2px,
    rgba(0, 0, 0, var(--scanline-opacity)) 4px
  );
}

/* ===========================================
   HEADER
   =========================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), background 0.4s ease;
}

.header--hidden {
  transform: translateY(-100%);
}

.header--scrolled {
  box-shadow: 0 1px 8px oklch(0 0 0 / 0.15);
}

.header-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logo-mark {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: none;
  border-radius: 2px;
}

[data-theme="green"] .logo-img--green { display: block; }
[data-theme="black"] .logo-img--black { display: block; }
[data-theme="white"] .logo-img--white { display: block; }

.logo-text {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--color-accent);
}

/* NAV */
.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-prefix {
  color: var(--color-text-faint);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
}

/* THEME SWITCHER */
.theme-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-1);
}

.theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}

.theme-btn:hover {
  color: var(--color-text);
  background: var(--color-glow-strong);
}

.theme-btn.active {
  color: var(--color-accent);
  background: var(--color-glow-strong);
}

/* HAMBURGER */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.hamburger-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}

.mobile-menu-btn.open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-btn.open .hamburger-line:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* MOBILE NAV OVERLAY */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: oklch(from var(--color-bg) l c h / 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease-out);
}

.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.theme-switcher-mobile {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
}

.theme-switcher-mobile .theme-btn {
  width: auto;
  height: auto;
  padding: var(--space-3) var(--space-6);
  gap: var(--space-3);
  font-size: var(--text-base);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  min-width: 180px;
}

.theme-switcher-mobile .theme-btn svg {
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
  }
}

/* ===========================================
   HERO
   =========================================== */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  position: relative;
  padding: var(--space-8) var(--space-4);
}

@media (min-width: 641px) {
  .hero {
    min-height: 80vh;
    padding: var(--space-16) var(--space-8);
  }
}

.hero-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  width: 100%;
}

.hero-terminal {
  border: 1px solid var(--color-border-bright);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: 0 0 40px var(--color-glow), 0 0 80px var(--color-glow);
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border-bottom: 1px solid var(--color-border);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-text-faint);
}

.terminal-dot:first-child { background: #ff5f56; }
.terminal-dot:nth-child(2) { background: #ffbd2e; }
.terminal-dot:nth-child(3) { background: #27c93f; }

[data-theme="green"] .terminal-dot:first-child,
[data-theme="green"] .terminal-dot:nth-child(2),
[data-theme="green"] .terminal-dot:nth-child(3) {
  background: var(--color-text-faint);
}

.terminal-title {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.05em;
}

.terminal-body {
  padding: var(--space-6) var(--space-4);
}

@media (min-width: 641px) {
  .terminal-body {
    padding: var(--space-8) var(--space-6);
  }
}

.terminal-line {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  max-width: none;
}

.prompt {
  color: var(--color-accent);
  font-weight: 600;
  flex-shrink: 0;
}

.cmd {
  color: var(--color-text);
  font-weight: 500;
}

.terminal-output {
  font-family: var(--font-body);
  color: var(--color-text);
  margin-bottom: var(--space-6);
  padding-left: var(--space-4);
  max-width: none;
}

.hero-headline {
  margin-bottom: var(--space-8);
}

.hero-headline h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-accent);
  line-height: 1.1;
}

[data-theme="green"] .hero-headline h1 {
  text-shadow: 0 0 20px var(--color-glow-strong), 0 0 40px var(--color-glow);
}

.cursor-blink {
  color: var(--color-accent);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Hero typing animation */
.hero .terminal-line,
.hero .terminal-output {
  opacity: 0;
  transform: translateY(4px);
}

.hero .terminal-line.visible,
.hero .terminal-output.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

/* ===========================================
   SECTIONS
   =========================================== */
.section {
  padding: clamp(var(--space-10), 5vw, var(--space-16)) var(--space-4);
}

@media (min-width: 641px) {
  .section {
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

.container {
  max-width: var(--content-wide);
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-accent);
  letter-spacing: 0.18em;
  margin-bottom: var(--space-8);
  text-transform: uppercase;
}

[data-theme="green"] .section-label {
  text-shadow: 0 0 12px var(--color-glow-strong);
}

/* ===========================================
   WHAT WE DO - Cards
   =========================================== */
.what-grid {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .what-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--space-4);
  }
}

.what-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}

@media (min-width: 641px) {
  .what-card {
    padding: var(--space-6);
  }
}

.what-card:hover {
  border-color: var(--color-border-bright);
  box-shadow: 0 0 30px var(--color-glow);
}

.card-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
  letter-spacing: 0.08em;
  margin-bottom: var(--space-4);
  text-transform: uppercase;
}

.what-card h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-4);
  letter-spacing: -0.01em;
}

.what-card p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: 1.7;
}

/* ===========================================
   SPECIALIZATIONS
   =========================================== */
.spec-grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .spec-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

.spec-item {
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.spec-num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: var(--space-3);
}

.spec-item h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.spec-item p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: 1.7;
}

/* ===========================================
   MISSION / VISION
   =========================================== */
.section-mission .container {
  display: grid;
  gap: clamp(var(--space-10), 6vw, var(--space-16));
}

@media (min-width: 768px) {
  .section-mission .container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
}

.mission-block,
.vision-block {
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

@media (min-width: 641px) {
  .mission-block,
  .vision-block {
    padding: var(--space-8);
  }
}

.mission-quote {
  margin-top: var(--space-6);
  position: relative;
}

/* The 'glitch glyph', rebuilt on purpose. It began as an encoding accident:
   a control character that Chrome drew as a missing-glyph hex box beside a
   stray letter. The user liked it, so this recreates the same shape
   deliberately - a thin outlined box holding the section word in tiny
   vertical type (::before), with the big faint initial beside it (::after).
   Unlike the accident, this renders identically in every browser. */
.mission-quote::before {
  position: absolute;
  top: -2.4rem;
  left: -0.3rem;
  height: 3.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
  border: 1px solid var(--color-accent);
  padding: 0.25rem 0.1rem;
  opacity: 0.22;
  pointer-events: none;
}

.mission-quote::after {
  position: absolute;
  top: -2.5rem;
  left: 0.85rem;
  font-family: var(--font-display);
  font-size: 4.5rem;
  line-height: 1;
  color: var(--color-accent);
  opacity: 0.14;
  pointer-events: none;
}

.mission-block .mission-quote::before { content: 'MISSION'; }
.mission-block .mission-quote::after { content: 'M'; }

.vision-block .mission-quote::before { content: 'VISION'; }
.vision-block .mission-quote::after { content: 'V'; }

.mission-quote p {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
  line-height: 1.6;
  font-weight: 400;
  max-width: none;
}

/* ===========================================
   PROCESS
   =========================================== */
.process-terminal {
  border: 1px solid var(--color-border-bright);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
}

.process-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.process-step {
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.process-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.process-ts {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: var(--space-2);
}

.process-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  display: block;
  margin-bottom: var(--space-2);
}

.process-desc {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: 1.7;
}

/* ===========================================
   DETROIT
   =========================================== */
.detroit-content {
  max-width: var(--content-narrow);
}

.detroit-content h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}

[data-theme="green"] .detroit-content h2 {
  text-shadow: 0 0 20px var(--color-glow-strong);
}

.detroit-content p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: 1.8;
  margin-bottom: var(--space-4);
}

.detroit-sub {
  color: var(--color-text) !important;
  font-weight: 500;
}

/* ===========================================
   CTA
   =========================================== */
.cta-terminal {
  border: 1px solid var(--color-border-bright);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: 0 0 60px var(--color-glow), 0 0 120px var(--color-glow);
}

.cta-output {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
}

.cta-link {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--color-text-faint);
  transition: text-decoration-color var(--transition-interactive);
  font-weight: 500;
}

.cta-link:hover {
  text-decoration-color: var(--color-accent);
}

/* ===========================================
   FOOTER
   =========================================== */
.footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-6) var(--space-4);
}

@media (min-width: 641px) {
  .footer {
    padding: var(--space-6) var(--space-8);
  }
}

.footer-inner {
  max-width: var(--content-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.footer-brand {
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: 0.1em;
}

.footer-sep {
  color: var(--color-text-faint);
}

.footer-right {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ===========================================
   SCROLL ANIMATIONS (fade-in)
   =========================================== */
.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
}

@keyframes reveal-fade {
  to { opacity: 1; }
}

/* Fallback for browsers without scroll animation support */
@supports not (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    transition: opacity 0.6s var(--ease-out);
  }
  .fade-in.visible {
    opacity: 1;
  }
}

/* ===========================================
   GLOW ACCENTS (green mode ambient)
   =========================================== */
[data-theme="green"] .hero-terminal {
  box-shadow: 
    0 0 40px rgba(0, 255, 65, 0.06),
    0 0 80px rgba(0, 255, 65, 0.03),
    inset 0 1px 0 rgba(0, 255, 65, 0.05);
}

[data-theme="green"] .cta-terminal {
  box-shadow: 
    0 0 60px rgba(0, 255, 65, 0.06),
    0 0 120px rgba(0, 255, 65, 0.03);
}

/* ===========================================
   RESPONSIVE REFINEMENTS
   =========================================== */
@media (max-width: 480px) {
  .hero-headline h1 {
    font-size: clamp(1.5rem, 1rem + 3vw, 2rem);
  }
  
  .detroit-content h2 {
    font-size: clamp(1.5rem, 1rem + 3vw, 2rem);
  }
}

/* Touch device active states */
@media (hover: none) {
  .what-card:active {
    border-color: var(--color-border-bright);
    background: var(--color-surface-2);
  }
  
  .theme-btn:active {
    color: var(--color-accent);
    background: var(--color-glow-strong);
  }
}

/* ===========================================
   SECTION INTRO (shared)
   =========================================== */
.section-intro {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: 1.7;
  max-width: 62ch;
  margin-top: calc(-1 * var(--space-4));
  margin-bottom: var(--space-10);
}

/* ===========================================
   PRODUCTS
   =========================================== */
.product-list {
  display: flex;
  flex-direction: column;
  gap: clamp(var(--space-12), 7vw, var(--space-24));
}

.product {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}

@media (min-width: 880px) {
  .product {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: var(--space-10);
  }
  .product--reverse .product-media {
    order: 2;
  }
}

/* --- media panel --- */
.product-media {
  min-width: 0;
}

.stopmotion {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-2);
  transition: border-color var(--transition-interactive), box-shadow var(--transition-interactive);
}

.sm-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  /* Deliberate hard cut - stop-motion reads as discrete frames, never a crossfade. */
}

.sm-frame--active {
  opacity: 1;
}

.stopmotion::after {
  /* Ties the imagery into the terminal aesthetic without touching the source frames. */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, var(--scanline-opacity)) 2px,
    rgba(0, 0, 0, var(--scanline-opacity)) 4px
  );
}

[data-theme="green"] .stopmotion {
  box-shadow: 0 0 30px var(--color-glow), 0 0 60px var(--color-glow);
}

.product:hover .stopmotion {
  border-color: var(--color-border-bright);
}

.product-caption {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  letter-spacing: 0.04em;
  margin-top: var(--space-3);
}

/* --- body --- */
.product-body {
  min-width: 0;
}

.product-stage {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-accent);
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}

.product-name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--color-text-faint);
  margin-bottom: var(--space-5);
}

.product-link:hover {
  text-decoration-color: var(--color-accent);
}

.product-link-arrow {
  transition: transform var(--transition-interactive);
}

.product-link:hover .product-link-arrow {
  transform: translateX(3px);
}

.product-thesis {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.45;
  margin-bottom: var(--space-4);
}

.product-desc {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: 1.75;
  margin-bottom: var(--space-5);
}

.product-facts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.product-facts li {
  position: relative;
  padding-left: var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.65;
}

.product-facts li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-family: var(--font-mono);
}

/* ===========================================
   DEVELOPMENT PIPELINE
   =========================================== */
.pipeline-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}

.pipeline-head .process-ts {
  margin-bottom: 0;
}

.status-pill {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-bright);
  color: var(--color-text-muted);
  white-space: nowrap;
}

.status-pill--design {
  color: var(--color-text-faint);
}


/* ===========================================
   HEADER NAV LINKS
   =========================================== */
.nav-link {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-2) var(--space-1);
}

.nav-link:hover {
  color: var(--color-accent);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  align-items: center;
  margin-bottom: var(--space-4);
}

.mobile-nav-links a {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
}

.mobile-nav-links a:hover {
  color: var(--color-accent);
}

/* ===========================================
   SOUND CONTROL (header, top right)
   =========================================== */
.sound-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.sound-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  /* 44px hit area on touch, matching the hamburger, without looking oversized. */
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  transition: color var(--transition-interactive), background var(--transition-interactive),
              border-color var(--transition-interactive);
}

.sound-toggle:hover {
  color: var(--color-text);
  border-color: var(--color-border-bright);
  background: var(--color-glow-strong);
}

.sound-toggle[aria-pressed="true"] {
  color: var(--color-accent);
  border-color: var(--color-border-bright);
  background: var(--color-glow-strong);
}

.sound-icon { flex-shrink: 0; }

/* Show the icon that matches the current state. */
.sound-icon--on { display: none; }
.sound-icon--off { display: block; }
.sound-toggle[aria-pressed="true"] .sound-icon--on { display: block; }
.sound-toggle[aria-pressed="true"] .sound-icon--off { display: none; }

/* --- one-time hint --- */
.sound-hint {
  position: absolute;
  top: calc(100% + var(--space-3));
  right: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-2) var(--space-2) var(--space-3);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border-bright);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 24px oklch(0 0 0 / 0.35);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.sound-hint.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Little pointer up toward the button. */
.sound-hint::before {
  content: '';
  position: absolute;
  top: -5px;
  right: 15px;
  width: 8px;
  height: 8px;
  background: var(--color-surface-2);
  border-left: 1px solid var(--color-border-bright);
  border-top: 1px solid var(--color-border-bright);
  transform: rotate(45deg);
}

.sound-hint-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  line-height: 1;
  color: var(--color-text-faint);
}

.sound-hint-close:hover {
  color: var(--color-text);
  background: var(--color-glow-strong);
}

@media (max-width: 640px) {
  .header-nav { gap: var(--space-2); }
  /* Keep the hint on screen on narrow viewports. */
  .sound-hint {
    right: -8px;
    font-size: 0.7rem;
  }
}

/* ===========================================
   BUTTONS (hero + CTA)
   =========================================== */
.hero-actions,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-bright);
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}

.btn--primary:hover {
  background: var(--color-accent-dim);
  border-color: var(--color-accent-dim);
}

[data-theme="green"] .btn--primary {
  box-shadow: 0 0 24px var(--color-glow-strong);
}

.btn--ghost {
  color: var(--color-text);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-glow);
}

/* Hero action row takes part in the staged reveal like its sibling lines. */
.hero .hero-actions {
  opacity: 0;
  transform: translateY(4px);
}

.hero .hero-actions.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

/* ===========================================
   SCROLL CUE (hero)
   =========================================== */
.scroll-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: var(--space-8) auto 0;
  color: var(--color-text-faint);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  animation: cue-bob 2.2s var(--ease-out) infinite;
}

.scroll-cue:hover {
  color: var(--color-accent);
  border-color: var(--color-border-bright);
}

@keyframes cue-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ===========================================
   ACTIVE NAV STATE
   =========================================== */
.nav-link.is-active {
  color: var(--color-accent);
}

/* ===========================================
   FOOTER NAV
   =========================================== */
.footer-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.footer-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  letter-spacing: 0.05em;
}

.footer-nav a:hover {
  color: var(--color-accent);
}

@media (max-width: 640px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
