/* ==========================================================
   Joseph's Well — "Field Manual" Design System
   A technical field-guide aesthetic: paper, ink, blueprint
   grid, stamped labels. Built to feel like a real document,
   not a sales page.
   ========================================================== */

:root {
  /* Color — 5 named colors, spent deliberately */
  --paper:        #F0F3EA;  /* background */
  --panel:        #FFFFFF;  /* card / alt-section surface */
  --ink:          #1F332B;  /* headings, checkboxes, primary marks */
  --copper:       #C1652F;  /* CTA accent — the one bold color */
  --copper-dark:  #A34F22;
  --rust:         #8B3A2B;  /* stamped labels, dividers */
  --text:         #3A423A;
  --text-muted:   #6B7469;
  --line:         #C9D2BE;

  --font-display: 'Zilla Slab', serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --max-width: 1080px;
  --max-width-narrow: 660px;
  --radius: 4px;
}

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

html { scroll-behavior: smooth; }

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

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

h1, h2 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 20px;
  font-weight: 700;
}

h2 { font-size: 30px; }

p { margin: 0 0 16px; color: var(--text); }

a { color: inherit; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

.container--narrow { max-width: var(--max-width-narrow); }

.section { padding: 72px 0; position: relative; }

.section--panel { background: var(--panel); }

.section--final-cta {
  text-align: center;
  padding: 88px 0;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  position: relative;
}

.section--final-cta__title { color: var(--paper); }

/* ---------- Document label (eyebrow) ---------- */
.doc-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 18px;
}

.doc-label--rust { color: var(--rust); }
.doc-label--on-dark { color: #D7C9A8; }

/* ---------- Hero ---------- */
.hero {
  padding: 80px 0 56px;
  position: relative;
  overflow: hidden;
}

.hero__inner {
  max-width: var(--max-width-narrow);
  text-align: center;
}

.hero__title { font-size: 40px; }

.hero__subtitle {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 28px;
}

/* Faint graph-paper backdrop, hero + final CTA only */
.blueprint-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.35;
  pointer-events: none;
}

.blueprint-grid--dark {
  background-image:
    linear-gradient(rgba(240, 243, 234, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 243, 234, 0.15) 1px, transparent 1px);
  opacity: 1;
}

/* ---------- Spec frame (image with corner brackets) ---------- */
.spec-frame {
  position: relative;
  margin-top: 44px;
  padding: 14px;
}

.spec-frame::before,
.spec-frame::after,
.spec-frame__image::before,
.spec-frame__image::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--ink);
  border-style: solid;
  border-width: 0;
}

.spec-frame::before { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.spec-frame::after { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.spec-frame__image::before { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.spec-frame__image::after { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }

.spec-frame__image {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
}

.spec-frame__image img { width: 100%; height: auto; }

.spec-frame--compact { margin-top: 28px; }

.spec-frame__stamp {
  position: absolute;
  top: -6px;
  right: 8px;
  z-index: 2;
  transform: rotate(4deg);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rust);
  border: 1.5px solid var(--rust);
  border-radius: 999px;
  padding: 5px 14px;
  background: var(--paper);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  border-radius: var(--radius);
  padding: 16px 34px;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn--cta {
  background: var(--copper);
  color: var(--paper);
}

.btn--cta:hover {
  background: var(--copper-dark);
  transform: translateY(-1px);
}

.btn--cta:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.btn--large { font-size: 18px; padding: 18px 42px; }

.section--final-cta .btn--cta:focus-visible { outline-color: var(--paper); }

/* ---------- Module list (numbered — real sequence: guide chapters) ---------- */
.module-list {
  list-style: none;
  margin: 32px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px dashed var(--line);
}

.module-list li {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px dashed var(--line);
}

.module-list__num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--copper);
  padding-top: 3px;
  flex-shrink: 0;
}

.module-list__body { display: flex; flex-direction: column; text-align: left; }

.module-list__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  color: var(--ink);
}

.module-list__desc {
  font-size: 15px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ---------- Checkbox list ---------- */
.checkbox-list {
  list-style: none;
  margin: 28px 0;
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checkbox-list li {
  position: relative;
  padding-left: 34px;
  font-size: 16px;
}

.checkbox-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--ink);
  border-radius: 3px;
}

.checkbox-list li::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: rotate(-45deg);
}

.checkbox-list--large li { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--ink); }

.checkbox-list__label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--copper);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 2px;
}

/* ---------- FAQ ---------- */
.faq { margin-top: 28px; text-align: left; }

.faq__item {
  border-bottom: 1px dashed var(--line);
  padding: 18px 0;
}

.faq__item summary {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--copper);
  border: 1px solid var(--copper);
  border-radius: 3px;
  padding: 1px 6px;
  flex-shrink: 0;
}

.faq__tag--a { color: var(--text-muted); border-color: var(--line); }

.faq__item p {
  margin: 10px 0 0;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  align-items: baseline;
}

/* ---------- Footer ---------- */
.footer {
  padding: 40px 0;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
}

.footer p { color: inherit; margin-bottom: 8px; }

.footer__disclosure {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #90998F;
  max-width: var(--max-width-narrow);
  line-height: 1.6;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  body { font-size: 16px; }

  .hero { padding: 56px 0 40px; }
  .hero__title { font-size: 27px; }
  .hero__subtitle { font-size: 16px; }

  h2 { font-size: 23px; }

  .section { padding: 48px 0; }
  .section--final-cta { padding: 64px 0; }

  .container { padding: 0 20px; }

  .module-list li { flex-direction: column; gap: 6px; }
  .module-list__title { font-size: 17px; }

  .btn { width: 100%; text-align: center; }

  .spec-frame__stamp { right: -4px; font-size: 11px; padding: 4px 10px; }
}

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