/* Fretboard Theory site styles.
 * Vanilla CSS, no dependencies. Light/dark via CSS custom properties:
 * :root holds light tokens, [data-theme="dark"] overrides, and an inline
 * script in index.html resolves system preference + localStorage before
 * first paint. Tokens echo the app's neutral surfaces; the note colors
 * (root red, chord green) are the brand.
 */

/* ---------- tokens ---------- */

:root {
  --bg-0: #f7f5f3;
  --bg-1: #ffffff;
  --bg-2: #eeeae7;
  --bg-inset: #100d0d;      /* always-dark app frames */
  --text-0: #1c1717;
  --text-1: #4a4242;
  --text-2: #8d8481;
  --stroke: #e4dedb;
  --stroke-strong: #cec6c2;
  --accent: #b3262c;
  --accent-strong: #8f1e23;
  --accent-soft: rgba(179, 38, 44, 0.08);
  --root: #e5484d;
  --chord: #2ec27e;
  --shadow-1: 0 1px 2px rgba(16, 20, 29, 0.05), 0 8px 24px -12px rgba(16, 20, 29, 0.18);
  --shadow-2: 0 2px 6px rgba(16, 20, 29, 0.07), 0 24px 48px -24px rgba(16, 20, 29, 0.25);
  --radius: 12px;
  --radius-lg: 18px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1080px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg-0: #100d0d;
  --bg-1: #181414;
  --bg-2: #201a1a;
  --bg-inset: #100d0d;
  --text-0: #ede9e7;
  --text-1: #b5aca8;
  --text-2: #7a716d;
  --stroke: #2b2323;
  --stroke-strong: #3c3131;
  --accent: #e5484d;
  --accent-strong: #f0686c;
  --accent-soft: rgba(229, 72, 77, 0.1);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, 0.45), 0 24px 48px -24px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* ---------- base ---------- */

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font: 16px/1.6 var(--font-sans);
  background: var(--bg-0);
  color: var(--text-0);
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s ease, color 0.25s ease;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

code { font-family: var(--font-mono); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }

.kicker {
  font: 700 12px/1 var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}

h1 {
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 750;
}
h2 {
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.lede {
  font-size: clamp(17px, 2vw, 19px);
  color: var(--text-1);
  max-width: 620px;
  margin-top: 18px;
}

kbd {
  font: 600 11px var(--font-mono);
  padding: 2px 6px;
  border: 1px solid var(--stroke-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg-2);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 15px/1 var(--font-sans);
  padding: 13px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-1);
}
.btn-primary:hover { background: var(--accent-strong); color: #fff; transform: translateY(-1px); }
.btn-ghost {
  background: var(--bg-1);
  color: var(--text-0);
  border-color: var(--stroke-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-small { padding: 9px 16px; font-size: 13.5px; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg-0) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--stroke);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 62px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 700 17px var(--font-sans);
  letter-spacing: -0.01em;
  color: var(--text-0);
}
.brand-mark { width: 22px; height: 22px; display: block; flex: 0 0 auto; border-radius: 6px; }
.nav-links {
  display: flex;
  gap: 22px;
  font-size: 14px;
  font-weight: 550;
}
.nav-links a { color: var(--text-1); }
.nav-links a:hover { color: var(--text-0); }
.nav-spacer { flex: 1; }

.theme-toggle {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid var(--stroke);
  background: var(--bg-1);
  color: var(--text-1);
  font-size: 15px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- hero ---------- */

.hero { padding: 96px 0 72px; }
.hero-solo {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}
.hero-solo .hero-badges,
.hero-solo .hero-ctas { justify-content: center; }
.hero-solo .lede { margin-left: auto; margin-right: auto; }
.hero-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.pill {
  font: 600 12px/1 var(--font-mono);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--bg-1);
  color: var(--text-2);
}
.pill.accent {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: var(--accent-soft);
}
.hero-ctas { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--text-2); }

/* The legend IS the product: three dots. */
.dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  vertical-align: -1px;
}
.dot-root { background: var(--root); }
.dot-scale { background: var(--text-0); }
.dot-chord { background: var(--chord); }

/* ---------- sections ---------- */

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.centered {
  max-width: none;
  text-align: center;
}
.section-head.centered .lede { margin-left: auto; margin-right: auto; }

/* ---------- media slots ---------- */

.media-slot {
  position: relative;
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  background: var(--bg-inset);
  overflow: hidden;
  box-shadow: var(--shadow-2);
}
.media-slot.ar-app { aspect-ratio: 16 / 10; }
.media-slot > img, .media-slot > iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
}
/* App screenshots are flat dark rectangles; frame them lightly. */
.media-slot.is-shot { box-shadow: var(--shadow-1); }
.media-slot.is-shot > img { height: auto; }
.media-caption {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-2);
  text-align: center;
}

/* ---------- live embed ---------- */

#live-embed { padding: 0; }
#live-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* inert until armed, no scroll trap */
}
#live-embed.is-armed iframe { pointer-events: auto; }
.live-gate {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: rgba(8, 10, 16, 0.25);
  border: 0;
  color: #fff;
  font: 600 16px var(--font-sans);
  cursor: pointer;
  transition: background 0.15s ease;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.live-gate:hover { background: rgba(8, 10, 16, 0.12); }
.live-gate-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--root);
  box-shadow: 0 0 12px var(--root);
  animation: livepulse 2s ease-in-out infinite;
}
@keyframes livepulse { 50% { opacity: 0.4; } }

/* ---------- alternating value rows ---------- */

.flow-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  align-items: center;
}
.flow-row + .flow-row { margin-top: 72px; }
.flow-row.flip { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.flow-row.flip .flow-copy { order: 2; }
.flow-copy h3 { font-size: clamp(20px, 2.4vw, 26px); letter-spacing: -0.015em; margin-bottom: 10px; font-weight: 650; }
.flow-copy p { color: var(--text-1); font-size: 15.5px; max-width: 440px; }
.flow-copy .kicker { margin-bottom: 10px; }

/* ---------- plans (web vs apps) ---------- */

#apps { scroll-margin-top: 62px; }

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.plan {
  background: var(--bg-1);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  padding: 34px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-1);
}
.plan.featured {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--stroke));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent), var(--shadow-2);
  position: relative;
}
.plan-tag {
  position: absolute;
  top: -12px;
  left: 30px;
  font: 700 11px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
}
.plan-name { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; }
.plan-price { font-size: 15px; color: var(--text-1); }
.plan-price strong { color: var(--text-0); font-size: 17px; }
.plan-platforms {
  margin-top: 8px;
  font: 600 12px var(--font-mono);
  color: var(--text-2);
}
.plan-avail {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.avail-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 600 12px var(--font-mono);
  color: var(--text-2);
}
.avail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.avail-dot.now {
  background: var(--chord);
  box-shadow: 0 0 8px -1px var(--chord);
}
.avail-dot.soon {
  background: transparent;
  border: 1.5px solid var(--text-2);
}
.plan-promise {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-0);
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--stroke));
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.plan ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-1);
}
.plan li { padding-left: 26px; position: relative; }
.plan li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--chord);
  font-weight: 700;
}
.plan-cta { margin-top: auto; padding-top: 8px; }
.plan-cta .btn { width: 100%; justify-content: center; }
.plan-fineprint { font-size: 12.5px; color: var(--text-2); }

/* ---------- final cta ---------- */

.cta-panel {
  background: linear-gradient(135deg, var(--accent-soft), transparent 60%), var(--bg-1);
  border: 1px solid var(--stroke);
  border-radius: 22px;
  padding: 56px;
  text-align: center;
  box-shadow: var(--shadow-1);
}
.cta-panel .lede { margin: 14px auto 0; }
.cta-panel .hero-ctas { justify-content: center; }
.cta-panel .hero-note { margin-top: 20px; }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--stroke);
  padding: 36px 0 48px;
  font-size: 13.5px;
  color: var(--text-2);
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-inner .spacer { flex: 1; }
.footer-inner a { color: var(--text-2); }
.footer-inner a:hover { color: var(--text-0); }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  section { padding: 64px 0; }
  .hero { padding: 64px 0 48px; }
  .flow-row, .flow-row.flip { grid-template-columns: 1fr; gap: 22px; }
  .flow-row.flip .flow-copy { order: 0; }
  .flow-row + .flow-row { margin-top: 56px; }
  .plans { grid-template-columns: 1fr; }
  .nav-inner { gap: 16px; }
  .nav-links { gap: 13px; font-size: 13.5px; }
  .cta-panel { padding: 36px 24px; }
}
@media (max-width: 640px) {
  .nav-cta { display: none; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-inner .spacer { display: none; }
  .hero-ctas .btn { flex: 1 1 auto; justify-content: center; }
  /* The embedded app needs real estate on a phone; let it go taller. */
  .media-slot.ar-app { aspect-ratio: 4 / 5; }
}

/* footer legal line */
.footer-legal {
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-2);
}
