/* ══════════════════════════════════════════
   VIGILANT SURVIVAL BOOKS — styles.css
   Static homepage for vigilantsurvivalbooks.com
   Navy, red, and cream. Mobile-first.
   ══════════════════════════════════════════ */

/* ── Reset & Root ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy:        #0b1c2c;
  --navy-deep:   #07131e;
  --navy-mid:    #13283c;
  --navy-soft:   #1b364c;
  --red:         #b31b2c;
  --red-dark:    #8e1522;
  --red-soft:    #c93a48;
  --cream:       #f3efe6;
  --cream-2:     #e6e0d2;
  --paper:       #faf8f4;
  --gold:        #c4a35a;
  --gold-hi:     #d4b56e;
  --ink:         #1a1f24;
  --muted:       #5c6570;
  --muted-on-dark: #9aa3ad;
  --line:        rgba(11, 28, 44, 0.10);
  --line-dark:   rgba(243, 239, 230, 0.12);
  --white:       #ffffff;
  --shadow:      0 18px 50px rgba(7, 19, 30, 0.28);
  --sans:        'Barlow', system-ui, -apple-system, sans-serif;
  --cond:        'Barlow Condensed', 'Barlow', system-ui, sans-serif;
  --serif:       'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --ease:        cubic-bezier(.16, 1, .3, 1);
  --nav-h:       72px;
  --wrap:        1120px;
  --price:       "$34.99"; /* display-only fallback; live price is set in js/main.js */
}

html { scroll-behavior: smooth; font-size: 16px; }
body:has(#sticky-buy.show) { padding-bottom: 5.5rem; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; font-family: inherit; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

.eyebrow {
  display: block;
  font-family: var(--cond);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}

.sec-title {
  font-family: var(--cond);
  font-size: clamp(2rem, 5vw, 3.15rem);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--navy);
}

.sec-sub {
  margin-top: .85rem;
  max-width: 38rem;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.65;
}

.section { padding: 4.25rem 0; }

/* ── Buttons ── */
.btn-buy,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .95rem 1.7rem;
  font-family: var(--cond);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 2px solid transparent;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
  white-space: nowrap;
}

.btn-buy {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-buy:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-buy:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.btn-outline {
  background: transparent;
  color: var(--cream);
  border-color: rgba(243, 239, 230, .35);
}
.btn-outline:hover { border-color: var(--cream); color: var(--white); }
.btn-outline.on-light {
  color: var(--navy);
  border-color: rgba(11, 28, 44, .25);
}
.btn-outline.on-light:hover { border-color: var(--navy); }

/* ══════════════════════════════════════════
   NAV
   ══════════════════════════════════════════ */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease);
}
#nav.scrolled {
  background: rgba(7, 19, 30, .96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--line-dark);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: .7rem;
}
.nav-logo img {
  height: 48px;
  width: auto;
}
.nav-logo-text {
  display: none;
  font-family: var(--cond);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cream);
  line-height: 1.2;
}

.nav-links { display: none; gap: 1.6rem; }
.nav-links a {
  font-family: var(--cond);
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
  transition: color .25s;
}
.nav-links a:hover { color: var(--cream); }

.nav-cta {
  display: none;
  background: var(--red);
  color: var(--white);
  border: none;
  padding: .5rem 1rem;
  font-family: var(--cond);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: background .25s;
}
.nav-cta:hover { background: var(--red-dark); }

.nav-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--cream);
}

.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 210;
  background: rgba(7, 19, 30, .98);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--cond);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cream);
}
.mobile-nav a.buy { color: var(--gold); }
.mobile-nav .close-btn {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: none;
  border: none;
  color: var(--muted-on-dark);
  font-size: 1.8rem;
  line-height: 1;
  padding: .4rem;
}

/* ══════════════════════════════════════════
   HERO
   ══════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: auto;
  padding: calc(var(--nav-h) + 1.5rem) 0 2.75rem;
  background: var(--navy-deep) center / cover no-repeat;
  background-image:
    linear-gradient(180deg, rgba(7,19,30,.72) 0%, rgba(7,19,30,.78) 50%, rgba(7,19,30,.92) 100%),
    url('../images/hero-bg.jpg');
  color: var(--cream);
  display: flex;
  align-items: center;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--red);
  z-index: 2;
}

.hero-grid {
  display: grid;
  gap: 1.35rem;
  align-items: center;
}

.hero-flag {
  display: inline-block;
  border: 1px solid rgba(196, 163, 90, .45);
  color: var(--gold);
  font-family: var(--cond);
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: .35rem .7rem;
  margin-bottom: 1.15rem;
}

.hero h1 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(2.6rem, 11vw, 5.2rem);
  line-height: .9;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--white);
}
.hero h1 .accent {
  display: block;
  color: #e85c2a; /* matches the cover's "GOES DARK" */
}

.hero-kicker {
  margin-top: .9rem;
  font-family: var(--cond);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
}

.hero-byline {
  margin-top: .35rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.12rem;
  color: var(--cream-2);
}

.hero-lead {
  margin-top: 1.15rem;
  max-width: 34rem;
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--cream-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.6rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.15rem;
  margin-top: 1.4rem;
  color: var(--muted-on-dark);
  font-size: .9rem;
}
.hero-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.hero-meta span::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.hero-cover {
  order: -1;
  justify-self: center;
  width: min(58%, 210px);
  filter: drop-shadow(0 24px 48px rgba(0,0,0,.5));
}
.hero-cover img {
  width: 100%;
  height: auto;
  border: 1px solid rgba(255,255,255,.08);
}

/* ── Trust / specs bar ── */
.specs {
  background: var(--navy);
  color: var(--cream);
  border-top: 1px solid var(--line-dark);
  border-bottom: 4px solid var(--red);
}
.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1rem;
  padding: 1.5rem 0;
}
.stat .num {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--white);
}
.stat .num.isbn { font-size: 1.05rem; letter-spacing: .02em; }
.stat .lbl {
  display: block;
  margin-top: .15rem;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-on-dark);
}

/* ══════════════════════════════════════════
   WHAT'S INSIDE
   ══════════════════════════════════════════ */
.inside { background: var(--paper); }

.inside-head { margin-bottom: 2.25rem; }

.chapter-grid {
  display: grid;
  gap: 1.25rem;
}

.chapter-group {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.25rem 1.2rem 1.15rem;
}
.chapter-group h3 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .7rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--line);
}
.chapter-group ol { list-style: none; }
.chapter-group li {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: .4rem;
  padding: .28rem 0;
  font-family: var(--serif);
  font-size: .98rem;
  color: var(--ink);
}
.chapter-group li .n {
  font-family: var(--cond);
  font-weight: 700;
  color: var(--muted);
}

/* ══════════════════════════════════════════
   LOOK INSIDE
   ══════════════════════════════════════════ */
.look { background: var(--cream); }

.look-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.look-card {
  background: var(--white);
  border: 1px solid var(--line);
  cursor: pointer;
  padding: .5rem .5rem .8rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.look-card:hover,
.look-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  outline: none;
}
.look-card img {
  width: 100%;
  aspect-ratio: 8.5 / 11;
  object-fit: cover;
  object-position: top;
  background: var(--navy-deep);
}
.look-card figcaption {
  margin-top: .6rem;
  padding: 0 .35rem;
  font-family: var(--cond);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--navy);
  line-height: 1.25;
  min-height: 2.4em;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(7, 19, 30, .92);
  padding: 1.25rem;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(920px, 100%);
  max-height: calc(100vh - 6rem);
  width: auto;
  height: auto;
  box-shadow: 0 20px 80px rgba(0,0,0,.5);
  background: var(--white);
}
.lightbox-cap {
  position: absolute;
  bottom: 1rem;
  left: 0; right: 0;
  text-align: center;
  color: var(--cream);
  font-family: var(--cond);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .85rem;
}
.lightbox-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: none;
  color: var(--cream);
  font-size: 2rem;
  line-height: 1;
  padding: .4rem;
}

/* ══════════════════════════════════════════
   WHO IT'S FOR
   ══════════════════════════════════════════ */
.audience { background: var(--paper); }

.audience-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.audience-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  padding: 1.3rem 1.2rem 1.4rem;
}
.audience-card h3 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: .45rem;
}
.audience-card p {
  font-family: var(--serif);
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* ══════════════════════════════════════════
   SERIES
   ══════════════════════════════════════════ */
.series {
  background: var(--navy);
  color: var(--cream);
}
.series .sec-title { color: var(--white); }
.series .sec-sub { color: var(--muted-on-dark); }

.series-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: 2rem;
}
.series-card {
  background: var(--navy-mid);
  border: 1px solid var(--line-dark);
  padding: 1.1rem 1rem 1.2rem;
}
.series-card .idx {
  font-family: var(--cond);
  font-weight: 700;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}
.series-card h3 {
  margin-top: .3rem;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--white);
}
.series-card p {
  margin-top: .35rem;
  font-family: var(--serif);
  font-size: .95rem;
  color: var(--muted-on-dark);
  line-height: 1.5;
}

/* ══════════════════════════════════════════
   ABOUT
   ══════════════════════════════════════════ */
.about { background: var(--paper); }

.about-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.about-mark {
  justify-self: center;
  width: min(280px, 70%);
}
.about-copy p {
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--ink);
  margin-top: 1rem;
}
.about-copy p:first-of-type { margin-top: 1.1rem; }

/* ══════════════════════════════════════════
   BUY / ORDER
   ══════════════════════════════════════════ */
.buy {
  background: var(--cream);
}
.buy-card {
  display: grid;
  gap: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}
.buy-cover {
  width: min(220px, 60%);
  margin: 0 auto;
  filter: drop-shadow(0 12px 24px rgba(7,19,30,.25));
}
.buy-info h2 {
  font-family: var(--cond);
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--navy);
}
.buy-info .by {
  margin-top: .4rem;
  font-family: var(--serif);
  font-style: italic;
  color: var(--muted);
}
.buy-price {
  margin: 1rem 0 .3rem;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--navy);
  letter-spacing: .02em;
  line-height: 1;
}
.buy-price .note {
  display: block;
  margin-top: .35rem;
  font-family: var(--sans);
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}
.buy-info .facts {
  margin: .9rem 0 1.2rem;
  font-size: .92rem;
  color: var(--muted);
}
.buy-info .facts li { padding: .15rem 0; }
.isbn { font-variant-numeric: tabular-nums; letter-spacing: .04em; }

/* ══════════════════════════════════════════
   FAQ
   ══════════════════════════════════════════ */
.faq { background: var(--paper); }

.faq-list { margin-top: 1.75rem; border-top: 1px solid var(--line); }

.faq-item { border-bottom: 1px solid var(--line); }

.faq-trigger {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1.15rem 2.2rem 1.15rem 0;
  font-family: var(--cond);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--navy);
  position: relative;
}
.faq-trigger::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--red);
  font-weight: 500;
}
.faq-item.open .faq-trigger::after { content: '–'; }

.faq-panel {
  display: none;
  padding: 0 0 1.2rem;
  max-width: 42rem;
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
}
.faq-item.open .faq-panel { display: block; }

/* ══════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════ */
.site-footer {
  background: var(--navy-deep);
  color: var(--muted-on-dark);
  padding: 2.5rem 0 2rem;
  border-top: 4px solid var(--red);
}
.footer-inner {
  display: grid;
  gap: 1.25rem;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: .8rem;
}
.footer-brand img { height: 56px; width: auto; }
.footer-brand p {
  font-family: var(--cond);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--cream);
  font-size: .9rem;
}
.footer-meta {
  font-size: .88rem;
  line-height: 1.6;
}
.footer-meta a { color: var(--cream-2); text-decoration: underline; text-underline-offset: 2px; }

/* ── Sticky buy bar ── */
.sticky-buy {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 180;
  display: none;
  align-items: center;
  gap: .85rem;
  padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom));
  background: rgba(7, 19, 30, .96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-dark);
  color: var(--cream);
  transform: translateY(110%);
  transition: transform .35s var(--ease);
}
.sticky-buy.show { display: flex; transform: translateY(0); }
.sticky-buy img {
  height: 48px;
  width: auto;
  flex-shrink: 0;
}
.sticky-buy .sc-text { flex: 1; min-width: 0; }
.sticky-buy .sc-title {
  font-family: var(--cond);
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--white);
}
.sticky-buy .sc-price {
  font-size: .85rem;
  color: var(--gold);
}
.sticky-buy .btn-buy { padding: .7rem 1rem; font-size: .82rem; }

/* ══════════════════════════════════════════
   BREAKPOINTS
   ══════════════════════════════════════════ */
@media (min-width: 640px) {
  .specs-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-cover { width: min(100%, 360px); }
}

@media (min-width: 768px) {
  .wrap { padding: 0 2rem; }
  #nav { padding: 0 2rem; }
  .nav-logo-text { display: block; }
  .nav-hamburger { display: none; }
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .section { padding: 5.5rem 0; }

  .hero {
    min-height: 100svh;
    padding: calc(var(--nav-h) + 1.75rem) 0 4rem;
  }
  .hero-grid {
    grid-template-columns: 1fr minmax(260px, 380px);
    gap: 3rem;
  }
  .hero-cover { order: 0; width: 100%; justify-self: end; }

  .chapter-grid { grid-template-columns: 1fr 1fr; }
  .look-grid { grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
  .audience-grid { grid-template-columns: 1fr 1fr; }
  .series-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 280px 1fr; gap: 3rem; }
  .about-mark { width: 100%; justify-self: start; }
  .buy-card {
    grid-template-columns: 220px 1fr;
    gap: 2.25rem;
    padding: 2rem 2.2rem;
    align-items: center;
  }
  .buy-cover { width: 100%; margin: 0; }
  .footer-inner {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
  .footer-meta { text-align: right; }
}

@media (min-width: 1024px) {
  #nav { padding: 0 2.5rem; }
  .nav-logo img { height: 54px; }
  .chapter-grid { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
  .audience-grid { grid-template-columns: repeat(3, 1fr); }
  .series-grid { grid-template-columns: repeat(4, 1fr); }
}

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