/* style.css — Protect Mount Hope */

/* ============ DESIGN TOKENS ============ */
:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.25rem, 1rem + 3.5vw, 4.25rem);
  --text-hero: clamp(2.25rem, 0.8rem + 4.4vw, 4.75rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 640px;
  --content-default: 780px;
  --content-wide: 1180px;
  --content-full: 100%;

  --font-display: 'Erode', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Work Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

/* ---- Light mode (default) — warm parchment & forest green ---- */
:root,
[data-theme='light'] {
  --color-bg: #f4f0e4;
  --color-surface: #ffffff;
  --color-surface-2: #fbf7ec;
  --color-surface-offset: #ede6d2;
  --color-border: #dad0b4;
  --color-divider: #e2d9c1;

  --color-text: #23291b;
  --color-text-muted: #5c6350;
  --color-text-faint: #97998a;
  --color-text-inverse: #f6f3e7;

  --color-primary: #33562e;
  --color-primary-hover: #234020;
  --color-primary-active: #16290f;
  --color-primary-highlight: #d8e2ce;

  --color-rust: #8a4222;
  --color-rust-hover: #6c3218;
  --color-rust-highlight: #ecd7c6;

  --color-error: #8f2f2a;
  --color-error-hover: #711f1c;
  --color-error-highlight: #ecd3cf;

  --color-success: #3f6b30;
  --color-success-highlight: #d9e3cd;

  --shadow-sm: 0 1px 2px oklch(0.25 0.03 100 / 0.08);
  --shadow-md: 0 6px 18px oklch(0.25 0.03 100 / 0.1);
  --shadow-lg: 0 16px 40px oklch(0.25 0.03 100 / 0.16);
}

[data-theme='dark'] {
  --color-bg: #141712;
  --color-surface: #1b2016;
  --color-surface-2: #21271a;
  --color-surface-offset: #262d1d;
  --color-border: #38402c;
  --color-divider: #2c3322;

  --color-text: #e6e5d4;
  --color-text-muted: #a9ad96;
  --color-text-faint: #6d7360;
  --color-text-inverse: #1a1e14;

  --color-primary: #86b871;
  --color-primary-hover: #a3cb8f;
  --color-primary-active: #b8daa6;
  --color-primary-highlight: #2c3a25;

  --color-rust: #dd9367;
  --color-rust-hover: #e8ab86;
  --color-rust-highlight: #3d2c1f;

  --color-error: #e08a80;
  --color-error-hover: #e9a89f;
  --color-error-highlight: #3a2320;

  --color-success: #8fc27a;
  --color-success-highlight: #263a1e;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.3);
  --shadow-md: 0 6px 18px oklch(0 0 0 / 0.35);
  --shadow-lg: 0 16px 40px oklch(0 0 0 / 0.45);
}

/* ============ LAYOUT PRIMITIVES ============ */
.wrap {
  width: 100%;
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 5vw, var(--space-10));
}
.wrap--narrow {
  max-width: var(--content-default);
}

.section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-24));
  border-top: 1px solid var(--color-divider);
}
.section--tight {
  padding-block: clamp(var(--space-10), 5vw, var(--space-16));
}
.section--flush {
  border-top: none;
}
.section--surface {
  background: var(--color-surface);
}
.section--offset {
  background: var(--color-surface-offset);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-rust);
  margin-bottom: var(--space-4);
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--color-rust);
  display: inline-block;
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-5);
  max-width: 26ch;
}
.section-lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 62ch;
  margin-bottom: var(--space-8);
  font-weight: 400;
}

.prose p {
  max-width: 68ch;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}
.prose p.muted {
  color: var(--color-text-muted);
}
.prose strong {
  color: var(--color-text);
  font-weight: 650;
}

/* ============ HEADER ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-divider);
  transition: box-shadow var(--transition-interactive);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
}
.brand__mark {
  width: 34px;
  height: 34px;
  color: var(--color-primary);
  flex-shrink: 0;
}
.brand__name {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
}
.brand__name span {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.nav__links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}
.nav__links a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
}
.nav__links a:hover {
  color: var(--color-primary);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.theme-toggle:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
}
.theme-toggle .icon-sun {
  display: none;
}
[data-theme='dark'] .theme-toggle .icon-moon {
  display: none;
}
[data-theme='dark'] .theme-toggle .icon-sun {
  display: block;
}



@media (max-width: 860px) {
  .nav__links {
    display: none;
  }
  .nav > .btn--primary {
    display: none;
  }
  .brand__name {
    font-size: var(--text-xs);
  }
}

@media (max-width: 380px) {
  .brand__name span {
    display: none;
  }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: 0.85em 1.6em;
  border-radius: var(--radius-full);
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--color-primary-hover);
  box-shadow: var(--shadow-md);
}
.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn--block {
  width: 100%;
}
.btn--sm {
  padding: 0.6em 1.2em;
  font-size: var(--text-xs);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #f6f3e7;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    oklch(0.15 0.02 130 / 0.35) 0%,
    oklch(0.13 0.02 130 / 0.55) 55%,
    oklch(0.1 0.02 130 / 0.88) 100%
  );
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: clamp(var(--space-10), 7vw, var(--space-16)) clamp(var(--space-8), 4vw, var(--space-10));
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f2d9c4;
  margin-bottom: var(--space-5);
}
.hero__eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e2703f;
  box-shadow: 0 0 0 4px oklch(0.6 0.15 40 / 0.25);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 600;
  line-height: 1.08;
  max-width: 21ch;
  margin-bottom: var(--space-5);
  color: #fbf9f1;
}
.hero__sub {
  font-size: var(--text-base);
  max-width: 52ch;
  color: #e3ded0;
  margin-bottom: var(--space-6);
  font-weight: 400;
}
.hero__ctas {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}
.hero .btn--ghost {
  color: #fbf9f1;
  border-color: color-mix(in oklab, #fbf9f1 40%, transparent);
}
.hero .btn--ghost:hover {
  border-color: #fbf9f1;
  color: #fbf9f1;
  background: color-mix(in oklab, #fbf9f1 12%, transparent);
}

.facts-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid color-mix(in oklab, #fbf9f1 20%, transparent);
}
.facts-strip__item {
  padding-block: var(--space-5);
  padding-inline: clamp(var(--space-4), 2vw, var(--space-6));
  border-right: 1px solid color-mix(in oklab, #fbf9f1 15%, transparent);
}
.facts-strip__item:last-child {
  border-right: none;
}
.facts-strip__label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #cfc8b3;
  margin-bottom: var(--space-1);
}
.facts-strip__value {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fbf9f1;
}

@media (max-width: 760px) {
  .facts-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .facts-strip__item:nth-child(2) {
    border-right: none;
  }
  .hero {
    min-height: 100vh;
  }
}

/* ============ LOT GRID ============ */
.lot-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3);
  margin-block: var(--space-8);
}
.lot-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
}
.lot-card--existing {
  background: var(--color-surface-offset);
  border-style: dashed;
}
.lot-card__num {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}
.lot-card__acres {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.lot-card__unit {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

@media (max-width: 760px) {
  .lot-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============ CODE COMPARISON BARS ============ */
.code-compare {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  margin-block: var(--space-8);
}
.code-compare__row {
  margin-bottom: var(--space-6);
}
.code-compare__row:last-child {
  margin-bottom: 0;
}
.code-compare__label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
}
.code-compare__value {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-variant-numeric: tabular-nums;
}
.code-compare__track {
  height: 14px;
  background: var(--color-surface-offset);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.code-compare__fill {
  height: 100%;
  border-radius: var(--radius-full);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}
.code-compare__fill--required {
  background: var(--color-rust);
  width: 100%;
}
.code-compare__fill--actual {
  background: var(--color-primary);
  width: 24%;
}
.code-compare__row.is-visible .code-compare__fill {
  transform: scaleX(1);
}
.code-compare__caption {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-3);
}

/* ============ CALLOUTS ============ */
.callout {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  margin-block: var(--space-5);
}
.callout__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--color-rust);
  margin-top: 0.15em;
}
.callout--danger {
  background: var(--color-error-highlight);
  border-color: color-mix(in oklab, var(--color-error) 35%, var(--color-border));
}
.callout--danger .callout__icon {
  color: var(--color-error);
}
.callout h4 {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-1);
}
.callout p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 60ch;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6) var(--space-8);
  margin-block: var(--space-6);
}
.check-item {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
@media (max-width: 760px) {
  .check-list {
    grid-template-columns: 1fr;
  }
}
.check-item__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  margin-top: 0.1em;
}
.check-item h4 {
  font-size: var(--text-base);
  font-weight: 650;
  margin-bottom: var(--space-1);
}
.check-item p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 64ch;
}

/* ============ COMPARE VISUAL ============ */
.compare-visual__figure {
  margin: 0;
}
.compare-visual__figure img {
  width: 100%;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
.compare-visual__figure figcaption {
  margin-top: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 72ch;
}
.compare-visual__figure figcaption strong {
  color: var(--color-text);
}

/* ============ TWO COLUMN ============ */
.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(var(--space-8), 6vw, var(--space-16));
  align-items: center;
}
.two-col--reverse {
  grid-template-columns: 0.9fr 1.1fr;
}
.two-col--reverse .two-col__media {
  order: -1;
}
.two-col__media img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}
@media (max-width: 860px) {
  .two-col,
  .two-col--reverse {
    grid-template-columns: 1fr;
  }
  .two-col--reverse .two-col__media {
    order: 0;
  }
}

/* ============ EVIDENCE ============ */
.evidence-exhibit {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.evidence-exhibit img {
  width: 100%;
  border-bottom: 1px solid var(--color-border);
}
.evidence-exhibit__body {
  padding: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
}
.evidence-exhibit__caption {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 48ch;
}
.evidence-exhibit__caption strong {
  color: var(--color-text);
}

.source-list {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-6);
}
.source-list a {
  font-size: var(--text-sm);
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, var(--color-primary) 40%, transparent);
}

/* ============ TAKE ACTION ============ */
.action-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-divider);
  overflow-x: auto;
}
.action-tab {
  padding: var(--space-3) var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  margin-right: var(--space-6);
}
.action-tab.is-active {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.action-panel {
  display: none;
}
.action-panel.is-active {
  display: block;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 4vw, var(--space-10));
  box-shadow: var(--shadow-sm);
}

.field {
  margin-bottom: var(--space-5);
}
.field label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.field--hint {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  margin-top: var(--space-1);
}
.field input,
.field textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  font-size: var(--text-base);
}
.field input:focus,
.field textarea:focus {
  border-color: var(--color-primary);
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 600px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.officials-list {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.official {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
}
.official input[type='checkbox'] {
  margin-top: 0.35em;
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}
.official__name {
  font-size: var(--text-sm);
  font-weight: 650;
}
.official__role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.officials-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}
.officials-toolbar button {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: underline;
}

.action-note {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-4);
}
.action-note svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 0.15em;
  color: var(--color-text-faint);
}

/* ============ FAQ ============ */
.faq-item {
  border-bottom: 1px solid var(--color-divider);
}
.faq-item summary {
  padding-block: var(--space-5);
  font-size: var(--text-base);
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-primary);
  flex-shrink: 0;
}
.faq-item[open] summary::after {
  content: '\2212';
}
.faq-item p {
  padding-bottom: var(--space-5);
  color: var(--color-text-muted);
  max-width: 68ch;
  font-size: var(--text-sm);
}

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--color-divider);
  padding-block: var(--space-12);
  background: var(--color-surface-offset);
}
.footer__top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
  margin-bottom: var(--space-8);
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.footer__brand svg {
  width: 28px;
  height: 28px;
  color: var(--color-primary);
}
.footer__brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-base);
}
.footer__links {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.footer__links a {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer__links a:hover {
  color: var(--color-primary);
}
.footer__disclaimer {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  max-width: 68ch;
  border-top: 1px solid var(--color-divider);
  padding-top: var(--space-6);
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
  .code-compare__fill {
    transform: scaleX(1) !important;
  }
}
