/* NAMS Network — site styles (built on tokens.css) */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-fg-1);
  font-family: var(--font-body);
  font-size: var(--fs-16);
  line-height: var(--lh-relaxed);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Context-aware content: pages arrived at with ?from=church show .ctx-church
   blocks and hide .ctx-individual. Default (home / direct) shows individual. */
.ctx-church { display: none; }
[data-ctx="church"] .ctx-church { display: block; }
[data-ctx="church"] .ctx-individual { display: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: 72px;
  background: var(--nams-paper);
  border-bottom: 1px solid var(--color-border);
}
.site-header .wrap {
  height: 100%;
  display: flex; align-items: center; gap: 32px;
}
.site-header .logo img { height: 40px; width: auto; }
.site-nav { display: flex; gap: 26px; flex: 1; }
.site-nav a {
  font-weight: var(--fw-medium); font-size: var(--fs-14);
  color: var(--color-fg-2); white-space: nowrap;
  padding: 4px 0; border-bottom: 2px solid transparent;
  transition: color var(--dur-base) var(--ease-out);
}
.site-nav a:hover { color: var(--color-accent); }
.site-nav a.active { color: var(--color-fg-1); border-bottom-color: var(--color-accent); }

/* Hamburger (mobile only) — hidden on desktop */
.nav-toggle {
  display: none; appearance: none; padding: 0; cursor: pointer;
  width: 40px; height: 40px; align-items: center; justify-content: center;
  background: transparent; color: var(--color-fg-1);
  border: 1px solid var(--color-border); border-radius: 8px;
}
.nav-toggle:hover { border-color: var(--color-accent); color: var(--color-accent); }
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: var(--fw-semibold);
  font-size: var(--fs-14); line-height: 1;
  padding: 12px 22px; border-radius: var(--r-2);
  border: 1px solid transparent; cursor: pointer;
  transition: background var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.btn-lg { padding: 16px 28px; font-size: var(--fs-16); }
.btn-primary { background: var(--color-accent); color: var(--color-on-accent); }
.btn-primary:hover { background: var(--color-accent-hover); }
.btn-primary:active { background: var(--color-accent-press); }
.btn-secondary {
  background: transparent; color: var(--color-fg-1);
  border-color: var(--color-border-strong);
}
.btn-secondary:hover { border-color: var(--color-accent); color: var(--color-accent); }
.btn-inverse { background: var(--nams-snow); color: var(--nams-maroon); }
.btn-inverse:hover { background: var(--nams-parchment); }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: var(--fs-12); letter-spacing: var(--tr-widest);
  text-transform: uppercase; color: var(--color-accent);
}
.eyebrow.on-dark { color: var(--nams-maroon-soft); }
.muted { color: var(--color-fg-3); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 104px 0 88px;
  border-bottom: 1px solid var(--color-border);
}
.hero .watermark {
  position: absolute; right: -80px; top: -20px;
  height: 520px; width: 520px; opacity: 0.04; pointer-events: none;
}
.hero h1 {
  margin: 20px 0 0;
  font-family: var(--font-display); font-weight: var(--fw-black);
  font-size: clamp(44px, 7vw, 80px); line-height: 1.02;
  letter-spacing: -0.025em; max-width: 920px;
}
.hero .lede {
  margin: 28px 0 0; max-width: 640px;
  font-size: var(--fs-20); line-height: var(--lh-relaxed); color: var(--color-fg-2);
}
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section.tight { padding: 64px 0; }
.section.parchment { background: var(--nams-parchment); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.section.dark { background: var(--nams-ink); color: var(--nams-snow); }
.section.dark h2, .section.dark h3 { color: var(--nams-snow); }
.section.dark .card h3 { color: var(--color-fg); }
.section h2 {
  margin: 16px 0 0;
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: clamp(30px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.02em;
}
.section .section-lede { margin: 18px 0 0; max-width: 640px; font-size: var(--fs-18); color: var(--color-fg-2); }
.section.dark .section-lede { color: var(--nams-fog); }

/* ---------- Cards ---------- */
.card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--r-2);
  box-shadow: var(--sh-1);
  padding: var(--sp-6);
}
.card.snow { background: var(--nams-snow); }
.card.heraldic {
  background: var(--nams-snow);
  border-top: 3px solid var(--color-accent);
  box-shadow: none;
}
.card h3 {
  margin: 0;
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: var(--fs-20); line-height: var(--lh-snug);
}
.card p { margin: 10px 0 0; font-size: var(--fs-14); line-height: var(--lh-relaxed); color: var(--color-fg-2); }
.card .meta {
  margin-top: 16px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: var(--tr-wider); text-transform: uppercase; color: var(--color-fg-3);
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 40px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 40px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 40px; }

/* ---------- People ---------- */
.person .avatar {
  width: 72px; height: 72px; border-radius: var(--r-2);
  background: var(--nams-maroon-wash); color: var(--nams-maroon);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: var(--fw-bold); font-size: var(--fs-20);
  box-shadow: var(--sh-inset);
}
.person .name { margin: 14px 0 0; font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: var(--fs-16); }
.person .role {
  margin: 4px 0 0;
  font-size: var(--fs-12); font-weight: var(--fw-semibold);
  letter-spacing: var(--tr-wider); text-transform: uppercase; color: var(--color-fg-3);
}

/* ---------- Stat band ---------- */
.stat { border-left: 3px solid var(--color-accent); padding-left: 20px; }
.stat .num { font-family: var(--font-display); font-weight: var(--fw-black); font-size: var(--fs-48); line-height: 1; }
.stat .label { margin-top: 8px; font-size: var(--fs-14); color: var(--color-fg-3); }
.section.dark .stat .label { color: var(--nams-fog); }

/* ---------- Long-form (The Rule) ---------- */
.longform { max-width: 760px; margin: 0 auto; padding: 80px 24px 48px; }
.longform .mark { display: flex; justify-content: center; margin-bottom: 28px; }
.longform .mark img { height: 64px; width: 64px; }
.longform h1 {
  margin: 16px 0 0;
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: clamp(38px, 6vw, 56px); letter-spacing: -0.025em; line-height: 1;
}
.longform .lede { margin: 24px 0 0; font-size: var(--fs-18); line-height: 1.65; color: var(--color-fg-2); }
.clause {
  display: grid; grid-template-columns: 72px 1fr; gap: 24px;
  padding-bottom: 28px; margin-top: 28px;
  border-bottom: 1px solid var(--color-border);
}
.clause .num {
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: var(--fs-30); color: var(--color-accent); letter-spacing: var(--tr-wide);
}
.clause h3 { margin: 0; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 22px; letter-spacing: -0.01em; }
.clause p { margin: 8px 0 0; font-size: var(--fs-16); line-height: 1.65; color: var(--color-fg-2); }

/* ---------- Notices ---------- */
.notice {
  margin-top: 56px; padding: 28px;
  background: var(--nams-parchment);
  border-radius: var(--r-2); border-top: 3px solid var(--color-accent);
}
.notice p { margin: 12px 0 0; font-size: var(--fs-14); color: var(--color-fg-2); line-height: 1.6; }

/* ---------- Forms ---------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.field-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.field-row input {
  flex: 1 1 240px; padding: 14px 16px;
  font-family: var(--font-body); font-size: var(--fs-16); color: var(--color-fg);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--r-2); transition: border-color .15s ease;
}
.field-row input::placeholder { color: var(--color-fg-3); }
.field-row input:focus { outline: none; border-color: var(--color-accent); }

/* ---------- Verse / quote band ---------- */
.verse {
  font-family: var(--font-display); font-weight: var(--fw-medium); font-style: italic;
  font-size: clamp(22px, 3vw, 30px); line-height: var(--lh-snug); letter-spacing: var(--tr-tight);
  max-width: 820px;
}
.verse-ref {
  margin-top: 16px; font-family: var(--font-mono); font-size: var(--fs-12);
  letter-spacing: var(--tr-wider); text-transform: uppercase; color: var(--color-fg-3);
}
.section.dark .verse-ref { color: var(--nams-fog); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--nams-parchment);
  padding: 56px 0 48px; margin-top: 96px;
}
.site-footer .knot-divider { margin-bottom: 56px; }
.site-footer .cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 48px; }
.site-footer .logo img { height: 40px; width: auto; }
.site-footer .about { margin-top: 18px; max-width: 320px; font-size: 13px; line-height: 1.6; color: var(--color-fg-3); }
.site-footer ul { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer li a { font-size: 13px; color: var(--color-fg-2); }
.site-footer li a:hover { color: var(--color-accent); }
.site-footer .legal {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--color-border);
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 11px; color: var(--color-fg-3);
}

/* ---------- Entity sub-themes ----------
   Each entity keeps the NAMS structure (paper, hairlines, squared corners)
   but owns one deep, desaturated accent. The parent network owns the maroon. */
.theme-2820 {
  --color-accent: #985c20;        /* heritage bronze — formation, study */
  --color-accent-hover: #ce844b;
  --color-accent-press: #983620;
  --color-accent-bg: #f8ede4;
}
.theme-gap {
  --color-accent: #2f4a6a;        /* pilgrim blue — journey, sending */
  --color-accent-hover: #3d5d83;
  --color-accent-press: #243a54;
  --color-accent-bg: #eaeef3;
}
.theme-order {
  --color-accent: #4a0000;        /* deep oxblood — the heraldic core */
  --color-accent-hover: #680000;
  --color-accent-press: #320000;
  --color-accent-bg: #f7eaea;
}

/* Entity cards on the home page */
.entity-card {
  background: var(--nams-snow);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-accent);
  border-radius: var(--r-2);
  padding: var(--sp-8) var(--sp-6) var(--sp-6);
  display: flex; flex-direction: column;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.entity-card:hover { box-shadow: var(--sh-2); }
.entity-card .entity-name {
  margin: 14px 0 0;
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: var(--fs-24); letter-spacing: -0.01em; line-height: var(--lh-snug);
}
.entity-card p { margin: 12px 0 0; font-size: var(--fs-14); line-height: var(--lh-relaxed); color: var(--color-fg-2); flex: 1; }
.entity-card .entity-link {
  margin-top: 24px;
  font-weight: var(--fw-semibold); font-size: var(--fs-14);
  color: var(--color-accent);
}
.entity-card .entity-link:hover { color: var(--color-accent-hover); }

/* ---------- Dot world map ---------- */
.map-band { padding: 88px 0; border-top: 1px solid var(--color-border); }
.map-figure { margin: 48px 0 0; position: relative; }
.map-figure svg { width: 100%; height: auto; display: block; }
.map-dot { fill: var(--nams-fog); opacity: 0.55; }
.map-marker { fill: currentColor; }
.map-marker.map-marker-ring-shape { fill: none; stroke: currentColor; stroke-width: 4; }
.map-marker-ring {
  fill: none; stroke: currentColor; stroke-width: 1.5;
  transform-origin: center; transform-box: fill-box;
  animation: marker-pulse 2.6s var(--ease-out) infinite;
}
/* Marker colors by entity */
.m-order { color: var(--map-order, #680000); }
.m-2820  { color: var(--map-2820, #985c20); }
.m-gap   { color: var(--map-gap, #2f4a6a); }
.m-gap-app  { color: var(--map-gap-app, #1f6f5c); }   /* GAP current apprentices */
.m-gap-grad { color: var(--map-gap-grad, #6d5a8e); }  /* GAP graduates */
.m-order-base { color: var(--map-order-base, #b8860b); }  /* Order base communities */
@keyframes marker-pulse {
  0%   { transform: scale(0.4); opacity: 0.9; }
  70%  { transform: scale(2.4); opacity: 0; }
  100% { transform: scale(2.4); opacity: 0; }
}
.map-legend {
  margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px 22px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: var(--tr-wider); text-transform: uppercase; color: var(--color-fg-3);
}
.map-legend span::before {
  content: ""; display: inline-block; width: 7px; height: 7px;
  border-radius: 999px; background: currentColor; margin-right: 8px;
}
.map-legend span { color: var(--color-fg-3); }
.map-legend span.m-order::before { background: var(--map-order, #680000); }
.map-legend span.m-2820::before  { background: var(--map-2820, #985c20); }
.map-legend span.m-gap::before   { background: var(--map-gap, #2f4a6a); }
.map-legend span.m-gap-app::before  { background: var(--map-gap-app, #1f6f5c); }
.map-legend span.m-gap-grad::before { background: var(--map-gap-grad, #6d5a8e); }
.map-legend span.m-order-base::before { background: var(--map-order-base, #b8860b); }
.map-key { margin-top: 16px; display: flex; gap: 22px; font-family: var(--font-body); font-size: 12px; font-weight: var(--fw-semibold); color: var(--color-fg-2); }
.map-key span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 999px; margin-right: 8px; }
.map-key .m-order::before { background: var(--map-order, #680000); }
.map-key .m-2820::before  { background: var(--map-2820, #985c20); }
.map-key .m-gap::before   { background: var(--map-gap, #2f4a6a); }
.map-key .m-order-base::before { background: var(--map-order-base, #b8860b); }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--color-border-strong);
  border-radius: var(--r-2); cursor: pointer; color: var(--color-fg-2);
  transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.theme-toggle:hover { border-color: var(--color-accent); color: var(--color-accent); }
.theme-toggle svg { width: 17px; height: 17px; }

/* ---------- Language switch ---------- */
.lang-switch {
  display: inline-flex; align-items: center;
  font-weight: var(--fw-medium); font-size: var(--fs-14);
  color: var(--color-fg-2); white-space: nowrap;
  padding: 8px 12px; border: 1px solid var(--color-border-strong);
  border-radius: var(--r-2);
  transition: border-color var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.lang-switch:hover { border-color: var(--color-accent); color: var(--color-accent); }
@media (max-width: 480px) {
  .lang-switch { padding: 8px 9px; font-size: 13px; }
}

/* ---------- Dark theme ----------
   Same warm, sober register — paper becomes near-black warm ink,
   parchment becomes a dark surface, accents brighten for contrast. */
html[data-theme="dark"] {
  --nams-paper: #12100e;
  --nams-parchment: #1a1714;

  --color-bg: #12100e;
  --color-bg-elev: #1e1b18;
  --color-surface: #1e1b18;
  --color-surface-2: #1a1714;

  --color-fg: #f1ece2;
  --color-fg-1: #f1ece2;
  --color-fg-2: #cfc8bb;
  --color-fg-3: #9a948a;
  --color-fg-mute: #757067;

  --color-border: #2c2823;
  --color-border-strong: #443f38;
  --color-divider: #262220;

  --color-accent: #c25b5b;
  --color-accent-hover: #d47272;
  --color-accent-press: #8b1414;
  --color-accent-bg: #281414;

  --map-order: #d05858;
  --map-2820: #ce844b;
  --map-gap: #7fa3cc;

  --sh-1: 0 1px 0 rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.35);
  --sh-2: 0 1px 2px rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.4);
  --sh-3: 0 2px 4px rgba(0,0,0,0.45), 0 10px 30px rgba(0,0,0,0.5);
}
html[data-theme="dark"] .btn-primary { background: #8b1414; }
html[data-theme="dark"] .btn-primary:hover { background: #a52525; }
html[data-theme="dark"] .card.snow,
html[data-theme="dark"] .entity-card,
html[data-theme="dark"] .card.heraldic { background: var(--color-surface); }
html[data-theme="dark"] .section.dark { background: #1e1b18; border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
html[data-theme="dark"] .btn-inverse { background: var(--color-fg-1); color: #12100e; }
html[data-theme="dark"] .btn-inverse:hover { background: var(--color-fg-2); }
html[data-theme="dark"] .person .avatar { background: #281414; color: #d47272; }
html[data-theme="dark"] .map-dot { fill: #54504a; }
html[data-theme="dark"] .hero .watermark { opacity: 0.07; filter: invert(1); }
html[data-theme="dark"] .eyebrow.on-dark { color: #d47272; }
html[data-theme="dark"] .t-code { background: var(--color-surface); }

/* Entity accents, brightened for dark ground */
html[data-theme="dark"] .theme-2820 {
  --color-accent: #ce844b; --color-accent-hover: #d99f73;
  --color-accent-press: #985c20; --color-accent-bg: #24170a;
}
html[data-theme="dark"] .theme-2820 .btn-primary { background: #985c20; }
html[data-theme="dark"] .theme-2820 .btn-primary:hover { background: #ce844b; }
html[data-theme="dark"] .theme-gap {
  --color-accent: #7fa3cc; --color-accent-hover: #98b6d9;
  --color-accent-press: #5f86b0; --color-accent-bg: #141b23;
}
html[data-theme="dark"] .theme-gap .btn-primary { background: #2f4a6a; }
html[data-theme="dark"] .theme-gap .btn-primary:hover { background: #3d5d83; }
html[data-theme="dark"] .theme-order {
  --color-accent: #d05858; --color-accent-hover: #dd7474;
  --color-accent-press: #a84444; --color-accent-bg: #281414;
}
html[data-theme="dark"] .theme-order .btn-primary { background: #680000; }
html[data-theme="dark"] .theme-order .btn-primary:hover { background: #8b1414; }

/* ---------- Photography ----------
   .photo is the frame; drop an <img class="ph-img" src="..."> inside and
   delete the .ph-empty block to replace a placeholder with a real photo. */
.photo {
  position: relative; overflow: hidden;
  border-radius: var(--r-2);
  background: var(--color-surface-2);
  box-shadow: var(--sh-inset);
}
.photo::before { content: ""; display: block; }
.photo.r43::before { padding-top: 75%; }     /* 4:3 */
.photo.r32::before { padding-top: 66.67%; }  /* 3:2 */
.photo.r21::before { padding-top: 42%; }     /* wide band */
.photo .ph-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo .ph-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  border: 1px dashed var(--color-border-strong); border-radius: var(--r-2);
}
.photo .ph-empty img { height: 44px; width: 44px; opacity: 0.08; }
html[data-theme="dark"] .photo .ph-empty img { filter: invert(1); opacity: 0.12; }
.photo .ph-empty span {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: var(--tr-wider); text-transform: uppercase;
  color: var(--color-fg-mute); text-align: center; padding: 0 20px;
}
figure.photo-fig { margin: 0; }
figure.photo-fig figcaption {
  margin-top: 10px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: var(--tr-wider); text-transform: uppercase;
  color: var(--color-fg-3);
}

/* Hero with photo column */
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* Story cards (home strip) */
.story-card .photo { margin-bottom: 16px; }
.story-card .story-title {
  margin-top: 6px;
  font-family: var(--font-display); font-weight: var(--fw-semibold);
  font-size: var(--fs-16); line-height: var(--lh-snug);
}

/* ---------- Knot motif ---------- */
.knot-divider {
  display: flex; align-items: center; gap: 20px;
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
}
.knot-divider::before, .knot-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--color-border);
}
.knot-divider img { height: 20px; width: 20px; opacity: 0.9; }
html[data-theme="dark"] .knot-divider img { filter: brightness(2.4); }

/* Faint line-art knot watermark on every dark band */
.section.dark { position: relative; overflow: hidden; }
.section.dark::after {
  content: ""; position: absolute; right: -70px; top: 50%;
  width: 380px; height: 380px; transform: translateY(-50%);
  background: url("../assets/nams-knot-outline.png") center / contain no-repeat;
  opacity: 0.1; pointer-events: none;
}
.section.dark .wrap { position: relative; z-index: 1; }

/* Warm bokeh band (2820 heritage look) */
.section.bokeh-band {
  background: linear-gradient(rgba(30, 22, 14, 0.55), rgba(30, 22, 14, 0.62)),
              url("../assets/bokeh-warm.jpg") center / cover no-repeat;
}

/* Knot overlay centered on a photo (poster treatment) */
.photo .knot-overlay {
  position: absolute; inset: 0; margin: auto;
  width: 58%; height: auto; opacity: 0.9; pointer-events: none;
}

/* Chain-link edge pattern — 2820 hero heritage borders */
.theme-2820 .hero { position: relative; }
.theme-2820 .hero .watermark { display: none; }
.theme-2820 .hero::before, .theme-2820 .hero::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 110px;
  background: url("../assets/knot-line-ink.png") center top / 96px auto repeat-y;
  opacity: 0.07; pointer-events: none;
}
.theme-2820 .hero::before { left: -24px; }
.theme-2820 .hero::after { right: -24px; }
html[data-theme="dark"] .theme-2820 .hero::before,
html[data-theme="dark"] .theme-2820 .hero::after {
  background-image: url("../assets/knot-line-white.png");
}

/* 2820 Institute logo lockup — sits in-flow above the eyebrow in the hero's
   copy column. NAMS wordmark stays in the site header; this marks the page as
   Institute content. (A previous version floated it absolute top-right and it
   got lost in the empty space on single-column heroes — in-flow + left-aligned
   keeps it anchored to the text readers actually look at.) */
.institute-badge {
  display: block; height: 52px; width: auto; margin: 0 0 20px;
}

/* The three ONEs (photo-card band) */
.ones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; }
.one-card {
  position: relative; overflow: hidden; border-radius: var(--r-2);
  min-height: 300px; padding: 32px 28px;
  display: flex; flex-direction: column; justify-content: flex-end;
  background-size: cover; background-position: center;
}
.one-card::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 8, 6, 0.28) 0%, rgba(10, 8, 6, 0.55) 55%, rgba(10, 8, 6, 0.86) 100%);
}
.one-card > * { position: relative; z-index: 1; }
.one-card.gospel  { background-image: url("../assets/one-gospel-bg.jpg"); }
.one-card.church  { background-image: url("../assets/one-church-bg.jpg"); }
.one-card.mission { background-image: url("../assets/one-mission-bg.jpg"); }
.one-pre {
  display: block;
  font-family: var(--font-body); font-weight: var(--fw-semibold);
  font-size: var(--fs-12); letter-spacing: var(--tr-wider);
  text-transform: uppercase; color: rgba(255, 255, 255, 0.72);
}
.one-big {
  display: block; margin: 8px 0 2px;
  font-family: var(--font-display); font-weight: var(--fw-black);
  font-size: clamp(48px, 6vw, 76px); line-height: 1; letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.16);
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.85);
}
.one-word {
  display: block;
  font-family: var(--font-display); font-weight: var(--fw-bold);
  font-size: var(--fs-24); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--nams-snow);
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}
.ones-since {
  margin-top: 40px;
  font-family: var(--font-mono); font-size: var(--fs-12);
  letter-spacing: var(--tr-wider); text-transform: uppercase; color: var(--nams-fog);
}
@media (max-width: 700px) { .ones { grid-template-columns: 1fr; } }

/* ---------- Cursor companion (subtle trailing knot mark) ---------- */
.cursor-mark {
  position: fixed; top: 0; left: 0;
  width: 24px; height: 24px;
  pointer-events: none; z-index: 9999;
  opacity: 0; transition: opacity 400ms var(--ease-out);
  will-change: transform;
}
.cursor-mark img { width: 100%; height: 100%; opacity: 0.12; }
html[data-theme="dark"] .cursor-mark img { filter: invert(1); opacity: 0.16; }
@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-mark { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }

  /* Collapse nav into a hamburger dropdown */
  .site-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header .theme-toggle { margin-left: auto; }
  .site-header.nav-open .site-nav {
    display: flex; flex-direction: column; gap: 0; flex: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--nams-paper);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--sh-2, 0 14px 28px rgba(0,0,0,0.14));
    padding: 6px 0;
  }
  .site-header.nav-open .site-nav a {
    padding: 14px 24px; border-bottom: none;
    font-size: var(--fs-16); color: var(--color-fg-1);
  }
  .site-header.nav-open .site-nav a:hover { color: var(--color-accent); }
  .site-header.nav-open .site-nav a.active { color: var(--color-accent); border-bottom: none; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .clause { grid-template-columns: 48px 1fr; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
