/* Symphony's site. The look is a piano roll: indigo lanes, LED orange for
   what is live, violet for wires and structure. Hand-written, no build step. */

@font-face { font-family: "Unbounded"; src: url("/static/fonts/Unbounded.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Karla"; src: url("/static/fonts/Karla.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/static/fonts/IBMPlexMono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/static/fonts/IBMPlexMono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #eeecf6; --lane: #ffffff; --lane-b: #f3f1fa; --key: #ffffff; --key-b: #17122e;
  --line: #dedaee; --bar: #b9b2d9; --node: #ffffff;
  --text: #17122e; --sub: #5a5478;
  --accent: #e25400; --accent-ink: #b24200; --on: #ffffff; --two: #5b3bff;
  --soft: #fde6d6; --glow: none; --lift: 0 12px 28px rgba(226, 84, 0, .18);
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Karla", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #120d24; --lane: #1a1436; --lane-b: #150f2c; --key: #e9e5fb; --key-b: #0b0818;
    --line: #2c2356; --bar: #463a85; --node: #251c4d;
    --text: #f2efff; --sub: #a39cc9;
    --accent: #ff7a1a; --accent-ink: #ff9547; --on: #1a0c00; --two: #8f73ff;
    --soft: #3a2210; --glow: drop-shadow(0 0 5px #ff7a1a); --lift: 0 12px 32px rgba(255, 122, 26, .28);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #120d24; --lane: #1a1436; --lane-b: #150f2c; --key: #e9e5fb; --key-b: #0b0818;
  --line: #2c2356; --bar: #463a85; --node: #251c4d;
  --text: #f2efff; --sub: #a39cc9;
  --accent: #ff7a1a; --accent-ink: #ff9547; --on: #1a0c00; --two: #8f73ff;
  --soft: #3a2210; --glow: drop-shadow(0 0 5px #ff7a1a); --lift: 0 12px 32px rgba(255, 122, 26, .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; }
h1, h2, h3, h4, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
code { font-family: var(--mono); font-size: .92em; }
:focus-visible { outline: 2px solid var(--two); outline-offset: 3px; border-radius: 3px; }
.wrap { max-width: 1160px; margin-inline: auto; padding-inline: 20px; }
.dim { color: var(--sub); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on); padding: 8px 14px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; padding-block: 14px; }
.wordmark { font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; margin-right: auto; }
.mark { width: 24px; height: 24px; }
.mark-a { fill: var(--accent); }
.mark-b { fill: var(--two); }
.top nav { display: flex; gap: 24px; }
.top nav a { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--sub); padding-block: 6px; }
.top nav a:hover { color: var(--text); }
.theme { width: 44px; height: 24px; border-radius: 99px; border: 1px solid var(--bar); background: var(--lane); padding: 0; position: relative; cursor: pointer; }
.theme-knob { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); transition: transform .18s ease; }
:root[data-theme="dark"] .theme-knob { transform: translateX(20px); }

/* Type */
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.03em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: 1.02; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.4rem); line-height: 1.12; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
.lede { color: var(--sub); font-size: 1.25rem; line-height: 1.5; max-width: 46ch; }
.section-lede { color: var(--sub); max-width: 62ch; margin-top: 14px; }
.story { color: var(--sub); max-width: 62ch; margin-top: 24px; }
.caption { color: var(--sub); font-size: .95rem; max-width: 72ch; margin-top: 14px; }

/* New to Go? The few words the page leans on, said once */
.gloss { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 22px; }
.gloss-lede { font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sub); }
.terms { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 28px; margin: 14px 0 0; }
.term dt { font-family: var(--display); font-weight: 500; font-size: .95rem; }
.term dd { margin: 4px 0 0; color: var(--sub); font-size: .95rem; line-height: 1.45; }

/* Buttons and links */
.button { display: inline-block; background: var(--accent); color: var(--on); font-weight: 600; text-decoration: none; padding: .7em 1.3em; border-radius: 6px; }
.button:hover { filter: brightness(1.08); }
.plain { background: none; border: 0; padding: 0; font: inherit; color: var(--text); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--bar); cursor: pointer; }
.plain:hover { text-decoration-color: var(--accent); }
.get { display: flex; align-items: center; gap: 14px 22px; flex-wrap: wrap; min-height: 3.2em; }
.hero .get .button { font-size: 1.08rem; padding: .85em 1.5em; box-shadow: var(--lift); }
.hero .get .button:hover { transform: translateY(-1px); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 4px; }
.facts li { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .76rem; letter-spacing: .09em; text-transform: uppercase; color: var(--sub); }

/* Hero: the headline, the download, then the function as code beside its roll */
.hero { padding-block: 56px 56px; }
.hero-top { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; margin-bottom: 40px; }
.stage { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.hero-listing { font-size: .74rem; line-height: 1.7; padding-block: 12px; }
.stage .deck { display: flex; align-items: center; }
.hero.slim { padding-block: 56px 40px; }
.hero.slim .wrap { display: flex; flex-direction: column; gap: 18px; }

/* The roll */
.deck { border: 1px solid var(--bar); border-radius: 10px; overflow-x: auto; background: var(--lane); }
.roll { display: block; width: 100%; min-width: 640px; height: auto; }
.roll .ruler, .roll .lane.black { fill: var(--lane-b); }
.roll .lane { fill: var(--lane); }
.roll .beat { stroke: var(--line); stroke-width: .6; }
.roll .bar { stroke: var(--bar); stroke-width: 1; }
.roll .bar-no { font-family: var(--mono); font-size: 8px; fill: var(--sub); }
.roll .key { fill: var(--key); stroke: var(--bar); stroke-width: .6; }
.roll .key-black { fill: var(--key-b); }
.roll .wire { fill: none; stroke: var(--two); stroke-width: 1.3; }
.roll .wire.hot { stroke: var(--accent); stroke-width: 1.8; }
.roll .box { fill: var(--node); stroke: var(--two); stroke-width: 1.1; }
.roll .label { font-family: var(--mono); font-weight: 500; font-size: 7.8px; text-anchor: middle; fill: var(--text); }
.roll .pin { fill: var(--bg); stroke: var(--two); stroke-width: 1.2; }
.roll .node.hot .box, .roll .node.on .box { fill: var(--accent); stroke: var(--accent); filter: var(--glow); }
.roll .node.hot .label, .roll .node.on .label { fill: var(--on); }
.roll .node.hot .pin, .roll .node.on .pin { stroke: var(--accent); }
.roll .node[tabindex] { cursor: pointer; outline: none; }
.roll .playhead-line { fill: var(--text); }
.roll .playhead-glow { opacity: .55; }
.roll .glow-a { stop-color: var(--accent); stop-opacity: 0; }
.roll .glow-b { stop-color: var(--accent); stop-opacity: .45; }
.roll .msg { opacity: 0; }
.roll .msg rect { fill: var(--accent); filter: var(--glow); }
.roll .msg text { font-family: var(--mono); font-weight: 500; font-size: 7.8px; text-anchor: middle; fill: var(--on); }
.roll .count { font-family: var(--mono); font-weight: 500; font-size: 7.8px; text-anchor: start; fill: var(--accent); transform-box: fill-box; transform-origin: left center; }
.roll .key.k-entry, .roll .key.k-switch, .roll .key.k-if, .roll .key.k-set, .roll .key.k-return { transform-box: fill-box; }

/* The playhead walks the roll; each node on its path lights as it arrives. */
@keyframes play { from { transform: translateX(0); } to { transform: translateX(576px); } }
@keyframes lit { 0% { fill: var(--node); filter: none; } .5%, 21% { fill: var(--accent); filter: var(--glow); } 22%, 100% { fill: var(--node); filter: none; } }
@keyframes lit-label { 0% { fill: var(--text); } .5%, 21% { fill: var(--on); } 22%, 100% { fill: var(--text); } }
@keyframes lit-line { 0% { background: none; box-shadow: none; } .5%, 21% { background: var(--soft); box-shadow: inset 3px 0 0 var(--accent); } 22%, 100% { background: none; box-shadow: none; } }
@keyframes press { 0% { fill: var(--key); transform: none; } .5%, 21% { fill: var(--accent); transform: translateX(3px); } 22%, 100% { fill: var(--key); transform: none; } }
@keyframes press-black { 0% { fill: var(--key-b); transform: none; } .5%, 21% { fill: var(--accent-ink); transform: translateX(3px); } 22%, 100% { fill: var(--key-b); transform: none; } }
@keyframes arrive { 0% { transform: translateX(-30px); opacity: 0; } 3% { opacity: 1; } 11% { transform: translateX(18px); opacity: 1; } 13% { transform: translateX(18px); opacity: 0; } 100% { opacity: 0; } }
@keyframes pop { 0% { transform: scale(1); } .5% { transform: scale(1.5); } 6%, 100% { transform: scale(1); } }
@media (prefers-reduced-motion: no-preference) {
  .roll.live .playhead { animation: play 9s linear infinite; }
  .roll.live .node.hot .box { animation: lit 9s linear infinite; fill: var(--node); filter: none; }
  .roll.live .node.hot .label { animation: lit-label 9s linear infinite; fill: var(--text); }
  .roll.live .key.k-entry, .roll.live .key.k-switch, .roll.live .key.k-if, .roll.live .key.k-set, .roll.live .key.k-return { animation: press 9s linear infinite; }
  .roll.live .key-black.k-entry, .roll.live .key-black.k-switch, .roll.live .key-black.k-if, .roll.live .key-black.k-set, .roll.live .key-black.k-return { animation: press-black 9s linear infinite; }
  .stage.live .line.n-entry, .stage.live .line.n-switch, .stage.live .line.n-if, .stage.live .line.n-set, .stage.live .line.n-return { animation: lit-line 9s linear infinite; }
  .roll.live .node.hot.node-entry .box, .roll.live .node.hot.node-entry .label, .roll.live .key.k-entry, .roll.live .key-black.k-entry, .stage.live .line.linked.n-entry { animation-delay: .09s; }
  .roll.live .node.hot.node-switch .box, .roll.live .node.hot.node-switch .label, .roll.live .key.k-switch, .roll.live .key-black.k-switch, .stage.live .line.linked.n-switch { animation-delay: 1.62s; }
  .roll.live .node.hot.node-if .box, .roll.live .node.hot.node-if .label, .roll.live .key.k-if, .roll.live .key-black.k-if, .stage.live .line.linked.n-if { animation-delay: 3.69s; }
  .roll.live .node.hot.node-set .box, .roll.live .node.hot.node-set .label, .roll.live .key.k-set, .roll.live .key-black.k-set, .stage.live .line.linked.n-set { animation-delay: 5.81s; }
  .roll.live .node.hot.node-return .box, .roll.live .node.hot.node-return .label, .roll.live .key.k-return, .roll.live .key-black.k-return, .stage.live .line.linked.n-return { animation-delay: 7.97s; }
  .roll.live .msg { animation: arrive 9s linear infinite; }
  .roll.live .count { animation: pop 9s linear infinite; animation-delay: 5.9s; }
  .theme-knob { transition: transform .18s ease; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .roll .playhead { transform: translateX(150px); }
  .roll .msg { opacity: 1; transform: translateX(18px); }
}

/* Sections: each begins on a bar line */
.band { padding-block: 72px; border-top: 1px solid var(--bar); }
.band.first { border-top: 0; padding-top: 0; }
.band h2 + .tracks, .band .section-lede + .tracks, .band .section-lede + .pairing { margin-top: 36px; }

/* Source beside its roll */
.pairing { display: grid; grid-template-columns: minmax(0, 350px) minmax(0, 1fr); gap: 20px; align-items: start; }
.listing { font-family: var(--mono); font-size: .78rem; line-height: 1.75; background: var(--lane); border: 1px solid var(--bar); border-radius: 10px; padding: 14px 0; overflow-x: auto; }
.line { display: block; white-space: pre; padding-inline: 18px; min-width: max-content; }
.line.linked { cursor: pointer; }
.line.linked:hover, .line.on { background: var(--soft); box-shadow: inset 3px 0 0 var(--accent); }

/* Tracks: a name in the track header, a clip beside it */
.tracks { display: flex; flex-direction: column; }
.track { display: grid; grid-template-columns: 200px minmax(0, 1fr); border-top: 1px solid var(--line); }
.track:last-child { border-bottom: 1px solid var(--line); }
.track-head { display: flex; align-items: center; align-content: flex-start; flex-wrap: wrap; gap: 6px 10px; padding: 20px 16px 20px 0; font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--sub); align-self: start; }
.led { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); filter: var(--glow); flex: none; }
.clip { margin-block: 12px; background: var(--node); border: 1px solid var(--bar); border-radius: 8px; padding: 18px 22px; display: flex; flex-direction: column; gap: 8px; }
.clip-words { display: flex; flex-direction: column; gap: 8px; }
.clip.pictured { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 46%); gap: 20px 28px; align-items: center; padding-right: 18px; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--bar); background: var(--lane); }
.clip h3 { font-family: var(--display); font-weight: 500; font-size: 1.05rem; letter-spacing: -.01em; line-height: 1.3; }
.clip p { color: var(--sub); max-width: 64ch; }
.clip-link { align-self: flex-start; font-size: .95rem; }
.lede a, .foot .dim a { color: inherit; text-underline-offset: 4px; text-decoration-color: var(--bar); margin-left: 0; }
.lede a:hover, .foot .dim a:hover { text-decoration-color: var(--accent); }

/* Closing */
.closing-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

/* Releases */
.notice { background: var(--node); border: 1px solid var(--bar); border-radius: 8px; padding: 16px 20px; margin-bottom: 24px; max-width: 60ch; }
.release .track-head { font-size: .78rem; }
.release .version { font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: 0; text-transform: none; color: var(--text); }
.release time { flex-basis: 100%; letter-spacing: .04em; text-transform: none; }
.tag { background: var(--accent); color: var(--on); border-radius: 4px; padding: 1px 7px; font-size: .68rem; letter-spacing: .1em; }
.file .tag { font-family: var(--mono); text-transform: uppercase; align-self: center; }
.tag.quiet { background: none; color: var(--sub); border: 1px solid var(--bar); }
.release .clip { max-width: none; gap: 14px; }
.files { display: flex; flex-direction: column; gap: 10px; }
.file { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr) auto; align-items: baseline; gap: 6px 20px; }
.file-meta .tag { margin-left: 10px; }
.file-name { font-family: var(--mono); font-weight: 500; color: var(--accent-ink); text-underline-offset: 4px; overflow-wrap: anywhere; }
.file-meta { color: var(--sub); font-size: .95rem; }
.sum { justify-self: end; display: inline-flex; align-items: baseline; gap: 10px; font-family: var(--mono); font-size: .8rem; color: var(--sub); font-variant-numeric: tabular-nums; }
.copy { font: inherit; color: var(--text); background: none; border: 1px solid var(--bar); border-radius: 4px; padding: 1px 8px; cursor: pointer; min-width: 5.2em; }
.copy:hover { border-color: var(--accent); }
.notes-open { align-self: flex-start; font-size: .95rem; }
.notes { display: flex; flex-direction: column; gap: 8px; color: var(--sub); max-width: 68ch; }
.notes:empty { display: none; }
.notes h4 { font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text); margin-top: 6px; }
.notes ul { list-style: disc; padding-left: 1.2em; }
.verify { margin-top: 28px; font-size: .95rem; }

/* Foot */
.foot { border-top: 1px solid var(--bar); padding-block: 28px 40px; font-size: .95rem; }
.foot-row { display: flex; align-items: center; gap: 12px 28px; flex-wrap: wrap; }
.foot .wordmark { margin-right: 0; font-size: .95rem; }
.foot a { margin-left: auto; text-underline-offset: 4px; }

@media (max-width: 820px) {
  .hero { padding-block: 36px 40px; }
  .hero-top { margin-bottom: 28px; }
  .stage { grid-template-columns: minmax(0, 1fr); }
  .hero-listing { display: none; }
  .pairing { grid-template-columns: minmax(0, 1fr); }
  .band { padding-block: 52px; }
  .track { grid-template-columns: minmax(0, 1fr); }
  .track-head { padding: 16px 0 0; }
  .release time { flex-basis: auto; }
  .file { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .sum { justify-self: start; }
  .clip.pictured { grid-template-columns: minmax(0, 1fr); padding-right: 22px; }
  .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top nav { gap: 18px; order: 3; flex-basis: 100%; }
}
