/* ============================================================
   Delilah Faber — Fixed to Death pre-order
   Rebuilt from the Claude Design prototype (design/).
   ============================================================ */

:root {
  --teal: #159AB4;
  --teal-deep: #17548F;
  --teal-hover: #0f7f96;
  --navy: #16283D;
  --cream: #F4EEDE;
  --orange: #F15A38;
  --orange-hover: #d34526;

  --ink: #16283D;         /* body text on cream */
  --ink-soft: #2a3a4d;    /* prose on cream */
  --cream-2: #EAF6F8;     /* light text on teal */
  --slate-2: #C9D6E0;     /* body text on navy */
  --muted: #47566a;       /* signup sub */
  --footer: #8aa0b4;
  --footer-2: #5f7488;

  --maxw: 1160px;
  --serif: 'Bitter', Georgia, 'Times New Roman', serif;
  --sans: 'Mulish', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }

a { color: var(--orange); text-decoration: none; }
a:hover { color: var(--orange-hover); }
::selection { background: var(--teal); color: var(--cream); }

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

/* Accessibility helpers */
.visually-hidden {
  position: absolute !important;
  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; left: -999px; top: 0; z-index: 100;
  background: var(--cream); color: var(--navy);
  padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

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

/* Shared bits */
.stripes {
  position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 26px);
}
.accent { color: var(--orange); }

.eyebrow {
  font-weight: 700; font-size: 13px; letter-spacing: 0.24em;
  text-transform: uppercase; margin: 0 0 14px;
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow--hero {
  color: var(--cream); font-size: 14px; letter-spacing: 0.22em; margin-bottom: 20px;
}
.eyebrow--teal { color: var(--teal); }
.eyebrow--cream { color: var(--cream); margin-bottom: 16px; }
.eyebrow__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }

.section-title {
  font-family: var(--serif); font-weight: 800;
  font-size: clamp(30px, 4vw, 42px); margin: 0; color: var(--navy);
}
.section-title--light { color: var(--cream); }

/* Buttons */
.btn {
  display: inline-block; font-weight: 800; font-size: 16px;
  letter-spacing: 0.03em; border-radius: 999px; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.btn--primary {
  background: var(--orange); color: #fff;
  padding: 16px 30px; box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}
.btn--primary:hover { background: var(--orange-hover); color: #fff; }
.btn--lg { padding: 17px 34px; box-shadow: 0 12px 28px rgba(0,0,0,0.22); }
.btn--ghost {
  background: transparent; color: var(--cream);
  border: 2px solid var(--cream); padding: 15px 30px;
}
.btn--ghost:hover { background: var(--cream); color: var(--teal); }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--teal); border-bottom: 4px solid var(--teal-deep);
}
.site-header__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px 32px; display: flex; align-items: center;
  justify-content: space-between; gap: 24px;
}
.brand {
  font-family: var(--serif); font-weight: 900; font-size: 20px;
  letter-spacing: 0.02em; color: var(--cream);
  display: flex; align-items: center; gap: 10px;
}
.brand:hover { color: var(--cream); }
.brand__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--orange); }
.nav {
  display: flex; gap: 30px; align-items: center;
  font-weight: 700; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase;
}
.nav__link { color: var(--cream-2); transition: color .15s ease, background-color .15s ease; }
.nav__link:hover { color: #fff; }
.nav__cta {
  background: var(--orange); color: #fff;
  padding: 9px 18px; border-radius: 999px; letter-spacing: 0.06em; white-space: nowrap;
}
.nav__cta:hover { background: var(--orange-hover); color: #fff; }

/* Hamburger toggle (shown only on narrow screens) */
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 8px; margin-left: 2px; align-items: center; justify-content: center;
}
.nav-toggle__box { display: block; position: relative; width: 22px; height: 16px; }
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
  position: absolute; left: 0; width: 22px; height: 2.5px; border-radius: 2px;
  background: var(--cream); transition: transform .2s ease, opacity .2s ease, background-color .2s ease;
}
.nav-toggle__bar { top: 50%; transform: translateY(-50%); }
.nav-toggle__bar::before { content: ""; top: -7px; }
.nav-toggle__bar::after { content: ""; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after { top: 0; transform: rotate(-45deg); }

/* Mobile drawer (hidden by default; revealed by the toggle on narrow screens) */
.mobile-nav { display: none; background: var(--teal); border-bottom: 4px solid var(--teal-deep); padding: 6px 24px 16px; }
.mobile-nav__link {
  display: block; padding: 13px 4px; color: var(--cream-2);
  font-weight: 700; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.mobile-nav__link:last-child { border-bottom: 0; }
.mobile-nav__link:hover, .mobile-nav__link:focus { color: #fff; }

/* ---------------- Hero ---------------- */
.hero { position: relative; background: var(--teal); padding: 64px 32px 88px; }
.hero__grid {
  position: relative; max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center;
}
.hero__title {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(52px, 7vw, 92px); line-height: 0.92;
  margin: 0 0 22px; color: var(--cream); letter-spacing: -0.01em;
}
.hero__tagline {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(19px, 2.2vw, 24px); line-height: 1.4;
  color: var(--cream-2); max-width: 30ch; margin: 0 0 34px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__meta { color: var(--cream-2); font-weight: 600; font-size: 15px; }
.hero__meta-strong { font-weight: 800; color: var(--cream); }
.hero__cover { justify-self: center; position: relative; }
.hero__cover-backing {
  position: absolute; inset: -18px -18px 22px;
  background: var(--teal-deep); border-radius: 8px; transform: rotate(-3deg);
}
.cover-img {
  position: relative; display: block; width: min(360px, 70vw);
  height: auto; border-radius: 6px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35); border: 1px solid rgba(0,0,0,0.1);
}

/* ---------------- Synopsis ---------------- */
.synopsis { max-width: 900px; margin: 0 auto; padding: 92px 32px 70px; scroll-margin-top: 80px; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head .eyebrow { display: block; }
.prose { font-size: 18px; line-height: 1.75; color: var(--ink-soft); }
.prose p { margin: 0 0 22px; }
.prose p:last-child { margin-bottom: 0; }
.prose--light { font-size: 17px; color: var(--slate-2); }
.dropcap {
  float: left; font-family: var(--serif); font-weight: 900;
  font-size: 76px; line-height: 0.72; color: var(--orange); margin: 8px 14px 0 0;
}
.pull-quote {
  margin: 34px 0; padding: 4px 0 4px 26px;
  border-left: 5px solid var(--teal);
  font-family: var(--serif); font-style: italic;
  font-size: 23px; line-height: 1.45; color: var(--navy);
}
.tags {
  list-style: none; margin: 46px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;
}
.tag {
  border: 1.5px solid var(--teal); color: var(--teal);
  font-weight: 700; font-size: 13px; letter-spacing: 0.05em;
  padding: 8px 16px; border-radius: 999px; text-transform: uppercase;
}

/* ---------------- Author ---------------- */
.author { background: var(--navy); color: #EAF1F6; padding: 88px 32px; scroll-margin-top: 68px; }
.author__grid {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; align-items: center;
}
.author__photo { position: relative; justify-self: center; }
.author__photo-frame {
  position: absolute; inset: 16px -16px -16px 16px;
  border: 3px solid var(--orange); border-radius: 6px;
}
.author-img {
  position: relative; display: block; width: min(340px, 74vw);
  height: auto; border-radius: 6px; box-shadow: 0 24px 48px rgba(0,0,0,0.4);
}

/* ---------------- Pre-order ---------------- */
.preorder { position: relative; background: var(--teal); padding: 90px 32px; scroll-margin-top: 68px; }
.preorder__inner { position: relative; max-width: 760px; margin: 0 auto; text-align: center; }
.preorder__title {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(34px, 5vw, 52px); margin: 0 0 18px;
  color: var(--cream); line-height: 1.02;
}
.preorder__lede {
  font-size: 18px; line-height: 1.6; color: var(--cream-2);
  max-width: 46ch; margin: 0 auto 36px;
}
.preorder__actions {
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 40px;
}
.signup-card {
  background: var(--cream); color: var(--navy); border-radius: 12px;
  padding: 30px 32px; max-width: 520px; margin: 0 auto; text-align: left;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
}
.signup-card__title { font-family: var(--serif); font-weight: 800; font-size: 20px; margin-bottom: 6px; }
.signup-card__sub { font-size: 14.5px; color: var(--muted); margin: 0 0 18px; }
.signup-form { display: flex; gap: 10px; flex-wrap: wrap; }
.signup-form__input {
  flex: 1 1 200px; min-width: 0;
  border: 2px solid #cdbfa0; background: #fff; border-radius: 999px;
  padding: 13px 18px; font-family: inherit; font-size: 15px; color: var(--navy); outline: none;
  transition: border-color .15s ease;
}
.signup-form__input:focus { border-color: var(--teal); }
.signup-form__input:disabled { opacity: .6; }
.signup-form__btn {
  background: var(--teal); color: #fff; border: none; font-family: inherit;
  font-weight: 800; font-size: 15px; letter-spacing: 0.02em;
  padding: 13px 26px; border-radius: 999px; cursor: pointer;
  transition: background-color .15s ease;
}
.signup-form__btn:hover { background: var(--teal-hover); }
.signup-form__btn:disabled { background: var(--teal-hover); cursor: default; opacity: .8; }
.signup-card__status { margin: 14px 0 0; font-weight: 700; font-size: 14.5px; }
.signup-card__status--ok { color: var(--teal); }
.signup-card__status--err { color: var(--orange-hover); }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--navy); color: var(--footer); padding: 40px 32px; text-align: center; }
.site-footer__brand {
  font-family: var(--serif); font-weight: 900; font-size: 18px;
  color: var(--cream); letter-spacing: 0.02em; margin-bottom: 8px;
}
.site-footer__tag { font-size: 13.5px; letter-spacing: 0.02em; }
.site-footer__social { display: flex; gap: 20px; justify-content: center; margin-top: 18px; }
.site-footer__social a { color: var(--footer); display: inline-flex; transition: color .15s ease; }
.site-footer__social a:hover { color: var(--cream); }
.site-footer__legal { font-size: 12.5px; margin-top: 16px; color: var(--footer-2); }
.site-footer__links { margin-top: 12px; font-size: 12.5px; letter-spacing: 0.02em; }
.site-footer__links a { color: var(--footer); }
.site-footer__links a:hover { color: var(--cream); }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: 56px 24px 72px; }
.legal h1 { font-family: var(--serif); font-weight: 800; font-size: clamp(30px, 4vw, 40px); margin: 0 0 6px; color: var(--navy); }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.legal h2 { font-family: var(--serif); font-weight: 800; font-size: 21px; margin: 34px 0 10px; color: var(--navy); }
.legal p, .legal li { font-size: 16px; line-height: 1.7; color: var(--ink-soft); }
.legal ul { padding-left: 22px; margin: 0 0 16px; }
.legal li { margin: 6px 0; }
.legal a { color: var(--orange); }
.legal .lead { font-size: 17px; }
.legal .disclaimer { background: var(--surface-2, #f8f3e7); border: 1px solid var(--line, #e4ddca); border-radius: 10px; padding: 14px 18px; font-size: 13.5px; color: var(--muted); margin-bottom: 24px; }

/* Consent line at signup */
.signup-consent { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.signup-consent a { color: var(--orange); }
.newsletter-strip .signup-consent { color: #8aa0b4; }
.newsletter-strip .signup-consent a { color: #7fd3e4; }

/* ============================================================
   Responsive — the prototype had none; stack the two-col grids
   ============================================================ */
@media (max-width: 880px) {
  .hero { padding: 48px 24px 64px; }
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__copy { text-align: center; }
  .hero__tagline { max-width: none; margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
  .hero__cover { order: -1; }  /* cover first on mobile */

  .author__grid { grid-template-columns: 1fr; gap: 44px; }
  .author__body { text-align: center; }
  .author__photo-frame { inset: 12px -12px -12px 12px; }

  .synopsis { padding: 64px 24px 56px; }
  .author { padding: 64px 24px; }
  .preorder { padding: 68px 24px; }
}

/* Mobile navigation: text links move into the hamburger drawer */
@media (max-width: 600px) {
  .nav__link:not(.nav__cta) { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-nav:not([hidden]) { display: block; }
}

@media (max-width: 520px) {
  .site-header__inner { padding: 12px 18px; gap: 12px; }
  .brand { font-size: 17px; }
  .nav { gap: 14px; font-size: 12.5px; }
  .nav__cta { padding: 8px 14px; }

  .eyebrow--hero { font-size: 12px; letter-spacing: 0.16em; gap: 8px; }
  .dropcap { font-size: 60px; margin: 6px 10px 0 0; }
  .pull-quote { font-size: 20px; }
  .signup-card { padding: 24px 20px; }
  .btn--lg { padding: 15px 24px; font-size: 15px; }
}
