/* shuttlemusicplayer.com. One stylesheet, no build step. Light and dark follow the system; the header toggle
   pins one with <html data-theme>. Tokens first, then layout, then components. 8px grid. */

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ── */
:root {
  --bg: #f7f9fb;
  --surface: #ffffff;
  --border: #e3e8ee;
  --text-1: #1c1c1e;
  --text-2: #66666b;
  --accent: #0492ea; /* fills and glow only, never body text */
  --accent-text: #0068a5;
  --btn-bg: #0077c8;
  --btn-text: #ffffff;
  --glow: rgb(4 146 234 / 0.18);
  --header-bg: rgb(247 249 251 / 0.85);
  --shot-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.25);
  --brand-gradient: linear-gradient(180deg, #2fbbf8, #0493e0);

  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s6: 48px;
  --s8: 64px;
  --s12: 96px;
  --max: 1200px;
  --radius: 16px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d10;
    --surface: #15181c;
    --border: #262b31;
    --text-1: #f2f2f7;
    --text-2: #9a9aa0;
    --accent: #4fc3f7;
    --accent-text: #4fc3f7;
    --btn-bg: #2fbbf8;
    --btn-text: #0b0d10;
    --glow: rgb(79 195 247 / 0.18);
    --header-bg: rgb(11 13 16 / 0.85);
    --shot-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b0d10;
  --surface: #15181c;
  --border: #262b31;
  --text-1: #f2f2f7;
  --text-2: #9a9aa0;
  --accent: #4fc3f7;
  --accent-text: #4fc3f7;
  --btn-bg: #2fbbf8;
  --btn-text: #0b0d10;
  --glow: rgb(79 195 247 / 0.18);
  --header-bg: rgb(11 13 16 / 0.85);
  --shot-shadow: 0 30px 60px -20px rgb(0 0 0 / 0.6);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(64px + var(--s3)); }

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

img { max-width: 100%; height: auto; display: block; }
picture { display: block; }

a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; margin: 0 0 var(--s2); text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 5vw + 1rem, 4.25rem); line-height: 1.05; }
h2 { font-size: clamp(1.875rem, 2.5vw + 1rem, 2.75rem); line-height: 1.1; }
h3 { font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.015em; }
p { margin: 0 0 var(--s2); }
code { font-family: var(--mono); font-size: 0.9em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--s3); }
.narrow { max-width: calc(720px + 2 * var(--s3)); }
.lede { font-size: 1.25rem; line-height: 1.5; color: var(--text-2); }
.small { font-size: 0.875rem; color: var(--text-2); }
.eyebrow {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: var(--s2);
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s2); top: var(--s2); z-index: 20; background: var(--surface); color: var(--text-1); padding: var(--s1) var(--s2); border-radius: 8px; }

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: var(--s2); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-1); text-decoration: none; font-weight: 600; font-size: 1.0625rem; letter-spacing: -0.01em; min-height: 44px; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.site-nav { display: flex; align-items: center; gap: var(--s1); }
.site-nav a { color: var(--text-2); text-decoration: none; font-size: 0.9375rem; font-weight: 500; padding: 10px 12px; border-radius: 999px; }
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text-1); }
.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-left: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-1);
  cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

/* ── Buttons and store badges ── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--s3);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-text);
  font-weight: 600;
  text-decoration: none;
}
.button.secondary { background: transparent; color: var(--text-1); border: 1px solid var(--border); }

.badges { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px var(--s2); margin: var(--s4) 0 var(--s2); }
.badges a { display: block; border-radius: 8px; }
.badges img { height: 48px; width: auto; }
.store-soon { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.store-soon .small { font-size: 0.8125rem; line-height: 1.2; }

/* ── Screenshots: no bezels, rounded like the screen, a hairline and one soft shadow ── */
.shot { container-type: inline-size; }
.shot img {
  width: 100%;
  border-radius: 20px;
  border-radius: 5.5cqi;
  box-shadow: 0 0 0 1px var(--border), var(--shot-shadow);
  background: var(--surface);
}

/* ── Hero ── */
.hero { position: relative; overflow: hidden; padding: var(--s8) 0 var(--s12); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); align-items: center; }
.hero h1 { margin-bottom: var(--s3); }
.hero .lede { max-width: 32em; }
.hero-shots { position: relative; display: grid; max-width: 520px; width: 100%; justify-self: center; }
.hero-shots::before {
  content: "";
  position: absolute;
  inset: -20% -30%;
  background: radial-gradient(closest-side, var(--glow), transparent);
  z-index: -1;
}
.hero-shots .shot { grid-area: 1 / 1; width: 62%; }
.hero-shots .back { justify-self: end; }
.hero-shots .front { justify-self: start; margin-top: 12%; }

/* ── Sections ── */
section { padding: var(--s12) 0; }
section.alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: var(--s6); }
.section-head p { color: var(--text-2); font-size: 1.125rem; }
.section-head.center { margin-inline: auto; text-align: center; }

/* Servers */
.sources { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s2); }
.source { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s3); }
.source h3 { font-size: 1.125rem; margin-bottom: var(--s1); }
.source p { color: var(--text-2); font-size: 0.9375rem; margin: 0; }

/* Feature rows: 8/4, alternating */
.feature { display: grid; grid-template-columns: 2fr 1fr; gap: var(--s12); align-items: center; }
.feature + .feature { margin-top: var(--s12); }
.feature .shot { max-width: 300px; width: 100%; justify-self: center; }
.feature.flip { grid-template-columns: 1fr 2fr; }
.feature.flip .feature-copy { order: 2; }
.feature-copy { max-width: 560px; }
.feature-copy > p { color: var(--text-2); font-size: 1.125rem; }
.ticks { list-style: none; padding: 0; margin: var(--s3) 0 0; display: grid; gap: 12px; }
.ticks li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; }
.ticks svg { width: 20px; height: 20px; margin-top: 3px; color: var(--accent-text); }

/* Spec sheet */
.specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 var(--s6);
  margin: 0;
  font-family: var(--mono);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}
.specs div { display: grid; grid-template-columns: 11em 1fr; gap: var(--s2); padding: 14px 0; border-top: 1px solid var(--border); }
.specs dt { color: var(--text-2); }
.specs dd { margin: 0; }
.tag {
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1;
  padding: 3px 6px;
  margin-left: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-2);
  white-space: nowrap;
  vertical-align: 1px;
}

/* Platforms */
.platforms { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
.platform { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: 24px; padding: var(--s4); overflow: hidden; }
.platform p { color: var(--text-2); }
.platform .shot { width: 62%; max-width: 280px; margin: auto auto 0; padding-top: var(--s3); }

/* Pro */
.pro-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: var(--s6);
}
.pro-card .ticks { margin: 0 0 var(--s3); }
.pro-card .small { margin: 0; }

/* FAQ */
.faq { max-width: 720px; margin: 0 auto; }
details { border-bottom: 1px solid var(--border); }
details summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  padding: var(--s2) var(--s4) var(--s2) 0;
  position: relative;
  min-height: 44px;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "";
  position: absolute;
  right: 4px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--text-2);
  border-bottom: 2px solid var(--text-2);
  transform: translateY(-70%) rotate(45deg);
}
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details > :not(summary) { color: var(--text-2); }
details > :last-child:not(summary) { padding-bottom: var(--s2); margin-bottom: 0; }
details > p:first-of-type { margin-top: 0; }
.faq-more { text-align: center; margin-top: var(--s4); }

/* Final call to action: the page's one gradient band */
.cta { background: var(--brand-gradient); color: #fff; text-align: center; padding: var(--s12) 0; border: 0; }
.cta img.icon { width: 72px; height: 72px; border-radius: 16px; margin: 0 auto var(--s3); box-shadow: 0 12px 30px -10px rgb(1 87 155 / 0.6); }
.cta h2 { color: #fff; }
.cta p { color: #fff; font-size: 1.125rem; }
.cta .badges { justify-content: center; }
.cta .store-soon .small { color: #fff; }

/* ── Prose pages (privacy, support) ── */
.page-head { padding: var(--s8) 0 var(--s4); }
.page-head p { color: var(--text-2); font-size: 1.25rem; margin: 0; }
.crumbs { font-size: 0.875rem; color: var(--text-2); margin-bottom: var(--s2); }
.crumbs a { color: var(--text-2); }
.prose { padding: 0 0 var(--s12); line-height: 1.7; }
.prose h2 { font-size: 1.75rem; margin-top: var(--s8); }
.prose h3 { font-size: 1.25rem; margin-top: var(--s4); }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 0.35em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: var(--s2) 0 var(--s3); font-size: 0.9375rem; }
.prose th,
.prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.prose th { font-weight: 600; }
.table-scroll { overflow-x: auto; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s2) var(--s3); margin-bottom: var(--s4); }
.toc strong { display: block; font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin-bottom: var(--s1); }
.toc ul { margin: 0; padding-left: 1.1em; columns: 2; }
.toc li { margin: 0 0 0.35em; break-inside: avoid; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); padding: var(--s6) 0; color: var(--text-2); font-size: 0.9375rem; }
.site-footer .wrap { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s4); align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px var(--s3); }
.site-footer nav a { color: var(--text-2); text-decoration: none; padding: 10px 0; }
.site-footer nav a:hover { color: var(--text-1); text-decoration: underline; }
.site-footer .legal { grid-column: 1 / -1; margin: 0; font-size: 0.875rem; }

/* ── Responsive ── */
@media (max-width: 1023px) {
  .hero { padding-top: var(--s6); }
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-shots { max-width: 420px; }
  .sources { grid-template-columns: repeat(3, 1fr); }
  .feature,
  .feature.flip { grid-template-columns: 1fr; gap: var(--s6); }
  .feature.flip .feature-copy { order: 0; }
  .feature .shot { max-width: 260px; }
  .specs { grid-template-columns: 1fr; }
}

@media (max-width: 719px) {
  body { font-size: 1rem; }
  section { padding: var(--s8) 0; }
  .wrap { padding: 0 20px; }
  .badges { column-gap: 12px; }
  .badges img { height: 44px; }
  .store-soon .small { font-size: 0.75rem; }
  .site-nav .wide { display: none; }
  .sources,
  .platforms { grid-template-columns: 1fr; }
  .specs div { grid-template-columns: 1fr; gap: 2px; }
  .pro-card { padding: var(--s4) var(--s3); }
  .feature + .feature { margin-top: var(--s8); }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .site-footer nav { justify-content: flex-start; }
  .toc ul { columns: 1; }
}

/* ── Motion: only when the reader hasn't asked for less. No loops. ── */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } }
  .hero-copy { animation: rise 600ms var(--ease) both; }
  .hero-shots { animation: rise 600ms var(--ease) 120ms both; }
  .button,
  .badges a { transition: transform 150ms ease; }
  .button:hover,
  .badges a:hover { transform: translateY(-1px); }

  @supports (animation-timeline: view()) {
    @keyframes reveal { from { opacity: 0; transform: translateY(24px); } }
    .feature,
    .platform {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
  }
}
