/* Buy Your Way Out — landing page styles */

@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/playfair-display-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --navy-900: #0a1226;
  --navy-800: #0e1730;
  --navy-700: #16223f;
  --gold: #e3a646;
  --gold-light: #f4c56a;
  --gold-ink: #8a5a14; /* gold dark enough for text on light backgrounds */
  --cream: #faf6ee;
  --white: #ffffff;
  --ink: #1b2233;
  --muted: #5b6477;
  --line: #e7e0d2;
  --on-navy: #f7f1e6;
  --on-navy-muted: #c3c8d6;

  --serif: "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --wrap: 68rem;
  --prose: 42rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.15em; }

a { color: var(--gold-ink); text-underline-offset: 0.18em; }
a:hover { color: var(--navy-700); }

:focus-visible { outline: 3px solid var(--gold-ink); outline-offset: 3px; border-radius: 4px; }
.hero :focus-visible,
.cta :focus-visible,
.footer :focus-visible,
.topbar :focus-visible { outline-color: var(--gold); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--white); color: var(--ink); padding: 0.75rem 1rem; z-index: 10;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

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

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

.btn {
  display: inline-block;
  font: 600 1.0625rem/1 var(--sans);
  padding: 1.05rem 1.9rem;
  border-radius: 6px;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  background: var(--gold);
  color: var(--navy-900);
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--gold-light); color: var(--navy-900); }
.btn:active { transform: translateY(1px); }

.price {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}

.buy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }

.fine { font-size: 0.875rem; line-height: 1.6; }

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

.hero {
  color: var(--on-navy);
  background:
    radial-gradient(60rem 34rem at 12% 78%, rgba(227, 166, 70, 0.26), transparent 62%),
    linear-gradient(180deg, var(--navy-800), var(--navy-900));
  padding: 3.5rem 0 4rem;
}
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
.hero__cover { justify-self: center; width: min(70vw, 19rem); }
.hero__cover img {
  border-radius: 4px;
  box-shadow: 0 1.5rem 3.5rem rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.hero h1 { font-size: clamp(2.5rem, 7vw, 4.25rem); letter-spacing: -0.01em; }
.hero__subtitle {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.6vw, 1.5rem);
  line-height: 1.35;
  color: var(--gold-light);
  margin: 0.9rem 0 0;
}
.hero__author {
  font-size: 0.875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--on-navy-muted);
  margin: 1.4rem 0 0;
}
.hero__desc { max-width: 34rem; margin: 1.4rem 0 2rem; color: var(--on-navy); }
.hero .fine { color: var(--on-navy-muted); margin: 1.25rem 0 0; }
.hero .fine a { color: var(--gold-light); }

@media (min-width: 52rem) {
  .hero { padding: 5.5rem 0 6rem; }
  .hero__grid { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 4.5rem; }
  .hero__cover { width: 100%; }
}

/* ---------- Sections ---------- */

.section { padding: 4.5rem 0; }
.section--cream { background: var(--cream); }
.section h2 { font-size: clamp(1.85rem, 4vw, 2.5rem); margin-bottom: 1.75rem; }
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 0 0 0.75rem;
}
.prose { max-width: var(--prose); }
.prose ul { padding-left: 1.2rem; margin: 0 0 1.4em; }
.prose li { margin-bottom: 0.5em; padding-left: 0.3rem; }
.prose li::marker { color: var(--gold); }

@media (min-width: 52rem) { .section { padding: 6rem 0; } }

/* ---------- What's inside ---------- */

.chapters {
  list-style: none;
  counter-reset: ch;
  margin: 0 0 2.25rem;
  padding: 0;
  border-top: 1px solid var(--line);
}
.chapters li {
  counter-increment: ch;
  display: flex;
  gap: 1.1rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  break-inside: avoid;
}
.chapters li::before {
  content: counter(ch, decimal-leading-zero);
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--gold-ink);
  min-width: 1.6rem;
}
@media (min-width: 52rem) {
  .chapters { columns: 2; column-gap: 4rem; border-top: 0; }
  .chapters li:first-child,
  .chapters li:nth-child(9) { border-top: 1px solid var(--line); }
}

.note {
  max-width: var(--prose);
  border-left: 3px solid var(--gold);
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: var(--ink);
}
.note p:last-child { margin-bottom: 0; }

/* ---------- Author ---------- */

.author { display: grid; gap: 2rem; }
.author__photo {
  width: 9.5rem; height: 9.5rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 5px var(--white), 0 0 0 6px var(--line);
}
@media (min-width: 52rem) {
  .author { grid-template-columns: 11rem minmax(0, var(--prose)); gap: 3.5rem; }
  .author__photo { width: 11rem; height: 11rem; }
}

/* ---------- Final call to action ---------- */

.cta {
  color: var(--on-navy);
  text-align: center;
  background:
    radial-gradient(40rem 22rem at 50% 115%, rgba(227, 166, 70, 0.25), transparent 65%),
    var(--navy-800);
}
.cta h2 { margin-bottom: 1rem; }
.cta p { max-width: 34rem; margin-left: auto; margin-right: auto; }
.cta .buy-row { justify-content: center; margin-top: 2rem; }
.cta .fine { color: var(--on-navy-muted); margin-top: 1.5rem; }

/* ---------- Email updates ---------- */

.updates { padding: 3.5rem 0; border-top: 1px solid var(--line); }
.updates h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.updates p { color: var(--muted); max-width: var(--prose); }
.updates__form { display: flex; flex-wrap: wrap; gap: 0.75rem; max-width: 32rem; margin-top: 1.25rem; }
.updates__form input[type="email"] {
  flex: 1 1 14rem;
  font: inherit;
  padding: 0.85rem 1rem;
  border: 1px solid #767676;
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
}
.btn--quiet { background: var(--navy-800); color: var(--on-navy); }
.btn--quiet:hover { background: var(--navy-700); color: var(--on-navy); }
.updates__status { margin: 1rem 0 0; font-weight: 600; color: var(--ink); }
.updates__status:empty { margin: 0; }

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

.footer {
  background: var(--navy-900);
  color: var(--on-navy-muted);
  font-size: 0.9rem;
  padding: 3rem 0;
}
.footer a { color: var(--on-navy); }
.footer a:hover { color: var(--gold-light); }
.footer__links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.footer__disclaimer { max-width: var(--prose); margin-bottom: 1.5rem; }
.footer p:last-child { margin-bottom: 0; }

/* ---------- Simple pages (policies, thank-you) ---------- */

.topbar { background: var(--navy-800); padding: 1.1rem 0; }
.topbar a { font-family: var(--serif); font-size: 1.2rem; color: var(--on-navy); text-decoration: none; }
.topbar a:hover { color: var(--gold-light); }

.page { padding: 3.5rem 0 5rem; }
.page h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin-bottom: 0.5rem; }
.page h2 { font-size: 1.35rem; margin: 2.25rem 0 0.75rem; }
.page .updated { color: var(--muted); font-size: 0.9rem; }

.draft {
  background: #fff4d6;
  border: 1px solid #e0b64a;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 2rem;
  font-size: 0.95rem;
}
.draft strong { text-transform: uppercase; letter-spacing: 0.06em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---------- Sticky buy bar (home page) ---------- */

.has-buybar { padding-bottom: 4.75rem; }
html:has(.has-buybar) { scroll-padding-bottom: 5.5rem; }

.buybar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  background: var(--navy-900);
  color: var(--on-navy);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 -0.5rem 1.5rem rgba(0, 0, 0, 0.18);
  padding: 0.65rem 0 calc(0.65rem + env(safe-area-inset-bottom));
}
.buybar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.buybar__text { margin: 0; line-height: 1.25; min-width: 0; }
.buybar__title { display: block; font-family: var(--serif); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buybar__price { font-size: 0.875rem; color: var(--gold-light); }
.buybar .btn { padding: 0.85rem 1.4rem; white-space: nowrap; flex-shrink: 0; }
.buybar :focus-visible { outline-color: var(--gold); }

@media print { .buybar { display: none; } }

/* ---------- Common questions ---------- */

.faq h3 { font-size: 1.2rem; margin: 2rem 0 0.5rem; }
.faq h3:first-child { margin-top: 0; }
.faq p:last-child { margin-bottom: 0; }
