/* judahdaniels.com — "the pinned poster" (see .taste-skill/direction.json).
   Colour and type live in these tokens; nothing below names a colour or a size.
   The palette comes from the footage itself: dark rooms and warm light, with
   a tangerine-red as the one accent, on the action. */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("/fonts/cormorant-garamond-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #0f0e0d;          /* the room after dark */
  --ink: #eeece8;         /* bone white: warm without going cream */
  --muted: #b3aa9e;
  --field: #1c1a17;       /* one tone step up, for the cards and the contact */
  --accent: #ff6a3d;      /* tangerine-red: the action only */
  --accent-ink: #0f0e0d;

  --font: "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Cormorant Garamond", ui-serif, Georgia, serif;   /* headings */
  --wd: 400;   /* heading weight: light Cormorant */
  --td: 0;     /* heading tracking, as a multiple of -0.05em */
  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3.5rem, 7vw, 9.5rem);

  --m: clamp(16px, 2.2vw, 32px);    /* the one pair of page margins */
  --gap: clamp(96px, 12vw, 200px);  /* between sections */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--step-body)/1.5 var(--font); letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, ol, ul { margin: 0; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 0.2em; transition: color 0.2s, text-decoration-color 0.2s; }
a:hover { text-decoration-color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.devrow { display: inline-block; margin-left: 14px; }
.devbtn { font: inherit; min-width: 28px; min-height: 28px; margin-left: 4px; border: 0; background: rgba(0,0,0,.18); color: inherit; cursor: pointer; }
.devbtn[aria-pressed] { background: var(--accent-ink); color: var(--accent); }
.devdesc { margin-left: 8px; font-weight: 400; }
.devall { padding: 0 10px; margin-left: 14px; }
.devall[aria-expanded="true"] { background: var(--accent-ink); color: var(--accent); }
.devlist[hidden] { display: none; }
.devlist { max-height: 60vh; overflow-y: auto; margin-top: 8px; padding: 8px 0 4px; display: grid; gap: 4px; font-weight: 400; }
.devlist-h { margin: 6px 0 0; font-weight: 600; }
.devlist ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.devlist button { font: inherit; text-align: left; border: 0; background: none; color: inherit; padding: 3px 6px; cursor: pointer; }
.devlist button:hover { background: rgba(0,0,0,.12); }
.devlist button[aria-pressed] { background: var(--accent-ink); color: var(--accent); }
.devlist-sub { margin-top: 4px; padding: 0 6px; font-style: italic; }
.devbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; margin: 0; padding: 6px var(--m); background: var(--accent); color: var(--accent-ink); font-size: var(--step-small); font-weight: 600; transition: transform 0.3s var(--ease); }
.devbar.away { transform: translateY(calc(-100% - 2px)); }
.devtab { position: fixed; top: 0; right: var(--m); z-index: 49; width: 44px; height: 14px; padding: 0; border: 0; border-radius: 0 0 6px 6px; background: var(--accent); opacity: 0.6; cursor: pointer; }
.devtab:hover, .devtab:focus-visible { opacity: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: var(--step-small);
  text-decoration: none; border-radius: 0; transition: transform 0.2s var(--ease), background-color 0.2s;
}
.btn:hover { transform: translateY(-2px); background: var(--ink); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn.wide { width: 100%; }

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

.bar { display: flex; align-items: center; gap: 24px; padding: 16px var(--m); font-size: var(--step-small); font-weight: 600; }
.bar .mark { text-decoration: none; margin-right: auto; }
.bar nav { display: flex; gap: 24px; }
.bar nav a { text-decoration: none; }
.bar nav a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

/* ---- hero: the name beside one picture, centred as a pair ------------------------- */

.hero { position: relative; min-height: 82svh; display: grid; grid-template-columns: 1fr auto auto 1fr; grid-template-rows: auto 1fr auto auto 1fr; column-gap: 2.5vw; }
.hero .bar { grid-column: 1 / -1; grid-row: 1; }
.name {
  grid-column: 2; grid-row: 3;
  font-size: var(--step-display); font-family: var(--font-display); font-weight: var(--wd); font-stretch: var(--ws, 100%); text-transform: var(--tt, none); font-style: var(--fsd, normal); letter-spacing: calc(var(--td) * -0.05em); line-height: 0.88;
}
.name .l, .name .r { display: block; }
.frames { grid-column: 3; grid-row: 2 / 6; align-self: center; width: min(30vw, 58svh); padding-bottom: 24px; }
.frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.lede { grid-column: 2; grid-row: 4; padding-top: 24px; width: min(30ch, 100%); display: grid; gap: 12px; }
.next { font-family: var(--font-display); font-weight: var(--wd); font-size: 1.6rem; line-height: 1.1; font-variant-numeric: lining-nums; }
.next a { text-decoration: none; }
.next a:hover, .next a:focus-visible { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.2em; }

/* ---- upcoming gigs: sticky photograph, active list ------------------------------ */

main > section + section { margin-top: var(--gap); }
main > .showcase + section { margin-top: clamp(56px, 6vw, 96px); }
.dates { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: 0 var(--m); }
.dates-photo { grid-column: 1 / 6; position: sticky; top: 12vh; align-self: start; aspect-ratio: 4 / 5; }
.dates-photo .ph { position: absolute; inset: 0; opacity: 0; transition: opacity 0.3s; }
.dates-photo .ph.on { opacity: 1; }
.dates-photo img { width: 100%; height: 100%; object-fit: cover; }
.dates-photo .ph.fit img { object-fit: contain; }
.dates-list { grid-column: 7 / 13; }
.dates-list h2 { font-size: var(--step-head); font-family: var(--font-display); font-weight: var(--wd); font-stretch: var(--ws, 100%); text-transform: var(--tt, none); font-style: var(--fsd, normal); letter-spacing: calc(var(--td) * -0.04em); line-height: 1; margin-bottom: 48px; }
.rows { list-style: none; padding: 0; display: grid; gap: 8px; }
.row { padding: 12px 0; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.row h3 { font-size: var(--step-lead); font-family: var(--font-display); font-weight: 600; font-variant-numeric: lining-nums; font-stretch: var(--ws, 100%); text-transform: var(--tt, none); font-style: var(--fsd, normal); letter-spacing: calc(var(--td) * -0.03em); line-height: 1.15; color: var(--muted); transition: color 0.2s; }
.row .at { font-weight: var(--wd); }
/* dates in a column of their own, so the places line up */
.row h3 { display: grid; grid-template-columns: 5.4em 1fr; column-gap: 0.4em; align-items: baseline; }
.row.on h3 { color: var(--ink); }
/* arriving from the next-gig link: the date glows, and a line marks the gig until you move on */
.row { border-left: 2px solid transparent; padding-left: 14px; margin-left: -16px; transition: border-color 0.3s; }
.row.arrived { border-left-color: var(--accent); }
.row.arrived h3 { animation: gig-arrive 1.6s var(--ease); }
@keyframes gig-arrive { 0%, 40% { color: var(--accent); } 100% { color: var(--ink); } }
@media (prefers-reduced-motion: reduce) { .row.arrived h3 { animation: none; } }
.row-body { display: grid; gap: 12px; justify-items: start; max-width: 40ch; padding-top: 10px; }
/* the time sits in the date column, the description and links under the place */
.row-body { grid-template-columns: calc(var(--step-lead) * 5.4) 1fr; column-gap: calc(var(--step-lead) * 0.4); max-width: none; align-items: baseline; }
.row-body .when { grid-column: 1; grid-row: 1; font-size: var(--step-small); }
.row-body > :not(.when) { grid-column: 2; }
.row-body .blurb { max-width: 40ch; }
.js .row .row-body { overflow: hidden; max-height: 12rem; transition: max-height 0.4s var(--ease), opacity 0.3s, padding-top 0.4s var(--ease); }
.js .row:not(.on) .row-body { max-height: 0; opacity: 0; padding-top: 0; }
.empty { font-size: var(--step-lead); max-width: 30ch; }

/* ---- about: the bio, smaller, in two columns --------------------------------------- */

.bio { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: 0 var(--m); }
.bio h2 { grid-column: 1 / 4; font-size: var(--step-lead); font-family: var(--font-display); font-weight: var(--wd); font-stretch: var(--ws, 100%); text-transform: var(--tt, none); font-style: var(--fsd, normal); letter-spacing: calc(var(--td) * -0.03em); line-height: 1.2; }
.bio-text { grid-column: 4 / 13; columns: 2 28ch; column-gap: 40px; font-size: 1rem; line-height: 1.6; }
.bio-text p + p { margin-top: 1em; }

/* ---- Joyful: fills the screen, the words on a band, plays in place ------------------- */

.show { position: relative; height: 100svh; overflow: hidden; background: var(--field); }
.show video, .show iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.show video { object-fit: cover; object-position: 50% 0%; }
.show iframe { background: #000; }
.show-play { position: absolute; inset: 0; z-index: 1; cursor: pointer; }
.show-words {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; pointer-events: none;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 20px var(--m);
  background: rgba(0, 0, 0, 0.55);
}
.show-words { align-items: first baseline; }
.show-title { display: grid; gap: 6px; }
.show-words .credit { font-size: 0.82rem; line-height: 1.2; }
.show-words h2, .show-words h3 { font-size: var(--step-head); font-family: var(--font-display); font-weight: var(--wd); font-stretch: var(--ws, 100%); text-transform: var(--tt, none); font-style: var(--fsd, normal); letter-spacing: calc(var(--td) * -0.04em); line-height: 1; }
/* the play button: a large disc in the middle of the video, drawn on the link */
.show-play::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; transform: translate(-50%, -50%);
  border-radius: 50%; background: rgba(15, 14, 13, 0.55); border: 1.5px solid var(--ink); transition: transform 0.2s var(--ease);
}
.show-play::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%);
  border-left: 24px solid var(--ink); border-top: 15px solid transparent; border-bottom: 15px solid transparent;
}
.show:hover .show-play::before, .show-play:focus-visible::before { transform: translate(-50%, -50%) scale(1.08); }

/* ---- contact: the address as display type ------------------------------------------ */

.contact { background: var(--field); padding: clamp(48px, 8vw, 120px) var(--m) var(--m); display: grid; gap: clamp(24px, 3vw, 40px); }
.ask { font-size: var(--step-lead); max-width: 26ch; }
.email {
  text-decoration: none; overflow-wrap: anywhere; color: var(--accent);
  font-size: min(6.3vw, 7.5rem); font-weight: 400; letter-spacing: -0.05em; line-height: 0.95; transition: color 0.2s;
}
.email:hover { color: var(--ink); }
.social { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: var(--step-small); font-weight: 600; justify-self: end; }

.foot {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 16px;
  padding: 32px var(--m); font-size: var(--step-small); font-weight: 600; color: var(--muted);
}
.foot nav { display: flex; gap: 24px; }
.foot nav a { color: var(--ink); }
.foot > span:last-child { justify-self: end; }

/* ---- the photos page: a title and the photos ------------------------------------------ */

.photos, .gigpage { padding: 48px var(--m) var(--gap); }
.photos h1, .gigpage h1 { font-size: var(--step-head); font-family: var(--font-display); font-weight: var(--wd); font-stretch: var(--ws, 100%); text-transform: var(--tt, none); font-style: var(--fsd, normal); letter-spacing: calc(var(--td) * -0.04em); line-height: 1; margin-bottom: 32px; }
.grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 8px; }
.grid img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: opacity 0.2s, transform 0.3s var(--ease); }
.grid a:hover img { opacity: 0.85; transform: scale(1.01); }
.viewer { max-width: min(92vw, 1600px); max-height: 94svh; padding: 0; border: 0; background: var(--bg); color: var(--ink); }
.viewer::backdrop { background: rgba(0, 0, 0, 0.88); }
.viewer img { max-height: 82svh; width: auto; margin: 0 auto; }
.viewer p { display: flex; gap: 12px; align-items: center; padding: 12px 0 0; font-size: var(--step-small); font-weight: 600; }
.viewer .dl { margin-right: auto; }
.viewer button { font: inherit; color: var(--ink); background: var(--field); border: 0; min-height: 44px; padding: 0 16px; cursor: pointer; }
.viewer button:hover { background: var(--accent); color: var(--accent-ink); }
.gigpage article { max-width: 60ch; display: grid; gap: 20px; }
.gigpage .facts { font-size: var(--step-lead); font-weight: 600; }

/* ---- not found: the red-curtain photo, the words on a band ------------------------------- */

.nf { position: relative; height: 80svh; overflow: hidden; }
.nf img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
.nf-band { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px var(--m); background: rgba(0, 0, 0, 0.55); display: grid; gap: 14px; }
.nf-band h1 { font-family: var(--font-display); font-weight: var(--wd); font-size: var(--step-head); line-height: 1; }
.nf-band p { display: flex; gap: 24px; font-weight: 600; }

/* ---- motion: entrances, once, never hiding content without script --------------------- */

.js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-rise].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-rise] { transform: none; transition: opacity 0.3s; }
  .btn:hover, .grid a:hover img { transform: none; }
}

/* ---- phone: its own composition ---------------------------------------------------------- */

@media (max-width: 760px) {
  .bar nav { display: none; }
  .hero { min-height: auto; grid-template-columns: 1fr; grid-template-rows: none; gap: 16px; padding-bottom: 32px; }
  .name { grid-column: 1; grid-row: 3; margin: 0 var(--m); font-size: 21vw; }
  .lede { grid-column: 1; grid-row: 4; padding: 0 var(--m); }
  /* the photo first, square and edge to edge, then the name and the words */
  .frames { grid-column: 1; grid-row: 2; display: grid; grid-template-columns: 1fr; width: auto; margin: 0; padding: 0; }
  .frame img { aspect-ratio: 1; object-position: 50% 30%; }

  /* the list straight after Joyful, the photos after it */
  .dates { display: flex; flex-direction: column; }
  .dates-list { order: 1; }
  .dates-photo { order: 2; position: relative; top: auto; width: 100%; aspect-ratio: 4 / 5; margin: 32px 0 0; }

  .bio { display: grid; grid-template-columns: 1fr; gap: 16px; }
  .bio h2, .bio-text { grid-column: 1; }
  .bio-text { columns: 1; font-size: var(--step-body); }

  .show { height: auto; aspect-ratio: 5 / 4; }
  .show-words { gap: 12px; }

  .email { font-size: var(--step-head); }
  .social { justify-self: start; }
  .foot { grid-template-columns: 1fr; gap: 8px; }
  .foot > span:last-child { justify-self: start; }
}
