/* Harry Brown — underpass night · film-first critical object */
:root {
  --night: #0b0f12;
  --deep: #10161c;
  --panel: #161e26;
  --ink: #e8e4da;
  --muted: #8b949a;
  --line: rgba(232, 228, 218, 0.12);
  --line-strong: rgba(232, 228, 218, 0.22);
  --amber: #d4a04a;
  --blood: #c44b3c;
  --fog: #6a8a9a;
  --green: #5a9e78;
  --font-d: "Fraunces", Georgia, serif;
  --font-b: "Spectral", Georgia, serif;
  --font-m: "IBM Plex Mono", ui-monospace, monospace;
  --max: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  background: var(--night);
  color: var(--ink);
  font-family: var(--font-b);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.35rem;
}

/* progress */
#prog {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 200;
  background: linear-gradient(90deg, var(--blood), var(--amber), var(--fog));
  pointer-events: none;
}

/* lang */
.langbar {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 150;
  display: flex;
  gap: 2px;
  font-family: var(--font-m);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  background: rgba(11, 15, 18, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
}

.langbar button {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
}

.langbar button.on {
  background: var(--ink);
  color: var(--night);
}

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(11, 15, 18, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0;
}

.nav-inner {
  display: flex;
  gap: 0.35rem 0.85rem;
  flex-wrap: wrap;
  align-items: center;
  font-family: var(--font-m);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.25rem 0;
}

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

.nav .brand {
  color: var(--ink);
  font-weight: 600;
  margin-right: 0.5rem;
}

/* hero */
.hero {
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 5.5rem 0 4rem;
  background:
    radial-gradient(100% 80% at 90% 10%, rgba(196, 75, 60, 0.12), transparent 50%),
    radial-gradient(80% 60% at 0% 100%, rgba(106, 138, 154, 0.14), transparent 55%),
    var(--night);
  position: relative;
}

.kicker {
  font-family: var(--font-m);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fog);
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.kicker::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--fog);
}

.hero h1 {
  font-family: var(--font-d);
  font-weight: 300;
  font-size: clamp(2.6rem, 9vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  max-width: 14ch;
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--blood);
  font-weight: 400;
}

.hero-lead {
  max-width: 42ch;
  color: rgba(232, 228, 218, 0.78);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.5;
  margin-bottom: 2rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.hero-ctas a {
  font-family: var(--font-m);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--amber);
  border-bottom: 1px solid rgba(212, 160, 74, 0.4);
  padding-bottom: 2px;
}

.hero-ctas a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* stats */
.stats {
  background: var(--deep);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 2.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 1rem;
}

.stat .n {
  font-family: var(--font-d);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 500;
  color: var(--amber);
  line-height: 1;
  display: block;
}

.stat:nth-child(2) .n {
  color: var(--fog);
}
.stat:nth-child(3) .n {
  color: var(--blood);
}
.stat:nth-child(5) .n {
  color: var(--green);
}

.stat .l {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.4rem;
  line-height: 1.35;
}

/* sections */
section.block {
  padding: 4.5rem 0;
}

section.block.alt {
  background: var(--deep);
}

section.block.paper {
  background: #efe8d8;
  color: #13201f;
}

section.block.paper .kicker {
  color: #8f3e3f;
}
section.block.paper .kicker::before {
  background: #8f3e3f;
}
section.block.paper h2 {
  color: #13201f;
}
section.block.paper .lead,
section.block.paper p {
  color: #314043;
}
section.block.paper .muted {
  color: #5d6f6f;
}

h2 {
  font-family: var(--font-d);
  font-weight: 400;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 18ch;
  margin-bottom: 1.1rem;
}

h2 em {
  font-style: italic;
  color: var(--blood);
}

.lead {
  max-width: 58ch;
  color: rgba(232, 228, 218, 0.78);
  margin-bottom: 1.75rem;
  font-size: 1.05rem;
}

.prose p {
  max-width: 62ch;
  margin-bottom: 1.15rem;
  color: rgba(232, 228, 218, 0.85);
}

.prose p:last-child {
  margin-bottom: 0;
}

/* cards */
.grid3 {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.15rem 1.2rem;
  background: var(--panel);
}

.card h3 {
  font-family: var(--font-d);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.45rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
}

/* toggle pill */
.toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 1rem;
  align-items: center;
}

.toggle-row .lab {
  font-family: var(--font-m);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  width: 100%;
  margin-bottom: 0.15rem;
}

.pill {
  font-family: var(--font-m);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  transition: 0.15s;
}

.pill.on {
  background: var(--amber);
  color: var(--night);
  border-color: var(--amber);
  font-weight: 600;
}

.pill:hover:not(.on) {
  color: var(--ink);
  border-color: var(--muted);
}

.panel-out {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.35rem 1.4rem;
  background: var(--panel);
  min-height: 7.5rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(232, 228, 218, 0.9);
  transition: background 0.35s var(--ease), border-color 0.35s;
}

.panel-out.warn {
  border-color: rgba(196, 75, 60, 0.35);
  background: linear-gradient(135deg, rgba(196, 75, 60, 0.08), var(--panel));
}

.panel-out.calm {
  border-color: rgba(90, 158, 120, 0.35);
  background: linear-gradient(135deg, rgba(90, 158, 120, 0.08), var(--panel));
}

/* walk stage */
.walk-stage {
  margin-top: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #070a0d;
  min-height: 220px;
  position: relative;
}

.walk-visual {
  height: 160px;
  background:
    linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.5)),
    repeating-linear-gradient(
      90deg,
      #121820 0 40px,
      #0e141a 40px 80px
    );
  position: relative;
  overflow: hidden;
}

.walk-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 40% 60% at 50% 100%, rgba(212, 160, 74, 0.15), transparent);
}

.walk-figure {
  position: absolute;
  bottom: 18px;
  left: 12%;
  width: 14px;
  height: 36px;
  background: #c8c0b0;
  border-radius: 3px 3px 2px 2px;
  transition: left 1.2s var(--ease), opacity 0.4s, filter 0.5s;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.walk-figure::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d4cdc0;
}

.walk-stage.haunted .walk-figure {
  filter: brightness(0.65);
  left: 42%;
}

.walk-stage.serene .walk-figure {
  left: 72%;
  filter: none;
}

.walk-stage.reveal .walk-visual {
  background: linear-gradient(180deg, #121820, #0a1014);
}

.walk-cap {
  padding: 1.15rem 1.25rem 1.35rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: rgba(232, 228, 218, 0.88);
}

.walk-cap strong {
  display: block;
  font-family: var(--font-d);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 0.45rem;
  color: var(--ink);
}

/* lenses */
.lens-panel {
  margin-top: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem 1.45rem 1.55rem;
  background: radial-gradient(120% 120% at 50% 0%, #1a222c, var(--deep));
  min-height: 12rem;
}

.lens-panel h3 {
  font-family: var(--font-d);
  font-size: clamp(1.3rem, 2.8vw, 1.7rem);
  font-weight: 500;
  margin-bottom: 0.65rem;
  line-height: 1.15;
}

.lens-panel > p {
  max-width: 58ch;
  color: rgba(232, 228, 218, 0.88);
  margin-bottom: 1rem;
  line-height: 1.55;
}

.lens-bullets {
  list-style: none;
  display: grid;
  gap: 0.55rem;
  max-width: 58ch;
}

.lens-bullets li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.45;
}

.lens-bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

/* dual ledger (craft vs politics) */
.dual-ledger {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.ledger {
  border-radius: 14px;
  padding: 1.25rem 1.3rem;
  border: 1px solid rgba(19, 32, 31, 0.12);
}

.ledger.good {
  background: rgba(255, 255, 255, 0.55);
  border-left: 3px solid #2f6b4f;
}

.ledger.bad {
  background: rgba(143, 62, 63, 0.08);
  border-left: 3px solid #8f3e3f;
}

.ledger h3 {
  font-family: var(--font-d);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #13201f;
}

.ledger p {
  font-size: 0.98rem;
  line-height: 1.55;
  color: #314043;
}

.ledger-note {
  margin-top: 1.25rem;
  font-family: var(--font-m);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: #5d6f6f;
  max-width: 52ch;
}

.aside-note {
  margin-top: 1.35rem;
  max-width: 58ch;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--muted);
  font-style: italic;
  border-left: 2px solid var(--fog);
  padding-left: 1rem;
}

/* tools */
.tools-grid {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.tool-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem 1.25rem;
  background: var(--panel);
}

.tool-tag {
  display: inline-block;
  font-family: var(--font-m);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.55rem;
}

.tool-card h3 {
  font-family: var(--font-d);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.tool-card p {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
}

/* table */
.table-wrap {
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

table.peers {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.peers th {
  font-family: var(--font-m);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.85rem 1rem;
  color: var(--muted);
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

table.peers td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: rgba(232, 228, 218, 0.85);
  line-height: 1.4;
}

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

table.peers tr.star {
  background: linear-gradient(90deg, rgba(196, 75, 60, 0.1), transparent);
}

table.peers .film {
  font-family: var(--font-d);
  font-weight: 600;
  color: #fff;
  display: block;
}

table.peers .yr {
  font-family: var(--font-m);
  font-size: 0.72rem;
  color: var(--muted);
}

/* closer */
.closer {
  text-align: center;
  padding: 5rem 0 4.5rem;
  background: radial-gradient(100% 80% at 50% 100%, rgba(196, 75, 60, 0.1), var(--night));
}

.closer h2 {
  max-width: 16ch;
  margin: 0 auto 1rem;
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
}

.closer .lead {
  margin: 0 auto 0;
  text-align: center;
}

/* sources */
.sources p {
  max-width: 62ch;
  color: var(--muted);
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
}

.sources a {
  color: var(--amber);
}

footer {
  border-top: 1px solid var(--line);
  padding: 2rem 1.35rem 3rem;
  text-align: center;
  font-family: var(--font-m);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  line-height: 1.7;
}

@media (min-width: 700px) {
  .stats-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  .grid3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .dual-ledger {
    grid-template-columns: 1fr 1fr;
  }
  .tools-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  table.peers {
    font-size: 0.92rem;
  }
}

@media (max-width: 700px) {
  thead {
    display: none;
  }
  table.peers,
  table.peers tbody,
  table.peers tr,
  table.peers td {
    display: block;
    width: 100%;
  }
  table.peers tr {
    border-bottom: 2px solid var(--line);
    padding: 0.5rem 0;
  }
  table.peers td {
    border: 0;
    padding: 0.35rem 1rem;
    display: grid;
    grid-template-columns: 42% 1fr;
    gap: 0.5rem;
  }
  table.peers td::before {
    content: attr(data-h);
    font-family: var(--font-m);
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .walk-figure {
    transition: none;
  }
}
