:root {
  --bg:         #0c0c0c;
  --surface:    #141414;
  --surface2:   #1c1c1c;
  --border:     #2a2a2a;
  --border2:    #3a3a3a;
  --text:       #ddd5c4;
  --text-dim:   #8a8070;
  --text-faint: #4a4440;
  --accent:     #b5293a;
  --accent-dim: #7a1a26;
  --gold:       #c8a84b;
  --mono:       'Courier New', 'Lucida Console', monospace;
  --serif:      Georgia, 'Times New Roman', serif;
  --sans:       system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.75;
}

/* ── LAYOUT ── */

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

section {
  padding: 5rem 0;
  border-bottom: 1px solid var(--border);
}

section:last-child { border-bottom: none; }

/* ── NAV ── */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12,12,12,0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

nav .inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 3.25rem;
}

nav .brand {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}

nav a {
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s;
}

nav a:hover { color: var(--text); }

/* ── HERO ── */

.hero {
  padding: 0;
  border-bottom: none;
  position: relative;
  overflow: hidden;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-photo {
  position: absolute;
  inset: 0;
  background-image: url('photos/maldon-east/beechwood-1977-a.jpg');
  background-size: cover;
  background-position: center 30%;
  filter: brightness(0.28) saturate(0.4);
}

.hero-content {
  position: relative;
  padding: 4rem 1.5rem 5rem;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
}

.hero-rule {
  width: 3rem;
  height: 2px;
  background: var(--accent);
  margin-bottom: 2rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: normal;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 1.5rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--gold);
}

.hero-sub {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.hero-lede {
  font-size: 1.25rem;
  line-height: 1.7;
  color: #ccc0b0;
  max-width: 580px;
  margin-bottom: 3rem;
}

.hero-meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
}

.hero-photo-credit {
  position: absolute;
  bottom: 1rem;
  right: 1.5rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.05em;
}

/* ── SECTION HEADERS ── */

.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--accent-dim);
  opacity: 0.4;
}

h2 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: normal;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 1.5rem;
}

h3 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: normal;
  color: var(--gold);
  margin: 2.5rem 0 0.75rem;
}

p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }

/* ── INTRO / MONUMENT ── */

.monument-quote {
  font-size: 1.4rem;
  line-height: 1.6;
  color: #e8e0d0;
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
}

/* ── PHOTO BLOCKS ── */

.photo-block {
  margin: 2.5rem 0;
}

.photo-block img {
  width: 100%;
  display: block;
  filter: sepia(0.15) saturate(0.9);
  border: 1px solid var(--border2);
}

.photo-caption {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}

.photo-caption .licence {
  color: var(--text-faint);
  white-space: nowrap;
}

/* ── SPEC TABLE ── */

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.82rem;
  margin: 1.5rem 0;
}

.spec-table th {
  text-align: left;
  padding: 0.4rem 0.75rem;
  color: var(--text-faint);
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border2);
}

.spec-table td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

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

.spec-table td:first-child { color: var(--text-dim); }
.spec-table td:last-child { color: var(--text-faint); font-size: 0.75rem; }

.conf-pv { color: #4caf50; }
.conf-in { color: var(--gold); }
.conf-as { color: var(--text-faint); }

/* ── TIMELINE ── */

.timeline {
  position: relative;
  padding-left: 2rem;
  margin-top: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.4rem;
  bottom: 0;
  width: 1px;
  background: var(--border2);
}

.tl-entry {
  position: relative;
  margin-bottom: 1.75rem;
  padding-left: 0.5rem;
}

.tl-entry::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.55rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border2);
  border: 1px solid var(--border2);
}

.tl-entry.key::before {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(181,41,58,0.4);
}

.tl-date {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 0.2rem;
}

.tl-text {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-dim);
}

.tl-text strong { color: var(--text); }

/* ── ASCII DRAWINGS ── */

.drawing-block {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 2px;
  margin: 2rem 0;
  overflow-x: auto;
}

.drawing-label {
  padding: 0.5rem 1rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border);
}

.drawing-block pre {
  padding: 1.25rem 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.5;
  color: #9a9080;
  white-space: pre;
  overflow-x: auto;
}

/* ── VIADUCT URGENCY ── */

.urgency-box {
  border: 1px solid var(--accent-dim);
  background: rgba(181,41,58,0.06);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.urgency-box strong {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* ── BEAMNG CALLOUT ── */

.beamng-callout {
  background: var(--surface2);
  border-left: 3px solid var(--gold);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-dim);
}

.beamng-callout strong { color: var(--gold); font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* ── ATTRIBUTIONS ── */

.attrib-list {
  list-style: none;
  margin-top: 1.5rem;
}

.attrib-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  line-height: 1.6;
}

.attrib-list li:last-child { border-bottom: none; }

.attrib-list .who {
  font-family: var(--mono);
  color: var(--gold);
  font-size: 0.8rem;
  display: block;
  margin-bottom: 0.2rem;
}

.attrib-list .lic {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-faint);
  margin-left: 0.5rem;
}

.attrib-list a { color: var(--text-dim); }
.attrib-list a:hover { color: var(--text); }

/* ── FOOTER ── */

footer {
  padding: 3rem 0 4rem;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.08em;
  line-height: 2;
}

footer .closing {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--text-dim);
  display: block;
  margin-bottom: 1.5rem;
}

/* ── RESPONSIVE ── */

@media (max-width: 600px) {
  .hero { min-height: 100svh; }
  .hero h1 { font-size: 2.25rem; }
  .hero-lede { font-size: 1.1rem; }
  nav ul { gap: 1rem; }
  .spec-table { font-size: 0.75rem; }
  .drawing-block pre { font-size: 0.62rem; }
  .photo-caption { flex-direction: column; gap: 0.25rem; }
}


/* ── SCHEMATIC ELEVATIONS (SVG, replaces the old ASCII drawings) ── */
.drawing-block svg.elev { display:block; width:100%; min-width:620px; height:auto; background:var(--surface); }
.elev .ln   { stroke:#9a9080; stroke-width:1.4; stroke-linejoin:round; stroke-linecap:round; fill:none; }
.elev .fl   { fill:var(--surface2); }
.elev .op   { fill:var(--bg); }
.elev .bk   { fill:#3a1a1e; }
.elev .dash { stroke-dasharray:4 3; stroke:#6a6050; }
.elev .gd   { stroke:#c8c0b0; stroke-width:2; }
.elev .br   { stroke:#b5293a; stroke-width:1.6; }
.elev .hatch{ fill:#1f1b18; }
.elev .wa   { fill:#16242b; stroke:#3b6b7a; stroke-width:1.4; }
.elev .dm   { stroke:var(--gold); stroke-width:1; fill:none; }
.elev .dt   { fill:var(--gold); font:11px var(--mono); }
.elev .tx   { fill:#b8ae9c; font:11.5px var(--mono); }
.elev .tg   { fill:var(--text-dim); font:italic 11.5px var(--mono); }
