/* Tradition Five — traditionfive.org
   Palette derived from the T5 show cover: pastel pink / mint split, black serif type. */

:root {
  --pink: #F6C9C6;
  --pink-soft: #FAE3E1;
  --mint: #C9E9DF;
  --mint-soft: #E4F4EF;
  --ink: #141414;
  --muted: #5b5b5b;
  --paper: #FCFAF7;
  --card: #ffffff;
  --line: rgba(20, 20, 20, .12);
  --radius: 16px;
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video, iframe { max-width: 100%; }
/* Pair with the width/height attributes: without this, a CSS width override leaves
   the attribute height in force and stretches the image. */
img { height: auto; }
/* <picture> wrappers must not become the flex/grid item — let the <img> size rules apply */
picture { display: contents; }

.container { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, .serif { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }

a { color: inherit; }

/* ---------- Nav ---------- */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252, 250, 247, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-size: 1.25rem; white-space: nowrap; }
.nav-logo img { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; }
.nav-links { display: flex; gap: 22px; font-size: .95rem; }
.nav-links a { text-decoration: none; color: var(--muted); white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--ink); }

@media (max-width: 560px) {
  /* The hero already states "Tradition Five" — drop the redundant wordmark so the
     icon + three links fit on one line down to the narrowest phones. */
  .nav-logo img { width: 30px; height: 30px; }
  .nav-logo-text { display: none; }
  .nav-links { gap: 16px; font-size: .85rem; }
}
@media (max-width: 360px) {
  .nav-links { gap: 13px; font-size: .8rem; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(90deg, var(--pink) 0 50%, var(--mint) 50% 100%);
  padding: 72px 0 64px;
  text-align: center;
}
.hero-eyebrow {
  font-size: .8rem; letter-spacing: .28em; text-transform: uppercase;
  margin-bottom: 14px;
}
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); line-height: 1.12; margin-bottom: 14px; }
.hero-sub { max-width: 560px; margin: 0 auto 30px; font-size: 1.05rem; color: rgba(20,20,20,.75); }

.badges { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: #fff; text-decoration: none;
  padding: 11px 20px; border-radius: 999px; font-size: .92rem;
}
.badge:hover { background: #000; transform: translateY(-1px); }
.badge svg { width: 17px; height: 17px; fill: currentColor; }
.badge.light { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.badge.light:hover { background: var(--paper); }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-label {
  font-size: .78rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.section-title { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-bottom: 18px; line-height: 1.2; max-width: 40rem; }
.section-body { max-width: 40rem; color: var(--muted); }
/* centred sections: keep the title block centred too, not left-aligned within its max-width */
.cta .section-title, .freeband .section-title { margin-left: auto; margin-right: auto; }
.section-body p + p { margin-top: 14px; }

.band-mint { background: var(--mint-soft); }
.band-pink { background: var(--pink-soft); }

/* ---------- Latest episode ---------- */
.spotify-embed { border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(20,20,20,.10); }
.spotify-embed iframe { display: block; width: 100%; height: 352px; border: 0; }
.latest-desc { max-width: 42rem; margin-bottom: 22px; font-size: 1.05rem; color: var(--muted); }
.latest-note { margin-top: 14px; font-size: .88rem; color: var(--muted); }

/* ---------- Hosts ---------- */
.hosts-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 820px) { .hosts-grid { grid-template-columns: 5fr 6fr; } }
.hosts-video video {
  width: 100%; border-radius: var(--radius);
  box-shadow: 0 14px 38px rgba(20,20,20,.14);
}

/* ---------- My12SC teaser ---------- */
.teaser {
  display: grid; gap: 26px; align-items: center;
  background: var(--ink); color: #fff; border-radius: 22px;
  padding: 38px 32px;
}
@media (min-width: 820px) { .teaser { grid-template-columns: auto 1fr auto; padding: 42px 48px; } }
/* In this 3-col grid the icon must be its own grid item, so opt out of the
   global picture{display:contents} (which mis-sizes the auto/1fr tracks here). */
.teaser picture { display: block; }
.teaser img { width: 84px; height: 84px; border-radius: 20px; }
.teaser h2 { font-size: 1.5rem; margin-bottom: 8px; }
.teaser p { color: rgba(255,255,255,.75); font-size: .97rem; max-width: 520px; }
.teaser-lead { font-weight: 600; color: #fff !important; }
.teaser-pillars {
  list-style: none; margin: 8px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px 0;
  font-size: .9rem; color: rgba(255,255,255,.72);
}
.teaser-pillars li { display: inline-flex; align-items: center; }
.teaser-pillars li:not(:last-child)::after {
  content: "·"; margin: 0 12px; color: rgba(255,255,255,.4);
}
.teaser .badge { background: #fff; color: var(--ink); white-space: nowrap; }
.teaser .badge:hover { background: var(--mint); }

/* ---------- Episode catalogue ---------- */
.ep-grid { display: grid; gap: 18px; margin-top: 34px; }
@media (min-width: 720px) { .ep-grid { grid-template-columns: 1fr 1fr; } }
.ep-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 10px;
  min-width: 0; /* long unbroken URLs in descriptions must not widen the grid */
}
.ep-card:nth-child(odd) { border-top: 4px solid var(--pink); }
.ep-card:nth-child(even) { border-top: 4px solid var(--mint); }
.ep-meta { display: flex; gap: 14px; font-size: .8rem; color: var(--muted); letter-spacing: .02em; }
.ep-num { font-weight: 600; color: var(--ink); }
.ep-title { font-size: 1.28rem; line-height: 1.25; }
.ep-desc {
  font-size: .92rem; color: var(--muted);
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  cursor: pointer;
}
.ep-desc.open { -webkit-line-clamp: unset; }
.ep-actions { display: flex; gap: 16px; align-items: center; margin-top: auto; padding-top: 6px; }
.ep-play {
  font: inherit; font-size: .88rem; cursor: pointer;
  background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 8px 18px;
}
.ep-play:hover { background: #000; }
.ep-actions a { font-size: .85rem; color: var(--muted); }
.ep-player iframe { display: block; width: 100%; height: 175px; border: 0; border-radius: 12px; margin-top: 6px; }

/* ---------- Subscribe CTA ---------- */
.cta { text-align: center; }
.cta .badges { margin-top: 26px; }

/* ---------- App page (my12sc) ---------- */
/* Two solid full-bleed panels — text always on mint, screens always on pink,
   so copy never crosses the colour seam (fixes the overrun into the pink). */
.app-hero { display: grid; }
.app-hero-text { background: var(--mint); display: flex; justify-content: center; padding: 56px 20px; }
.app-hero-screens { background: var(--pink); display: flex; justify-content: center; padding: 56px 20px; }
.app-hero-content { width: 100%; max-width: 512px; }
@media (min-width: 860px) {
  .app-hero { grid-template-columns: 1fr 1fr; }
  .app-hero-text { justify-content: flex-end; padding: 76px clamp(28px, 4vw, 60px); }
  .app-hero-screens { justify-content: flex-start; padding: 76px clamp(28px, 4vw, 60px); }
}
.app-icon { width: 88px; height: 88px; border-radius: 22px; box-shadow: 0 10px 24px rgba(20,20,20,.18); margin-bottom: 20px; }
.app-hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.12; margin-bottom: 14px; }
.app-hero .hero-sub { margin: 0 0 34px; }
.app-hero .badges { margin-top: 4px; }
.app-screens { display: flex; gap: 20px; justify-content: center; width: 100%; max-width: 512px; }
.app-screens img {
  width: min(46%, 240px); border-radius: 26px;
  box-shadow: 0 18px 44px rgba(20,20,20,.22);
}
.app-screens img:last-child { transform: translateY(26px); }

/* ---------- Screenshot carousel (reused from ensoventures.org my12sc) ---------- */
.screens-scroll {
  display: flex; gap: 22px; overflow-x: auto;
  padding: 6px 20px 22px; margin: 30px -20px 0;   /* bleed to container edges */
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.screens-scroll::-webkit-scrollbar { height: 8px; }
.screens-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }
/* The <picture> must be the flex item here: a height-sized img with width:auto
   collapses to zero width as a WebKit flex item (aspect-ratio transfer bug). */
.screens-scroll picture { display: block; flex-shrink: 0; }
.screens-scroll img {
  height: 460px; width: auto;
  border-radius: 24px; box-shadow: 0 12px 34px rgba(20,20,20,.16);
  scroll-snap-align: center;
}
@media (max-width: 768px) { .screens-scroll img { height: 380px; } }

.features { display: grid; gap: 18px; margin-top: 34px; }
@media (min-width: 720px) { .features { grid-template-columns: 1fr 1fr; } }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
}
.feature h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature p { font-size: .93rem; color: var(--muted); }

.freeband { text-align: center; }
.freeband .section-body { margin: 0 auto; }
.freeband .badges { margin-top: 34px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: .85rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 18px 36px; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); }
.disclaimer { max-width: 560px; margin-top: 16px; font-size: .8rem; }

/* ---------- Cookie banner (reused from ensoventures.org, T5-themed) ---------- */
#cookie-banner {
  position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 999;
  background: rgba(252, 250, 247, .93);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: 12px; border: 1px solid var(--line);
  padding: 1rem 1.25rem;
  display: flex; flex-direction: column; gap: .75rem;
  box-shadow: 0 8px 28px rgba(20, 20, 20, .16);
  max-width: 320px; width: calc(100% - 2.5rem);
}
#cookie-banner p { font-size: .8rem; color: var(--muted); margin: 0; line-height: 1.5; }
.cookie-actions { display: flex; gap: .5rem; }
.cookie-btn {
  flex: 1; padding: .5rem .8rem; border-radius: 999px;
  font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: all .2s;
}
.cookie-btn-outline { background: transparent; border: 1.5px solid var(--ink); color: var(--ink); }
.cookie-btn-outline:hover { background: rgba(20, 20, 20, .06); }
.cookie-btn-filled { background: var(--ink); border: 1.5px solid var(--ink); color: #fff; }
.cookie-btn-filled:hover { background: #000; }
