/* ============================================================
   AKsevenFour Design System — css/style.css
   Ultra-modern dark aesthetic
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg-base: #07080f;
  --bg-surface: #0d0f1c;
  --bg-elevated: #12152a;

  /* Accent colours */
  --accent-cyan: #38bdf8;
  --accent-green: #34d399;
  --accent-violet: #a78bfa;
  --accent-purple: #8b5cf6;

  /* Text */
  --text-primary: #f0f4ff;
  --text-secondary: #8892b0;
  --text-muted: #4a5568;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.10);

  /* Typography */
  --font-heading: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --section-pad: 100px;
  --container-max: 1200px;
  --nav-height: 72px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 600ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-glow-cyan: 0 0 30px rgba(56, 189, 248, 0.25);
  --shadow-glow-green: 0 0 30px rgba(52, 211, 153, 0.25);
  --shadow-glow-violet: 0 0 30px rgba(167, 139, 250, 0.25);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #7dd3fc;
}

ul {
  list-style: none;
}

/* ── Layout Utilities ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
}

section {
  padding-block: var(--section-pad);
}

.bg-surface {
  background-color: var(--bg-surface);
}

.bg-elevated {
  background-color: var(--bg-elevated);
}

/* ── Typography ───────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

h3 {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}

h4 {
  font-size: 1.25rem;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  display: inline-block;
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.7;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: transparent;
  transition: border-color var(--transition-base);
  border-bottom: 1px solid transparent;
}

.nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(7, 8, 15, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: background var(--transition-base);
}

.nav.scrolled {
  border-bottom-color: var(--border-subtle);
}

.nav.scrolled::before {
  background: rgba(7, 8, 15, 0.92);
}

.nav-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-logo img {
  height: 55px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a,
.nav-dropdown-toggle {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
  cursor: pointer;
  background: none;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-dropdown-toggle:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active,
.nav-dropdown-toggle.active {
  color: var(--accent-cyan);
}

.nav-sep {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0 0.25rem;
  user-select: none;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle svg {
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover .nav-dropdown-toggle svg,
.nav-dropdown.open .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 6px;
  min-width: 180px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity var(--transition-base), transform var(--transition-base);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

/* Invisible bridge that fills the 8px gap so hover isn't broken */
.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-dropdown-menu a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-dropdown-menu a.active {
  color: var(--accent-cyan);
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  border-radius: var(--radius-sm);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav back link */
.nav-back {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.nav-back:hover {
  color: var(--text-secondary);
  border-color: var(--border-default);
  background: rgba(255, 255, 255, 0.04);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.925rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 3px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #0ea5e9 100%);
  color: #030712;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #7dd3fc 0%, var(--accent-cyan) 100%);
  color: #030712;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(56, 189, 248, 0.45);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.825rem;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

/* Colour variants for product pages */
.btn-green {
  background: linear-gradient(135deg, var(--accent-green) 0%, #10b981 100%);
  color: #030712;
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.3);
}

.btn-green:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(52, 211, 153, 0.45);
  color: #030712;
}

.btn-violet {
  background: linear-gradient(135deg, var(--accent-violet) 0%, var(--accent-purple) 100%);
  color: #030712;
  box-shadow: 0 4px 20px rgba(167, 139, 250, 0.3);
}

.btn-violet:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(167, 139, 250, 0.45);
  color: #030712;
}

/* Magnetic button — JS adds subtle translate */
.btn-magnetic {
  will-change: transform;
}

/* ── Hero Section ─────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg-base);
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-bg-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 70% 50%, rgba(56, 189, 248, 0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(167, 139, 250, 0.06) 0%, transparent 60%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero-content h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 24px;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.1s;
}

.hero-content .eyebrow {
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 40px;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.25s;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: 0.4s;
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 50px;
  background: linear-gradient(to bottom, var(--accent-cyan), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

/* ── Product Hero (inner pages) ───────────────────────────── */
.product-hero {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 80px;
  position: relative;
  overflow: hidden;
}

.product-hero-cyan {
  background:
    radial-gradient(ellipse 70% 80% at 80% 50%, rgba(56, 189, 248, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 20% 20%, rgba(167, 139, 250, 0.05) 0%, transparent 50%),
    var(--bg-base);
}

.product-hero-green {
  background:
    radial-gradient(ellipse 70% 80% at 80% 50%, rgba(52, 211, 153, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 20% 20%, rgba(56, 189, 248, 0.05) 0%, transparent 50%),
    var(--bg-base);
}

.product-hero-violet {
  background:
    radial-gradient(ellipse 70% 80% at 80% 50%, rgba(167, 139, 250, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 50% at 20% 20%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
    var(--bg-base);
}

.product-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.product-hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-hero-image img {
  max-height: 400px;
  width: auto;
  filter: drop-shadow(0 20px 60px rgba(56, 189, 248, 0.2));
  animation: float 4s ease-in-out infinite;
}

.product-hero-image img.float-green {
  filter: drop-shadow(0 20px 60px rgba(52, 211, 153, 0.2));
}

.product-hero-image img.float-violet {
  filter: drop-shadow(0 20px 60px rgba(167, 139, 250, 0.2));
}

.product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.badge-green {
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent-green);
  border-color: rgba(52, 211, 153, 0.25);
}

.badge-violet {
  background: rgba(167, 139, 250, 0.12);
  color: var(--accent-violet);
  border-color: rgba(167, 139, 250, 0.25);
}

/* Product page inline nav */
.product-page-nav {
  display: flex;
  gap: 6px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.product-page-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  font-family: var(--font-mono);
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.product-page-nav a:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.05);
}

/* ── Product Cards ────────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.product-card {
  --card-accent: var(--accent-cyan);
  --card-glow: rgba(56, 189, 248, 0.15);
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--card-accent);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  will-change: transform;
  position: relative;
}

.product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--card-accent);
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px var(--card-glow), var(--shadow-card);
}

.product-card:hover::after {
  opacity: 0.3;
}

.product-card-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card-image img {
  transform: scale(1.04);
}

.product-card-body {
  padding: 24px;
}

.product-card-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--card-accent);
  margin-bottom: 10px;
}

.product-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.product-card-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.product-card-spec {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.product-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--card-accent);
  transition: gap var(--transition-fast);
}

.product-card-link:hover {
  gap: 12px;
  color: var(--card-accent);
}

/* ── Values / Feature Highlight Cards ─────────────────────── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 60px;
}

.value-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.value-card:hover {
  border-color: rgba(56, 189, 248, 0.2);
  transform: translateY(-4px);
}

.value-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.value-card h3 {
  font-size: 1.15rem;
  margin-bottom: 12px;
}

.value-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.value-card .btn {
  margin-top: auto;
}

/* ── Features List ────────────────────────────────────────── */
.features-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.features-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.feature-icon.green {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.2);
  color: var(--accent-green);
}

.feature-icon.violet {
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.2);
  color: var(--accent-violet);
}

.feature-item-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding-top: 8px;
}

/* Single-column features list variant */
.features-list-single {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.features-list-single .feature-item {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.features-list-single .feature-item:hover {
  border-color: var(--border-default);
  background: rgba(255, 255, 255, 0.04);
}

/* ── Info Cards (sidebar) ─────────────────────────────────── */
.info-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 24px;
}

.info-card:last-child {
  margin-bottom: 0;
}

.info-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-card-icon {
  width: 28px;
  height: 28px;
}

/* Black logos (GitHub, Tindie, OSHW) rendered white on dark backgrounds */
.vendor-logo {
  filter: brightness(0) invert(1);
  opacity: 0.85;
  transition: opacity var(--transition-fast);
}

.vendor-logo:hover {
  opacity: 1;
}

.oshw-logo {
  filter: brightness(0) invert(1);
  opacity: 0.7;
  vertical-align: middle;
  margin-right: 0.4rem;
}

.info-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.info-card img {
  max-height: 32px;
  width: auto;
}

/* ── Gallery Grid ─────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.gallery-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.gallery-card-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-surface);
}

.gallery-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-card:hover .gallery-card-image img {
  transform: scale(1.05);
}

.gallery-card-body {
  padding: 20px;
}

.gallery-card-body h4 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.gallery-card-body p {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Audio Cards & Chain ──────────────────────────────────── */
.audio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}

.audio-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color var(--transition-base);
}

.audio-card:hover {
  border-color: rgba(56, 189, 248, 0.2);
}

.audio-card h4 {
  font-size: 1rem;
  margin-bottom: 6px;
}

.audio-card p {
  font-size: 0.825rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.audio-card audio {
  width: 100%;
  border-radius: var(--radius-sm);
  accent-color: var(--accent-cyan);
}

/* Audio chain */
.audio-chain {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-block: 28px;
  overflow-x: auto;
}

.chain-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 100px;
  text-align: center;
}

.chain-step-icon {
  width: 52px;
  height: 52px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.chain-step-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  line-height: 1.3;
}

.chain-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
  flex-shrink: 0;
  padding-inline: 8px;
  padding-bottom: 24px;
}

/* ── Spec Table ───────────────────────────────────────────── */
.spec-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  margin-top: 32px;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table th {
  background: var(--bg-elevated);
  padding: 14px 20px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-default);
  white-space: nowrap;
}

.spec-table td {
  padding: 14px 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.spec-table td:first-child {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent-cyan);
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table tbody tr {
  transition: background var(--transition-fast);
}

.spec-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.spec-table a {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* Library data table (getting started) */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}

.data-table th {
  background: var(--bg-elevated);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-default);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.data-table td {
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.data-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Getting Started Layout ───────────────────────────────── */
.gs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}

.gs-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 24px;
}

.gs-sidebar h3 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 16px;
}

.gs-sidebar ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gs-sidebar ul a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.gs-sidebar ul a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.gs-sidebar ul a.active {
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.08);
}

.gs-sidebar-divider {
  height: 1px;
  background: var(--border-subtle);
  margin-block: 12px;
}

.gs-main {
  min-width: 0;
}

.gs-section {
  padding-bottom: 60px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 60px;
}

.gs-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.gs-section h2 {
  font-size: 1.8rem;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.gs-section p {
  margin-bottom: 16px;
}

/* Video embed */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  margin-block: 24px;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── About Layout ─────────────────────────────────────────── */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 60px;
  align-items: start;
}

.about-layout p {
  font-size: 1.05rem;
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

/* ── Contact Layout ───────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 60px;
  align-items: start;
}

.contact-details {
  margin-bottom: 32px;
}

.contact-detail-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.contact-detail-item:last-child {
  border-bottom: none;
}

.contact-detail-item span:first-child {
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 28px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

textarea.form-control {
  resize: vertical;
  min-height: 140px;
}

/* ── Alerts ───────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-block: 20px;
  border: 1px solid transparent;
}

.alert strong {
  font-weight: 700;
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
}

.alert-danger strong {
  color: #f87171;
}

.alert-info {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.2);
  color: var(--text-secondary);
}

.alert-info strong {
  color: var(--accent-cyan);
}

.alert a {
  color: var(--accent-cyan);
  text-decoration: underline;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding-block: 40px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo img {
  height: 72px;
  width: auto;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.footer-logo img:hover {
  opacity: 1;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

.footer-links a.divider {
  color: var(--border-default);
  pointer-events: none;
  padding: 0;
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Scroll Reveal ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

.reveal-delay-5 {
  transition-delay: 0.5s;
}

/* ── Keyframe Animations ──────────────────────────────────── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes scrollLine {
  0% {
    transform: scaleY(0);
    transform-origin: top;
    opacity: 1;
  }

  50% {
    transform: scaleY(1);
    transform-origin: top;
    opacity: 1;
  }

  51% {
    transform: scaleY(1);
    transform-origin: bottom;
    opacity: 1;
  }

  100% {
    transform: scaleY(0);
    transform-origin: bottom;
    opacity: 0;
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-16px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* ── Section header helper ───────────────────────────────── */
.section-header {
  max-width: 640px;
}

.section-header.centered {
  text-align: center;
  margin-inline: auto;
}

/* ── Pinout image ─────────────────────────────────────────── */
.pinout-image {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.pinout-image img {
  width: 100%;
  display: block;
}

/* ── Deep dive text sections ─────────────────────────────── */
.prose h2 {
  font-size: 1.6rem;
  margin-top: 48px;
  margin-bottom: 16px;
}

.prose p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin-block: 48px;
}

/* ── Back arrow nav ───────────────────────────────────────── */
.back-nav-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ── Tindie / GitHub logos in info cards ─────────────────── */
.vendor-logo {
  max-height: 40px;
  width: auto;
  margin-top: 12px;
}

.oshw-logo {
  height: 24px;
  width: auto;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

/* ── 1024px breakpoint ────────────────────────────────────── */
@media (max-width: 1024px) {
  :root {
    --section-pad: 72px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-hero-grid {
    gap: 40px;
  }

  .features-section-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ── 768px (mobile) ───────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --section-pad: 56px;
    --nav-height: 64px;
  }

  /* Mobile nav */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 8, 15, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 24px;
    gap: 4px;
    overflow-y: auto;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a,
  .nav-dropdown-toggle {
    padding: 14px 16px;
    font-size: 1rem;
    border-radius: var(--radius-md);
  }

  .nav-dropdown-menu {
    position: static;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-subtle);
    display: none;
    margin-top: 4px;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: block;
  }

  /* Grids → single column */
  .products-grid {
    grid-template-columns: 1fr;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .audio-grid {
    grid-template-columns: 1fr;
  }

  .features-list {
    grid-template-columns: 1fr;
  }

  /* Product hero stack */
  .product-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .product-hero-image {
    order: -1;
  }

  .product-hero-image img {
    max-height: 260px;
  }

  /* GS sidebar */
  .gs-layout {
    grid-template-columns: 1fr;
  }

  .gs-sidebar {
    position: static;
    order: -1;
  }

  /* Footer stack */
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
  }

  /* Audio chain scrollable */
  .audio-chain {
    padding: 16px;
    gap: 4px;
  }

  /* Hero */
  .hero-content h1 {
    font-size: 2.8rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ── 480px ────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2.2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .product-badges {
    gap: 8px;
  }

  .product-page-nav {
    gap: 4px;
  }

  .btn-lg {
    padding: 14px 24px;
  }
}