/* ============================================================
   How to Lose a Life You Love — Author site
   Design tokens
   ============================================================ */

:root {
  --void:        #0A0D12;
  --elevated:    #12161D;
  --elevated-2:  #171C24;
  --hairline:    #262C36;
  --gold:        #C9A876;
  --gold-dim:    #8C7A5C;
  --ivory:       #EDE6D8;
  --ivory-dim:   #A8A093;
  --grey:        #6B7280;

  --display: 'EB Garamond', 'Times New Roman', serif;
  --utility: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  --max-w: 1180px;
  --gutter: clamp(24px, 6vw, 96px);
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

html {
  background: var(--void);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--void);
  color: var(--ivory);
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

button { font: inherit; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- typography ---------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ivory);
  margin: 0;
}

.eyebrow {
  font-family: var(--utility);
  font-size: 12px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
}

h1 {
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.16;
}

h3 {
  font-size: clamp(20px, 2.2vw, 25px);
  font-style: italic;
  color: var(--gold);
}

p.lede {
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.6;
  color: var(--ivory);
}

.body-text p {
  color: var(--ivory-dim);
  max-width: 62ch;
}

.caption {
  font-family: var(--utility);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--grey);
}

/* ---------- the threshold rule (signature element) ----------
   A thin vertical gold line that marks a crossing point —
   between chapters, between the self before and after.
   Appears beside pull-quotes and at section thresholds. */

.threshold {
  position: relative;
  padding-left: 28px;
}
.threshold::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15em;
  bottom: 0.15em;
  width: 1px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

hr.crossing {
  border: none;
  height: 1px;
  width: 64px;
  margin: 64px auto;
  background: var(--gold);
  opacity: 0.55;
}

/* ---------- nav ---------- */

header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 13, 18, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark {
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: 0.02em;
  color: var(--ivory);
}
.wordmark span { color: var(--gold); }

nav.links {
  display: flex;
  gap: clamp(18px, 3vw, 36px);
  font-family: var(--utility);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

nav.links a {
  color: var(--ivory-dim);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
nav.links a:hover,
nav.links a.active {
  color: var(--gold);
  border-color: var(--gold);
}

.nav-toggle { display: none; }

@media (max-width: 720px) {
  nav.links {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--void);
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
    padding: 40px var(--gutter);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  nav.links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--hairline);
    color: var(--ivory);
    font-family: var(--utility);
    font-size: 12px;
    letter-spacing: 0.1em;
    padding: 8px 14px;
    cursor: pointer;
  }
}

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

.btn {
  display: inline-block;
  font-family: var(--utility);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 15px 30px;
  border: 1px solid var(--gold);
  color: var(--gold);
  transition: background 0.25s ease, color 0.25s ease;
}
.btn:hover { background: var(--gold); color: var(--void); }

.btn-solid {
  background: var(--gold);
  color: var(--void);
}
.btn-solid:hover {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--void);
}

/* ---------- hero (two-column, per brief) ---------- */

.hero {
  padding: clamp(48px, 8vw, 88px) 0 clamp(64px, 9vw, 110px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.hero-portrait img {
  width: 100%;
  filter: grayscale(1) contrast(1.05);
  border: 1px solid var(--hairline);
}

/* ---------- homepage film ---------- */

.film-section {
  padding: 0 0 clamp(56px, 8vw, 96px);
}

.film-poster {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--elevated);
  color: var(--ivory);
  text-align: left;
  cursor: pointer;
}

.film-poster img,
.film-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.film-poster img {
  object-fit: cover;
  transition: transform 0.7s ease, filter 0.7s ease;
}

.film-shade {
  background: linear-gradient(90deg, rgba(10, 13, 18, 0.82) 0%, rgba(10, 13, 18, 0.38) 48%, rgba(10, 13, 18, 0.10) 100%);
}

.film-copy {
  position: absolute;
  z-index: 2;
  left: clamp(24px, 5vw, 64px);
  top: 50%;
  transform: translateY(-50%);
}

.film-copy .eyebrow { display: block; margin-bottom: 15px; }

.film-title {
  display: block;
  max-width: 12ch;
  font-family: var(--display);
  font-size: clamp(34px, 5.3vw, 66px);
  font-weight: 400;
  line-height: 1.02;
}

.play-button {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 73%;
  width: clamp(64px, 8vw, 92px);
  height: clamp(64px, 8vw, 92px);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border: 1px solid rgba(237, 230, 216, 0.8);
  border-radius: 50%;
  background: rgba(10, 13, 18, 0.34);
  backdrop-filter: blur(5px);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.play-button span {
  display: block;
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 16px solid var(--ivory);
}

.film-action {
  position: absolute;
  z-index: 2;
  right: clamp(20px, 4vw, 48px);
  bottom: clamp(18px, 3vw, 34px);
  font-family: var(--utility);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.film-poster:hover img { transform: scale(1.025); filter: brightness(1.05); }
.film-poster:hover .play-button {
  background: var(--gold);
  border-color: var(--gold);
  transform: translate(-50%, -50%) scale(1.05);
}
.film-poster:hover .play-button span { border-left-color: var(--void); }

.film-modal {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 52px);
}

.film-modal.open { display: flex; }

.film-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(2, 4, 7, 0.94);
  cursor: pointer;
}

.film-dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
}

.film-dialog video {
  display: block;
  width: 100%;
  max-height: calc(100vh - 110px);
  background: #000;
}

.film-close {
  display: block;
  margin: 0 0 12px auto;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: var(--ivory);
  font-family: var(--utility);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

body.modal-open { overflow: hidden; }

@media (max-width: 720px) {
  .film-section .container { padding: 0; }
  .film-poster { aspect-ratio: 4 / 5; border-left: 0; border-right: 0; }
  .film-poster img { object-position: 58% center; }
  .film-shade { background: linear-gradient(180deg, rgba(10, 13, 18, 0.28), rgba(10, 13, 18, 0.78)); }
  .film-copy { top: auto; right: 24px; bottom: 72px; transform: none; }
  .film-title { font-size: clamp(36px, 12vw, 52px); }
  .play-button { top: 34%; left: 50%; }
  .film-action { left: 24px; right: auto; bottom: 24px; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; max-width: 340px; margin: 0 auto; }
}

/* ---------- wide break image ---------- */

.wide-break {
  position: relative;
  margin: clamp(48px, 8vw, 96px) 0;
}
.wide-break img {
  width: 100%;
  height: clamp(320px, 46vw, 560px);
  object-fit: cover;
  filter: saturate(0.9) contrast(1.02);
}
.wide-break .wide-caption {
  padding: 20px var(--gutter) 0;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ---------- generic section ---------- */

section { padding: clamp(56px, 8vw, 96px) 0; }
section.tight { padding: clamp(32px, 5vw, 56px) 0; }

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head .eyebrow { display: block; margin-bottom: 14px; }

/* ---------- narrative image block (About page rhythm) ---------- */

.narrative-block {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(40px, 6vw, 64px) 0;
  border-top: 1px solid var(--hairline);
}
.narrative-block.reverse .nb-image { order: 2; }
.narrative-block.reverse .nb-text { order: 1; }

.nb-image img {
  width: 100%;
  filter: grayscale(0.15) contrast(1.03);
}
.nb-image.bw img { filter: grayscale(1) contrast(1.05); }

.conditioning-image {
  width: 88%;
  margin: 0 auto;
}

.nb-text .eyebrow { display: block; margin-bottom: 12px; }
.nb-text h3 { margin-bottom: 16px; }

@media (max-width: 780px) {
  .narrative-block,
  .narrative-block.reverse {
    grid-template-columns: 1fr;
  }
  .narrative-block .nb-image,
  .narrative-block.reverse .nb-image { order: -1; }
  .conditioning-image { width: 100%; }
}

/* ---------- placeholder image (missing assets) ---------- */

.img-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--hairline);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: var(--elevated);
}
.img-placeholder span {
  font-family: var(--utility);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
}

/* ---------- book page ---------- */

.book-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}
.book-cover-wrap img {
  width: 100%;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,0.6);
}
@media (max-width: 820px) {
  .book-grid { grid-template-columns: 1fr; }
  .book-cover-wrap { max-width: 320px; margin: 0 auto; }
}

.endorsement {
  font-style: italic;
  color: var(--ivory);
  font-size: 19px;
}
.endorsement + .caption { margin-top: 10px; }

/* ---------- signup / email capture ---------- */

.signup-box {
  background: var(--elevated);
  border: 1px solid var(--hairline);
  padding: clamp(28px, 4vw, 44px);
}
.signup-form {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.signup-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  background: var(--void);
  border: 1px solid var(--hairline);
  color: var(--ivory);
  font-family: var(--display);
  font-size: 16px;
  padding: 14px 16px;
}
.signup-form input[type="email"]::placeholder { color: var(--grey); }

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

.contact-form {
  display: grid;
  gap: 20px;
  max-width: 560px;
}
.contact-form label {
  font-family: var(--utility);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
  display: block;
  margin-bottom: 8px;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  background: var(--elevated);
  border: 1px solid var(--hairline);
  color: var(--ivory);
  font-family: var(--display);
  font-size: 16px;
  padding: 14px 16px;
}
.contact-form select { appearance: none; }
.contact-form textarea { min-height: 140px; resize: vertical; }

/* ---------- quick contact routes ---------- */

.route-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.route-link {
  font-family: var(--utility);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ivory-dim);
  border: 1px solid var(--hairline);
  padding: 10px 18px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.route-link:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ---------- contact page grid ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
@media (max-width: 780px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- podcast / links page ---------- */

.link-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 36px;
}
.link-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--elevated);
  border: 1px solid var(--hairline);
  padding: 18px 22px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.link-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.link-card .eyebrow { margin-bottom: 0; }
.link-card-title {
  font-family: var(--display);
  font-size: 20px;
  color: var(--ivory);
}

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

footer {
  border-top: 1px solid var(--hairline);
  padding: 48px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
footer .caption a { color: var(--gold); }

/* ---------- utility ---------- */

.center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }


/* ---------- contact social icons ---------- */
.social-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.social-icons a {
  width: 42px;
  height: 42px;
  border: 1px solid var(--hairline);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--gold);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.social-icons a:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.social-icons svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}




/* ===== FINAL MOBILE NAV: always-visible horizontal row ===== */
@media (max-width: 820px) {
  .site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    background: #0b0d11 !important;
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  }

  .nav-inner {
    display: block !important;
    width: 100% !important;
    padding: 12px 12px 10px !important;
  }

  .wordmark {
    display: block !important;
    margin-bottom: 8px !important;
  }

  .nav-toggle {
    display: none !important;
  }

  .links,
  .links.open {
    position: static !important;
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    width: 100% !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  .links a {
    display: block !important;
    min-width: 0 !important;
    padding: 7px 1px !important;
    margin: 0 !important;
    text-align: center !important;
    white-space: nowrap !important;
    background: transparent !important;
    border: 0 !important;
    font-size: clamp(8px, 2.35vw, 11px) !important;
    letter-spacing: 0.025em !important;
    line-height: 1.15 !important;
  }
}

@media (max-width: 390px) {
  .nav-inner {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .links a {
    font-size: 7.5px !important;
    letter-spacing: 0 !important;
  }
}
