/* ============================================================================
   The Webspinner Foundation — style system
   ----------------------------------------------------------------------------
   Adopts the canonical Webspinner brand palette and typography from
   webspinner.live: Cormorant Garamond italic-emphasis headlines, multi-tone
   earth/ocean/desert palette, paper-texture page background, image-first
   placard cards, the smiling-Wizard portrait hero. Silicon Forest, alive.

   Three layers, no shortcuts:
     1. Self-hosted webfonts + raw scales.
     2. Semantic palette per theme.
     3. Components compose from layers 1 + 2 only.
   ============================================================================ */

/* ── Self-hosted fonts (no third-party calls) ────────────────────────────── */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-500-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/assets/fonts/cormorant-garamond-400i-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/inter-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/inter-500-latin.woff2') format('woff2');
}

/* ── Layer 1: raw scales ─────────────────────────────────────────────────── */
:root {
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --space-7: 6.5rem;
  --space-8: 10rem;

  --type-0: 0.75rem;
  --type-1: 0.875rem;
  --type-2: 1rem;
  --type-3: 1.125rem;
  --type-4: 1.5rem;
  --type-5: 2rem;
  --type-6: clamp(2rem, 4vw, 3rem);
  --type-7: clamp(2.5rem, 6vw, 4.75rem);

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  --leading-tight: 1.05;
  --leading-snug: 1.2;
  --leading-body: 1.55;
  --leading-loose: 1.7;

  --tracking-tight: -0.012em;
  --tracking-normal: 0;
  --tracking-wide: 0.04em;
  --tracking-eyebrow: 0.22em;

  --measure-narrow: 30ch;
  --measure-body: 65ch;
  --measure-wide: 78ch;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --font-serif: 'Cormorant Garamond', 'Iowan Old Style', 'Charter', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace;

  --transition-fast: 200ms cubic-bezier(.22, 1, .36, 1);
  --transition-medium: 280ms cubic-bezier(.22, 1, .36, 1);
}

/* ── Layer 2a: light theme — Webspinner cloud palette ────────────────────── */
[data-theme="light"], :root {
  --cloud:    #F8F4EA;   /* page background — cloud white */
  --cloud-2:  #EFE9D9;   /* cards — warmer cream */
  --cloud-3:  #E5DCC4;   /* parchment — borders, dividers */

  --ink:        #1F3A4A; /* primary text — deep ocean */
  --ink-dim:    #4E6573; /* secondary text — mid ocean */
  --ink-faint:  #8A98A1; /* tertiary text — horizon */

  --earth:        #4A6B3A; /* forest green — primary accent (Silicon Forest) */
  --earth-soft:   #7A9B6A; /* spring green */
  --desert:       #B8895A; /* warm tan — secondary accent */
  --desert-soft:  #D4B48C; /* sand */
  --ocean:        #2A5D7E; /* deep ocean — tertiary accent */
  --ocean-soft:   #5A8AAB; /* shallow sea */

  --line:        rgba(31, 58, 74, 0.10);
  --line-strong: rgba(31, 58, 74, 0.18);

  /* Component aliases for backwards-compat with existing markup */
  --bg:        var(--cloud);
  --bg-soft:   var(--cloud-2);
  --bg-deep:   var(--cloud-3);
  --bg-overlay:rgba(248, 244, 234, 0.82);
  --fg:        var(--ink);
  --fg-soft:   var(--ink-dim);
  --fg-mute:   var(--ink-faint);
  --accent:    var(--earth);
  --accent-deep: #3a5530;
  --accent-soft: rgba(74, 107, 58, 0.12);
  --accent-ink:  var(--cloud);
  --highlight:   var(--desert);
  --rule:        var(--line);
  --rule-strong: var(--line-strong);

  --shadow-1: 0 1px 2px rgba(31, 58, 74, 0.06), 0 1px 1px rgba(31, 58, 74, 0.03);
  --shadow-2: 0 6px 18px rgba(31, 58, 74, 0.10), 0 2px 4px rgba(31, 58, 74, 0.05);
  --shadow-card: 0 12px 32px rgba(31, 58, 74, 0.18);
  --shadow-lg: 0 18px 48px rgba(31, 58, 74, 0.22);

  color-scheme: light;
}

/* ── Layer 2b: dark theme — Webspinner fireside ──────────────────────────── */
[data-theme="dark"] {
  --cloud:   #0F1A22;
  --cloud-2: #18242E;
  --cloud-3: #1F3140;

  --ink:        #E8E1D2;
  --ink-dim:    #B8B0A0;
  --ink-faint:  #7A7568;

  --earth:        #7A9B6A;  /* spring green — brighter on dark */
  --earth-soft:   #A4C188;
  --desert:       #D4B48C;
  --desert-soft:  #E8CCA8;
  --ocean:        #5A8AAB;
  --ocean-soft:   #88B0CB;

  --line:        rgba(232, 225, 210, 0.10);
  --line-strong: rgba(232, 225, 210, 0.20);

  --bg:        var(--cloud);
  --bg-soft:   var(--cloud-2);
  --bg-deep:   var(--cloud-3);
  --bg-overlay:rgba(15, 26, 34, 0.85);
  --fg:        var(--ink);
  --fg-soft:   var(--ink-dim);
  --fg-mute:   var(--ink-faint);
  --accent:    var(--earth);
  --accent-deep: var(--earth-soft);
  --accent-soft: rgba(122, 155, 106, 0.16);
  --accent-ink:  var(--cloud);
  --highlight:   var(--desert);
  --rule:        var(--line);
  --rule-strong: var(--line-strong);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.32);
  --shadow-2: 0 8px 22px rgba(0, 0, 0, 0.45);
  --shadow-card: 0 14px 36px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 22px 56px rgba(0, 0, 0, 0.62);

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  [data-theme="auto"] {
    --cloud: #0F1A22; --cloud-2: #18242E; --cloud-3: #1F3140;
    --ink: #E8E1D2; --ink-dim: #B8B0A0; --ink-faint: #7A7568;
    --earth: #7A9B6A; --earth-soft: #A4C188;
    --desert: #D4B48C; --desert-soft: #E8CCA8;
    --ocean: #5A8AAB; --ocean-soft: #88B0CB;
    --line: rgba(232,225,210,.10); --line-strong: rgba(232,225,210,.20);
    --bg: var(--cloud); --bg-soft: var(--cloud-2); --bg-deep: var(--cloud-3);
    --bg-overlay: rgba(15,26,34,.85);
    --fg: var(--ink); --fg-soft: var(--ink-dim); --fg-mute: var(--ink-faint);
    --accent: var(--earth); --accent-deep: var(--earth-soft);
    --accent-soft: rgba(122,155,106,.16); --accent-ink: var(--cloud);
    --highlight: var(--desert);
    --rule: var(--line); --rule-strong: var(--line-strong);
    --shadow-1: 0 1px 2px rgba(0,0,0,.32);
    --shadow-2: 0 8px 22px rgba(0,0,0,.45);
    --shadow-card: 0 14px 36px rgba(0,0,0,.55);
    --shadow-lg: 0 22px 56px rgba(0,0,0,.62);
    color-scheme: dark;
  }
}

/* ── Layer 3: components ─────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background: var(--cloud);
  color: var(--ink-dim);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: var(--leading-body);
  font-weight: var(--weight-regular);
  font-feature-settings: "kern", "liga", "ss01";
  min-height: 100vh;
  position: relative;
}

/* Subtle paper-texture page background — earth/ocean/desert washes.
   Lifted from webspinner.live; this is the "Silicon Forest" daylight. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(74, 107, 58, 0.06), transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(42, 93, 126, 0.07), transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(184, 137, 90, 0.04), transparent 70%);
  pointer-events: none;
}

::selection { background: var(--accent-soft); color: var(--ink); }

/* Headings — Cormorant Garamond, italic emphasis carries the warmth */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-3);
}
h1 { font-size: var(--type-7); margin-bottom: var(--space-4); }
h2 { font-size: var(--type-6); margin-top: var(--space-7); margin-bottom: var(--space-4); line-height: 1.15; }
h3 { font-size: var(--type-5); margin-top: var(--space-6); }
h4 { font-size: var(--type-4); margin-top: var(--space-5); }

/* The signature Webspinner italic emphasis: <em> inside a heading */
h1 em, h2 em, h3 em {
  font-style: italic;
  color: var(--earth);
  font-weight: var(--weight-regular);
}

p {
  margin: 0 0 var(--space-4);
  max-width: var(--measure-body);
}

a {
  color: var(--ocean);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
a:hover { border-bottom-color: var(--ocean); }

strong, b { color: var(--ink); font-weight: var(--weight-semibold); }
em, i    { font-style: italic; }

ul, ol { padding-left: 1.4em; margin: 0 0 var(--space-4); max-width: var(--measure-body); line-height: 1.7; }
li     { margin-bottom: var(--space-2); }

hr { border: 0; height: 1px; background: var(--line); margin: var(--space-6) 0; max-width: var(--measure-body); }

blockquote {
  margin: var(--space-5) 0;
  padding-left: var(--space-4);
  border-left: 2px solid var(--earth);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: var(--type-3);
  font-style: italic;
  line-height: var(--leading-snug);
  max-width: var(--measure-body);
}

code, kbd { font-family: var(--font-mono); font-size: 0.92em; }
kbd { background: var(--cloud-2); border: 1px solid var(--line); padding: 0 0.4em; border-radius: 3px; }

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

:focus-visible {
  outline: 2px solid var(--earth);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Layout primitives ───────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 1280px;
  padding-inline: clamp(var(--space-3), 4vw, var(--space-6));
  margin-inline: auto;
}
.container-narrow { max-width: 800px; }
.container-wide   { max-width: 1440px; }

.section { padding-block: var(--space-7); }
.section-tight { padding-block: var(--space-6); }
.section-band  { background: var(--cloud-2); border-block: 1px solid var(--line); }
.section-soft  { background: var(--cloud-2); }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--earth);
  margin: 0 0 var(--space-3);
}

.lede {
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: var(--leading-body);
  color: var(--ink-dim);
  max-width: var(--measure-body);
  margin: 0 0 var(--space-5);
}

.fineprint {
  font-size: var(--type-1);
  color: var(--ink-faint);
}

.divider-ornament {
  text-align: center;
  color: var(--earth);
  font-size: var(--type-3);
  letter-spacing: 0.5em;
  margin: var(--space-6) 0;
}
/* Walker run 04 / Pablo: BLACK FOUR POINTED STAR (U+2726) wasn't in
   Cormorant Garamond and the system fallback rendered it as a tiny dot.
   Switched to BLACK DIAMOND (U+25C6) — basic Unicode, present in every
   serif font's glyph set, renders as a clear ornament at this size. */
.divider-ornament::before { content: "◆   ◆   ◆"; }

/* ── Header (sticky, paper-glass) ────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  background: var(--bg-overlay);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
          backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(var(--space-3), 4vw, var(--space-5));
}
.brand {
  font-family: var(--font-serif);
  font-size: 24px;
  letter-spacing: 0.01em;
  color: var(--ink);
  border-bottom: 0;
  white-space: nowrap;
}
.brand em { color: var(--earth); font-style: italic; }
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-left: auto;
  font-size: 14px;
}
.nav a {
  color: var(--ink-dim);
  padding: var(--space-1) 0;
  border-bottom: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--earth);
}
.signin-btn, .nav .cta-btn {
  background: var(--earth);
  border: 1px solid var(--earth);
  color: var(--cloud);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.signin-btn:hover, .nav .cta-btn:hover {
  background: var(--earth-soft);
  border-color: var(--earth-soft);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(74, 107, 58, 0.35);
}
.theme-toggle {
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  color: var(--ink-dim);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.theme-toggle:hover { border-color: var(--earth); color: var(--ink); }
.theme-toggle .theme-icon { width: 14px; height: 14px; }

@media (max-width: 760px) {
  .nav a:not(.cta-btn):not(.signin-btn) { display: none; }
}

/* ── Foundation banner (full-bleed Silicon Forest hero) ──────────────────── */
/*
  The brand banner — Mt. Hood / Portland skyline framed by pines, with the
  Webspinner Foundation wordmark, tagline, and subtitle baked into the image.
  Sits at the very top of the home page, full-width, before the H1 hero.
  No overlay, no border-radius — let the image be the image.
*/
.foundation-banner {
  width: 100%;
  margin: 0 auto;
  padding-top: var(--space-4);  /* sticky header sits in normal flow at top */
}
/* Pair with the hero below — drop the hero's top padding when the banner
   is above it, so the page doesn't double up on air. */
.foundation-banner + .hero { padding-top: var(--space-6); }
.foundation-banner-inner {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: clamp(var(--space-3), 4vw, var(--space-5));
}
.foundation-banner picture,
.foundation-banner img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1827 / 861;          /* preserve source ratio, no crop */
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

/* ── Hero — two-column with Weaver portrait card ─────────────────────────── */

.hero {
  padding: 110px 32px 80px;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-words { text-align: left; }
.hero-words h1 {
  font-weight: var(--weight-regular);
  font-size: clamp(40px, 6vw, 76px);
  line-height: 1.05;
  margin: 0 0 22px;
}
.hero-words .lede {
  font-size: 18px;
  color: var(--ink-dim);
  max-width: 520px;
  margin: 0 0 32px;
  line-height: 1.55;
}
.hero-words .cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

/* The Weaver portrait card — the smiling Wizard at his loom invites the chat.
   Pattern lifted from webspinner.live so the Foundation feels like the Wizard's
   site, not a separate institution-facing afterthought. */
.weaver-card {
  --angle: 0deg;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  background: var(--cloud-2);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
  isolation: isolate;
  /* When rendered as <button>: strip default browser chrome so the card
     looks identical to the prior <a> implementation. */
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  display: block;
}
.weaver-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.weaver-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: calc(var(--radius-lg) + 2px);
  padding: 2px;
  pointer-events: none;
  z-index: -1;
  background: conic-gradient(from var(--angle, 0deg),
    var(--earth), var(--desert), var(--ocean), var(--earth-soft), var(--earth));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: weaver-spin-border 12s linear infinite;
  opacity: 0.6;
}
.weaver-card:hover::before { opacity: 1; }
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes weaver-spin-border { to { --angle: 360deg; } }
@supports not (background: conic-gradient(from 0deg, red, blue)) {
  .weaver-card::before { display: none; }
}

.weaver-card .weaver-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.weaver-card .weaver-img,
.weaver-card .weaver-img-wrap picture,
.weaver-card .weaver-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 6s ease-out;
}
.weaver-card:hover .weaver-img,
.weaver-card:hover .weaver-img-wrap img { transform: scale(1.06); }
.weaver-card .weaver-img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(15, 26, 34, 0.85) 0%,
    rgba(15, 26, 34, 0.30) 35%,
    transparent 60%);
  pointer-events: none;
}
.weaver-card-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 24px 28px 22px;
  color: var(--cloud);
  z-index: 1;
}
.weaver-card .eyebrow-w {
  font-size: 11px;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--desert-soft);
  margin-bottom: 8px;
  font-weight: var(--weight-semibold);
}
.weaver-card h3 {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: var(--weight-medium);
  font-size: 28px;
  line-height: 1.1;
  margin: 0 0 8px;
  color: var(--cloud);
}
.weaver-card p {
  font-size: 14px;
  color: rgba(248, 244, 234, 0.85);
  margin: 0 0 14px;
  line-height: 1.5;
  max-width: none;
}
.weaver-card .weaver-card-note {
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(248, 244, 234, 0.72);
  margin: 0 0 16px;
  font-style: italic;
}
.weaver-card .weaver-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cloud);
  font-weight: var(--weight-semibold);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: rgba(248, 244, 234, 0.16);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  transition: background var(--transition-fast), gap var(--transition-fast);
}
.weaver-card:hover .weaver-card-cta {
  background: rgba(248, 244, 234, 0.28);
  gap: 10px;
}
.weaver-card .weaver-card-cta .arrow { display: inline-block; transition: transform var(--transition-fast); }
.weaver-card:hover .weaver-card-cta .arrow { transform: translateX(4px); }

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 96px 18px 60px;
  }
  .hero-words { text-align: center; }
  .hero-words .lede { margin-left: auto; margin-right: auto; }
  .hero-words .cta-row { justify-content: center; }
  .weaver-card { max-width: 480px; margin: 0 auto; }
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn, .cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 15px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn-primary, .cta {
  background: var(--earth);
  color: var(--cloud);
  border-color: var(--earth);
}
.btn-primary:hover, .cta:hover {
  background: var(--earth-soft);
  border-color: var(--earth-soft);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(74, 107, 58, 0.32);
  color: var(--cloud);
  border-bottom: 1px solid var(--earth-soft);  /* override link border */
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary:hover {
  border-color: var(--earth);
  color: var(--earth);
  border-bottom: 1px solid var(--earth);
}
.btn-ghost {
  background: transparent;
  color: var(--earth);
  padding: 0;
  border: 0;
  font-weight: var(--weight-medium);
}
.btn-ghost:hover { color: var(--earth-soft); border: 0; }

/* ── Placard cards (image-first plaques) ─────────────────────────────────── */

.placard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 40px;
}
/* Walker run 02 / Pablo: 4-card grid was producing 3-up + 1-orphan
   at standard desktop widths. Home placards (4) get a deliberate
   2x2 layout so the four cards stay balanced. */
.placard-grid-2x2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 40px;
}
@media (min-width: 720px) {
  .placard-grid-2x2 { grid-template-columns: repeat(2, 1fr); }
}
.placard {
  background: var(--cloud-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium), border-color var(--transition-fast);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  isolation: isolate;
}
.placard:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--earth);
  border-bottom: 1px solid var(--earth);  /* override <a> border */
}
.placard-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cloud-3);
}
.placard-img,
.placard-img-wrap picture,
.placard-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.2s cubic-bezier(.22, 1, .36, 1);
}
.placard:hover .placard-img,
.placard:hover .placard-img-wrap img { transform: scale(1.06); }
.placard-img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(31, 58, 74, 0.35) 0%, rgba(31, 58, 74, 0) 35%);
  pointer-events: none;
}
.placard-body {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.placard .eyebrow-c {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  margin-bottom: 8px;
  color: var(--earth);
}
.placard.tone-earth   .eyebrow-c { color: var(--earth); }
.placard.tone-ocean   .eyebrow-c { color: var(--ocean); }
.placard.tone-desert  .eyebrow-c { color: var(--desert); }
.placard.tone-cloud   .eyebrow-c { color: var(--ink-dim); }

.placard h3 {
  font-family: var(--font-serif);
  font-weight: var(--weight-medium);
  font-style: italic;
  font-size: 24px;
  margin: 0 0 10px;
  color: var(--ink);
  line-height: 1.2;
  transition: color var(--transition-fast);
}
.placard h3 em { font-style: normal; color: inherit; }
.placard p {
  font-size: 14.5px;
  color: var(--ink-dim);
  margin: 0 0 16px;
  flex: 1;
  line-height: 1.55;
  max-width: none;
}
.placard .open-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--earth);
  font-weight: var(--weight-semibold);
  margin-top: auto;
}
.placard .open-cta .arrow { display: inline-block; transition: transform var(--transition-fast); }
.placard:hover .open-cta .arrow { transform: translateX(4px); }
.placard:hover h3 { color: var(--earth); }
.placard.tone-ocean:hover h3 { color: var(--ocean); }
.placard.tone-desert:hover h3 { color: var(--desert); }

/* ── Foundation-cover hero (manifesto index) ─────────────────────────────── */

.book-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  padding-block: var(--space-7);
}
.book-hero-words { text-align: left; }
.book-hero-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  /* Match the source aspect (1024x1536, portrait 2:3). Earlier
     forced 4:3 landscape, which sliced off the title and attribution
     and left only the spine visible. Pablo flagged it; this is the fix. */
  aspect-ratio: 2 / 3;
  max-height: 560px;        /* keep it from dominating short viewports */
  margin: 0 auto;
  width: auto;              /* let height drive the width via the ratio */
}
.book-hero-img picture, .book-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;       /* show the whole book — no crop */
  object-position: center;
  display: block;
}
@media (max-width: 880px) {
  .book-hero { grid-template-columns: 1fr; gap: 28px; }
}

/* ── Mission hero image (section-band between lede and first H2) ─────────── */

.mission-hero-image {
  margin: var(--space-5) auto var(--space-6);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  aspect-ratio: 1536 / 1024;       /* preserve the source ratio */
  max-width: 1100px;
}
.mission-hero-image picture,
.mission-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;        /* keep the plaque + Mt. Hood band */
  display: block;
}

/* ── Long-form (manifesto, mission) ──────────────────────────────────────── */

.longform { padding-block: var(--space-6); }
.longform .container-narrow > * { max-width: var(--measure-body); }
.longform h1, .longform h2, .longform h3 { max-width: var(--measure-body); }

.longform .chapter-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-card);
}
.longform .chapter-cover img,
.longform .chapter-cover picture {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 60%;
}
.longform .chapter-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 11px;
  color: var(--ink-faint);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
}
.longform .chapter-meta a { color: var(--earth); }

.framing-line {
  font-size: 14px;
  color: var(--ink-faint);
  font-style: italic;
  margin: 0 0 var(--space-5);
  max-width: var(--measure-body);
  border-bottom: 1px solid var(--line);
  padding-bottom: var(--space-3);
}
.framing-line a { color: var(--ink-dim); border-bottom: 1px solid var(--line); }

.chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  border-top: 1px solid var(--line);
  padding-top: var(--space-5);
  margin-top: var(--space-7);
  max-width: var(--measure-body);
}
.chapter-nav a {
  color: var(--ink);
  font-size: 15px;
  display: flex;
  flex-direction: column;
  border-bottom: 0;
}
.chapter-nav a span {
  font-size: 11px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
}
.chapter-nav a:hover { color: var(--earth); border-bottom: 0; }
.chapter-nav .chapter-prev::before { content: "← "; color: var(--ink-faint); }
.chapter-nav .chapter-next  { text-align: right; }
.chapter-nav .chapter-next::after  { content: " →"; color: var(--ink-faint); }

/* ── Manifesto index TOC ─────────────────────────────────────────────────── */

/* Walker run 03 / Pablo: TOC reads as a magazine table-of-contents.
   Each row is thumbnail + number/title/pull, with hover-lift on the
   thumbnail. Title link is the keyboard-accessible click target;
   the thumbnail is decorative redundancy (aria-hidden on the markup). */
.toc {
  display: grid;
  gap: var(--space-3);
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0;
}
.toc-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--space-4);
  align-items: center;
  border-bottom: 1px solid var(--rule);
  padding: var(--space-4) var(--space-3);
  margin: 0;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}
.toc-row:hover { background: var(--cloud-2); }
.toc-row:last-child { border-bottom: 0; }

.toc-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border-bottom: 0;
  box-shadow: var(--shadow-1);
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
}
.toc-thumb picture, .toc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
  display: block;
  transition: transform 1.2s cubic-bezier(.22, 1, .36, 1);
}
.toc-row:hover .toc-thumb { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.toc-row:hover .toc-thumb img { transform: scale(1.06); }

.toc-meta { min-width: 0; }
.toc .toc-num {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: var(--weight-medium);
  color: var(--earth);
  letter-spacing: var(--tracking-tight);
  margin-right: var(--space-3);
  vertical-align: baseline;
}
.toc .toc-title {
  font-family: var(--font-serif);
  font-size: var(--type-4);
  color: var(--ink);
  font-style: italic;
  font-weight: var(--weight-semibold);
  border-bottom: 0;
  transition: color var(--transition-fast);
}
.toc .toc-title:hover { color: var(--earth); border-bottom: 0; }
.toc .toc-pull {
  margin: var(--space-2) 0 0;
  color: var(--ink);
  max-width: var(--measure-body);
  font-size: 15px;
}

/* On narrow viewports, stack the thumbnail above the meta. */
@media (max-width: 600px) {
  .toc-row { grid-template-columns: 1fr; }
  .toc-thumb { max-width: 320px; }
}

/* ── Value strip ─────────────────────────────────────────────────────────── */

.value-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: var(--space-5);
  padding-block: var(--space-6);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.value-item h4 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: var(--weight-medium);
  font-size: 22px;
  color: var(--ink);
}
.value-item p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-dim);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer {
  background: var(--cloud-2);
  border-top: 1px solid var(--line);
  padding-block: var(--space-6);
  margin-top: var(--space-7);
  color: var(--ink-dim);
}
.site-footer-inner {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-5);
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(var(--space-3), 4vw, var(--space-5));
}
.site-footer h5 {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 var(--space-3);
  font-weight: var(--weight-semibold);
}
.site-footer ul { list-style: none; padding: 0; margin: 0; max-width: none; }
.site-footer li { margin-bottom: var(--space-2); }
.site-footer a {
  color: var(--ink-dim);
  font-size: 14px;
  border-bottom: 0;
}
.site-footer a:hover { color: var(--earth); border-bottom: 0; }
.site-footer .privacy-line {
  font-size: 13px;
  color: var(--ink-faint);
  max-width: 40ch;
  margin-top: var(--space-3);
  font-style: italic;
}
.site-footer .colophon {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: var(--space-4);
  margin-top: var(--space-5);
  font-size: 12px;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

@media (max-width: 720px) {
  .site-footer-inner { grid-template-columns: 1fr; }
}

/* ── Forms ───────────────────────────────────────────────────────────────── */

.form-stack { display: grid; gap: var(--space-3); max-width: 32rem; }
.form-stack label {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink);
  font-weight: var(--weight-medium);
}
.form-stack input,
.form-stack textarea,
.form-stack select {
  font: inherit;
  font-size: 16px;
  background: var(--cloud);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  /* Walker run 04 / Pablo: <select> needs explicit width:100% to fill
     its row like inputs/textareas do — otherwise the label sits
     inline next to the select rather than stacked above it. */
  width: 100%;
  box-sizing: border-box;
}
.form-stack label { display: block; }
.form-stack input:focus,
.form-stack textarea:focus,
.form-stack select:focus {
  outline: 0;
  border-color: var(--earth);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-stack textarea { min-height: 8rem; resize: vertical; }
.form-stack .field-help { font-size: 13px; color: var(--ink-faint); }

/* Walker run 05 / Pablo: Worker forms now look like forms — bordered
   card, soft cream background, generous padding, subtle shadow. The
   container reads as "this is an action surface" instead of as an
   inputs-stack drifting in body copy. */
form.worker-form {
  background: var(--cloud-2);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-1);
  max-width: 36rem;
  margin: var(--space-5) 0;
}
form.worker-form input,
form.worker-form textarea,
form.worker-form select {
  background: var(--cloud);   /* lift the inputs against the card bg */
}

.honeypot {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-success {
  background: var(--cloud);
  border: 1px solid var(--earth-soft);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

/* ── Three-paths layout (Get Involved) ───────────────────────────────────── */

/* Walker run 04 / Pablo: auto-fit was producing 2-up + 1-orphan at
   standard desktop widths. Three paths get an explicit 3-column at
   ≥720px so they always render as one row, then 1-column on mobile. */
.paths {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
  margin-top: var(--space-5);
}
@media (min-width: 720px) {
  .paths { grid-template-columns: repeat(3, 1fr); }
}
.path {
  background: var(--cloud-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.path h3 { margin: 0; font-style: italic; font-weight: var(--weight-medium); }
.path .path-detail { color: var(--ink-dim); margin-bottom: 0; }
.path .btn { margin-top: auto; align-self: flex-start; }

/* ── Tables ──────────────────────────────────────────────────────────────── */

.facts {
  border-collapse: collapse;
  margin: var(--space-5) 0;
  width: 100%;
  max-width: var(--measure-body);
  font-size: 15px;
}
.facts th, .facts td { text-align: left; padding: var(--space-3); border-bottom: 1px solid var(--line); }
.facts th {
  color: var(--ink-faint);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  font-size: 11px;
  background: var(--cloud-2);
}

/* ── Chat widget (Weaver — uses earth/ocean accent now) ──────────────────── */

.weaver-launcher {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--earth);
  color: var(--cloud);
  border: 0;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 14px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(74, 107, 58, 0.35);
  transition: background var(--transition-fast), transform var(--transition-fast);
}
.weaver-launcher:hover { background: var(--earth-soft); transform: translateY(-1px); }
.weaver-launcher.hidden { display: none; }
.weaver-launcher svg { width: 18px; height: 18px; }

.weaver-panel {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  z-index: 60;
  width: min(420px, calc(100vw - 2 * var(--space-4)));
  height: min(640px, calc(100vh - 2 * var(--space-4)));
  background: var(--cloud);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.weaver-panel.open { display: flex; }

.weaver-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--cloud-2);
}
.weaver-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 20px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.weaver-title .weaver-mark { color: var(--earth); font-style: normal; }
.weaver-close {
  background: transparent;
  border: 0;
  font-size: 22px;
  color: var(--ink-faint);
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.weaver-close:hover { color: var(--ink); background: var(--cloud-3); }

.weaver-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.weaver-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  line-height: 1.45;
  font-size: 14.5px;
}
.weaver-msg-user {
  align-self: flex-end;
  background: var(--earth);
  color: var(--cloud);
  border-bottom-right-radius: 4px;
}
.weaver-msg-weaver {
  align-self: flex-start;
  background: var(--cloud-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.weaver-msg-error {
  align-self: stretch;
  background: var(--cloud-3);
  color: var(--ink-dim);
  font-size: 13px;
  text-align: center;
  font-style: italic;
}
.weaver-msg .cite {
  display: inline-block;
  margin: 0 0.15em;
  padding: 0 0.5em;
  font-size: 0.78em;
  font-weight: var(--weight-semibold);
  background: var(--accent-soft);
  color: var(--earth);
  border-radius: var(--radius-pill);
  border-bottom: 0;
}
.weaver-msg .cite:hover { background: var(--earth); color: var(--cloud); border-bottom: 0; }

.weaver-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.weaver-typing .dot {
  width: 6px; height: 6px;
  background: var(--ink-faint);
  border-radius: 50%;
  opacity: 0.4;
  animation: weaver-pulse 1.2s infinite ease-in-out;
}
.weaver-typing .dot:nth-child(2) { animation-delay: 0.15s; }
.weaver-typing .dot:nth-child(3) { animation-delay: 0.30s; }
@keyframes weaver-pulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40% { opacity: 0.95; transform: scale(1); }
}

.weaver-form {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--cloud-2);
}
.weaver-input {
  flex: 1;
  font: inherit;
  font-size: 14.5px;
  background: var(--cloud);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  transition: border-color var(--transition-fast);
}
.weaver-input:focus { outline: 0; border-color: var(--earth); }
.weaver-send {
  background: var(--earth);
  color: var(--cloud);
  border: 0;
  border-radius: var(--radius-md);
  padding: 8px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.weaver-send:hover { background: var(--earth-soft); }
.weaver-send:disabled { opacity: 0.4; cursor: not-allowed; }
.weaver-send svg { width: 18px; height: 18px; }

@media (max-width: 480px) {
  .weaver-panel {
    width: 100vw; height: 100vh;
    bottom: 0; right: 0;
    border-radius: 0;
    border: 0;
  }
}

/* ── Skip link ───────────────────────────────────────────────────────────── */

.skip-link {
  position: absolute;
  top: -40px;
  left: var(--space-3);
  background: var(--earth);
  color: var(--cloud);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  z-index: 100;
}
.skip-link:focus { top: var(--space-3); }

/* ── Print ───────────────────────────────────────────────────────────────── */

@media print {
  .site-header, .site-footer, .weaver-launcher, .weaver-panel { display: none !important; }
  body { color: #000; background: #fff; }
  body::before { display: none; }
  a { color: #000; text-decoration: underline; }
}

/* ── Morals placard + modal ──
   Pinnacle moment featured below the Foundation banner and above the
   hero. Dark-on-cream wooden-plaque feel that reads on both light and
   dark themes (the placard panel stays a deep ocean panel with cream
   text; the modal frame swaps with theme via existing tokens). Same
   canonical reflection as the placards on webspinner.live, .com, .org;
   only the visual chrome changes per tenant. Source of truth:
   webspinner-foundation/MORALS.md. */
@property --morals-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes morals-spin { to { --morals-angle: 360deg; } }
.morals-placard {
  position: relative;
  margin: var(--space-3) auto 0;
  max-width: 1280px;
  padding: 0 clamp(var(--space-3), 4vw, var(--space-5));
  cursor: pointer;
  isolation: isolate;
  font-family: var(--font-sans);
}
.morals-placard-inner {
  position: relative;
  background: linear-gradient(135deg, #1F3A4A 0%, #2A5D7E 60%, #1a4862 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-4) clamp(var(--space-4), 5vw, var(--space-6));
  color: #F8F4EA;          /* always cream — independent of theme */
  overflow: hidden;
  transition: transform var(--transition-medium), box-shadow var(--transition-medium);
  box-shadow: var(--shadow-card);
}
.morals-placard-inner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 85% -20%, rgba(212,180,140,0.22) 0%, transparent 55%),
    radial-gradient(ellipse at 8% 130%, rgba(122,155,106,0.16) 0%, transparent 55%);
}
/* Animated rainbow border — same conic pattern the Webspinner family
   uses for "this is special, click me" affordances. Earth/desert/ocean
   palette so it sings on the cream Silicon Forest page. */
.morals-placard-inner::before {
  content: ""; position: absolute; inset: -1px;
  border-radius: calc(var(--radius-lg) + 1px);
  padding: 1.5px; pointer-events: none; z-index: 1;
  background: conic-gradient(from var(--morals-angle, 0deg),
    #B8895A, #7A9B6A, #5A8AAB, #D4B48C, #B8895A);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: morals-spin 9s linear infinite; opacity: 0.85;
}
.morals-placard:hover .morals-placard-inner {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.morals-placard:hover .morals-placard-inner::before { opacity: 1; }
.morals-placard:focus-visible { outline: none; }
.morals-placard:focus-visible .morals-placard-inner {
  box-shadow: 0 0 0 3px #D4B48C, var(--shadow-lg);
}
.morals-placard .morals-row {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  align-items: center;
}
.morals-placard .morals-text { min-width: 0; }
.morals-placard .morals-eyebrow {
  font-size: var(--type-0);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: #D4B48C;
  font-weight: var(--weight-semibold);
  margin: 0 0 var(--space-2);
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-family: var(--font-sans);
}
.morals-placard .morals-eyebrow::before {
  content: ""; display: inline-block; width: 24px; height: 1px;
  background: #D4B48C; opacity: 0.6;
}
.morals-placard .morals-headline {
  font-family: var(--font-serif);
  font-weight: var(--weight-regular);
  font-size: clamp(1.6rem, 3.4vw, 2.6rem);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-2);
  letter-spacing: var(--tracking-tight);
  color: #F8F4EA;
}
.morals-placard .morals-headline em {
  font-style: italic;
  font-weight: var(--weight-medium);
  color: #D4B48C;
}
.morals-placard .morals-sub {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(0.95rem, 1.6vw, 1.25rem);
  color: rgba(248, 244, 234, 0.86);
  margin: 0;
  line-height: var(--leading-snug);
}
.morals-placard .morals-cta {
  display: inline-flex; align-items: center;
  gap: var(--space-2);
  font-size: var(--type-0);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: #F8F4EA;
  font-weight: var(--weight-semibold);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-pill);
  background: rgba(248, 244, 234, 0.14);
  border: 1px solid rgba(248, 244, 234, 0.30);
  transition: background var(--transition-fast), gap var(--transition-fast),
              border-color var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
  font-family: var(--font-sans);
}
.morals-placard:hover .morals-cta {
  background: rgba(248, 244, 234, 0.25);
  border-color: rgba(248, 244, 234, 0.55);
  gap: 12px;
  transform: translateY(-1px);
}
.morals-placard .morals-cta .arrow { display: inline-block; transition: transform var(--transition-fast); }
.morals-placard:hover .morals-cta .arrow { transform: translateX(4px); }

/* When the placard sits between the foundation banner and the hero,
   tighten the hero's top padding so it doesn't double up on air. */
.foundation-banner + .morals-placard + .hero { padding-top: var(--space-4); }

@media (max-width: 760px) {
  .morals-placard-inner { padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); }
  .morals-placard .morals-row { grid-template-columns: 1fr; gap: var(--space-3); }
  .morals-placard .morals-cta { justify-self: start; padding: var(--space-2) var(--space-3); }
}

/* Modal — long-form reading. Theme-aware: uses semantic tokens so the
   frame swaps with light/dark; body type stays high-contrast in both. */
.morals-modal {
  position: fixed; inset: 0;
  background: rgba(31, 58, 74, 0.55);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  display: none;
  align-items: center; justify-content: center;
  z-index: 400;
  padding: 3vh 3vw;
}
.morals-modal.open { display: flex; }
.morals-modal-inner {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  width: min(820px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.morals-modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-overlay);
  border: 1px solid var(--rule-strong);
  color: var(--fg);
  cursor: pointer;
  font-size: 20px; line-height: 1; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}
.morals-modal-close:hover {
  background: var(--fg); color: var(--bg);
  border-color: var(--fg); transform: rotate(90deg);
}
.morals-modal-body {
  overflow-y: auto;
  padding: var(--space-5) clamp(var(--space-4), 6vw, var(--space-6)) var(--space-5);
  font-family: var(--font-sans);
}
.morals-modal-eyebrow {
  font-size: var(--type-0);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--accent);
  font-weight: var(--weight-semibold);
  margin: 0 0 var(--space-3);
}
.morals-modal-title {
  font-family: var(--font-serif);
  font-weight: var(--weight-regular);
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-2);
  color: var(--fg);
  letter-spacing: var(--tracking-tight);
}
.morals-modal-title em { font-style: italic; color: var(--accent); }
.morals-modal-dek {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--type-4);
  color: var(--fg-soft);
  margin: 0 0 var(--space-4);
  line-height: var(--leading-snug);
}
.morals-modal-orig {
  font-size: var(--type-0);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--highlight);
  font-weight: var(--weight-semibold);
  margin: 0 0 var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--rule);
}
.morals-modal-note {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--type-1);
  color: var(--fg-soft);
  margin: 0 0 var(--space-4);
  font-family: var(--font-sans);
  line-height: var(--leading-body);
  max-width: var(--measure-body);
}
/* Body type for the long-form essay — Cormorant Garamond is a display
   face; using it at body sizes reads as one heavy calligraphic block
   with no visual distinction between regular / em / strong. Use a
   proper reading serif (Iowan Old Style, system on macOS/iOS;
   Charter or Palatino on other systems; Georgia as the universal
   fallback). Matches the modals on .live, .com, and .org. */
.morals-essay p {
  font-family: 'Iowan Old Style', 'Charter', 'Palatino Linotype', Georgia, serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--fg);
  margin: 0 0 var(--space-3);
  max-width: var(--measure-body);
}
.morals-essay p em { color: var(--fg); font-style: italic; }
.morals-essay p strong { color: var(--fg); font-weight: 600; }
.morals-essay p.lead { font-size: 18.5px; color: var(--fg); }
.morals-attribution {
  margin: var(--space-5) 0 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--rule);
  font-size: var(--type-1);
  color: var(--fg-mute);
  line-height: var(--leading-body);
  font-style: italic;
  max-width: var(--measure-body);
  font-family: var(--font-sans);
}
.morals-attribution strong { color: var(--fg-soft); font-style: normal; font-weight: var(--weight-semibold); }
.morals-attribution code {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.875em;
}

@media (max-width: 680px) {
  .morals-modal-body { padding: var(--space-4) var(--space-3); }
  .morals-essay p { font-size: var(--type-2); }
  .morals-essay p.lead { font-size: var(--type-3); }
}

/* ── Centered closing-CTA section pattern (used on home + 404) ── */
.cta-section { text-align: center; }
.cta-section h2 { max-width: none; }
.cta-section .lede { margin-inline: auto; }
.cta-section .cta-row { justify-content: center; }

/* ── One-Sentence-Website placard (the "see our other websites" plaque) ── */
.osw-band { padding-block: var(--space-7); }
.osw-placard {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-5);
  align-items: center;
  position: relative;
  padding: var(--space-5);
  border-radius: var(--radius-3);
  background:
    linear-gradient(135deg, rgba(42,93,126,0.08), rgba(42,93,126,0.02)),
    var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
              border-color var(--transition-fast);
  overflow: hidden;
}
.osw-placard:hover {
  transform: translateY(-2px);
  border-color: var(--ocean);
  box-shadow: 0 8px 24px rgba(42,93,126,0.14);
}
.osw-img {
  display: block;
  border-radius: var(--radius-2);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.osw-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-fast);
}
.osw-placard:hover .osw-img img { transform: scale(1.04); }
@media (max-width: 720px) {
  .osw-placard { grid-template-columns: 1fr; gap: var(--space-4); }
  .osw-img { max-width: 280px; }
}
.osw-placard h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--type-5);
  margin: var(--space-2) 0 var(--space-3);
  line-height: 1.18;
}
.osw-placard h2 em {
  font-style: italic;
  color: var(--ocean);
}
.osw-placard .eyebrow { color: var(--ocean); }
.osw-placard p {
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 var(--space-4);
}
.osw-placard .osw-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--type-2);
  font-weight: var(--weight-semibold);
  color: var(--ocean);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.osw-placard:hover .osw-cta .arrow { transform: translateX(4px); }
.osw-placard .arrow { display: inline-block; transition: transform var(--transition-fast); }
