/* marvinpalmerjr.com — shared styles (Site Design v2) */

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

:root {
  --bg: #000;
  --text: #f6f6f6;
  --white: #fff;
  --muted: #c4c4c4;
  --subtle: #b8b8b8;
  --rule: #1f1f1f;
  --rule-nav: #262626;
  --radius: 6px;
  --max: 1120px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; }

a:focus-visible,
button:focus-visible,
input:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

/* ---------- Header / nav ---------- */
.hdr {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 10px 24px;
  min-height: 72px;
}
.brand { color: var(--white); text-decoration: none; }
.brand img { display: block; width: 56px; height: 56px; }

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-right: -10px;
  background: none;
  border: 0;
  color: var(--white);
  cursor: pointer;
}

.nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  flex-direction: column;
  padding: 8px 24px 16px;
  background: var(--bg);
  border-top: 1px solid var(--rule-nav);
  border-bottom: 1px solid var(--rule-nav);
}
.nav.open { display: flex; }
.nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-size: 18px;
  color: var(--white);
  text-decoration: none;
}
.nav a[aria-current] { font-weight: 600; text-decoration: underline; text-underline-offset: 8px; }

/* ---------- Layout + type ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.t { margin: 0 0 16px; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.7; color: var(--text); }
.t.muted { color: var(--muted); }
.tl { color: var(--white); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

.h1 { margin: 0; font-weight: 700; font-size: clamp(32px, 5vw, 56px); line-height: 1.25; color: var(--white); }
.hd { margin: 0 0 6px; font-size: clamp(24px, 3vw, 34px); font-weight: 700; line-height: 1.3; color: var(--white); }
.eb { margin: 0 0 20px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); font-weight: 500; }
.section-title { margin: 0 0 28px; text-align: center; font-size: clamp(24px, 3vw, 32px); font-weight: 700; color: var(--white); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: var(--radius);
  background: var(--white);
  color: #000;
  border: 1px solid var(--white);
  font-family: inherit;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .5); }
.btn.lg { min-height: 52px; }
.btn.block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.bkt > .btn { margin-top: 8px; }

/* ---------- Footer ---------- */
.ftr { margin-top: 72px; padding: 40px 24px 56px; border-top: 1px solid var(--rule); text-align: center; }
.soc { display: flex; justify-content: center; gap: 12px; padding: 8px 0; }
.soc a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white);
}
.copy { margin: 20px 0 0; font-size: 14px; color: var(--subtle); }

/* ---------- Home ---------- */
.hero {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "h" "p" "c";
  padding-top: 24px;
}
.hero-title { grid-area: h; }
.hero-photo {
  grid-area: p;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: var(--radius);
}
.hero-copy { grid-area: c; }
.hello { margin: 0 0 6px; font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; color: var(--white); }

.newsletter-cta { margin-top: 80px; padding-top: 48px; border-top: 1px solid var(--rule); text-align: center; }
.newsletter-cta h2 { margin: 0 0 12px; font-size: clamp(24px, 3vw, 32px); font-weight: 700; color: var(--white); }
.newsletter-cta .t { max-width: 520px; margin: 0 auto 24px; }

/* ---------- Story blocks (Books + Podcast) ---------- */
.intro { padding: 40px 0 48px; max-width: 640px; }
.intro .h1 { margin-bottom: 28px; }

.bk {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr);
  padding: 48px 0;
  border-top: 1px solid var(--rule);
}
.bkt { max-width: 640px; }
.bkimg { display: block; width: 62%; max-width: 240px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 4px; }
.bkimg.land { aspect-ratio: 4 / 3; width: 100%; max-width: 440px; border-radius: var(--radius); }
.bkimg.sq { aspect-ratio: 1 / 1; width: 100%; max-width: 440px; border-radius: var(--radius); }
.bkimg.rv { aspect-ratio: auto; height: auto; width: 100%; max-width: 440px; object-fit: initial; border-radius: var(--radius); }
.bkimg.vid { aspect-ratio: 637 / 358; width: 100%; max-width: 440px; border-radius: var(--radius); }

/* ---------- Podcast ---------- */
.pod-hero { text-align: center; padding: 40px 0 24px; }
.pod-hero h1 { margin: 0 0 16px; font-weight: 700; font-size: clamp(34px, 5.5vw, 60px); line-height: 1.2; color: var(--white); }
.pod-hero .lede { margin: 0 auto 28px; max-width: 560px; font-size: clamp(18px, 2vw, 22px); font-weight: 500; line-height: 1.5; color: var(--white); }
.pod-hero .t { margin-bottom: 4px; }
.pod-hero .t:last-child { margin-bottom: 0; }

.episodes { padding: 0 0 64px; }
.player {
  max-width: 760px;
  min-height: 375px;
  margin: 0 auto;
  background: var(--white);
  color: #333;
  border-radius: var(--radius);
  overflow: hidden;
}
.listen-title { margin: 64px 0 24px; text-align: center; font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; color: var(--white); }
.places { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.places a { display: block; line-height: 0; border: 1px solid #3a3a3a; border-radius: var(--radius); overflow: hidden; }
.places img { display: block; height: 48px; width: auto; }

/* ---------- Subscribe ---------- */
.subscribe { max-width: 600px; padding-top: 40px; }
.subscribe h1 { margin: 0 0 16px; font-weight: 700; font-size: clamp(30px, 4.5vw, 44px); line-height: 1.25; color: var(--white); }
.subscribe .t { margin-bottom: 32px; color: #d8d8d8; }
.fld { display: block; margin-bottom: 20px; }
.fld span { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--text); }
.in {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  background: #0d0d0d;
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: var(--radius);
  color: var(--white);
  font-family: inherit;
  font-size: 16px;
}
.in::placeholder { color: #9a9a9a; }
.fine { margin: 16px 0 0; font-size: 13px; line-height: 1.6; color: var(--subtle); }

/* MailerLite form (subscribe page). MailerLite's own CSS is not loaded. */
.ml-form-recaptcha { margin: 4px 0 20px; min-height: 78px; }
.ml-form-embedSubmit .loading { opacity: .7; cursor: wait; }
.ml-field-group.ml-error .in { border-color: #fff; border-width: 2px; }
.ml-field-group.ml-error .fld span::after { content: " (please enter a valid email)"; font-weight: 400; color: var(--muted); }
.success-title { margin: 0 0 8px; font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; color: var(--white); }
@media (max-width: 480px) {
  .ml-form-recaptcha .g-recaptcha { transform: scale(.78); transform-origin: 0 0; }
  .ml-form-recaptcha { min-height: 62px; }
}

/* ---------- Desktop ---------- */
@media (min-width: 800px) {
  .nav-toggle { display: none; }
  .nav, .nav.open {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 32px;
    padding: 0;
    background: none;
    border: 0;
  }
  .nav a { min-height: 44px; font-size: 16px; }

  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-rows: auto 1fr;
    column-gap: 72px;
    row-gap: 24px;
    grid-template-areas: "p h" "p c";
    padding-top: 48px;
  }

  .bk {
    grid-template-columns: minmax(0, 640px) 260px;
    column-gap: 72px;
    justify-content: start;
    align-items: start;
    padding: 64px 0;
  }
  .bk.wide { grid-template-columns: minmax(0, 620px) 380px; column-gap: 64px; }
  .bk.alt { grid-template-columns: 440px minmax(0, 600px); column-gap: 56px; }
  .bk.wide.alt { grid-template-columns: 380px minmax(0, 620px); column-gap: 64px; }

  .bkimg { order: 2; width: 100%; max-width: none; position: sticky; top: 24px; }
  .bk.alt .bkimg { order: -1; }
  .bkimg.land, .bkimg.sq, .bkimg.vid { max-width: none; }
}
