/*
  True Development Turkana Campus - Main Stylesheet
  Design System: Warm Earth · Regeneration · Water · Solar
*/

/* --- SELF-HOSTED FONTS --- */

/* Fraunces – italic 400 */
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/fraunces-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/fraunces-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Fraunces – normal 400/600/700 (variable font, single file covers all weights) */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/fraunces-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/fraunces-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter – normal 400/500/600/700/800 (variable font, single file covers all weights) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/inter-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/inter-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- DESIGN TOKENS --- */
:root {
  /* Spacing & Layout */
  --gap-xs: 0.5rem;
  --gap-sm: 1rem;
  --gap-md: 1.5rem;
  --gap-lg: 2.5rem;
  --gap-xl: 4rem;
  --max-width: 1200px;
  --header-height: 80px;

  /* Border Radius */
  --radius:    14px;
  --radius-sm: 10px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(34,27,18,.06), 0 2px 8px rgba(34,27,18,.05);
  --shadow-md: 0 6px 24px rgba(34,27,18,.10);

  /* Typography */
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* ── COLOUR PALETTE ── */

  /* Neutrals / text */
  --ink-900: #221b12;
  --ink-700: #443a2c;
  --ink-500: #6b5f4d;
  --line:    #e0d6c4;

  /* Backgrounds */
  --bg:      #faf6ef;
  --bg-alt:  #ffffff;
  --bg-deep: #1c4533;

  /* Sand scale */
  --sand-50:  #faf6ef;
  --sand-100: #f3ece0;
  --sand-200: #e8ddca;

  /* Green — primary brand / CTA */
  --acacia-700: #2f6f4f;
  --acacia-800: #245840;
  --acacia-900: #1c4533;

  /* Terracotta — accent */
  --clay-600: #b5562f;
  --clay-700: #97461f;

  /* Teal — water / information */
  --water-600: #1f7f93;
  --water-700: #186577;

  /* Amber — solar / secondary CTA */
  --solar-500: #e0962a;
  --solar-400: #efb24e;

  /* Magenta — logo accent only */
  --brand-magenta: #c44f95;

  /* ── SURFACE HELPERS ── */
  --solar-glow: rgba(224,150,42,.4);

  /* Dark band text (footer / funding section) */
  --dark-text-heading: #f4eddd;
  --dark-text-note:    #d8e6da;
  --dark-text-body:    #cfe6dd;
  --dark-text-fine:    #a9c7bb;

  /* ── COMPATIBILITY ALIASES ── */
  /* These map legacy inline-style variable names to the design token system. */
  --text-muted:    var(--ink-500);
  --secondary-bg:  var(--sand-100);
  --accent-color:  var(--acacia-700);
  --border-color:  var(--line);
  --border-radius: var(--radius);
  --primary-color: var(--acacia-700);

  color-scheme: light;
}

/* --- DARK MODE --- */
html.dark {
  color-scheme: dark;

  --bg:      #1d1a13;
  --bg-alt:  #272217;
  --bg-deep: #0e0c08;

  --ink-900: #f0e9d8;
  --ink-700: #c8bda8;
  --ink-500: #9a8e7a;
  --line:    #3a3224;

  --sand-50:  #1d1a13;
  --sand-100: #252015;
  --sand-200: #302a1d;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.2);
  --shadow-md: 0 6px 24px rgba(0,0,0,.45);
}

html.dark .section-muted {
  background-color: #25201a;
}

html.dark .one-minute-box,
html.dark .durability-box,
html.dark .stat-card,
html.dark .card,
html.dark .form-container,
html.dark .pillars-info-panel,
html.dark .accordion {
  background-color: var(--bg-alt);
  border-color: var(--line);
}

html.dark .hero {
  background:
    radial-gradient(circle at 80% 20%, rgba(181,86,47,.18) 0%, transparent 55%),
    linear-gradient(180deg, #1d1a0d 0%, #201d10 38%, #231f12 100%);
}

html.dark header.navbar {
  background-color: rgba(29, 26, 19, 0.92);
}

html.dark nav.nav-links {
  background-color: var(--bg);
}

html.dark .durability-header {
  background-color: #2a2318;
}

html.dark th {
  background-color: #2a2318;
}

html.dark table {
  background-color: var(--bg-alt);
}

html.dark .toggle-container {
  background-color: #2a2318;
}

html.dark .timeline-outputs {
  background-color: #2a2318;
}

html.dark .callout {
  background-color: #2a2318;
}

html.dark .callout-warn {
  background-color: #2a1e14;
}

html.dark .callout-info {
  background-color: #12252a;
}

/* --- RESET & ACCESSIBILITY FOUNDATIONS --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-900);
  background-color: var(--bg);
  scroll-behavior: smooth;
}

/* Accessible hidden element pattern */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Custom Focus Indicators */
:focus-visible {
  outline: 3px solid var(--water-600);
  outline-offset: 4px;
}

/* Typographic Quality Options */
p, li, blockquote {
  text-wrap: pretty;
  margin-bottom: 1rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  text-wrap: balance;
  color: var(--ink-900);
  line-height: 1.25;
  margin-bottom: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); color: var(--acacia-700); }
h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--solar-500); border-bottom: 2px solid var(--line); padding-bottom: 0.5rem; margin-top: 2rem; }
h3 { font-size: clamp(1.4rem, 3vw, 1.8rem); color: var(--acacia-700); margin-top: 1.5rem; }
h4 { font-size: 1.2rem; }

a {
  color: var(--water-700);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--water-600);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- GLOBAL LAYOUT STRUCTURE --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap-md);
}

header.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(250, 246, 239, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 1000;
  transition: all 0.3s ease;
}

/* For browsers that do not support backdrop-filter */
@supports not (backdrop-filter: blur(12px)) {
  header.navbar {
    background-color: var(--bg);
  }
}

header.navbar.scrolled {
  height: 64px;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--ink-900);
  font-size: 1.25rem;
}

.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

nav.nav-links {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
}

.nav-item {
  color: var(--ink-900);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: background-color 0.2s, color 0.2s;
}

.nav-item:hover, .nav-item.active {
  background-color: var(--sand-100);
  color: var(--acacia-700);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: none;
  border: 1px solid var(--line);
  color: var(--ink-900);
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  transition: background-color 0.2s, transform 0.2s;
}

.theme-toggle-btn:hover {
  background-color: var(--sand-100);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Hamburger Menu (Mobile Only) */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink-900);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* --- HERO SECTION --- */
.hero {
  padding-top: calc(var(--header-height) + var(--gap-xl));
  padding-bottom: var(--gap-xl);
  background:
    radial-gradient(circle at 80% 20%, rgba(239,178,78,.85) 0%, transparent 55%),
    linear-gradient(180deg, #fdf3e0 0%, #f7e9cf 38%, #f1ddbf 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--gap-lg);
  align-items: center;
}

.hero-content {
  max-width: 650px;
}

.hero-tag {
  display: inline-block;
  background-color: var(--sand-100);
  color: var(--acacia-700);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.35rem 0.85rem;
  border-radius: 50px;
  margin-bottom: var(--gap-sm);
}

.hero-subheadline {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--ink-700);
  margin-bottom: var(--gap-lg);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap-sm);
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--acacia-700);
  color: #fff !important;
  border-color: var(--acacia-700);
}

.btn-primary:hover {
  background-color: var(--acacia-800);
  border-color: var(--acacia-800);
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: var(--solar-500);
  color: #2a1d05 !important;
  border-color: var(--solar-500);
}

.btn-secondary:hover {
  background-color: var(--solar-400);
  border-color: var(--solar-400);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border-color: var(--ink-900);
  color: var(--ink-900);
}

.btn-outline:hover {
  background-color: var(--ink-900);
  color: #fff;
  transform: translateY(-2px);
}

.hero-graphic-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero-card {
  width: 100%;
  max-width: 400px;
  padding: var(--gap-md);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.hero-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: var(--gap-sm);
  background-color: var(--sand-100);
}

/* --- MAIN PAGE CONTENT & SECTIONS --- */
main {
  padding-bottom: var(--gap-xl);
}

.section {
  padding: var(--gap-xl) 0;
}

.section-muted {
  background-color: var(--sand-100);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-header {
  max-width: 700px;
  margin-bottom: var(--gap-lg);
}

.section-tag {
  color: var(--clay-700);
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  margin-bottom: var(--gap-xs);
  display: block;
}

/* --- GRID CARDS & UTILITIES --- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--gap-md);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--gap-lg);
}

.card {
  background-color: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--gap-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card-tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background-color: var(--sand-100);
  color: var(--acacia-700);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: var(--gap-sm);
}

.card h3 {
  margin-bottom: 0.75rem;
}

.card p {
  color: var(--ink-700);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* --- PILLARS DIAGRAM (CONCENTRIC RINGS) --- */
.pillars-diagram {
  display: flex;
  align-items: center;
  gap: var(--gap-lg);
  flex-wrap: wrap;
}

.pillars-svg-wrapper {
  flex: 0 0 auto;
  width: min(420px, 100%);
}

.pillars-svg-wrapper svg {
  width: 100%;
  height: auto;
  display: block;
}

.pillar-segment {
  cursor: pointer;
  stroke: var(--bg);
  stroke-width: 3;
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.pillars-svg-wrapper.has-active .pillar-segment:not(.active) {
  opacity: 0.45;
  filter: saturate(0.35);
}

.pillar-segment.active {
  filter: brightness(1.18) drop-shadow(0 2px 12px rgba(0,0,0,0.3));
}

.pillars-info-panel {
  flex: 1;
  min-width: 240px;
  padding: var(--gap-md);
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  min-height: 200px;
  display: flex;
  align-items: center;
}

.panel-content {
  width: 100%;
  transition: opacity 0.15s ease;
}

.panel-content h3 {
  margin-top: 0.4rem;
  margin-bottom: 0.6rem;
}

.panel-content p {
  margin-bottom: 0;
}

.panel-tag {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}

.panel-hint {
  color: var(--ink-500);
  font-style: italic;
  font-size: 0.9rem;
}

.svg-ring-label {
  font-family: var(--font-sans, sans-serif);
  font-size: 13px;
  font-weight: 700;
  fill: #fff;
  pointer-events: none;
  text-anchor: middle;
  dominant-baseline: middle;
  text-shadow: 0 1px 4px rgba(0,0,0,0.55);
}

.svg-ring-label-sm {
  font-size: 11px;
}

.svg-label-dark {
  fill: #3a2200;
  text-shadow: none;
}

/* --- THE ONE-MINUTE OVERVIEW BLOCK --- */
.one-minute-box {
  background-color: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--gap-lg);
  box-shadow: var(--shadow-sm);
}

.pitch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--gap-md);
}

.pitch-item h3 {
  color: var(--acacia-700);
  font-size: 1.15rem;
  border-bottom: 2px solid var(--solar-glow);
  padding-bottom: 0.25rem;
  margin-bottom: 0.75rem;
}

.pitch-item p {
  font-size: 0.95rem;
  color: var(--ink-700);
}

/* --- THE DURABILITY / TRUTHTELLING COMPARISON --- */
.durability-box {
  background-color: var(--bg-alt);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.durability-header {
  background-color: var(--sand-100);
  padding: var(--gap-md);
  border-bottom: 1px solid var(--line);
}

.durability-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.durability-column {
  padding: var(--gap-md);
}

.durability-column:first-child {
  border-right: 1px solid var(--line);
  background-color: rgba(181,86,47,.04);
}

.durability-column h3 {
  font-size: 1.1rem;
  margin-bottom: var(--gap-md);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.durability-column:first-child h3 { color: var(--clay-600); }
.durability-column:last-child h3  { color: var(--acacia-700); }

.durability-list {
  list-style: none;
}

.durability-item {
  margin-bottom: var(--gap-sm);
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.95rem;
}

.durability-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.durability-column:first-child .durability-item::before {
  background-color: var(--clay-600);
}

.durability-column:last-child .durability-item::before {
  background-color: var(--acacia-700);
}

.durability-item strong {
  display: block;
  color: var(--ink-900);
}

.durability-item span {
  color: var(--ink-500);
}

/* --- STATS / KPI GRID --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap-md);
  margin-top: var(--gap-md);
}

.stat-card {
  text-align: center;
  padding: var(--gap-md);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--solar-500);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-900);
  margin-bottom: 0.25rem;
}

.stat-desc {
  font-size: 0.8rem;
  color: var(--ink-500);
}

/* --- INTERACTIVE TABS & TOGGLES --- */
.toggle-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: var(--gap-lg);
  background-color: var(--sand-100);
  padding: 0.35rem;
  border-radius: 50px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--line);
}

.toggle-btn {
  padding: 0.6rem 1.4rem;
  border: none;
  background: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-500);
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn.active {
  background-color: var(--acacia-700);
  color: #fff;
}

/* --- TABLES & BUDGETS --- */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin-bottom: var(--gap-md);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
  background-color: var(--bg-alt);
}

th, td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
}

th {
  background-color: var(--sand-100);
  font-weight: 700;
  color: var(--ink-900);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

tr:last-child td {
  border-bottom: none;
}

.table-total-row {
  font-weight: 700;
  background-color: var(--sand-100);
}

.table-total-row td {
  border-top: 2px solid var(--line);
}

/* Scenarios details wrapper */
.scenario-panel {
  display: none;
}

.scenario-panel.active {
  display: block;
}

/* --- ROADMAP TIMELINE --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 2rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-color: var(--line);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--gap-lg);
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.35rem;
  top: 0.35rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--solar-500);
  border: 3px solid var(--bg);
  z-index: 1;
}

.timeline-item.completed::before {
  background-color: var(--acacia-700);
}

.timeline-badge {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--clay-700);
  margin-bottom: 0.25rem;
  display: block;
}

.timeline-item.completed .timeline-badge {
  color: var(--acacia-700);
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--ink-700);
}

.timeline-outputs {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background-color: var(--sand-100);
  border-radius: 6px;
  font-size: 0.9rem;
  border-left: 3px solid var(--acacia-700);
}

.timeline-outputs strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--ink-900);
}

/* --- RISK ACCORDIONS --- */
.accordion {
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background-color: var(--bg-alt);
}

.accordion-item {
  border-bottom: 1px solid var(--line);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 1.25rem;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink-900);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background-color 0.2s;
}

.accordion-trigger:hover {
  background-color: var(--sand-100);
}

.accordion-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: transform 0.2s ease;
}

.accordion-trigger[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
}

.accordion-panel {
  padding: 0 1.25rem 1.25rem 1.25rem;
  font-size: 0.95rem;
  color: var(--ink-700);
}

/* --- CALLOUTS --- */
.callout {
  background-color: var(--sand-100);
  border-left: 4px solid var(--acacia-700);
  border-radius: var(--radius-sm);
  padding: var(--gap-sm) var(--gap-md);
}

.callout-warn {
  background-color: #fbf0e8;
  border-left-color: var(--clay-600);
}

.callout-info {
  background-color: #eef6f7;
  border-left-color: var(--water-600);
}

/* Featured card variant */
.card-featured {
  background-color: var(--bg-alt);
  border: 2px solid var(--solar-500);
  box-shadow: 0 0 0 3px var(--solar-glow);
}

/* --- FORMS & INPUTS --- */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--gap-lg);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: var(--gap-md);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-900);
}

input, textarea, select {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  background-color: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-900);
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--water-600);
  box-shadow: 0 0 0 3px rgba(31,127,147,.15);
}

input:user-invalid, textarea:user-invalid, select:user-invalid {
  border-color: var(--clay-600);
  box-shadow: 0 0 0 3px rgba(181,86,47,.15);
}

input:user-valid, textarea:user-valid, select:user-valid {
  border-color: var(--acacia-700);
}

.form-info-note {
  font-size: 0.85rem;
  color: var(--ink-700);
  background-color: var(--sand-100);
  padding: var(--gap-sm);
  border-radius: var(--radius-sm);
  margin-bottom: var(--gap-md);
  border-left: 3px solid var(--acacia-700);
}

/* --- FOOTER --- */
footer {
  background-color: var(--bg-deep);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: var(--gap-xl) 0 var(--gap-md) 0;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--gap-lg);
  margin-bottom: var(--gap-lg);
}

.footer-brand h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--dark-text-heading);
  margin-bottom: 0.5rem;
}

.footer-brand p {
  color: var(--dark-text-body);
  font-size: 0.85rem;
  max-width: 320px;
}

.footer-links h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dark-text-note);
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--dark-text-body);
}

.footer-links a:hover {
  color: var(--solar-400);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: var(--gap-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--gap-sm);
  color: var(--dark-text-fine);
  font-size: 0.8rem;
}

/* --- MOBILE DRAWER & NAV --- */
@media (max-width: 768px) {
  .pillars-diagram {
    flex-direction: column;
  }

  .pillars-svg-wrapper {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
  }

  .pillars-info-panel {
    width: 100%;
    min-height: 160px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--gap-md);
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-graphic-container {
    order: -1;
  }

  .menu-toggle {
    display: block;
  }

  nav.nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--bg);
    flex-direction: column;
    padding: var(--gap-lg) var(--gap-md);
    gap: var(--gap-md);
    border-top: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 999;
  }

  nav.nav-links.open {
    transform: translateX(0);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--gap-md);
  }

  .durability-grid {
    grid-template-columns: 1fr;
  }

  .durability-column:first-child {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}

/* --- MOTION REDUCED ANIMATIONS --- */
@media (prefers-reduced-motion: no-preference) {
  .fade-in-on-scroll {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  }

  .fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
  }
}
