/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #0d1b2a;
  --navy-mid:   #1a2d42;
  --navy-light: #243b55;
  --teal:       #1abc9c;
  --teal-dark:  #16a085;
  --teal-light: #48c9b0;
  --white:      #ffffff;
  --off-white:  #f4f7f9;
  --text:       #2c3e50;
  --text-muted: #5d6d7e;
  --border:     #dce3ea;
  --code-bg:    #1e2d3d;
  --radius:     8px;
  --shadow:     0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.14);
  --transition: 0.25s ease;

  /* Drum dimensions */
  --drum-item-h:  56px;   /* must match ITEM_H in drums.js */
  --drum-window:  56px;   /* one item visible */

  /* Mechanical casing palette */
  --drum-casing:     #1c2127;
  --drum-casing-hi:  #2c333c;
  --drum-border:     #3a4450;
  --drum-screw:      #4a5568;
  --drum-display:    #f5f0e8;   /* warm cream — like aged paper/ivory */
  --drum-text:       #1a1a1a;
  --drum-dim:        rgba(245,240,232,0.28);
  --drum-active-glow:rgba(26,188,156,0.55);
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
}

a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--teal); }

img { max-width: 100%; display: block; }

/* ===== LAYOUT ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 80px 0; }
section:nth-child(even) { background: var(--off-white); }

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 10px;
}

h2.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--navy);
  margin-bottom: 16px;
  line-height: 1.25;
}

.section-lead {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 48px;
}

/* ===== NAVIGATION ===== */
#navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.nav-logo .logo-accent { color: var(--teal); }
.nav-logo .logo-badge {
  font-size: 0.6rem;
  background: var(--teal);
  color: var(--navy);
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  align-self: flex-start;
  margin-top: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--teal); }

.nav-cta {
  background: var(--teal);
  color: var(--navy) !important;
  padding: 7px 18px;
  border-radius: 6px;
  font-weight: 700 !important;
  transition: background var(--transition) !important;
}

.nav-cta:hover { background: var(--teal-light) !important; color: var(--navy) !important; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== HERO ===== */
#hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 60%, #1a3a55 100%);
  color: var(--white);
  padding: 100px 0 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231abc9c' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}

.hero-inner { position: relative; }

.hero-badge {
  display: inline-block;
  border: 1px solid rgba(26,188,156,0.4);
  background: rgba(26,188,156,0.1);
  color: var(--teal-light);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

#hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.03em;
}

#hero h1 span { color: var(--teal); }

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,0.72);
  max-width: 640px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--teal);
  color: var(--navy);
  border-color: var(--teal);
}

.btn-primary:hover {
  background: var(--teal-light);
  border-color: var(--teal-light);
  color: var(--navy);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26,188,156,0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--white);
  color: var(--white);
  transform: translateY(-1px);
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat-item { text-align: center; }
.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--teal);
}
.stat-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ===== PROBLEM ===== */
#problem .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.problem-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1.02rem;
}

.problem-text strong { color: var(--navy); }

.comparison-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.comp-header {
  padding: 14px 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.comp-header.before { background: #fef3f2; color: #c0392b; }
.comp-header.after  { background: #eafaf1; color: #1a7a4a; }

.comp-body { padding: 16px 20px; }
.comp-body li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.92rem;
  margin-bottom: 10px;
  color: var(--text);
}
.comp-body li::before { flex-shrink: 0; margin-top: 2px; }
.comp-header.before + .comp-body li::before { content: '✗'; color: #e74c3c; }
.comp-header.after  + .comp-body li::before { content: '✓'; color: var(--teal); }

/* ===== HOW IT WORKS ===== */
#how-it-works { text-align: center; }

.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin: 0 auto 48px;
  max-width: 800px;
}

.flow-step {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  width: 180px;
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
}

.flow-step.highlight {
  border-color: var(--teal);
  background: linear-gradient(135deg, #eafaf5, #f0fdf8);
}

.flow-icon {
  font-size: 2rem;
  margin-bottom: 10px;
}

.flow-step h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}

.flow-step p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.flow-arrow {
  font-size: 1.4rem;
  color: var(--teal);
  padding: 0 6px;
  font-weight: 700;
}

.flow-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== FEATURES ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ===== ECOSYSTEM ===== */
#ecosystem .eco-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.eco-section h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--teal);
  display: inline-block;
}

.lang-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.lang-tile {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.lang-tile:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.lang-tile.coming-soon {
  opacity: 0.55;
  font-style: italic;
  cursor: default;
}

.lang-tile.coming-soon:hover {
  border-color: var(--border);
  color: var(--navy);
}

.lang-tile .lang-icon { font-size: 1.1rem; }

.eco-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}

.ecm-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ecm-badge {
  background: var(--navy);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.ecm-badge.others {
  background: var(--navy-mid);
  font-style: italic;
}

/* ===== CODE EXAMPLE ===== */
#code-example { background: var(--navy); color: var(--white); }

#code-example .section-label { color: var(--teal-light); }
#code-example h2.section-title { color: var(--white); }
#code-example .section-lead { color: rgba(255,255,255,0.6); }

.code-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 0;
  border-bottom: 2px solid rgba(255,255,255,0.1);
}

.code-tab {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  font-family: inherit;
}

.code-tab.active, .code-tab:hover {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

.code-panel {
  display: none;
  background: var(--code-bg);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.code-panel.active { display: block; }

.code-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.code-dots { display: flex; gap: 6px; }
.code-dots span {
  width: 12px; height: 12px;
  border-radius: 50%;
  display: block;
}
.code-dots .d1 { background: #ff5f57; }
.code-dots .d2 { background: #febc2e; }
.code-dots .d3 { background: #28c840; }

.code-filename {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  font-family: monospace;
}

pre {
  padding: 24px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.65;
}

code {
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  color: #abb2bf;
}

.kw  { color: #c678dd; }
.ty  { color: #e5c07b; }
.fn  { color: #61afef; }
.st  { color: #98c379; }
.cm  { color: #5c6370; font-style: italic; }
.nu  { color: #d19a66; }
.vr  { color: #e06c75; }

/* ===== SPECIFICATION ===== */
.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.spec-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.spec-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}

.spec-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.spec-layers {
  counter-reset: layer;
  list-style: none;
  margin-top: 12px;
}

.spec-layers li {
  counter-increment: layer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.spec-layers li:last-child { border-bottom: none; }

.spec-layers li::before {
  content: counter(layer);
  background: var(--teal);
  color: var(--navy);
  font-weight: 800;
  font-size: 0.72rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.spec-layers li strong { color: var(--navy); display: block; }
.spec-layers li span { color: var(--text-muted); font-size: 0.82rem; }

.version-tag {
  display: inline-block;
  background: var(--teal);
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
}

.license-info {
  margin-top: 16px;
  padding: 12px;
  background: #f0fdf8;
  border: 1px solid #a3e4d7;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #1a6b4a;
}

/* ===== GET INVOLVED ===== */
#get-involved { text-align: center; background: var(--off-white); }

.repo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 40px;
  text-align: left;
}

.repo-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.repo-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.repo-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.repo-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--navy);
  font-family: monospace;
}

.repo-lang {
  font-size: 0.72rem;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 2px 8px;
  color: var(--text-muted);
  font-weight: 600;
}

.repo-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 12px;
}

.repo-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal-dark);
  display: flex;
  align-items: center;
  gap: 4px;
}

.repo-link:hover { color: var(--teal); }

/* ===== CTA ===== */
#cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  text-align: center;
  padding: 80px 0;
}

#cta h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--white);
  margin-bottom: 12px;
}

#cta p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 32px;
}

/* ===== FOOTER ===== */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.5);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 700;
  color: var(--white);
  font-size: 1rem;
}

.footer-brand span { color: var(--teal); }

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--teal); }

.footer-copy { font-size: 0.8rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  section { padding: 60px 0; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--navy-mid);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  }

  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }

  #problem .grid-2 { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: 1fr; }
  #ecosystem .eco-grid { grid-template-columns: 1fr; gap: 32px; }

  .flow-diagram {
    flex-direction: column;
    align-items: center;
  }

  .flow-arrow {
    transform: rotate(90deg);
    padding: 4px 0;
  }

  .hero-stats { gap: 28px; }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* =============================================================
   DRUM DISPLAY — mechanical counter aesthetic
   ============================================================= */

/* ── Outer section ─────────────────────────────────────────── */
#drum-hero {
  background: linear-gradient(160deg, #0d1b2a 0%, #14253a 55%, #0f2035 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* subtle grid texture */
#drum-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,188,156,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,188,156,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.drum-hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal);
  margin-bottom: 14px;
  position: relative;
}

.drum-hero-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
  position: relative;
}

.drum-hero-title span { color: var(--teal); }

.drum-hero-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 40px;
  position: relative;
}

/* ── Sentence row ──────────────────────────────────────────── */
.drum-sentence {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
  margin-bottom: 40px;
}

.drum-connector {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.06em;
  text-transform: lowercase;
  flex-shrink: 0;
  user-select: none;
}

/* ── Individual drum ───────────────────────────────────────── */
.drum-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* The outer metal casing */
.drum-casing {
  background: linear-gradient(180deg, var(--drum-casing-hi) 0%, var(--drum-casing) 40%, #111518 100%);
  border: 1px solid var(--drum-border);
  border-radius: 6px;
  padding: 6px;
  box-shadow:
    0 2px 0 #0a0c0e,
    0 6px 20px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.07),
    inset 0 -1px 0 rgba(0,0,0,0.4);
  position: relative;
  transition: box-shadow 0.3s ease;
}

/* Rivet dots — top-left & top-right corners */
.drum-casing::before,
.drum-casing::after {
  content: '';
  position: absolute;
  top: 3px;
  width: 6px;
  height: 6px;
  background: radial-gradient(circle at 35% 35%, #5a6478, #2a3040);
  border-radius: 50%;
  border: 1px solid #1a1e26;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.15);
}
.drum-casing::before { left: 3px; }
.drum-casing::after  { right: 3px; }

/* Active glow when spinning */
.drum-casing.drum--active {
  box-shadow:
    0 2px 0 #0a0c0e,
    0 6px 24px rgba(0,0,0,0.6),
    0 0 0 2px var(--teal),
    0 0 18px var(--drum-active-glow),
    inset 0 1px 0 rgba(255,255,255,0.07);
}

/* The visible window — clip area */
.drum-window {
  width: 100%;
  height: var(--drum-window);
  overflow: hidden;
  position: relative;
  border-radius: 3px;
  background: var(--drum-display);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.35),
    inset 0 -2px 6px rgba(0,0,0,0.25);
}

/* Top & bottom gradient fade — simulates edges of the drum */
.drum-window::before,
.drum-window::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 14px;
  z-index: 2;
  pointer-events: none;
}

.drum-window::before {
  top: 0;
  background: linear-gradient(to bottom, rgba(230,224,212,0.95), transparent);
}

.drum-window::after {
  bottom: 0;
  background: linear-gradient(to top, rgba(230,224,212,0.95), transparent);
}

/* Horizontal rule at centre — removed */

/* The scrolling track */
.drum-track {
  display: flex;
  flex-direction: column;
  will-change: transform;
}

/* Each item in the drum */
.drum-item {
  height: var(--drum-item-h);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--drum-text);
  white-space: nowrap;
  user-select: none;
  letter-spacing: -0.01em;
}

/* Drum sizing per role */
#drum-op   .drum-window { width: 240px; }
#drum-ecm  .drum-window { width: 200px; }
#drum-lang .drum-window { width: 130px; }

/* Blur-on-spin: extra motion feel */
.drum-window.spinning .drum-track {
  /* JS Web Animations API handles this — kept as fallback */
}

/* ── Scroll-down hint ──────────────────────────────────────── */
.scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.25);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2.4s ease-in-out infinite;
}

.scroll-hint svg { opacity: 0.4; }

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ── Code snippet panel ────────────────────────────────────── */
.snippet-panel {
  width: 100%;
  max-width: 700px;
  background: var(--code-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
  position: relative;
  text-align: left;
}

.snippet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.snippet-dots { display: flex; gap: 6px; }
.snippet-dots span {
  width: 11px; height: 11px;
  border-radius: 50%;
  display: block;
}
.snippet-dots .sd1 { background: #ff5f57; }
.snippet-dots .sd2 { background: #febc2e; }
.snippet-dots .sd3 { background: #28c840; }

.snippet-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
}

.snippet-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.snippet-badge.lang { background: rgba(26,188,156,0.2); color: var(--teal-light); }
.snippet-badge.ecm  { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); }

.snippet-body {
  padding: 0;
  overflow-x: auto;
}

.snippet-body pre {
  padding: 20px 24px;
  font-size: 0.82rem;
  line-height: 1.7;
  margin: 0;
  min-height: 200px;
}

#snippet-code {
  font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
  color: #abb2bf;
  transition: opacity 0.25s ease;
}

/* ── Responsive drums ──────────────────────────────────────── */
@media (max-width: 680px) {
  .drum-sentence {
    gap: 8px;
  }

  #drum-op   .drum-window { width: 180px; }
  #drum-ecm  .drum-window { width: 155px; }
  #drum-lang .drum-window { width: 110px; }

  .drum-item { font-size: 0.9rem; padding: 0 12px; }

  .drum-connector { font-size: 0.82rem; }
}

@media (max-width: 480px) {
  .drum-sentence {
    flex-direction: column;
    gap: 6px;
  }

  .drum-connector { display: none; }

  #drum-op   .drum-window,
  #drum-ecm  .drum-window,
  #drum-lang .drum-window { width: 220px; }
}

/* ── Accessibility: no motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .drum-track   { transition: none !important; }
  .scroll-hint  { animation: none; }
}

