﻿/* ==========================================================================
   River Valley Robotics — site styles
   Palette: Falcon green, ink black, cool paper, falcon silver
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/barlow-condensed-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/barlow-condensed-700.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/fonts/barlow-condensed-800.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fonts/inter-var.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --ink: #101512;
  --ink-2: #171d19;
  --forest: #173d20;
  --forest-2: #0f2c17;
  --green: #1f5c2e;
  --green-bright: #2f8a4b;
  --green-wash: #e6f0e9;
  --accent: #8fca9f;
  --accent-bright: #b8e3c4;
  --accent-soft: #eaf4ed;
  --accent-deep: #23643a;
  --silver: #c9d0cc;
  --silver-bright: #eef1ef;
  --paper: #f3f5f2;
  --paper-2: #e8ece8;
  --white: #ffffff;
  --muted: #5a665e;
  --muted-light: #a9b4ac;
  --line: rgba(16, 21, 18, 0.14);
  --line-strong: rgba(16, 21, 18, 0.28);
  --line-dark: rgba(255, 255, 255, 0.16);
  --line-dark-strong: rgba(255, 255, 255, 0.32);
  --danger: #b3261e;
  --container: 1200px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --radius: 3px;
  --radius-lg: 6px;
  --font-display: "Barlow Condensed", "Arial Narrow", "Franklin Gothic Medium", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(8, 13, 10, 0.08);
  --shadow-md: 0 18px 40px -18px rgba(8, 13, 10, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

[id] { scroll-margin-top: 100px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

img,
svg,
video { max-width: 100%; display: block; }

img { height: auto; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.1em; padding-left: 1.2em; }
ul:last-child, ol:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

h1 { font-size: clamp(3.2rem, 9vw, 7.4rem); font-weight: 800; }
h2 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); letter-spacing: 0.02em; }
h4 { font-size: 1.05rem; letter-spacing: 0.04em; }

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

:focus-visible {
  outline: 3px solid var(--green-bright);
  outline-offset: 3px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 999;
  transform: translateY(-150%);
  background: var(--accent);
  color: var(--ink);
  padding: 0.8rem 1.1rem;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

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

/* ---------- Layout utilities ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide { max-width: 1440px; }

.section {
  position: relative;
  padding-block: clamp(4rem, 8vw, 7.5rem);
}

.section--tight { padding-block: clamp(3rem, 5vw, 4.5rem); }

.section--dark {
  background: var(--ink);
  color: var(--white);
}

.section--forest {
  background: var(--forest);
  color: var(--white);
}

.section--paper { background: var(--paper); }
.section--paper-2 { background: var(--paper-2); }
.section--white { background: var(--white); }

.section--grid::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 70% 20%, #000 10%, transparent 70%);
}

.section--grid-light::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(8, 13, 10, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 13, 10, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 20% 0%, #000 5%, transparent 65%);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.6vw, 2rem);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.stack > * + * { margin-top: var(--stack-gap, 1.25rem); }

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

.rule--dark { background: var(--line-dark); }

/* ---------- Text bits ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.15rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--green);
}
.kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--green-bright);
  flex: none;
}
.section--dark .kicker,
.section--forest .kicker { color: var(--accent); }

.lead {
  font-size: clamp(1.08rem, 1.65vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink);
  max-width: 58ch;
}
.section--dark .lead,
.section--forest .lead { color: rgba(255, 255, 255, 0.82); }

.muted { color: var(--muted); }
.section--dark .muted,
.section--forest .muted { color: var(--muted-light); }

.small {
  font-size: 0.82rem;
  line-height: 1.55;
}

.mono-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.4fr);
  gap: clamp(1.25rem, 4vw, 4rem);
  align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.section-head h2 { max-width: 15ch; }
.section-head .head-copy { max-width: 62ch; }
.section-head--center {
  display: block;
  max-width: 780px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: clamp(2.25rem, 4vw, 3.5rem);
}
.section-head--center .kicker { justify-content: center; }
.section-head--center h2 { max-width: none; margin-inline: auto; }
.section-head--center .head-copy { margin: 1.25rem auto 0; }

.heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(1.75rem, 3vw, 2.75rem);
}

.index-label {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.section--dark .index-label,
.section--forest .index-label { color: rgba(255, 255, 255, 0.5); }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--ink);
  --btn-bd: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 50px;
  padding: 0.85rem 1.35rem;
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.15;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover {
  --btn-bg: var(--accent-bright);
  --btn-bd: var(--accent-bright);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }

.btn .btn-arrow {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 0.25s var(--ease);
}
.btn:hover .btn-arrow { transform: translateX(4px); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--white);
  --btn-bd: rgba(255, 255, 255, 0.55);
}
.btn--ghost:hover {
  --btn-bg: var(--white);
  --btn-fg: var(--ink);
  --btn-bd: var(--white);
}

.btn--dark {
  --btn-bg: var(--forest);
  --btn-fg: var(--white);
  --btn-bd: var(--forest);
}
.btn--dark:hover {
  --btn-bg: var(--green);
  --btn-bd: var(--green);
}

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line-strong);
}
.btn--outline:hover {
  --btn-bg: var(--ink);
  --btn-fg: var(--white);
  --btn-bd: var(--ink);
}

.btn--sm {
  min-height: 42px;
  padding: 0.65rem 1rem;
  font-size: 0.7rem;
}

.btn--block { width: 100%; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-deep);
  padding-bottom: 0.3rem;
}
.text-link:hover { color: var(--green); }
.text-link svg { width: 15px; height: 15px; transition: transform 0.25s var(--ease); }
.text-link:hover svg { transform: translateX(4px); }

.section--dark .text-link,
.section--forest .text-link { color: var(--white); }
.section--dark .text-link:hover,
.section--forest .text-link:hover { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  color: var(--white);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
    backdrop-filter 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled,
.site-header.is-solid {
  background: rgba(8, 13, 10, 0.94);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--white);
  text-decoration: none;
  flex: none;
}
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-logo { height: 46px; width: auto; flex: none; }
.brand--footer { display: inline-block; }
.brand-logo--footer { width: clamp(170px, 16vw, 210px); height: auto; }
.brand-type {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
}
.brand-type em {
  font-style: normal;
  color: var(--accent);
}
.brand-type small {
  font-family: var(--font-body);
  font-size: 0.52rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
}
.nav a {
  position: relative;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.55rem 0;
  transition: color 0.2s ease;
}
.nav a:hover,
.nav a[aria-current="page"] { color: var(--white); }
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: none;
}
.header-actions .btn { min-height: 42px; padding: 0.6rem 1rem; font-size: 0.68rem; }

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  color: var(--white);
  cursor: pointer;
}
.nav-toggle-bars {
  position: relative;
  width: 18px;
  height: 12px;
}
.nav-toggle-bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s ease;
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 5px; }
.nav-toggle-bars span:nth-child(3) { top: 10px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Mobile panel */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem var(--gutter) 2.5rem;
  background:
    radial-gradient(ellipse at 80% 10%, rgba(29, 107, 64, 0.5), transparent 60%),
    var(--ink);
  color: var(--white);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s var(--ease);
}
.mobile-nav.is-open { opacity: 1; visibility: visible; }
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.mobile-nav a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  font-family: var(--font-display);
  font-size: clamp(2rem, 8vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
}
.mobile-nav a span {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--accent);
}
.mobile-nav a[aria-current="page"] { color: var(--accent); }
.mobile-nav-footer {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.mobile-nav-footer .btn { flex: 1 1 auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-top: 120px;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 45%;
  filter: grayscale(1) contrast(1.05);
  opacity: 0.5;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 13, 10, 0.97) 0%, rgba(8, 13, 10, 0.86) 42%, rgba(8, 13, 10, 0.28) 100%),
    linear-gradient(0deg, var(--ink) 0%, rgba(8, 13, 10, 0) 45%),
    linear-gradient(180deg, rgba(8, 13, 10, 0.7) 0%, transparent 30%);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse at 65% 40%, #000 0%, transparent 72%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
  width: 100%;
  padding-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.hero-main { max-width: 880px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 100px;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(6px);
}
.hero-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(143, 202, 159, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
.hero h1 {
  margin: 0 0 1.4rem;
  font-size: clamp(3.9rem, 11.8vw, 9.6rem);
  font-weight: 800;
  line-height: 0.82;
  letter-spacing: -0.01em;
}
.hero h1 .line { display: block; }
.hero h1 .outline {
  color: transparent;
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.82);
  text-stroke: 2px rgba(255, 255, 255, 0.82);
  padding-left: 0.55em;
}
.hero h1 .accent { color: var(--accent); }
.hero-sub {
  max-width: 54ch;
  margin: 0 0 1.9rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.hero-aside {
  position: relative;
  align-self: end;
  padding: 1.35rem 1.4rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(9, 20, 14, 0.55);
  backdrop-filter: blur(10px);
  border-top: 3px solid var(--accent);
}
.hero-aside-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-aside-label i {
  width: 34px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}
.hero-aside dl {
  margin: 0;
  display: grid;
  gap: 0.7rem;
}
.hero-aside dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.hero-aside dl div:last-child { border-bottom: 0; padding-bottom: 0; }
.hero-aside dt {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.hero-aside dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--white);
  text-align: right;
}
/* ---------- Cards / pillars ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.4rem, 2.4vw, 2rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    border-color 0.35s var(--ease);
}
.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 3px;
  background: var(--green-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(8, 13, 10, 0.24);
}
.card:hover::before { transform: scaleX(1); }

.card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(29, 107, 64, 0.25);
  background: var(--green-wash);
  color: var(--green);
  border-radius: 50%;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { line-height: 1.02; }
.card p { font-size: 0.93rem; color: var(--muted); }
.card ul {
  margin-top: auto;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--ink);
}
.card ul li {
  position: relative;
  padding-left: 1rem;
}
.card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  background: var(--accent-deep);
  transform: rotate(45deg);
}
.card-number {
  position: absolute;
  top: 1.25rem;
  right: 1.4rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: rgba(8, 13, 10, 0.28);
}

.section--dark .card,
.section--forest .card {
  background: rgba(255, 255, 255, 0.035);
  border-color: var(--line-dark);
  color: var(--white);
}
.section--dark .card:hover,
.section--forest .card:hover { border-color: var(--line-dark-strong); background: rgba(255, 255, 255, 0.06); }
.section--dark .card p,
.section--forest .card p { color: rgba(255, 255, 255, 0.66); }
.section--dark .card ul,
.section--forest .card ul { color: rgba(255, 255, 255, 0.86); }
.section--dark .card-icon,
.section--forest .card-icon {
  background: rgba(143, 202, 159, 0.12);
  border-color: rgba(143, 202, 159, 0.3);
  color: var(--accent);
}
.section--dark .card-number,
.section--forest .card-number { color: rgba(255, 255, 255, 0.28); }

/* Feature list (two column with big statement) */
.feature-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.feature-split--top { align-items: start; }
.feature-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
}
.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  filter: saturate(0.78) contrast(1.02);
  transition: transform 0.8s var(--ease);
}
.feature-media:hover img { transform: scale(1.03); }
.feature-media .media-tag {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  background: rgba(8, 13, 10, 0.78);
  color: var(--white);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.feature-media .media-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}
.feature-media--portrait img { aspect-ratio: 3 / 4; }

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin-top: 1.75rem;
  border-top: 1px solid var(--line-dark);
}
.spec {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--line-dark);
  font-size: 0.76rem;
}
.spec:nth-child(odd) { padding-right: 1.25rem; border-right: 1px solid var(--line-dark); }
.spec:nth-child(even) { padding-left: 1.25rem; }
.spec dt { color: rgba(255, 255, 255, 0.6); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.63rem; }
.spec dd { margin: 0; font-weight: 600; color: var(--white); text-align: right; }

.spec-grid--light { border-top-color: var(--line); }
.spec-grid--light .spec { border-bottom-color: var(--line); }
.spec-grid--light .spec:nth-child(odd) { border-right-color: var(--line); }
.spec-grid--light dt { color: var(--muted); }
.spec-grid--light dd { color: var(--ink); }

/* ---------- Sponsors ---------- */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.8rem, 1.6vw, 1.25rem);
  align-items: stretch;
}
.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.35rem, 2.2vw, 1.85rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--forest);
}
.tier-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.tier-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.1rem 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.4rem);
  font-weight: 700;
  line-height: 0.9;
}
.tier-price small { flex-basis: 100%; font-family: var(--font-body); font-size: 0.66rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.72; }
.tier p { font-size: 0.83rem; color: var(--muted); }
.tier ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.8rem;
}
.tier li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.tier li svg { width: 14px; height: 14px; flex: none; margin-top: 0.28em; color: var(--green); }
.tier .btn { margin-top: auto; }

/* ---------- Donations (Hack Club Bank embed) ---------- */
.donate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.donate-points {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  border-top: 1px solid var(--line);
}
.donate-points li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}
.donate-points svg {
  width: 20px;
  height: 20px;
  margin-top: 0.1em;
  color: var(--green);
}
.donate-points strong {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.donate-points span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted);
}
.donate-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem 1.5rem;
  margin-top: 1.75rem;
}
.donate-actions .text-link { color: var(--green); }
.donate-actions .text-link:hover { color: var(--forest); }

.donate-other {
  margin-top: 1.75rem;
  padding: 1.1rem 1.25rem;
  border-left: 3px solid var(--green);
  background: var(--paper);
}
.donate-other h3 { margin-bottom: 0.35rem; font-size: 1.05rem; }
.donate-other p { font-size: 0.88rem; line-height: 1.55; color: var(--muted); }
.donate-other a { color: var(--green); }

.donate-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}
.donate-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}
.donate-panel-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.donate-panel-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}
.donate-hint {
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--accent-deep);
}
.donate-hint strong { color: var(--forest); }
.donate-frame {
  display: block;
  width: 100%;
  height: 930px;
  border: 0;
  background: var(--paper);
}
.donate-panel-note {
  margin: 0;
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.donor-wall-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: end;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.donor-wall-head p { max-width: 58ch; color: rgba(255, 255, 255, 0.72); }
.donor-wall-meta { margin-top: 0.7rem; font-size: 0.7rem; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.5); }
.donor-wall-meta a { color: var(--accent); }

.donor-tier + .donor-tier { margin-top: clamp(1.35rem, 2.5vw, 1.9rem); }
.donor-tier-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.7rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line-dark);
}
.donor-tier-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}
.donor-tier-note {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.donor-tier-count {
  margin-left: auto;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}
.donor-tier[data-tier="partner"] .donor-tier-name,
.donor-tier[data-tier="champion"] .donor-tier-name { color: var(--accent-bright); }

.donor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.donor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.95rem 0.75rem;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}
.donor-card[data-tier="champion"] {
  border-color: rgba(184, 227, 196, 0.5);
  background: rgba(143, 202, 159, 0.12);
}
.donor-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-bright);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.donor-card[data-tier="champion"] .donor-mark { background: var(--accent-bright); color: var(--forest); }
.donor-logo {
  flex: none;
  width: 100%;
  max-width: 104px;
  height: 56px;
  padding: 4px;
  border-radius: 5px;
  background: var(--white);
  object-fit: contain;
}
.donor-body { display: block; width: 100%; min-width: 0; }
.donor-name { font-size: 0.9rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.donor-name[href] { text-decoration-color: rgba(255, 255, 255, 0.35); }
.donor-name[href]:hover { color: var(--accent-bright); }
.donor-wall-empty {
  margin: 0;
  padding: 1.3rem 1.4rem;
  border: 1px dashed var(--line-dark);
  border-radius: var(--radius);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}
.donor-wall-fallback { margin-top: 1rem; }
.donor-wall-fallback[hidden] { display: none; }
.donor-levels { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-top: 1.4rem; }
.donor-levels-label {
  margin-right: 0.2rem;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.donor-wall-note { margin-top: 0.9rem; font-size: 0.7rem; color: rgba(255, 255, 255, 0.45); }

.donor-wall-graph {
  display: block;
  padding: 1.15rem 1.25rem 1.35rem;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: #111315;
  text-decoration: none;
  transition: border-color 0.2s var(--ease);
}
.donor-wall-graph:hover { border-color: var(--accent); }
.donor-wall-label {
  display: block;
  margin-bottom: 0.9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.donor-wall-graph img { width: 100%; height: auto; }

.benefits-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--white);
  -webkit-overflow-scrolling: touch;
}
.benefits {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.benefits th,
.benefits td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.benefits thead th {
  background: var(--forest);
  color: var(--white);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.benefits thead th:first-child { width: 40%; }
.benefits tbody th {
  font-weight: 500;
  color: var(--ink);
  font-size: 0.82rem;
}
.benefits td { text-align: center; color: var(--green); font-weight: 700; }
.benefits tr:last-child th,
.benefits tr:last-child td { border-bottom: 0; }
.benefits tbody tr:nth-child(even) { background: rgba(8, 13, 10, 0.025); }
.benefits .table-price {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ink);
}

/* ---------- Photo grid (home / build) ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.6rem, 1.2vw, 1rem);
}
.photo-grid a {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--ink-2);
  color: var(--white);
  text-decoration: none;
}
.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), opacity 0.4s ease;
}
.photo-grid a:hover img { transform: scale(1.04); opacity: 0.9; }
.photo-grid span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2rem 0.85rem 0.75rem;
  background: linear-gradient(transparent, rgba(16, 21, 18, 0.82));
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(0.6rem, 1.2vw, 1rem);
}
.gallery-item {
  position: relative;
  display: block;
  grid-column: span 4;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink-2);
  border: 0;
  padding: 0;
  cursor: zoom-in;
  text-align: left;
}
.gallery-item--wide { grid-column: span 8; aspect-ratio: 16 / 9; }
.gallery-item--tall { grid-column: span 4; aspect-ratio: 3 / 4; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), opacity 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.04); opacity: 0.9; }
.gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem 1rem 0.9rem;
  background: linear-gradient(transparent, rgba(8, 13, 10, 0.82));
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 1;
  transform: none;
  transition: opacity 0.3s ease, transform 0.3s var(--ease);
}
.gallery-item:hover .gallery-caption,
.gallery-item:focus-visible .gallery-caption { opacity: 1; transform: translateY(-2px); }
.gallery-zoom {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: rgba(8, 13, 10, 0.6);
  color: var(--white);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-zoom { opacity: 1; }
.gallery-zoom svg { width: 16px; height: 16px; }

/* Lightbox */
.lightbox {
  width: min(1080px, calc(100% - 2rem));
  max-height: calc(100svh - 2rem);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--ink);
  color: var(--white);
}
.lightbox::backdrop { background: rgba(4, 8, 5, 0.86); backdrop-filter: blur(4px); }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox-img {
  width: 100%;
  max-height: calc(100svh - 9rem);
  object-fit: contain;
  background: #000;
}
.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}
.lightbox-caption {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
.lightbox-actions { display: flex; gap: 0.5rem; }
.lightbox-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: var(--white);
  cursor: pointer;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.1); }
.lightbox-btn svg { width: 16px; height: 16px; }

/* ---------- Watch / video ---------- */
.video-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.75fr);
  gap: clamp(2rem, 4.5vw, 4.5rem);
  align-items: center;
}
.video-hero {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  color: var(--white);
  text-decoration: none;
}
.video-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), opacity 0.4s ease;
}
.video-hero:hover img { transform: scale(1.03); opacity: 0.92; }
.video-hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(transparent 42%, rgba(8, 13, 10, 0.84));
}
.video-hero-caption {
  position: absolute;
  left: clamp(1rem, 2vw, 1.5rem);
  right: 5rem;
  bottom: clamp(1rem, 2vw, 1.5rem);
  display: grid;
  gap: 0.35rem;
}
.video-hero-caption .mono-label { color: var(--accent); font-size: 0.6rem; }
.video-hero-caption strong {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
}
.video-feature-copy .lead { max-width: 46ch; }
.video-feature .spec-grid { margin-top: 1.5rem; }
.video-feature .text-link { margin-top: 1.5rem; }

.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.video-play svg {
  width: 20px;
  height: 20px;
  padding: 18px;
  box-sizing: content-box;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(8, 13, 10, 0.66);
  color: var(--white);
  backdrop-filter: blur(6px);
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s var(--ease);
}
.video-play--lg svg { width: 26px; height: 26px; padding: 24px; }
.video-card:hover .video-play svg,
.video-hero:hover .video-play svg {
  background: var(--accent);
  color: var(--ink);
  transform: scale(1.04);
}

.video-duration {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  padding: 0.3rem 0.45rem;
  background: rgba(8, 13, 10, 0.82);
  color: var(--white);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  line-height: 1;
}
.video-source {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.5rem;
  background: rgba(8, 13, 10, 0.78);
  color: var(--white);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
}
.video-source svg { width: 13px; height: 13px; }

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.video-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.video-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.25s ease, transform 0.25s var(--ease), box-shadow 0.25s ease;
}
.video-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.video-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink-2);
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), opacity 0.4s ease;
}
.video-card:hover .video-thumb img { transform: scale(1.04); opacity: 0.9; }
.video-card-body {
  display: grid;
  gap: 0.35rem;
  padding: 0.95rem 1rem 1.1rem;
}
.video-card-title {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.video-card-title em { font-style: normal; color: var(--green); padding-inline: 0.12em; }
.video-card-meta {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Video player dialog */
.video-modal {
  width: min(1080px, calc(100% - 2rem));
  max-height: calc(100svh - 2rem);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--ink);
  color: var(--white);
}
.video-modal::backdrop { background: rgba(4, 8, 5, 0.88); backdrop-filter: blur(4px); }
.video-modal[open] { display: flex; flex-direction: column; }
.video-modal-stage { position: relative; flex: 0 1 auto; min-height: 0; background: #000; }
.video-modal-video {
  display: block;
  width: 100%;
  max-height: calc(100svh - 12rem);
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000;
}
.video-modal-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100svh - 12rem);
  background: #000;
}
.video-modal-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(8, 13, 10, 0.72);
  color: var(--white);
  cursor: pointer;
  backdrop-filter: blur(6px);
}
.video-modal-close:hover { background: rgba(255, 255, 255, 0.12); }
.video-modal-close svg { width: 16px; height: 16px; }
.video-modal-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 1.15rem 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.video-modal-copy { max-width: 62ch; }
.video-modal-copy .mono-label { color: var(--accent); font-size: 0.6rem; }
.video-modal-title { margin: 0.3rem 0 0.4rem; font-size: clamp(1.4rem, 2.4vw, 1.9rem); color: var(--white); }
.video-modal-desc { margin: 0; font-size: 0.8rem; color: rgba(255, 255, 255, 0.65); }
.video-modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.6rem; flex-wrap: wrap; }
.video-modal-nav { display: flex; gap: 0.4rem; }
.video-modal-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: var(--white);
  cursor: pointer;
}
.video-modal-btn:hover { background: rgba(255, 255, 255, 0.1); }
.video-modal-btn svg { width: 16px; height: 16px; }
#video-modal-link { min-height: 40px; white-space: nowrap; }
#video-modal-link svg { width: 15px; height: 15px; flex: none; }
.video-modal [hidden] { display: none !important; }

@media (max-width: 1100px) {
  .video-grid,
  .video-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .video-feature { grid-template-columns: 1fr; }
  .video-feature-copy { max-width: 620px; }
}
@media (max-width: 760px) {
  .video-grid,
  .video-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-modal { width: calc(100% - 1rem); max-height: calc(100svh - 1rem); }
  .video-modal-video,
  .video-modal-embed { max-height: calc(100svh - 16rem); }
  .video-modal-bar { flex-direction: column; align-items: flex-start; }
  .video-modal-actions { width: 100%; justify-content: space-between; }
  .video-hero-caption { right: 4rem; }
}
@media (max-width: 560px) {
  .video-grid,
  .video-grid--four { grid-template-columns: 1fr; }
}

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 7vw, 6rem);
  background: var(--forest);
  color: var(--white);
  isolation: isolate;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 85% 20%, rgba(143, 202, 159, 0.16), transparent 45%),
    linear-gradient(120deg, transparent 40%, rgba(0, 0, 0, 0.25));
}
.cta-band::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -5%;
  z-index: -1;
  width: min(560px, 60vw);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(255, 255, 255, 0.025), 0 0 0 120px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}
.cta-band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  gap: 2rem;
  align-items: center;
}
.cta-band h2 { max-width: 15ch; }
.cta-band p { max-width: 52ch; color: rgba(255, 255, 255, 0.72); margin-top: 1rem; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: flex-end; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.66);
  padding-top: clamp(3rem, 6vw, 5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 0.65fr));
  gap: clamp(1.75rem, 3.5vw, 3rem);
  padding-bottom: clamp(2.5rem, 4vw, 3.5rem);
}
.footer-brand { max-width: 340px; }
.footer-brand .brand { margin-bottom: 1.15rem; }
.footer-brand p { font-size: 0.84rem; color: rgba(255, 255, 255, 0.62); max-width: 32ch; }
.footer-brand .footer-meetings {
  margin-top: 0.65rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}
.footer-col h4 {
  margin-bottom: 0.9rem;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.footer-col a {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
}
.footer-col a:hover { color: var(--white); text-decoration: underline; text-decoration-color: var(--accent); }
.footer-col address { font-style: normal; font-size: 0.84rem; line-height: 1.7; }
.footer-socials { display: flex; gap: 0.5rem; margin-top: 1.15rem; }
.footer-socials a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.72);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.footer-socials a:hover { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.footer-socials svg { width: 16px; height: 16px; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  padding-block: 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
}
.footer-bottom p { margin: 0; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-legal a { color: inherit; }
.footer-legal a:hover { color: var(--white); }
.footer-nondiscrimination {
  padding: 1.5rem 0 2rem;
  font-size: 0.66rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.42);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-nondiscrimination p { margin: 0; max-width: 110ch; }

/* ---------- Page hero (sub pages) ---------- */
.page-hero {
  position: relative;
  padding-top: clamp(9rem, 16vw, 12rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 78% 15%, rgba(29, 107, 64, 0.5), transparent 55%),
    radial-gradient(circle at 10% 100%, rgba(143, 202, 159, 0.1), transparent 40%);
}
.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 80% 20%, #000 0%, transparent 70%);
}
.page-hero .kicker { color: var(--accent); }
.page-hero h1 {
  max-width: 18ch;
  margin: 0 0 1.25rem;
  font-size: clamp(3rem, 7.5vw, 6.2rem);
}
.page-hero .lead { max-width: 62ch; color: rgba(255, 255, 255, 0.78); }
.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 2rem;
  align-items: end;
}
.page-hero-aside {
  padding: 1.15rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(6px);
}
.page-hero-aside strong {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.page-hero-aside p { margin: 0; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.breadcrumbs a { text-decoration: none; color: inherit; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span { color: rgba(255, 255, 255, 0.26); }

/* ---------- Forms ---------- */
.form-card {
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--forest);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.field label .optional { color: var(--muted); font-weight: 500; letter-spacing: 0.04em; text-transform: none; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(29, 107, 64, 0.13);
}
.field-hint { font-size: 0.7rem; color: var(--muted); }
.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
}
.form-note { font-size: 0.7rem; color: var(--muted); max-width: 40ch; }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.15rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.2;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--green);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  max-width: 75ch;
  padding: 0 0 1.25rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.section--dark .faq,
.section--forest .faq { border-color: var(--line-dark); }
.section--dark .faq details,
.section--forest .faq details { border-color: var(--line-dark); }
.section--dark .faq summary,
.section--forest .faq summary { color: var(--white); }
.section--dark .faq details p,
.section--forest .faq details p { color: rgba(255, 255, 255, 0.64); }

/* ---------- Info rows ---------- */
.info-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.info-row {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}
.info-row dt {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.2rem;
}
.info-row dd { margin: 0; }
.section--dark .info-list,
.section--forest .info-list { border-color: var(--line-dark); }
.section--dark .info-row,
.section--forest .info-row { border-color: var(--line-dark); }
.section--dark .info-row dt,
.section--forest .info-row dt { color: rgba(255, 255, 255, 0.55); }

/* ---------- Quote / callout ---------- */
.callout {
  position: relative;
  padding: clamp(1.4rem, 3vw, 2rem);
  border-left: 3px solid var(--accent-deep);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}
.callout--light {
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-deep);
  color: var(--ink);
}
.section--dark .callout,
.section--forest .callout { border-left-color: var(--accent); }

/* ---------- Team role cards ---------- */
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.role-grid--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .role-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .role-grid--four { grid-template-columns: 1fr; }
}
.role {
  padding: 1.6rem 1.4rem;
  background: var(--paper);
}
.role h3 { font-size: 1.2rem; margin-bottom: 0.55rem; }
.role p { font-size: 0.86rem; color: var(--muted); }
.role .role-tag {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.28rem 0.5rem;
  border: 1px solid var(--line-strong);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}

/* ---------- Cost box (sponsors) ---------- */
.cost-box {
  padding: clamp(1.4rem, 2.5vw, 1.9rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
}
.cost-box h3 { margin-bottom: 0.25rem; }
.cost-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.55rem;
}
.cost-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.84rem;
}
.cost-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.cost-list li span:last-child { font-weight: 650; color: var(--ink); white-space: nowrap; }

.check-icon { width: 16px; height: 16px; color: var(--green); flex: none; margin-top: 0.28em; }

/* ---------- Sponsor CTA mini ---------- */
.sponsor-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  gap: 2rem;
  align-items: center;
  padding: clamp(1.75rem, 4vw, 3rem);
  background: var(--forest);
  color: var(--white);
}
.sponsor-cta h2 { max-width: 16ch; font-size: clamp(2rem, 4vw, 3.2rem); color: var(--white); }
.sponsor-cta p { max-width: 52ch; margin-top: 0.9rem; color: rgba(255, 255, 255, 0.72); }
.sponsor-cta .kicker { color: var(--accent); }
.sponsor-cta-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; justify-content: flex-end; }
.sponsor-cta .kicker::before { background: currentColor; }
.sponsor-cta .btn--dark { --btn-bg: var(--ink); --btn-fg: var(--white); --btn-bd: var(--ink); }
.sponsor-cta .btn--dark:hover { --btn-bg: var(--green); --btn-bd: var(--green); }
.sponsor-cta .btn--ghost { --btn-fg: var(--white); --btn-bd: rgba(255, 255, 255, 0.45); }
.sponsor-cta .btn--ghost:hover { --btn-bg: var(--white); --btn-fg: var(--ink); --btn-bd: var(--white); }

/* ---------- Timeline (about) ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline-item {
  position: relative;
  padding-top: 1.5rem;
  border-top: 2px solid var(--line-strong);
}
.timeline-item::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green-bright);
}
.timeline-date {
  display: block;
  margin-bottom: 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}
.timeline-item h3 { font-size: 1.15rem; }
.timeline-item p { margin-top: 0.45rem; font-size: 0.86rem; color: var(--muted); }

/* ---------- Small helpers ---------- */
.tag-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
}
.tag--accent { border-color: rgba(35, 100, 58, 0.4); color: var(--accent-deep); background: rgba(35, 100, 58, 0.07); }
.tag--dark { border-color: var(--line-dark); color: rgba(255, 255, 255, 0.7); background: transparent; }

.photo-credit {
  margin-top: 1.25rem;
  font-size: 0.62rem;
  color: var(--muted);
}
.section--dark .photo-credit,
.section--forest .photo-credit { color: rgba(255, 255, 255, 0.55); }

/* ---------- Reveal animation ---------- */
.reveal {
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(143, 202, 159, 0.16); }
  50% { box-shadow: 0 0 0 7px rgba(143, 202, 159, 0.04); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-aside { max-width: 420px; margin-top: 0.5rem; }
  .footer-top { grid-template-columns: 1.2fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .nav { display: none; }
  .header-actions .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-inner { height: 70px; }
}

@media (max-width: 980px) {
  .section-head { grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
  .section-head h2 { max-width: 20ch; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: 1fr; }
  .feature-split { grid-template-columns: 1fr; }
  .donate-grid { grid-template-columns: 1fr; }
  .donor-wall-head { grid-template-columns: 1fr; align-items: start; }
  .cta-band-inner { grid-template-columns: 1fr; }
  .cta-band-actions { justify-content: flex-start; }
  .sponsor-cta { grid-template-columns: 1fr; }
  .sponsor-cta-actions { justify-content: flex-start; }
  .page-hero-grid { grid-template-columns: 1fr; align-items: start; }
  .page-hero-aside { max-width: 430px; }
  .role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --gutter: 1.15rem; }
  .hero { min-height: auto; padding-top: 116px; }
  .hero h1 { font-size: clamp(3.2rem, 17vw, 5.4rem); }
  .hero h1 .outline { padding-left: 0.3em; }
  .hero-sub { font-size: 0.98rem; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-aside { max-width: none; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .tier-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-item,
  .gallery-item--wide,
  .gallery-item--tall { grid-column: span 1; aspect-ratio: 1; }
  .gallery-caption { opacity: 1; transform: none; padding-top: 1.75rem; }
  .gallery-zoom { opacity: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .info-row { grid-template-columns: 1fr; gap: 0.25rem; }
  .role-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .spec-grid { grid-template-columns: 1fr; }
  .spec:nth-child(odd) { padding-right: 0; border-right: 0; }
  .spec:nth-child(even) { padding-left: 0; }
  .lightbox-img { max-height: calc(100svh - 11rem); }
}

@media (max-width: 460px) {
  .brand-type { font-size: 0.92rem; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-logo { height: 38px; }
  .hero-eyebrow { font-size: 0.56rem; letter-spacing: 0.1em; }
  .footer-top { grid-template-columns: 1fr; }
  .donate-frame { height: 990px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .mobile-nav, .cta-band, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .section, .page-hero { padding: 1.5rem 0; background: #fff; color: #000; }
  .section--dark, .section--forest { background: #fff !important; color: #000 !important; }
  a { text-decoration: none; color: #000; }
}

/* ==========================================================================
   CAD lab / 3D viewer
   ========================================================================== */

.cad-stage {
  padding-top: 0;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  border-top: 1px solid var(--line-dark);
}

.cad-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(47, 138, 75, 0.22), transparent 42%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px;
  mask-image: radial-gradient(ellipse at 30% 10%, #000 0%, transparent 70%);
}

.cad-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
}

.cad-visual {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #0a100c;
}

.cad-viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: clamp(560px, 66vh, 760px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 50% 35%, #22382a 0%, #111b15 48%, #080d0a 100%);
  cursor: grab;
  touch-action: none;
}

.cad-viewport:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -4px;
}

.cad-viewport.is-grabbing { cursor: grabbing; }

.cad-viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.55s var(--ease);
}

.cad-viewport.is-ready canvas { opacity: 1; }
.cad-viewport.is-fallback canvas { display: none; }

.cad-toolbar {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  pointer-events: none;
}

.cad-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 38px;
  padding: 0 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(8, 13, 10, 0.74);
  color: rgba(255, 255, 255, 0.76);
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
  backdrop-filter: blur(10px);
  pointer-events: auto;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.cad-tool svg { width: 15px; height: 15px; flex: none; }
.cad-tool:hover {
  border-color: rgba(255, 255, 255, 0.44);
  color: var(--white);
  background: rgba(20, 38, 27, 0.9);
}
.cad-tool[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--ink);
}
.cad-tool:disabled { opacity: 0.35; cursor: not-allowed; }

.cad-viewport-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: calc(100% - 12rem);
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(8, 13, 10, 0.6);
  color: rgba(255, 255, 255, 0.74);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.cad-live-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(143, 202, 159, 0.14);
}

.cad-hint,
.cad-corner {
  position: absolute;
  bottom: 0.9rem;
  z-index: 3;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  pointer-events: none;
}

.cad-hint { left: 1rem; }
.cad-hint span { color: rgba(255, 255, 255, 0.32); }
.cad-corner { right: 1rem; color: rgba(255, 255, 255, 0.32); }

.cad-loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  background: rgba(8, 13, 10, 0.74);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease), visibility 0.25s var(--ease);
  backdrop-filter: blur(3px);
  pointer-events: none;
}

.cad-viewport.is-loading .cad-loading {
  opacity: 1;
  visibility: visible;
}

.cad-loading .mono-label { color: rgba(255, 255, 255, 0.64); }

.cad-progress {
  width: min(240px, 55vw);
  height: 2px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.cad-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 0.18s linear;
}

.cad-progress-pct {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.54);
}

.cad-error {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  width: min(390px, calc(100% - 2rem));
  padding: 1.3rem;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-left: 3px solid var(--danger);
  background: rgba(14, 20, 16, 0.96);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.cad-error[hidden] { display: none; }
.cad-error p {
  margin: 0.7rem 0 1rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.7);
}
.cad-error .text-link { color: var(--white); }

.cad-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 2rem;
  text-align: center;
}

.cad-fallback[hidden] { display: none; }
html.js .cad-fallback { display: none; }
html.js .cad-viewport.is-fallback .cad-fallback { display: flex; }
.cad-fallback p {
  max-width: 36ch;
  margin: 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.6);
}
.cad-fallback .text-link { color: var(--white); }

.cad-viewer-note {
  margin: 0;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line-dark);
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.58rem;
  line-height: 1.5;
}

.cad-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(1.25rem, 2vw, 1.7rem);
  background: #0d1510;
}

.cad-panel .kicker { margin-bottom: 0.75rem; }
.cad-panel h2 {
  margin: 0 0 0.3rem;
  font-size: clamp(1.9rem, 2.6vw, 2.35rem);
  line-height: 0.94;
}

.cad-model-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.11em;
  line-height: 1.4;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.cad-model-meta [data-cad-class] { color: var(--accent); }
.cad-sep { color: rgba(255, 255, 255, 0.24); }

.cad-model-desc {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  line-height: 1.6;
}

.cad-specs {
  margin: 0;
  border-top: 1px solid var(--line-dark);
}
.cad-specs > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: baseline;
  padding: 0.42rem 0;
  border-bottom: 1px solid var(--line-dark);
}
.cad-specs dt {
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.45;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.54);
}
.cad-specs dd {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: right;
}

.cad-model-stats {
  margin: 0.7rem 0 0.9rem;
  color: rgba(255, 255, 255, 0.56);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.55rem;
  letter-spacing: 0.01em;
  line-height: 1.6;
}

.cad-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--line-dark);
}
.cad-links .text-link {
  font-size: 0.6rem;
  padding-bottom: 0.2rem;
  color: var(--white);
  border-bottom-color: var(--line-dark-strong);
}
.cad-links .text-link:hover { color: var(--accent); border-bottom-color: var(--accent); }

.cad-picker {
  margin-top: 1.2rem;
  padding-top: 1rem;
}
.cad-picker label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.46);
}

.cad-select {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: #111b15;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.74rem;
  color-scheme: dark;
  cursor: pointer;
}
.cad-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.cad-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.cad-pager-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 36px;
  padding: 0 0.35rem;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.64);
  font-family: var(--font-body);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
}
.cad-pager-btn:hover { color: var(--accent); }
.cad-pager-btn svg { width: 15px; height: 15px; }
.cad-position {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.36);
}

.cad-source-note {
  margin: auto 0 0;
  padding-top: 1.2rem;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.54rem;
  line-height: 1.5;
}
.cad-source-note a { color: rgba(255, 255, 255, 0.58); }

.cad-noscript {
  margin: 1rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-dark);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
}
.cad-noscript p { margin-bottom: 0.7rem; }
.cad-noscript-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.68rem;
}
.cad-noscript-list li { display: flex; flex-wrap: wrap; gap: 0.3rem; color: rgba(255, 255, 255, 0.46); }
.cad-noscript-list a { color: var(--white); }
.cad-noscript-list a:hover { color: var(--accent); }

html:not(.js) .cad-toolbar,
html:not(.js) .cad-hint,
html:not(.js) .cad-corner { display: none; }

.cad-library-head { align-items: end; }

.cad-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: transparent;
  border: 0;
}

.cad-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--white);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: background-color 0.25s var(--ease);
}
.cad-card[hidden] { display: none; }
.cad-card:hover { background: var(--accent-soft); }
.cad-card.is-current { outline: 2px solid var(--accent-deep); outline-offset: -2px; }

.cad-card-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 42%, #2b4434 0%, #18251d 52%, #0d1410 100%);
}
.cad-card--featured .cad-card-media {
  background:
    radial-gradient(ellipse at 50% 42%, #376345 0%, #1b2c21 52%, #0d1410 100%);
}

.cad-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5%;
  transition: transform 0.6s var(--ease);
}
.cad-card:hover .cad-card-media img { transform: scale(1.045); }

.cad-card-view {
  position: absolute;
  right: 0.65rem;
  bottom: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 13, 10, 0.78);
  color: var(--white);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  pointer-events: none;
}
.cad-card-view svg { width: 13px; height: 13px; }
.cad-card:hover .cad-card-view,
.cad-card:focus-visible .cad-card-view { opacity: 1; transform: none; }

.cad-card-badge {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  padding: 0.3rem 0.45rem;
  background: var(--accent);
  color: var(--ink);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cad-card-copy {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  padding: 1rem 1.1rem 1.15rem;
  min-width: 0;
}
.cad-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
}
.cad-card-top .mono-label { font-size: 0.55rem; color: var(--muted); }
.cad-card-type {
  font-size: 0.54rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
}
.cad-card strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1;
  text-transform: uppercase;
}
.cad-card-stats {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.55rem;
  letter-spacing: 0.02em;
  line-height: 1.5;
}

.cad-library-note {
  margin: 1.1rem 0 0;
  color: var(--muted);
  font-size: 0.64rem;
}

.cad-faq {
  max-width: 900px;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.cad-faq summary { font-size: 1rem; }
.cad-faq code {
  padding: 0.1em 0.3em;
  background: var(--paper-2);
  font-size: 0.9em;
}
.cad-faq kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0.05em 0.35em;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: var(--white);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8em;
  text-align: center;
}

.cad-thumb-mode,
.cad-thumb-mode body {
  background: transparent !important;
}

.cad-thumb-mode .site-header,
.cad-thumb-mode .site-footer,
.cad-thumb-mode .mobile-nav,
.cad-thumb-mode .skip-link,
.cad-thumb-mode main > section:not(.cad-stage),
.cad-thumb-mode .cad-panel,
.cad-thumb-mode .cad-toolbar,
.cad-thumb-mode .cad-viewport-tag,
.cad-thumb-mode .cad-hint,
.cad-thumb-mode .cad-corner,
.cad-thumb-mode .cad-viewer-note,
.cad-thumb-mode .cad-noscript,
.cad-thumb-mode .cad-loading,
.cad-thumb-mode .cad-error,
.cad-thumb-mode .cad-fallback,
.cad-thumb-mode #cad-status {
  display: none !important;
}

.cad-thumb-mode main,
.cad-thumb-mode .cad-stage,
.cad-thumb-mode .cad-stage .container,
.cad-thumb-mode .cad-shell,
.cad-thumb-mode .cad-visual {
  display: block !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.cad-thumb-mode .cad-stage::before { display: none; }

.cad-thumb-mode .cad-viewport {
  width: 600px;
  height: 450px;
  background: transparent !important;
  border: 0;
  box-shadow: none;
  cursor: default;
}
.cad-thumb-mode .cad-viewport canvas { opacity: 1 !important; }

.cad-viewport:fullscreen {
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(ellipse at 50% 35%, #22382a 0%, #111b15 48%, #080d0a 100%);
}
.cad-viewport:fullscreen .cad-viewer-note { display: none; }

@media (max-width: 1100px) {
  .cad-shell { grid-template-columns: minmax(0, 1fr) 330px; }
}

@media (max-width: 980px) {
  .cad-shell { grid-template-columns: 1fr; }
  .cad-viewport { flex: none; height: min(68vh, 600px); }
  .cad-panel { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 0 1.5rem; align-items: start; }
  .cad-panel .kicker,
  .cad-panel h2,
  .cad-model-meta,
  .cad-model-desc,
  .cad-specs,
  .cad-model-stats,
  .cad-links,
  .cad-source-note { grid-column: 1; }
  .cad-picker { grid-column: 2; grid-row: 1 / span 6; margin-top: 0; padding-top: 0.2rem; align-self: stretch; }
  .cad-picker .cad-select { margin-top: 0; }
  .cad-source-note { margin-top: 0.8rem; padding-top: 0; }
}

@media (max-width: 760px) {
  .cad-viewport { flex: none; height: min(64vh, 520px); }
  .cad-tool span { display: none; }
  .cad-tool { width: 38px; justify-content: center; padding: 0; }
  .cad-toolbar { gap: 0.28rem; }
  .cad-viewport-tag { max-width: calc(100% - 12.5rem); }
  .cad-panel { display: flex; }
  .cad-picker { margin-top: 0; padding-top: 1.2rem; }
  .cad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cad-hint { font-size: 0.55rem; }
  .cad-corner { display: none; }
  .cad-library-head { align-items: flex-start; }
  .cad-noscript-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .cad-grid { grid-template-columns: 1fr; }
  .cad-viewport { height: 58vh; min-height: 380px; }
  .cad-toolbar { top: 0.7rem; right: 0.7rem; }
  .cad-viewport-tag { display: none; }
  .cad-hint { left: 0.7rem; right: 0.7rem; bottom: 0.7rem; line-height: 1.5; }
  .cad-viewer-note { padding-inline: 0.8rem; }
  .cad-noscript-list { grid-template-columns: 1fr; }
}

@media print {
  .cad-stage, .cad-grid { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .cad-viewport canvas { transition: none; }
}
