/* Built2Perform · built2perform.uk · v4 mockup
   Concept: the kitchen table after training. Rules from the 24 Nov research:
   body 17-18px / 1.6, measure 50-75ch, headings 1.02-1.1, uneven deliberate spacing,
   dark for photos and media, warm paper for reading, nothing centred. */

@font-face { font-family: "Familjen Grotesk"; src: url("fonts/familjen-grotesk-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Familjen Grotesk"; src: url("fonts/familjen-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Familjen Grotesk"; src: url("fonts/familjen-grotesk-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Familjen Grotesk"; src: url("fonts/familjen-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("fonts/newsreader-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --black: #0f0e0c;        /* warm studio black, not pure black */
  --black-2: #1a1815;
  --rule-dark: #2c2924;
  --on-dark: #f4efe7;
  --on-dark-soft: #aba397;  /* 7.6:1 on --black */
  --paper: #f2ece2;        /* the kitchen table */
  --paper-2: #e7dfd1;
  --rule-paper: #d6ccbc;
  --ink: #1b1915;
  --ink-soft: #544c41;     /* 7.4:1 on --paper */
  --gold: #f0b429;
  --gold-hover: #ffc645;

  --sans: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --mark: "Barlow Condensed", "Arial Narrow", sans-serif;

  --gutter: 20px;
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--black); color: var(--on-dark); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.paper :focus-visible, .nudge :focus-visible { outline-color: var(--ink); }  /* gold is too faint on paper */
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* Mockup notice */
.mock-note { background: var(--black-2); color: var(--on-dark-soft); font-size: 13px; line-height: 1.4; padding: 8px 0; }
.mock-note b { color: var(--on-dark); font-weight: 600; }

/* Wordmark: as on the cover */
.wm { font-family: var(--mark); text-transform: uppercase; line-height: .9; white-space: nowrap; text-decoration: none; }
.wm b { font-weight: 700; } .wm .two { color: var(--gold); font-weight: 700; } .wm .light { font-weight: 400; letter-spacing: .03em; }

/* Shared type */
.label { font-size: 13px; font-weight: 600; line-height: 1.3; letter-spacing: .01em; }
.h2 { font-weight: 700; font-size: clamp(30px, 3.8vw, 46px); line-height: 1.06; letter-spacing: -.02em; }
.serif { font-family: var(--serif); font-size: 18px; line-height: 1.6; }
.measure { max-width: 62ch; }
.sample { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 2px 6px; font: 600 11px/1.3 var(--sans); letter-spacing: .02em; color: var(--black); background: var(--on-dark-soft); border-radius: 3px; }

/* Buttons and links */
.btn-play {
  display: inline-flex; align-items: center; gap: 14px; height: 56px; padding: 0 22px 0 8px;
  background: var(--gold); color: var(--black); border-radius: 4px; font-weight: 700; font-size: 17px; text-decoration: none;
  transition: background-color .15s;
}
.btn-play:hover { background: var(--gold-hover); }
.btn-play .disc { width: 40px; height: 40px; border-radius: 50%; background: var(--black); color: var(--gold); display: grid; place-items: center; }
.btn-play .disc svg { width: 16px; height: 16px; margin-left: 2px; }
.btn-play small { font-weight: 500; opacity: .75; font-size: 15px; }
.out { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 15px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.out svg { width: 11px; height: 11px; }
.out:hover { text-decoration-thickness: 2px; }
.soon { color: var(--on-dark-soft); font-weight: 500; font-size: 15px; }

/* Header */
.top { position: sticky; top: 0; z-index: 40; background: rgba(15,14,12,.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.is-scrolled { border-bottom-color: var(--rule-dark); }
.top-row { display: flex; align-items: center; height: 56px; gap: 28px; }
.top-row .wm { font-size: 22px; }
.nav { display: none; gap: 24px; margin-left: auto; }
.nav a { font-size: 15px; font-weight: 500; color: var(--on-dark-soft); text-decoration: none; }
.nav a:hover { color: var(--on-dark); }
.top-listen { margin-left: auto; height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 4px; background: var(--on-dark); color: var(--black); font-weight: 700; font-size: 14px; text-decoration: none; }
.top-listen:hover { background: #fff; }

/* Hero: this week's episode */
.hero-photo { position: relative; }
.hero-photo img { width: 100%; aspect-ratio: 1254 / 750; object-fit: cover; object-position: 50% 35%; }
.hero-photo .tag { position: absolute; left: var(--gutter); bottom: 14px; background: var(--black); color: var(--on-dark); padding: 6px 10px; border-radius: 3px; }
.hero-photo .tag .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--on-dark); margin-right: 8px; vertical-align: 1px; }
.hero-body { padding: 22px 0 56px; }
.ep-meta { color: var(--on-dark-soft); }
.ep-title { margin-top: 10px; font-weight: 700; font-size: clamp(34px, 5.4vw, 72px); line-height: 1.02; letter-spacing: -.025em; text-wrap: balance; }
.ep-title.is-long { font-size: clamp(30px, 3.9vw, 54px); line-height: 1.05; }
.ep-desc { margin-top: 16px; color: #d8d0c4; max-width: 46ch; }
.hero-actions { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.cadence { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--rule-dark); color: var(--on-dark-soft); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.cadence strong { color: var(--on-dark); font-weight: 600; }

/* Episodes row */
.episodes { padding: 64px 0 40px; }
.row-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; }
.row-head .out { flex: none; }
.row-head p { color: var(--on-dark-soft); margin-top: 6px; }
.arrows { display: none; gap: 8px; }
.arrows button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule-dark); display: grid; place-items: center; }
.arrows button:hover { border-color: var(--on-dark); }
.arrows svg { width: 16px; height: 16px; }
.scroller { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gutter) 12px; scroll-padding-left: var(--gutter); scrollbar-width: none; }
.scroller::-webkit-scrollbar { display: none; }
.ep-card { flex: 0 0 68%; scroll-snap-align: start; }
.art { position: relative; aspect-ratio: 1 / 1; border-radius: 4px; overflow: hidden; background: var(--black-2); }
.art img { width: 100%; height: 100%; object-fit: cover; }
.art::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(to bottom, rgba(15,14,12,0), rgba(15,14,12,.92)); }
.art .art-text { position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 12px; }
.art .art-ep { font-family: var(--mark); font-weight: 700; font-size: 30px; line-height: 1; color: var(--on-dark); }
.art .art-title { font-weight: 700; font-size: 19px; line-height: 1.1; margin-top: 4px; letter-spacing: -.01em; }
.art .art-mark { position: absolute; z-index: 1; top: 12px; left: 14px; font-size: 14px; }
.art.upcoming::after { display: none; }
.art.upcoming { display: grid; align-content: end; padding: 14px; border: 1px dashed var(--rule-dark); background: transparent; }
.art.upcoming .art-ep { color: var(--on-dark-soft); font-size: 44px; }
.ep-info { padding-top: 12px; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: start; }
.ep-info .label { color: var(--on-dark-soft); }
.ep-info h3 { font-size: 18px; line-height: 1.25; font-weight: 600; grid-column: 1; }
.ep-info .mini-play { grid-row: 1 / span 2; grid-column: 2; width: 44px; height: 44px; border-radius: 50%; background: var(--on-dark); color: var(--black); display: grid; place-items: center; }
.ep-info .mini-play svg { width: 14px; height: 14px; margin-left: 2px; }
.start-here { color: var(--on-dark) !important; font-weight: 700; }

/* Clips row */
.clips { padding: 32px 0 72px; }
.clip { flex: 0 0 42%; scroll-snap-align: start; text-decoration: none; }
.clip .frame { position: relative; aspect-ratio: 9 / 16; border-radius: 4px; overflow: hidden; }
.clip img { width: 100%; height: 100%; object-fit: cover; }
.clip .frame::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,.75)); }
.clip .len { position: absolute; z-index: 1; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.clip .len svg { width: 10px; height: 10px; }
.clip p { margin-top: 8px; font-size: 15px; line-height: 1.35; color: #d8d0c4; }

/* Paper sections: the table */
.paper { background: var(--paper); color: var(--ink); }
.table-intro { padding: 88px 0 48px; }
.table-intro .lead { margin-top: 16px; color: var(--ink-soft); }
.hosts { padding-bottom: 96px; display: grid; gap: 56px; }
.host .portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; border-radius: 4px; }
.host .name { margin-top: 18px; font-weight: 700; font-size: 28px; line-height: 1.1; letter-spacing: -.015em; }
.host .role { margin-top: 6px; color: var(--ink-soft); font-size: 15px; font-weight: 500; }
.host .bio { margin-top: 14px; }
.host .bio.pending { color: var(--ink-soft); font-style: italic; }
.host .out { margin-top: 16px; }
.host .out:hover { color: #8a5d00; }

.talk { border-top: 1px solid var(--rule-paper); padding: 64px 0 80px; display: grid; gap: 28px; }
.talk-list li { padding: 18px 0; border-top: 1px solid var(--rule-paper); display: grid; gap: 4px; }
.talk-list li:last-child { border-bottom: 1px solid var(--rule-paper); }
.talk-list h3 { font-weight: 600; font-size: 21px; line-height: 1.25; }
.talk-list p { color: var(--ink-soft); }

.ask { border-top: 1px solid var(--rule-paper); padding: 64px 0 80px; display: grid; gap: 28px; }
.ask-photo img { width: 100%; height: auto; border-radius: 4px; display: block; }
.ask-body .lead { margin-top: 12px; color: var(--ink-soft); }
.ask-form { margin-top: 24px; min-height: 150px; }
.ask .nl-fallback { background: var(--ink); color: var(--paper); }
.ask-note { margin-top: 12px; font-size: 14px; color: var(--ink-soft); }
.ask-form iframe { max-height: 260px; }
.form-note a, .ask-note a, .nudge-note a { color: inherit; text-underline-offset: 3px; }
.nudge-note { margin-top: 8px; font-size: 13px; color: var(--ink-soft); }
.legal { padding: 56px 0 96px; }
.legal-body .h2 { margin-top: 10px; }
.legal-body .lead { margin-top: 16px; color: var(--ink-soft); }
.legal-body h2 { margin-top: 44px; font-weight: 700; font-size: 21px; line-height: 1.25; }
.legal-body p, .legal-body ul { margin-top: 12px; }
.legal-body ul { padding-left: 1.2em; list-style: disc; }
.legal-body li { margin-top: 6px; }
.legal-body a { color: inherit; text-underline-offset: 3px; }
.follow { background: var(--paper-2); padding: 72px 0 80px; }
.follow-title { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.1; letter-spacing: -.01em; }
.follow .lead { margin-top: 16px; }
.follow .btn-play { margin-top: 28px; }
.follow .btn-play .disc svg { margin-left: 0; }

/* Newsletter */
.letter { padding: 80px 0 96px; display: grid; gap: 36px; }
.letter .lead { margin-top: 14px; color: #d8d0c4; }
.inside { margin-top: 22px; display: grid; gap: 10px; }
.inside li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; align-items: baseline; color: var(--on-dark); }
.inside li::before { content: ""; width: 8px; height: 8px; background: var(--on-dark-soft); border-radius: 2px; transform: translateY(-1px); }
.form-row { display: flex; gap: 8px; }
.form-row input { flex: 1; height: 54px; padding: 0 16px; border: 1px solid #4a453d; border-radius: 4px; background: var(--black-2); color: var(--on-dark); font: 400 17px var(--sans); }
.form-row input::placeholder { color: var(--on-dark-soft); }
.form-row button { height: 54px; padding: 0 22px; border-radius: 4px; background: var(--on-dark); color: var(--black); font-weight: 700; font-size: 16px; }
.form-row button:hover { background: #fff; }
.form-note { margin-top: 10px; color: var(--on-dark-soft); font-size: 14px; }
.form-status { margin-top: 8px; min-height: 1.4em; font-size: 15px; color: var(--on-dark); }

/* Footer */
.foot { border-top: 1px solid var(--rule-dark); padding: 36px 0 120px; display: grid; gap: 20px; color: var(--on-dark-soft); font-size: 15px; }
.foot .wm { font-size: 26px; color: var(--on-dark); }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--on-dark); text-decoration: none; } .foot a:hover { color: var(--on-dark-soft); }

/* Sticky player (appears on play) */
.player { position: fixed; z-index: 60; left: 8px; right: 8px; bottom: 8px; background: var(--black-2); border: 1px solid var(--rule-dark); border-radius: 6px; padding: 10px; display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; transform: translateY(140%); visibility: hidden; transition: transform .35s cubic-bezier(.2,.8,.2,1), visibility 0s .35s; }
.player.is-open { transform: none; visibility: visible; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.player img { width: 48px; height: 48px; border-radius: 3px; object-fit: cover; }
.player .p-title { font-weight: 600; font-size: 15px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player .p-sub { font-size: 13px; color: var(--on-dark-soft); }
.player .p-main { min-width: 0; }
.player .p-sub a { color: var(--on-dark); text-underline-offset: 3px; }
.player .p-bar { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.player .p-bar[hidden], .player .p-sub[hidden], .player .p-toggle[hidden] { display: none; }
.player .p-bar input { flex: 1; min-width: 0; accent-color: var(--gold); height: 4px; }
.player .p-time { font-size: 12px; color: var(--on-dark-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.player .p-btns { display: flex; align-items: center; }
.player .p-toggle { width: 44px; height: 44px; border-radius: 50%; background: var(--gold); color: var(--black); display: grid; place-items: center; }
.player .p-toggle svg { width: 15px; height: 15px; }
.player .p-toggle .i-play { display: block; margin-left: 2px; } .player .p-toggle .i-pause { display: none; }
.player.is-playing .p-toggle .i-play { display: none; } .player.is-playing .p-toggle .i-pause { display: block; }
.player .p-close { width: 44px; height: 44px; display: grid; place-items: center; color: var(--on-dark-soft); }
.player .p-close svg { width: 16px; height: 16px; }

/* Newsletter slide-up: never on arrival, never full-screen */
.nudge { position: fixed; z-index: 55; left: 8px; right: 8px; bottom: 8px; background: var(--paper); color: var(--ink); border-radius: 6px; padding: 16px 16px 18px; border: 1px solid var(--rule-paper); transform: translateY(140%); visibility: hidden; transition: transform .4s cubic-bezier(.2,.8,.2,1), visibility 0s .4s; }
.nudge.is-open { transform: none; visibility: visible; transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.player.is-open ~ .nudge { bottom: 84px; }
.nudge h2 { font-weight: 700; font-size: 20px; line-height: 1.2; padding-right: 40px; }
.nudge p { margin-top: 4px; color: var(--ink-soft); font-size: 15px; line-height: 1.45; }
.nl-fallback { display: none; align-items: center; height: 48px; padding: 0 20px; border-radius: 4px; background: var(--on-dark); color: var(--black); font-weight: 700; font-size: 16px; text-decoration: none; }
.nl-embed.no-embed .nl-fallback { display: inline-flex; }
.nudge .nl-embed { margin-top: 14px; }
.nudge .nl-fallback { background: var(--ink); color: var(--paper); }
.nl-embed { min-height: 48px; }
.nl-embed > div, .nl-embed iframe { width: 100% !important; }
.nl-embed iframe { max-height: 160px; }
.nl-embed .form-note { margin-top: 10px; }
.nudge .form-row input { background: #fff; border-color: var(--rule-paper); color: var(--ink); height: 48px; }
.nudge .form-row input::placeholder { color: #7a7166; }
.nudge .form-row button { height: 48px; background: var(--ink); color: var(--paper); }
.nudge .form-row button:hover { background: #000; }
.nudge .n-close { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink-soft); }
.nudge .n-close svg { width: 16px; height: 16px; }

/* ---------- Tablet and up ---------- */
@media (min-width: 760px) {
  :root { --gutter: 40px; }
  .ep-card { flex-basis: 300px; }
  .clip { flex-basis: 200px; }
  .hosts { grid-template-columns: 1fr 1fr; gap: 48px; }
  .hosts .host:last-child { margin-top: 72px; }
  .talk { grid-template-columns: 4fr 8fr; gap: 48px; }
  .ask { grid-template-columns: 6fr 6fr; gap: 56px; align-items: center; }
  .letter { grid-template-columns: 6fr 5fr; align-items: end; gap: 64px; }
  .foot { grid-template-columns: 1fr auto; align-items: end; }
  .player, .nudge { left: auto; right: 20px; bottom: 20px; width: 400px; }
  .player.is-open ~ .nudge { bottom: 100px; }
  .arrows { display: flex; }
}

/* ---------- Desktop: photo bleeds left, episode sits beside it ---------- */
@media (min-width: 1040px) {
  .nav { display: flex; }
  .top-listen { margin-left: 0; }
  .top-row { height: 68px; }
  .hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); min-height: calc(100vh - 68px - 33px); max-height: 860px; }
  .hero-photo img { height: 100%; aspect-ratio: auto; object-position: 50% 30%; }
  .hero-photo .tag { left: 24px; bottom: 24px; }
  .hero-body { width: auto; margin: 0; padding: 48px max(40px, calc((100vw - var(--max)) / 2)) 56px 56px; display: flex; flex-direction: column; justify-content: flex-end; }
  .episodes { padding-top: 96px; }
  .scroller { padding-left: max(40px, calc((100vw - var(--max)) / 2)); scroll-padding-left: max(40px, calc((100vw - var(--max)) / 2)); }
  .table-intro { padding-top: 128px; }
  .hosts { grid-template-columns: 5fr 5fr 2fr; }
  .follow { padding: 112px 0 120px; }
  .follow .wrap > * { margin-left: calc(100% / 12 * 4); }
}
