/* ==========================================================================
   Voices of DC
   All the knobs you'd want to turn are in :root below. Change a value there
   and it applies everywhere on the site.
   ========================================================================== */

:root {
  /* Colour */
  --bg:          #fffaf0;   /* off-white background, every page */
  --text:        #000000;   /* body text */
  --muted:       #57524a;   /* footer, timecodes, quiet labels */
  --line:        #e4dcca;   /* hairline dividers */
  --hover:       #6f6a61;   /* hover colour on links and timecodes */
  --lavender:    #a99ce6;   /* the heart in the logo */

  /* Type */
  /* Questrial is the closest free match to the logo's Century Gothic.
     Swap for "Poppins" or "Jost" here if you'd rather. */
  --display: "Questrial", "Century Gothic", "Helvetica Neue", Arial, sans-serif;
  --body:    "Roboto", "Helvetica Neue", Arial, sans-serif;   /* everything else */
  --mono:    "Roboto Mono", ui-monospace, Menlo, monospace;   /* timecodes */

  --title-size:      16pt;  /* interview page title */
  --transcript-size: 11pt;  /* transcript body */
  --tagline-size:    clamp(1rem, 1.45vw, 1.18rem);  /* the centred intro text */
  --tagline-width:   52rem;   /* how far across the page the intro text runs */

  /* Header geometry */
  --logo-size:   48px;  /* about half an inch on a desktop screen */
  --video-width: 66%;   /* interview video width — smaller shows more transcript */
  --bar-h:      68px;   /* height of the logo row */
  --banner-h:   84px;   /* extra height the big centred banner adds */
  --banner-lift: 11px;  /* nudges the big title up off the page content */

  --max:    1080px;
  --gutter: clamp(1.1rem, 4vw, 3rem);
}

@media (max-width: 620px) {
  :root {
    --logo-size: 34px; --bar-h: 52px; --banner-h: 60px; --banner-lift: 7px;
    --video-width: 100%;   /* full width on a phone — 66% would be unwatchable */
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.6;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

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

.skip {
  position: absolute; left: -9999px;
  background: var(--text); color: var(--bg);
  padding: 0.55rem 1rem; font-size: 0.8rem; z-index: 200;
}
.skip:focus { left: 1rem; top: 0.5rem; }

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

/* ================================================================= header */

.masthead {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  height: calc(var(--bar-h) + var(--banner-h));
  transition: height 260ms ease;
}
/* Collapsed: the banner sits on the same line as the logos. */
.masthead.is-small,
.masthead--small { height: var(--bar-h); }

.masthead__bar {
  height: var(--bar-h);
  display: flex; align-items: center; gap: 0.7rem;
  max-width: var(--max); margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative; z-index: 2;
  /* This row spans the full width and sits above the banner, so without
     this it swallows every hover and click aimed at the title. */
  pointer-events: none;
}
.masthead__bar > * { pointer-events: auto; }

.logo-link { display: flex; align-items: center; flex: none; }
.logo-link img, .logo-link svg {
  width: var(--logo-size); height: var(--logo-size);
  transition: width 260ms ease, height 260ms ease;
}

.ig-link { display: flex; align-items: center; color: var(--text); flex: none; }
.ig-link svg {
  width: calc(var(--logo-size) * 0.6);
  height: calc(var(--logo-size) * 0.6);
  transition: width 260ms ease, height 260ms ease;
}
.ig-link:hover { color: var(--hover); }

/* The banner is positioned, not in flow, so resizing it never reflows the
   page underneath — which is what keeps the shrink smooth while scrolling. */
.masthead__banner {
  position: absolute; left: 0; right: 0;
  top: calc(var(--bar-h) - var(--banner-lift)); height: var(--banner-h);
  display: flex; align-items: center; justify-content: center;
  transition: top 260ms ease, height 260ms ease;
  pointer-events: none;
}
.masthead.is-small .masthead__banner,
.masthead--small .masthead__banner { top: 0; height: var(--bar-h); }

.masthead__banner a {
  pointer-events: auto;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.005em; line-height: 1;
  text-decoration: none; display: block; padding: 0.15em 0.4em;
  font-size: clamp(1.85rem, 6.8vw, 3.35rem);
  transition: font-size 260ms ease, color 160ms ease;
  white-space: nowrap;
}
.masthead__banner a:hover { color: var(--hover); }
.masthead.is-small .masthead__banner a,
.masthead--small .masthead__banner a {
  font-size: clamp(0.95rem, 3.4vw, 1.2rem);
}

/* ================================================================== home */

/* The banner is the page's h1; these rules just stop the browser's default
   heading margins from throwing the sticky header's geometry off. */
h1.masthead__banner-h, .masthead__banner h1 { margin: 0; font-size: inherit; font-weight: inherit; }

/* Centred intro text in the logo's typeface. It runs to a set width and wraps
   wherever it needs to, so it reads the same at any window size — no hard line
   breaks to go lopsided when the browser is resized. */
.tagline {
  margin: 0 auto;
  padding: clamp(1.4rem, 4vh, 2.25rem) 0 clamp(1.5rem, 4vh, 2.25rem);
  max-width: var(--tagline-width);
  font-family: var(--display);
  font-weight: 400;
  font-size: var(--tagline-size);
  line-height: 1.6;
  text-align: center;
  text-wrap: pretty;   /* avoids leaving one lonely word on the last line */
}

.feature { display: block; text-decoration: none; margin-bottom: clamp(2rem, 5vh, 3rem); }

.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #efe7d6;
  border: 1px solid var(--line);
  overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb__none {
  position: absolute; inset: 0;
  display: grid; place-content: center; text-align: center; padding: 1rem;
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}
/* --- click cues -------------------------------------------------------
   A big image with text under it reads as a magazine page, not a link. Two
   signals fix that: a play badge saying "this is a video", and a text cue
   saying "this goes somewhere". Both are drawn in CSS, no extra image files. */

.thumb--video::before,
.thumb--video::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  z-index: 2;                 /* always sits over the image */
  transition: transform 180ms ease, background 180ms ease;
  pointer-events: none;
}

/* the disc */
.thumb--video::before {
  width: 68px; height: 68px;
  margin: -34px 0 0 -34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 250, 240, 0.92);
}

/* the triangle, drawn with borders — nudged right of centre so it reads as
   centred inside the disc rather than measured to its own bounding box */
.thumb--video::after {
  margin: -11px 0 0 -6px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent var(--bg);
}

/* smaller badge on the narrower row thumbnails */
.post .thumb--video::before {
  width: 46px; height: 46px; margin: -23px 0 0 -23px;
  border-width: 1.5px;
}
.post .thumb--video::after {
  margin: -7.5px 0 0 -4px;
  border-width: 7.5px 0 7.5px 12px;
}

.feature .thumb, .post .thumb { transition: opacity 180ms ease; }
.feature:hover .thumb, .post:hover .thumb { opacity: 0.93; }

.feature:hover .thumb--video::before,
.post:hover .thumb--video::before {
  background: rgba(0, 0, 0, 0.78);
  transform: scale(1.07);
}

.cta {
  display: inline-block;
  margin-top: 0.6rem;
  font-family: var(--display);
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  color: var(--muted);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  transition: color 160ms ease;
}
/* feature: the cue sits directly under the image, above the title */
.feature .cta { margin-top: 0.85rem; }
/* rows: the cue closes the block, after the blurb */
.post .cta { font-size: 0.8rem; margin-top: 0.6rem; }
.feature:hover .cta, .post:hover .cta { color: var(--text); }

.blurb { margin: 0.9rem 0 0; font-size: 1rem; max-width: 68ch; }

.post-title {
  margin: 0.9rem 0 0;
  font-family: var(--body);
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.35;
}
/* The feature's text runs the full width of the page rather than to a
   reading measure, so it sits square under the big image. */
.feature .post-title { font-size: 1.35rem; max-width: none; margin-top: 0.5rem; }
.feature .blurb { font-size: 1.05rem; max-width: none; margin-top: 0.45rem; }
.feature:hover .post-title,
.post:hover .post-title { color: var(--hover); }

/* Blog-style list of earlier posts. */
.posts { list-style: none; margin: 0; padding: 0; }
.posts li { border-top: 1px solid var(--line); }

.post {
  display: block; text-decoration: none;
  padding: clamp(1.5rem, 4vh, 2rem) 0;
}
.post .blurb { margin-top: 0.5rem; }

@media (min-width: 700px) {
  /* Image left, description right, with a gap between them. */
  .post {
    display: grid;
    grid-template-columns: minmax(0, 320px) 1fr;
    gap: 1.5rem;
    align-items: center;   /* text sits level with the middle of the image */
  }
  .post .post-title { margin-top: 0; }
  .post .blurb { margin-top: 0.45rem; }
}

main { padding-bottom: clamp(2rem, 6vh, 3.5rem); }

/* ======================================================== interview page */

/* Sticky on desktop so clicking a timecode far down the transcript still
   moves a video you can see. Turn it off by deleting `position: sticky`. */
.stage {
  position: sticky; top: var(--bar-h);
  background: var(--bg);
  padding: 1rem 0 0.85rem;
  z-index: 50;
}
.stage__inner {
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line);
  /* Deliberately a fixed size rather than one that shrinks as you scroll.
     Resizing it changed the page height, which moved the scroll position,
     which re-triggered the resize — a loop you could see as flickering.
     Change --video-width above to make it bigger or smaller. */
  max-width: var(--video-width);
  margin-inline: auto;
}
.stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.stage__none {
  width: 100%; height: 100%;
  display: grid; place-content: center; gap: 0.5rem; text-align: center;
  background: #efe7d6; padding: 1rem;
  font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}


.interview__title {
  font-family: var(--body);
  font-size: var(--title-size);
  font-weight: 700;
  line-height: 1.35;
  margin: 1.35rem 0 1.5rem;
  max-width: 100%;
}

/* The home page blurb, repeated under the title. Sized between the title and
   the transcript so it reads as an introduction rather than part of either. */
.interview__blurb {
  margin: -0.75rem 0 1.6rem;
  font-size: 13pt;
  line-height: 1.55;
  max-width: 100%;
}

.transcript { font-size: var(--transcript-size); max-width: 100%; }

.turn { display: grid; grid-template-columns: 1fr; gap: 0.1rem 1.1rem; padding: 0.4rem 0; }
@media (min-width: 620px) { .turn { grid-template-columns: 4.5rem 1fr; } }

.turn__time {
  font-family: var(--mono);
  font-size: 0.85em; font-weight: 400;
  color: var(--muted);
  background: none; border: 0; padding: 0; margin: 0;
  text-align: left; align-self: start; line-height: inherit;
  font-variant-numeric: tabular-nums;
}
button.turn__time { cursor: pointer; }
button.turn__time:hover { color: var(--hover); text-decoration: underline; }

.turn__speaker { font-weight: 700; }
/* display:none, not visibility:hidden — hidden text still reserves its width
   and that's what was indenting continuation paragraphs. */
.turn--same .turn__speaker { display: none; }
.turn p { margin: 0; font-weight: 400; }

.transcript__label {
  font-family: var(--mono);
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.6rem; margin: 0 0 1.35rem;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; justify-content: space-between;
}

/* ================================================================= footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2.2rem;
  font-family: var(--display);
  font-weight: 400;
  font-size: 0.92rem; letter-spacing: 0.02em;
  color: var(--muted);
  text-align: center;
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--hover); }
.site-footer .bar { color: var(--lavender); margin-inline: 0.6rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}
