:root {
  /* ── Colors (unchanged) ─────────────────────────── */
  --font-body: "JetBrains Mono", ui-monospace, system-ui, sans-serif;
  --font-display: "Share Tech Mono", "JetBrains Mono", monospace;
  --bg-void: #030806;
  --bg-panel: rgba(4, 18, 12, 0.78);
  --text: #d4f0e4;
  --text-muted: rgba(180, 230, 210, 0.55);
  --line: rgba(0, 255, 170, 0.12);
  --glow: rgba(0, 255, 180, 0.22);

  /* ── Vertical rhythm (adjust to re-scale all spacing) ── */
  --space-xs: 8px;
  --space-sm: 14px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 64px;
  --space-2xl: 96px;

  /* ── Section depth ─────────────────────────────── */
  --section-bg-alt: rgba(0, 12, 8, 0.35);
  --section-border: rgba(0, 255, 170, 0.08);
  --section-border-hover: rgba(0, 255, 200, 0.22);

  /* ── Hero ──────────────────────────────────────── */
  --hero-bottom-padding: 0;

  /* ── Player shell outer margins ────────────────── */
  --player-margin-top: var(--space-lg);
  --player-margin-bottom: var(--space-2xl);

  /* ── Link grid ─────────────────────────────────── */
  --link-grid-gap: 16px;
  --tile-padding-y: 24px;
  --tile-padding-x: 24px;
  --tile-icon-size: 20px;
  --tile-icon-color: rgba(0, 255, 170, 0.35);

  /* ── Footer / newsletter ───────────────────────── */
  --footer-newsletter-padding: var(--space-xl) 24px;
  --footer-bottom-padding: var(--space-lg) 24px;
  --footer-kofi-color: rgba(0, 255, 170, 0.3);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.site-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-void);
}

.matrix-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

#matrix-canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

.site-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.55) 100%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 40, 30, 0.08) 2px,
      rgba(0, 40, 30, 0.08) 3px
    );
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  background: #0a1a12;
  color: #8fffd0;
  border: 1px solid var(--line);
  text-decoration: none;
}

.skip-link:focus {
  left: 8px;
}

.site-main {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-xl) 24px var(--space-2xl);
}

.site-main--wide {
  max-width: 1080px;
}

/* ── Section separation via subtle background bands ── */
.site-main > section,
.site-main > .studio-intro {
  margin-bottom: var(--space-lg);
}

.site-main > section:last-child {
  margin-bottom: 0;
}

.site-footer {
  position: relative;
  z-index: 2;
}

/* Newsletter section — prominent, centered */
.footer-newsletter {
  padding: var(--footer-newsletter-padding);
  text-align: center;
  border-top: 1px solid var(--section-border);
  background: var(--section-bg-alt);
}

.footer-newsletter .newsletter-title {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c8ffe8;
  margin: 0 0 var(--space-sm);
}

.footer-newsletter .newsletter-desc {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 36em;
  margin: 0 auto var(--space-md);
  line-height: 1.6;
}

.footer-newsletter .growth-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 440px;
  margin: 0 auto var(--space-sm);
}

/* Bottom bar — tagline + Ko-fi */
.footer-bottom {
  padding: var(--footer-bottom-padding);
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--footer-kofi-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-bottom a:hover {
  color: #8fffd0;
  text-decoration: underline;
}

/* Divider between newsletter and bottom bar */
.footer-divider {
  height: 1px;
  background: var(--section-border);
  margin: 0;
  border: none;
}

.hero {
  padding-bottom: var(--hero-bottom-padding);
  margin-bottom: 0;
  border-bottom: 1px solid var(--section-border);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e8fff4;
  text-shadow: 0 0 24px var(--glow);
  margin: 0 0 var(--space-lg);
  text-align: center;
}

.hero .tagline {
  margin: 0 auto;
  font-size: 15px;
  color: var(--text-muted);
  max-width: 48em;
  line-height: 1.7;
  text-align: center;
}

/* ── Hide redundant context panel — titlebar already says "binaural studio" ── */
#beats {
  display: none;
}

/* Player gets generous vertical spacing */
.player-shell {
  margin-top: var(--player-margin-top);
  margin-bottom: var(--player-margin-bottom);
}

.link-grid {
  display: grid;
  gap: var(--link-grid-gap);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.tile-link {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: var(--tile-padding-y) var(--tile-padding-x);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-decoration: none;
  color: #c8ffe8;
  background: rgba(0, 25, 18, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.tile-link:hover {
  border-color: var(--section-border-hover);
  box-shadow: 0 0 24px rgba(0, 255, 180, 0.06);
  background: rgba(0, 35, 24, 0.45);
}

.tile-link strong {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: #e0fff0;
}

.tile-link span {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list li {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.article-list li:last-child {
  border-bottom: 0;
}

.article-list a {
  color: #b4ffd8;
  text-decoration: none;
  font-size: 16px;
}

.article-list a:hover {
  text-decoration: underline;
}

.article-meta {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.prose {
  max-width: 52em;
}

.prose h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #e8fff4;
  margin: 0 0 8px;
}

.prose .byline {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.panel.prose > h2 + .muted {
  margin-top: 0;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9fffd8;
  margin: 28px 0 12px;
  font-weight: 400;
}

.prose p {
  margin: 0 0 14px;
  color: rgba(220, 245, 232, 0.9);
}

/* ── Studio intro — centered heading + description above player ───── */
.studio-intro {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.studio-intro h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: #c8ffe8;
  margin: 0 0 var(--space-sm);
}

.studio-intro .muted {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 42em;
  margin: 0 auto;
}

/* ── Player shell outer margins (legacy, now unused) ── */

.video-grid {
  display: grid;
  gap: 20px;
}

.video-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(0, 12, 8, 0.6);
}

.video-card h3 {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
  padding: 12px 14px;
  color: #c8ffe8;
}

.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-embed--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 16px;
}

.video-note {
  padding: 10px 14px 14px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.form-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.text-input,
.text-area {
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: rgba(0, 8, 6, 0.85);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.text-area {
  min-height: 120px;
  resize: vertical;
}

.btn {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-radius: 4px;
  border: 1px solid rgba(0, 255, 160, 0.35);
  background: rgba(0, 60, 40, 0.5);
  color: #c8ffe8;
  cursor: pointer;
}

.btn:hover {
  background: rgba(0, 80, 55, 0.55);
}

.btn-danger {
  border-color: rgba(255, 100, 100, 0.4);
  color: #ffb4b4;
  background: rgba(40, 10, 10, 0.4);
}

.muted {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.text-center {
  text-align: center;
  margin: 0;
}

/* ── Mobile: stack hero + player vertically ─────── */
@media (max-width: 768px) {
  .site-main {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ── Binaural Studio nav bar (extracted from binaural-studio.html inline style) ── */

.studio-nav {
  position: relative;
  z-index: 3;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-md) 24px var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--section-border);
}

.studio-nav__brand {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c8ffe8;
  text-decoration: none;
}

.studio-nav__brand:hover {
  color: #8fffd0;
}

.studio-nav__links {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

.studio-nav__links a {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.studio-nav__links a:hover,
.studio-nav__links a.active {
  color: #8fffd0;
}

@media (max-width: 768px) {
  .studio-nav {
    flex-direction: column;
    gap: var(--space-sm);
    padding-left: 16px;
    padding-right: 16px;
  }

  .studio-nav__links {
    gap: var(--space-sm);
  }
}
