/* The home page (17 Nov 2026). Its own stylesheet: the page is a different
   design from the rest of the site (style.css), which keeps the cream sheet
   until those pages are redrawn. The prototype it came from is next/. */
@font-face { font-family: "Literata"; src: url("fonts/Literata-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/Literata-Bold.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/Literata-Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Literata"; src: url("fonts/Literata-BoldItalic.woff2") format("woff2"); font-weight: 600 700; font-style: italic; font-display: swap; }
@font-face { font-family: "ScoreAccidentals"; src: url("fonts/ScoreAccidentals.woff2") format("woff2"); unicode-range: U+266D-266F; }
html { color-scheme: dark; }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Layout: a music stand in a dark room. The ground is the app's own dark
   canvas; the only bright things are sheets of paper. The headline holds the
   one control that matters (your instrument) and the sheet under it re-inks.
   One look, on purpose: the app is dark chrome around cream paper, so the
   page does not follow the viewer's theme. */
:root {
  color-scheme: dark;
  --stage: #161514;        /* the app's canvas */
  --stage-rise: #211e1a;   /* a raised surface on it */
  --paper: #f6f1e5;        /* the page the app engraves on */
  --ink: #241e16;          /* notation, and text on paper */
  --ink-soft: #5d5446;     /* secondary text on paper */
  --cream: #f2ede4;        /* text on the stage */
  --cream-dim: #bdb3a3;    /* secondary text on the stage */
  --brass: #dba843;        /* the one accent: the app's play button */
  --on-brass: #1e180b;
  --rule: rgba(242, 237, 228, 0.16);
  --rule-paper: rgba(36, 30, 22, 0.16);

  /* ScoreAccidentals first: Literata has no ♭ ♮ ♯ (style.css says why it
     is its own family). The site loads nothing from another host, so the
     labels are the system's sans. */
  --display: "ScoreAccidentals", "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --text: "ScoreAccidentals", "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --measure: 34rem;
  --wide: 68rem;
}

* { box-sizing: border-box; }
body {
  background: var(--stage);
  color: var(--cream);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap {
  max-width: var(--wide);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
h1, h2, h3, p, figure, blockquote { margin: 0; }
h1, h2 { font-family: var(--display); font-style: italic; font-weight: 700; text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.15; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: 4px; }
.label {
  font-family: var(--ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
}

/* ---- top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.brand svg { width: 1.9rem; height: 1.98rem; display: block; }
.brand .horizon { fill: var(--stage); }
.brand .bar { fill: var(--cream-dim); }
.bar .links { display: flex; gap: 1.5rem; font-family: var(--ui); font-size: 0.92rem; }
.bar .links a { color: var(--cream-dim); text-decoration: none; }
.bar .links a:hover { color: var(--cream); }

/* ---- the opening */
.opening { padding-block: 2.5rem 4rem; display: grid; gap: 2.75rem; }
.opening > * { min-width: 0; }
.opening h1 { font-size: clamp(2.3rem, 6.4vw, 4.4rem); line-height: 1.06; letter-spacing: -0.01em; max-width: 15em; }
/* The instrument, chosen inside the sentence. A native select, so a phone
   gives its own wheel; drawn as underlined brass words with a caret. */
/* The instrument inside the sentence. Inline, so the comma after it is
   never left to start a line and a long name may wrap with the rest. */
.opening h1 { position: relative; }
.pick { color: var(--brass); cursor: pointer; }
/* What the headline shows is this span. The select lies over it, invisible
   and at the page's ordinary type size: a menu takes the size of its
   select, and one set at the headline's size opened as a wall of 70 px
   words on a laptop (Nick, 17 Nov 2026). */
.pick .said { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.14em; }
/* The caret is drawn behind two no-break spaces, not as a box of its own:
   a box would let the line break before the comma that follows the
   instrument, and a comma must not start a line. */
.pick .said::after {
  content: "\2060\00a0\00a0\00a0\2060";
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5 6 6l4.5-4.5' fill='none' stroke='%23dba843' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center 58% / 0.42em auto;
}
/* Laid over the words by home.js (their box, which may be two lines); over
   the whole headline until it runs. */
.pick select {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  opacity: 0; cursor: pointer;
  font-family: var(--ui); font-size: 1rem; font-style: normal; font-weight: 400; letter-spacing: 0;
  appearance: none; -webkit-appearance: none; border: 0; margin: 0; padding: 0;
}
.pick:focus-within { outline: 2px solid var(--brass); outline-offset: 0.08em; border-radius: 4px; }
.opening .sub { font-size: 1.2rem; color: var(--cream-dim); max-width: var(--measure); margin-top: 1.4rem; }
.ask { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
/* The stores' own badges (img/badges/). A phone sees only its own store:
   platform.js puts .ios or .android on <html>. */
.badge { display: inline-block; line-height: 0; border-radius: 8px; }
.badge img { display: block; height: 3.1rem; width: auto; }
.ios .playstore, .android .appstore { display: none; }
.terms { font-family: var(--ui); font-size: 0.9rem; color: var(--cream-dim); margin-top: 1rem; }

/* The sheet: paper on the stand, the engraving re-inked when the
   instrument changes. */
.sheet {
  background: var(--paper); color: var(--ink);
  border-radius: 6px;
  padding: clamp(1.1rem, 3vw, 2.2rem) clamp(1rem, 3.5vw, 2.6rem) clamp(1.3rem, 3vw, 2.2rem);
  box-shadow: 0 2.2rem 4rem rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.sheet-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.4rem 1.5rem; margin-bottom: 0.9rem; }
.sheet-title { font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.sheet-note { font-family: var(--ui); font-size: 0.8rem; color: var(--ink-soft); }
.plate { overflow-x: auto; }
.engraving svg { display: block; width: 100%; min-width: 34rem; height: auto; overflow: visible; }
.engraving.loading { opacity: 0.35; }
.engraving { animation: ink 0.45s ease both; }
@keyframes ink { from { opacity: 0.25; } to { opacity: 1; } }
/* Where an instrument has a recording, the phone stands in the sheet's
   place: play-along in landscape, silent, looping (home.js chooses). */
.clip { margin: 2.75rem auto 0; max-width: 54rem; }
.clip[hidden], .sheet[hidden] { display: none; }
.clip-phone { background: #0b0a09; padding: clamp(0.3rem, 1vw, 0.6rem); border-radius: clamp(1.3rem, 4.6vw, 2.8rem); box-shadow: 0 0 0 1px var(--rule), 0 1.5rem 3rem rgba(0, 0, 0, 0.45); }
.clip-phone video { display: block; width: 100%; height: auto; border-radius: clamp(1rem, 3.7vw, 2.25rem); background: #f4eedf; }
.clip-foot { font-family: var(--display); font-size: clamp(1.15rem, 2.4vw, 1.45rem); margin-top: 1.25rem; text-align: center; }
.clip-foot .label { display: block; margin-bottom: 0.4rem; }
.sheet-foot { font-family: var(--ui); font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.9rem; }

/* ---- sections */
section { padding-block: 3.75rem; border-top: 1px solid var(--rule); }
section > .wrap > h2 { margin-top: 0.7rem; max-width: 20em; }
.lede { color: var(--cream-dim); max-width: var(--measure); margin-top: 1rem; }

/* How the app works: one real screen, its parts numbered, and what each
   part does beside it. The numbers are the dots on the picture. (Nick,
   19 Nov 2026: the screen whole, not taken apart into enlarged bands.) */
.works { display: grid; grid-template-columns: minmax(0, 21rem) minmax(0, 1fr); gap: 3rem; align-items: start; margin-top: 2.5rem; }
.works figure { margin: 0; }
.works .screen { position: relative; }
.works .screen img { display: block; width: 100%; height: auto; border-radius: 2.2rem; border: 0.5rem solid #0b0a09; box-shadow: 0 0 0 1px var(--rule); }
.works .dot {
  position: absolute; width: 1.4rem; height: 1.4rem; margin: -0.7rem 0 0 -0.7rem;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--brass); color: var(--on-brass);
  font-family: var(--ui); font-weight: 700; font-size: 0.78rem; line-height: 1;
  box-shadow: 0 0 0 2px rgba(22, 21, 20, 0.9);
}
.parts { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.15rem; counter-reset: part; }
.parts li { counter-increment: part; display: grid; grid-template-columns: 1.7rem minmax(0, 1fr); column-gap: 0.9rem; }
.parts li::before {
  content: counter(part); grid-row: span 2; width: 1.7rem; height: 1.7rem;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--brass); color: var(--on-brass);
  font-family: var(--ui); font-weight: 700; font-size: 0.9rem; line-height: 1;
}
.parts h3 { font-family: var(--ui); font-weight: 600; font-size: 1rem; line-height: 1.7rem; margin: 0; }
.parts p { color: var(--cream-dim); font-size: 1rem; }
@media (max-width: 760px) {
  .works { grid-template-columns: 1fr; gap: 2rem; }
  .works .screen { max-width: 19rem; margin: 0 auto; }
}

/* Beside a printed book: a sheet again, since it is the argument. */
.beside { background: var(--paper); color: var(--ink); border-radius: 6px; margin-top: 2.25rem; overflow-x: auto; box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, 0.4); }
.beside table { width: 100%; border-collapse: collapse; min-width: 32rem; }
.beside th, .beside td { text-align: left; vertical-align: top; padding: 0.95rem 1.25rem; border-top: 1px solid var(--rule-paper); }
.beside thead th { border-top: 0; font-family: var(--ui); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.beside tbody th { font-family: var(--ui); font-weight: 600; font-size: 0.92rem; width: 1%; white-space: nowrap; padding-right: 2.5rem; }
.beside td.book, .beside thead th:nth-child(2) { width: 16rem; }
.beside td.book { color: var(--ink-soft); }
.beside td.app { font-weight: 600; }

/* The maker, in his own words. */
.maker { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.75rem; align-items: start; margin-top: 1.5rem; max-width: 48rem; }
.maker img { width: 6.5rem; height: 6.5rem; border-radius: 50%; display: block; }
.maker blockquote { font-family: var(--display); font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.4; }
.maker cite { display: block; font-family: var(--ui); font-style: normal; font-size: 0.92rem; color: var(--cream-dim); margin-top: 1rem; }
.maker cite b { color: var(--cream); font-weight: 600; }

/* Who it is for: three readers, one short answer each. */
.readers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; margin-top: 1.5rem; }
@media (max-width: 1000px) { .readers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.readers h3 { font-family: var(--ui); font-weight: 600; font-size: 1rem; color: var(--brass); margin-bottom: 0.4rem; }
.readers p { color: var(--cream-dim); font-size: 1rem; }

/* Questions: closed until asked. */
.faq { max-width: 44rem; margin-top: 1.5rem; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; list-style: none; padding: 1rem 2rem 1rem 0; position: relative; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.85rem; font-family: var(--ui); font-size: 1.3rem; color: var(--brass); }
.faq details[open] summary::after { content: "\2212"; }
.faq p { color: var(--cream-dim); padding: 0 0 1.1rem; max-width: var(--measure); }

/* The close. */
.close { text-align: center; padding-block: 4.5rem 3.5rem; }
.close h2 { margin: 0 auto; }
.close .ask { justify-content: center; }
.close .terms { margin-top: 1.1rem; }

footer { border-top: 1px solid var(--rule); padding-block: 2rem 6.5rem; font-family: var(--ui); font-size: 0.88rem; color: var(--cream-dim); }
footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
footer p { margin-top: 1rem; }

/* The ask, always in reach on a phone: build.py's buybar(), shown by
   site.js whenever no store badge is in view. */
.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; align-items: center; gap: 0.75rem;
  background: var(--stage-rise); border-top: 1px solid var(--rule);
  padding-top: 0.7rem;
  padding-bottom: calc(0.7rem + env(safe-area-inset-bottom, 0px));
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
  font-family: var(--ui);
  transition: translate 0.25s ease, opacity 0.25s ease;
}
.buybar.away { translate: 0 110%; opacity: 0; pointer-events: none; }
.buybar .mark { width: 1.9rem; height: 1.98rem; flex: none; }
.buybar .mark svg { display: block; width: 100%; height: 100%; }
.buybar .mark .horizon { fill: var(--stage-rise); }
.buybar .mark .bar { fill: var(--cream-dim); }
.buybar .words { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.buybar .name { font-weight: 600; color: var(--cream); font-size: 0.95rem; }
.buybar .price { font-size: 0.82rem; color: var(--cream-dim); }
.buybar a { flex: none; font-weight: 600; font-size: 0.92rem; background: var(--brass); color: var(--on-brass); padding: 0.6rem 1.1rem; border-radius: 999px; text-decoration: none; }
.buybar .playstore { display: none; }
.android .buybar .playstore { display: inline-block; }
.android .buybar .appstore { display: none; }
@media (min-width: 761px) { .buybar { display: none !important; } }

@media (max-width: 760px) {
  /* The table on a phone: each row a small block, the book's answer and the
     app's one under the other, each named, so neither column is off screen. */
  .beside table { min-width: 0; display: block; }
  .beside thead { display: none; }
  .beside tbody, .beside tr, .beside tbody th, .beside td { display: block; width: auto; }
  .beside tr { padding: 1rem 1.1rem; border-top: 1px solid var(--rule-paper); }
  .beside tr:first-child { border-top: 0; }
  .beside tbody th, .beside td { padding: 0; border: 0; white-space: normal; }
  .beside tbody th { margin-bottom: 0.5rem; }
  .beside td.book, .beside td.app { width: auto; display: grid; grid-template-columns: 6.2rem minmax(0, 1fr); column-gap: 0.75rem; }
  .beside td.app { margin-top: 0.35rem; }
  .beside td::before { font-family: var(--ui); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); padding-top: 0.3rem; }
  .beside td.book::before { content: "Printed book"; }
  .beside td.app::before { content: "Daily Scales"; }
  .opening { padding-block: 1.25rem 3rem; gap: 2rem; }
  .readers { grid-template-columns: 1fr; }
  .maker { grid-template-columns: 1fr; gap: 1.1rem; }
  .maker img { width: 5rem; height: 5rem; }
  .bar .links { display: none; }
  section { padding-block: 3rem; }
}
@media (prefers-reduced-motion: reduce) { .engraving { animation: none; } }

/* Chinese, Japanese and Korean: their own serif faces, upright (a slanted
   kanji is a synthesised one), and breaks where the language allows them. */
:lang(ja) { --display: "ScoreAccidentals", "Literata", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif; --text: var(--display); }
:lang(ko) { --display: "ScoreAccidentals", "Literata", "AppleMyungjo", "Nanum Myeongjo", "Noto Serif KR", serif; --text: var(--display); }
:lang(zh-Hans) { --display: "ScoreAccidentals", "Literata", "Songti SC", "Noto Serif SC", "Source Han Serif SC", serif; --text: var(--display); }
:lang(zh-Hant) { --display: "ScoreAccidentals", "Literata", "Songti TC", "Noto Serif TC", "Source Han Serif TC", "PMingLiU", serif; --text: var(--display); }
:lang(ja) h1, :lang(ja) h2, :lang(ko) h1, :lang(ko) h2, :lang(zh-Hans) h1, :lang(zh-Hans) h2, :lang(zh-Hant) h1, :lang(zh-Hant) h2 { font-style: normal; }
:lang(ja) body, :lang(zh-Hans) body, :lang(zh-Hant) body { line-break: strict; }
:lang(ko) body { word-break: keep-all; }
