/* BenchFocus home. One typeface (Bitter, self-hosted); one bold moment (a light coming into focus). */
@font-face { font-family: "Bitter"; src: url("/fonts/Bitter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bitter"; src: url("/fonts/Bitter-italic-var.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
:root {
  --paper: #f7f8f9; --ink: #1a1d22; --ink-2: #59606b; --ink-3: #8a919b; --rule: #dde1e6;
  --wall: #eceef1; --steel: #2b333d; --lamp: #f2c230; --link: #1f4fbf;
  --type: "Bitter", Georgia, serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121417; --ink: #eceef1; --ink-2: #a4abb5; --ink-3: #78808b; --rule: #272c33;
    --wall: #1b1f24; --steel: #c9d0d8; --link: #8fb0ff; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #121417; --ink: #eceef1; --ink-2: #a4abb5; --ink-3: #78808b; --rule: #272c33;
  --wall: #1b1f24; --steel: #c9d0d8; --link: #8fb0ff; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.125rem/1.7 var(--type); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 3px; }
.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }

/* header */
.top .wrap { display: flex; align-items: center; gap: 2rem; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand svg { width: 28px; height: 28px; }
.top nav { margin-left: auto; display: flex; gap: 1.75rem; font-size: 1rem; }
.top nav a { color: var(--ink-2); text-decoration: none; }
.top nav a:hover { color: var(--ink); }

/* the band: header and hero on a dark stage (in both themes), lit by the fresnel in .hero-art */
.band { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: min(100svh, 860px);
  background: radial-gradient(120% 90% at 78% 30%, #171a1f 0, #0f1114 60%, #0c0e10 100%);
  --ink: #eef0f2; --ink-2: #aab1bb; --ink-3: #7c848f; --rule: #262b32; --link: #8fb0ff;
  color: var(--ink); color-scheme: dark; }
.band > .top, .band > .hero { position: relative; z-index: 1; }
.band .brand svg { box-shadow: 0 0 0 1px rgba(255,255,255,0.16); border-radius: 7px; }
.hero-art { position: absolute; z-index: 0; top: 0; height: 100%; width: auto; max-width: none; aspect-ratio: 1440 / 820;
  right: max(0px, (100% - 1440px) / 2); pointer-events: none; }
.hero { flex: 1; display: flex; align-items: center; padding: 2rem 0 6.5rem; }
.hero .copy { max-width: min(38rem, 56%); }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); line-height: 1.04; font-weight: 600; letter-spacing: -0.025em; max-width: 13ch; text-wrap: balance;
  text-shadow: -11px 10px 18px rgba(0,0,0,0.6); }
.hero p { margin-top: 1.6rem; color: var(--ink-2); font-size: clamp(1.1rem, 1.6vw, 1.25rem); max-width: 34ch;
  text-shadow: -6px 6px 12px rgba(0,0,0,0.65); }

/* the bench figure and game, beside the explainer */
.story.bench { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; }
.bench .text { margin-top: 1.4rem; }
.stage { margin: 0; border-radius: 20px; overflow: hidden; background: #14171c;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.06), 0 40px 70px -40px rgba(10,12,16,0.55); }
.stage svg { width: 100%; height: auto; }

/* the bench focus game under the hero light */
.focus { margin-top: 1rem; padding: 0 0.25rem; font-size: 0.85rem; color: var(--ink-3); }
.focus label { display: block; color: var(--ink-2); font-weight: 600; font-size: 0.95rem; margin-bottom: 0.45rem; }
.focus label span { font-weight: 400; color: var(--ink-3); font-size: 0.85rem; margin-left: 0.4rem; }
.focus .track { position: relative; }
.focus input { display: block; width: 100%; margin: 0; accent-color: #f2c230; cursor: pointer; }
.focus input:focus-visible { outline: 2px solid #f2c230; outline-offset: 4px; border-radius: 4px; }
.focus .flat-mark { position: absolute; top: -0.45rem; bottom: -0.45rem; width: 2px; margin-left: -1px; border-radius: 1px;
  background: #2fa66a; pointer-events: none; left: calc(8px + (100% - 16px) * var(--at, 0.5)); }
.focus .flat-mark::after { content: "flat"; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 0.15rem;
  font-size: 0.75rem; font-weight: 600; color: #2fa66a; }
.focus .scale { display: flex; justify-content: space-between; margin-top: 0.3rem; }
.focus .play { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.85rem; }
.focus button { font: 600 0.9rem/1 var(--type); padding: 0.6rem 0.95rem; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--rule); background: transparent; color: var(--ink); }
.focus button:hover { border-color: #f2c230; }
.focus button:focus-visible { outline: 2px solid #f2c230; outline-offset: 2px; }
.focus #bf-result { margin: 0; max-width: none; font-size: 0.95rem; color: var(--ink-2); }
.focus #bf-result b { color: var(--ink); font-size: 1.15rem; margin-right: 0.35rem; }


/* the opening (only when html.intro is set: first visit, motion allowed, JS on).
   intro.js paints the curtain: a searchlight that reads the headline, then swoops into the fresnel's lens. */
.curtain { display: none; }
html.intro .curtain { display: block; position: fixed; inset: 0; z-index: 50; background: #0c0e10; cursor: pointer; }
html.intro:not(.reveal) { overflow: hidden; }
html.intro .art-light { opacity: 0; }
html.intro .top, html.intro .apps { opacity: 0; transform: translateY(24px); }
html.intro.reveal .art-light { opacity: 1; transition: opacity 1.3s ease .05s; }
html.intro.reveal .top, html.intro.reveal .apps { opacity: 1; transform: none;
  transition: opacity .8s ease .45s, transform 1s cubic-bezier(.2,.75,.2,1) .45s; }
html.intro.reveal .hero h1, html.intro.reveal .hero p { transition: text-shadow .9s ease; }

/* apps */
.apps { border-top: 1px solid var(--rule); }
.app { display: grid; grid-template-columns: 64px minmax(0, 15rem) minmax(0, 1fr) auto; gap: 0 2rem; align-items: start;
  padding: 2.4rem 0; border-bottom: 1px solid var(--rule); }
.app .icon { width: 64px; height: 64px; border-radius: 14px; overflow: hidden; }
.app .icon svg, .app .icon img { width: 64px; height: 64px; }
.app h2 { font-size: 1.6rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; }
.app .for { color: var(--ink-3); font-size: 1rem; margin-top: 0.25rem; }
.app .what { color: var(--ink-2); max-width: 46ch; }
.app .visit { font-size: 1rem; white-space: nowrap; padding-top: 0.2rem; }

/* name + about */
.story { padding: 5.5rem 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 3.5rem; }
.story + .story { border-top: 1px solid var(--rule); }
.story h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 600; line-height: 1.12; letter-spacing: -0.02em; }
.story .text p { color: var(--ink-2); max-width: 60ch; }
.story .text p + p { margin-top: 1.1rem; }
.story em { color: var(--ink); }

/* two-tone wordmarks */
/* each name takes its colour from theCallboard mark: blue, yellow, green (darker in light mode so they read on paper) */
.wm-callboard { color: #2f6fcc; }
.wm-sched { color: #b8890b; }
.wm-clef { color: #23905a; }

/* footer */
footer { border-top: 1px solid var(--rule); padding: 2rem 0 2.5rem; color: var(--ink-3); font-size: 0.95rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; }
footer .links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 1.5rem; }
footer a { color: var(--ink-2); text-decoration: none; }
footer a:hover { color: var(--ink); text-decoration: underline; }

@media (max-width: 860px) {
  .band { min-height: 0; }
  .hero-art { height: 600px; right: -190px; }
  .hero { padding: 11.5rem 0 4rem; }
  .hero .copy { max-width: none; }
  .hero h1 { max-width: 14ch; }
  .app { grid-template-columns: 56px minmax(0, 1fr); gap: 0.4rem 1.25rem; }
  .app .icon, .app .icon svg, .app .icon img { width: 56px; height: 56px; }
  .app .what, .app .visit { grid-column: 2; }
  .app .what { margin-top: 0.6rem; }
  .app .visit { margin-top: 0.4rem; }
  .story { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; padding: 4rem 0; }
  .story.bench { grid-template-columns: minmax(0, 1fr); gap: 2.25rem; }
}
@media (max-width: 520px) {
  .top nav { gap: 1.1rem; }
  .top nav .opt { display: none; }
}
/* dark marks need an edge against the dark page */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .wm-callboard { color: #3b82e0; }
  :root:not([data-theme="light"]) .wm-sched { color: #f2c230; }
  :root:not([data-theme="light"]) .wm-clef { color: #2fa66a; }
  :root:not([data-theme="light"]) .brand svg, :root:not([data-theme="light"]) .app .icon { box-shadow: 0 0 0 1px rgba(255,255,255,0.16); border-radius: 7px; }
  :root:not([data-theme="light"]) .app .icon { border-radius: 14px; }
  :root:not([data-theme="light"]) .stage { box-shadow: 0 0 0 1px rgba(255,255,255,0.07), 0 40px 70px -40px rgba(0,0,0,0.8); }
}
