/* ==========================================================================
   Music Theory Decoder — marketing site
   Brand: CODE lunatics. Colors: yellow #FFD600, near-black #111111.
   Fonts: Bebas Neue (display) + DM Sans (body).
   ========================================================================== */

:root {
  --yellow: #FFD600;
  --yellow-dark: #E6BE00;
  --black: #111111;
  --ink: #1a1a1a;
  --card: #1c1c1c;
  --card-border: #2a2a2a;
  --gray: #333;
  --muted: #8a8a8a;
  --text: #f4f4f4;
  --text-dim: #c7c7c7;
  --max: 1120px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--black);
  color: var(--text);
  font-family: 'DM Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* -------- Layout helpers -------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 80px 0; border-top: 1px solid #1e1e1e; }
section:first-of-type { border-top: 0; }

/* -------- Typography -------- */
h1, h2, h3, h4 {
  font-family: 'Bebas Neue', 'DM Sans', sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--text);
  font-weight: 400;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  margin-bottom: 20px;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 16px;
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-bottom: 10px;
}

p { color: var(--text-dim); max-width: 72ch; }
p + p { margin-top: 14px; }

a {
  color: var(--yellow);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover, a:focus-visible { color: var(--yellow-dark); text-decoration: underline; }

strong { color: var(--text); font-weight: 700; }

.eyebrow {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 12px;
}

.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-dim); max-width: 58ch; }

/* -------- Header / nav -------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid #1e1e1e;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand:hover, .brand:focus-visible { text-decoration: none; }
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
}
.brand-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 20px;
  letter-spacing: 2.5px;
  color: var(--yellow);
}

.nav-list {
  display: flex;
  gap: 24px;
  list-style: none;
  align-items: center;
}
.nav-list a {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.nav-list a:hover, .nav-list a:focus-visible { color: var(--yellow); text-decoration: none; }

.nav-list .nav-cta {
  background: var(--yellow);
  color: var(--black);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
}
.nav-list .nav-cta:hover { background: var(--yellow-dark); color: var(--black); }

@media (max-width: 720px) {
  .nav-list { gap: 14px; }
  .nav-list li:not(:last-child):not(:first-child) { display: none; }
}

/* -------- Hero -------- */
.hero {
  padding: 72px 0 88px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-visual { margin: 0 auto; max-width: 280px; }
}

.hero h1 span { color: var(--yellow); }

.hero-ctas {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary {
  background: var(--yellow);
  color: var(--black);
}
.btn-primary:hover { background: var(--yellow-dark); color: var(--black); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: #3a3a3a;
}
.btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }

.hero-badges {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.4px;
}
.hero-badges span::before {
  content: "●";
  color: var(--yellow);
  margin-right: 8px;
  font-size: 10px;
  vertical-align: middle;
}

/* -------- Hero SVG visual (Circle of Fifths preview) -------- */
.hero-visual {
  position: relative;
  max-width: 400px;
  max-height: 660px;
  margin-left: auto;
  align-self: center;
  width: 100%;
}
.hero-visual svg,
.hero-visual img { width: 100%; height: 100%; display: block; object-fit: contain; }

/* -------- Feature grid -------- */
.section-head { text-align: center; margin-bottom: 56px; }
.section-head p { margin: 0 auto; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.feature-card:hover {
  border-color: #3d3d3d;
  transform: translateY(-2px);
}
.feature-card h3 { color: var(--yellow); margin-bottom: 12px; }
.feature-card p { color: var(--text-dim); font-size: 15px; }
.feature-card .stat {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  color: var(--yellow);
  line-height: 1;
  margin-bottom: 14px;
  letter-spacing: 1px;
}

/* -------- Tools grid -------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}
.tool-item {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 22px 22px 24px;
  position: relative;
}
.tool-item h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.3rem;
  margin-bottom: 8px;
}
.tool-item .tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--black);
  background: var(--yellow);
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
}
.tool-item p { font-size: 15px; }

/* -------- Theory list -------- */
.theory-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 820px) {
  .theory-wrap { grid-template-columns: 1fr; }
}
.theory-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}
.theory-list li {
  padding: 10px 0;
  border-bottom: 1px solid #232323;
  font-size: 15px;
  color: var(--text-dim);
}
.theory-list li::before {
  content: "→";
  color: var(--yellow);
  margin-right: 10px;
  font-weight: 700;
}

/* -------- Why section -------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.why-item {
  padding: 24px;
  background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
}
.why-item h3 { color: var(--yellow); font-size: 1.3rem; margin-bottom: 10px; }
.why-item p { font-size: 15px; }

/* -------- FAQ -------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid #232323;
  padding: 0;
}
.faq-item[open] summary { color: var(--yellow); }
.faq-item summary {
  padding: 20px 40px 20px 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.35rem;
  letter-spacing: 1px;
  list-style: none;
  cursor: pointer;
  position: relative;
  color: var(--text);
  transition: color 0.2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  font-family: 'DM Sans', sans-serif;
  color: var(--yellow);
  font-weight: 400;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .answer {
  padding: 0 0 22px;
}
.faq-item .answer p { color: var(--text-dim); font-size: 16px; }
.faq-item .answer p + p { margin-top: 12px; }

/* -------- About -------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 820px) {
  .about-grid { grid-template-columns: 1fr; }
}
.about-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.about-card h3 { color: var(--yellow); margin-bottom: 14px; }
.about-card ul { list-style: none; margin-top: 18px; }
.about-card ul li { padding: 6px 0; color: var(--text-dim); }
.about-card ul li strong { color: var(--text); margin-right: 6px; }

/* -------- Download CTA -------- */
.download {
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(255, 214, 0, 0.08) 0%, transparent 60%);
}
.download h2 { margin-bottom: 16px; }
.download .lede { margin: 0 auto 28px; }
.store-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-dim);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  letter-spacing: 0.3px;
  cursor: not-allowed;
  opacity: 0.85;
}
.store-btn small {
  display: block;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.store-btn strong { color: var(--text); font-weight: 700; font-size: 15px; }
.store-btn.live { cursor: pointer; opacity: 1; }
.store-btn.live:hover { border-color: var(--yellow); color: var(--text); }

/* -------- Footer -------- */
.site-footer {
  padding: 48px 0 32px;
  border-top: 1px solid #1e1e1e;
  color: var(--muted);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-col h4 {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
  font-weight: 700;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: var(--text-dim); }
.footer-col a:hover { color: var(--yellow); text-decoration: none; }

.footer-bottom {
  border-top: 1px solid #1e1e1e;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { color: var(--muted); font-size: 13px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* -------- Scroll-into-view anchor offset for sticky header -------- */
section[id] { scroll-margin-top: 76px; }

/* -------- Reduced motion -------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover, .feature-card:hover { transform: none; }
}
