/* ==============================
   CarbonTerms — Civic Strategy Platform
   ============================== */

:root {
  --bg: #F4EFE8;
  --bg-alt: #EDE7DC;
  --fg: #1A1714;
  --fg-muted: #5C5347;
  --accent: #B8612A;
  --accent-dark: #8C4A1F;
  --sage: #7A8C72;
  --blue-gray: #4A5568;
  --sand: #D4C4A8;
  --off-white: #FAF8F5;
  --border: #C9BFA8;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 239, 232, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.main-nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.main-nav a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color 0.2s;
}
.main-nav a:hover { color: var(--accent); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--fg);
}

/* ---- Section base ---- */
.section-inner { max-width: 1200px; margin: 0 auto; padding: 6rem 2rem; }

.shift-label {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 3rem;
}
.section-marker {
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.05em;
}
.section-title {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  background: var(--fg);
  color: var(--off-white);
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    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: 80px 80px;
  pointer-events: none;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(160deg, rgba(184,97,42,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem 3rem;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: end;
}
.hero-eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1.5rem;
}
.hero-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--off-white);
}
.hero-right {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.hero-sub {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: rgba(250,248,245,0.75);
  font-weight: 300;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
}
.stat { padding-right: 1.5rem; }
.stat + .stat { padding-left: 1.5rem; border-left: 1px solid rgba(255,255,255,0.1); }
.stat-num {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.75rem;
  color: rgba(250,248,245,0.5);
  line-height: 1.4;
}
.hero-context {
  font-size: 0.6875rem;
  color: rgba(250,248,245,0.3);
  line-height: 1.4;
}
.hero-tagline {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.tagline-text {
  font-family: 'Playfair Display', serif;
  font-size: 0.8125rem;
  font-style: italic;
  color: rgba(250,248,245,0.35);
  letter-spacing: 0.03em;
}

/* ---- Shift section ---- */
.shift { background: var(--bg); }
.shift-inner { display: grid; grid-template-columns: 1fr; gap: 4rem; }
.shift-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--fg);
  margin-bottom: 2rem;
}
.shift-body p {
  font-size: 1.0625rem;
  color: var(--fg-muted);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}
.scarcity-box {
  background: var(--fg);
  color: var(--off-white);
  padding: 2.5rem 3rem;
  margin-top: 1rem;
}
.scarcity-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.scarcity-headline {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--off-white);
}
.scarcity-box p:last-of-type {
  font-size: 0.9375rem;
  color: rgba(250,248,245,0.65);
  line-height: 1.7;
}
.shift-conditions { border-top: 1px solid var(--border); padding-top: 3rem; }
.conditions-title {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  margin-bottom: 2rem;
}
.conditions-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}
.condition-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem 1rem 0;
  font-size: 0.875rem;
  color: var(--fg);
  border-bottom: 1px solid var(--border);
}
.condition-dot {
  display: block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-top: 0.4rem;
  flex-shrink: 0;
}

/* ---- Problem section ---- */
.problem { background: var(--bg-alt); }
.problem-inner { display: grid; grid-template-columns: 1fr; gap: 4rem; }
.problem-binary {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: stretch;
  margin-bottom: 3rem;
}
.binary-side {
  background: var(--bg);
  padding: 2.5rem;
  border: 1px solid var(--border);
}
.binary-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  margin-bottom: 1rem;
}
.binary-headline {
  font-family: 'Playfair Display', serif;
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}
.binary-desc {
  font-size: 0.9375rem;
  color: var(--fg-muted);
  line-height: 1.6;
}
.binary-anti .binary-headline { color: var(--blue-gray); }
.binary-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--fg-muted);
}
.problem-third {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: start;
  background: var(--fg);
  padding: 3rem;
}
.problem-third .shift-label { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
.third-label-text {
  font-family: 'Playfair Display', serif;
  font-size: 0.875rem;
  font-style: italic;
  color: rgba(250,248,245,0.5);
}
.third-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--off-white);
  margin-bottom: 1.25rem;
}
.third-sub {
  font-size: 1rem;
  color: rgba(250,248,245,0.65);
  line-height: 1.7;
  max-width: 520px;
}

/* ---- Questions section ---- */
.questions { background: var(--bg); }
.questions-inner { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.questions-intro {
  max-width: 640px;
  font-size: 1.0625rem;
  color: var(--fg-muted);
  line-height: 1.7;
}
.questions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
}
.question-card {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  transition: background 0.2s;
}
.question-card:hover { background: var(--bg-alt); }
.question-card:nth-child(3n) { border-right: none; }
.question-card:nth-child(n+4) { border-bottom: none; }
.q-number {
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
}
.q-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.0625rem;
  font-weight: 400;
  color: var(--fg);
  line-height: 1.4;
}

/* ---- Conditions detail section ---- */
.conditions-page { background: var(--bg-alt); }
.conditions-inner { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
.conditions-page-intro {
  max-width: 640px;
  font-size: 1.0625rem;
  color: var(--fg-muted);
  line-height: 1.7;
}
.conditions-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
}
.cd-item {
  padding: 2rem 1.75rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.cd-item:nth-child(3n) { border-right: none; }
.cd-item:nth-child(n+4) { border-bottom: none; }
.cd-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.75rem;
}
.cd-desc {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.65;
  margin-bottom: 0.75rem;
}
.cd-note {
  font-size: 0.75rem;
  font-style: italic;
  color: var(--accent);
  line-height: 1.5;
}
.conditions-disclaimer {
  background: var(--sand);
  padding: 1.25rem 1.75rem;
  border-left: 3px solid var(--accent);
}
.conditions-disclaimer p {
  font-size: 0.8125rem;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* ---- Terms section ---- */
.terms-section { background: var(--fg); color: var(--off-white); }
.terms-inner { display: grid; grid-template-columns: 1fr; gap: 3rem; }
.terms-section .shift-label .section-marker { color: var(--sand); }
.terms-section .section-title { color: rgba(250,248,245,0.5); }
.terms-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  color: var(--off-white);
  line-height: 1.2;
  margin-bottom: 1rem;
}
.terms-sub {
  font-size: 1rem;
  color: rgba(250,248,245,0.55);
  line-height: 1.65;
  max-width: 580px;
}
.terms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid rgba(255,255,255,0.08);
}
.term-category {
  padding: 2rem 1.5rem;
  border-right: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.term-category:nth-child(4n) { border-right: none; }
.term-category:nth-child(n+5) { border-bottom: none; }
.term-cat-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.term-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.term-list li {
  font-size: 0.875rem;
  color: rgba(250,248,245,0.65);
  line-height: 1.5;
  padding-left: 1rem;
  position: relative;
}
.term-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--sand);
  font-size: 0.75rem;
}
.terms-strategic {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 2.5rem;
  max-width: 640px;
}
.strategic-q {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.strategic-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-style: italic;
  color: var(--off-white);
  line-height: 1.5;
}

/* ---- Closing section ---- */
.closing { background: var(--bg-alt); }
.closing-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.closing-eyebrow {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1.25rem;
}
.closing-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--fg);
  margin-bottom: 1.25rem;
}
.closing-body {
  font-size: 1.0625rem;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
}
.cta-label {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.cta-note {
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.6;
}
.closing-statement {
  border-left: 3px solid var(--accent);
  padding-left: 2.5rem;
}
.closing-quote {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-style: italic;
  color: var(--fg);
  line-height: 1.6;
}

/* ---- Footer ---- */
.site-footer { background: var(--fg); color: rgba(250,248,245,0.6); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 4rem 2rem 2rem; }
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--off-white);
  margin-bottom: 0.5rem;
}
.footer-tagline { font-size: 0.875rem; color: rgba(250,248,245,0.45); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  max-width: 400px;
  justify-content: flex-end;
}
.footer-links a {
  font-size: 0.8125rem;
  color: rgba(250,248,245,0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--off-white); }
.footer-disclaimer {
  background: rgba(255,255,255,0.04);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255,255,255,0.06);
}
.footer-disclaimer p {
  font-size: 0.75rem;
  color: rgba(250,248,245,0.35);
  line-height: 1.65;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copy {
  font-size: 0.75rem;
  color: rgba(250,248,245,0.3);
}
.footer-contact a {
  font-size: 0.8125rem;
  color: rgba(250,248,245,0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-contact a:hover { color: var(--off-white); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .main-nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 1.5rem 2rem; gap: 1.25rem; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: flex; }
  .hero-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .conditions-grid { grid-template-columns: repeat(2, 1fr); }
  .problem-binary { grid-template-columns: 1fr; }
  .binary-divider { display: none; }
  .binary-anti { border-top: 1px solid var(--border); }
  .problem-third { grid-template-columns: 1fr; }
  .questions-grid { grid-template-columns: repeat(2, 1fr); }
  .question-card:nth-child(3n) { border-right: 1px solid var(--border); }
  .question-card:nth-child(2n) { border-right: none; }
  .question-card:nth-child(n+5) { border-bottom: 1px solid var(--border); }
  .question-card:nth-child(n+6) { border-bottom: none; }
  .conditions-detail-grid { grid-template-columns: repeat(2, 1fr); }
  .cd-item:nth-child(3n) { border-right: 1px solid var(--border); }
  .cd-item:nth-child(2n) { border-right: none; }
  .terms-grid { grid-template-columns: repeat(2, 1fr); }
  .term-category:nth-child(4n) { border-right: 1px solid rgba(255,255,255,0.08); }
  .term-category:nth-child(2n) { border-right: none; }
  .term-category:nth-child(n+7) { border-bottom: none; }
  .closing-inner { grid-template-columns: 1fr; gap: 3rem; }
  .closing-statement { padding-left: 1.5rem; }
  .footer-top { flex-direction: column; gap: 2rem; }
  .footer-links { justify-content: flex-start; }
}

@media (max-width: 600px) {
  .section-inner { padding: 4rem 1.25rem; }
  .hero-inner { padding: 3rem 1.25rem 2rem; }
  .hero-stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: none; border-top: 1px solid rgba(255,255,255,0.1); padding: 1rem 0 0 0; }
  .conditions-grid { grid-template-columns: 1fr; }
  .questions-grid { grid-template-columns: 1fr; }
  .question-card { border-right: none !important; }
  .conditions-detail-grid { grid-template-columns: 1fr; }
  .cd-item { border-right: none !important; }
  .terms-grid { grid-template-columns: 1fr; }
  .term-category { border-right: none !important; }
}