/* ---------- synthstrument.app: the landing page ----------
   One dark page in the app's own palette (site/privacy.html uses the same tokens) and the app's
   own fonts (assets/fonts.css, generated from src/styles.css). The hero is a 40/60 split: the
   lockup, headline and badges beside a wheel of nine clips. Everything else is one column of
   sections. No external requests: no font host, no analytics, no embeds. */
:root {
  color-scheme: dark;
  --bg: #0A0D13; --bg2: #10151E; --ink: #E8E6E1; --dim: #9A9892; --line: #222A36;
  --accent: #FF9E3D; --cool: #5FD3C8;
  --display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: 20px; --max: 1080px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--display); overflow-x: hidden;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
a { color: inherit; }
h1, h2 { margin: 0; line-height: 1.1; text-wrap: balance; font-weight: 700; }
h2 { font-size: clamp(26px, 4vw, 38px); }
p, figure, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img, video { max-width: 100%; display: block; }
main, footer { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
section { position: relative; padding-block: 72px; border-top: 1px solid var(--line); }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.lead { color: var(--dim); font-size: 18px; max-width: 52ch; margin-top: 14px; }
:focus-visible { outline: 2px solid var(--cool); outline-offset: 3px; }

/* ---- the speaker: one button per playing stage, all showing the one shared state ---- */
.sound { position: absolute; top: 14px; right: 14px; z-index: 4; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(10, 13, 19, .8); border: 1px solid var(--accent); border-radius: 50%; cursor: pointer; backdrop-filter: blur(6px); box-shadow: 0 4px 18px rgba(0, 0, 0, .6); padding: 0; }
.sound svg { width: 22px; height: 22px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sound .is-on { display: none; }
body.sound-on .sound .is-on { display: block; }
body.sound-on .sound .is-off { display: none; }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: 2fr 3fr; gap: 36px; align-items: start; padding-block: 40px 56px; border-top: 0; }
.copy { min-width: 0; padding-top: 12px; container-type: inline-size; }   /* the reel pads 12px, so the lockup's top meets the wheel's */
.lockup { width: min(380px, 100%); height: auto; }
.hero h1 { font-size: min(44px, 100cqi / 13); white-space: nowrap; letter-spacing: -.02em; margin-top: 22px; }   /* the tagline sized to its column so it always sits on one line */
.sub { font-size: clamp(17px, 2vw, 21px); color: var(--dim); margin-top: 14px; max-width: 32ch; }
.badges { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .badges { flex-direction: column; align-items: center; gap: 14px; margin-top: 28px; }
.badge { display: inline-block; border-radius: 10px; }
.badge img { height: 64px; width: auto; }   /* both badges at one height, per the brand guidelines */
.hero .badge img { height: 68px; }
.fine { font: 13px/1.4 var(--mono); color: var(--dim); margin-top: 14px; text-align: center; }
.fine span { color: var(--cool); }
.hero-social { justify-content: center; margin-top: 22px; font: 13px var(--mono); color: var(--dim); }
.hero-social svg { width: 22px; height: 22px; }
.hero-social a:hover svg { fill: var(--accent); }

/* the wheel: the playing clip centred, as much of its neighbours as fits, fading at the edges */
.wheel { position: relative; min-width: 0; --sw: 290px; --gap: 18px; }
.reel { position: relative; overflow: hidden; padding-block: 12px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent); }
.track { display: flex; gap: var(--gap); transition: transform .9s cubic-bezier(.4, 0, .2, 1); will-change: transform; }
.track.jump, .track.jump .slide { transition: none; }   /* the hidden swap at the wrap-around: no slide, no grow, no fade */
.slide { flex: 0 0 var(--sw); position: relative; aspect-ratio: 9 / 17.5; border-radius: 28px; overflow: hidden; background: #000; border: 3px solid #2a3140;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .65); transition: opacity .9s, transform .9s; opacity: .6; transform: scale(.92); }
.slide.on { opacity: 1; transform: scale(1); }
.slide video { width: 100%; height: 100%; object-fit: cover; background: #000 center / cover no-repeat; }
/* the arrows: there on hover (or focus, or on a touch screen, which has no hover) */
.arrow { position: absolute; top: 50%; z-index: 4; width: 44px; height: 44px; margin-top: -34px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  background: rgba(10, 13, 19, .75); border: 1px solid rgba(255, 255, 255, .25); border-radius: 50%; color: #fff; cursor: pointer; backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s, border-color .25s; }
.arrow.prev { left: 10px; } .arrow.next { right: 10px; }
.arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.wheel:hover .arrow, .arrow:focus-visible { opacity: 1; }
.arrow:hover { border-color: var(--accent); color: var(--accent); }
@media (hover: none) { .arrow { opacity: .7; } }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background .3s; }
.dots i.on { background: var(--accent); }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 0; padding-block: 32px 48px; container-type: inline-size; }   /* .copy is display: contents here */
  /* on a phone the wheel comes right after the headline and its line, ahead of the store badges */
  .copy { display: contents; }
  .hero .wheel { order: 1; margin-top: 28px; }
  .hero .badges, .hero .fine, .hero-social { order: 2; }
  .lockup { width: min(320px, 100%); }
  .hero .badge img { height: 60px; }
  .wheel { --sw: min(230px, 62vw); }
}

/* ---- a phone frame around a clip ---- */
.phone { position: relative; width: min(300px, 80vw); aspect-ratio: 518 / 1080; border-radius: 34px; background: #000; border: 3px solid #2a3140; box-shadow: 0 30px 80px rgba(0, 0, 0, .75); overflow: hidden; }
.phone video { width: 100%; height: 100%; object-fit: cover; }

/* ---- a side-by-side clip: the player's hands on the left, the phone's own recording on the right ---- */
.duo { position: relative; aspect-ratio: 748 / 720; border-radius: 18px; overflow: hidden; background: #000; border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6); min-width: 0; }
.duo video { width: 100%; height: 100%; object-fit: cover; }

/* ---- how it's played ---- */
.how h2 { font-size: clamp(34px, 5vw, 52px); }
.pair { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: center; margin-top: 32px; }
.gestures { display: grid; gap: 18px; }
.gestures li { border-left: 2px solid var(--accent); padding-left: 14px; min-width: 0; }
.gestures b { display: block; font-size: 19px; }
.gestures p { color: var(--dim); font-size: 15px; margin-top: 4px; }
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; gap: 28px; } }

/* ---- visuals: the slow row ---- */
.marquee { overflow: hidden; margin-top: 32px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee .row { display: flex; gap: 14px; width: max-content; animation: marquee 70s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee figure { flex: 0 0 190px; aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #000; position: relative; border: 1px solid var(--line); }
.marquee video { width: 100%; height: 100%; object-fit: cover; }
.marquee figcaption { position: absolute; left: 10px; bottom: 10px; font: 12px var(--mono); color: #fff; background: rgba(0, 0, 0, .6); padding: 4px 8px; border-radius: 999px; }

/* ---- loop, play along ---- */
.feature { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.feature .duo { width: min(460px, 100%); }
.feature.flip { grid-template-columns: auto 1fr; }
.feature.flip .phone { order: -1; }
.layers { display: flex; gap: 8px; margin-top: 20px; }
.layers i { display: block; width: 14px; height: 14px; border-radius: 50%; }
.layers i:nth-child(1) { background: #F2C14E; } .layers i:nth-child(2) { background: #F28C3A; }
.layers i:nth-child(3) { background: #E8639A; } .layers i:nth-child(4) { background: #8C6CE8; }
@media (max-width: 800px) { .feature, .feature.flip { grid-template-columns: 1fr; } .feature .phone, .feature .duo { margin-inline: auto; order: 2; } }

/* ---- instruments ---- */
.families { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px 28px; margin-top: 30px; }
.families h3 { font: 500 15px var(--mono); letter-spacing: .04em; color: var(--accent); margin: 0 0 8px; }
.families p { font-size: 15px; line-height: 1.7; }

/* ---- quiet by design ---- */
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.promises li { border-left: 2px solid var(--cool); padding-left: 14px; }
.promises b { display: block; font-size: 17px; margin-bottom: 4px; }
.promises p { color: var(--dim); font-size: 14px; }
@media (max-width: 700px) { .promises { grid-template-columns: 1fr; } }

/* ---- the second download ---- */
.get { text-align: center; background: radial-gradient(60% 80% at 50% 100%, #1c2a3a 0%, var(--bg) 70%); }
.get h2 { font-size: clamp(30px, 5vw, 52px); margin-bottom: 28px; }
.get .badges { justify-content: center; }

/* ---- footer ---- */
footer { padding-block: 36px 60px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 18px 32px; align-items: center; font: 13px var(--mono); color: var(--dim); }
.social { display: flex; gap: 16px; align-items: center; }
.social svg { width: 20px; height: 20px; fill: var(--ink); display: block; }
.social a { display: block; }
.handle { padding-left: 4px; }
.links { display: flex; gap: 24px; }
.links a, .social a { text-decoration: none; }
.copyright { margin-left: auto; }
@media (max-width: 700px) { .copyright { margin-left: 0; } }

@media (prefers-reduced-motion: reduce) {
  .track, .slide, .dots i { transition: none; }
  .marquee .row { animation: none; }
  html { scroll-behavior: auto; }
}
