/* ==================================================================
   The Roofing Experts Podcast — vanilla CSS.
   Palette pulled from the show logo: deep navy + gold + off-white.
   ================================================================== */

:root {
  --navy-950: #071626;
  --navy-900: #091c33;
  --navy-800: #0d2644;
  --navy-700: #143a66;
  --line: #1d3a5e;
  --ink: #ebeef2;
  --ink-dim: #b9c5d6;
  --muted: #8fa1b8;
  --gold: #d59e47;
  --gold-bright: #e5b566;
  --gold-dark: #b98630;
  --radius: 12px;
  --container: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- base ---------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--navy-950);
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.015em; }

a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: var(--gold); }

::selection { background: var(--gold); color: var(--navy-950); }

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

.container { max-width: var(--container); margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 780px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -48px; left: 8px; z-index: 200;
  background: var(--gold); color: var(--navy-950);
  padding: 0.5rem 1rem; border-radius: 6px; font-weight: 700;
}
.skip-link:focus { top: 8px; color: var(--navy-950); }

.kicker, .section-kicker {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

.accent { color: var(--gold); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.68rem 1.15rem; border-radius: 9px;
  font-weight: 650; font-size: 0.95rem; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-accent { background: var(--gold); color: var(--navy-950); }
.btn-accent:hover { background: var(--gold-bright); color: var(--navy-950); }

.btn-outline { border-color: var(--line); color: var(--ink-dim); background: transparent; }
.btn-outline:hover { border-color: var(--gold); color: var(--gold-bright); }

.btn-platform { background: var(--navy-800); border-color: var(--line); color: var(--ink); }
.btn-platform:hover { border-color: var(--gold); color: var(--gold-bright); }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(9, 28, 51, 0.93);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark { flex: none; }
.brand-text { font-weight: 800; font-size: 1.02rem; letter-spacing: 0.01em; white-space: nowrap; }
.brand-text em { font-style: normal; color: var(--gold); }

.site-nav { display: flex; gap: 1.6rem; }
.site-nav a {
  color: var(--ink-dim); font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em; padding: 0.4rem 0;
}
.site-nav a:hover { color: var(--gold-bright); }
.site-nav a[aria-current="page"] { color: var(--gold); box-shadow: 0 2px 0 var(--gold); }

.nav-toggle { display: none; background: none; border: 0; padding: 0.6rem; cursor: pointer; }
.nav-toggle-bar {
  display: block; width: 22px; height: 2px; background: var(--ink);
  margin: 5px 0; border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 719px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--navy-900); border-bottom: 1px solid var(--line);
    padding: 0.5rem 1.25rem 1rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.8rem 0; border-bottom: 1px solid rgba(29, 58, 94, 0.5); }
  .site-nav a:last-child { border-bottom: 0; }
  .site-nav a[aria-current="page"] { box-shadow: none; }
}

/* ---------- hero ---------- */

.hero { padding: 4rem 0 3.25rem; text-align: center; background: linear-gradient(180deg, var(--navy-900), var(--navy-950)); }

.hero-logo {
  width: 150px; height: 150px; border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  margin-bottom: 1.5rem;
}

.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.3rem); font-weight: 800; margin-bottom: 0.35em; }

.tagline { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--ink-dim); font-weight: 550; margin: 0 0 0.9rem; }

.hero-line { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 1rem; }

.subscribe-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin-top: 1.6rem; }

/* ---------- sections ---------- */

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.section-head h2 { margin: 0; font-size: 1.55rem; }
.see-all { font-weight: 650; font-size: 0.95rem; white-space: nowrap; }

.latest { padding: 3.5rem 0; background: var(--navy-900); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.latest-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 2.5rem; align-items: center; }
@media (max-width: 860px) { .latest-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

.latest-title { font-size: clamp(1.35rem, 3vw, 1.8rem); margin: 0.4rem 0 0.5rem; }
.latest-title a { color: var(--ink); }
.latest-title a:hover { color: var(--gold-bright); }
.latest-excerpt { color: var(--muted); margin: 0.4rem 0 1.25rem; }

.recent { padding: 3.5rem 0 1rem; }

/* ---------- player ---------- */

.video-embed {
  position: relative; aspect-ratio: 16 / 9;
  background: #000; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}
.video-embed iframe, .video-embed video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.facade { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.facade-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 74px; height: 74px; border-radius: 50%;
  background: var(--gold); color: var(--navy-950);
  display: grid; place-items: center; padding-left: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s ease, background 0.15s ease;
}
.facade:hover .facade-play { transform: translate(-50%, -50%) scale(1.07); background: var(--gold-bright); }

.audio-alt { margin-top: 0.9rem; }
.audio-alt summary { color: var(--muted); cursor: pointer; font-size: 0.92rem; }
.audio-alt summary:hover { color: var(--ink-dim); }
.audio-alt audio, .audio-player audio { width: 100%; margin-top: 0.6rem; }

.audio-player {
  background: var(--navy-800); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.25rem;
}
.audio-player audio { margin: 0; }

/* ---------- episode cards ---------- */

.episode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.4rem; }

.episode-card {
  background: var(--navy-800); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.episode-card:hover { transform: translateY(-3px); border-color: var(--gold-dark); }

.card-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy-900); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-play {
  position: absolute; right: 0.8rem; bottom: 0.8rem;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--gold); color: var(--navy-950);
  display: grid; place-items: center; padding-left: 2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.card-body { padding: 1.05rem 1.15rem 1.25rem; }

.card-meta { display: flex; flex-wrap: wrap; gap: 0.45rem; color: var(--muted); font-size: 0.83rem; margin: 0 0 0.5rem; }

.card-title { font-size: 1.12rem; margin: 0 0 0.4rem; line-height: 1.35; }
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--gold-bright); }

.card-excerpt {
  color: var(--muted); font-size: 0.92rem; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- mission strip ---------- */

.mission-strip { margin-top: 3.5rem; padding: 3.25rem 0; text-align: center; background: var(--navy-900); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mission-quote { font-size: clamp(1.2rem, 3vw, 1.55rem); font-weight: 650; max-width: 720px; margin: 0 auto 1rem; color: var(--ink); }
.mission-link { font-weight: 650; }

/* ---------- newsletter ---------- */

.newsletter {
  margin: 3.5rem auto; padding: 2.5rem 1.75rem;
  background: var(--navy-800); border: 1px solid var(--line);
  border-radius: 16px; text-align: center;
}
.newsletter-inner { max-width: 560px; margin: 0 auto; }
.newsletter h2 { font-size: 1.45rem; }
.newsletter p { color: var(--muted); margin-top: 0; }

.newsletter-form { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-top: 1.25rem; }
.newsletter-form input[type="email"] {
  flex: 1 1 260px; max-width: 340px;
  background: var(--navy-950); border: 1px solid var(--line);
  color: var(--ink); border-radius: 9px; padding: 0.72rem 1rem;
  font-size: 0.95rem; font-family: inherit;
}
.newsletter-form input[type="email"]::placeholder { color: var(--muted); }
.newsletter-form input[type="email"]:focus { border-color: var(--gold); outline: none; }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.form-status { flex-basis: 100%; margin: 0.5rem 0 0; font-weight: 600; }
.form-status.ok { color: var(--gold-bright); }
.form-status.err { color: #ff9d9d; }

.newsletter-fallback { font-size: 1.02rem; }

/* ---------- page scaffolding ---------- */

.page-head { padding: 3.25rem 0 0.5rem; }
.page-head h1 { font-size: clamp(1.9rem, 4.5vw, 2.7rem); }
.page-lead { color: var(--muted); font-size: 1.08rem; max-width: 680px; margin-top: 0; }
.page-head .container[style] .page-lead { margin-left: auto; margin-right: auto; }

.episode-list { padding: 2rem 0 1rem; }

.empty-state {
  text-align: center; padding: 3.25rem 1.5rem;
  background: var(--navy-800); border: 1px solid var(--line); border-radius: 16px;
}
.empty-state h2 { font-size: 1.5rem; }
.empty-state p { color: var(--muted); max-width: 520px; margin: 0 auto; }

/* ---------- episode page ---------- */

.breadcrumb { margin: 2rem 0 1.25rem; font-size: 0.92rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold-bright); }

.episode-header { margin-bottom: 1.5rem; }
.episode-header h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-bottom: 0.3em; }

.guest-line { color: var(--ink-dim); margin: 0.2rem 0 0; }
.guest-line strong { color: var(--gold-bright); font-weight: 700; }

.episode-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.4rem 0 0; }

.episode-page section { margin-top: 2.75rem; }
.episode-page section h2 {
  font-size: 1.3rem; padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
}

.prose p { margin: 0.85em 0; color: var(--ink-dim); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { color: var(--ink-dim); padding-left: 1.3em; }
.prose img { border-radius: 10px; }

.links-mentioned ul { list-style: none; padding: 0; margin: 0; }
.links-mentioned li { padding: 0.55rem 0; border-bottom: 1px solid rgba(29, 58, 94, 0.45); }
.links-mentioned li:last-child { border-bottom: 0; }

.transcript details {
  background: var(--navy-800); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.3rem;
}
.transcript summary { cursor: pointer; font-weight: 650; color: var(--gold-bright); }
.transcript-body { margin-top: 1rem; }
.transcript-body p { color: var(--ink-dim); font-size: 0.96rem; }
.transcript-body .speaker { color: var(--gold); }

.episode-footer { margin: 3rem 0; }

/* ---------- about ---------- */

.about-mission { padding: 1.5rem 0 0; }
.lead { font-size: 1.16rem; color: var(--ink-dim); }

.callout {
  border-left: 3px solid var(--gold);
  background: var(--navy-800);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.4rem 1.6rem; margin: 2.25rem 0;
}
.callout h2 { font-size: 1.25rem; margin-bottom: 0.4em; }
.callout p { margin: 0; color: var(--ink-dim); }

.about-host { padding: 2.5rem 0 0; }

.host-grid { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 2.75rem; align-items: start; }
@media (max-width: 760px) { .host-grid { grid-template-columns: 1fr; } .host-photo { max-width: 340px; } }

.host-photo { margin: 0; }
.host-photo img { border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4); }

.host-bio h2 { font-size: 1.7rem; }
.host-bio p { color: var(--ink-dim); }
.host-bio .btn { margin-top: 0.75rem; }

/* ---------- subscribe page ---------- */

.subscribe-page { padding: 1.5rem 0 2rem; }
.subscribe-page .subscribe-buttons { justify-content: flex-start; margin-top: 0.5rem; }

.rss-box {
  margin: 2.25rem 0; padding: 1.5rem 1.6rem;
  background: var(--navy-800); border: 1px solid var(--line); border-radius: var(--radius);
}
.rss-box h2 { font-size: 1.2rem; margin-bottom: 0.3em; }
.rss-box p { color: var(--muted); margin-top: 0; }

.feed-url {
  display: block; padding: 0.8rem 1rem;
  background: var(--navy-950); border: 1px solid var(--line); border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem; color: var(--gold-bright);
  overflow-x: auto; user-select: all; white-space: nowrap;
}

.subscribe-page .newsletter { margin-left: 0; margin-right: 0; }

/* ---------- contact ---------- */

.contact-page { padding: 1.5rem 0 2rem; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.4rem; }

.contact-card {
  background: var(--navy-800); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem 1.7rem;
}
.contact-card h2 { font-size: 1.3rem; }
.contact-card p { color: var(--muted); }

.contact-plain { margin-top: 2rem; color: var(--muted); }

/* ---------- legal ---------- */

.legal-page { padding: 1rem 0 3rem; }
.legal-page h2 { font-size: 1.25rem; margin-top: 2em; }

/* ---------- footer ---------- */

.site-footer { margin-top: 4.5rem; background: var(--navy-900); border-top: 1px solid var(--line); }

.footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.5rem;
  padding: 3rem 1.25rem 1rem;
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; } }

.footer-brand img { opacity: 0.9; }
.footer-tagline { color: var(--muted); max-width: 340px; }

.footer-heading {
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); margin: 0 0 0.9rem;
}

.footer-nav a, .footer-social a { display: block; padding: 0.28rem 0; color: var(--ink-dim); }
.footer-nav a:hover, .footer-social a:hover { color: var(--gold-bright); }

.footer-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem; padding-bottom: 2rem; margin-top: 1.5rem;
  color: var(--muted); font-size: 0.85rem;
}
.footer-legal p { margin: 0; }
.footer-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.footer-legal a:hover { color: var(--gold-bright); }

/* ---------- misc ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
