/* ============================================================
   Think Plan Execute Global Inc (TPEG) — Design Tokens
   Palette matches the org's real printed materials: forest green
   + terracotta orange, on a warm paper ground.
   ============================================================ */

:root {
  /* Color */
  --ink:        #1F3A22;   /* primary dark — TPEG forest green */
  --ink-soft:   #28492D;
  --paper:      #F7F3EA;   /* warm paper surface, matches flyer stock */
  --paper-dim:  #ECE6D6;
  --gold:       #E0672E;   /* TPEG orange — action / execute accent */
  --teal:       #5C8058;   /* moss green — think / plan accent */
  --coral:      #C24F1E;   /* deep burnt orange — urgency, donate CTA */
  --text-ink:   #1B2118;
  --text-muted: #5B6259;
  --text-onink: #F7F3EA;
  --text-onink-muted: #B9C7B4;
  --line:       #D8D2C0;
  --line-onink: #3A5A3E;

  /* Type */
  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body:    "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono:    "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  /* Scale */
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.75rem, 1.5rem + 1.1vw, 2.5rem);
  --step-3: clamp(2.5rem, 2rem + 2.2vw, 4rem);
  --step-4: clamp(3.25rem, 2.4rem + 3.8vw, 6rem);

  --radius: 3px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--text-ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: inherit;
}

p { margin: 0 0 1em; }
a { color: inherit; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 48px);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 1em;
}
.eyebrow::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--teal);
  display: inline-block;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--text-ink);
  display: flex; align-items: baseline; gap: 0.5em;
  letter-spacing: -0.01em;
}
.brand small {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.brand .mark {
  display: inline-flex; gap: 3px;
}
.brand .mark span {
  width: 6px; height: 14px;
  background: var(--line);
}
.brand .mark span:nth-child(1) { background: var(--teal); height: 8px; align-self: flex-end; }
.brand .mark span:nth-child(2) { background: var(--gold); height: 14px; align-self: flex-end; }
.brand .mark span:nth-child(3) { background: var(--coral); height: 20px; align-self: flex-end; }

nav.primary-nav { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 34px); }
nav.primary-nav a {
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
nav.primary-nav a:hover,
nav.primary-nav a.active { color: var(--text-ink); border-color: var(--gold); }
nav.primary-nav a.cta {
  color: var(--paper);
  background: var(--ink);
  padding: 9px 16px;
  border-bottom: none;
}
nav.primary-nav a.cta:hover { background: var(--coral); }

.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  width: 40px; height: 40px; cursor: pointer;
  color: var(--text-ink);
}

@media (max-width: 760px) {
  nav.primary-nav {
    position: fixed; inset: 76px 0 0 0;
    background: var(--paper);
    flex-direction: column; align-items: flex-start;
    padding: 28px clamp(20px, 4vw, 48px);
    gap: 22px;
    transform: translateY(-8px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    border-top: 1px solid var(--line);
  }
  nav.primary-nav.open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  nav.primary-nav a { font-size: 0.95rem; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--coral); border-color: var(--coral); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-onink { border-color: var(--gold); color: var(--gold); }
.btn-onink:hover { background: var(--gold); color: var(--ink); }
.btn:disabled { opacity: 0.5; cursor: progress; }

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--text-onink);
  position: relative;
  overflow: hidden;
  padding: clamp(60px, 10vw, 120px) 0 clamp(50px, 8vw, 90px);
}
.hero .grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line-onink) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-onink) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 60% at 60% 20%, black, transparent 75%);
}
.hero .wrap { position: relative; }
.hero-stages {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-onink-muted);
  display: flex; gap: 10px; align-items: center; margin-bottom: 26px;
}
.hero-stages b { color: var(--gold); font-weight: 500; }
.hero h1 {
  font-size: var(--step-4);
  max-width: 15ch;
  color: var(--text-onink);
}
.hero h1 .think { color: var(--teal); }
.hero h1 .plan { color: var(--paper); }
.hero h1 .execute { color: var(--gold); }
.hero h1 .global { color: var(--coral); }
.hero .lede {
  font-family: var(--font-body);
  font-size: var(--step-1);
  color: var(--text-onink-muted);
  max-width: 46ch;
  margin: 22px 0 34px;
}
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: clamp(56px, 9vw, 104px) 0; }
.section-head { max-width: 62ch; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2 { font-size: var(--step-3); }
.section-head .lede { color: var(--text-muted); font-size: var(--step-1); margin-top: 14px; }

.on-ink { background: var(--ink); color: var(--text-onink); }
.on-ink .text-muted { color: var(--text-onink-muted); }
.on-ink .eyebrow { color: var(--gold); }
.on-ink .eyebrow::before { background: var(--gold); }

/* ---------- Process (Think / Plan / Execute) ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.process-step { background: var(--paper); padding: 32px clamp(20px,3vw,34px); }
.process-step .stage-index { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-muted); letter-spacing: 0.1em; }
.process-step h3 { font-size: var(--step-2); margin: 14px 0 12px; }
.process-step:nth-child(1) h3 { color: var(--teal); }
.process-step:nth-child(2) h3 { color: var(--gold); }
.process-step:nth-child(3) h3 { color: var(--coral); }
.process-step p { color: var(--text-muted); }
.process-step--global { background: var(--ink); }
.process-step--global .stage-index { color: var(--text-onink-muted); }
.process-step--global h3 { color: var(--gold); font-size: var(--step-3); }
.process-step--global p { color: var(--text-onink); }
@media (max-width: 900px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .process { grid-template-columns: 1fr; } }

/* ---------- Ledger / stats ---------- */
.ledger {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border-top: 1px solid var(--line-onink); border-bottom: 1px solid var(--line-onink);
}
.ledger-item { padding: 26px 18px; border-left: 1px solid var(--line-onink); }
.ledger-item:first-child { border-left: none; }
.ledger-item .num { font-family: var(--font-mono); font-size: var(--step-2); color: var(--gold); display: block; }
.ledger-item .label { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-onink-muted); }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  background: #fff;
}
.card .tag { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal); }
.card h3 { font-size: var(--step-1); margin: 10px 0 8px; }
.card p { color: var(--text-muted); margin-bottom: 0; }

/* ---------- Blueprint diagram (signature element) ---------- */
.blueprint { width: 100%; height: auto; display: block; }
.blueprint .bp-line { fill: none; stroke: var(--gold); stroke-width: 1.5; stroke-dasharray: 6 6; stroke-dashoffset: 0; }
.blueprint .bp-node circle { fill: var(--ink); stroke: var(--gold); stroke-width: 1.5; }
.blueprint .bp-node text { font-family: var(--font-mono); font-size: 11px; fill: var(--text-onink-muted); }
.blueprint .bp-node.active circle { fill: var(--gold); }
.blueprint .bp-node.active text { fill: var(--gold); }

/* ---------- Forms ---------- */
.form-panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
}
.field { margin-bottom: 20px; }
.field label {
  display: block; font-family: var(--font-mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  font-family: var(--font-body); font-size: 1rem; background: var(--paper);
  color: var(--text-ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--gold); outline-offset: 1px; background: #fff;
}
.amount-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.amount-opt {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
  padding: 14px 8px; text-align: center; cursor: pointer; font-family: var(--font-mono); font-size: 0.9rem;
}
.amount-opt.selected { border-color: var(--gold); background: var(--ink); color: var(--gold); }
@media (max-width: 520px) { .amount-grid { grid-template-columns: repeat(2, 1fr); } }

.form-note { font-size: 0.85rem; color: var(--text-muted); margin-top: 14px; }
.form-status { margin-top: 16px; font-family: var(--font-mono); font-size: 0.85rem; padding: 12px 14px; border-radius: var(--radius); display: none; }
.form-status.show { display: block; }
.form-status.ok { background: #E8F0EC; color: var(--teal); border: 1px solid var(--teal); }
.form-status.err { background: #F6E7E0; color: var(--coral); border: 1px solid var(--coral); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--text-onink-muted); padding: 56px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h4 { color: var(--text-onink); font-size: 0.85rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px;}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { text-decoration: none; color: var(--text-onink-muted); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid var(--line-onink); padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-onink-muted);
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Utility ---------- */
.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(30px, 5vw, 70px); align-items: start; }
@media (max-width: 800px) { .two-col { grid-template-columns: 1fr; } }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
