:root {
    --paper: #f9eacd;
    --paper-light: #fff4df;
    --paper-shadow: #f4ddb4;

    --ink: #14284b;
    --ink-deep: #0c2439;
    --ink-muted: #4b5861;

    --sun-orange: #f1822f;
    --terracotta: #c5542c;
    --gold: #f5a852;
    --gold-soft: #f4ce91;

    --olive: #918f3d;
    --olive-deep: #5d5f2e;

    --border: rgba(20, 40, 75, 0.16);
    --border-strong: rgba(20, 40, 75, 0.30);
    --shadow: 0 18px 50px rgba(12, 36, 57, 0.10);

    --radius-sm: 3px;
    --radius-md: 6px;

    --content-width: 1380px;
    --text-width: 620px;

    --font-display: "Cormorant Garamond", Georgia, serif;
    --font-body: "Source Sans 3", system-ui, -apple-system, sans-serif;
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }

  body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background-color: var(--paper);
    /* Paper grain lifted from the hero illustration. A neutral grain tile is
       blended (soft-light) over each section's base colour so the page and the
       artwork read as one printed surface. */
    background-image: url("images/paper-grain-cream.png");
    background-repeat: repeat;
    background-size: 140px 140px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
  }

  a { color: inherit; text-decoration: none; }

  .container { max-width: var(--content-width); margin: 0 auto; padding: 0 2.5rem; }

  .eyebrow {
    font-family: var(--font-body); font-size: 0.9rem; font-weight: 700;
    letter-spacing: 0.18em; text-transform: uppercase; color: var(--terracotta);
  }

  /* ── Header ─────────────────────────────────────────────── */
  header {
    border-bottom: 1px solid var(--border);
    background: rgba(249,234,205,0.82); backdrop-filter: blur(6px);
    position: sticky; top: 0; z-index: 50;
  }
  .header-inner {
    display: flex; align-items: center; justify-content: space-between;
    max-width: var(--content-width); margin: 0 auto; padding: 1.1rem 2.5rem;
  }
  .brand { display: flex; align-items: center; gap: 14px; }
  .brand .mark { width: 44px; height: 44px; flex: none; }
  .brand .word { font-family: var(--font-display); color: var(--ink); line-height: 1; }
  .brand .word b { display: block; font-weight: 700; font-size: 1.42rem; letter-spacing: 0; }
  .brand .word span {
    display: block; font-family: var(--font-body); font-weight: 700; font-size: 0.6rem;
    letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-muted); margin-top: 2px;
  }
  nav.main { display: flex; align-items: center; gap: 36px; }
  nav.main a {
    font-family: var(--font-body); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.05em;
    color: var(--ink); text-transform: uppercase; padding: 6px 0;
    border-bottom: 2px solid transparent; transition: border-color .18s;
  }
  nav.main a:hover, nav.main a.active { border-color: var(--terracotta); }

  .button-primary, .button-accent {
    display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-body);
    font-weight: 700; font-size: 0.84rem; letter-spacing: 0.06em; text-transform: uppercase;
    white-space: nowrap; border-radius: var(--radius-sm); padding: 0.95rem 1.4rem; cursor: pointer;
    transition: background .18s, transform .12s;
  }
  .button-primary { background: var(--ink); color: var(--paper-light); border: 1px solid var(--ink); }
  .button-primary:hover { background: var(--ink-deep); }
  .button-accent { background: var(--gold); color: var(--ink); border: 1px solid rgba(20,40,75,0.12); }
  .button-accent:hover { background: var(--sun-orange); }
  .button-accent .arw, .more .arw { transition: transform .16s; }
  .button-accent:hover .arw { transform: translateX(3px); }

  /* ── Hero ───────────────────────────────────────────────── */
  /* ≥861px: text + cards in a centered left column, image absolute behind */
  .hero {
    position: relative;
    min-height: min(800px, 90vh);
    display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
    background-color: var(--paper);
    background-image: url("images/paper-grain-cream.png");
    background-repeat: repeat;
    background-size: 140px 140px;
    overflow: hidden;
    padding: 2rem 0;
  }
  .hero__content {
    width: min(100%, 660px);
    margin-left: max(2.5rem, calc((100vw - var(--content-width)) / 2));
    margin-right: 2.5rem;
    position: relative; z-index: 2;   /* text sits ABOVE the image */
  }
  .hero__title {
    font-family: var(--font-display); font-weight: 600;
    font-size: clamp(3rem, 5vw, 5.4rem); line-height: 0.96; letter-spacing: -0.025em;
    color: var(--ink); margin: 1.2rem 0 0;
  }
  .rule { width: 66px; height: 3px; background: var(--terracotta); margin: 1.8rem 0 1.8rem; border-radius: 2px; }
  .body-large { font-family: var(--font-body); font-size: clamp(1.06rem, 1.4vw, 1.28rem); line-height: 1.7; color: var(--ink-muted); max-width: 30rem; }
  .body-large.identity { color: var(--ink); font-weight: 500; margin: 0 0 1rem; }
  .body-large + .body-large { margin-top: 0.6rem; }

  .hero__art {
    position: absolute; top: 0; right: 0; bottom: 0; width: clamp(520px, 54vw, 1000px);
    overflow: hidden; z-index: 1;
    /* feather the lower-left / edges so the darker corner dissolves into the paper */
    -webkit-mask-image: radial-gradient(135% 130% at 84% 34%, #000 58%, rgba(0,0,0,0) 100%);
            mask-image: radial-gradient(135% 130% at 84% 34%, #000 58%, rgba(0,0,0,0) 100%);
  }
  .hero__art img { position: absolute; right: 0; bottom: 0; height: 110%; width: auto; max-width: none; }
  /* placeholder shown until the real image is added */
  .hero__art.is-placeholder::after {
    content: "hero illustration → images/mission-hero.png";
    position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
    font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--ink-muted); background:
      radial-gradient(120% 90% at 70% 40%, rgba(245,168,82,0.30), rgba(249,234,205,0) 60%),
      var(--paper-shadow);
  }

  /* feature cards — ≥861px: constrained to the left column, above the image */
  .cards {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.4rem;
    width: min(100%, 660px);
    margin-left: max(2.5rem, calc((100vw - var(--content-width)) / 2));
    margin-right: 2.5rem;
    position: relative; z-index: 2;
  }
  .card {
    background: rgba(255, 244, 223, 0.82); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 1.3rem 1.2rem 1.25rem; box-shadow: none; backdrop-filter: blur(2px);
    transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
    display: flex; flex-direction: column;
  }
  .card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: rgba(255,244,223,0.92); }
  .card .icon { color: var(--ink); margin-bottom: 0.75rem; }
  .card .icon svg { width: 30px; height: 30px; }
  .card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: 0; color: var(--ink); margin: 0 0 0.45rem; line-height: 1.08; }
  .card .cardrule { width: 28px; height: 2px; background: var(--terracotta); margin-bottom: 0.75rem; }
  .card p { font-size: 0.98rem; color: var(--ink-muted); margin: 0 0 1rem; flex: 1; line-height: 1.55; }
  .more { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--terracotta); display: inline-flex; align-items: center; gap: 7px; }
  .more:hover .arw { transform: translateX(3px); }

  /* scripture band */
  .scripture { background-color: var(--paper-light); background-image: url("images/paper-grain-ivory.png"); background-repeat: repeat; background-size: 140px 140px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .scripture .container { display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: center; padding-top: 3.4rem; padding-bottom: 3.4rem; }
  .scripture .qmark { font-family: var(--font-display); font-size: 4rem; color: var(--terracotta); line-height: 0.4; height: 26px; }
  .scripture blockquote { margin: 1rem 0 0.6rem; font-family: var(--font-display); font-style: italic; font-weight: 600; font-size: clamp(1.5rem, 2.4vw, 2.2rem); color: var(--ink); line-height: 1.4; max-width: 44rem; }
  .scripture cite { font-style: normal; font-family: var(--font-body); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-muted); }
  .scripture .values { border-left: 1px solid var(--border); padding-left: 2.2rem; display: flex; flex-direction: column; gap: 0.7rem; }
  .scripture .values span { font-weight: 700; font-size: 0.82rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink); }
  .scripture .values .sprig { color: var(--olive); margin-bottom: 4px; }

  /* ── Footer ─────────────────────────────────────────────── */
  footer { background: var(--ink-deep); color: #cdd6e6; }
  .foot-inner { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr; gap: 2.8rem; max-width: var(--content-width); margin: 0 auto; padding: 3.6rem 2.5rem 2rem; }
  footer .brand .word b { color: var(--paper-light); }
  footer .brand .word span { color: #93a2c0; }
  footer .idline { margin: 1.1rem 0 0; font-size: 0.98rem; color: #aab6ce; max-width: 23rem; line-height: 1.66; }
  footer h4 { font-family: var(--font-body); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin: 0.2rem 0 1rem; }
  footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
  footer ul a { font-size: 0.98rem; color: #c2cbe0; }
  footer ul a:hover { color: #fff; }
  footer .creds { font-size: 0.98rem; color: #aab6ce; line-height: 1.66; }
  footer .creds a { color: var(--gold-soft); }
  .foot-bar { border-top: 1px solid rgba(255,255,255,0.12); max-width: var(--content-width); margin: 0 auto; padding: 1.1rem 2.5rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; font-size: 0.78rem; color: #8090ac; }

  /* ── Responsive ─────────────────────────────────────────── */
  /* 641–860px: text on the left, image on the right of the SAME row; the 3
     cards drop to a full-width row beneath. Image sits at the far right. */
  @media (max-width: 860px) {
    .hero {
      display: grid; grid-template-columns: minmax(0, 1fr) auto;
      grid-template-areas: "text art" "cards cards";
      align-items: center; min-height: 0; padding: 2.5rem;
      column-gap: 1.25rem;
    }
    .hero__content { grid-area: text; width: auto; max-width: none; margin: 0; }
    .hero__art {
      grid-area: art; position: static; width: auto; overflow: visible;
      justify-self: end; align-self: center; margin-right: -2.5rem;
      -webkit-mask-image: none; mask-image: none;
    }
    .hero__art img { position: static; height: clamp(230px, 44vw, 380px); width: auto; max-width: none; }
    .cards { grid-area: cards; width: auto; max-width: none; margin: 2.25rem 0 0; }
    .hero__title { font-size: clamp(2rem, 5.5vw, 3.1rem); }
    .container { max-width: 760px; }
    nav.main { display: none; }
  }

  /* ≤640px: image on top, then text, then the 3 cards */
  @media (max-width: 640px) {
    .hero {
      display: flex; flex-direction: column; align-items: stretch;
      min-height: 0; padding: 1.25rem 1.4rem 2rem;
    }
    .hero__art {
      order: -1; position: static; width: auto; overflow: visible; margin: 0;
      display: block;
      -webkit-mask-image: none; mask-image: none;
    }
    /* image justified to the right, flush with the screen edge */
    .hero__art img { position: static; display: block; height: auto; width: min(100%, 430px); margin-left: auto; margin-right: -1.4rem; }
    .hero__content { order: 0; width: 100%; max-width: none; margin: 0; padding-top: 1.25rem; }
    .cards { order: 1; grid-template-columns: 1fr; width: 100%; max-width: none; margin: 1.75rem 0 0; }
    .hero__title { font-size: clamp(2rem, 8vw, 2.8rem); }
  }
  @media (max-width: 760px) {
    .scripture .container { grid-template-columns: 1fr; }
    .scripture .values { border-left: 0; border-top: 1px solid var(--border); padding-left: 0; padding-top: 1.4rem; flex-direction: row; flex-wrap: wrap; gap: 1.4rem; }
    .foot-inner { grid-template-columns: 1fr; }
  }
  @media (max-width: 520px) {
    .container, .header-inner, .foot-inner, .foot-bar { padding-left: 1.4rem; padding-right: 1.4rem; }
    .header-inner { padding-top: 0.85rem; padding-bottom: 0.85rem; }
    .brand .mark { width: 38px; height: 38px; }
    .brand .word b { font-size: 1.18rem; }
    .brand .word span { font-size: 0.55rem; letter-spacing: 0.24em; }
    .button-accent, .button-primary { padding: 0.75rem 1rem; font-size: 0.76rem; }
  }
