/* Shared styles for Elm City Explorer Findings articles. */
:root {
  --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Fraunces', 'Instrument Serif', Georgia, serif;
  --primary: #00d9ff;
  --accent-warm: #D4A843;
  --error: #ff3d3d;
  --success: #00c853;
  --text-1: #e4e7eb; --text-2: #9aa5b1; --text-3: #52606d; --text-4: #323f4b;
  --bg-0: #05070a;
  --bg-1: #0a0e14; --bg-2: #141921; --bg-3: #1f2933;
  --border-1: #1f2933; --border-2: #2d3748; --border-3: #3e4c5e;
  --glow: 0 0 8px rgba(0,217,255,0.15);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans); background: var(--bg-0); color: var(--text-1);
  font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased;
  min-height: 100vh; overflow-x: hidden;
}
a { color: var(--primary); }
a:hover { text-shadow: var(--glow); }

/* Subtle grain overlay — film-print feel */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.6'/></svg>");
  opacity: 0.025; mix-blend-mode: overlay;
}

/* Top nav */
.topnav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: rgba(10,14,20,0.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-1);
}
.topnav .brand {
  font-family: var(--font-mono); font-size: 13px; color: var(--primary);
  font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em;
}
.topnav .brand-sub { color: var(--text-3); margin-left: 12px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; }
.topnav a.back {
  font-family: var(--font-mono); font-size: 11px; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.1em; padding: 7px 14px;
  border: 1px solid var(--primary); text-decoration: none;
  transition: all 0.15s;
}
.topnav a.back:hover { background: rgba(0,217,255,0.1); box-shadow: var(--glow); }

/* Hero */
.hero {
  position: relative; min-height: 92vh;
  padding: 16vh clamp(24px, 6vw, 80px) 18vh;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 1200px; margin: 0 auto;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 25% 60%, rgba(0,217,255,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(212,168,67,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 11px; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.22em; margin-bottom: 32px;
}
.eyebrow::before {
  content: ""; width: 22px; height: 1px; background: var(--primary);
  box-shadow: var(--glow);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(44px, 6vw + 18px, 108px);
  font-weight: 400; font-style: italic;
  letter-spacing: -0.025em; line-height: 0.96;
  max-width: 22ch; margin-bottom: 36px;
  font-variation-settings: "opsz" 144;
}
.hero h1 em {
  font-style: normal; font-weight: 400;
  background: linear-gradient(120deg, var(--primary) 0%, #4ee8ff 50%, var(--accent-warm) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero .dek {
  font-family: var(--font-sans); font-size: clamp(17px, 0.8vw + 15px, 22px);
  color: var(--text-2); line-height: 1.5; max-width: 56ch; font-weight: 400;
}
.hero .byline {
  margin-top: 48px; font-family: var(--font-mono); font-size: 11px;
  color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase;
}
.hero .byline .sep { margin: 0 10px; color: var(--text-4); }

/* Article body */
article {
  max-width: 760px; margin: 0 auto; padding: 40px clamp(24px, 6vw, 48px) 120px;
  position: relative; z-index: 2;
}
article section { margin-bottom: 96px; opacity: 0; transform: translateY(32px); transition: opacity 0.8s ease, transform 0.8s ease; }
article section.is-visible { opacity: 1; transform: translateY(0); }
article h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(32px, 2.5vw + 12px, 52px);
  letter-spacing: -0.02em; line-height: 1.05;
  margin-bottom: 28px; color: var(--text-1);
  font-variation-settings: "opsz" 72;
  max-width: 20ch;
}
article h2 em {
  font-style: italic; color: var(--accent-warm); font-weight: 400;
  font-variation-settings: "opsz" 72;
}
article p {
  font-family: var(--font-sans); font-size: 18px; line-height: 1.7;
  color: var(--text-1); margin-bottom: 22px; max-width: 62ch;
}
article p.dropcap::first-letter {
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  float: left; font-size: 5.4em; line-height: 0.82; padding: 8px 14px 0 0;
  color: var(--accent-warm); font-variation-settings: "opsz" 144;
}
article p strong { color: var(--text-1); font-weight: 600; }
article p a { color: var(--primary); text-decoration: none; border-bottom: 1px solid rgba(0,217,255,0.4); padding-bottom: 1px; }
article p a:hover { border-bottom-color: var(--primary); }

.kicker {
  font-family: var(--font-mono); font-size: 10px; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.2em; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.kicker-num { color: var(--text-3); font-variant-numeric: tabular-nums; }

/* Big stat callout */
.stat-callout {
  margin: 48px 0; padding: 44px 0;
  border-top: 1px solid var(--border-1); border-bottom: 1px solid var(--border-1);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  text-align: left;
}
.stat-callout .s-val {
  font-family: var(--font-mono); font-weight: 500;
  font-size: clamp(36px, 3.2vw + 10px, 64px);
  color: var(--primary); line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(0,217,255,0.18);
}
.stat-callout .s-val.warm { color: var(--accent-warm); text-shadow: 0 0 24px rgba(212,168,67,0.2); }
.stat-callout .s-val.danger { color: var(--error); text-shadow: 0 0 24px rgba(255,61,61,0.2); }
.stat-callout .s-lbl {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.1em; margin-top: 10px;
  max-width: 22ch;
}

/* Pull quote */
.pullquote {
  margin: 48px 0; padding: 0 0 0 28px;
  border-left: 3px solid var(--accent-warm);
  font-family: var(--font-display); font-style: italic; font-weight: 400;
  font-size: clamp(22px, 1.2vw + 14px, 32px); line-height: 1.35;
  color: var(--text-1); max-width: 40ch;
  font-variation-settings: "opsz" 72;
}
.pullquote-source {
  margin-top: 16px; font-family: var(--font-mono); font-size: 11px;
  color: var(--text-3); text-transform: uppercase; letter-spacing: 0.1em;
  font-style: normal;
}

/* Property list */
.prop-list {
  margin: 32px 0; padding: 0; list-style: none;
  border-top: 1px solid var(--border-1);
}
.prop-list li {
  display: grid; grid-template-columns: 36px 1fr auto;
  gap: 16px; padding: 14px 0;
  border-bottom: 1px solid var(--border-1);
  align-items: baseline;
}
.prop-list .p-num {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.prop-list .p-addr {
  font-family: var(--font-mono); font-size: 14px; color: var(--text-1);
  font-weight: 500;
}
.prop-list .p-owner {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-3);
  text-align: right;
}

/* Timeline */
.timeline {
  margin: 40px 0; padding-left: 24px; border-left: 1px solid var(--border-2);
  position: relative;
}
.timeline-item { margin-bottom: 28px; position: relative; }
.timeline-item::before {
  content: ""; position: absolute; left: -29px; top: 6px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--bg-1);
  border: 2px solid var(--primary); box-shadow: var(--glow);
}
.timeline-date {
  font-family: var(--font-mono); font-size: 10px; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 4px;
  font-weight: 600;
}
.timeline-event {
  font-family: var(--font-sans); font-size: 16px; color: var(--text-1);
  line-height: 1.5;
}
.timeline-event strong { color: var(--text-1); font-weight: 600; }

/* Year chart — Mandy article */
.year-chart { margin: 32px 0; padding: 20px 0; border-top: 1px solid var(--border-1); border-bottom: 1px solid var(--border-1); }
.year-row { display: grid; grid-template-columns: 80px 1fr 60px; gap: 12px; align-items: center; padding: 4px 0; }
.y-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.y-bar { height: 10px; background: linear-gradient(90deg, rgba(0,217,255,0.3), rgba(0,217,255,0.1)); border-left: 2px solid var(--primary); min-width: 2px; }
.y-bar.hot { background: linear-gradient(90deg, rgba(0,217,255,0.45), rgba(0,217,255,0.2)); box-shadow: 0 0 12px rgba(0,217,255,0.25); }
.y-count { font-family: var(--font-mono); font-size: 13px; color: var(--primary); text-align: right; font-variant-numeric: tabular-nums; }
.y-count.warm { color: var(--accent-warm); font-weight: 600; }

/* Next-question bullets — Mandy §5 */
.next-questions { list-style: none; padding: 0; margin: 20px 0; }
.next-questions li {
  padding: 14px 0 14px 32px; position: relative;
  font-family: var(--font-sans); font-size: 17px; line-height: 1.55;
  color: var(--text-2);
  border-bottom: 1px solid var(--border-1);
}
.next-questions li:last-child { border-bottom: none; }
.next-questions li::before {
  content: "?"; position: absolute; left: 0; top: 12px;
  font-family: var(--font-display); font-style: italic; font-size: 22px;
  color: var(--accent-warm); width: 22px; text-align: center;
  font-variation-settings: "opsz" 72;
}

/* Sources list */
.sources {
  margin-top: 60px; padding-top: 32px; border-top: 1px solid var(--border-2);
}
.sources h3 {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 20px;
  font-weight: 600;
}
.sources ol { list-style: none; padding: 0; counter-reset: src; }
.sources li {
  counter-increment: src; padding-left: 28px; position: relative;
  margin-bottom: 14px; font-size: 14px; color: var(--text-2);
  line-height: 1.5;
}
.sources li::before {
  content: counter(src);
  position: absolute; left: 0; top: 2px;
  font-family: var(--font-mono); font-size: 10px; color: var(--primary);
  background: rgba(0,217,255,0.08); width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(0,217,255,0.3); border-radius: 50%;
}
.sources li a { color: var(--text-1); border-bottom: 1px solid var(--border-3); text-decoration: none; }
.sources li a:hover { color: var(--primary); border-bottom-color: var(--primary); }
.method-note { font-size: 13px; color: var(--text-3); margin-top: 24px; line-height: 1.6; }

/* Footer */
footer {
  padding: 60px 28px; border-top: 1px solid var(--border-1);
  text-align: center; background: var(--bg-1);
}
footer .f-mark {
  font-family: var(--font-display); font-style: italic; font-size: 28px;
  color: var(--text-2); margin-bottom: 12px;
  font-variation-settings: "opsz" 72;
}
footer .f-meta {
  font-family: var(--font-mono); font-size: 10px; color: var(--text-3);
  text-transform: uppercase; letter-spacing: 0.1em;
}
footer .f-cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 24px; padding: 12px 28px;
  border: 1px solid var(--primary); color: var(--primary);
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.12em; text-decoration: none;
  transition: all 0.15s;
}
footer .f-cta:hover { background: rgba(0,217,255,0.1); box-shadow: var(--glow); }
/* Sister-site cross-link. Quiet — same monospace + muted color as .f-meta
   so it reads as colophon-style attribution, not a competing CTA. The
   underlined link gets the standard primary color on hover only. */
footer .f-sister {
  margin-top: 32px; padding-top: 20px;
  border-top: 1px solid var(--bord-1);
  max-width: 520px; margin-left: auto; margin-right: auto;
  font-family: var(--font-mono); font-size: 11px; color: var(--text-3);
  line-height: 1.6; letter-spacing: 0.02em;
}
footer .f-sister a {
  color: var(--text-2); text-decoration: none;
  border-bottom: 1px dotted var(--text-3); padding-bottom: 1px;
  transition: color 0.15s, border-color 0.15s;
}
footer .f-sister a:hover { color: var(--primary); border-bottom-color: var(--primary); }

@media (max-width: 768px) {
  .stat-callout { grid-template-columns: 1fr; gap: 24px; }
  article { padding: 24px 20px 80px; }
  article p { font-size: 17px; }
  .hero { padding: 10vh 20px 14vh; }
  .year-row { grid-template-columns: 60px 1fr 50px; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  article section { opacity: 1 !important; transform: none !important; }
  html { scroll-behavior: auto; }
}
