/* =============================================================================
   CHANCE FARROW DURAN — composer / audio-forward (SPA, gapless)
   Dark navy-ink + sky-blue scheme. Space Grotesk. Audio is the star.
============================================================================= */

:root {
  --bg: #0b1320;          /* dark navy-ink (not gray) */
  --bg-2: #121c2c;        /* raised surface (cards, player) */
  --bg-3: #182437;        /* hover surface */
  --fg: #eef2f8;          /* cool off-white */
  --muted: #8695ab;       /* cool blue-gray */
  --line: #212e42;
  --line-2: #2d3d55;
  --accent: #45b3ec;      /* sky blue — the "sound is alive" color */
  --accent-2: #79cbf5;
  --accent-soft: rgba(69, 179, 236, 0.14);
  --tile: #0d1520;        /* empty-card / media background */
  --maxw: 1560px;
  --gutter: clamp(16px, 4vw, 44px);
  --nav-h: 60px;
  --player-h: 78px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Space Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: var(--player-h); /* room for the persistent player */
}
body.player-hidden { padding-bottom: 0; }

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--bg); }

/* ---------- layout helpers ---------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(48px, 9vw, 120px) 0; }
.eyebrow {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.22em; color: var(--accent); margin: 0 0 24px;
}
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* view fade on route change */
#view { animation: viewIn 0.4s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- navigation --------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  background: rgba(11, 19, 32, 0.78);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: baseline; gap: 10px;
  font-weight: 700; font-size: 16px; letter-spacing: 0.16em;
  text-transform: uppercase; white-space: nowrap;
}
.brand .brand-dot { color: var(--accent); }
.nav-links { display: flex; gap: clamp(16px, 2.6vw, 36px); align-items: center; }
.nav-links a {
  font-size: 13px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.14em; position: relative; padding: 6px 0; white-space: nowrap;
  color: var(--muted); transition: color 0.3s var(--ease);
}
.nav-links a:hover, .nav-links a.is-active { color: var(--fg); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--accent); transition: width 0.35s var(--ease);
}
.nav-links a:hover::after, .nav-links a.is-active::after { width: 100%; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  font: inherit; color: inherit; font-weight: 500; letter-spacing: 0.12em;
  text-transform: uppercase; font-size: 13px;
}

/* ---------- hero / splash (audio, not video) ---------------------------- */
.hero {
  position: relative; min-height: calc(82svh - var(--nav-h));
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; padding: clamp(40px, 8vh, 96px) var(--gutter);
  background:
    radial-gradient(120% 90% at 50% 6%, rgba(69,179,236,0.14) 0%, rgba(69,179,236,0) 55%),
    var(--bg);
}
#hero-viz { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.9; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(11,19,32,0) 42%, rgba(11,19,32,0.9) 100%);
}
.hero-inner { position: relative; z-index: 2; max-width: 1100px; }
.hero-kicker {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.28em; color: var(--accent); margin: 0 0 22px;
  /* sky blue → neon orange, matching the waveform; sized to the text so it spans the full fade */
  width: fit-content;
  background: linear-gradient(90deg, #45b3ec, #ff6b1a);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-title {
  margin: 0; font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(19px, 7.3vw, 98px); line-height: 0.96; text-transform: uppercase;
  white-space: nowrap;   /* keep the full name on one line */
}
.hero-sub { margin: 22px 0 0; max-width: 44ch; font-size: clamp(15px, 1.7vw, 21px); color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 34px; }

/* pill buttons */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 15px 30px; font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--fg);
  font-family: var(--font);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn--solid { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.btn--solid:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--bg); }
.btn .ico { display: inline-flex; }

/* ---------- album-style tracklist (the reel) ---------------------------- */
.reel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }
.reel-title { margin: 0; font-size: clamp(26px, 4vw, 46px); font-weight: 600; letter-spacing: -0.01em; text-transform: uppercase; }
.reel-note { color: var(--muted); font-size: 14px; max-width: 40ch; margin: 8px 0 0; }

.tracklist { border-top: 1px solid var(--line); }
.track {
  display: grid; grid-template-columns: 42px 1fr auto auto;
  align-items: center; gap: 18px;
  padding: 16px 12px; border-bottom: 1px solid var(--line);
  cursor: pointer; background: transparent;
  transition: background 0.25s var(--ease);
  width: 100%; text-align: left; font-family: var(--font); color: inherit;
  border-left: 0; border-right: 0; border-top: 0;
}
.track:hover { background: var(--bg-2); }
.track-idx { position: relative; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.track-idx .num { transition: opacity 0.2s; }
.track-idx .play-ico { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; color: var(--accent); }
.track:hover .track-idx .num { opacity: 0; }
.track:hover .track-idx .play-ico { opacity: 1; }
.track-main { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.track-name { font-size: clamp(15px, 1.7vw, 19px); font-weight: 500; letter-spacing: 0.01em; line-height: 1.15; }
.track-tag { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; line-height: 1; }
.track-eq { display: flex; align-items: flex-end; gap: 3px; height: 18px; width: 22px; opacity: 0; }
.track-time { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

.track.is-active { background: var(--accent-soft); }
.track.is-active .track-name { color: var(--accent); }
.track.is-active .track-idx .num,
.track.is-active .track-idx .play-ico { opacity: 0; }
.track.is-active .track-eq { opacity: 1; }
.track-eq span { flex: 1; background: var(--accent); height: 30%; border-radius: 1px; }
.track.is-active.is-playing .track-eq span { animation: eq 0.9s var(--ease) infinite; }
.track.is-active.is-playing .track-eq span:nth-child(2) { animation-delay: 0.15s; }
.track.is-active.is-playing .track-eq span:nth-child(3) { animation-delay: 0.3s; }
.track.is-active.is-playing .track-eq span:nth-child(4) { animation-delay: 0.45s; }
@keyframes eq { 0%,100% { height: 22%; } 50% { height: 92%; } }

/* ---------- work grid (static covers, no autoplay) ---------------------- */
.grid { display: grid; gap: clamp(10px, 1.6vw, 22px); grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

.card { display: block; position: relative; }
.card-media {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--tile); border: 1px solid var(--line);
}
.card-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.card:hover .card-media img { transform: scale(1.05); }
.card-media--empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 24px; gap: 14px;
  background: radial-gradient(120% 120% at 50% 0%, rgba(69,179,236,0.14), rgba(69,179,236,0) 60%), var(--tile);
}
.card-media--empty .ghost-title { font-size: clamp(16px, 2vw, 22px); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--fg); line-height: 1.1; }
.card-media--empty .ghost-mark { color: var(--accent); }
.card-media .cat-chip {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: 10px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--bg); background: var(--accent); padding: 5px 9px;
}
.card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 2px 0; }
.card-title { font-size: clamp(15px, 1.5vw, 19px); font-weight: 500; letter-spacing: 0.01em; text-transform: uppercase; }
.card-role { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; white-space: nowrap; }
@media (max-width: 560px) { .card-meta { flex-direction: column; gap: 4px; } }

/* ---------- page header -------------------------------------------------- */
.page-head { padding-top: clamp(56px, 10vw, 130px); padding-bottom: clamp(24px, 5vw, 52px); }
.page-title { margin: 0; font-weight: 600; text-transform: uppercase; line-height: 0.94; letter-spacing: -0.015em; font-size: clamp(42px, 10vw, 124px); }
.page-intro { color: var(--muted); font-size: clamp(15px, 1.7vw, 19px); max-width: 52ch; margin: 20px 0 0; }

/* ---------- filter chips ------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 34px; }
.chip {
  font-family: var(--font); cursor: pointer; font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted);
  padding: 9px 16px; border: 1px solid var(--line-2); background: var(--bg-2);
  transition: all 0.25s var(--ease);
}
.chip:hover { color: var(--fg); border-color: var(--muted); }
.chip.is-on { color: var(--bg); background: var(--accent); border-color: var(--accent); }

/* ---------- project detail ----------------------------------------------- */
.back-link { display: inline-block; margin-bottom: 26px; font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); }
.back-link:hover { color: var(--accent); }
.project-hero { aspect-ratio: 16 / 9; background: var(--tile); overflow: hidden; margin-bottom: clamp(28px, 5vw, 56px); border: 1px solid var(--line); position: relative; }
.project-hero img, .project-hero iframe { width: 100%; height: 100%; object-fit: cover; }
.project-hero--empty { display: flex; align-items: center; justify-content: center; text-align: center; }
.project-hero--empty span { color: var(--muted); text-transform: uppercase; letter-spacing: 0.2em; font-size: 13px; }
.project-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: start; }
@media (max-width: 860px) { .project-grid { grid-template-columns: 1fr; gap: 40px; } }
.project-title { margin: 0 0 18px; font-weight: 600; text-transform: uppercase; line-height: 0.98; letter-spacing: -0.01em; font-size: clamp(30px, 5vw, 62px); }
.logline { font-size: clamp(18px, 2.2vw, 25px); font-weight: 400; font-style: italic; line-height: 1.35; margin: 0 0 26px; color: var(--accent); }
.project-body p { font-size: 16px; line-height: 1.7; color: var(--muted); margin: 0 0 18px; }

.meta-list { border-top: 1px solid var(--line); }
.meta-row { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.meta-row dt { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin: 0; }
.meta-row dd { margin: 0; font-size: 14px; text-align: right; font-weight: 500; }
.tag-block { margin-top: 32px; }
.tag-block h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent); margin: 0 0 12px; }
.tag-block ul { list-style: none; margin: 0; padding: 0; }
.tag-block li { font-size: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
/* festival-laurel bullet for the Recognition list (masked to the accent colour) */
.tag-block--laurels li { position: relative; padding-left: 32px; }
.tag-block--laurels li::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 24px; height: 21px; opacity: 0.75;
  background-color: var(--accent);
  -webkit-mask: url("../assets/laurel.png") center/contain no-repeat;
  mask: url("../assets/laurel.png") center/contain no-repeat;
}

.watch-btn { display: inline-block; margin-top: 12px; padding: 14px 30px; background: var(--accent); color: var(--bg); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; transition: background 0.3s var(--ease); }
.watch-btn:hover { background: var(--accent-2); }
.prevnext { display: flex; justify-content: space-between; gap: 20px; margin-top: clamp(48px, 8vw, 100px); padding-top: 28px; border-top: 1px solid var(--line); }
.prevnext a { font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.prevnext a:hover { color: var(--accent); }
.prevnext .disabled { color: var(--line-2); pointer-events: none; }

/* ---------- about -------------------------------------------------------- */
.about-lead { font-size: clamp(24px, 3.6vw, 50px); font-weight: 500; line-height: 1.14; letter-spacing: -0.015em; }
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 80px); margin-top: clamp(40px, 7vw, 90px); align-items: start; }
@media (max-width: 860px) { .about-cols { grid-template-columns: 1fr; gap: 44px; } }
.about-cols p { font-size: 16px; line-height: 1.75; color: var(--muted); margin: 0 0 18px; max-width: 60ch; }

/* logo wall — real logos unified to one light
   monochrome tone (grayscale + invert) so mixed marks sit evenly on the dark ground */
.logo-wall { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(22px, 3.4vw, 48px); margin-top: 16px; }
.logo-item { display: flex; align-items: center; justify-content: center; }
.brand-logo {
  height: clamp(24px, 3.2vw, 38px); width: auto; max-width: 160px; object-fit: contain;
  filter: grayscale(1) invert(1) brightness(1.15);
  opacity: 0.78; transition: opacity 0.3s var(--ease);
}
.logo-item:hover .brand-logo { opacity: 1; }
/* logos that are already light: desaturate, don't invert */
.logo--light .brand-logo { filter: grayscale(1) brightness(1.7); }
.brand-name {
  font-weight: 600; font-size: clamp(14px, 1.6vw, 18px); text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--fg); opacity: 0.66; transition: opacity 0.3s var(--ease);
}
.logo-item:hover .brand-name { opacity: 1; }

/* ---------- contact ------------------------------------------------------ */
.contact-wrap { display: flex; align-items: center; min-height: calc(100svh - var(--nav-h) - var(--player-h)); }
.email-huge { display: inline-block; font-weight: 600; letter-spacing: -0.02em; font-size: clamp(24px, 6vw, 80px); line-height: 1.04; word-break: break-word; }
.email-huge:hover { color: var(--accent); }
.social-row { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 40px; }
.social-row a { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); }
.social-row a:hover { color: var(--accent); }

/* ---------- footer ------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-3); }
.footer-inner { padding-top: 26px; padding-bottom: 26px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.footer-brand { font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; font-size: 14px; }
.footer-brand .brand-dot { color: var(--accent); }
.footer small { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.footer-links a:hover { color: var(--fg); }

/* ---------- persistent audio player ------------------------------------- */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  height: var(--player-h);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.4fr);
  align-items: center; gap: clamp(12px, 3vw, 40px);
  padding: 0 var(--gutter);
  background: rgba(14, 22, 35, 0.92);
  backdrop-filter: saturate(150%) blur(16px);
  -webkit-backdrop-filter: saturate(150%) blur(16px);
  border-top: 1px solid var(--line-2);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(110%); transition: transform 0.5s var(--ease);
}
.player.is-ready { transform: translateY(0); }
.player.player-hidden { display: none; }

.pl-now { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pl-badge {
  flex: none; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-2); color: var(--accent);
  background: radial-gradient(120% 120% at 50% 0%, rgba(69,179,236,0.16), rgba(69,179,236,0) 70%);
}
.pl-badge .live-eq { display: flex; align-items: flex-end; gap: 2px; height: 16px; width: 18px; }
.pl-badge .live-eq span { flex: 1; background: var(--accent); height: 30%; }
.player.is-playing .pl-badge .live-eq span { animation: eq 0.85s var(--ease) infinite; }
.player.is-playing .pl-badge .live-eq span:nth-child(2){animation-delay:.12s}
.player.is-playing .pl-badge .live-eq span:nth-child(3){animation-delay:.26s}
.pl-text { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.pl-title { font-size: 14px; font-weight: 500; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-tag { font-size: 11px; line-height: 1; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pl-controls { display: flex; align-items: center; gap: 8px; }
.pl-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; background: transparent; color: var(--fg); cursor: pointer; border-radius: 50%; transition: color 0.2s var(--ease), background 0.2s var(--ease); }
.pl-btn:hover { color: var(--accent); background: var(--bg-3); }
.pl-btn--play { width: 46px; height: 46px; background: var(--accent); color: var(--bg); }
.pl-btn--play:hover { background: var(--accent-2); color: var(--bg); }

.pl-progress { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pl-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-seek { position: relative; flex: 1 1 auto; height: 26px; display: flex; align-items: center; cursor: pointer; min-width: 60px; }
.pl-seek .rail { position: absolute; left: 0; right: 0; height: 4px; background: var(--line-2); border-radius: 3px; }
.pl-seek .fill { position: absolute; left: 0; height: 4px; background: var(--accent); border-radius: 3px; width: 0; }
.pl-seek .knob { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); left: 0; transform: translateX(-50%); box-shadow: 0 0 0 4px rgba(69,179,236,0.20); opacity: 0; transition: opacity 0.2s; }
.pl-seek:hover .knob { opacity: 1; }

@media (max-width: 780px) {
  :root { --player-h: 66px; }
  .player { grid-template-columns: 1fr auto; gap: 12px; }
  .pl-progress { display: none; }
  .pl-tag { display: none; }
}

/* ---------- reveal-on-scroll -------------------------------------------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  #view { animation: none; }
  .track.is-active.is-playing .track-eq span,
  .player.is-playing .pl-badge .live-eq span { animation: none; }
}

/* ---------- mobile nav --------------------------------------------------- */
/* medium widths: tighten the header so every link still fits on one row */
@media (max-width: 1000px) {
  .brand { font-size: 14px; letter-spacing: 0.1em; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 12px; letter-spacing: 0.08em; }
}

@media (max-width: 680px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    transform: translateY(-120%); transition: transform 0.4s var(--ease);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { width: 100%; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
}
