/* Good Loops - global design language
   Shell is neutral and shared; each product sets a "skin" (body.skin-<name>) that only
   overrides the --accent / --surface variables. Palette sampled from the Guitar Kitchen box art. */

/* Theme tokens. Dark is the default; the switch in the header sets data-theme="light" on <html>
   (stored in localStorage, applied by an inline script in <head> before first paint). */
:root {
  color-scheme: dark;
  /* fixed brand colours */
  --ink: #1a181b;          /* logo black */
  --kraft: #cdb790;        /* packaging kraft */
  --red: #a33f29;          /* brick red */
  --sage: #6f8260;

  /* theme tokens (dark) */
  --bg: #141213;
  --text: #ece6da;
  --muted: #b5ab9a;
  --card: #1f1c1d;
  --header-bg: #191718;
  --panel: #272324;
  --line: #3a3536;
  --rule: #5a4f3d;
  --hero-bg: #221d1b;
  --surface: #2a2320;
  --footer-bg: #0d0b0c;
  --chip: rgba(255, 255, 255, .09);
  --accent: #e0775b;
  --accent-dark: #f09578;
  --on-accent: #1a181b;

  --font-body: Georgia, "Times New Roman", Times, serif;
  --font-ui: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;

  --measure: 42rem;
  --wide: 66rem;
  --radius: 6px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fbf8f2;
  --text: #1a181b;
  --muted: #5f574b;
  --card: #fff;
  --header-bg: #fff;
  --panel: #f3ecdf;
  --line: #ded2bb;
  --rule: #cdb790;
  --hero-bg: #e6d8bd;
  --surface: #e6d8bd;
  --footer-bg: #1a181b;
  --chip: rgba(255, 255, 255, .65);
  --accent: #a33f29;
  --accent-dark: #7f2d1b;
  --on-accent: #fff;
}

/* product skins: a skin overrides accent/surface per theme. Guitar Kitchen uses the defaults
   (brick red on kraft). Example for a new product:
   :root .skin-arpconductor { --accent: ...; }  :root[data-theme="light"] .skin-arpconductor { --accent: ...; } */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 1.125rem/1.65 var(--font-body);
}
img, iframe, video { max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 0; }

.wrap { width: min(100% - 2rem, var(--wide)); margin-inline: auto; }

/* ---------- header ---------- */
.site-header { background: var(--header-bg); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2rem; padding-block: .9rem; }
.brand { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--text); }
.brand img { width: 3.25rem; height: 3.25rem; border-radius: 50%; display: block; }
.brand-name { font: 700 1.25rem/1.1 var(--font-ui); letter-spacing: .04em; text-transform: uppercase; }
.brand-tag { display: block; font: 400 .8rem/1.3 var(--font-ui); letter-spacing: .02em; color: var(--muted); text-transform: none; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav a { font: 600 .85rem/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; color: var(--text); padding: .5rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); color: var(--text); }

/* ---------- main / prose ---------- */
main { padding-block: 2.5rem 4rem; }
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.1em; }
h1, h2, h3, h4 { font-family: var(--font-ui); line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 .6em; }
h2 { font-size: 1.5rem; margin: 2.2em 0 .5em; padding-top: .9rem; border-top: 1px dotted var(--rule); }
h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
h3 { font-size: 1.15rem; margin: 1.8em 0 .3em; }
.prose img { display: block; border-radius: var(--radius); }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: .35em; }
.prose hr { border: 0; border-top: 1px dotted var(--rule); margin: 2rem 0; }
.prose blockquote { margin-inline: 0; padding-left: 1rem; border-left: 4px solid var(--rule); color: var(--muted); }
.prose code { font-size: .9em; background: var(--panel); padding: .1em .35em; border-radius: 3px; }
.prose table { border-collapse: collapse; width: 100%; font: .95rem/1.4 var(--font-ui); }
.prose th, .prose td { text-align: left; padding: .5rem .7rem; border-bottom: 1px solid var(--line); }
.prose thead th { border-bottom: 2px solid var(--rule); }
.prose details { border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem 1rem; background: var(--card); }
.prose summary { cursor: pointer; font: 600 1rem var(--font-ui); }
.prose details[open] summary { margin-bottom: .6rem; }
.prose .table-wrap { overflow-x: auto; }

/* embeds from components: click-to-load poster, then iframe */
.video { aspect-ratio: 16 / 9; width: 100%; background: var(--footer-bg); border-radius: var(--radius); overflow: hidden; }
.video.audio-embed { aspect-ratio: auto; min-height: 9rem; }
.video iframe { width: 100%; height: 100%; min-height: 9rem; border: 0; display: block; }
.video.audio-embed.is-loaded { min-height: 22rem; }
.video-poster { display: grid; place-content: center; justify-items: center; gap: .5rem; width: 100%; height: 100%; min-height: inherit;
  padding: 1.5rem; text-align: center; text-decoration: none; color: #fff;
  background: radial-gradient(circle at 50% 40%, #3a3436 0%, #131112 70%); }
.video-poster:hover { color: #fff; }
.video-play { width: 4.25rem; height: 4.25rem; border-radius: 50%; background: var(--accent); position: relative; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.video-play::after { content: ""; position: absolute; left: 53%; top: 50%; transform: translate(-50%, -50%);
  border-style: solid; border-width: .8rem 0 .8rem 1.35rem; border-color: transparent transparent transparent var(--on-accent); }
.video-poster:hover .video-play, .video-poster:focus-visible .video-play { background: var(--accent-dark); }
.video-title { font: 700 1.1rem/1.3 var(--font-ui); }
.video-note { font: .8rem/1.4 var(--font-ui); color: #c9c1b3; max-width: 26rem; }

/* ---------- buttons ---------- */
.button { display: inline-block; background: var(--accent); color: var(--on-accent); text-decoration: none; padding: .75rem 1.4rem;
  font: 700 .95rem/1 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; border-radius: var(--radius); }
.button:hover { background: var(--accent-dark); color: var(--on-accent); }
.button.ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.button.ghost:hover { background: var(--accent); color: var(--on-accent); }

/* ---------- home ---------- */
.hero { background: var(--hero-bg); border-bottom: 1px solid var(--rule); }
.hero .wrap { padding-block: clamp(2.5rem, 7vw, 5rem); display: grid; gap: 1rem; max-width: 52rem; margin-inline: auto; text-align: center; }
.hero .eyebrow { margin: 0; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); margin: 0; text-transform: uppercase; letter-spacing: .02em; }
.hero p { margin: 0; }
.hero .lede { font-size: 1.25rem; max-width: 36rem; margin-inline: auto; }
.eyebrow { font: 700 .8rem/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.section-title { font: 700 .85rem/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); border: 0; padding: 0; margin: 3rem 0 1.2rem; }

.cards { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card-media { background: var(--hero-bg); display: grid; place-items: center; padding: 1.5rem; aspect-ratio: 4 / 3; }
.card-media img { max-height: 100%; width: auto; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.card-media.placeholder { background: var(--footer-bg); color: #fff; font: 700 1.1rem/1.2 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; text-align: center; }
.card-body { padding: 1.2rem 1.3rem 1.4rem; display: grid; gap: .5rem; align-content: start; flex: 1; }
.card-body h3 { margin: 0; font-size: 1.3rem; }
.card-body p { margin: 0; color: var(--muted); font-size: 1rem; }
.card-body .button { justify-self: start; margin-top: .6rem; }
.badge { justify-self: start; font: 700 .72rem/1 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; padding: .35rem .6rem; border-radius: 99px; background: var(--panel); color: var(--muted); }
.badge.soon { background: var(--text); color: var(--bg); }

.news-list { list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.news-list li { display: flex; gap: 1.2rem; padding: .7rem 0; border-bottom: 1px dotted var(--rule); }
.news-list time { flex: none; width: 6.5rem; font: .85rem/1.9 var(--font-ui); color: var(--muted); }

/* ---------- product page ---------- */
.product-hero { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: center; background: var(--surface);
  border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2.5rem); margin-bottom: 3rem; }
@media (min-width: 46rem) { .product-hero { grid-template-columns: minmax(0, 18rem) 1fr; } }
.product-hero--text { grid-template-columns: 1fr !important; }
.product-hero img { width: min(100%, 18rem); margin-inline: auto; display: block; filter: drop-shadow(0 8px 14px rgba(0,0,0,.25)); }
.product-hero h1 { margin-bottom: .25em; }
.product-hero .lede { margin: 0 0 1rem; font-size: 1.15rem; }
.chips { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.chips li { font: 600 .8rem/1 var(--font-ui); background: var(--chip); padding: .4rem .65rem; border-radius: 99px; }
.buy { background: var(--card); border-radius: var(--radius); padding: 1rem 1.2rem; border-left: 5px solid var(--accent); }
.buy p { margin: 0; font-size: 1rem; }
.buy .price { font: 700 1.3rem var(--font-ui); margin-right: 1rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--footer-bg); color: #d9d2c4; padding-block: 2.5rem; font: .95rem/1.6 var(--font-ui); }
.site-footer a { color: #fff; }
.site-footer .wrap { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.site-footer h2 { font: 700 .75rem/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--kraft); margin: 0 0 .8rem; border: 0; padding: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: .3rem; }
.site-footer p { margin: 0; }

@media (prefers-reduced-motion: no-preference) { a, .button { transition: background-color .15s, color .15s, border-color .15s; } }
@media print { .site-header nav, .site-footer, .buy { display: none; } }

/* ---------- audio player ---------- */
.listen { max-width: var(--measure); margin-bottom: 2.5rem; }
.tracklist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.track { display: grid; gap: .4rem 1rem; padding: .8rem .6rem .8rem 1rem; border-bottom: 1px solid var(--line);
  border-left: 4px solid transparent; }
@media (min-width: 40rem) { .track { grid-template-columns: 13rem 1fr; align-items: center; } }
.track-info { display: grid; line-height: 1.3; }
.track-title { font: 700 1rem var(--font-ui); }
.track-meta { font: .8rem var(--font-ui); color: var(--muted); }
.track audio { width: 100%; height: 2.5rem; }
.track.is-playing { border-left-color: var(--accent); background: var(--panel); }

/* ---------- players (compact cards, bio expands) ---------- */
.players-section { margin-top: 3rem; }
.players { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; margin-top: 1.25rem; }
@media (min-width: 38rem) { .players { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 60rem) { .players { grid-template-columns: repeat(3, 1fr); } }
.player-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.player-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: var(--panel); }
.player-body { padding: 1rem 1.25rem 1.25rem; font-size: 1rem; line-height: 1.6; }
.player-body h3 { margin: 0 0 .4rem; font-size: 1.15rem; }
.player-body summary { cursor: pointer; font: 600 .85rem var(--font-ui); color: var(--accent); }
.player-body p { margin: .7rem 0 0; }
.player-links { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; font: 600 .85rem var(--font-ui); }

/* ---------- header dropdown (details/summary, works without JS) ---------- */
.site-nav .has-menu { position: relative; }
.nav-menu summary { list-style: none; cursor: pointer; font: 600 .85rem/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase;
  padding: .5rem 0; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; gap: .4rem; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary::after { content: ""; border: .3rem solid transparent; border-top-color: currentColor; border-bottom: 0; }
.nav-menu[open] summary, .nav-menu summary:hover { border-bottom-color: var(--accent); }
.nav-menu .menu { position: absolute; z-index: 5; top: calc(100% + .35rem); left: -.8rem; min-width: 15rem; display: block;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.25); padding: .4rem 0; margin: 0; list-style: none; }
.nav-menu .menu li { margin: 0; }
.nav-menu .menu a, .nav-menu .menu .menu-soon { display: block; padding: .6rem 1rem; border: 0; text-transform: none; letter-spacing: 0; font: 600 .95rem var(--font-ui); }
.nav-menu .menu a:hover { background: var(--panel); }
.nav-menu .menu .menu-soon { color: var(--muted); }
.nav-menu .menu small { font-weight: 400; margin-left: .3rem; }

.nav-menu .menu ul { list-style: none; margin: 0; padding: 0; }
.nav-menu .menu-heading { margin: 0; padding: .7rem 1rem .2rem; font: 700 .7rem/1 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nav-menu .menu-heading:not(:first-child) { margin-top: .3rem; border-top: 1px solid var(--line); }
.nav-menu .menu p.menu-all { margin: .3rem 0 0; border-top: 1px solid var(--line); padding-top: .3rem; }

.buy-note { margin-top: .6rem !important; font-size: .9rem !important; color: var(--muted); }
.buy .button + .buy-note, .buy .price + .button { }

.screenshot { margin: 0 0 3rem; }
.screenshot img { display: block; width: 100%; height: auto; border-radius: var(--radius); }

/* ---------- theme switch ---------- */
.theme-toggle { margin-left: .25rem; width: 2.5rem; height: 2.5rem; display: inline-grid; place-items: center; cursor: pointer;
  background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 50%; padding: 0; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
