/* musicisles.com — the native apps' landing page (DESIGN.md §16).
   The app's own palette: cream and sand by day, the night garden's navy by
   night, turquoise water, and the warm orange of the Play button. System
   fonts only (no third-party request). */

:root {
  --page: #F6EFE4;
  --band: #EEE3D3;
  --panel: #FFFBF5;
  --ink: #2B2620;
  --ink-2: #625849;
  --heading: #27443A;
  --kicker: #3F6155;
  --accent: #F5B657;
  --accent-ink: #2B2620;
  --water: #4FB8B0;
  --water-deep: #2C8C8A;
  --line: rgba(43, 38, 32, 0.12);
  --line-strong: rgba(43, 38, 32, 0.28);
  --bezel: #1E1B19;
  --shadow: 0 30px 60px -28px rgba(46, 61, 52, 0.45), 0 10px 24px -14px rgba(46, 61, 52, 0.35);
  --pond: rgba(79, 184, 176, 0.32);
  --pond-2: rgba(245, 182, 87, 0.22);

  /* mosaic of a shared garden: the app's Golden Hour bloom swatches (game/src/render/Palette.ts) */
  --m0: #F69B94; --m1: #57AFE0; --m2: #D8B260; --m3: #A996E2; --m4: #8ACA8B; --m5: #DB87A8;
  --m6: #4FCCD9; --m7: #DA915F; --m8: #95B6FE; --m9: #A2AD58; --m10: #DB9FDE; --m11: #4ABBA1;
  --m-sand: #E7DBCB; --m-gravel: #D8CFC0; --m-stone: #B8AD9C; --m-water: #5BBFC6; --m-edge: rgba(255, 255, 255, 0.8);

  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 5vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #141A3A;
    --band: #1A2148;
    --panel: #20285A;
    --ink: #F4EEE6;
    --ink-2: #C7C3DA;
    --heading: #F6EFE4;
    --kicker: #8FD3CB;
    --accent: #F5B657;
    --accent-ink: #141A3A;
    --water: #4FB1C8;
    --water-deep: #2F7F99;
    --line: rgba(255, 255, 255, 0.12);
    --line-strong: rgba(255, 255, 255, 0.3);
    --bezel: #07091A;
    --shadow: 0 30px 60px -26px rgba(0, 0, 0, 0.7), 0 10px 24px -14px rgba(0, 0, 0, 0.55);
    --pond: rgba(79, 177, 200, 0.26);
    --pond-2: rgba(245, 182, 87, 0.12);

    /* the night garden's swatches */
    --m0: #E08F88; --m1: #519FCA; --m2: #C5A35A; --m3: #9A89CC; --m4: #7FB980; --m5: #C67B98;
    --m6: #4CBAC6; --m7: #C58457; --m8: #89A7E7; --m9: #939D51; --m10: #C892CA; --m11: #45A992;
    --m-sand: #20244F; --m-gravel: #8A8FB3; --m-stone: #9A9DB8; --m-water: #4FB1C8; --m-edge: rgba(10, 12, 30, 0.55);
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--accent); color: var(--accent-ink); padding: 10px 16px; border-radius: 12px; font-weight: 600;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

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

.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.brand span { font: 600 1.3rem/1 var(--serif); color: var(--heading); letter-spacing: 0.01em; }
.site-nav { display: flex; gap: 6px; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  border-radius: 22px; text-decoration: none; color: var(--ink-2); font-size: 0.95rem; font-weight: 500;
}
.site-nav a:hover { color: var(--ink); background: var(--band); }
.site-nav a[aria-current="page"] { color: var(--ink); }

.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; color: var(--ink-2); font-size: 0.92rem; }
.site-footer .wrap { display: grid; gap: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration: none; font-weight: 500; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer p { margin: 0; }
.footer-brand { font: 600 1.1rem/1.2 var(--serif); color: var(--heading); }

/* ---- type ----------------------------------------------------------------- */

h1, h2, h3 { font-family: var(--serif); color: var(--heading); font-weight: 500; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(2.5rem, 8.5vw, 4.6rem); line-height: 1.04; }
h2 { font-size: clamp(1.85rem, 5vw, 2.7rem); line-height: 1.12; }
h3 { font-size: 1.3rem; line-height: 1.25; }
.kicker {
  margin: 0 0 14px; font: 600 0.76rem/1.3 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--kicker);
}
.lead { font-size: clamp(1.06rem, 2.3vw, 1.2rem); color: var(--ink-2); margin: 20px 0 0; max-width: 34em; }
p { margin: 14px 0 0; }

/* ---- availability ------------------------------------------------------- */

/* One row per store, stacked: "Coming soon to the App Store · iPhone and iPad". */
.stores { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 12px; width: 100%; max-width: 410px; }
.store {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 10px 18px 10px 16px;
  border-radius: 18px; text-decoration: none; color: var(--ink);
}
.store.is-soon { background: var(--panel); border: 1.5px dashed var(--line-strong); }
.store.is-live { background: var(--ink); color: var(--page); border: 1.5px solid var(--ink); }
.store.is-live:hover { background: var(--heading); border-color: var(--heading); }
.store-icon { width: 28px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; flex: none; opacity: 0.85; }
.store-text { display: grid; line-height: 1.15; min-width: 0; }
.store-kicker { font-size: 0.8rem; letter-spacing: 0.01em; color: var(--ink-2); }
.store.is-live .store-kicker { color: inherit; opacity: 0.85; }
.store-name { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.005em; }
.store-devices {
  margin-left: auto; padding-left: 14px; border-left: 1px solid var(--line-strong);
  font-size: 0.8rem; line-height: 1.3; color: var(--ink-2); text-align: right; white-space: nowrap;
}
.store.is-live .store-devices { color: inherit; opacity: 0.8; border-left-color: currentColor; }

.promises { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--ink-2); font-size: 0.95rem; }
.promises li { display: inline-flex; align-items: center; gap: 8px; }
.promises li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--water); flex: none; }

/* ---- device frames ------------------------------------------------------ */

.phone {
  position: relative; width: 100%; max-width: 290px; margin: 0 auto;
  padding: 9px; border-radius: 46px; background: var(--bezel); box-shadow: var(--shadow);
}
.phone picture, .phone img, .phone video {
  display: block; width: 100%; height: auto; aspect-ratio: 1320 / 2868; border-radius: 37px; object-fit: cover; background: #2a6f73;
}
.tablet {
  position: relative; width: 100%; max-width: 560px; margin: 0 auto;
  padding: 12px; border-radius: 34px; background: var(--bezel); box-shadow: var(--shadow);
}
.tablet img { display: block; width: 100%; height: auto; aspect-ratio: 2064 / 2752; border-radius: 22px; background: #26305a; }

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

.hero { padding: 24px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; gap: 52px; align-items: center; }
.hero-art { position: relative; display: grid; place-items: center; padding: 10px 0 0; }
.hero-art::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: min(118%, 640px); aspect-ratio: 1; z-index: 0;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 50% 55%, var(--pond) 0, var(--pond) 38%, transparent 70%),
              radial-gradient(circle at 72% 28%, var(--pond-2) 0, transparent 46%);
}
.hero-art .phone { z-index: 1; max-width: 300px; }
.hero-art .phone.back { display: none; }

@media (min-width: 900px) {
  .hero { padding: 40px 0 96px; }
  .hero .wrap { grid-template-columns: 1.08fr 1fr; gap: 40px; }
  .hero-art { min-height: 640px; }
  .hero-art .phone.front { position: relative; transform: translateX(-46px) rotate(-2deg); }
  .hero-art .phone.back {
    display: block; position: absolute; top: 34px; left: 50%; max-width: 262px;
    transform: translateX(34px) rotate(4deg); opacity: 0.97; z-index: 0;
  }
}

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

.section { padding: 76px 0; }
.section.band { background: var(--band); }
.section-head { max-width: 40em; }
.section-head.center { text-align: center; margin: 0 auto; }
.section-head.center .lead { margin-left: auto; margin-right: auto; }

.feature { display: grid; gap: 34px; align-items: center; }
.feature + .feature { margin-top: 84px; }
.feature-copy p { color: var(--ink-2); max-width: 30em; }
.feature-copy h2 { max-width: 14em; }
.feature-media .phone { max-width: 270px; }

@media (min-width: 860px) {
  .feature { grid-template-columns: 1fr 1fr; gap: 64px; }
  .feature:nth-of-type(even) .feature-media { order: -1; }
  .feature-media .phone { max-width: 300px; }
}

.clip-note { margin: 14px auto 0; text-align: center; font-size: 0.85rem; color: var(--ink-2); }

/* the iPad */
.ipad { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .ipad { grid-template-columns: 0.9fr 1.1fr; gap: 64px; } }

/* the included songs */
.songs { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .songs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; } }
.song { display: grid; gap: 12px; align-content: start; }
.song img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 18px; object-fit: cover; background: #2a6f73; box-shadow: 0 14px 30px -20px rgba(0, 0, 0, 0.5); }
.song h3 { font-size: 1.12rem; }
.song p { margin: 4px 0 0; font-size: 0.9rem; line-height: 1.45; color: var(--ink-2); }
.songs-note { margin-top: 26px; font-size: 0.9rem; color: var(--ink-2); max-width: 46em; }

/* calm by design */
.calm { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 16px; }
@media (min-width: 760px) { .calm { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
.calm li { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 24px 24px 26px; }
.calm h3 { font-size: 1.2rem; }
.calm p { margin-top: 8px; color: var(--ink-2); font-size: 0.97rem; }
.calm svg { width: 30px; height: 30px; margin-bottom: 14px; fill: none; stroke: var(--water-deep); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* closing call */
.closing { text-align: center; }
.closing .stores { margin-left: auto; margin-right: auto; }
.closing .lead { margin-left: auto; margin-right: auto; }

/* ---- text pages (privacy, support) ---------------------------------------- */

.page { padding: 28px 0 80px; }
.page .wrap { max-width: 760px; }
.page h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); }
.page h2 { font-size: clamp(1.35rem, 3.6vw, 1.7rem); margin-top: 44px; }
.page h3 { font-size: 1.12rem; margin-top: 26px; }
.page p, .page li { color: var(--ink-2); }
.page ul { padding-left: 1.2em; margin: 12px 0 0; }
.page li + li { margin-top: 8px; }
.page strong { color: var(--ink); font-weight: 600; }
.page .stores { padding-left: 0; margin-top: 18px; }
.page .stores li + li { margin-top: 0; }
.updated { font-size: 0.9rem; color: var(--ink-2); margin-top: 12px; }
.faq h2 { font-size: clamp(1.25rem, 3.4vw, 1.5rem); }
.contact-card { margin-top: 48px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 24px; }
.contact-card h2 { margin-top: 0; }
.contact-link { font-weight: 600; color: var(--ink); }
.contact-soon { color: var(--ink); font-weight: 500; }

/* ---- a shared garden (/g/:id) --------------------------------------------- */

.shared { padding: 20px 0 80px; }
.shared .wrap { max-width: 980px; display: grid; gap: 32px; }
@media (min-width: 860px) { .shared .wrap { grid-template-columns: 1fr 1fr; align-items: center; gap: 56px; } }
.shared h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); overflow-wrap: anywhere; }
.shared .summary { margin-top: 14px; color: var(--ink-2); }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px;
  border-radius: 26px; background: var(--accent); color: var(--accent-ink); font-weight: 650; font-size: 1.05rem; text-decoration: none;
  box-shadow: 0 10px 22px -12px rgba(178, 112, 15, 0.7);
}
.button:hover { filter: brightness(1.04); text-decoration: none; }
.button svg { width: 18px; height: 18px; fill: currentColor; }
.open-row { margin-top: 28px; display: grid; gap: 10px; justify-items: start; }
.open-row p { margin: 0; font-size: 0.92rem; color: var(--ink-2); max-width: 28em; }
.get-app { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.get-app h2 { font-size: 1.35rem; }
.get-app .stores { margin-top: 18px; }
.get-app p { color: var(--ink-2); }

.mosaic-card {
  margin: 0; border-radius: 28px; padding: 18px; background: var(--m-sand);
  box-shadow: var(--shadow); aspect-ratio: 1; display: grid; place-items: center;
}
.mosaic { width: 100%; height: 100%; }
.mosaic .t { stroke: var(--m-edge); stroke-linejoin: round; } /* the width comes from the svg's own stroke-width */
.mosaic .n0 { fill: var(--m0); } .mosaic .n1 { fill: var(--m1); } .mosaic .n2 { fill: var(--m2); } .mosaic .n3 { fill: var(--m3); }
.mosaic .n4 { fill: var(--m4); } .mosaic .n5 { fill: var(--m5); } .mosaic .n6 { fill: var(--m6); } .mosaic .n7 { fill: var(--m7); }
.mosaic .n8 { fill: var(--m8); } .mosaic .n9 { fill: var(--m9); } .mosaic .n10 { fill: var(--m10); } .mosaic .n11 { fill: var(--m11); }
.mosaic .ctl { fill: var(--m-gravel); }
.mosaic .start { fill: var(--m-stone); }
.mosaic .spring { fill: var(--m-water); stroke: none; }

/* ---- not found ------------------------------------------------------------ */

.missing { padding: 40px 0 100px; }
.missing .wrap { max-width: 640px; }
.missing p { color: var(--ink-2); }
.missing .button { margin-top: 28px; }

@media (prefers-reduced-motion: no-preference) {
  .store.is-live, .button, .site-nav a { transition: background-color 160ms ease, filter 160ms ease, color 160ms ease; }
}

/* the clip's own Pause / Play (shown by site.js; bottom-left, clear of the app's controls in the frame) */
.clip-wrap { position: relative; }
.clip-toggle {
  position: absolute; left: 22px; bottom: 22px; z-index: 2; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(14, 18, 40, 0.62); color: #fff;
  display: grid; place-items: center; cursor: pointer; padding: 0;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.clip-toggle[hidden] { display: none; }
.clip-toggle svg { width: 16px; height: 16px; fill: currentColor; }
.clip-toggle .i-play { display: block; margin-left: 2px; }
.clip-toggle .i-pause { display: none; }
.clip-toggle[data-state="playing"] .i-play { display: none; }
.clip-toggle[data-state="playing"] .i-pause { display: block; }
