/* Graphite's front page (site/README.md). The colours, the type and the fading rules are the app's own: the Nocturne tokens in
   _ds/nocturne-…/styles.css, copied here by value so this folder stands alone. Nothing comes from another site: the font is the file
   beside this one, there is no script, and the page's own Content-Security-Policy line refuses anything else. */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(fonts/inter-latin.woff2) format('woff2'); }

:root {
  --bg: #161826;                        /* --color-bg */
  --surface: #232532;                   /* --color-surface */
  --text: #e9e9ed;                      /* --color-text */
  --accent: #9184d9;                    /* --color-accent */
  --accent-2: #a7a1db;                  /* --color-accent-2 */
  --accent-400: #b5abfc;                /* --color-accent-400: the scrollbar’s tick under the pointer */
  --line2: #3f424d;                     /* the app’s --gs-line2: the scrollbar’s line */
  --muted: rgba(233, 233, 237, 0.64);
  --faint: rgba(233, 233, 237, 0.4);
  --divider: rgba(233, 233, 237, 0.16); /* --color-divider */
  --audio: #d68fd4;                     /* a recording's colour on the app's song page */
  --pad: clamp(20px, 5vw, 56px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: radial-gradient(1100px 620px at 78% -12%, rgba(145, 132, 217, 0.17), transparent 62%), var(--bg);
  background-repeat: no-repeat; background-color: var(--bg);
  color: var(--text); font: 400 16px/1.55 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, ol, figure { margin: 0; }
ol { padding: 0; list-style: none; }
::selection { background: rgba(145, 132, 217, 0.3); }
.wrap { width: 100%; max-width: 1136px; margin: 0 auto; padding: 0 var(--pad); }
main { flex: 1; }

/* ---- the scrollbar is the app’s own (its .set-scroll rules): a thin line that fades at both ends, with an accent tick riding it.
        Where a browser has no ::-webkit-scrollbar it gets the thin accent bar the app falls back to. A phone draws its own. ---- */
@supports not selector(::-webkit-scrollbar) { html { scrollbar-width: thin; scrollbar-color: var(--accent) transparent; } }
html::-webkit-scrollbar { width: 3px; }
html::-webkit-scrollbar-track { background: linear-gradient(180deg, transparent, var(--line2) 5%, var(--line2) 95%, transparent); }
html::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }
html::-webkit-scrollbar-thumb:hover { background: var(--accent-400); }

/* ---- the top line: the app's mark, its name, and where it stands today ---- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; display: block; }
.mark path { stroke: var(--accent); stroke-linecap: round; fill: none; }
.mark circle { fill: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border: 1px solid var(--divider); border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(145, 132, 217, 0.22); flex: none; }

/* ---- the app's rule: it fades at both ends ---- */
.hr { height: 1px; border: 0; margin: 0; background: linear-gradient(to right, transparent, var(--divider) 48px, var(--divider) calc(100% - 48px), transparent); }

/* ---- the foot ---- */
.foot { display: flex; justify-content: space-between; gap: 16px; padding-top: 22px; padding-bottom: 34px; font-size: 12.5px; color: var(--faint); letter-spacing: 0.02em; }
.foot-rule { margin-top: clamp(52px, 8vw, 96px); }

/* ============================ the page: built round a drawing of a song (index.html) ============================ */
.hero { padding-top: clamp(36px, 8vh, 92px); }
.hero h1 { font-size: clamp(42px, 7.4vw, 88px); font-weight: 500; line-height: 1.02; letter-spacing: -0.035em; }
.lead { margin-top: clamp(18px, 2.4vw, 28px); max-width: 33em; font-size: clamp(17px, 1.55vw, 20px); line-height: 1.5; color: var(--muted); }
.lead b { display: block; font-weight: 400; color: var(--text); }

.shot { margin-top: clamp(34px, 5.5vw, 68px); }
.song { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; padding: 12px 18px 18px 18px; border: 1px solid var(--divider); border-radius: 14px; background: rgba(22, 24, 38, 0.72); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 34px 90px rgba(0, 0, 0, 0.45); }
.lanes, .names { display: grid; grid-auto-rows: 36px; row-gap: 7px; }
.lanes { position: relative; grid-template-rows: 18px; }
.names { grid-template-rows: 18px; }
.ruler { display: grid; grid-template-columns: repeat(16, 1fr); font-size: 10px; line-height: 18px; color: var(--faint); font-variant-numeric: tabular-nums; }
.ruler span { padding-left: 4px; border-left: 1px solid rgba(233, 233, 237, 0.1); }
.ruler span:nth-child(4n + 1) { color: var(--muted); border-left-color: rgba(233, 233, 237, 0.3); }
.lane { position: relative; overflow: hidden; border-radius: 4px; background-color: rgba(233, 233, 237, 0.05);
  background-image: linear-gradient(to right, rgba(233, 233, 237, 0.12) 1px, transparent 1px), linear-gradient(to right, rgba(233, 233, 237, 0.06) 1px, transparent 1px);
  background-size: 25% 100%, 6.25% 100%; box-shadow: inset 0 0 0 1px rgba(233, 233, 237, 0.09); }
.lane.on { background-color: rgba(145, 132, 217, 0.17); box-shadow: inset 0 0 0 1px rgba(145, 132, 217, 0.75); }
.lane svg, .take svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.note { fill: none; stroke: #a99bea; stroke-width: 3px; vector-effect: non-scaling-stroke; }
.hit { fill: none; stroke: #bdb3f3; stroke-width: 4.5px; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.take { position: absolute; top: 3px; bottom: 3px; border: 1px solid rgba(214, 143, 212, 0.5); border-radius: 3px; background: rgba(214, 143, 212, 0.13); overflow: hidden; }
.take path { fill: var(--audio); }
.take b { position: absolute; left: 3px; top: 3px; padding: 2px 4px; border-radius: 2px; background: rgba(22, 24, 38, 0.62); font-size: 9px; line-height: 1; font-weight: 600; color: #f6e3f5; letter-spacing: 0.03em; }
.take-1 { left: 12.5%; width: 50%; }
.take-2 { left: 81.25%; width: 18.75%; }
.head { position: absolute; top: 20px; bottom: 0; left: 46.875%; width: 1px; background: #d9d3fb; box-shadow: 0 0 10px rgba(145, 132, 217, 0.9); }
.head::before { content: ''; position: absolute; top: -5px; left: -3px; width: 7px; height: 7px; border-radius: 1px; background: #d9d3fb; transform: rotate(45deg); }
.names span { display: flex; align-items: center; gap: 14px; min-width: 132px; font-size: 11px; font-weight: 600; letter-spacing: 0.11em; white-space: nowrap; }
.names i { font-style: normal; font-weight: 500; font-size: 10px; letter-spacing: 0.06em; color: var(--faint); }
.names i:first-of-type { margin-left: auto; }
.shot figcaption { margin-top: 14px; font-size: 13px; color: var(--faint); }

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(26px, 3.4vw, 48px); margin-top: clamp(44px, 6.5vw, 84px); }
.facts h2 { margin-bottom: 10px; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-2); }
.facts p { font-size: 15.5px; line-height: 1.55; color: var(--muted); max-width: 30em; }


/* ============================ a narrow screen, then a phone ============================ */
@media (max-width: 1000px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .hit { stroke-width: 3px; }
  .song { column-gap: 10px; padding: 8px 12px 12px 12px; border-radius: 12px; }
  .lanes, .names { grid-auto-rows: 26px; row-gap: 5px; }
  .names span { min-width: 0; font-size: 9.5px; letter-spacing: 0.08em; }
  .names i, .take b { display: none; }
  .ruler span { border-left-color: transparent; padding-left: 3px; font-size: 9px; }
  .ruler span:not(:nth-child(4n + 1)) { color: transparent; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .facts p { font-size: 16px; }
}
@media (max-width: 380px) {
  .chip { letter-spacing: 0.06em; padding: 5px 10px 5px 8px; }
  .hero h1 { font-size: 38px; }
}
