/* Local display font: used only by the live HTML title. */
@font-face { font-family: "Masque"; src: url("assets/MASQUE__.ttf") format("truetype"); font-style: normal; font-weight: 400; font-display: swap; }
/* Customize theme colors here; the accent is shared by both system themes. */
:root { color-scheme: light; --paper: #fafafa; --ink: #222222; --muted: #707070; --line: #dddddd; --accent: #FF4D00; --wave: #999999; --hover: #eeeeee; --contour-opacity: .065; }
@media (prefers-color-scheme: dark) {
  :root { color-scheme: dark; --paper: #141414; --ink: #f5f5f5; --muted: #aaaaaa; --line: #383838; --wave: #777777; --hover: #292929; --contour-opacity: .055; }
}
* { box-sizing: border-box; }
body { position: relative; isolation: isolate; min-height: 100vh; margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
/* Repeat a locally generated seamless vector mask over the entire document. */
body::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: var(--ink); opacity: var(--contour-opacity); -webkit-mask: url("assets/topographic.svg") repeat 0 0 / 720px 720px; mask: url("assets/topographic.svg") repeat 0 0 / 720px 720px; animation: contour-drift 180s linear infinite; }
/* One complete tile per cycle keeps the slow diagonal drift seamless. */
@keyframes contour-drift {
  to { -webkit-mask-position: 720px 720px; mask-position: 720px 720px; }
}
main { position: relative; z-index: 2; width: min(100% - 64px, 920px); margin: 0 auto; padding: 100px 0 32px; }
/* Decorative only: placement is checked against content bounds in script.js. */
#code-background { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; user-select: none; }
.code-snippet { position: absolute; margin: 0; color: var(--muted); font: 11px/1.5 Consolas, "Courier New", monospace; white-space: pre; opacity: .4; transition: opacity 2.2s ease; }
.code-snippet.is-fading { opacity: 0; }
.code-accent, .code-cursor { color: var(--accent); }
.code-cursor { animation: code-blink 1.5s steps(1) infinite; }
@keyframes code-blink { 0%, 60% { opacity: .8; } 61%, 100% { opacity: 0; } }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 10px; letter-spacing: 1.6px; font-weight: 600; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
h1 { margin: 26px 0 20px; font-family: "Masque", Arial, Helvetica, sans-serif; font-size: clamp(34px, 6.5vw, 76px); font-weight: 400; letter-spacing: .01em; line-height: 1.12; }
.title-period { color: var(--accent); }
.subtitle { max-width: 450px; color: var(--muted); font-size: 16px; line-height: 1.7; margin: 0; }
nav { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 27px; }
nav a { color: var(--ink); font-size: 12px; text-decoration: none; padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; transition: color .18s ease, border-color .18s ease, background-color .18s ease, transform .18s ease; }
nav a:hover, nav a:focus-visible { color: var(--accent); border-color: var(--accent); background: rgb(255 77 0 / 6%); }
nav a:active { transform: translateY(1px); background: rgb(255 77 0 / 10%); }
.collection { margin-top: 75px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
h2 { margin: 0; font-size: 12px; font-weight: 500; }
#track-count { font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.track { display: grid; grid-template-columns: 28px 210px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 32px 0; border-bottom: 1px solid var(--line); }
.track-number { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.track h3 { font-size: 16px; font-weight: 500; letter-spacing: -.3px; margin: 0 0 9px; }
.track-meta { color: var(--muted); font-size: 10px; letter-spacing: .5px; }
.waveform { width: 100%; height: 60px; display: block; cursor: pointer; touch-action: none; user-select: none; }
.waveform[aria-disabled="true"] { cursor: default; }
.waveform-wrap { min-width: 0; position: relative; }
.wave-message { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; color: var(--muted); pointer-events: none; }
.controls { display: flex; gap: 8px; }
button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; color: var(--ink); background: transparent; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease; }
button svg { width: 14px; height: 14px; fill: currentColor; }
button.play { background: var(--ink); border-color: var(--ink); color: var(--paper); }
button.play:hover, .track.is-playing button.play { background: var(--accent); border-color: var(--accent); }
button.stop:hover { border-color: var(--ink); background: var(--hover); }
button:disabled { opacity: .35; cursor: default; }
button:focus-visible, a:focus-visible, .waveform:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 42px; color: var(--muted); font-size: 11px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 760px) {
  main { padding-top: 65px; }
  .track { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 14px; padding: 26px 0; }
  .waveform-wrap { grid-column: 2 / 4; grid-row: 2; }
  .controls { grid-column: 3; grid-row: 1; }
  .collection { margin-top: 55px; }
}
@media (max-width: 420px) {
  main { width: calc(100% - 40px); padding-top: 48px; }
  .eyebrow { font-size: 8px; letter-spacing: 1.2px; }
  .subtitle { font-size: 14px; }
  .track h3 { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  #code-background { display: none; }
  body::before { animation: none; }
  .code-cursor { animation: none; }
}
