/* ==========================================================================
   THE WAY — stylesheet
   Organised: tokens → base → a11y → layout → components → responsive
   Visual identity is unchanged. Every edit below is a correctness fix.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   Colour tokens existed already. Added: spacing, type scale, borders, motion,
   so the magic numbers scattered through the old file have one home.
   -------------------------------------------------------------------------- */
:root{
  /* brand colour — unchanged */
  --forest:#173a31;
  --forest2:#244d42;
  --gold:#d3aa54;
  --cream:#f5f0e5;
  --mist:#edf2ef;
  --ink:#1c2622;
  --white:#fff;

  /* NEW: accessible text-weight gold.
     #8b6a24 measured 4.42 / 4.29 / 4.01 on cream / garden / parchment — all
     below the 4.5 AA threshold for text under 18.66px. #816221 measures
     4.99 / 4.85 / 4.53 / 5.67 and is visually indistinguishable. */
  --gold-ink:#816221;

  /* surfaces */
  --garden:#e9efe7;
  --parchment:#efe5cf;
  --footer-bg:#102a23;

  /* borders — form control borders raised to 3:1 for WCAG 1.4.11 */
  --line:#dfe7e2;
  --line-field:#84998f;
  --line-oncolor:rgba(255,255,255,.4);

  /* spacing scale */
  --sp-1:.5rem;  --sp-2:.75rem; --sp-3:1rem;   --sp-4:1.375rem;
  --sp-5:1.75rem; --sp-6:2.25rem; --sp-7:3rem; --sp-8:4rem; --sp-9:5.625rem;

  /* type scale */
  --display:Georgia,'Times New Roman',serif;
  --body:-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,Helvetica,sans-serif;
  --fs-eyebrow:.76rem;
  --fs-body:1rem;
  --fs-lead:1.2rem;

  /* structure */
  --max:1180px;
  --gutter:40px;
  --header-h:76px;
  --shadow:0 18px 48px rgba(16,35,29,.12);

  /* motion — one place to disable */
  --dur:.18s;
  --ease:cubic-bezier(.2,.6,.3,1);
}

/* --------------------------------------------------------------------------
   2. BASE
   -------------------------------------------------------------------------- */
*{box-sizing:border-box}

html{
  scroll-behavior:smooth;
  /* WCAG 2.4.11 Focus Not Obscured: the header is sticky, so anchor jumps and
     keyboard focus used to land underneath it. */
  scroll-padding-top:calc(var(--header-h) + var(--sp-3));
}

body{
  margin:0;
  font-family:var(--body);
  font-size:var(--fs-body);
  color:var(--ink);
  background:var(--white);
  line-height:1.65;
  -webkit-text-size-adjust:100%;
}

a{color:inherit}
img{max-width:100%;height:auto}

/* --------------------------------------------------------------------------
   3. ACCESSIBILITY PRIMITIVES
   The old stylesheet had no focus styling at all beyond .skip-link. Keyboard
   users had only the browser default, which is invisible on the forest and
   hero backgrounds. This is WCAG 2.4.7 / 2.4.13.
   -------------------------------------------------------------------------- */
:where(a,button,summary,input,select,textarea,[tabindex]):focus-visible{
  outline:3px solid var(--forest);
  outline-offset:3px;
  border-radius:2px;
}
/* on dark surfaces the forest ring disappears — swap to gold (5.72:1 on forest) */
.section--forest :where(a,button,summary):focus-visible,
.hero :where(a,button,summary):focus-visible,
.final-invitation :where(a,button,summary):focus-visible,
.page-hero :where(a,button,summary):focus-visible,
.site-footer :where(a,button,summary):focus-visible{
  outline-color:var(--gold);
}
/* keep the ring off mouse users without removing it from keyboard users */
:where(a,button,summary):focus:not(:focus-visible){outline:none}

.skip-link{position:absolute;left:-9999px}
.skip-link:focus{
  left:16px;top:16px;background:var(--white);color:var(--ink);
  padding:10px 14px;z-index:999;outline:3px solid var(--forest);outline-offset:2px;
}

.visually-hidden{
  position:absolute;width:1px;height:1px;margin:-1px;padding:0;
  overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;
}

/* WCAG 2.3.3 / vestibular safety. The old file animated hover transforms and
   forced smooth scrolling with no opt-out. */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
  .button:hover{transform:none}
}

/* --------------------------------------------------------------------------
   4. LAYOUT
   -------------------------------------------------------------------------- */
.shell{width:min(calc(100% - var(--gutter)),var(--max));margin-inline:auto}

.section{padding:var(--sp-9) 0}
.section--garden{background:var(--garden)}
.section--cream{background:var(--cream)}
.section--forest{background:var(--forest);color:var(--white)}
.section--parchment{background:var(--parchment)}
.section--mist{background:var(--mist)}

.section-heading,.split,.garden-feature{
  display:grid;grid-template-columns:1.1fr .9fr;gap:var(--sp-8);align-items:start;
}
.content-grid{display:grid;grid-template-columns:2fr 1fr;gap:var(--sp-7)}
.pathway{display:grid;grid-template-columns:.9fr 1.1fr;gap:var(--sp-8)}

/* --------------------------------------------------------------------------
   5. HEADER + NAVIGATION
   -------------------------------------------------------------------------- */
.site-header{
  position:sticky;top:0;z-index:50;
  background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(10px);
}
.site-header__inner{
  min-height:var(--header-h);
  display:flex;align-items:center;justify-content:space-between;gap:var(--sp-4);
}

.wordmark{text-decoration:none;letter-spacing:.08em;display:flex;gap:7px;align-items:baseline}
.wordmark span{font-size:.8rem}
.wordmark strong{font-family:var(--display);font-size:1.65rem;color:var(--forest)}

.desktop-nav{display:flex;align-items:center;gap:var(--sp-1);font-size:.92rem}
.desktop-nav a{
  text-decoration:none;font-weight:700;
  /* WCAG 2.2 §2.5.8 Target Size (Minimum) — bare inline links were ~15px tall.
     Padding brings every nav target to at least 24×24 CSS px. */
  display:inline-flex;align-items:center;min-height:44px;padding:0 10px;
  transition:color var(--dur) var(--ease);
}
/* was var(--gold) — 2.18:1 on the white header, a clear AA failure */
.desktop-nav a:hover{color:var(--gold-ink)}

/* NEW: current-page indication. No page previously marked its own nav entry,
   so 30 links across the site pointed at the page already open. */
.desktop-nav a[aria-current="page"]{
  color:var(--forest);box-shadow:inset 0 -3px 0 var(--gold);
}
.mobile-nav a[aria-current="page"]{color:var(--gold-ink);font-weight:800}

.mobile-nav{display:none}
.mobile-nav summary{
  list-style:none;cursor:pointer;font-weight:700;
  min-height:44px;display:inline-flex;align-items:center;padding:0 var(--sp-1);
}
/* Safari still paints a disclosure triangle without this */
.mobile-nav summary::-webkit-details-marker{display:none}
.mobile-nav summary::marker{content:''}
.mobile-nav nav{
  position:absolute;left:0;right:0;top:100%;   /* was a hardcoded 76px */
  background:var(--white);padding:var(--sp-4);
  box-shadow:var(--shadow);display:grid;gap:var(--sp-2);
  max-height:calc(100vh - var(--header-h));overflow-y:auto;
}
.mobile-nav nav a{
  text-decoration:none;min-height:44px;display:flex;align-items:center;
}

/* --------------------------------------------------------------------------
   6. TYPOGRAPHY
   -------------------------------------------------------------------------- */
.eyebrow{
  text-transform:uppercase;letter-spacing:.16em;font-weight:800;
  font-size:var(--fs-eyebrow);color:var(--gold-ink);
}
.eyebrow--light{color:#ecd799}

.hero h1,.page-hero h1{
  font-family:var(--display);font-weight:500;line-height:.95;margin:.12em 0;
  letter-spacing:.04em;
  /* clamp floor lowered from 4rem: "THE WAY" at 64px overflowed a 320px
     viewport once the .04em tracking was added. */
  font-size:clamp(3rem,13vw,9rem);
  overflow-wrap:break-word;
}
.page-hero h1{font-size:clamp(2.25rem,8vw,6rem)}
.section h2{font:500 clamp(2rem,5vw,4.2rem)/1.08 var(--display);margin:.2em 0}
.lead{font-size:var(--fs-lead)}
.prose{font-size:1.08rem}
.prose h2,.prose h3{font-family:var(--display)}
.scripture-note{font-weight:700;color:#77571e}
.status{
  display:inline-block;text-transform:uppercase;font-size:.7rem;
  letter-spacing:.12em;font-weight:900;color:#72531d;
}
.text-link{font-weight:800;color:var(--forest);text-decoration:none}
.text-link:hover{text-decoration:underline}
.section--forest .text-link,.hero .text-link{color:var(--white)}

/* --------------------------------------------------------------------------
   7. BUTTONS
   -------------------------------------------------------------------------- */
.button{
  display:inline-flex;align-items:center;justify-content:center;
  padding:14px 20px;min-height:44px;
  text-decoration:none;font-weight:800;border-radius:2px;
  border:1px solid transparent;cursor:pointer;font:inherit;font-weight:800;
  transition:transform var(--dur) var(--ease),background-color var(--dur) var(--ease);
}
.button--gold{background:var(--gold);color:#13251f}
.button--forest{background:var(--forest);color:var(--white)}
.button--ghost-light{border-color:rgba(255,255,255,.65);color:var(--white)}
.button--forest-outline{border-color:var(--forest);color:var(--forest)}
.button:hover{transform:translateY(-1px)}
.button--gold:hover{background:#c69c45}
.button--forest:hover{background:var(--forest2)}
.button--ghost-light:hover{background:rgba(255,255,255,.12)}
.button-row{display:flex;gap:14px;flex-wrap:wrap;margin-top:var(--sp-5)}

/* --------------------------------------------------------------------------
   8. HERO
   Images are still Unsplash URLs here; the accompanying plan covers moving
   them local. image-set() lets the browser take AVIF/WebP where supported.
   -------------------------------------------------------------------------- */
.hero{
  min-height:760px;color:var(--white);display:grid;align-items:end;
  position:relative;
  background:
    linear-gradient(90deg,rgba(10,34,28,.9),rgba(10,34,28,.33)),
    url('https://images.unsplash.com/photo-1472396961693-142e6e269027?auto=format&fit=crop&w=1800&q=85') center/cover;
}
.hero__content{padding:130px 0 var(--sp-9)}
.hero__declaration{font:500 clamp(1.45rem,3vw,2.35rem) var(--display);margin:.35rem 0}
.hero__summary{font-size:1.12rem;max-width:720px}
.hero__foot{
  display:flex;justify-content:space-between;gap:var(--sp-4);
  border-top:1px solid rgba(255,255,255,.35);
  margin-top:var(--sp-8);padding-top:var(--sp-4);font-weight:700;
}

.final-invitation{
  padding:100px 0;color:var(--white);
  background:
    linear-gradient(90deg,rgba(16,48,39,.95),rgba(16,48,39,.7)),
    url('https://images.unsplash.com/photo-1464226184884-fa280b87c399?auto=format&fit=crop&w=1800&q=85') center/cover;
}
.final-invitation__content{max-width:850px}

.page-hero{
  background:linear-gradient(120deg,var(--forest),#315e50);
  color:var(--white);padding:110px 0 var(--sp-8);
}

/* --------------------------------------------------------------------------
   9. COMPONENTS
   -------------------------------------------------------------------------- */
.garden-feature__status{
  display:flex;justify-content:space-between;flex-wrap:wrap;gap:var(--sp-2);
  border-bottom:1px solid #b9c9c1;padding-bottom:12px;margin-bottom:var(--sp-4);
}

.garden-feature__steps,.pathway__steps{
  list-style:none;padding:0;margin:0;display:grid;gap:18px;
}
.garden-feature__steps li,.pathway__steps li{
  display:grid;grid-template-columns:58px 1fr;gap:var(--sp-3);
  padding:var(--sp-4);background:rgba(255,255,255,.62);
}
.garden-feature__steps>li>span,.pathway__steps>li>span{
  font:700 1.4rem var(--display);color:#9b762d;
}
.garden-feature__steps h3,.pathway__steps h3{margin:0}

.red-letter{
  margin:0;background:var(--white);padding:var(--sp-6);
  box-shadow:var(--shadow);border-top:5px solid #9c2e2e;
}
.red-letter blockquote{font:500 1.8rem/1.35 var(--display);color:#8c2525;margin:25px 0}

.phase-grid,.framework-grid,.status-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:18px;
}
.phase-card{
  display:grid;grid-template-columns:48px 1fr;gap:15px;
  text-decoration:none;padding:25px;min-height:220px;
  border:1px solid var(--line-oncolor); /* was .22 alpha = 1.97:1, now 3.35:1 */
  transition:border-color var(--dur) var(--ease),background-color var(--dur) var(--ease);
}
.phase-card:hover{border-color:var(--gold);background:rgba(255,255,255,.05)}
.phase-card__number{font:500 1.7rem var(--display);color:var(--gold)}
.phase-card__content{display:grid;gap:10px}
.phase-card__content strong{font:500 1.5rem var(--display)}

.framework-grid article,.status-grid article{background:rgba(255,255,255,.72);padding:30px}
.framework-grid h3,.status-grid h3{font:500 1.5rem var(--display)}

.safety-callout{display:grid;grid-template-columns:90px 1fr;gap:30px;align-items:start}
.safety-callout__mark{
  width:72px;height:72px;border:3px solid var(--forest);border-radius:50%;position:relative;
}
.safety-callout__mark:before,.safety-callout__mark:after{content:'';position:absolute;background:var(--forest)}
.safety-callout__mark:before{width:3px;height:28px;left:32px;top:13px}
.safety-callout__mark:after{width:5px;height:5px;border-radius:50%;left:31px;bottom:14px}

.side-card{
  background:var(--mist);padding:var(--sp-5);
  position:sticky;top:calc(var(--header-h) + var(--sp-2));
}
.callout{
  padding:var(--sp-5);background:var(--cream);
  border-left:5px solid var(--gold);margin:var(--sp-5) 0;
}
.cards{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}
.card{padding:var(--sp-5);background:var(--white);border:1px solid #dfe6e2}

/* --------------------------------------------------------------------------
   10. FORMS
   -------------------------------------------------------------------------- */
.form{display:grid;gap:var(--sp-3);max-width:760px}
.form label{font-weight:700;display:grid;gap:6px}
.form input,.form textarea,.form select{
  width:100%;padding:13px;font:inherit;
  border:1px solid var(--line-field);   /* 1.78:1 → 3.03:1 (WCAG 1.4.11) */
  border-radius:2px;background:var(--white);color:var(--ink);
}
.form input:focus-visible,.form textarea:focus-visible,.form select:focus-visible{
  border-color:var(--forest);
}
.form textarea{min-height:160px;resize:vertical}
.form .required-note{font-weight:400;font-size:.85rem;color:#5a6b63}
.form .hp{position:absolute;left:-9999px} /* Netlify honeypot */

/* --------------------------------------------------------------------------
   11. FOOTER
   -------------------------------------------------------------------------- */
.site-footer{background:var(--footer-bg);color:var(--white);padding:65px 0 25px}
.site-footer__top{display:grid;grid-template-columns:1.2fr repeat(3,1fr);gap:35px}
.site-footer h2{font-size:1rem;text-transform:uppercase;letter-spacing:.1em}
.site-footer a{
  display:block;text-decoration:none;color:#d8e2dd;
  padding:6px 0;min-height:24px;      /* WCAG 2.2 §2.5.8 */
}
.site-footer a:hover{color:var(--white);text-decoration:underline}
.site-footer__bottom{
  display:flex;justify-content:space-between;gap:var(--sp-3);flex-wrap:wrap;
  border-top:1px solid rgba(255,255,255,.2);
  margin-top:var(--sp-7);padding-top:var(--sp-4);font-size:.85rem;
}

/* --------------------------------------------------------------------------
   12. RESPONSIVE
   The old file jumped 3 columns → 1 column at 900px with nothing between,
   so every tablet rendered six full-width stacked cards. A 2-column tier
   now covers 640–900px.
   -------------------------------------------------------------------------- */
@media (max-width:900px){
  .desktop-nav{display:none}
  .mobile-nav{display:block}
  .section-heading,.split,.garden-feature,.pathway,.content-grid{grid-template-columns:1fr}
  .phase-grid,.framework-grid,.status-grid{grid-template-columns:repeat(2,1fr)} /* was 1fr */
  .site-footer__top{grid-template-columns:1fr 1fr}
  .hero{min-height:690px}
  .hero__foot{display:block}
  .side-card{position:static}
}

@media (max-width:640px){
  .phase-grid,.framework-grid,.status-grid{grid-template-columns:1fr}
  .cards{grid-template-columns:1fr}
}

@media (max-width:560px){
  :root{--gutter:28px}
  .section{padding:var(--sp-8) 0}
  .hero__content{padding:95px 0 55px}
  .hero{min-height:0}
  .site-footer__top{grid-template-columns:1fr}
  .site-footer__bottom{display:block}
  .safety-callout{grid-template-columns:1fr}
  .button{width:100%}
  .garden-feature__steps li,.pathway__steps li{grid-template-columns:40px 1fr;padding:var(--sp-3)}
}

/* --------------------------------------------------------------------------
   13. FORCED COLORS + PRINT
   -------------------------------------------------------------------------- */
@media (forced-colors:active){
  .button,.phase-card,.card{border:1px solid ButtonBorder}
  :where(a,button,summary):focus-visible{outline:3px solid Highlight}
}

@media print{
  .site-header,.mobile-nav,.skip-link,.button-row,.final-invitation{display:none}
  .hero,.page-hero{background:none;color:#000;padding:0;min-height:0}
  body{color:#000}
  a[href^="http"]::after{content:" (" attr(href) ")";font-size:.85em}
}


/* Language selector */
.language-switcher{display:flex;align-items:center;margin-left:.35rem}
.language-switcher select{min-height:44px;max-width:145px;border:1px solid var(--line,#84998f);border-radius:999px;background:#fff;color:var(--forest,#173a31);font:inherit;font-weight:700;padding:.55rem 2rem .55rem .8rem;cursor:pointer}
.language-switcher select:focus-visible{outline:3px solid var(--gold,#c5a34e);outline-offset:3px}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
@media(max-width:1100px){.language-switcher{margin-left:auto}.language-switcher select{max-width:118px}.desktop-nav{gap:0}}
@media(max-width:900px){.language-switcher{order:2}.mobile-nav{order:3}}
@media(max-width:520px){.language-switcher select{max-width:108px;font-size:.82rem;padding-left:.65rem}}
