/*
  Palette updated 2026-09-22 from the finalized Brand Manual
  (Ponderosa_Partners_Brand_Manual.pdf) -- real values now, not guesses:
    Dark black  #2F1F1F   Emerald    #1D472F   Akash (violet) #220454
    Roi Soleil  #F0B50A   Saphire    #18C6EE   Punk (pink)    #BC75B2
  Emerald and Dark black anchor the interface (ink + primary accent); the
  other four are reserved as --brand-* below for illustration/marketing use
  in Phase 3, not forced into this auth-flow UI.

  Typography is still a placeholder. The manual specifies GT Flexa
  (headings) and Avenir Next (body) -- both commercial, so they need actual
  licensed font files to self-host (Section 3: no CDN, no Google Fonts
  link, ever). Until those files are supplied, this uses a serif/sans
  system stack chosen to sit reasonably close to that pairing's weight and
  character. Swap --font-serif/--font-sans once the .woff2 files exist and
  add @font-face rules above this comment -- no other change needed.
*/

:root {
  --paper: #faf7ee;
  --surface: #ffffff;
  --ink: #2f1f1f;
  --ink-2: #5a4d4d;
  --ink-3: #7d7272;
  --rule: #ded6c8;
  --accent: #1d472f;
  --accent-contrast: #ffffff;
  --error: #8b3a2f;
  --error-bg: #f6e4e0;
  --success: #1d472f;
  --success-bg: #e3ede6;
  --warning: #8a6216;
  --warning-bg: #f4ebda;
  --font-serif: Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Reserved brand colors -- not used in this auth UI, available for
     Phase 3 marketing/illustration work where the manual's full palette
     is appropriate (e.g. the alchemy-symbol motifs, data viz accents). */
  --brand-dark: #2f1f1f;
  --brand-emerald: #1d472f;
  --brand-akash: #220454;
  --brand-roi-soleil: #f0b50a;
  --brand-saphire: #18c6ee;
  --brand-punk: #bc75b2;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #16130f;
    --surface: #1e1a15;
    --ink: #f1ece2;
    --ink-2: #c9bfb0;
    --ink-3: #9c9184;
    --rule: #332c23;
    --accent: #6fbf97;
    --accent-contrast: #0d1512;
    --error: #e0897c;
    --error-bg: #2c1b18;
    --success: #6fbf97;
    --success-bg: #1b2a22;
    --warning: #e0c26a;
    --warning-bg: #2a2317;
  }
}

:root[data-theme="dark"] {
  --paper: #16130f;
  --surface: #1e1a15;
  --ink: #f1ece2;
  --ink-2: #c9bfb0;
  --ink-3: #9c9184;
  --rule: #332c23;
  --accent: #6fbf97;
  --accent-contrast: #0d1512;
  --error: #e0897c;
  --error-bg: #2c1b18;
  --success: #6fbf97;
  --success-bg: #1b2a22;
  --warning: #e0c26a;
  --warning-bg: #2a2317;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: block;
  border-radius: 50%;
}

#theme-toggle {
  background: none;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--ink);
}

.auth-main {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}

.auth-card {
  width: 100%;
  max-width: 26rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 28px 24px;
}

.auth-card h1 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  margin: 0 0 18px;
}

label { display: block; font-size: 0.85rem; color: var(--ink-2); margin: 14px 0 4px; }

input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
}

button[type="submit"], a.button {
  display: inline-block;
  margin-top: 20px;
  width: 100%;
  text-align: center;
  padding: 11px 16px;
  background: var(--accent);
  color: var(--accent-contrast);
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}

.auth-links, .auth-note { font-size: 0.85rem; margin-top: 14px; color: var(--ink-3); }
.auth-links a, .auth-note a { color: var(--accent); }

.alert { padding: 10px 12px; border-radius: 4px; font-size: 0.88rem; margin-bottom: 12px; }
.alert-error { background: var(--error-bg); color: var(--error); }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }

.mono { font-family: var(--font-mono); overflow-wrap: anywhere; }

img { max-width: 100%; height: auto; }
.hint { font-size: 0.8rem; color: var(--ink-3); margin: 4px 0 0; }

.recovery-codes { list-style: none; padding: 0; margin: 14px 0; }
.recovery-codes li { padding: 6px 0; border-bottom: 1px dashed var(--rule); }

.site-footer {
  padding: 20px 16px;
  border-top: 1px solid var(--rule);
  font-size: 0.75rem;
  color: var(--ink-3);
  max-width: 60rem;
  margin: 0 auto;
}

@media (max-width: 360px) {
  .auth-card { padding: 20px 16px; }
}

/* ----------------------------------------------------------------------
   Phase 2-4: authenticated app shell (admin console + investor dashboard),
   public marketing site, and the shared widgets (tables, badges, buttons,
   forms, stat cards) both draw on. Added 2026-09-22 -- everything above
   this comment is the original Phase 1 auth-flow styling and is left
   untouched so nothing already shipped regresses.
   ---------------------------------------------------------------------- */

.app-main, .public-main {
  min-height: calc(100vh - 140px);
  display: block;
  align-items: unset;
  justify-content: unset;
  padding: 0;
}

.app-shell {
  display: flex;
  align-items: flex-start;
  max-width: 78rem;
  margin: 0 auto;
}

.app-sidebar {
  flex: 0 0 15rem;
  padding: 24px 16px;
  border-right: 1px solid var(--rule);
  position: sticky;
  top: 0;
}

.app-sidebar h2 {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 18px 0 8px;
}

.app-sidebar h2:first-child { margin-top: 0; }

.app-nav { list-style: none; margin: 0; padding: 0; }
.app-nav li { margin: 0; }

.app-nav a {
  display: block;
  padding: 8px 10px;
  border-radius: 4px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.92rem;
}

.app-nav a:hover { background: var(--surface); color: var(--ink); }
.app-nav a.active { background: var(--accent); color: var(--accent-contrast); }

.app-content {
  flex: 1 1 auto;
  min-width: 0;
  padding: 24px 20px 48px;
}

.app-content h1 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  margin: 0 0 4px;
}

.app-content .subtitle { color: var(--ink-3); margin: 0 0 22px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
}

.panel h2 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin: 0 0 14px;
}

.panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 16px 18px;
}

.stat-card .label { font-size: 0.78rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.03em; }
.stat-card .value { font-family: var(--font-serif); font-size: 1.5rem; margin-top: 4px; }
.stat-card .value.positive { color: var(--success); }
.stat-card .value.negative { color: var(--error); }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th, .data-table td {
  text-align: left;
  padding: 9px 10px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.data-table th {
  color: var(--ink-3);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-neutral { background: var(--rule); color: var(--ink-2); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-error { background: var(--error-bg); color: var(--error); }

.btn, button.btn, a.btn {
  display: inline-block;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--accent-contrast);
  border: none;
  border-radius: 4px;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  margin: 0;
  width: auto;
}

.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--rule); }
.btn-danger { background: var(--error); }
.btn-small { padding: 5px 10px; font-size: 0.8rem; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

form.inline-form { display: inline; }

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0 16px;
}

select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
}

textarea { resize: vertical; min-height: 6rem; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0;
  font-size: 0.88rem;
  color: var(--ink-2);
}

.checkbox-row input[type="checkbox"] { margin-top: 3px; }

.empty-state {
  color: var(--ink-3);
  font-size: 0.9rem;
  padding: 18px 0;
}

.breadcrumb { font-size: 0.82rem; color: var(--ink-3); margin-bottom: 10px; }
.breadcrumb a { color: var(--ink-3); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.detail-grid dt { font-size: 0.76rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.03em; }
.detail-grid dd { margin: 2px 0 0; }

@media (max-width: 780px) {
  .app-shell { flex-direction: column; }
  .app-sidebar { position: static; border-right: none; border-bottom: 1px solid var(--rule); width: 100%; flex: none; padding: 16px; }
  .app-content { padding: 20px 16px 40px; }
}

/* --- Public marketing site (Phase 3) --- */

.public-nav {
  max-width: 78rem;
  margin: 0 auto;
  padding: 4px 20px 14px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.public-nav a { color: var(--ink-2); text-decoration: none; font-size: 0.92rem; }
.public-nav a:hover { color: var(--accent); }

.hero {
  max-width: 78rem;
  margin: 0 auto;
  padding: 48px 20px 36px;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 14px;
  max-width: 40rem;
}

.hero .lede { font-size: 1.1rem; color: var(--ink-2); max-width: 38rem; }

.section {
  max-width: 78rem;
  margin: 0 auto;
  padding: 32px 20px;
  border-top: 1px solid var(--rule);
}

.section h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin: 0 0 16px;
}

.prose { max-width: 42rem; }
.prose p { margin: 0 0 14px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 20px;
  margin-top: 18px;
}

.team-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 18px; }
.team-card h3 { font-family: var(--font-serif); margin: 0 0 4px; font-size: 1.05rem; }
.team-card .role { color: var(--ink-3); font-size: 0.85rem; margin: 0 0 10px; }

.gate-notice {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  padding: 14px 16px;
  font-size: 0.9rem;
  margin-bottom: 18px;
}

/* ----------------------------------------------------------------------
   Site chrome + homepage redesign (2026-09-24, "nature / brand-forward").
   Replaces the Phase 6 header/nav/stat-row rules. Everything is driven by
   CSS classes -- no inline style="" anywhere (the CSP blocks them).
   ---------------------------------------------------------------------- */

:root {
  --h-sky-1: #fbf6e6;
  --h-sky-2: #f1e3bb;
  --h-sun: #f0b50a;
  --h-ridge-3: #cdd6c0;
  --h-ridge-2: #9fb59b;
  --h-forest: #6f9074;
  --h-ground: #3f6b4b;
  --h-soil: #f0e7d1;
  --h-soil-line: #d9c9a4;
  --h-root: #8b6b4e;
  --h-bark: #6b4a34;
  --h-pine: #1d472f;
  --h-pine-shade: #153823;
  --h-mist: #f2ecdc;
  --h-ring: #b99a72;
  --h-forest-deep: #13301f;
  --h-on-deep: #f5efdf;
  --h-shadow: 0 30px 60px -30px rgba(29, 71, 47, 0.45);
  --header-bg: rgba(250, 247, 238, 0.86);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --h-sky-1: #0f1813;
    --h-sky-2: #1a2a20;
    --h-sun: #e9c14a;
    --h-ridge-3: #213629;
    --h-ridge-2: #2a4634;
    --h-forest: #34573f;
    --h-ground: #1f3c2a;
    --h-soil: #1b1712;
    --h-soil-line: #3a3024;
    --h-root: #8a6a4d;
    --h-bark: #8a6448;
    --h-pine: #3f7d57;
    --h-pine-shade: #306848;
    --h-mist: #1c1914;
    --h-ring: #6e5b44;
    --h-forest-deep: #0c1d13;
    --h-on-deep: #f1ece2;
    --h-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
    --header-bg: rgba(22, 19, 15, 0.86);
  }
}

:root[data-theme="dark"] {
  --h-sky-1: #0f1813;
  --h-sky-2: #1a2a20;
  --h-sun: #e9c14a;
  --h-ridge-3: #213629;
  --h-ridge-2: #2a4634;
  --h-forest: #34573f;
  --h-ground: #1f3c2a;
  --h-soil: #1b1712;
  --h-soil-line: #3a3024;
  --h-root: #8a6a4d;
  --h-bark: #8a6448;
  --h-pine: #3f7d57;
  --h-pine-shade: #306848;
  --h-mist: #1c1914;
  --h-ring: #6e5b44;
  --h-forest-deep: #0c1d13;
  --h-on-deep: #f1ece2;
  --h-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
  --header-bg: rgba(22, 19, 15, 0.86);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
a:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: 6px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* --- Header ----------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: block;
  padding: 0;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--rule);
  box-shadow: 0 8px 24px -18px rgba(0, 0, 0, 0.35);
}

.header-inner {
  max-width: 76rem;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { gap: 10px; flex: none; }
.brand-mark { width: 34px; height: 34px; }
.brand-name { font-size: 1.12rem; letter-spacing: -0.01em; white-space: nowrap; }
.brand-suffix { color: var(--ink-3); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-hint { margin: 0; }

.icon-btn,
#theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { border-color: var(--accent); }

.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-moon { display: block; }
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-moon { display: none; }
  :root:not([data-theme="light"]) .icon-sun { display: block; }
}

.site-header .public-nav {
  max-width: none;
  margin: 0 0 0 auto;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 22px;
}

.site-header .public-nav + .header-actions { margin-left: 0; }

.public-nav a {
  position: relative;
  padding: 4px 0;
  color: var(--ink-2);
  font-size: 0.93rem;
  text-decoration: none;
  white-space: nowrap;
}

.public-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transition: right 0.22s ease;
}

.public-nav a:hover { color: var(--ink); }
.public-nav a:hover::after,
.public-nav a[aria-current="page"]::after { right: 0; }
.public-nav a[aria-current="page"] { color: var(--ink); }

.public-nav a.nav-cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.public-nav a.nav-cta::after { display: none; }
.public-nav a.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 18px -8px var(--accent); color: var(--accent-contrast); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  margin: 0 auto;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* The full link row needs ~1100px; below that the menu becomes a
   dropdown panel. Without JS the panel is simply always open (the
   .js-ready guard), so no link is ever unreachable. */
@media (max-width: 1100px) {
  .header-inner { position: relative; }
  .nav-toggle { display: inline-flex; }
  .site-header .public-nav + .header-actions { margin-left: auto; }

  .site-header .public-nav {
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
  }

  .js-ready .site-header .public-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 18px 30px -24px rgba(0, 0, 0, 0.4);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height 0.28s ease, padding 0.28s ease, visibility 0s linear 0.28s;
  }

  .js-ready .site-header .public-nav.is-open {
    max-height: 32rem;
    padding: 8px 20px 20px;
    visibility: visible;
    transition: max-height 0.28s ease, padding 0.28s ease;
  }

  .header-inner { flex-wrap: wrap; }
  .js-ready .header-inner { flex-wrap: nowrap; }

  .public-nav a { padding: 12px 0; font-size: 1.02rem; border-bottom: 1px solid var(--rule); }
  .public-nav a::after { display: none; }
  .public-nav a[aria-current="page"] { color: var(--accent); }
  .public-nav a.nav-cta { margin-top: 14px; text-align: center; border-bottom: none; padding: 12px 18px; }
}

@media (max-width: 420px) {
  .brand-suffix { display: none; }
  .header-inner { gap: 12px; padding: 12px 16px; }
}

/* --- Footer ----------------------------------------------------------- */

.site-footer {
  max-width: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  font-size: 0.8rem;
  color: var(--ink-3);
}

.footer-top {
  max-width: 76rem;
  margin: 0 auto;
  padding: 40px 20px 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { border-radius: 50%; }
.footer-brand strong { display: block; font-family: var(--font-serif); font-size: 1.05rem; color: var(--ink); font-weight: 400; }
.footer-brand span { font-size: 0.82rem; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
.footer-nav a { color: var(--ink-2); text-decoration: none; font-size: 0.88rem; }
.footer-nav a:hover { color: var(--accent); }

.footer-legal {
  max-width: 76rem;
  margin: 0 auto;
  padding: 18px 20px 28px;
  border-top: 1px solid var(--rule);
  line-height: 1.6;
}

/* --- Shared: other public pages ---------------------------------------- */

.btn.btn-secondary, a.btn.btn-secondary, button.btn.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}

.hero { position: relative; overflow: hidden; }
.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 60%;
  background: radial-gradient(60% 60% at 30% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.team-card { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.team-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08); border-color: var(--accent); }

.btn, button.btn, a.btn { transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease; }
.btn:hover, button.btn:hover, a.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12); opacity: 0.95; }
.btn:active, button.btn:active, a.btn:active { transform: translateY(0); box-shadow: none; }

/* --- Scroll reveal (JS adds .js-ready, then .is-visible per element) ---- */

.js-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js-ready .reveal.is-visible { opacity: 1; transform: none; }

/* --- Homepage ---------------------------------------------------------- */

.home { overflow-x: clip; }
.home .wrap { max-width: 76rem; margin: 0 auto; padding: 0 20px; }
.home h1, .home h2, .home h3 { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.02em; }

.h-eyebrow, .h-kicker {
  margin: 0 0 14px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.h-eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.h-eyebrow::before { content: ''; width: 28px; height: 2px; border-radius: 2px; background: var(--h-sun); }

/* Hero */
.h-hero {
  position: relative;
  padding: clamp(32px, 6vw, 72px) 0 clamp(40px, 6vw, 64px);
  background:
    radial-gradient(circle 380px at 78% 48%, color-mix(in srgb, var(--h-sun) 14%, transparent), transparent 100%),
    var(--paper);
}

.h-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.h-hero h1 {
  margin: 0 0 22px;
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
  line-height: 1.04;
}
.h-hero h1 em { font-style: italic; color: var(--accent); }

.h-lede p { margin: 0 0 12px; font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.65; color: var(--ink-2); max-width: 34rem; }

.h-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin: 28px 0 36px; }

.h-btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 14px 28px -16px var(--accent);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.h-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 32px -14px var(--accent); }

.h-btn-light { background: var(--h-on-deep); color: var(--h-forest-deep); box-shadow: none; }
.h-btn-light:hover { box-shadow: 0 16px 30px -16px rgba(0, 0, 0, 0.6); }

.h-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  padding-bottom: 2px;
}
.h-link span { transition: transform 0.2s ease; }
.h-link:hover { color: var(--accent); border-bottom-color: var(--accent); }
.h-link:hover span { transform: translateX(4px); }

.h-facts {
  list-style: none;
  margin: 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.h-facts li { display: flex; flex-direction: column; gap: 4px; padding-left: 14px; border-left: 2px solid var(--h-sun); }
.h-facts strong { font-family: var(--font-serif); font-weight: 400; font-size: 1.3rem; color: var(--ink); line-height: 1.2; }
.h-facts span { font-size: 0.78rem; color: var(--ink-3); line-height: 1.35; }

/* Hero illustration */
.h-hero-art {
  position: relative;
  aspect-ratio: 600 / 560;
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--h-sky-1) 0%, var(--h-sky-2) 70%);
  box-shadow: var(--h-shadow);
  isolation: isolate;
}
.h-hero-art svg { display: block; width: 100%; height: 100%; }

.h-sun { fill: var(--h-sun); }
.h-sun-halo { fill: var(--h-sun); opacity: 0.18; transform-box: fill-box; transform-origin: center; animation: h-glow 6s ease-in-out infinite alternate; }
.h-ridge-3 { fill: var(--h-ridge-3); }
.h-ridge-2 { fill: var(--h-ridge-2); }
.h-forest { fill: var(--h-forest); }
.h-ground { fill: var(--h-ground); }
.h-soil { fill: var(--h-soil); }
.h-pebble { fill: var(--h-soil-line); }
.h-soil-line { stroke: var(--h-soil-line); stroke-width: 2; fill: none; }
.h-bark { fill: var(--h-bark); }
.h-pine { fill: var(--h-pine); }
.h-pine-shade { fill: var(--h-pine-shade); }
.h-small-pine .h-pine { fill: var(--h-forest); }
.h-small-pine .h-bark { fill: var(--h-forest); }

.h-root {
  fill: none;
  stroke: var(--h-root);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: h-grow 2.4s cubic-bezier(0.3, 0.6, 0.3, 1) 0.3s forwards;
}
.h-root-thin { stroke-width: 2.4; animation-delay: 1.2s; }

.h-crown { transform-box: view-box; transform-origin: 290px 380px; animation: h-sway 8s ease-in-out infinite alternate; }

@keyframes h-grow { to { stroke-dashoffset: 0; } }
@keyframes h-sway { from { transform: rotate(-0.9deg); } to { transform: rotate(0.9deg); } }
@keyframes h-glow { from { transform: scale(0.94); opacity: 0.14; } to { transform: scale(1.06); opacity: 0.24; } }

/* Section dividers + rhythm */
.h-divider { line-height: 0; background: var(--paper); }
.h-divider svg { display: block; width: 100%; height: clamp(36px, 5vw, 80px); }
.h-divider-to-mist path { fill: var(--h-mist); }

.h-section { padding: clamp(64px, 9vw, 120px) 0; }
.h-mist { background: var(--h-mist); }

.h-head { max-width: 36rem; margin-bottom: 44px; }
.h-section h2 { margin: 0 0 16px; font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.12; }
.h-sub { color: var(--ink-2); font-size: 1.05rem; margin: 0 0 22px; }

/* About / tree rings */
.h-story { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.h-rings { text-align: center; }
.h-rings svg { width: min(100%, 340px); height: auto; }
.h-ring { fill: none; stroke: var(--h-ring); stroke-width: 1.6; stroke-dasharray: 1; stroke-dashoffset: 0; }
.h-ring:nth-child(odd) { stroke-width: 2.6; }
.h-pith { fill: var(--h-root); }
.js-ready .h-rings .h-ring { stroke-dashoffset: 1; }
.js-ready .h-rings.is-visible .h-ring { animation: h-grow 1.6s ease forwards; }
.js-ready .h-rings.is-visible .h-ring:nth-child(8) { animation-delay: 0s; }
.js-ready .h-rings.is-visible .h-ring:nth-child(7) { animation-delay: 0.12s; }
.js-ready .h-rings.is-visible .h-ring:nth-child(6) { animation-delay: 0.24s; }
.js-ready .h-rings.is-visible .h-ring:nth-child(5) { animation-delay: 0.36s; }
.js-ready .h-rings.is-visible .h-ring:nth-child(4) { animation-delay: 0.48s; }
.js-ready .h-rings.is-visible .h-ring:nth-child(3) { animation-delay: 0.6s; }
.js-ready .h-rings.is-visible .h-ring:nth-child(2) { animation-delay: 0.72s; }
.js-ready .h-rings.is-visible .h-ring:nth-child(1) { animation-delay: 0.84s; }
.h-rings-caption { margin: 14px 0 0; font-family: var(--font-serif); font-style: italic; color: var(--ink-3); }

.h-prose p { margin: 0 0 16px; color: var(--ink-2); font-size: 1.04rem; line-height: 1.75; }
.h-prose a { color: var(--accent); }

/* Roots -> canopy steps */
.h-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  counter-reset: step;
}

.h-step {
  position: relative;
  padding: 30px 28px 32px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 22px;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.h-step:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); box-shadow: var(--h-shadow); }
.h-step:nth-child(2) { transition-delay: 0.08s; }
.h-step:nth-child(3) { transition-delay: 0.16s; }
.h-step:hover { transition-delay: 0s; }

.h-step-icon {
  width: 52px;
  height: 52px;
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.h-step-num { margin: 0 0 8px; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }
.h-step h3 { margin: 0 0 10px; font-size: 1.4rem; }
.h-step p:last-child { margin: 0; color: var(--ink-2); }

/* Split sections: people, eligibility */
.h-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 88px); align-items: center; }
.h-split .h-head { margin-bottom: 0; }

.h-people { display: grid; gap: 16px; }
.h-person {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 20px;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.h-person:hover { transform: translateX(6px); border-color: var(--accent); }
.h-monogram {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--h-forest-deep);
  color: var(--h-sun);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.h-person-text strong { display: block; font-family: var(--font-serif); font-weight: 400; font-size: 1.25rem; }
.h-person-text span { color: var(--ink-3); font-size: 0.9rem; }

.h-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.h-checks li {
  position: relative;
  padding: 18px 20px 18px 60px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 18px;
}
.h-checks li::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 20px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
}
.h-checks li::after {
  content: '';
  position: absolute;
  left: 28px;
  top: 25px;
  width: 6px;
  height: 11px;
  border: solid var(--accent-contrast);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.h-checks strong { display: block; font-size: 1.02rem; }
.h-checks span { color: var(--ink-3); font-size: 0.9rem; }

/* Closing call to action */
.h-cta { position: relative; background: var(--h-forest-deep); color: var(--h-on-deep); padding: 0 0 clamp(72px, 9vw, 112px); margin-top: clamp(40px, 6vw, 80px); }
.h-treeline { line-height: 0; transform: translateY(-99%); position: absolute; left: 0; right: 0; top: 0; }
.h-treeline svg { display: block; width: 100%; height: clamp(40px, 6vw, 90px); }
.h-treeline path { fill: var(--h-forest-deep); }
.h-cta-inner { padding-top: clamp(40px, 6vw, 72px); text-align: center; }
.h-cta h2 { margin: 0 0 16px; font-size: clamp(2rem, 4vw, 3.1rem); color: var(--h-on-deep); }
.h-cta p { max-width: 34rem; margin: 0 auto 30px; color: color-mix(in srgb, var(--h-on-deep) 78%, transparent); font-size: 1.05rem; }

/* Homepage responsive */
@media (max-width: 960px) {
  .h-hero-grid, .h-story, .h-split { grid-template-columns: minmax(0, 1fr); }
  .h-hero-art { max-width: 560px; width: 100%; justify-self: center; border-radius: 26px; }
  .h-steps { grid-template-columns: minmax(0, 1fr); }
  .h-rings svg { width: min(62%, 240px); }
  .h-rings { order: 2; }
}

@media (max-width: 560px) {
  .h-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
  .h-cta-row { gap: 18px; }
  .h-btn { width: 100%; justify-content: center; }
  .h-step { padding: 24px 22px 26px; }
  .h-checks li { padding-left: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  .js-ready .reveal { opacity: 1; transform: none; transition: none; }
  .h-root, .h-ring, .js-ready .h-rings .h-ring { animation: none; stroke-dashoffset: 0; }
  .h-crown, .h-sun-halo { animation: none; }
  .h-step, .h-person, .h-btn, .h-link span { transition: none; }
}
.site-footer > .footer-legal:first-child { border-top: none; }
