/* ==========================================================================
   Project Tempest - shared stylesheet
   Palette and type recovered from the Wix original.
   ========================================================================== */

@font-face {
  font-family: 'Airwaves';
  src: url('/assets/fonts/airwaves.woff2') format('woff2'),
       url('/assets/fonts/airwaves.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Used on the subscribe confirmation, as on the original */
@font-face {
  font-family: 'Diamonds';
  src: url('/assets/fonts/diamonds.woff2') format('woff2'),
       url('/assets/fonts/diamonds.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg:          #0C1C36;
  --bg-nav:      #091528;
  --bg-raised:   #12294a;
  --text:        #E1EEF5;
  --text-dim:    rgba(225, 238, 245, 0.72);
  --accent:      #F0C459;
  --rule:        rgba(225, 238, 245, 0.16);

  --font-display: 'Airwaves', 'Oswald', 'Arial Narrow', sans-serif;
  --font-body:    'Nunito Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --measure:  820px;   /* reading column, matches the original */
  --wide:     1200px;  /* full content width */
  --nav-h:    56px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 20px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

/* ---------- Display type ------------------------------------------------ */

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 400; }

h1, .h-display, h4, h5, h6 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1;
}

h2, h3 {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

h1        { font-size: clamp(56px, 11.5vw, 160px); }
h2        { font-size: clamp(24px, 3.4vw, 40px); text-transform: uppercase; }
h3        { font-size: clamp(21px, 2.4vw, 28px); }
h4        { font-size: clamp(32px, 4.6vw, 50px); }
h5        { font-size: clamp(24px, 3vw, 34px); }
h6        { font-size: clamp(20px, 2.4vw, 25px); }

p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--bg);
  padding: 10px 18px; font-family: var(--font-display); text-decoration: none;
}
.skip-link:focus { left: 0; }

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

/* ---------- Navigation -------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-nav);
  min-height: var(--nav-h);
  display: flex; align-items: center; justify-content: center;
}

.nav-toggle {
  display: none;
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; padding: 8px; cursor: pointer;
  color: var(--text);
}
.nav-toggle svg { width: 26px; height: 26px; display: block; }

.nav {
  display: flex; align-items: center; gap: clamp(14px, 3.4vw, 46px);
  list-style: none; margin: 0; padding: 0 20px;
}

.nav > li { position: relative; }

.nav a {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text);
  padding: 18px 2px;
  white-space: nowrap;
}
.nav a:hover,
.nav a:focus-visible { color: var(--accent); }
.nav a[aria-current="page"],
.nav .is-active > a { color: var(--accent); }

/* dropdowns */
.nav .submenu {
  position: absolute; left: 50%; top: 100%;
  transform: translateX(-50%);
  min-width: 220px; margin: 0; padding: 6px 0;
  list-style: none;
  background: var(--bg-nav);
  border: 1px solid var(--rule);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .15s ease;
}
.nav li:hover > .submenu,
.nav li:focus-within > .submenu {
  opacity: 1; visibility: visible; pointer-events: auto;
}
.nav .submenu a {
  padding: 10px 20px; font-size: 18px; text-align: left;
}

/* ---------- Hero -------------------------------------------------------- */

.hero {
  position: relative;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  /* the banner art is ~4.75:1, so the band tracks its natural height and the
     headline bottom-aligns to the artwork, as it did on the original */
  min-height: max(300px, 21vw);
  padding: clamp(70px, 11vw, 150px) 20px clamp(10px, 1.4vw, 22px);
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: var(--hero-image);
  background-size: 100% auto;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 0;
}
/* fades the banner art down into the page ground */
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    rgba(12,28,54,0) 0%,
    rgba(12,28,54,0.06) 40%,
    rgba(12,28,54,0.45) 68%,
    rgba(12,28,54,0.88) 90%,
    var(--bg) 100%);
  z-index: 1;
}
.hero > * { position: relative; z-index: 2; }

.hero h1 { margin-bottom: 2px; text-shadow: 0 2px 24px rgba(9,21,40,.55); }
.hero h2 { margin-bottom: 4px; text-shadow: 0 2px 18px rgba(9,21,40,.55); }

/* ---------- Layout ------------------------------------------------------ */

main { display: block; }

.section {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 68px) 20px;
}
.section--tight { padding-top: clamp(20px, 3vw, 34px); padding-bottom: clamp(20px, 3vw, 34px); }
.section--center { text-align: center; }

.measure { max-width: var(--measure); margin-inline: auto; }

.section-title { text-align: center; margin-bottom: clamp(20px, 3vw, 36px); }

.lede { font-size: 25px; line-height: 1.35; }

.rich a { text-decoration: underline; }
/* captured copy contains bare URLs long enough to push a phone sideways */
.rich a, .post-body a, .issue-body a { overflow-wrap: anywhere; }
.rich h4 { margin: 1.4em 0 .5em; font-size: clamp(26px, 3vw, 30px); }
.rich em, .rich i { font-style: italic; }

/* ---------- Buttons ----------------------------------------------------- */

.btn {
  display: inline-block;
  background: var(--text);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-decoration: none;
  padding: 14px 30px;
  border: 0;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.btn:hover, .btn:focus-visible { background: var(--accent); color: var(--bg); }

.btn-row { display: flex; justify-content: center; }

/* ---------- Cards / grids ----------------------------------------------- */

.book-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 200px));
  gap: clamp(20px, 4vw, 56px);
  justify-content: center;
}
.book-row img { width: 100%; }
.book-row a { display: block; text-decoration: none; }
.book-row a:hover img { outline: 2px solid var(--accent); outline-offset: 3px; }

.tile-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 150px));
  gap: clamp(16px, 4vw, 56px);
  justify-content: center;
}
.tile {
  position: relative; display: block;
  text-decoration: none; text-align: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.tile img { width: 100%; height: 100%; object-fit: cover; filter: brightness(1.25) saturate(1.1); }
.tile-caption {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 8px;
  background: linear-gradient(to bottom, rgba(12,28,54,0) 0%, rgba(12,28,54,0.55) 100%);
  text-shadow: 0 1px 6px rgba(9,21,40,.9);
}
.tile-caption b {
  display: block;
  font-family: var(--font-display); font-weight: 400;
  font-size: 20px; text-transform: uppercase; text-decoration: underline;
  text-underline-offset: 3px;
}
.tile-caption span { font-size: 17px; line-height: 1.25; text-decoration: underline; text-underline-offset: 3px; }
.tile:hover .tile-caption { color: var(--accent); }
.tile:hover img { filter: brightness(1.45) saturate(1.15); }

/* ---------- Podcast episode --------------------------------------------- */

.player {
  max-width: var(--measure); margin: 0 auto clamp(18px, 3vw, 28px);
}
.player iframe { width: 100%; border: 0; display: block; }

.platform-icons {
  display: flex; justify-content: center; gap: 14px;
  margin: 18px 0 0; padding: 0; list-style: none;
}
.platform-icons a {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 10px;
  text-decoration: none;
  transition: transform .15s ease;
}
.platform-icons a:hover { transform: translateY(-2px); }
.platform-icons svg { width: 26px; height: 26px; display: block; }
.pi-apple    { background: #9933CC; }
.pi-spotify  { background: #1DB954; }
.pi-captivate{ background: #F05A28; }
.pi-rss      { background: #EE802F; }

.guest-portrait {
  width: clamp(220px, 40vw, 315px);
  aspect-ratio: 1 / 1;
  margin: clamp(26px, 4vw, 44px) auto;
  border-radius: 50%;
  overflow: hidden;
}
.guest-portrait img { width: 100%; height: 100%; object-fit: cover; }

.timestamps p { line-height: 1.65; }

/* ---------- Footer subscribe -------------------------------------------- */

.site-footer {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(30px, 5vw, 56px) 20px clamp(50px, 7vw, 90px);
}
.subscribe {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; flex-wrap: wrap;
}
.subscribe .subscribe-label {
  font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px);
  text-transform: uppercase; line-height: 1;
}
.subscribe input[type="email"] {
  flex: 1 1 340px; max-width: 460px;
  font-family: var(--font-body); font-size: 17px; font-weight: 300;
  padding: 14px 16px;
  background: #fff; color: #14243d;
  border: 0;
}
.subscribe input::placeholder { color: #7d8899; }
.subscribe .btn { padding: 14px 26px; }
.subscribe-thanks {
  display: none;
  text-align: center;
  font-family: 'Diamonds', var(--font-display); font-size: 25px;
  letter-spacing: 0.05em;
  color: var(--accent);
}
.subscribe-done .subscribe { display: none; }
.subscribe-done .subscribe-thanks { display: block; }

/* ---------- Responsive -------------------------------------------------- */

@media (max-width: 900px) {
  body { font-size: 19px; }
  .lede { font-size: 21px; }

  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 6px 0 12px;
    background: var(--bg-nav);
    border-top: 1px solid var(--rule);
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
  }
  .site-header.is-open .nav { display: flex; }
  .nav a { padding: 12px 24px; }
  .nav .submenu {
    position: static; transform: none;
    opacity: 1; visibility: visible; pointer-events: auto;
    border: 0; background: transparent; min-width: 0; padding: 0 0 4px;
  }
  .nav .submenu a { padding: 8px 24px 8px 44px; font-size: 17px; color: var(--text-dim); }

  .tile-row { grid-template-columns: repeat(2, minmax(0, 180px)); }

  /* the wide banner is far too short to fill the band on a narrow screen,
     so crop it instead of letterboxing it */
  .hero::before { background-size: cover; }
}

@media (max-width: 500px) {
  body { font-size: 18px; }
  .hero { min-height: 240px; padding-top: 90px; padding-bottom: 16px; }
  .book-row { grid-template-columns: repeat(2, minmax(0, 160px)); }
  .book-row > :last-child { grid-column: 1 / -1; justify-self: center; max-width: 160px; }
  .subscribe { flex-direction: column; align-items: stretch; text-align: center; }
  .subscribe input[type="email"] { max-width: none; }
}

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

/* ---------- Utilities --------------------------------------------------- */

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

/* two-guest episodes show both headshots side by side */
.portrait-row {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(18px, 3vw, 40px);
  margin: clamp(26px, 4vw, 44px) auto;
}
.portrait-row .guest-portrait { margin: 0; }
.portrait-row:not(.is-single) .guest-portrait { width: clamp(160px, 26vw, 260px); }

/* ---------- Page furniture ---------------------------------------------- */

.feature-image {
  max-width: 100%;
  margin: 0 auto clamp(18px, 3vw, 30px);
}

.inline-portrait {
  float: right;
  width: clamp(160px, 26vw, 260px);
  margin: 4px 0 20px 28px;
  border-radius: 50%;
}

.book-cover {
  width: clamp(200px, 30vw, 251px);
  margin: 0 auto;
  box-shadow: 0 10px 40px rgba(0,0,0,.45);
}

.longread { font-size: 21px; line-height: 1.72; }
.longread p { margin-bottom: 1.35em; }

/* ---------- Retailer shelf ---------------------------------------------- */

.retailers {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(22px, 5vw, 60px);
  list-style: none; margin: 0; padding: 0;
}
.retailers a {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-decoration: none;
}
.retailers img { width: 57px; height: 57px; }
.retailers span {
  font-family: var(--font-display); font-size: 16px; text-transform: uppercase;
  letter-spacing: 0.03em;
}
.retailers a:hover span { color: var(--accent); }

/* ---------- Podcast index ----------------------------------------------- */

.episode-list { list-style: none; margin: 0; padding: 0; }
.episode {
  max-width: var(--measure);
  margin: 0 auto clamp(34px, 5vw, 56px);
  padding-bottom: clamp(30px, 4vw, 48px);
  border-bottom: 1px solid var(--rule);
}
.episode:last-child { border-bottom: 0; }
.episode .player { margin-bottom: 16px; }
.episode-notes { text-align: center; }

/* ---------- Gallery ------------------------------------------------------ */

.gallery-strip {
  display: flex; gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 14px;
  scrollbar-color: var(--rule) transparent;
}
.gallery-strip figure {
  flex: 0 0 auto; margin: 0;
  scroll-snap-align: start;
  height: clamp(220px, 30vw, 340px);
}
.gallery-strip img { height: 100%; width: auto; max-width: none; }

/* ---------- Contact form ------------------------------------------------- */

.contact-form { max-width: 560px; margin: clamp(24px, 4vw, 40px) auto 0; text-align: left; }
.contact-form .field { margin: 0 0 18px; }
.contact-form label {
  display: block; margin-bottom: 6px;
  font-family: var(--font-display); font-size: 18px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  font-family: var(--font-body); font-size: 17px; font-weight: 300;
  padding: 12px 14px;
  background: #fff; color: #14243d;
  border: 0;
}
.contact-form textarea { resize: vertical; }
.form-thanks {
  display: none; margin-top: 18px;
  font-family: 'Diamonds', var(--font-display); font-size: 25px;
  letter-spacing: 0.05em; color: var(--accent);
}
.form-sent .contact-form { display: none; }
.form-sent .form-thanks { display: block; }

@media (max-width: 600px) {
  .inline-portrait { float: none; margin: 0 auto 22px; display: block; }
}

/* ---------- Blog --------------------------------------------------------- */

.post { max-width: var(--measure); margin: 0 auto; }
.post-head { text-align: center; margin-bottom: clamp(22px, 3vw, 34px); }
.post-kicker {
  margin-bottom: 14px;
  font-family: var(--font-display); font-size: 20px;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.post-kicker a { text-decoration: none; color: var(--accent); }
.post-title {
  font-family: var(--font-body); font-weight: 800; text-transform: none;
  font-size: clamp(30px, 4.4vw, 46px); line-height: 1.12;
  margin-bottom: 14px;
}
.post-meta { font-size: 17px; color: var(--text-dim); margin-bottom: 12px; }

.post-tags {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  list-style: none; margin: 0; padding: 0;
}
.post-tags li {
  font-family: var(--font-display); font-size: 15px;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 5px 12px;
  border: 1px solid var(--rule);
  color: var(--text-dim);
}
.post-tags--index { margin-bottom: clamp(26px, 4vw, 40px); }

.post-header-image { width: 100%; margin-bottom: clamp(26px, 4vw, 40px); }

.post-body { font-size: 20px; line-height: 1.68; }
.post-body h3 {
  margin: 1.7em 0 .5em;
  font-size: clamp(23px, 2.8vw, 30px);
}
.post-body figure { margin: clamp(24px, 4vw, 38px) 0; }
.post-body ul, .post-body ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.post-body li { margin-bottom: .4em; }
.post .btn-row { margin-top: clamp(34px, 5vw, 56px); }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(22px, 3vw, 36px);
  list-style: none; margin: 0; padding: 0;
}
.post-card-link {
  display: flex; flex-direction: column; height: 100%;
  text-decoration: none;
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  transition: border-color .15s ease, transform .15s ease;
}
.post-card-link:hover { border-color: var(--accent); transform: translateY(-3px); }
.post-card-link img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card-body { display: block; padding: 20px 22px 24px; }
.post-card-title {
  display: block; font-weight: 800; font-size: 21px; line-height: 1.2;
  margin-bottom: 8px;
}
.post-card-meta {
  display: block; font-size: 15px; color: var(--text-dim);
  margin-bottom: 12px;
}
.post-card-excerpt { display: block; font-size: 17px; line-height: 1.5; color: var(--text-dim); }
.post-card-link:hover .post-card-title { color: var(--accent); }

/* ---------- Newsletter --------------------------------------------------- */

.hero--slim { min-height: max(220px, 15vw); padding-top: clamp(50px, 8vw, 100px); }

.issue-title {
  font-family: var(--font-body); font-weight: 800; text-transform: none;
  font-size: clamp(24px, 3.2vw, 34px); line-height: 1.2;
  margin-bottom: clamp(20px, 3vw, 32px);
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}
.issue-body h3 {
  margin: 1.8em 0 .6em;
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(24px, 3vw, 32px); letter-spacing: 0.02em;
}
.issue-body h3:first-child { margin-top: 0; }
.issue-body figure { margin: clamp(24px, 4vw, 36px) 0; }

.issue-nav {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  margin-top: clamp(38px, 5vw, 60px);
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-display); font-size: 19px;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.issue-nav a { text-decoration: none; }
.issue-nav a:hover { color: var(--accent); }

.issue-list { list-style: none; margin: 0 auto; padding: 0; max-width: var(--measure); }
.issue-list li { border-bottom: 1px solid var(--rule); }
.issue-list a {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px;
  padding: 18px 4px;
  text-decoration: none;
}
.issue-date {
  flex: 0 0 160px;
  font-family: var(--font-display); font-size: 21px;
  text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--accent);
}
.issue-headline { flex: 1 1 260px; font-size: 19px; line-height: 1.35; }
.issue-list a:hover .issue-headline { color: var(--accent); }

@media (max-width: 500px) {
  .issue-date { flex-basis: 100%; }
  .issue-nav { flex-direction: column; align-items: flex-start; }
}

/* ---------- Blog category filter ----------------------------------------- */

.post-tags--index .chip {
  font: inherit;
  font-family: var(--font-display); font-size: 15px;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 6px 13px;
  background: none;
  border: 1px solid var(--rule);
  color: var(--text-dim);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease;
}
.post-tags--index .chip:hover { color: var(--text); border-color: var(--text-dim); }
.post-tags--index .chip.is-on { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.post-tags--index li { padding: 0; border: 0; }
.post-count {
  text-align: center; font-size: 16px; color: var(--text-dim);
  margin: 0 0 clamp(20px, 3vw, 30px);
}

/* ---------- Gallery scroll affordance ------------------------------------ */

.gallery-wrap { position: relative; }
.gallery-wrap::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 14px; width: 70px;
  background: linear-gradient(to right, rgba(12,28,54,0), var(--bg));
  pointer-events: none;
}
.gallery-hint {
  margin: 10px 0 0; text-align: center;
  font-size: 15px; color: var(--text-dim);
}
