/* ============================================================
   Prosperity in Every Postcode — site styles
   BRAND COLOURS: edit the variables below to match
   lredhandbook.com exactly (one change updates the whole site).
   ============================================================ */
:root {
  /* Palette drawn from the book cover: amber-gold rays, black silhouette, white type */
  --navy: #1d1710;        /* primary dark (warm near-black) - headers, footer */
  --navy-2: #2e2415;      /* lighter warm dark for panels */
  --accent: #e8951c;      /* cover amber - buttons, highlights */
  --accent-dark: #c47a0d; /* deeper amber for hover */
  --ink: #26221c;         /* body text */
  --muted: #6b6357;       /* secondary text */
  --paper: #ffffff;
  --wash: #faf6ee;        /* light warm section background */
  --line: #eae2d3;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--ink); line-height: 1.65; background: var(--paper); font-size: 17px; }
img { max-width: 100%; display: block; }
a { color: var(--navy-2); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header / nav ---------- */
header.site {
  background: var(--navy); color: #fff;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; max-width: 1080px; margin: 0 auto; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; color: #fff; text-decoration: none; letter-spacing: .3px; }
.brand span { color: var(--accent); }
nav.main { display: flex; gap: 26px; align-items: center; }
nav.main a { color: #e8ebf0; text-decoration: none; font-size: .95rem; }
nav.main a:hover, nav.main a.active { color: var(--accent); }
nav.main a.btn { color: var(--navy); }
#nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; font-size: 1.3rem; padding: 2px 10px; border-radius: 6px; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; background: var(--accent); color: var(--navy);
  font-weight: 600; text-decoration: none; padding: 12px 26px;
  border-radius: 6px; border: none; cursor: pointer; font-size: 1rem;
}
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn.ghost { background: transparent; border: 2px solid var(--accent); color: var(--accent); }
.btn.ghost:hover { background: var(--accent); color: var(--navy); }
.btn.on-light { color: var(--navy); }

/* ---------- Hero ---------- */
.hero {
  /* Cover treatment: amber rays behind a dark left-hand gradient for legibility.
     If angel-background.jpg is uploaded alongside these files it is used;
     otherwise the CSS gradients alone recreate the cover's golden-ray look. */
  background-image:
    linear-gradient(100deg, rgba(24,17,8,.88) 0%, rgba(24,17,8,.55) 48%, rgba(24,17,8,.18) 100%),
    url('angel-background.jpg'),
    repeating-conic-gradient(from 178deg at 50% -18%, rgba(255,244,214,.22) 0deg 1deg, rgba(255,244,214,0) 1deg 9deg),
    radial-gradient(ellipse 120% 90% at 50% -25%, #ffe3a1 0%, #f2a626 45%, #cf7f0c 100%);
  background-size: cover, cover, cover, cover;
  background-position: center;
  color: #fff; padding: 72px 0 64px;
}
.hero .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.kicker { text-transform: uppercase; letter-spacing: 2.5px; font-size: .8rem; color: var(--accent); font-weight: 700; margin-bottom: 14px; }
.hero h1 { font-family: var(--serif); font-size: 3rem; line-height: 1.12; margin-bottom: 18px; }
.hero .sub { font-size: 1.25rem; color: #fce8c3; margin-bottom: 10px; font-family: var(--serif); }
.hero .meta { color: #e3c891; font-size: .95rem; margin-bottom: 28px; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.cover-slot {
  background: rgba(255,255,255,.07); border: 1px dashed rgba(255,255,255,.35);
  border-radius: 8px; aspect-ratio: 10/16; max-width: 320px; margin-left: auto;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: #b9c2cf; font-size: .9rem; padding: 20px;
}
.cover-slot img { border-radius: 4px; box-shadow: 0 18px 40px rgba(0,0,0,.45); }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
section.wash { background: var(--wash); }
section.dark { background: var(--navy); color: #fff; }
section.dark h2 { color: #fff; }
h2 { font-family: var(--serif); font-size: 2rem; color: var(--navy); margin-bottom: 18px; }
h3 { font-family: var(--serif); font-size: 1.25rem; color: var(--navy); margin: 26px 0 8px; }
section.dark h3 { color: var(--accent); }
.lede { font-size: 1.15rem; max-width: 780px; }
p + p { margin-top: 14px; }
.center { text-align: center; }
.center .lede { margin: 0 auto; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; margin-top: 34px; }
.card { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: 24px; }
.card h3 { margin-top: 0; }
.card .num { font-family: var(--serif); font-size: .85rem; color: var(--accent-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; }
section.dark .card { background: var(--navy-2); border-color: rgba(255,255,255,.12); border-left-color: var(--accent); color: #dbe1e9; }

/* ---------- Chapter list ---------- */
.parts { margin-top: 30px; }
.part { margin-bottom: 34px; }
.part h3 { border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: 4px; }
.part p.remit { color: var(--muted); margin: 6px 0 12px; }
ol.chapters { list-style: none; counter-reset: none; }
ol.chapters li { padding: 10px 0 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: baseline; }
ol.chapters li:last-child { border-bottom: none; }
ol.chapters .n { font-family: var(--serif); color: var(--accent-dark); font-weight: 700; min-width: 2.2em; }
ol.chapters .t { font-weight: 600; color: var(--navy); }
ol.chapters .d { color: var(--muted); font-size: .95rem; }

/* ---------- Quote band ---------- */
.quoteband { background: var(--navy); color: #fff; padding: 56px 0; text-align: center; }
.quoteband blockquote { font-family: var(--serif); font-size: 1.6rem; line-height: 1.4; max-width: 850px; margin: 0 auto 12px; }
.quoteband cite { color: var(--accent); font-style: normal; font-size: .95rem; }

/* ---------- Author ---------- */
.author-grid { display: grid; grid-template-columns: 300px 1fr; gap: 44px; align-items: start; }
.author-grid img { border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 28px; }
.svc { background: var(--wash); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.svc strong { color: var(--navy); display: block; margin-bottom: 4px; }
.svc a { font-size: .92rem; }

/* ---------- Signup ---------- */
.signup { background: var(--wash); border-top: 4px solid var(--accent); }
.signup .inner { max-width: 640px; margin: 0 auto; text-align: center; }
.kit-slot { margin-top: 24px; }
.fallback-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.fallback-form input[type=email] { padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; min-width: 280px; font-size: 1rem; }

/* ---------- Footer ---------- */
footer.site { background: var(--navy); color: #9aa6b5; padding: 40px 0; font-size: .92rem; }
footer.site .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 34px; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
footer.site h4 { color: #fff; font-size: 1rem; margin-bottom: 10px; }
footer.site a { color: #c9d2dd; text-decoration: none; display: block; margin-bottom: 6px; }
footer.site a:hover { color: var(--accent); }
footer.site .fine { text-align: center; margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); }

/* ---------- Page head (inner pages) ---------- */
.pagehead {
  background-image:
    linear-gradient(100deg, rgba(24,17,8,.92) 0%, rgba(24,17,8,.65) 55%, rgba(24,17,8,.35) 100%),
    radial-gradient(ellipse 120% 100% at 50% -30%, #f6bc55 0%, #d98d13 60%, #b06c08 100%);
  color: #fff; padding: 54px 0 44px;
}
.pagehead h1 { font-family: var(--serif); font-size: 2.4rem; }
.pagehead p { color: #c9d2dd; max-width: 760px; margin-top: 10px; font-size: 1.1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap, .author-grid { grid-template-columns: 1fr; }
  .cover-slot { margin: 0 auto; }
  .hero h1 { font-size: 2.2rem; }
  footer.site .cols { grid-template-columns: 1fr; }
  #nav-toggle { display: block; }
  nav.main { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); flex-direction: column; padding: 18px 24px; gap: 16px; }
  nav.main.open { display: flex; }
}
