/* ==========================================================================
   Redbruk — Site stylesheet
   Palette and typography follow Redbruk_Design_System v1.2
   Brick #9E3B32 · Navy #2F4A6D · Gold #C9A45C · Cream #F4EFE6
   Ink #2B2B2B · Slate #666666
   Rule: Bible Steps / ESL line = Navy dominant + Gold accent.
         Brick Red is reserved for the Redbruk seal/signature only.
         Never Brick on Navy.
   ========================================================================== */

:root {
  --brick: #9E3B32;
  --navy: #2F4A6D;
  --navy-deep: #243954;
  --gold: #C9A45C;
  --gold-soft: #DDBE84;
  --cream: #F4EFE6;
  --cream-deep: #EBE3D5;
  --ink: #2B2B2B;
  --slate: #666666;
  --white: #FFFFFF;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;

  --measure: 68ch;
  --wrap: 1120px;
  --radius: 3px;
}

/* --- Reset ---------------------------------------------------------------- */

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

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

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

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

a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--brick); }

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.05rem); }
h3 { font-size: 1.1875rem; }
h4 { font-size: 1rem; }

p { margin: 0 0 1.1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.measure { max-width: var(--measure); }

/* --- Redbruk wordmark ----------------------------------------------------- */

.wordmark {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.wordmark .wm-red { color: var(--brick); }
.wordmark .wm-bruk { color: var(--navy); }

/* On navy backgrounds the kit inverts: Red -> Gold, bruk -> Cream */
.on-navy .wordmark .wm-red { color: var(--gold); }
.on-navy .wordmark .wm-bruk { color: var(--cream); }

/* --- Owl-shield seal ------------------------------------------------------ */

.seal { height: 34px; width: 30px; flex: 0 0 auto; color: var(--brick); }
.on-navy .seal { color: var(--cream); }

/* --- Header --------------------------------------------------------------- */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--cream-deep);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header::after {
  content: "";
  display: block;
  height: 3px;
  background: var(--gold);
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 0;
}

.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand .wordmark { font-size: 1.5rem; }

.nav-toggle {
  margin-left: auto;
  display: none;
  background: none;
  border: 1px solid var(--cream-deep);
  border-radius: var(--radius);
  padding: 0.45rem 0.7rem;
  font: 700 0.85rem/1 var(--sans);
  color: var(--navy);
  cursor: pointer;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
  padding: 0;
  margin-block: 0;
}
.nav-links a {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { border-bottom-color: var(--gold); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--gold); }

.nav-links .nav-cta {
  background: var(--navy);
  color: var(--cream);
  padding: 0.5rem 0.95rem;
  border-radius: var(--radius);
  border-bottom: none;
}
.nav-links .nav-cta:hover { background: var(--navy-deep); color: var(--white); border-bottom: none; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 0.75rem 0 1.1rem;
    margin-left: 0;
  }
  .nav-bar { flex-wrap: wrap; }
  .nav-links.is-open { display: flex; }
}

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

section { padding: 3.75rem 0; }
.sec-cream { background: var(--cream); }
.sec-navy { background: var(--navy); color: var(--cream); }
.sec-navy h1, .sec-navy h2, .sec-navy h3 { color: var(--white); }
/* Inline links only. Without :not(.btn) this rule outranks .btn-gold
   (0,1,1 vs 0,1,0) and repaints every button inside a dark section
   pale gold — gold text on a gold background. */
.sec-navy a:not(.btn),
.hero a:not(.btn) { color: var(--gold-soft); }

/* Gold is an ACCENT (rules, chips, small details) — never body or label text.
   Contrast is too low both on navy (~3.9:1) and on white (~2.3:1).
   Labels are Navy on light backgrounds and Cream on navy; the gold rule
   underneath carries the accent. */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 0 0 0.6rem;
}
.sec-navy .eyebrow,
.hero .eyebrow { color: var(--cream); }

.rule-gold {
  width: 56px;
  height: 3px;
  background: var(--gold);
  border: 0;
  margin: 0 0 1.5rem;
}

.lede { font-size: 1.15rem; color: var(--slate); }

/* The hero carries .hero, not .sec-navy — it must be listed explicitly or
   .lede falls back to Slate #666 on navy, which is close to unreadable. */
.sec-navy .lede,
.hero .lede { color: var(--cream); opacity: 0.92; }

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

.hero {
  background: var(--navy);
  color: var(--cream);
  padding: 4.75rem 0 4.25rem;
}
.hero h1 { color: var(--white); max-width: 16ch; }
.hero .lede { max-width: 54ch; font-size: 1.2rem; }
.hero-tag {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  font-weight: 700;
  margin: 0 0 1rem;
}

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

.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.75rem; }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.925rem;
  font-weight: 700;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
/* Doubled class (.btn.btn-gold) so button colours always outrank any
   section-level link rule, whatever background they sit on. */
.btn.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn.btn-gold:hover { background: var(--gold-soft); color: var(--navy-deep); }

.btn.btn-navy { background: var(--navy); color: var(--cream); }
.btn.btn-navy:hover { background: var(--navy-deep); color: var(--white); }

.btn.btn-ghost { border-color: var(--cream); color: var(--cream); background: transparent; }
.btn.btn-ghost:hover { background: rgba(244, 239, 230, 0.12); color: var(--white); }

.btn.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn.btn-outline:hover { background: var(--navy); color: var(--cream); }

/* --- Grids ---------------------------------------------------------------- */

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* --- Cards ---------------------------------------------------------------- */

.card {
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.card h3 { margin-bottom: 0.35rem; }
.card p:last-child { margin-bottom: 0; }
.card .card-meta {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.card-icon { width: 54px; height: 54px; color: var(--navy); margin-bottom: 1rem; }

/* Numbered step chip (mirrors the Gold section chip used in the worksheets) */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-deep);
  font: 700 0.95rem/1 var(--sans);
  margin-bottom: 0.85rem;
}

/* --- Book list ------------------------------------------------------------ */

.book-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.book-item {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
}
.book-item .card-icon { width: 44px; height: 44px; margin-bottom: 0; }
.book-item h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.book-item h3 a.book-link { color: inherit; text-decoration: none;
  border-bottom: 1px solid rgba(197,155,60,0.55); }
.book-item h3 a.book-link:hover,
.book-item h3 a.book-link:focus { color: var(--gold); border-bottom-color: var(--gold); }
.book-item p { margin: 0; font-size: 0.95rem; color: var(--slate); }

/* Real covers in the catalog list (jul/2026) --------------------------------
   The story icon is already printed on each cover, so the cover replaces the
   SVG icon rather than sitting next to it. */
.book-cover {
  width: 88px; flex: 0 0 88px; border-radius: 3px;
  border: 1px solid rgba(38, 64, 95, 0.18);
  box-shadow: 0 6px 16px rgba(38, 64, 95, 0.18);
}
@media (min-width: 760px) {
  .book-list { grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
}
@media (max-width: 420px) {
  .book-cover { width: 68px; flex: 0 0 68px; }
}

/* --- Level table ---------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--white);
}
th, td { padding: 0.75rem 0.9rem; text-align: left; border-bottom: 1px solid var(--cream-deep); }
thead th {
  background: var(--navy);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
tbody tr.is-current { background: var(--cream); }
tbody tr.is-current td:first-child { box-shadow: inset 4px 0 0 var(--gold); font-weight: 700; }

/* --- Callout -------------------------------------------------------------- */

.callout {
  background: var(--cream);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
}
.callout p:last-child { margin-bottom: 0; }

/* --- Form ----------------------------------------------------------------- */

.form-card {
  background: var(--white);
  border: 1px solid var(--cream-deep);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 1.9rem;
  max-width: 480px;
}
.field { margin-bottom: 1.1rem; }
.field label {
  display: block;
  font: 700 0.82rem/1.4 var(--sans);
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  padding: 0.7rem 0.8rem;
  border: 1px solid #CFC7B8;
  border-radius: var(--radius);
  background: var(--white);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
.form-note { font-size: 0.85rem; color: var(--slate); margin-top: 0.9rem; }

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

.site-footer {
  background: var(--navy-deep);
  color: var(--cream);
  padding: 3rem 0 2rem;
  font-size: 0.92rem;
}
.site-footer h4 {
  color: var(--cream);
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: var(--gold-soft); text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-brand .wordmark { font-size: 1.4rem; }
.footer-brand .brand { margin-bottom: 0.9rem; }
.footer-bottom {
  margin-top: 2.4rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(244, 239, 230, 0.2);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  color: rgba(244, 239, 230, 0.75);
  font-size: 0.85rem;
}

/* --- Utilities ------------------------------------------------------------ */

.stack-sm > * + * { margin-top: 0.4rem; }
.mt-2 { margin-top: 2rem; }
.center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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


/* --- Merged jul/2026: hero cover + worksheet preview ---------------------- */
.hero-2col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 2.5rem; align-items: center; }
.hero-art { justify-self: center; }
.cover-shot { width: min(310px, 82%); border-radius: 4px;
  box-shadow: 0 22px 55px rgba(15, 25, 40, 0.40); border: 1px solid rgba(255,255,255,0.08); }
.wksheet-shot { width: 100%; max-width: 360px; border: 1px solid var(--cream-deep);
  border-top: 3px solid var(--gold); border-radius: 4px;
  box-shadow: 0 14px 34px rgba(38,64,95,0.16); margin: 0 0 1.3rem; }
@media (max-width: 860px) { .hero-2col { grid-template-columns: 1fr; gap: 1.9rem; } }


/* --- Form confirmation state (jul/2026) ---------------------------------- */
.form-success { background: var(--white); border: 1px solid var(--cream-deep);
  border-top: 3px solid var(--gold); border-radius: var(--radius); padding: 1.9rem; max-width: 480px; }
.form-success h3 { margin-bottom: 0.35rem; }
.fs-check { width: 54px; height: 54px; border-radius: 50%; background: rgba(201,164,92,0.18);
  border: 2px solid var(--gold); color: var(--gold); display: grid; place-items: center;
  font: 700 1.5rem/1 var(--sans); margin-bottom: 0.9rem; }
