/* ==========================================================================
   High-Density DIY Survival Food Formula Manual — sales page
   Field-manual aesthetic: dark stock, stencil-orange accent, mono labels.
   ========================================================================== */

:root {
  --bg: #12100e;
  --bg-raised: #1b1815;
  --bg-card: #201c18;
  --line: #322c25;
  --line-soft: #272219;
  --text: #e9e4db;
  --text-dim: #a89e91;
  --text-faint: #7d7365;
  --accent: #d97b34;
  --accent-bright: #f0913f;
  --accent-dim: #8a4e20;
  --danger: #c14a3a;
  --ok: #6f9a52;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --wrap: 1080px;
  --narrow: 760px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: var(--narrow); }

section { padding: 84px 0; border-top: 1px solid var(--line-soft); }
section:first-of-type { border-top: 0; }

h1, h2, h3 { line-height: 1.18; letter-spacing: -0.02em; margin: 0 0 18px; }
h1 { font-size: clamp(32px, 5.2vw, 54px); font-weight: 800; }
h2 { font-size: clamp(26px, 3.6vw, 38px); font-weight: 750; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 18px; }
p:last-child { margin-bottom: 0; }

strong { color: #fff; font-weight: 680; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 16px;
  display: block;
}

.lead { font-size: 19.5px; color: var(--text-dim); }
.dim { color: var(--text-dim); }

/* --- Top bar ------------------------------------------------------------- */

.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(18, 16, 14, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 62px;
}
.brand {
  font-family: var(--mono); font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--text);
}
.brand span { color: var(--accent); }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent); color: #fff;
  font-family: var(--sans); font-size: 17px; font-weight: 730;
  padding: 17px 34px; border: 0; border-radius: 6px;
  text-decoration: none; cursor: pointer;
  transition: background .15s ease, transform .15s ease;
  box-shadow: 0 2px 0 rgba(0,0,0,.35);
}
.btn:hover:not(:disabled) { background: var(--accent-bright); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-sm { font-size: 14.5px; padding: 11px 22px; }
.btn-block { width: 100%; }

.btn-note {
  font-family: var(--mono); font-size: 12px; color: var(--text-faint);
  margin-top: 14px; letter-spacing: .03em;
}

.checkout-error {
  display: none; margin-top: 14px; padding: 12px 16px;
  border: 1px solid var(--danger); border-radius: 5px;
  background: rgba(193, 74, 58, .1);
  color: #f0b5ac; font-size: 14.5px;
}
.checkout-error.show { display: block; }

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

.hero {
  padding: 76px 0 72px;
  background:
    radial-gradient(900px 420px at 15% -10%, rgba(217,123,52,.13), transparent 65%),
    linear-gradient(180deg, #16130f 0%, var(--bg) 100%);
}
.hero h1 { max-width: 15ch; }
.hero .lead { max-width: 56ch; margin-bottom: 30px; }
.hero-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero-price {
  font-family: var(--mono); font-size: 14px; color: var(--text-dim);
}
.hero-price b { color: #fff; font-size: 21px; font-weight: 700; }

.trustline {
  display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 34px;
  font-family: var(--mono); font-size: 12.5px; color: var(--text-faint);
  letter-spacing: .04em;
}
.trustline span::before { content: "✓ "; color: var(--ok); font-weight: 700; }

/* --- Figures ------------------------------------------------------------- */

figure { margin: 0; }

.shot {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: var(--bg-card);
}
/* Fixed aspect + object-fit stops the page reflowing as images decode. */
.shot img {
  display: block; width: 100%; height: auto;
  aspect-ratio: 1000 / 494; object-fit: cover;
}
.shot figcaption {
  padding: 14px 18px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; line-height: 1.6;
  color: var(--text-faint); letter-spacing: .03em;
}
.shot figcaption b { color: var(--accent); font-weight: 700; }

.hero-shot { margin-top: 44px; }
.hero-shot img { aspect-ratio: 1000 / 494; }

/* Formula gallery under the matrix */
.shots {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-top: 24px;
}
.shots .shot img { aspect-ratio: 4 / 3; }

.shot-wide { margin-top: 36px; }
.shot-wide img { aspect-ratio: 16 / 9; }

/* --- Density comparison -------------------------------------------------- */

.compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
  margin: 40px 0 0;
}
.compare-card {
  border: 1px solid var(--line); border-radius: 8px; padding: 26px;
  background: var(--bg-card);
}
.compare-card.bad { border-color: rgba(193,74,58,.4); }
.compare-card.good { border-color: rgba(217,123,52,.55); background: linear-gradient(180deg, rgba(217,123,52,.07), transparent); }
.compare-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .18em;
  text-transform: uppercase; font-weight: 700; margin-bottom: 12px;
}
.compare-card.bad .compare-label { color: var(--danger); }
.compare-card.good .compare-label { color: var(--accent); }
.compare-days { font-size: 46px; font-weight: 800; line-height: 1; color: #fff; letter-spacing: -.03em; }
.compare-days small { font-size: 16px; font-weight: 600; color: var(--text-dim); letter-spacing: 0; }
.compare-card p { margin: 12px 0 0; font-size: 14.5px; color: var(--text-dim); line-height: 1.55; }

/* --- Pain points --------------------------------------------------------- */

.pains { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 44px; }
.pain {
  border: 1px solid var(--line); border-left: 3px solid var(--danger);
  border-radius: 0 8px 8px 0; padding: 24px 26px; background: var(--bg-card);
}
.pain h3 { margin-bottom: 10px; font-size: 18px; }
.pain p { font-size: 15.5px; color: var(--text-dim); line-height: 1.6; }

.turn {
  margin-top: 48px; padding: 30px 32px;
  border: 1px solid var(--line); border-radius: 8px;
  background: linear-gradient(180deg, rgba(217,123,52,.08), transparent);
}
.turn p { font-size: 18px; }
.turn p:last-child { margin-bottom: 0; }

/* --- Contents ------------------------------------------------------------ */

.sections { margin-top: 44px; display: grid; gap: 14px; }
.sec {
  display: grid; grid-template-columns: 78px 1fr; gap: 22px;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 26px 28px; background: var(--bg-card);
}
.sec-num {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: .12em; color: var(--accent); padding-top: 4px;
}
.sec h3 { margin-bottom: 10px; }
.sec p { font-size: 15.5px; color: var(--text-dim); margin-bottom: 12px; }
.sec ul { margin: 0; padding-left: 20px; color: var(--text-dim); font-size: 15px; }
.sec li { margin-bottom: 6px; }
.sec li::marker { color: var(--accent-dim); }

/* --- Matrix table -------------------------------------------------------- */

.table-scroll {
  overflow-x: auto; margin-top: 36px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg-card);
}
table { width: 100%; border-collapse: collapse; min-width: 660px; }
th, td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--line-soft); }
th {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent); font-weight: 700;
  background: rgba(0,0,0,.22);
}
td { font-size: 15px; color: var(--text-dim); }
td:first-child { color: var(--text); font-weight: 620; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(217,123,52,.05); }
.num { font-family: var(--mono); font-size: 14px; color: #fff; white-space: nowrap; }
.num .sub { font-size: 12px; color: var(--text-faint); }

.table-note {
  font-family: var(--mono); font-size: 12px; color: var(--text-faint);
  margin-top: 14px; line-height: 1.6;
}

/* --- Fit / not fit ------------------------------------------------------- */

.fit { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.fit-col { border: 1px solid var(--line); border-radius: 8px; padding: 28px; background: var(--bg-card); }
.fit-col h3 { font-size: 17px; margin-bottom: 16px; }
.fit-col ul { margin: 0; padding: 0; list-style: none; }
.fit-col li {
  position: relative; padding-left: 28px; margin-bottom: 13px;
  font-size: 15.5px; color: var(--text-dim); line-height: 1.55;
}
.fit-col li::before {
  position: absolute; left: 0; top: 0; font-weight: 800; font-size: 15px;
}
.fit-yes li::before { content: "✓"; color: var(--ok); }
.fit-no li::before { content: "✕"; color: var(--danger); }

/* --- Pricing ------------------------------------------------------------- */

#pricing { background: linear-gradient(180deg, #17140f, var(--bg)); }

.price-card {
  max-width: 620px; margin: 40px auto 0;
  border: 1px solid rgba(217,123,52,.45); border-radius: 12px;
  background: var(--bg-card); padding: 42px 40px; text-align: center;
  box-shadow: 0 18px 50px rgba(0,0,0,.4);
}
.price-card h3 { font-size: 24px; margin-bottom: 8px; }
.price-tag { margin: 26px 0 6px; }
.price-tag b { font-size: 60px; font-weight: 800; color: #fff; letter-spacing: -.04em; }
.price-tag span { font-family: var(--mono); font-size: 13px; color: var(--text-faint); display: block; margin-top: 6px; }

.price-list { list-style: none; margin: 28px 0; padding: 0; text-align: left; }
.price-list li {
  position: relative; padding-left: 28px; margin-bottom: 12px;
  font-size: 15.5px; color: var(--text-dim);
}
.price-list li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }

/* --- FAQ ----------------------------------------------------------------- */

.faq { margin-top: 40px; border-top: 1px solid var(--line); }
details {
  border-bottom: 1px solid var(--line);
  background: transparent;
}
summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0;
  font-size: 17.5px; font-weight: 660; color: var(--text);
  position: relative; transition: color .15s ease;
}
summary::-webkit-details-marker { display: none; }
summary:hover { color: var(--accent-bright); }
summary::after {
  content: "+"; position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%); font-size: 24px; font-weight: 400;
  color: var(--accent); line-height: 1;
}
details[open] summary::after { content: "–"; }
details[open] summary { color: var(--accent-bright); }
.faq-body { padding: 0 44px 24px 0; color: var(--text-dim); font-size: 16px; }
.faq-body p { margin-bottom: 14px; }

/* --- Final CTA ----------------------------------------------------------- */

.final { text-align: center; padding-bottom: 104px; }
.final h2 { max-width: 20ch; margin-left: auto; margin-right: auto; }
.final .lead { max-width: 54ch; margin: 0 auto 30px; }

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 820px) {
  body { font-size: 16.5px; }
  section { padding: 62px 0; }
  .compare, .pains, .fit { grid-template-columns: 1fr; }
  .shots { grid-template-columns: 1fr; }
  .sec { grid-template-columns: 1fr; gap: 10px; }
  .price-card { padding: 32px 24px; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .hero-price { text-align: center; }
  .topbar .btn { display: none; }
}

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