/* ==========================================================================
   Straight Up Truth Ministry — the entire design, in one file.

   BRAND COLORS come from Bernard's business card. I sampled them out of the
   print PDF rather than eyeballing them, so these are exact:
       navy  #0d3b61   (the "Bernard Bourque" line)
       teal  #00626f   ("Founder & Bible Teacher")
   FONTS also come from the card: Lora (the serif) and Poppins (the sans).

   Everything else here is derived from those two colors. Change --navy and
   --teal below and the whole site follows. Before you lighten either one,
   read the contrast note on --teal.
   ========================================================================== */

:root {
  /* --- Bernard's card, exactly --- */
  --navy:       #0d3b61;
  --teal:       #00626f;

  /* --- derived from those two --- */
  --navy-950:   #061e33;   /* deepest — dark section backgrounds */
  --navy-900:   #082944;
  --navy-800:   #12456f;
  --navy-tint:  #e8eef4;

  /* Teal is the accent: buttons, rules, small labels. These exact values
     clear WCAG AA (4.5:1) as small text — --teal on white measures 7.1:1.
     Lighten --teal and the eyebrow labels and button text start failing. */
  --teal-dark:  #004a55;   /* hover, and body links */
  --teal-lite:  #4fb3c0;   /* for text on dark navy, and decoration */
  --teal-tint:  #e2f0f2;

  --ink:        #0f2233;   /* headings */
  --body:       #3b4956;   /* paragraphs */
  --muted:      #5a6773;   /* captions, meta — do not lighten */

  --paper:      #ffffff;
  --shell:      #f4f7f8;   /* page background — a cool off-white, because a
                              warm parchment fights a navy/teal palette */
  --line:       #dce5e8;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans:  "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1140px;
  --narrow: 720px;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(6,30,51,.06), 0 10px 28px rgba(6,30,51,.07);
}

/* -------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--shell);
  color: var(--body);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-dark); text-underline-offset: 3px; }
a:hover { color: var(--navy); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.18;
  margin: 0 0 .5em;
  font-weight: 600;
  letter-spacing: -.005em;
}
h1 { font-size: clamp(2.05rem, 4.4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 2.9vw, 2.2rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: .95rem; }
p  { margin: 0 0 1.15em; }
ul, ol { margin: 0 0 1.15em; padding-left: 1.25em; }
li { margin-bottom: .45em; }

/* Poppins carries the functional furniture — nav, buttons, labels, eyebrows.
   Lora carries everything a human actually reads. That is exactly how
   Bernard's business card uses the two of them. */
.eyebrow, .btn, .nav a, .navToggle, .brand__tag, label, .card__num,
.tier__per, .res__size, .book__meta, .foot h4, .study__when, .post__meta,
.step__go, .factline dt, .verse__ref { font-family: var(--sans); }

/* ------------------------------------------------------------ layout -- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 22px; }
.narrow { max-width: var(--narrow); margin-inline: auto; }
/* .narrow centres its column; .measure keeps the same reading width but stays
   flush left, for pages that mix a wide block with a narrow one. Mixing the
   two on one page is what makes left edges wander. It constrains the
   CHILDREN, not itself -- a max-width on an element that also carries .wrap
   re-centres that element (see the .hero__inner note). */
.measure > * { max-width: var(--narrow); }
.center { text-align: center; }
.section { padding-block: clamp(56px, 8vw, 96px); }
.section--band { background: var(--navy-tint); }
.section--paper { background: var(--paper); }
.section--dark { background: var(--navy-950); color: #cfdce6; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark a { color: var(--teal-lite); }
.section--dark .eyebrow { color: var(--teal-lite); }
.section--dark .rule { background: var(--teal-lite); }

/* Two traps live here, and a contrast audit caught both. Do not delete.

   1. `.lede` sets its own dark grey. A colour set directly on the element
      always beats a colour INHERITED from the section, however specific the
      section rule is -- so the lede rendered near-black on near-black
      (1.8:1) until this line existed.
   2. `.section--dark a` (0,1,1) out-specifies `.btn--primary` (0,1,0), which
      turned white button labels pale teal on teal -- 2.9:1. Same bug that bit
      the header CTA. Any new button variant used inside a dark section has to
      be added to the list below. */
.section--dark .lede,
.section--dark .study__where { color: #cfdce6; }
.section--dark a.btn--primary,
.section--dark a.btn--navy,
.section--dark a.btn--onDark { color: #fff; }
.section--dark a.btn--ghost { color: #fff; border-color: rgba(255,255,255,.55); }

.eyebrow {
  font-size: .72rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--teal); margin: 0 0 .8em;
}
.rule { border: 0; width: 52px; height: 3px; background: var(--teal); margin: 0 0 1.1em; }
.lede { font-size: 1.13rem; line-height: 1.65; color: var(--body); }

.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
/* Bio variant: a portrait next to a long text column. 50/50 leaves a tall empty
   hole under the photo, and align-items:center floats the photo in the middle of
   it. Narrower photo column, both columns top-aligned.
   MUST stay a class, not an inline style -- the mobile rule near the bottom of
   this file collapses .split to one column, and an inline style would beat it. */
.split--bio { grid-template-columns: .82fr 1.18fr; align-items: start; }

/* ---------------------------------------------------------- masthead -- */
.masthead {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark {
  width: 42px; height: 42px; flex: none; border-radius: 3px;
  background: var(--navy); color: #fff;
  display: grid; place-items: center;
  font-family: var(--sans); font-weight: 600; font-size: .78rem; letter-spacing: .04em;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 1.12rem; color: var(--navy); }
.brand__tag { font-size: .64rem; letter-spacing: .13em; text-transform: uppercase; color: var(--teal); font-weight: 500; }

.nav { display: flex; align-items: center; gap: 1px; }
.nav a {
  text-decoration: none; color: var(--body);
  font-size: .84rem; font-weight: 500;
  padding: 9px 10px; border-radius: var(--radius);
}
.nav a:hover { color: var(--navy); background: var(--navy-tint); }
.nav a[aria-current="page"] { color: var(--navy); font-weight: 600; }

/* The `.nav a` rules above out-specify `.btn--primary` (0,1,1 beats 0,1,0),
   which silently turned the header CTA's white label into grey-on-teal.
   These put it back. Do not delete. */
.nav a.nav__cta { margin-left: 10px; color: #fff; background: var(--teal); }
.nav a.nav__cta:hover { color: #fff; background: var(--teal-dark); }

.navToggle {
  display: none; background: var(--paper); border: 1px solid var(--line);
  color: var(--navy); border-radius: var(--radius);
  padding: 9px 15px; font-size: .85rem; font-weight: 500; cursor: pointer;
}

@media (max-width: 980px) {
  .navToggle { display: block; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px 22px 18px; box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 13px 4px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a.nav__cta { margin: 14px 0 0; text-align: center; border-radius: var(--radius); border-bottom: 0; }
  .masthead__inner { position: relative; }
}

/* ------------------------------------------------------------ buttons -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 26px; border-radius: var(--radius);
  font-size: .89rem; font-weight: 600; letter-spacing: .01em;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn--sm { padding: 10px 18px; font-size: .81rem; }
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-dark); color: #fff; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-900); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: #fff; }
.btn--onDark { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn--onDark:hover { background: #fff; color: var(--navy); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
/* .center is text-align, and flex children don't care about text-align. Without
   this the buttons under a centred heading sat hard left. */
.center .btn-row { justify-content: center; }

/* --------------------------------------------------------------- hero -- */
.hero { position: relative; background: var(--navy-950); color: #cfdce6; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 460px at 82% -12%, rgba(0,98,111,.5), transparent 62%),
    linear-gradient(180deg, rgba(13,59,97,.4), rgba(6,30,51,0));
  pointer-events: none;
}
/* padding-BLOCK, not the padding shorthand: the shorthand would reset the
   horizontal gutter that .wrap sets, and the hero would run edge-to-edge on
   phones. That bug was invisible on desktop; a screenshot caught it. */
/* ALIGNMENT, and this one is easy to get wrong twice.

   `.wrap` and `.hero__inner` sit on the SAME element. A `max-width` here would
   shrink that element, and `.wrap`'s `margin-inline: auto` would then centre
   the shrunken box -- pushing the headline ~175px right of the card grid
   below it. Every page header on the site was doing that until a screenshot
   caught it.

   So the container keeps the full `.wrap` width, and the 790px measure is
   applied to the CHILDREN instead. Left edges line up down the whole page. */
.hero__inner { position: relative; z-index: 1; padding-block: clamp(64px, 10vw, 114px) clamp(54px, 8vw, 94px); }
.hero__inner > * { max-width: 790px; }
.hero h1 { color: #fff; }
.hero .eyebrow { color: var(--teal-lite); }
.hero .lede { color: #c6d5e0; max-width: 62ch; }
.hero__note { font-size: .92rem; color: #aabecf; margin-top: 26px; }
.hero__note a { color: var(--teal-lite); }

.pagehead { background: var(--navy-950); color: #cfdce6; }
/* Same trap as .hero__inner above -- see that comment before changing this. */
.pagehead__inner { padding-block: clamp(50px, 7vw, 82px); }
.pagehead__inner > * { max-width: 790px; }
.pagehead h1 { color: #fff; }
.pagehead .eyebrow { color: var(--teal-lite); }
.pagehead .lede { color: #c6d5e0; }
/* Same inherited-colour trap as .section--dark: a bare link inside the dark
   page header picks up the global teal-on-white link colour and lands at
   1.7:1. The "back to all books / all studies" links live here. */
.pagehead a { color: var(--teal-lite); }

/* --------------------------------------------------------------- card -- */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4em; }
.card p:last-child { margin-bottom: 0; }
.card__num {
  display: block; font-size: .73rem; font-weight: 600; letter-spacing: .14em;
  color: var(--teal); margin-bottom: 1em;
}
.section--band .card { box-shadow: none; }

/* "Take your next step" — the nav restated as verbs. Borrowed from
   Breakaway, the reference site closest in shape to a one-teacher ministry.
   It lets a shallow site feel navigable without a deep menu. */
.step {
  display: block; background: var(--paper); border: 1px solid var(--line);
  border-top: 3px solid var(--teal); border-radius: var(--radius);
  padding: 24px; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.step h3 { color: var(--navy); margin-bottom: .35em; font-size: 1.1rem; }
.step p { color: var(--body); font-size: .93rem; margin: 0; }
.step__go { font-size: .77rem; font-weight: 600; color: var(--teal); display: block; margin-top: 14px; }

/* -------------------------------------------------------------- books -- */
.book { display: flex; flex-direction: column; }
.book__cover {
  aspect-ratio: 2 / 3; width: 100%; border-radius: 3px; overflow: hidden;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-950) 62%, var(--teal-dark) 100%);
  color: #dbe7ef; display: grid; place-items: center; text-align: center;
  padding: 22px; font-family: var(--serif); font-size: .95rem; line-height: 1.35;
  margin-bottom: 18px;
}
.book__cover img { width: 100%; height: 100%; object-fit: cover; }
.book__meta { font-size: .73rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .7em; }
.book .btn-row { margin-top: auto; padding-top: 16px; }
.book h3 a { color: var(--ink); text-decoration: none; }
.book h3 a:hover { color: var(--teal-dark); }

/* Desiring God's book-page pattern: purchase and download are two visually
   separated blocks, and the button carries the retailer's name rather than
   a generic "Buy Now". */
.buyblock {
  background: var(--paper); border: 1px solid var(--line);
  border-left: 3px solid var(--teal); border-radius: var(--radius);
  padding: 22px 24px; margin-bottom: 18px;
}
.buyblock h3 { font-size: 1.05rem; margin-bottom: .5em; }
.buyblock > p { font-size: .92rem; color: var(--muted); margin-bottom: 1em; }
.buyblock .btn-row { margin-top: 0; }

/* ------------------------------------------------------------ studies -- */
.study {
  display: grid; grid-template-columns: 230px 1fr auto; gap: 26px; align-items: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.study__photo {
  width: 100%; aspect-ratio: 4 / 3; border-radius: 3px; object-fit: cover;
  background: linear-gradient(150deg, var(--navy) 0%, var(--teal-dark) 100%);
}
/* The placeholder state. An empty gradient box reads as a broken image; a
   labelled one reads as a slot waiting for a photo. Same treatment as
   .book__cover -- #dbe7ef clears 7.9:1 against the lightest gradient stop. */
.study__photo--empty {
  display: grid; place-items: center; text-align: center; padding: 22px;
  color: #dbe7ef; font-family: var(--serif); font-size: .95rem; line-height: 1.35;
}
.study h3 { margin-bottom: .25em; }
.study h3 a { color: var(--ink); text-decoration: none; }
.study h3 a:hover { color: var(--teal-dark); }
.study__when { font-size: .77rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin-bottom: .5em; font-weight: 600; }
.study__where { font-size: .95rem; color: var(--muted); margin-bottom: .3em; }

/* Breakaway's "visit" walkthrough — the highest-value page shape for a
   ministry whose main product is an in-person gathering, and it is entirely
   writable without any content library. */
.expect__item { border-top: 1px solid var(--line); padding: 22px 0; }
.expect__item h3 { color: var(--navy); font-size: 1.07rem; margin-bottom: .35em; }
.expect__item p { margin: 0; font-size: .97rem; }
.factline {
  display: flex; flex-wrap: wrap; gap: 18px 34px;
  background: var(--teal-tint); border-radius: var(--radius);
  padding: 20px 24px; margin: 0 0 28px;
}
.factline > div { min-width: 148px; }
.factline dt { font-size: .67rem; letter-spacing: .13em; text-transform: uppercase; color: var(--teal-dark); font-weight: 600; }
.factline dd { margin: 3px 0 0; font-size: 1rem; color: var(--ink); }

/* ---------------------------------------------------------- blog/res -- */
.post { border-top: 1px solid var(--line); padding: 26px 0; }
.post:first-child { border-top: 0; padding-top: 0; }
.post h3 { font-size: 1.35rem; margin-bottom: .3em; }
.post h3 a { color: var(--ink); text-decoration: none; }
.post h3 a:hover { color: var(--teal-dark); }
.post__meta { font-size: .73rem; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); margin-bottom: .5em; }

.res { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.res h3 { color: var(--navy); }
.res ul { list-style: none; padding: 0; margin: 16px 0 0; }
.res li { border-top: 1px solid var(--line); padding: 13px 0; margin: 0; display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.res__size { font-size: .69rem; letter-spacing: .08em; color: var(--muted); white-space: nowrap; }

/* ------------------------------------------------------------- forms -- */
.form { margin-top: 4px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .79rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font-family: var(--sans); font-size: .94rem;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal);
}
.field__hint { font-size: .8rem; color: var(--muted); font-weight: 400; }
.form-note { background: var(--teal-tint); border-radius: var(--radius); padding: 16px 18px; font-size: .9rem; }

/* ------------------------------------------------------------- tiers -- */
.tier { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 26px; text-align: center; }
.tier--featured { border: 2px solid var(--teal); position: relative; }
.tier--featured::before {
  content: "Most partners choose this"; position: absolute; top: -11px; left: 50%;
  transform: translateX(-50%); background: var(--teal); color: #fff;
  font-family: var(--sans); font-size: .61rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.tier__amt { display: block; font-family: var(--serif); font-size: 2.4rem; font-weight: 600; color: var(--navy); line-height: 1; }
.tier__per { display: block; font-size: .71rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 6px 0 14px; }
.tier p { font-size: .93rem; }

.callout { background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: var(--radius); padding: 26px 28px; }
.callout h3 { color: var(--navy); }
.callout p:last-child { margin-bottom: 0; }

.verse { font-family: var(--serif); font-style: italic; font-size: 1.3rem; line-height: 1.55; color: #dfe9f1; }
.verse__ref { display: block; font-style: normal; font-size: .71rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-lite); margin-top: 1em; }

/* Placeholder callout. Every one of these is addressed to Barry and must be
   deleted before launch. Search the HTML for "editme" to find them all. */
.editme {
  background: #fff8e6; border: 1px dashed #a8760f; color: #63440a;
  border-radius: var(--radius); padding: 16px 18px; margin: 18px 0;
  font-size: .9rem; line-height: 1.6;
}
.editme strong { color: #63440a; }
.editme code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 3px; font-size: .92em; }

/* ------------------------------------------------------------ footer -- */
.foot { background: var(--navy-950); color: #aabecf; padding-block: 56px 26px; font-size: .93rem; }
.foot h4 { color: #fff; font-size: .71rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.1em; }
.foot a { color: #cfdce6; text-decoration: none; }
.foot a:hover { color: var(--teal-lite); text-decoration: underline; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: .6em; }
.foot__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
.foot__bottom {
  border-top: 1px solid rgba(255,255,255,.13); margin-top: 40px; padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: space-between;
  font-size: .8rem; color: #94aabd;
}

/* --------------------------------------------------------- a11y/misc -- */
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff;
  padding: 12px 20px; z-index: 200; text-decoration: none;
}
.skip:focus { left: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

@media (max-width: 980px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: repeat(2, 1fr); }
  .study { grid-template-columns: 180px 1fr; }
  .study .btn-row { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .foot__grid { grid-template-columns: 1fr; gap: 28px; }
  .study { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
