/* Amber Burch: shared tokens and parts.
   Bone and warm black, stone grey, one ember accent; Handjet lamp type for names and main links, Fragment Mono for
   small text. .night turns the lights down (works). */
:root {
  --bone: #e9e4da;
  --ink: #1a1916;
  --stone: #8a857b;
  --faint: #d6d0c4;
  --rule: #d3cdc0;
  --ember: #b8683f;
  --void: #0b0c0c;
  --bg: var(--bone);
  --fg: var(--ink);
  --dim: #67625a;          /* stone, deepened so small type reads clearly on bone */
  --lamp: 26, 25, 22;
  --led: "Handjet", ui-monospace, monospace;
  --mono: "Fragment Mono", ui-monospace, Menlo, monospace;
  --edge: clamp(16px, 2.5vw, 36px);
  color-scheme: light;
}
.night {
  --bg: #12110f;
  --fg: #e9e4da;
  --dim: #8a857b;
  --faint: #2a2824;
  --rule: #2e2b27;
  --lamp: 233, 228, 218;
  color-scheme: dark;
}
html { background: var(--bg); overscroll-behavior: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--led); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; transition: font-variation-settings .45s ease; }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 1px solid var(--ember); outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.small { font-family: var(--mono); font-weight: 300; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.small b { font-weight: 400; color: var(--fg); }
.num { font-variant-numeric: tabular-nums; }

/* hover: the dashes turn. Only where a pointer can hover: under a finger a hover would stay lit after the tap. */
@keyframes turn { from { font-variation-settings: "ELSH" 4, "ELGR" 1; } to { font-variation-settings: "ELSH" 4.9, "ELGR" 1; } }
.led-link:focus-visible { animation: turn 1.6s linear infinite; }
@media (hover: hover) { .led-link:hover { animation: turn 1.6s linear infinite; } }
@media (prefers-reduced-motion: reduce) { .led-link:hover, .led-link:focus-visible { animation: none; } }

/* the mute control: sound starts with the first touch of the field; this turns it off and on again */
.mute { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; background: none; border: 1px solid currentColor; border-radius: 99px; padding: 5px 11px 4px; cursor: pointer; color: var(--fg); font-family: var(--mono); font-weight: 300; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.mute i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .25; transition: opacity .3s, background .3s; }
.mute[data-state="live"] i { opacity: 1; background: var(--ember); }
.mute[data-state="muted"] { color: var(--dim); }

/* the name's two forms sit on top of each other; name.js dissolves between them */
[data-lamps] { pointer-events: none; }
[data-lamps] .lamp { position: relative; display: inline-block; transition: color .25s linear; }
[data-lamps] .lamp-b { position: absolute; left: 0; top: 0; }
[data-lamps] .lamp-a, [data-lamps] .lamp-b { display: inline-block; will-change: opacity; white-space: pre; }

.lede { margin: 0; max-width: 40ch; font-family: var(--mono); font-weight: 300; font-size: 13px; line-height: 1.7; letter-spacing: .02em; }
p.big-line, .big-line { font-family: var(--led); font-size: clamp(26px, 2.5vw, 38px); line-height: 1.04; font-weight: 300; margin: 0; max-width: 26ch; }

/* index rows, as on the åtrå page */
ol.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
ol.rows > li > a { display: grid; grid-template-columns: 4ch minmax(0, 1fr) auto; grid-template-areas: "n t s" ". d d"; align-items: baseline; column-gap: 16px; padding-block: 12px 10px; border-bottom: 1px solid var(--rule); }
ol.rows .n { grid-area: n; font-family: var(--mono); font-size: 10px; color: var(--dim); font-variant-numeric: tabular-nums; }
ol.rows .t { grid-area: t; font-size: clamp(38px, 4.6vw, 72px); line-height: .86; font-weight: 200; transition: font-variation-settings .45s ease; }
ol.rows .d { grid-area: d; margin-top: 6px; font-family: var(--mono); font-weight: 300; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
ol.rows .s { grid-area: s; font-family: var(--mono); font-weight: 300; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
ol.rows a:focus-visible .t { animation: turn 1.6s linear infinite; }
@media (hover: hover) { ol.rows a:hover .t { animation: turn 1.6s linear infinite; } }
@media (prefers-reduced-motion: reduce) { ol.rows a:hover .t, ol.rows a:focus-visible .t { animation: none; } }
@media (min-width: 900px) {
  ol.rows > li > a { grid-template-columns: 4ch minmax(0, 1fr) minmax(0, 1.1fr) auto; grid-template-areas: "n t d s"; }
  ol.rows .d { margin-top: 0; }
}
.placeholder { color: #94512f; }      /* ember, deepened to read on bone */

/* works stage */
.stage { background: var(--void); aspect-ratio: 16 / 9; width: 100%; position: relative; }
.stage canvas { width: 100%; height: 100%; display: block; }
.stage canvas[hidden] { display: none; }
.stage .fade { position: absolute; inset: 0; background: var(--void); opacity: 0; pointer-events: none; transition: opacity .6s; }
.stage.changing .fade { opacity: 1; }

.staging-flag { position: fixed; z-index: 50; left: 50%; top: calc(4px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); display: flex; gap: 10px; align-items: center; font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--ember); background: var(--bg); padding: 3px 8px; border: 1px dashed var(--ember); border-radius: 99px; white-space: nowrap; opacity: .92; }

@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .7s; animation-timing-function: ease; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* small text buttons */
.plain-btn { background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--dim); font: inherit; letter-spacing: inherit; text-transform: inherit; }
@media (hover: hover) { .plain-btn:hover { color: var(--fg); } }

/* touch: the small controls keep their look and gain a finger-sized target around them */
.mute, .plain-btn { position: relative; }
.mute::before, .plain-btn::before { content: ""; position: absolute; inset: -11px -6px; }

/* for screen readers only */
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
