/* DiscTrack website. Serif display, mono labels, square geometry.
   One green. Tonal surfaces. Type does the work. No gradients, no glow. */

:root {
  --bg: #0e1512;
  --surface: #16211c;
  --border: #26372e;
  --text: #e9f1ec;
  --muted: #9db3a6;
  --accent: #4ade80;
  --accent-ink: #06281a;
  --gutter: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  --display: "Bricolage Grotesque", Georgia, "Palatino Linotype", "Book Antiqua", serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

[data-theme="light"] {
  --bg: #f5f8f6;
  --surface: #ffffff;
  --border: #d8e2da;
  --text: #12211a;
  --muted: #57705f;
  --accent: #14663a;
  --accent-ink: #f2fbf5;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.12; margin: 0 0 12px; }
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: 0; }
h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.1rem; font-weight: 650; }

p { margin: 0 0 12px; }
a { color: var(--accent); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 8px 16px; z-index: 100;
}
.skip:focus { left: 0; }

.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 12px; }
.sec-head h2, .sec-head h1 { margin: 0; }
.sec-no {
  font-family: var(--mono);
  color: var(--accent); font-size: 0.85rem; font-weight: 600; flex: none;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.site-header.scrolled { border-bottom-color: var(--accent); }

.header-inner {
  display: flex; align-items: center; gap: 16px;
  min-height: 64px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1.35rem;
}
.brand-mark { width: 28px; height: 28px; color: var(--accent); flex: none; }

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem;
  padding: 10px 14px; min-height: 48px;
  display: inline-flex; align-items: center;
}
.site-nav a:hover { color: var(--text); background: var(--surface); }
.site-nav a.active { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.icon-btn {
  width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border);
  color: var(--text); cursor: pointer; border-radius: 0;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 22px; height: 22px; }
.menu-btn { display: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 28px; border-radius: 0;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { opacity: 0.92; }
.btn-primary.disabled, .btn-primary[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-secondary {
  background: transparent; color: var(--text); border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent); }
.btn-block { width: 100%; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px;
  align-items: center; padding-top: 72px; padding-bottom: 72px;
}
.hero-rule {
  width: 56px; height: 3px; background: var(--accent); margin-bottom: 20px;
}
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34rem; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin: 24px 0; }
.hero-meta {
  list-style: none; display: flex; gap: 8px; flex-wrap: wrap;
  margin: 0; padding: 0;
}
.hero-meta li {
  border: 1px solid var(--border);
  padding: 6px 14px; font-size: 0.85rem; font-weight: 600; color: var(--muted);
}

/* phone mockup */
.hero-visual { display: flex; justify-content: center; }
.phone {
  width: min(320px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 20px 16px 16px;
}
.phone-notch {
  width: 110px; height: 8px; background: var(--border);
  margin: 0 auto 16px;
}
.phone-title { font-family: var(--display); font-weight: 700; font-size: 1.4rem; margin-bottom: 12px; }
.mock-label {
  text-transform: uppercase; font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.1em; color: var(--muted);
  display: block; margin: 14px 0 8px;
}
.mock-row { display: flex; gap: 12px; align-items: center; padding: 10px 0; }
.mock-row + .mock-row { border-top: 1px solid var(--border); }
.mock-art {
  width: 52px; height: 52px; flex: none;
  background: var(--accent); color: var(--accent-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 1.3rem;
}
.mock-row-main { flex: 1; min-width: 0; display: block; }
.mock-artist-sm { font-weight: 650; font-size: 0.92rem; display: block; }
.mock-status { font-size: 0.78rem; color: var(--muted); display: flex; align-items: center; gap: 6px; margin: 2px 0 6px; }
.dot { width: 8px; height: 8px; display: inline-block; flex: none; }
.dot-exploring { background: var(--accent); }
.dot-unlistened { background: var(--muted); }
.dot-completed { background: var(--accent); }
.mock-pct { font-family: var(--mono); font-size: 0.74rem; color: var(--muted); display: block; margin-top: 4px; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-sub { color: var(--muted); max-width: 44rem; font-size: 1.05rem; }
.page-head { padding: 64px 0 8px; }
.page-head .lede { margin-bottom: 0; }

/* loop timeline: a plain ruled spine, always drawn */
.steps {
  list-style: none; margin: 32px 0 0; padding: 0;
  max-width: 46rem; position: relative;
}
.steps::before {
  content: ""; position: absolute;
  left: 17px; top: 14px; bottom: 14px; width: 2px;
  background: var(--border);
}
.steps li { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 16px; padding-bottom: 28px; }
.steps li:last-child { padding-bottom: 0; }
.step-n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--bg); border: 2px solid var(--accent); color: var(--accent);
  font-family: var(--display); font-weight: 700; position: relative; z-index: 1;
}
.steps h3 { margin-bottom: 4px; }
.steps p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ledger: supporting features as ruled rows, not cards */
.ledger { margin-top: 32px; border-bottom: 1px solid var(--border); max-width: 56rem; }
.ledger-row {
  display: grid; grid-template-columns: 14rem 1fr; gap: 24px;
  padding: 20px 0; border-top: 1px solid var(--border);
}
.ledger-row h3 { margin: 0; }
.ledger-row p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* lifecycle */
.lifecycle {
  display: flex; align-items: stretch; gap: 0; margin-top: 32px;
  border: 1px solid var(--border);
}
.lc-node { flex: 1; padding: 24px; background: var(--surface); }
.lc-node + .lc-node { border-left: 1px solid var(--border); }
.lc-node h3 { margin: 12px 0 6px; font-family: var(--display); }
.lc-node p { color: var(--muted); font-size: 0.95rem; margin: 0; }
.lc-node .dot { width: 12px; height: 12px; }
.lc-arrow { align-self: center; color: var(--accent); font-weight: 800; font-size: 1.2rem; flex: none; padding: 0 4px; background: var(--surface); }

/* CTA band */
.cta-band { border-top: 1px solid var(--border); padding: 64px 0; }
.cta-band-inner { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { margin: 0; flex: 1; min-width: 16rem; }

/* download */
.download-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.dl-steps { margin: 24px 0 0; padding-left: 20px; color: var(--muted); }
.dl-steps li { margin-bottom: 8px; }
.dl-card {
  background: var(--bg); border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 24px;
  position: sticky; top: 88px;
}
.section-alt .dl-card { background: var(--surface); }
.dl-card-top { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; }
.dl-name { font-weight: 750; margin: 0; }
.dl-meta { color: var(--muted); font-size: 0.9rem; margin: 0; }
.dl-status {
  font-size: 0.9rem; font-weight: 600; color: var(--muted);
  border-top: 1px solid var(--border); padding-top: 12px;
}
.dl-status.ok { color: var(--accent); }
.dl-card .btn { margin: 12px 0; }
.dl-note { font-size: 0.85rem; color: var(--muted); margin: 0; }

/* faq */
.faq-list { margin-top: 32px; max-width: 46rem; }
.faq-list details {
  border: 1px solid var(--border); padding: 4px 20px; margin-bottom: 12px; background: var(--surface);
}
.faq-list summary {
  cursor: pointer; font-weight: 650; padding: 14px 0; min-height: 48px;
  display: flex; align-items: center;
}
.faq-list summary::marker { color: var(--accent); }
.faq-list details p { color: var(--muted); }

/* footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer-inner { display: flex; flex-direction: column; gap: 8px; }
.footer-tag { color: var(--muted); margin: 0; font-family: var(--display); font-style: italic; }
.footer-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.footer-nav a {
  color: var(--muted); text-decoration: none; font-weight: 600;
  padding: 10px 12px; min-height: 48px; display: inline-flex; align-items: center;
}
.footer-nav a:hover { color: var(--text); }
.footer-fine { color: var(--muted); font-size: 0.85rem; margin: 8px 0 0; }

/* visible keyboard focus everywhere */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- responsive: deliberate compositions, not shrinks ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 48px; }
  .download-grid { grid-template-columns: 1fr; }
  .dl-card { position: static; }
  .lifecycle { flex-direction: column; }
  .lc-node + .lc-node { border-left: none; border-top: 1px solid var(--border); }
  .lc-arrow { transform: rotate(90deg); align-self: center; padding: 4px 0; }
}

@media (max-width: 720px) {
  .menu-btn { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px; margin: 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a { min-height: 48px; }
  .site-nav a.active { box-shadow: inset 3px 0 0 var(--accent); }
  .header-actions { margin-left: auto; }
  .section { padding: 48px 0; }
  .cta-band-inner { flex-direction: column; align-items: stretch; }
  .ledger-row { grid-template-columns: 1fr; gap: 4px; }
  .mechanic { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; }
}
