/* Put The Bucket In The Bucket: website styles.
   Same palette and title font as the Constellation Explorer. */

@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-latin-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0f1117;
  --surface: #171a23;
  --surface-2: #1d212c;
  --border: #2a2f3f;
  --text: #e8eaf0;
  --muted: #9aa1b8;
  --accent: #e8a020;
  --accent-ink: #171920;
  --water: #7ec8d2;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 14px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: 0.005em; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: filter 0.15s, background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  white-space: nowrap;
}
.btn svg { width: 1.1em; height: 1.1em; flex-shrink: 0; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-ghost { border-color: var(--border); color: var(--text); background: rgba(255, 255, 255, 0.02); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-small { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn-large { padding: 0.85rem 1.4rem; font-size: 1rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }

/* ── Header ──────────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; gap: 1.25rem; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; min-width: 0; }
.brand img { width: 36px; height: 36px; object-fit: contain; flex-shrink: 0; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; white-space: nowrap; }
.nav { display: flex; gap: 1.4rem; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.header-listen { flex-shrink: 0; }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 88px 0 80px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero::before,
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; }
.hero::before { background: url('/backdrop.jpg') center / cover no-repeat; opacity: 0.32; }
.hero::after { background: radial-gradient(ellipse at 50% 40%, transparent 20%, var(--bg) 85%); }
.hero-inner { max-width: 760px; }
.hero-logo {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 0 18px rgba(126, 200, 210, 0.35));
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); text-wrap: balance; }
.eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.lede { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); margin: 1.1rem auto 0; max-width: 620px; text-wrap: balance; }
.hero .actions { justify-content: center; margin-top: 2rem; }

/* ── Sections ────────────────────────────────────────────────────────────── */

.section { padding: 72px 0; }
.section-tight { padding-top: 24px; }
.section + .section { border-top: 1px solid var(--border); }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1.4rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.more { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.more:hover { text-decoration: underline; }

.ep-num { margin: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.ep-meta { color: var(--muted); font-size: 0.9rem; margin: 0.35rem 0 0; }

/* Latest episode */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 320px) 1fr;
  gap: 2.5rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.feature-art { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.feature h3 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-top: 0.35rem; }
.feature h3 a { text-decoration: none; }
.feature h3 a:hover { color: var(--accent); }
.feature-text > p:not(.ep-num):not(.ep-meta) { color: var(--muted); margin-top: 1rem; }

/* About + where to start */
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: start; }
.about p { font-size: 1.1rem; color: var(--muted); max-width: 60ch; }
.start-here {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.start-here .section-title { font-size: 1.35rem; margin-bottom: 0.75rem; }
.start-here p { color: var(--muted); }
.start-link { display: flex; align-items: center; gap: 0.9rem; text-decoration: none; padding: 10px; margin: 0 -10px -10px; border-radius: 10px; }
.start-link:hover { background: var(--surface-2); }
.start-link strong { display: block; font-family: var(--serif); font-size: 1.15rem; }
.start-art { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }

/* Explorer promo */
.explorer-promo { background: linear-gradient(180deg, var(--bg), var(--surface) 60%, var(--bg)); }
.promo { display: grid; grid-template-columns: 1fr 1.4fr; gap: 3rem; align-items: center; }
.promo-text h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); margin-bottom: 1rem; }
.promo-text p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.5rem; }
.promo-shot {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(126, 200, 210, 0.06);
  transition: transform 0.25s;
}
.promo-shot:hover { transform: translateY(-3px); }

/* Episode grid */
.ep-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.ep-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.ep-card a:hover { border-color: var(--accent); transform: translateY(-2px); }
.ep-card-art { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-2); }
.ep-card-text { display: flex; flex-direction: column; gap: 0.2rem; padding: 14px 16px 16px; }
.ep-card-num { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.ep-card-title { font-family: var(--serif); font-weight: 600; font-size: 1.2rem; line-height: 1.25; }
.ep-card-meta { color: var(--muted); font-size: 0.85rem; }

/* Contact */
.contact-inner { text-align: center; max-width: 640px; }
.contact p { color: var(--muted); font-size: 1.1rem; }
.contact .btn { margin-top: 0.5rem; white-space: normal; word-break: break-all; }

/* ── Episodes list page ──────────────────────────────────────────────────── */

.page-head { padding: 64px 0 24px; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
.page-head .lede { margin-left: 0; text-align: left; }
.ep-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ep-row {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.15s;
}
.ep-row:hover { border-color: var(--accent); }
.ep-row-art { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.ep-row-text { display: flex; flex-direction: column; min-width: 0; }
.ep-row-title { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; line-height: 1.25; margin-top: 0.15rem; }
.ep-row-intro {
  color: var(--muted);
  margin-top: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Episode page ────────────────────────────────────────────────────────── */

.episode { padding: 40px 0 72px; }
.back { display: inline-block; color: var(--muted); text-decoration: none; margin-bottom: 1.5rem; }
.back:hover { color: var(--text); }
.episode-head { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 2.5rem; align-items: center; }
.episode-art { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.episode-head h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-top: 0.35rem; text-wrap: balance; }
.notes { max-width: 720px; margin-top: 3rem; font-size: 1.08rem; }
.notes p { color: var(--text); }
.notes p:first-child { font-size: 1.2rem; font-family: var(--serif); line-height: 1.45; }
.notes h2 { font-family: var(--sans); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin: 2rem 0 0.75rem; }
.notes ul { list-style: none; display: flex; flex-direction: column; gap: 0.9rem; }
.notes li { position: relative; padding-left: 1.4rem; color: var(--muted); }
.notes li::before { content: ''; position: absolute; left: 0; top: 0.65em; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--water); }
.ep-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 3.5rem; max-width: 720px; }
.ep-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  background: var(--surface);
}
.ep-nav a:hover { border-color: var(--accent); }
.ep-nav span { color: var(--muted); font-size: 0.85rem; }
.ep-nav strong { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; }
.ep-nav-next { text-align: right; }

.page-404 { text-align: center; padding: 96px 0; }
.page-404 .lede { margin: 1rem auto 0; text-align: center; }
.page-404 .actions { justify-content: center; }
.page-404 .hero-logo { width: 96px; height: 96px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer { border-top: 1px solid var(--border); padding: 36px 0 44px; background: var(--surface); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--serif); font-weight: 600; }
.footer-brand img { width: 28px; height: 28px; object-fit: contain; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.footer-links a:hover { color: var(--accent); }
.copyright { width: 100%; margin: 0.5rem 0 0; color: var(--muted); font-size: 0.82rem; opacity: 0.8; }
.copyright a { color: inherit; text-decoration: none; transition: color 0.15s; }
.copyright a:hover { color: var(--text); }

/* ── Smaller screens ─────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .feature, .episode-head { grid-template-columns: 1fr; gap: 1.5rem; }
  .feature-art-link, .episode-art { max-width: 360px; }
  .split, .promo { grid-template-columns: 1fr; gap: 2rem; }
  .promo-shot { order: -1; }
}

@media (max-width: 640px) {
  .header-row { gap: 0.75rem; height: 58px; }
  .brand img { width: 30px; height: 30px; }
  .brand-name { font-size: 0.98rem; }
  .nav { gap: 0.9rem; }
  .nav a { font-size: 0.88rem; }
  .header-listen span { display: none; }       /* just the play icon */
  .header-listen { padding: 0.5rem; }
  .hero { padding: 56px 0 52px; }
  .hero-logo { width: 88px; height: 88px; }
  .section { padding: 52px 0; }
  .feature { padding: 18px; }
  .ep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .ep-card-text { padding: 10px 12px 12px; }
  .ep-card-title { font-size: 1.02rem; }
  .ep-card-meta { font-size: 0.78rem; }
  .ep-row { gap: 0.9rem; padding: 12px; }
  .ep-row-art { width: 72px; height: 72px; }
  .ep-row-title { font-size: 1.12rem; }
  .ep-nav { grid-template-columns: 1fr; }
  .ep-nav-next { text-align: left; }
}

/* very narrow: the name gives way to the logo; nav stays */
@media (max-width: 420px) {
  .brand-name { display: none; }
  .nav { margin-left: auto; }
}
