:root {
  --bg-canvas: #1c1f24;
  --bg-band-alt: #22262c;
  --bg-surface: #292d32;
  --bg-surface-hover: #32373e;
  --text-primary: #e5e7eb;
  --text-muted: #9ca3af;
  --accent-primary: #38b892;
  --accent-secondary: #6ee7b7;
  --border-subtle: rgba(229, 231, 235, 0.08);
  --ease-kinetic: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-elevation: 0 12px 32px -4px rgba(0, 0, 0, 0.35);
  --glow-accent: 0 0 20px -6px rgba(56, 184, 146, 0.35);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  line-height: 1.7;
  overflow-wrap: anywhere;
  hyphens: auto;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  object-fit: cover;
}

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

a:hover, a:focus-visible {
  color: var(--accent-secondary);
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  margin-top: 0;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #f3f4f6;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.65rem, 3vw, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.65rem; }

p { margin-top: 0; margin-bottom: 1.15rem; }

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.prose {
  max-width: 70ch;
}

/* Header & Navigation */
.site-header {
  position: relative;
  z-index: 40;
  background: transparent;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.75rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  grid-template-columns: repeat(2, 8px);
  gap: 3px;
}

.brand-mark span {
  width: 8px;
  height: 8px;
  background: var(--accent-primary);
  display: block;
}

.brand-mark span:nth-child(2) { opacity: 0.55; }
.brand-mark span:nth-child(3) { opacity: 0.35; }

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.desktop-nav a {
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--accent-primary);
  color: var(--text-primary);
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-nav-drawer {
  display: none;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--accent-primary);
  padding: 1rem 1.5rem 1.5rem;
}

.mobile-nav-drawer.is-open {
  display: block;
}

.mobile-nav-drawer a {
  display: block;
  padding: 0.7rem 0;
  color: var(--text-primary);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-nav-drawer a:last-child { border-bottom: none; }

/* Planning Grid & Charcoal Bands */
.planning-grid-bg {
  background-image:
    linear-gradient(to right, rgba(56, 184, 146, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 184, 146, 0.05) 1px, transparent 1px),
    linear-gradient(to right, rgba(229, 231, 235, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(229, 231, 235, 0.025) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: top center;
}

.band {
  padding: 4.5rem 0;
  background-color: var(--bg-canvas);
}

.band-alt {
  background-color: var(--bg-band-alt);
}

.hero-band {
  padding: 5.5rem 0 5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.hero-lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: #d1d5db;
  max-width: 62ch;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* Square-ended Mint Buttons */
.btn-mint {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border: 1.5px solid var(--accent-primary);
  border-radius: 0;
  background: transparent;
  color: var(--accent-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-kinetic), color 0.2s var(--ease-kinetic), transform 0.25s var(--ease-kinetic), box-shadow 0.25s var(--ease-kinetic);
}

.btn-mint:hover, .btn-mint:focus-visible {
  background-color: var(--accent-primary);
  color: #111417;
  transform: translateY(-2px);
  box-shadow: var(--glow-accent);
}

.btn-subtle {
  display: inline-block;
  padding: 0.85rem 1.35rem;
  border: 1px solid rgba(229, 231, 235, 0.25);
  border-radius: 0;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.btn-subtle:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Panels & Cards */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.75rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
}

.panel {
  background-color: var(--bg-surface);
  border-radius: 4px;
  padding: 1.75rem;
  box-shadow: var(--shadow-elevation);
  transition: transform 0.3s var(--ease-kinetic), background-color 0.25s ease, box-shadow 0.3s var(--ease-kinetic);
}

.panel-lift:hover {
  transform: translateY(-4px);
  background-color: var(--bg-surface-hover);
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.45), var(--glow-accent);
}

.panel-media {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 4px 4px 0 0;
}

.panel-media .panel-body {
  padding: 1.5rem;
  flex: 1;
}

.meta-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 2.25rem;
}

.section-header p {
  color: var(--text-muted);
  max-width: 58ch;
  margin-bottom: 0;
}

/* Split Layout & Diagrams */
.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 2.5rem;
  align-items: start;
}

.diagram-box {
  background: var(--bg-surface);
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: var(--shadow-elevation);
}

.diagram-layer {
  background: #202429;
  border-left: 3px solid var(--accent-primary);
  border-radius: 4px;
  padding: 1rem 1.15rem;
  margin-bottom: 0.85rem;
}

.diagram-layer:last-child { margin-bottom: 0; }

.diagram-layer strong {
  display: block;
  color: #f3f4f6;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.diagram-layer span {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* District Cross Section */
.cross-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  background: var(--bg-surface);
  padding: 1.5rem;
  border-radius: 4px;
  box-shadow: var(--shadow-elevation);
}

.zone-slice {
  background: #202429;
  padding: 1.15rem;
  border-radius: 4px;
  border-top: 3px solid var(--accent-primary);
}

.zone-slice .zone-metric {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin: 0.35rem 0;
}

/* Before / After Panel */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.compare-panel {
  background: var(--bg-surface);
  border-radius: 4px;
  padding: 1.5rem;
  box-shadow: var(--shadow-elevation);
}

.compare-panel.is-after {
  border-top: 3px solid var(--accent-primary);
}

.compare-panel.is-before {
  border-top: 3px solid #6b7280;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  background: var(--bg-surface);
  border-radius: 4px;
  box-shadow: var(--shadow-elevation);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 580px;
  text-align: left;
}

th, td {
  padding: 0.95rem 1.15rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.93rem;
}

th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  background: #22262b;
}

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

/* Figure Captions */
.study-figure {
  margin: 0;
  background: var(--bg-surface);
  padding: 0.75rem;
  border-radius: 4px;
  box-shadow: var(--shadow-elevation);
}

.study-figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.study-figure figcaption {
  padding: 0.75rem 0.25rem 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* FAQ Accordion / Cards */
.faq-list {
  display: grid;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-surface);
  border-radius: 4px;
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-elevation);
}

.faq-item h3 {
  font-size: 1.08rem;
  color: #f3f4f6;
  margin-bottom: 0.5rem;
}

.faq-item p {
  margin-bottom: 0;
  color: #d1d5db;
}

/* Contact Brief Tool */
.tool-form {
  display: grid;
  gap: 1.15rem;
}

.form-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #d1d5db;
  margin-bottom: 0.45rem;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: #1c1f24;
  color: var(--text-primary);
  border: 1px solid rgba(229, 231, 235, 0.16);
  border-radius: 4px;
  padding: 0.75rem 0.9rem;
  font-family: inherit;
  font-size: 0.95rem;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--accent-primary);
  outline: none;
}

.brief-output {
  background: #15181c;
  border: 1px solid rgba(56, 184, 146, 0.35);
  border-radius: 4px;
  padding: 1.15rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  color: #d1d5db;
  white-space: pre-wrap;
  min-height: 12rem;
}

.tool-status {
  font-size: 0.88rem;
  color: var(--accent-secondary);
  min-height: 1.4rem;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s var(--ease-kinetic), transform 0.65s var(--ease-kinetic);
}

.reveal.reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  background: #15181c;
  border-top: 1px solid var(--border-subtle);
  padding: 4rem 0 2.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-col h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #f3f4f6;
  margin-bottom: 0.9rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

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

.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent-primary); }

.footer-bottom {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.84rem;
}

@media (max-width: 860px) {
  .split-layout { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
  .desktop-nav { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .band { padding: 3.25rem 0; }
  .hero-band { padding: 3.75rem 0 3.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .panel-lift:hover, .btn-mint:hover { transform: none; }
}