/* Dolly Parton's Imagination Library of Waltham — site styles
   Plain CSS, no build step. Colors and spacing live in the variables below. */

:root {
  --red: #b3202c;          /* from the Imagination Library logo */
  --red-dark: #8c1822;
  --ink: #1f1f1c;
  --muted: #5b5a52;
  --cream: #f9f9e6;        /* warm cream background */
  --paper: #fffef8;
  --line: #e3e1cc;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 4px 16px rgb(0 0 0 / 0.06);
  --radius: 10px;
  --wrap: 1100px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

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

a { color: var(--red); }
a:hover { color: var(--red-dark); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.6em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.3rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Header & navigation ---------- */

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 72px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink); font-weight: 700; line-height: 1.15;
}
.brand img { width: 52px; height: auto; }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: 0.85rem; }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 12px; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink);
}

.site-nav > ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; align-items: center; gap: 4px;
}
.site-nav a,
.site-nav .sub-toggle {
  display: block; padding: 8px 12px; border-radius: 8px;
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.98rem;
  background: none; border: 0; font-family: inherit; cursor: pointer;
}
.site-nav a:hover,
.site-nav .sub-toggle:hover { background: var(--cream); color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--red); }
.sub-toggle::after { content: " ▾"; font-size: 0.8em; }

.has-sub { position: relative; }
.has-sub > ul {
  list-style: none; margin: 0; padding: 6px;
  position: absolute; top: 100%; left: 0; min-width: 210px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: none;
}
.has-sub:hover > ul,
.has-sub:focus-within > ul,
.has-sub.open > ul { display: block; }

.site-nav .btn { margin-left: 6px; }

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .site-nav.open { display: block; }
  .site-nav > ul { flex-direction: column; align-items: stretch; padding: 10px 20px 20px; gap: 0; }
  .has-sub > ul { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 6px 14px; }
  .sub-toggle { pointer-events: none; color: var(--muted) !important; font-size: 0.85rem !important;
    text-transform: uppercase; letter-spacing: 0.05em; padding-bottom: 2px !important; }
  .sub-toggle::after { content: ""; }
  .site-nav .btn { margin: 10px 0 0; text-align: center; }
}

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

.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  font-weight: 700; text-decoration: none; line-height: 1.2;
  background: var(--red); color: #fff !important; border: 2px solid var(--red);
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-light { background: #fff; color: var(--red) !important; border-color: #fff; }
.btn-light:hover { background: var(--cream); border-color: var(--cream); }
.btn-outline { background: transparent; color: var(--red) !important; }
.btn-outline:hover { background: var(--red); color: #fff !important; }
.site-nav a.btn { padding: 8px 18px; background: var(--red); color: #fff; }
.site-nav a.btn:hover { background: var(--red-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero / page banners ---------- */

.hero,
.page-banner {
  position: relative; color: #fff;
  background: #3a2a22 url("../images/hero-books.jpg") center / cover no-repeat;
}
.hero::before,
.page-banner::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(20 12 8 / 0.55), rgb(20 12 8 / 0.7));
}
.hero > .wrap,
.page-banner > .wrap { position: relative; }
.hero { padding: clamp(72px, 12vw, 140px) 0; text-align: center; }
.hero p.lede { font-size: clamp(1.1rem, 2.4vw, 1.35rem); max-width: 40ch; margin: 0 auto 1.6em; }
.hero .btn-row { justify-content: center; }
.page-banner { padding: clamp(48px, 8vw, 88px) 0; }
.page-banner h1 { margin: 0; }
.page-banner p { margin: 0.4em 0 0; font-size: 1.15rem; max-width: 60ch; }

/* ---------- Sections ---------- */

.section { padding: clamp(48px, 7vw, 80px) 0; }
.section-alt { background: var(--cream); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 2.2em; }
.section-head p { color: var(--muted); }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--red); margin-bottom: 0.6em;
}

.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }

.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center;
}
.split + .split { margin-top: clamp(40px, 6vw, 72px); }
.split.reverse > :first-child { order: 2; }
.split img, .figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
}

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.card {
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--red);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.card p { color: var(--muted); flex: 1; }
.card a.more { font-weight: 700; text-decoration: none; }
.card a.more::after { content: " →"; }

.figure { margin: 2em 0; }
.figure figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.6em; }

.callout {
  background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--red);
  border-radius: var(--radius); padding: 20px 24px; margin: 1.5em 0; box-shadow: var(--shadow);
}
.callout h2, .callout h3 { margin-bottom: 0.3em; }
.callout p:last-child { margin-bottom: 0; }

.coming-soon {
  text-align: center; background: #fff; border: 2px dashed var(--red);
  border-radius: var(--radius); padding: clamp(28px, 5vw, 48px); margin: 0 auto; max-width: 720px;
}
.coming-soon .badge {
  display: inline-block; background: var(--red); color: #fff; font-weight: 700;
  font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 1em;
}

blockquote.pull {
  margin: 0 auto; max-width: 760px; text-align: center;
  font-size: clamp(1.25rem, 2.8vw, 1.6rem); font-weight: 600; line-height: 1.4;
}
blockquote.pull footer { font-size: 1rem; font-weight: 500; color: var(--muted); margin-top: 0.8em; }

table.impact { width: 100%; max-width: 520px; border-collapse: collapse; margin: 1em 0 1.5em; background: #fff; }
table.impact th, table.impact td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
table.impact th { background: var(--cream); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em; }
table.impact td:first-child { font-weight: 700; }

ul.checks { list-style: none; padding: 0; }
ul.checks li { padding-left: 1.8em; position: relative; margin-bottom: 0.5em; }
ul.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--red); font-weight: 800; }

/* FAQ accordion */
.faq { max-width: 800px; margin: 0 auto; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 12px; box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer; padding: 18px 22px; font-weight: 700; font-size: 1.08rem; list-style: none;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 22px 8px; color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer { background: #1f1f1c; color: #d8d6c8; padding: 48px 0 32px; font-size: 0.95rem; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-grid h2 { font-size: 1rem; color: #fff; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-bottom { border-top: 1px solid #3a3a35; margin-top: 32px; padding-top: 20px; font-size: 0.85rem; color: #a9a797; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
