/* ==========================================================================
   TYLER WESTER — stylesheet
   --------------------------------------------------------------------------
   Contents
     1.  Design tokens (colours, fonts, spacing)  <- change the look here
     2.  Reset & base
     3.  Navigation
     4.  Hero
     5.  Section furniture (numbered headings)
     6.  Selected Work — featured grid
     7.  Selected Work — compact list
     8.  About
     9.  Selected Credits
     11. Contact
     12. Footer
     13. Scroll reveal animation
   ========================================================================== */


/* ==========================================================================
   1. DESIGN TOKENS
   Nearly every colour and size on the site comes from this one block.
   ========================================================================== */

:root {
  /* Colour -------------------------------------------------------------- */
  --bg:         #0B0A09;   /* warm near-black page background */
  --bg-2:       #131110;   /* very slightly lifted surface */
  --ink:        #F4F0EA;   /* warm off-white, main text */
  --ink-2:      #A79F95;   /* secondary text */
  --ink-3:      #857E74;   /* faint labels, placeholders */
  --accent:     #C98A5E;   /* warm brass — used sparingly */
  --line:       rgba(var(--ink-rgb), 0.115);
  --line-soft:  rgba(var(--ink-rgb), 0.06);
  --danger:     #D08A78;   /* form validation only */

  /* Same colours as RGB triplets, so a theme swap is only this block.
     Everything else in the file goes through these. */
  --ink-rgb:    244, 240, 234;
  --bg-rgb:     11, 10, 9;
  --accent-rgb: 201, 138, 94;

  /* Type ---------------------------------------------------------------- */
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
           Helvetica, Arial, sans-serif;

  /* Layout -------------------------------------------------------------- */
  --wrap:  1320px;                          /* max content width */
  --pad:   clamp(22px, 5.5vw, 76px);        /* left/right page margin */
  --gap-section: clamp(48px, 6vw, 82px);    /* space between sections */

  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
}


/* ==========================================================================
   1b. LIGHT MODE
   Mirrors the palette above for anyone whose phone or computer is set to
   light. Only tokens change — no layout, type or spacing differs, because
   every colour in this file resolves through the block above.
   Delete this whole media query to make the site dark for everyone.
   ========================================================================== */

@media (prefers-color-scheme: light) {
  :root {
    --bg:         #F7F4EF;   /* warm paper, deliberately not pure white */
    --bg-2:       #EDE8E0;
    --ink:        #16140F;
    --ink-2:      #574F45;
    --ink-3:      #776F64;
    --accent:     #A25A28;   /* brass darkened to hold contrast on paper */
    --danger:     #A6412A;

    --ink-rgb:    22, 20, 15;
    --bg-rgb:     247, 244, 239;
    --accent-rgb: 162, 90, 40;
  }

  /* Near-white covers need a touch more edge definition on paper than they
     do against near-black. */
  .work-art::after,
  .video-thumb::after { box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), .16); }
  .credit-art,
  .thumb { box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), .16); }
}


/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Offset so anchor links don't land under the fixed nav bar. */
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, figure { margin: 0; }
ul { list-style: none; padding: 0; }
img { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: none;
  transition: color .3s var(--ease), opacity .3s var(--ease),
              border-color .3s var(--ease);
}

/* Keyboard focus ring — visible, on-brand, never shown for mouse clicks. */
:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
  border-radius: 1px;
}

/* Skip link for screen-reader and keyboard users. */
.skip {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  letter-spacing: .04em;
  transform: translateY(-160%);
  transition: transform .25s var(--ease);
}
.skip:focus { transform: translateY(0); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: var(--gap-section); }

/* Two stacked sections would otherwise put a bottom pad AND a top pad
   between them — double the intended gap. Only the first one pays. */
.section + .section { padding-top: 0; }

/* Small wide-tracked uppercase label — used throughout. */
.eyebrow {
  font-family: var(--sans);
  font-size: clamp(.63rem, .78vw, .7rem);
  font-weight: 500;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin: 0;
}


/* ==========================================================================
   3. NAVIGATION
   Transparent over the hero; picks up a blurred background once scrolled.
   ========================================================================== */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease), border-color .4s var(--ease),
              backdrop-filter .4s var(--ease);
}
.nav.is-stuck {
  background: rgba(var(--bg-rgb), .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line-soft);
}

.nav-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 20px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-mark,
.nav-links a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}
.nav-mark { color: var(--ink); letter-spacing: .22em; }

/* Wordmark with the studio location under it, like a letterhead. */
.nav-brand { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.nav-place {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.nav-coords { color: rgba(var(--ink-rgb), .26); margin-left: 9px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}
.nav-links a:hover { color: var(--ink); }
.nav-contact { color: var(--ink); }
.nav-contact:hover { color: var(--accent); }

/* Hairline separating the sections from the playlist links. */
.nav-div {
  width: 1px;
  height: 13px;
  background: var(--line);
}

/* The two portfolio playlists, styled as small buttons so they read as
   destinations rather than page sections. */
.nav-svc {
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  transition: color .3s var(--ease), border-color .3s var(--ease),
              background .3s var(--ease);
}
.nav-svc:hover {
  color: var(--ink);
  border-color: rgba(var(--accent-rgb), .5);
  background: rgba(var(--accent-rgb), .08);
}

/* On phones: drop the section anchors and the Contact link (both are
   reachable further down the page) and keep the playlists visible. */
@media (max-width: 1023px) { .nav-coords { display: none; } }

@media (max-width: 719px) {
  .nav-links a[href^="#"],
  .nav-contact,
  .nav-div { display: none; }
  .nav-place { display: none; }
  .nav-links { gap: 8px; }
  .nav-svc { padding: 6px 11px; font-size: 10px; letter-spacing: .16em; }
  .nav-inner { padding-block: 14px; }
}


/* ==========================================================================
   4. HERO
   ========================================================================== */

.hero {
  /* Bottom-anchored masthead. The clamp matters: with a plain vh value the
     hero grows with the screen and ALL the slack piles up above the name —
     on a tall display that left the name two-thirds of the way down. */
  min-height: 330px;
  min-height: clamp(290px, 40svh, 380px);
  display: flex;
  align-items: flex-end;
  padding-block: clamp(52px, 6vh, 74px) clamp(16px, 2vh, 26px);
}

.hero-inner { width: 100%; }

.hero-name {
  font-family: var(--serif);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(3.6rem, 13.5vw, 10.5rem);
  line-height: 0.92;
  letter-spacing: 0.005em;
  margin-left: -0.02em;      /* optical alignment of the T to the margin */
  color: var(--ink);
  text-wrap: balance;
}

.hero-role {
  margin-top: clamp(20px, 3vw, 34px);
  font-size: clamp(.68rem, 1.25vw, .84rem);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .3em;
  color: var(--ink-2);
}
.hero-role span { color: var(--ink-3); margin-inline: .2em; }

@media (max-width: 559px) {
  .hero {
    min-height: clamp(200px, 27svh, 260px);
    padding-block: 44px 14px;
  }
  .hero-role { letter-spacing: .2em; }
}

/* Entrance animation for the hero, staggered. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-name,
  .js .hero-role {
    opacity: 0;
    transform: translateY(14px);
    animation: rise .95s var(--ease) forwards;
  }
  .js .hero-name { animation-delay: .06s; }
  .js .hero-role { animation-delay: .20s; }
}
@keyframes rise { to { opacity: 1; transform: none; } }


/* ==========================================================================
   5. SECTION FURNITURE — "01 —— SELECTED WORK ————————"
   ========================================================================== */

.sect-head {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  margin-bottom: clamp(34px, 4vw, 54px);
}
.sect-head .idx {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.sect-head .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}


/* ==========================================================================
   6. SELECTED WORK — the artwork grid
   Every release is the same size, on an even grid:
     3 across on desktop, 2 across on tablets and phones.
   ========================================================================== */

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  column-gap: clamp(16px, 2.6vw, 44px);
  row-gap: clamp(44px, 5vw, 78px);
}

@media (max-width: 999px) {
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 400px) {
  .work-grid { column-gap: 14px; row-gap: 36px; }
}

.work-card { position: relative; }

.work-art {
  position: relative;
  overflow: hidden;
  background: var(--bg-2);
  border-radius: 2px;
}
/* Hairline so light-coloured covers don't bleed into the page. */
.work-art::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), .085);
  border-radius: 2px;
  pointer-events: none;
}
.work-art img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transform: scale(1.001);
  transition: transform 1.1s var(--ease), filter .6s var(--ease);
}

/* "Listen" cue, revealed on hover on pointer devices. */
.work-cue {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(var(--bg-rgb), .62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
  pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .work-card:hover .work-art img { transform: scale(1.035); }
  .work-card:hover .work-cue,
  .work-card:focus-within .work-cue { opacity: 1; transform: none; }
}
@media (hover: none) { .work-cue { display: none; } }

/* Covers the whole cover so clicking anywhere on the artwork plays it. */
.work-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.work-play-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(var(--bg-rgb), .58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), .28);
  position: relative;
  opacity: 0;
  transform: scale(.9);
  transition: opacity .35s var(--ease), transform .35s var(--ease),
              background .3s var(--ease);
}
/* The triangle. */
.work-play-btn::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 52%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent var(--ink);
}
.work-card:hover .work-play-btn,
.work-play:focus-visible .work-play-btn { opacity: 1; transform: none; }
.work-play:hover .work-play-btn { background: rgba(var(--bg-rgb), .78); }

/* No hover on touch, so show it permanently but quietly. */
@media (hover: none) {
  .work-play-btn { opacity: .92; transform: none; width: 46px; height: 46px; }
}

/* Song title doubles as a play control. */
.work-title-btn {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.work-title-btn:hover { color: var(--accent); }

.work-meta { padding-top: clamp(13px, 1.3vw, 18px); }

.work-artist {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.work-title {
  margin-top: 6px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.1rem, 1.55vw, 1.45rem);
  line-height: 1.16;
  letter-spacing: .002em;
  color: var(--ink);
  text-wrap: pretty;
}
/* Makes the entire card clickable while keeping valid, accessible markup. */
.work-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.work-card:hover .work-title { color: var(--ink); }

.work-sub {
  margin-top: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.work-role { color: var(--accent); }
/* Grey, dotted underline = a credit you still need to fill in. */
.work-role.is-tbd {
  color: var(--ink-3);
  text-decoration: underline dotted;
  text-underline-offset: 4px;
}
.work-sub .sep { color: rgba(var(--ink-rgb), .2); }
.work-year { color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Small outbound links; sit above the full-card click target. */
.work-links {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.work-links a { border-bottom: 1px solid var(--line); padding-bottom: 2px; }
.work-links a:hover { color: var(--accent); border-bottom-color: var(--accent); }


/* ==========================================================================
   7. SELECTED WORK — compact list (fifth project onward)
   ========================================================================== */

.work-list {
  margin-top: clamp(64px, 9vw, 130px);
  border-top: 1px solid var(--line-soft);
}
.work-list:empty { display: none; }

.work-row {
  position: relative;
  border-bottom: 1px solid var(--line-soft);
  transition: background .4s var(--ease);
}
.work-row:hover { background: rgba(var(--ink-rgb), .022); }

.work-row-in {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(16px, 2.4vw, 32px);
  padding: 18px 0;
}
.work-row-in > .thumb { margin-inline-start: 0; }

.thumb {
  width: 60px;
  height: 60px;
  border-radius: 2px;
  object-fit: cover;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), .085);
}

.work-row-txt { min-width: 0; }
.work-row-artist {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.work-row-title {
  margin-top: 3px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  line-height: 1.2;
  color: var(--ink);
  transition: transform .45s var(--ease);
}
.work-row:hover .work-row-title { transform: translateX(5px); }
.work-row-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }

.work-row-right {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.work-row-right .work-links { margin-top: 0; }

@media (max-width: 719px) {
  .work-row-in { grid-template-columns: 52px minmax(0, 1fr); row-gap: 12px; }
  .thumb { width: 52px; height: 52px; }
  .work-row-right { grid-column: 2; }
}


/* ==========================================================================
   8. ABOUT
   ========================================================================== */

/* Copy on the left, portrait on the right; stacked on narrow screens. */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 96px);
  align-items: start;
}

.about {
  max-width: 34em;
  font-family: var(--serif);
  font-size: clamp(1.22rem, 1.85vw, 1.62rem);
  line-height: 1.52;
  letter-spacing: .002em;
  color: var(--ink);
}
.about p + p { margin-top: 1.1em; }
.about p:last-of-type { color: var(--ink-2); }

/* Standalone credential line — set apart from the prose so it reads as a
   fact rather than as part of the paragraph. */
.about-portrait {
  max-width: 380px;
  justify-self: end;
  width: 100%;
}
.about-portrait img {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 2px;
  /* Desaturated so the stage lighting sits inside the warm palette
     instead of fighting it. Delete this line for full colour. */
  filter: grayscale(1) contrast(1.05) brightness(.97);
  box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), .08);
}

@media (max-width: 899px) {
  .about-grid { grid-template-columns: 1fr; gap: clamp(36px, 8vw, 56px); }
  .about-portrait { justify-self: start; max-width: 320px; }
}


/* ==========================================================================
   9. SELECTED CREDITS
   A fixed-height panel with its own scrollbar, so a long list of records
   stays compact. Each row is one release with its cover; records whose
   roles vary song to song open to reveal a track list.
   ========================================================================== */

.credits-panel {
  /* Sits below the featured artwork inside the same section. */
  margin-top: clamp(60px, 8vw, 116px);
  position: relative;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(var(--ink-rgb), .012);
}
/* Soft fade at the bottom edge, hinting there is more to scroll. */
.credits-panel::after {
  content: "";
  position: absolute;
  left: 1px; right: 1px; bottom: 1px;
  height: 56px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(to bottom, rgba(var(--bg-rgb), 0), rgba(var(--bg-rgb), .92));
  pointer-events: none;
}

.credits-scroll {
  max-height: min(58vh, 540px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--ink-rgb), .2) transparent;
}
.credits-scroll::-webkit-scrollbar { width: 9px; }
.credits-scroll::-webkit-scrollbar-track { background: transparent; }
.credits-scroll::-webkit-scrollbar-thumb {
  background: rgba(var(--ink-rgb), .16);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: content-box;
}
.credits-scroll::-webkit-scrollbar-thumb:hover { background-color: rgba(var(--ink-rgb), .3); }

.credit { border-bottom: 1px solid var(--line-soft); }
.credit:last-child { border-bottom: 0; }

/* Hide the default disclosure triangle; we draw our own chevron. */
.credit details > summary { list-style: none; cursor: pointer; }
.credit details > summary::-webkit-details-marker { display: none; }

.credit-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto auto 16px;
  gap: 15px;
  align-items: center;
  padding: 10px clamp(12px, 1.4vw, 18px);
  transition: background .3s var(--ease);
}
.credit.has-tracks .credit-row:hover { background: rgba(var(--ink-rgb), .03); }

.credit-art {
  width: 46px;
  height: 46px;
  border-radius: 2px;
  object-fit: cover;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), .09);
}
.credit-art.is-empty { display: block; box-shadow: inset 0 0 0 1px var(--line-soft); }

.credit-cover {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 2px;
  overflow: hidden;
  line-height: 0;
}
/* Faint arrow on hover so it reads as a link off-site. */
.credit-cover-cue {
  position: absolute;
  inset: 0;
  background: rgba(var(--bg-rgb), .5);
  opacity: 0;
  transition: opacity .28s var(--ease);
}
.credit-cover-cue::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 53%;
  transform: translate(-50%, -50%);
  border-style: solid;
  border-width: 5px 0 5px 9px;
  border-color: transparent transparent transparent var(--ink);
}
.credit-cover:hover .credit-cover-cue,
.credit-cover:focus-visible .credit-cover-cue { opacity: 1; }

.credit-txt { min-width: 0; display: block; }
.credit-artist {
  display: block;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.credit-title {
  display: block;
  margin-top: 2px;
  font-family: var(--serif);
  font-size: clamp(.95rem, 1.05vw, 1.06rem);
  line-height: 1.22;
  color: var(--ink);
}
.credit-meta {
  display: block;
  margin-top: 2px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.credit-role {
  text-align: right;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  max-width: 22ch;
}
.credit-role.is-tbd {
  color: var(--ink-3);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

/* Spotify link on every row. */
.credit-listen {
  position: relative;
  z-index: 2;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.credit-listen:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* Chevron, rotated when the record is open. */
.credit-chev {
  width: 16px;
  height: 16px;
  position: relative;
  justify-self: end;
}
.credit-chev.is-blank { visibility: hidden; }
.credit-chev::before {
  content: "";
  position: absolute;
  top: 4px; left: 4px;
  width: 6px; height: 6px;
  border-right: 1px solid var(--ink-3);
  border-bottom: 1px solid var(--ink-3);
  transform: rotate(45deg);
  transition: transform .35s var(--ease), border-color .3s var(--ease);
}
.credit details[open] .credit-chev::before {
  transform: rotate(-135deg) translate(-3px, -3px);
  border-color: var(--accent);
}
.credit-row:hover .credit-chev::before { border-color: var(--ink-2); }

/* Track count, tucked under the chevron. */
.credit-count {
  grid-column: 3;
  grid-row: 1;
  align-self: end;
  justify-self: end;
  font-size: 8.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* The opened track list, indented to line up with the release title. */
.credit-tracks {
  padding: 2px clamp(12px, 1.4vw, 18px) 14px calc(46px + 15px + clamp(12px, 1.4vw, 18px));
  border-top: 1px solid var(--line-soft);
  margin-top: 2px;
}
.credit-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 20px;
  align-items: baseline;
  padding: 6px 0;
}
.credit-track-title {
  font-family: var(--serif);
  font-size: .95rem;
  line-height: 1.3;
  color: var(--ink-2);
}

/* Each song links out to itself on Apple Music. */
/* Song rows play in place; the mark sits before the title. */
.track-link {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.track-arw {
  position: relative;
  top: -1px;
  flex: none;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4px 0 4px 7px;
  border-color: transparent transparent transparent var(--ink-3);
  transition: border-color .25s var(--ease), transform .25s var(--ease);
}
/* the outbound variant keeps the arrow glyph */
.track-arw.is-out {
  width: auto; height: auto; border: 0; top: 0;
  margin-left: 6px; font-size: .7em; color: var(--ink-3);
}
.track-link:hover { color: var(--ink); }
.track-link:hover .track-arw { border-left-color: var(--accent); transform: scale(1.15); }
.track-link:hover .track-arw.is-out { color: var(--accent); transform: none; }
.credit-track-role {
  text-align: right;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
}
.credit-track.is-tbd .credit-track-title { color: var(--ink-3); }
.credit-track.is-tbd .credit-track-role {
  color: var(--ink-3);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

/* Expand control — phones only; desktop keeps the scrolling panel. */
.credits-more {
  display: none;
  margin-top: 18px;
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.credits-more:hover { color: var(--ink); border-color: rgba(var(--accent-rgb), .5); }
.credits-more[hidden] { display: none !important; }

/* Caption under the panel. */
.credits-note {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.credits-note .dot { color: var(--line); }

@media (max-width: 719px) {
  /* Reads as liner notes, not a data panel: no box, no inner scrollbar,
     no repeated service chip — the cover is already the link out. */
  .credits-panel {
    border: 0;
    border-radius: 0;
    background: none;
    margin-top: clamp(40px, 7vw, 64px);
  }
  .credits-panel::after { display: none; }
  .credits-scroll { max-height: none; overflow: visible; }
  .credits { border-top: 1px solid var(--line); }
  .credit-listen { display: none; }
  .credits-more { display: inline-flex; }

  /* Opens short; the button reveals the rest. */
  .credits.is-collapsed > .credit:nth-child(n+9) { display: none; }

  .credit-row {
    grid-template-columns: 36px minmax(0, 1fr) 14px;
    gap: 3px 10px;
    padding: 11px 0;
  }

  /* The cover is a link, so it is the grid child now — not the <img>. */
  .credit-cover { grid-row: 1 / span 3; align-self: start; }
  .credit-art { width: 36px; height: 36px; }

  .credit-chev { grid-column: 3; grid-row: 1; align-self: center; }

  .credit-artist { font-size: 8px; letter-spacing: .16em; }
  .credit-title { font-size: .88rem; line-height: 1.2; margin-top: 1px; }
  .credit-meta { font-size: 8px; letter-spacing: .13em; margin-top: 1px; }

  /* Role and the Spotify link share one line instead of taking two. */
  .credit-role {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
    text-align: left;
    max-width: 62%;
    font-size: 8px;
    letter-spacing: .13em;
  }
  .credit-listen {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
    font-size: 8px;
    letter-spacing: .13em;
    padding-bottom: 1px;
  }

  .credit-tracks { padding: 0 0 12px calc(36px + 10px); }
  .credit-track { grid-template-columns: 1fr; gap: 1px; padding: 5px 0; }
  .credit-track-title { font-size: .86rem; line-height: 1.25; }
  .credit-track-role { text-align: left; font-size: 8px; letter-spacing: .13em; }

  .credits-note { font-size: 8.5px; letter-spacing: .13em; margin-top: 11px; }
}


/* ---- Film & commercial work, under the record list ---------------------- */

#film[hidden] { display: none; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.6vw, 36px);
}
@media (max-width: 899px) { .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .video-grid { grid-template-columns: 1fr; gap: 26px; } }

.video-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  background: var(--bg-2);
}
.video-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), .085);
  border-radius: 2px;
  pointer-events: none;
}
.video-thumb img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 1s var(--ease);
}
.video-card:hover .video-thumb img { transform: scale(1.03); }

.video-play {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.video-card:hover .work-play-btn,
.video-play:focus-visible .work-play-btn { opacity: 1; transform: none; }

/* ---- a film playing in place ------------------------------------------- */

/* The card takes the full grid width so the video is actually watchable. */
.video-card.is-open { grid-column: 1 / -1; }
.video-card.is-open .video-thumb img { transform: none; }
.video-card.is-open .video-play { display: none; }

.video-frame {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #000;
}
.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(var(--bg-rgb), .68);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.video-close:hover { background: rgba(var(--bg-rgb), .9); color: var(--accent); }

.video-meta { padding-top: 13px; }
.video-client {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.video-title {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.22;
  color: var(--ink);
  text-wrap: pretty;
}
.video-role {
  margin-top: 8px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
}


/* ==========================================================================
   11. CONTACT
   ========================================================================== */

.section.contact {
  /* No border here: the numbered header's own rule separates this section,
     exactly as it does for 01-03. */
  /* Less above the rule (the previous section already padded below it),
     more underneath so the closing line isn't crowded by the footer. */
  padding-block: clamp(44px, 5vw, 68px) clamp(72px, 9vw, 120px);
}

.contact-head {
  margin-top: clamp(16px, 2.2vw, 26px);
  font-family: var(--serif);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(3rem, 11.5vw, 9rem);
  line-height: 0.95;
  letter-spacing: .005em;
  margin-left: -0.015em;
  color: var(--ink);
}

.contact-email {
  display: inline-block;
  margin-top: clamp(30px, 4.5vw, 54px);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3.6vw, 2.6rem);
  line-height: 1.25;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  /* Long email addresses shouldn't blow out a narrow phone screen. */
  overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--accent); border-bottom-color: var(--accent); }

.contact-sub {
  margin-top: clamp(26px, 3.5vw, 40px);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.contact-sub span { margin-inline: .35em; }

/* Lead on the left, form on the right; stacked on narrow screens. */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
@media (max-width: 899px) {
  .contact-grid { grid-template-columns: 1fr; gap: clamp(40px, 8vw, 60px); }
}


/* ---- the form ----------------------------------------------------------- */

.form { padding-top: clamp(6px, 1vw, 14px); }

.form-field { margin-bottom: clamp(18px, 2.2vw, 26px); }

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.form-opt {
  margin-left: 8px;
  color: rgba(var(--ink-rgb), .22);
  letter-spacing: .14em;
}

/* Underline-only inputs, to match the hairlines used everywhere else. */
.form-input {
  width: 100%;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.06rem;
  line-height: 1.4;
  transition: border-color .3s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.form-input::placeholder { color: rgba(var(--ink-rgb), .2); }
.form-input:hover { border-bottom-color: rgba(var(--ink-rgb), .22); }
.form-input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.form-area { resize: vertical; min-height: 96px; }

/* Spam trap — off-screen rather than display:none so bots still fill it. */
.form-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-send {
  margin-top: clamp(8px, 1.4vw, 16px);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .3s var(--ease), background .3s var(--ease),
              color .3s var(--ease);
}
.form-send .arw { color: var(--ink-3); transition: color .3s var(--ease), transform .3s var(--ease); }
.form-send:hover {
  border-color: rgba(var(--accent-rgb), .55);
  background: rgba(var(--accent-rgb), .09);
}
.form-send:hover .arw { color: var(--accent); transform: translate(2px, -2px); }
.form-send:disabled { opacity: .5; cursor: default; }

.form-status {
  margin-top: 14px;
  min-height: 1.2em;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.form-status.is-ok { color: var(--accent); }
.form-status.is-err { color: var(--danger); }


/* ==========================================================================
   12. FOOTER
   ========================================================================== */

.footer {
  border-top: 1px solid var(--line-soft);
  padding-block: 34px;
  padding-bottom: calc(34px + env(safe-area-inset-bottom, 0px));
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.footer-left { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-left .dot { color: var(--line); }
.footer-social { display: flex; gap: 22px; }
.footer-social a:hover { color: var(--accent); }


/* ==========================================================================
   12b. PLAYER
   Fixed bar at the bottom holding Spotify's own embed. Hidden until the
   first cover is clicked, so it costs nothing on load.
   ========================================================================== */

.player {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: rgba(var(--bg-rgb), .86);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transform: translateY(105%);
  transition: transform .42s var(--ease);
}
.player.is-open { transform: none; }

.player-inner {
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 12px clamp(12px, 2vw, 24px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
}
.player-stage { min-width: 0; }
.player-embed { min-width: 0; }
.player-embed[hidden] { display: none; }
.player-embed iframe { display: block; border: 0; border-radius: 10px; width: 100%; }
.player-embed.is-video iframe {
  width: min(300px, 100%);
  aspect-ratio: 16 / 9;
  height: auto;
}

/* Native player, used for individual album tracks. */
.player-native {
  display: grid;
  grid-template-columns: 48px 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 4px 0;
}
.player-native[hidden] { display: none; }

.player-art {
  width: 48px;
  height: 48px;
  border-radius: 2px;
  object-fit: cover;
  background: var(--bg-2);
  box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), .09);
}

.player-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.player-toggle:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), .08); }
/* Triangle by default, two bars while playing. */
.player-toggle-icon {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-style: solid;
  border-width: 5px 0 5px 9px;
  border-color: transparent transparent transparent var(--ink);
}
.player-toggle.is-playing .player-toggle-icon {
  margin-left: 0;
  width: 9px;
  height: 11px;
  border: 0;
  border-left: 3px solid var(--ink);
  border-right: 3px solid var(--ink);
}

.player-txt { min-width: 0; }
.player-title {
  font-family: var(--serif);
  font-size: 1.02rem;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-sub {
  margin-top: 2px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-seek {
  margin-top: 8px;
  height: 3px;
  border-radius: 99px;
  background: rgba(var(--ink-rgb), .12);
  cursor: pointer;
}
.player-seek-fill {
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--accent);
  transition: width .15s linear;
}

.player-time {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.player-out {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
}
.player-out:hover { color: var(--accent); border-bottom-color: var(--accent); }
.player-out[hidden] { display: none; }

@media (max-width: 719px) {
  .player-native { grid-template-columns: 42px 36px minmax(0, 1fr) auto; gap: 11px; }
  .player-art { width: 42px; height: 42px; }
  .player-out { display: none; }
}

.player-close {
  width: 34px;
  height: 34px;
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-2);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.player-close:hover { color: var(--accent); border-color: var(--accent); }

/* Keep the footer clear of the bar while it is open. */
body.has-player .footer { padding-bottom: 190px; }

@media (prefers-reduced-motion: reduce) { .player { transition: none; } }


/* ==========================================================================
   13. SCROLL REVEAL
   Elements with class="reveal" fade and rise once as they enter the screen.
   Only active when JavaScript is running and the visitor hasn't asked for
   reduced motion.
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .85s var(--ease), transform .85s var(--ease);
  }
  .js .reveal.is-in { opacity: 1; transform: none; }
}

/* Anyone who prefers reduced motion gets the site with no movement at all. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
