/* ═══════════════════════════════════════════════════════════
   GROW ECOSYSTEM — SHARED DESIGN SYSTEM
   Dark-only. Single source of truth for all pages.
   See /DESIGN_SYSTEM.md for full specification.
═══════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────── */
:root {
  --bg:           #080F0A;
  --bg-2:         #0D1810;
  --bg-3:         #121E15;
  --surface:      #16241A;
  --surface-2:    #1C2E20;
  --surface-3:    #223428;

  --text:         #BACED2;
  --text-2:       #698A6E;
  --text-3:       #446048;
  --text-dim:     rgba(188,206,210,0.5);

  --accent:       #49FF22;
  --accent-2:     #65FF3A;
  --accent-3:     #92FF70;
  --accent-dim:   rgba(73,255,34,0.11);
  --accent-glow:  rgba(73,255,34,0.34);

  --warm:         #D0682E;
  --warm-hover:   #BC5C26;
  --warm-dim:     rgba(208,104,46,0.10);
  --warm-glow:    rgba(208,104,46,0.15);

  --border:       rgba(73,255,34,0.14);
  --border-2:     rgba(73,255,34,0.28);
  --border-3:     rgba(188,206,210,0.08);

  --r:    8px;
  --r-lg: 14px;
  --r-xl: 20px;
  --nav-h: 64px;
}

/* ── RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color-scheme: dark;
}
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video, canvas { max-width: 100%; }

/* ── TYPE SCALE ──────────────────────────────────────────── */
.eyebrow {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent-2);
}
.display {
  font-family: Georgia,'Times New Roman',serif;
  font-size: clamp(2.6rem,6vw,4.8rem);
  line-height: 1.06; letter-spacing: -0.03em;
  text-wrap: balance;
}
.h2 {
  font-family: Georgia,'Times New Roman',serif;
  font-size: clamp(1.65rem,3vw,2.4rem);
  line-height: 1.15; letter-spacing: -0.018em;
  text-wrap: balance;
}
.h3 {
  font-family: Georgia,'Times New Roman',serif;
  font-size: clamp(1.05rem,1.8vw,1.3rem);
  line-height: 1.3; letter-spacing: -0.008em;
}
.lead { font-size: clamp(0.98rem,1.6vw,1.12rem); line-height: 1.74; color: var(--text-2); }
.body-sm { font-size: 0.9rem; line-height: 1.7; color: var(--text-2); }

/* ── LAYOUT ──────────────────────────────────────────────── */
.wrap { max-width: 1100px; margin-inline: auto; padding-inline: clamp(1.25rem,5vw,3rem); }
.wrap-narrow { max-width: 720px; margin-inline: auto; padding-inline: clamp(1.25rem,5vw,3rem); }
.section { padding-block: clamp(4.5rem,9vw,8rem); }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.72rem 1.5rem; border-radius: var(--r);
  font-size: 0.93rem; font-weight: 600;
  text-decoration: none; border: none; cursor: pointer;
  transition: background 0.14s, opacity 0.14s, transform 0.14s, box-shadow 0.14s;
  white-space: nowrap; line-height: 1;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }

.btn-warm {
  background: var(--warm); color: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 18px var(--warm-glow);
}
.btn-warm:hover { background: var(--warm-hover); box-shadow: 0 2px 6px rgba(0,0,0,0.3), 0 8px 24px var(--warm-glow); }

.btn-ghost {
  background: transparent; border: 1px solid var(--border-2); color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-2); background: var(--accent-dim); }
.btn-ghost:hover { box-shadow: 0 0 0 1px rgba(73,255,34,0.16), 0 0 22px rgba(73,255,34,0.20); }

.btn-lg  { padding: 0.88rem 1.85rem; font-size: 1rem; }
.btn-xl  { padding: 1rem 2.2rem; font-size: 1.05rem; }

/* ── TAGS ────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.22rem 0.6rem; border-radius: 4px;
  font-size: 0.64rem; font-weight: 700;
  letter-spacing: 0.15em; text-transform: uppercase; white-space: nowrap;
}
.tag-accent { background: var(--accent-dim); color: var(--accent-2); border: 1px solid var(--border-2); }
.tag-warm   { background: var(--warm-dim);   color: var(--warm);     border: 1px solid rgba(208,104,46,0.2); }
.tag-dim    { background: var(--surface-2);  color: var(--text-2);   border: 1px solid var(--border); }
.tag-dot    { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ── NAV ─────────────────────────────────────────────────── */
#site-nav {
  position: fixed; inset-block-start: 0; inset-inline: 0;
  height: var(--nav-h); z-index: 300;
  background: rgba(8,15,10,0.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 0;
  transition: box-shadow 0.25s;
}
#site-nav.scrolled { box-shadow: none; }
.nav-wrap {
  height: 100%; display: flex; align-items: center;
  justify-content: space-between; gap: 1.5rem;
}
.nav-logo { text-decoration: none; display: flex; align-items: center; min-height: 44px; }
.nav-logo-image {
  display: block;
  width: 150px;
  max-width: 100%;
  height: auto;
  filter: brightness(0) saturate(100%) invert(91%) sepia(98%) saturate(3460%) hue-rotate(45deg) brightness(109%) contrast(110%);
}
.nav-logo-word { font-family: Georgia,serif; font-size: 1.2rem; line-height: 1; letter-spacing: 0.14em; color: var(--accent-2); text-shadow: 0 0 7px rgba(73,255,34,0.48), 0 0 18px rgba(73,255,34,0.22); }
.nav-logo-mark { color: var(--accent-2); font-size: 0.9rem; margin-left: 0.05em; text-shadow: 0 0 7px rgba(73,255,34,0.52), 0 0 18px rgba(73,255,34,0.24); }
.nav-logo-icon-frame {
  display: block; width: 39px; height: 31px; overflow: hidden;
  flex: 0 0 39px; border-radius: 7px;
  filter: drop-shadow(0 0 8px rgba(73,255,34,0.38)) drop-shadow(0 5px 14px rgba(73,255,34,0.15));
}
.nav-logo-icon-frame img {
  display: block; width: auto; height: 31px; max-width: none;
  filter: brightness(0) saturate(100%) invert(91%) sepia(98%) saturate(3460%) hue-rotate(45deg) brightness(109%) contrast(110%);
}
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-link-ghost {
  font-size: 0.83rem; color: var(--text-2); text-decoration: none;
  padding: 0.4rem 0.7rem; border-radius: 5px;
  transition: color 0.14s, background 0.14s;
}
.nav-link-ghost:hover { color: var(--text); background: var(--accent-dim); }
.nav-link-ghost.active { color: var(--accent-2); text-shadow: 0 0 7px rgba(73,255,34,0.42), 0 0 14px rgba(73,255,34,0.18); }
@media (max-width: 980px) { .nav-right { display: none !important; } }

/* ── LIVE ECOSYSTEM PROOF ───────────────────────────────── */
.live-proof {
  display: grid; grid-template-columns: minmax(0,1fr) auto;
  align-items: center; gap: clamp(1.5rem,4vw,3.5rem);
  padding: clamp(1.5rem,3.5vw,2.5rem);
  border: 1px solid var(--border-2); border-radius: var(--r-xl);
  background: linear-gradient(135deg, rgba(73,255,34,0.10), rgba(16,24,18,0.72));
  box-shadow: 0 18px 50px rgba(0,0,0,0.16);
}
.live-proof-copy { max-width: 62ch; }
.live-proof-copy .eyebrow { display: block; margin-bottom: 0.7rem; }
.live-proof-copy .h3 { margin-bottom: 0.65rem; }
.live-proof-copy p { color: var(--text-2); font-size: 0.92rem; line-height: 1.7; }
.live-proof-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: flex-end; }
.proof-snapshot { margin-top: 1.75rem; }
.proof-snapshot-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.proof-snapshot-date {
  color: var(--text-3); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
}
.proof-metrics {
  display: grid; grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1px; overflow: hidden; border: 1px solid var(--border-2);
  border-radius: var(--r-xl); background: var(--border-2);
}
.proof-metric { background: var(--bg-2); padding: clamp(1.35rem,3vw,2rem); }
.proof-metric-label {
  color: var(--text-3); font-size: 0.67rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 0.55rem;
}
.proof-metric-value {
  color: var(--text); font-family: Georgia,serif;
  font-size: clamp(2rem,4vw,3.25rem); line-height: 1;
}
.proof-metric-detail { color: var(--text-2); font-size: 0.78rem; line-height: 1.5; margin-top: 0.55rem; }
.proof-chain-row {
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 0.75rem; margin-top: 0.75rem;
}
.proof-chain {
  padding: 1rem; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--bg-2);
}
.proof-chain-name { color: var(--text); font-size: 0.86rem; font-weight: 700; }
.proof-chain-status { color: var(--accent-2); font-size: 0.67rem; text-transform: uppercase; letter-spacing: 0.12em; margin-top: 0.3rem; }
.proof-note { color: var(--text-3); font-size: 0.75rem; line-height: 1.6; margin-top: 1rem; }
@media (max-width: 760px) {
  .live-proof { grid-template-columns: 1fr; }
  .live-proof-actions { justify-content: flex-start; }
  .proof-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .proof-chain-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* ── PAGE HERO INNER (interior pages) ───────────────────── */
.page-hero-inner { position: relative; z-index: 1; text-align: center; }
.page-hero-inner .eyebrow { display: block; margin-bottom: 1.2rem; }
.page-hero-inner .display { color: var(--text); margin-bottom: 1.2rem; }
.page-hero-inner .display em { font-style: normal; color: var(--accent-2); }
.page-hero-inner .lead { max-width: 52ch; margin-inline: auto; margin-bottom: 2rem; }

/* ── HERO STATUS (live / active indicator) ───────────────── */
.hero-status {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.72rem; color: var(--text-3); letter-spacing: 0.06em;
}
.hero-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px rgba(73,255,34,0.78), 0 0 18px rgba(73,255,34,0.34);
  animation: pulse-dot 2.5s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100% { opacity:1; } 50% { opacity:0.3; } }

/* ── FOOTER ──────────────────────────────────────────────── */
#site-footer {
  background: var(--bg);
  border-top: 0;
  padding-block: 3rem 1.5rem;
}
/* Hide legacy per-page footer markup before the shared footer is injected. */
#site-footer > .wrap > .footer-inner { display: none !important; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}
.footer-column { display: flex; flex-direction: column; align-items: flex-start; gap: 0.65rem; }
.footer-heading {
  margin-bottom: 0.25rem;
  color: var(--accent-2);
  text-shadow: 0 0 10px rgba(73,255,34,0.20);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.footer-link { font-size: 0.82rem; color: var(--text-2); text-decoration: none; transition: color 0.14s; }
.footer-link:hover { color: var(--accent-2); }
.footer-secondary-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.4rem;
  margin-top: 2.25rem;
  padding-top: 1.35rem;
  border-top: 0;
}
.footer-secondary-links .footer-link { font-size: 0.78rem; }
.footer-disclosure {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 0;
}
.footer-disclosure p {
  max-width: 1120px;
  color: var(--text-3);
  font-size: 0.72rem;
  line-height: 1.65;
}
.footer-bottom { margin-top: 1.25rem; }
.footer-copy { font-size: 0.73rem; color: var(--text-3); }

@media (max-width: 1050px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3rem; }
}
@media (max-width: 720px) {
  #site-footer { padding-top: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-column { gap: 0.72rem; }
  .footer-heading { margin-bottom: 0.1rem; }
  .footer-link { font-size: 0.88rem; line-height: 1.45; }
}
@media (max-width: 480px) {
  .footer-secondary-links { flex-direction: column; align-items: flex-start; gap: 0.65rem; }
}

@media (max-width: 560px) {
  .wrap,
  .wrap-narrow {
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
  }
  .section { padding-block: 4rem; }
  .display { font-size: clamp(2.35rem, 11.5vw, 3.05rem); line-height: 1.03; }
  .h2 { font-size: clamp(1.65rem, 8vw, 2.1rem); }
  .lead { font-size: 1rem; line-height: 1.68; color: #87A58B; }
  .body-sm { color: #87A58B; }
  .btn { min-height: 44px; justify-content: center; }
  #site-nav {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .nav-logo-image { width: 142px; }
  .nav-hamburger { width: 44px; height: 44px; }
  #site-footer { padding-bottom: max(1.5rem, env(safe-area-inset-bottom)); }
  .footer-grid { gap: 2rem; }
}

/* ── MOBILE NAV ──────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.14s, background 0.14s;
}
.nav-hamburger:hover { border-color: var(--border-2); background: var(--accent-dim); }
.nav-hamburger:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.nav-hamburger-bar {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.18s ease;
  transform-origin: center;
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger-bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-hamburger[aria-expanded="true"] .nav-hamburger-bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

@media (max-width: 860px) {
  .nav-hamburger { display: flex; }
}

/* Mobile menu drawer */
#nav-mobile-menu {
  position: fixed;
  inset-block-start: var(--nav-h);
  inset-inline: 0;
  inset-block-end: 0;
  background: rgba(8,15,10,0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  z-index: 298;
  padding: clamp(1.5rem,5vw,2.5rem) clamp(1.25rem,5vw,3rem) 3rem;
  overflow-y: auto;
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.24s ease, opacity 0.2s ease;
  display: flex;
  flex-direction: column;
}
#nav-mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Click-outside overlay (invisible, sits behind drawer) */
#nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 297;
  display: none;
}
#nav-overlay.open { display: block; }

/* Scroll lock while menu is open */
body.nav-open { overflow: hidden; }

.nav-mobile-links {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.nav-mobile-link {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  padding: 1rem 0.25rem;
  border-bottom: 1px solid var(--border);
  display: block;
  transition: color 0.14s;
  letter-spacing: 0.01em;
}
.nav-mobile-link:last-of-type { border-bottom: none; }
.nav-mobile-link:hover,
.nav-mobile-link:focus-visible { color: var(--text); outline: none; }
.nav-mobile-link.active { color: var(--accent-2); }

.nav-mobile-cta-btn {
  margin-top: 1.75rem;
  width: 100%;
  justify-content: center;
  font-size: 1rem;
  padding: 0.9rem 1.5rem;
}

/* ── SCROLL REVEAL ───────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .r { opacity: 0; transform: translateY(22px); transition: opacity 0.58s ease, transform 0.58s ease; }
  .r.in { opacity: 1; transform: none; }
  .r1 { transition-delay: 0.07s; }
  .r2 { transition-delay: 0.14s; }
  .r3 { transition-delay: 0.21s; }
  .r4 { transition-delay: 0.28s; }
}
