/* ------------------------------------------------------------------
   struckmatch.studio — THE BLACK ROOM

   One room. One light. The guitars stand together on one floor, close
   enough that a falling one would catch its neighbour. The key is a single
   hard source from the upper left over the WHOLE room — never one lamp per
   guitar. Empty stands take the same light and simply stand darker, which
   is how the season shows itself filling up.

   Built from v3/LOOK.md. Every colour here is black, the light, or gold.
   ------------------------------------------------------------------ */

@font-face {
  font-family: 'Cinzel';
  src: url('/assets/fonts/cinzel-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000;
  --ink: #ece8e1;
  --ink-dim: #9c968c;
  --ink-faint: #807a71;          /* 4.9:1 on black — the dimmest tone that
                                    still passes AA for small text */

  --gold: #d7a75a;
  --gold-soft: #ead0a0;
  --gold-line: rgba(215, 167, 90, 0.28);

  --key: 255, 243, 226;          /* the key light, as an rgb triple */
  --rule: rgba(236, 232, 225, 0.12);

  --display: 'Cinzel', 'Trajan Pro', 'Times New Roman', serif;
  --text: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI',
          Roboto, 'Helvetica Neue', Arial, sans-serif;

  --gutter: 16px;
  --measure: 64ch;
  --stands: 3;                   /* phone: 3 across. Set by the media queries. */
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;        /* the room bleeds to 100vw, which counts the
                              scrollbar; clip it rather than let the page
                              scroll sideways (clip, not hidden: it makes no
                              scroll container, so sticky still works) */
}

body {
  margin: 0;
  background: var(--black);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.65;
  letter-spacing: 0.005em;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* The light falling on the page beyond the room. Fixed, at z-index -1, and
   nothing above it opens a stacking context, so the signature's screen blend
   can reach all the way down to the black. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(130vmax 95vmax at 6% -14%,
      rgba(var(--key), 0.085) 0%,
      rgba(var(--key), 0.030) 32%,
      rgba(var(--key), 0.008) 56%,
      transparent 74%);
}

main, header, footer { position: relative; }

img, svg, video { display: block; max-width: 100%; }

a { color: var(--gold-soft); text-decoration-color: var(--gold-line); text-underline-offset: 3px; }
a:hover { color: var(--gold); text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: #000; color: var(--gold);
  padding: 10px 16px; z-index: 50; border: 1px solid var(--gold-line);
}
.skip:focus { left: 8px; top: 8px; }

.wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---------------------------------------------------------------- bar */

.bar {
  display: flex; align-items: baseline; gap: 14px 22px; flex-wrap: wrap;
  padding-block: 18px 14px;        /* padding-block, never the shorthand: the
                                      shorthand wipes .wrap's gutter and puts
                                      the wordmark on the phone's edge */
  border-bottom: 1px solid var(--rule);
}
.bar__mark {
  font-family: var(--display); font-weight: 700;
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.bar__mark:hover { color: var(--gold-soft); }
.bar nav { margin-left: auto; display: flex; gap: 20px; flex-wrap: wrap; }
.bar nav a {
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-dim); text-decoration: none;
}
.bar nav a:hover, .bar nav a[aria-current='page'] { color: var(--gold-soft); }

/* On a phone the wordmark cannot shrink (it is nowrap) and the nav cannot fit
   beside it, so give each its own row instead of letting them collide. */
@media (max-width: 559px) {
  .bar { gap: 10px 0; padding-top: 14px; }
  .bar__mark { flex: 1 0 100%; font-size: 12.5px; letter-spacing: 0.18em; }
  .bar nav { margin-left: 0; flex: 1 0 100%; gap: 18px; }
}

/* ------------------------------------------------------------- titles */

.title {
  font-family: var(--display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em;
  line-height: 1.12; margin: 0;
  font-size: clamp(30px, 8.6vw, 62px);
}
.title--page { font-size: clamp(26px, 6.4vw, 42px); }

.sub {
  margin: 14px 0 0;
  font-size: clamp(15px, 3.6vw, 19px);
  font-style: italic; color: var(--gold-soft); letter-spacing: 0.02em;
}

.eyebrow {
  font-family: var(--display); font-weight: 700;
  font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 14px;
}

main { padding-top: clamp(20px, 3.5vw, 34px); }
.hero { padding: clamp(14px, 4vw, 38px) 0 clamp(22px, 4vw, 34px); }

/* ============================================================== THE ROOM

   .lit IS the one light. It paints a single hard key from the upper left
   over everything inside it, screen-blended so it adds light instead of
   veiling the photographs. It goes on wide things only — the room, which
   runs off both edges of the page, and the gallery's row of cards. On a
   narrow column the gradient would run out before the element did and the
   light itself would show as a box; there, the page's own wash is enough. */

.lit { position: relative; isolation: isolate; }
.lit::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none; z-index: 4;
  mix-blend-mode: screen;
  background:
    /* the source itself, just off the upper-left corner */
    radial-gradient(58% 86% at 11% -18%,
      rgba(var(--key), 0.19) 0%,
      rgba(var(--key), 0.080) 34%,
      rgba(var(--key), 0.020) 58%,
      transparent 78%),
    /* the beam raking down and to the right, through the haze */
    linear-gradient(101deg,
      transparent 0%,
      rgba(var(--key), 0.050) 13%,
      rgba(var(--key), 0.011) 33%,
      transparent 52%);
}

/* The room runs off both edges of the page: it is a room, not a panel.
   html has overflow-x: clip for the scrollbar's width. */
.room { margin-inline: calc(50% - 50vw); margin-top: 4px; }

.wall-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 12px;
}
.wall-head p { margin: 0; color: var(--ink-dim); font-size: 13.5px; }

.wall-nav { display: flex; gap: 8px; }
.wall-nav button {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(var(--key), 0.035);
  border: 1px solid var(--rule);
  color: var(--ink-dim); cursor: pointer; font-size: 16px; line-height: 1;
}
.wall-nav button:hover:not(:disabled) { color: var(--gold); border-color: var(--gold-line); }
.wall-nav button:disabled { opacity: 0.25; cursor: default; }

.wall {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc(100% / var(--stands));
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(215,167,90,.22) transparent;
  padding-bottom: 8px;
}
.wall::-webkit-scrollbar { height: 5px; }
.wall::-webkit-scrollbar-thumb { background: rgba(215,167,90,.2); border-radius: 3px; }
.wall::-webkit-scrollbar-track { background: transparent; }

.stand {
  position: relative;
  scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center;
  padding: 0;                  /* flush, so floor and light run unbroken */
}

/* One geometry for every bay, so a guitar sits in its stand the same way on
   the wall, in the gallery and on its own page. The stills are 9:16 and the
   guitar fills its frame, so these numbers are locked to each other:
     image width  = 114% of the bay — wider than its own cell, so the row
                    stands shoulder to shoulder instead of in separate boxes
     image bottom =   7% of the bay — the stand lifts it off the floor
     bay height   = 222% of the bay width, the least that fits both
     rig height   =   7% / 0.357, because the rest bar sits at 35.7% of the rig
     rig width    = rig height x 1.2, the symbol's viewBox                  */
.bay {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 100 / 222;
}

/* The floor. Every bay draws its own edge-to-edge slice and the stands sit
   flush, so the slices join into one unbroken floor under the whole room. */
.bay::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0; height: 30%;
  pointer-events: none; z-index: 0;
  background:
    linear-gradient(to top, rgba(var(--key), 0.05) 0, transparent 60%),
    linear-gradient(to bottom, transparent calc(100% - 1px), rgba(var(--key), 0.14) 0);
}

/* The guitar, standing. */
.shot {
  position: absolute; z-index: 2;
  left: 50%; bottom: 7%; transform: translateX(-50%);
  width: 114%;
  display: block; margin: 0; padding: 0; border: 0; background: none;
  -webkit-appearance: none; appearance: none;
}
button.shot { cursor: pointer; }
div.shot { cursor: default; }
.shot picture { display: block; }
.shot img { width: 100%; height: auto; transition: opacity 360ms ease; }
.shot video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 360ms ease;
}
.shot.is-lit video { opacity: 1; }
.shot.is-lit img { opacity: 0; }

/* Nothing to feather and nothing to mask: tools/subject.py already put every
   still and every clip on the same true black the page is, so a frame has no
   edge to show. The one light is .lit::after, over all of it at once. */

/* What the floor gives back. Faint, blurred, gone within a hand's width —
   just enough that the guitars read as standing on something together. */
.sheen {
  position: relative; width: 114%;
  aspect-ratio: 100 / 34;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.1;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 76%);
  mask-image: linear-gradient(to bottom, #000, transparent 76%);
}
.sheen img { width: 100%; height: auto; transform: scaleY(-1); filter: blur(1.4px); }

/* The stand itself. Drawn, not photographed — the prompt that made these
   stills says "no stand, no floor, no room reflections", so the room
   supplies all three. An A-frame in two layers: the tubes pass behind the
   guitar, the rest bar and the feet in front of it. */
.rig {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 52%; height: auto;
}
.rig--back { z-index: 1; }
.rig--front { z-index: 3; }
.stand--empty .rig { opacity: 0.85; }

.foot {
  margin: 10px 0 0; text-align: center;
  font-size: 11.5px; letter-spacing: 0.085em; line-height: 1.45;
  color: var(--ink-dim);
  text-transform: uppercase;
  font-family: var(--display); font-weight: 700;
}
.foot a { color: var(--ink-dim); text-decoration: none; }
.foot a:hover, .foot a:focus-visible { color: var(--gold); }
.stand--empty .foot { color: var(--ink-faint); }
/* Cinzel has no lowercase, so the song title goes back to the text face. */
.foot .song {
  display: block; margin-top: 3px;
  font-family: var(--text); font-weight: 400;
  text-transform: none; letter-spacing: 0.01em;
  font-size: 12.5px; line-height: 1.35; color: var(--ink);
}
.stand--empty .foot .song { color: var(--ink-dim); }
.foot a:hover .song, .foot a:focus-visible .song { color: var(--gold-soft); }

.hint { margin: 18px 0 0; color: var(--ink-faint); font-size: 12.5px; letter-spacing: 0.03em; }

/* Where the episodes go up. A channel appears only once its handle exists. */
.watch {
  margin: 14px 0 0; font-size: 13.5px; color: var(--ink-faint);
  display: flex; flex-wrap: wrap; gap: 4px 14px;
}
.watch a { color: var(--gold-soft); text-decoration: none; border-bottom: 1px solid var(--gold-line); }
.watch a:hover { color: var(--gold); border-bottom-color: currentColor; }

/* -------------------------------------------------------- the letter */

.letter {
  max-width: var(--measure);
  margin: clamp(56px, 12vw, 108px) auto 0;
  padding-bottom: clamp(40px, 8vw, 64px);
}
.letter h2 {
  font-family: var(--display); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.17em;
  font-size: clamp(20px, 5vw, 27px); margin: 0 0 6px;
}
.letter .sub { margin-bottom: 30px; }
.letter p { margin: 0 0 20px; color: #ddd8d0; }
.letter p.lede { font-size: clamp(18px, 4.2vw, 21px); color: var(--ink); }

/* Signed once, small, at the end of the letter. Gold on black: screen
   blending drops the render's black into the room so only the metal shows. */
.sign { margin: 46px 0 0; }
.sign__stack {
  position: relative; display: block;
  width: clamp(200px, 52%, 300px);
  margin-left: -4%;                 /* the ink starts inset; pull it to the margin */
}
.sign__stack img { width: 100%; height: auto; mix-blend-mode: screen; }
.sign__stack video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 200ms linear;
  mix-blend-mode: screen; pointer-events: none;
}
.sign__stack video.is-writing { opacity: 1; }
.sign figcaption {
  margin-top: 10px;
  font-size: 13.5px; letter-spacing: 0.04em;
  color: var(--ink-dim); font-family: var(--text);
}

/* ------------------------------------------------------------ pieces */

.rule { border: 0; border-top: 1px solid var(--rule); margin: clamp(42px, 8vw, 72px) 0; }

.note {
  border-left: 2px solid var(--gold-line);
  padding: 2px 0 2px 18px; margin: 32px 0;
  color: var(--ink-dim); font-size: 15px;
}
.note strong { color: var(--gold-soft); font-weight: 600; }

.lede-block { max-width: var(--measure); }
.meta { color: var(--ink-faint); font-size: 13.5px; }

/* ----------------------------------------------------------- gallery */

.grid {
  display: grid; gap: clamp(18px, 3vw, 30px) 0;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));   /* auto-FIT: empty
     tracks collapse, so the floor under the cards runs edge to edge */
  margin: 26px 0 0; padding: 0; list-style: none;
}
.card { position: relative; }
.card a { display: block; text-decoration: none; color: inherit; }
.card h3 {
  margin: 14px 0 2px; padding-inline: 8px;
  font-family: var(--display); font-weight: 700; font-size: 13.5px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
}
.card a:hover h3 { color: var(--gold-soft); }
.card p { margin: 0; padding-inline: 8px; font-size: 13px; color: var(--ink-dim); }

.coming { list-style: none; padding: 0; margin: 28px 0 0; max-width: var(--measure); }
.coming li {
  display: flex; gap: 14px; padding: 13px 0;
  border-top: 1px solid var(--rule); font-size: 15px;
}
.coming li:last-child { border-bottom: 1px solid var(--rule); }
.coming .n {
  flex: 0 0 34px; color: var(--ink-faint);
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .1em;
  padding-top: 3px;
}
.coming .t { color: var(--ink); }
.coming .i { display: block; color: var(--ink-dim); font-size: 13.5px; }

/* ------------------------------------------------------- one guitar */

.guitar-page { display: grid; gap: clamp(26px, 5vw, 56px); margin-top: 26px; }
@media (min-width: 900px) {
  .guitar-page { grid-template-columns: minmax(0, 44%) minmax(0, 1fr); align-items: start; }
  .guitar-page .plate { position: sticky; top: 20px; }
}
.plate .bay, .plate .sheen { max-width: 300px; margin-inline: auto; }

.spec { margin: 0; padding: 0; }
.spec div {
  display: grid; grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px; padding: 11px 0; border-top: 1px solid var(--rule);
}
.spec dt {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-faint); font-family: var(--display); font-weight: 700; padding-top: 3px;
}
.spec dd { margin: 0; color: var(--ink); font-size: 15px; }

.frets { list-style: none; margin: 18px 0 0; padding: 0; }
.frets li {
  display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 16px;
  padding: 10px 0; border-top: 1px solid var(--rule); font-size: 15px;
}
.frets li:last-child { border-bottom: 1px solid var(--rule); }
.frets .f {
  color: var(--gold); font-family: var(--display); font-weight: 700;
  font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 3px;
}

h2.sec {
  font-family: var(--display); font-weight: 700; font-size: 13px;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint);
  margin: clamp(32px, 6vw, 48px) 0 10px;
}

/* -------------------------------------------------------------- prose */

.prose { max-width: var(--measure); }
.prose h2 { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; margin: 40px 0 10px; }
.prose h2:first-of-type { margin-top: 28px; }
.prose p, .prose li { color: #ddd8d0; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 8px; }

/* ------------------------------------------------------------- footer */

.foot-bar {
  margin-top: clamp(48px, 9vw, 90px);
  border-top: 1px solid var(--rule);
  padding-block: 26px 40px;        /* see .bar: never the shorthand here */
  font-size: 13px; color: var(--ink-faint);
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline;
}
.foot-bar a { color: var(--ink-dim); text-decoration: none; }
.foot-bar a:hover { color: var(--gold-soft); }
.foot-bar .ai { width: 100%; margin: 6px 0 0; font-size: 12.5px; }

/* ------------------------------------------------------- breakpoints */

@media (min-width: 720px)  { :root { --stands: 5; --gutter: 24px; } }
@media (min-width: 1080px) { :root { --stands: 7; --gutter: 32px; } }

/* ---------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .shot video { display: none; }
  button.shot { cursor: default; }
}

/* On the wall the bays sit flush and their floor slices join. A card or a
   single plate stands alone, so its floor has to fade out instead of
   stopping dead. */
.card .bay::after, .plate .bay::after {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
