/* ============================================================
   THE DISTILLERY LEDGER · Vermilion Office
   1948 film noir. Palette: asphalt #111113 · smoke #1E1F24 ·
   streetlamp #D8D6CE · vermilion #B3231F (the only color) ·
   fog #6E7178
   ============================================================ */

:root {
  --asphalt: #111113;
  --smoke: #1E1F24;
  --lamp: #D8D6CE;
  --verm: #B3231F;
  --verm-hot: #e8564a;   /* lit tube core — same hue, hot */
  --fog: #6E7178;
  --paper: #d6d2c4;
  --ink: #17181b;
  --display: "Bodoni Moda", "Didot", serif;
  --body: "Crimson Pro", Georgia, serif;
  --type: "Special Elite", "Courier New", monospace;
  --ease-slow: cubic-bezier(.22,.9,.24,1);
  --ease-snap: cubic-bezier(.6,.02,.2,1);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--asphalt);
  color: var(--lamp);
  font-family: var(--body);
  font-size: 1.175rem;
  font-weight: 340;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--verm); color: var(--lamp); }

a { color: var(--lamp); text-decoration-color: color-mix(in srgb, var(--verm) 70%, transparent); text-underline-offset: 3px; }
a:hover { color: #fff; text-decoration-color: var(--verm-hot); }

:focus-visible { outline: 2px solid var(--verm-hot); outline-offset: 3px; border-radius: 1px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---- film grain over everything ---- */
.grain {
  position: fixed; inset: -50px; z-index: 60; pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- masthead ---- */
.masthead {
  position: absolute; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 2rem;
  font-family: var(--type); font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--lamp);
}
.mast-dim { color: var(--fog); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; align-items: stretch;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -10%, #1a1b20 0%, var(--asphalt) 55%),
    var(--asphalt);
}
#rain { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }

.hero-inner {
  position: relative; z-index: 4;
  width: min(1200px, 92%); margin: 0 auto;
  display: flex; flex-direction: column;
  padding: 4.4rem 0 19vh;
}

/* ---- neon sign ---- */
/* --glow defaults to lit so the sign reads without JS; the script drives it from 0 through inrush */
.neon-wrap { margin: .6rem auto 0; width: min(520px, 82%); text-align: center; --glow: 1; }
#neon-sign { width: 100%; height: auto; overflow: visible; display: block; }
#neon-sign text {
  font-family: var(--display);
  font-weight: 800;
  font-size: 92px;
  letter-spacing: .14em;
}
.neon-tube { fill: none; stroke: #3d2320; stroke-width: 1.6px; }
.neon-lit {
  fill: #ffd9d2;
  stroke: var(--verm-hot); stroke-width: 1px;
  opacity: var(--glow);
  filter: drop-shadow(0 0 5px var(--verm-hot)) drop-shadow(0 0 16px var(--verm)) drop-shadow(0 0 46px var(--verm));
}
.neon-lit .fault { opacity: var(--fault, 1); }
.neon-sub {
  margin-top: .5rem;
  font-family: var(--type); font-size: .78rem; letter-spacing: .5em;
  color: var(--fog);
}

/* ---- hero copy ---- */
.hero-copy { margin-top: 2.2rem; max-width: 660px; }
.eyebrow {
  font-family: var(--type); font-size: .74rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--verm-hot);
  margin-bottom: 1.1rem;
}
h1 {
  font-family: var(--display);
  font-size: clamp(3rem, 6.6vw, 5.2rem);
  font-weight: 800; line-height: .96; letter-spacing: .005em;
  color: var(--lamp);
  text-wrap: balance;
}
.h1-em { font-style: italic; font-weight: 500; }
.dek {
  margin-top: 1.4rem;
  font-size: clamp(1.15rem, 1.6vw, 1.3rem);
  line-height: 1.55; color: #b9b7ae;
  max-width: 56ch;
}
.cta-row { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 1.9rem; }
.cta-center { justify-content: center; margin-top: 2.6rem; }
.btn {
  display: inline-block; padding: .78rem 1.7rem;
  font-family: var(--type); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; border: 1px solid transparent;
  transition: transform .25s var(--ease-slow), box-shadow .25s var(--ease-slow), background-color .25s, color .2s;
}
.btn-solid { background: var(--verm); color: #f6ded9; }
.btn-solid:hover { background: #c62c27; color: #fff; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(179,35,31,.35); }
.btn-ghost { border-color: #3a3b41; color: var(--lamp); }
.btn-ghost:hover { border-color: var(--fog); color: #fff; transform: translateY(-2px); }
.hero-fine { margin-top: 1.6rem; font-family: var(--type); font-size: .72rem; letter-spacing: .08em; color: var(--fog); }

.hero-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 90px; z-index: 5;
  background: linear-gradient(180deg, transparent, var(--asphalt));
  pointer-events: none;
}

/* ============================================================
   SECTIONS — shared
   ============================================================ */
.section { position: relative; padding: 7.5rem 0 6.5rem; overflow: hidden; }
.wrap { width: min(1100px, 90%); margin: 0 auto; position: relative; z-index: 2; }
.wrap-narrow { width: min(780px, 90%); }

h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.4vw, 3.3rem);
  font-weight: 700; line-height: 1.06; letter-spacing: .003em;
  color: var(--lamp); margin-bottom: 1.6rem;
  text-wrap: balance;
}
.section-dek { color: #a5a39a; max-width: 60ch; }
.type-hint { display: block; margin-top: .5rem; font-family: var(--type); font-size: .78rem; color: var(--fog); letter-spacing: .06em; }

/* reveal on scroll — transform only, content is never hidden */
.reveal { transform: translateY(30px); transition: transform .9s var(--ease-slow); }
.reveal.in { transform: none; }

/* ---- venetian blind light ---- */
.blinds { background: linear-gradient(180deg, var(--asphalt), #131317 55%, var(--asphalt)); }
.blind-light {
  position: absolute; inset: -160px 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(176deg,
    rgba(216,214,206,0) 0 38px,
    rgba(216,214,206,.05) 38px 58px);
  -webkit-mask-image: linear-gradient(100deg, transparent 4%, #000 38%, #000 62%, transparent 96%);
          mask-image: linear-gradient(100deg, transparent 4%, #000 38%, #000 62%, transparent 96%);
  will-change: transform;
}

/* ============================================================
   THE CASE
   ============================================================ */
.story-cols { max-width: 65ch; display: grid; gap: 1.15rem; }
.story-pull {
  font-family: var(--display); font-style: italic; font-weight: 500;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.3;
  color: var(--lamp);
  border-left: 2px solid var(--verm);
  padding-left: 1.3rem; margin-top: .8rem;
}
.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: #2a2b31; border: 1px solid #2a2b31;
  margin-top: 3.4rem;
}
.facts > div { background: var(--smoke); padding: 1.4rem 1.5rem 1.2rem; }
.facts dt {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem); color: var(--verm-hot);
  line-height: 1;
}
.facts dd { margin-top: .45rem; font-family: var(--type); font-size: .74rem; letter-spacing: .05em; color: var(--fog); text-transform: uppercase; }

/* ============================================================
   EVIDENCE BOARD
   ============================================================ */
#case-file { padding-bottom: 5rem; }
.board {
  position: relative;
  width: min(1220px, 94%); margin: 3rem auto 0;
  height: 680px;
  background:
    radial-gradient(100% 90% at 50% 0%, rgba(216,214,206,.045), transparent 60%),
    linear-gradient(180deg, #191a1f, #141519);
  border: 1px solid #26272d;
  box-shadow: inset 0 0 90px rgba(0,0,0,.65), 0 30px 80px rgba(0,0,0,.5);
}
.strings { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.strings path { fill: none; stroke: var(--verm); stroke-width: 1.4; opacity: .55; }

/* the lamp — a pool of light that follows the cursor across the board */
.lamp {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0; transition: opacity .5s var(--ease-slow);
  background: radial-gradient(340px 260px at var(--lx, 50%) var(--ly, 40%),
    rgba(216,214,206,.11), rgba(216,214,206,.04) 45%, transparent 70%);
}
.board:hover .lamp { opacity: 1; }

.pin-item {
  position: absolute; left: var(--x); top: var(--y); width: var(--w);
  z-index: 2; will-change: transform;
}
.pin-inner {
  position: relative; transform: rotate(var(--r));
  box-shadow: 0 14px 34px rgba(0,0,0,.6);
  transition: transform .35s var(--ease-slow);
}
.pin-item:hover .pin-inner { transform: rotate(var(--r)) scale(1.025); }
.pin {
  position: absolute; top: -7px; left: 50%; transform: translateX(-50%);
  width: 13px; height: 13px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #d5453f, var(--verm) 55%, #6e1512);
  box-shadow: 0 3px 5px rgba(0,0,0,.7);
  z-index: 4;
}

/* photos */
.photo { background: #e6e4dc; padding: 10px 10px 12px; }
.photo img { display: block; width: 100%; height: auto; filter: grayscale(1) contrast(1.06); }
.photo figcaption, .matchbook figcaption, .ticket figcaption, .memo figcaption {
  font-family: var(--type); font-size: .68rem; letter-spacing: .03em;
  color: #3b3c40; padding-top: 8px; line-height: 1.45;
}

/* typed memos */
.memo {
  background: var(--paper); color: var(--ink);
  padding: 18px 18px 14px;
  font-family: var(--type); font-size: .78rem; line-height: 1.6;
}
.memo .memo-head { border-bottom: 1px solid #9a968a; padding-bottom: 8px; margin-bottom: 10px; letter-spacing: .06em; }
.memo.note { background: #ccc8ba; font-size: .84rem; }
.memo.note u { text-decoration-color: var(--verm); text-decoration-thickness: 2px; }
.memo figcaption { border-top: 1px dashed #9a968a; margin-top: 10px; color: #55564f; }

/* matchbook */
.matchbook { background: transparent; box-shadow: none; }
.match-cover {
  background: linear-gradient(160deg, #c1322c, var(--verm) 60%, #8f1c18);
  color: #f2ddd8; text-align: center;
  padding: 22px 12px 10px;
  box-shadow: 0 12px 26px rgba(0,0,0,.6);
}
.match-club { font-family: var(--display); font-weight: 800; font-size: 1.28rem; line-height: 1.12; letter-spacing: .06em; }
.match-strike { margin-top: 16px; border-top: 1px solid rgba(242,221,216,.5); padding-top: 7px; font-family: var(--type); font-size: .5rem; letter-spacing: .1em; }
.matchbook figcaption { background: transparent; color: #a3a5a8; }

/* ticket */
.ticket {
  background: #d9d5c7; color: var(--ink);
  padding: 14px 16px;
  border-left: 4px solid var(--verm);
}
.ticket-line { font-family: var(--type); font-size: .6rem; letter-spacing: .08em; color: #4a4b45; }
.ticket-big { font-family: var(--type); font-size: 1.05rem; margin: 5px 0; color: var(--ink); }
.ticket figcaption { color: #55564f; }

.board-foot {
  margin-top: 1.4rem; text-align: right;
  font-family: var(--type); font-size: .72rem; letter-spacing: .06em; color: var(--fog);
}

/* ============================================================
   INTERROGATION
   ============================================================ */
.sheet {
  margin-top: 2.4rem;
  background: var(--paper); color: var(--ink);
  padding: clamp(1.6rem, 4vw, 3rem);
  box-shadow: 0 26px 70px rgba(0,0,0,.55);
  font-family: var(--type);
  background-image: linear-gradient(180deg, rgba(0,0,0,.045) 0, transparent 90px);
}
.sheet { position: relative; overflow: hidden; }
.sheet::after {
  content: "CONFIDENTIAL";
  position: absolute; top: 34%; left: 50%;
  transform: translate(-50%, -50%) rotate(-16deg);
  font-family: var(--type); font-size: clamp(2.6rem, 7vw, 4.6rem); letter-spacing: .22em;
  color: rgba(179,35,31,.07); pointer-events: none; white-space: nowrap;
}
.sheet-slug { font-size: .8rem; letter-spacing: .1em; border-bottom: 1px solid #a8a496; padding-bottom: .9rem; margin-bottom: 1.4rem; }
.sheet-body { font-size: .95rem; line-height: 1.75; max-width: 58ch; }
.sheet-body em { font-style: normal; background: rgba(179,35,31,.08); }
.choices { display: grid; gap: .7rem; margin: 1.8rem 0 0; }
.choice {
  font-family: var(--type); font-size: .88rem; text-align: left;
  padding: .85rem 1.1rem; cursor: pointer;
  background: transparent; color: var(--ink);
  border: 1px solid #8f8b7d;
  transition: background-color .2s, border-color .2s, transform .2s var(--ease-slow);
}
.choice::before { content: "▸ "; color: var(--verm); }
.choice:hover:not(:disabled) { background: rgba(23,24,27,.06); border-color: var(--ink); transform: translateX(4px); }
.choice:disabled { opacity: .38; cursor: default; }
.choice.chosen { opacity: 1; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.reply-zone { min-height: 5.2rem; margin-top: 1.5rem; }
.reply { font-size: .95rem; line-height: 1.8; max-width: 58ch; color: #26130f; }
.reply .caret { display: inline-block; width: .55em; height: 1em; background: var(--verm); vertical-align: -0.12em; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.sheet-foot {
  display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; align-items: baseline;
  margin-top: 1.6rem; padding-top: 1rem; border-top: 1px dashed #a8a496;
  font-size: .72rem; letter-spacing: .04em; color: #55564f;
}
.ask-again {
  font-family: var(--type); font-size: .74rem; letter-spacing: .08em;
  background: none; border: none; cursor: pointer;
  color: var(--verm); text-decoration: underline; text-underline-offset: 3px;
}
.ask-again:hover { color: #8f1c18; }
.noscript-note { margin-top: 1.2rem; font-family: var(--type); font-size: .8rem; color: var(--fog); }

/* ============================================================
   CAST
   ============================================================ */
.cast-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; }
.dossier {
  background: var(--smoke); border: 1px solid #26272d;
  padding: 1.1rem 1.1rem 1.5rem;
  transition: transform .35s var(--ease-slow), box-shadow .35s var(--ease-slow);
}
.dossier:hover { transform: translateY(-6px); box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.mug { position: relative; overflow: hidden; background: #0c0c0e; }
.mug img {
  display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover;
  filter: grayscale(1) contrast(1.08) brightness(.94);
  transition: filter .4s var(--ease-slow), transform .6s var(--ease-slow);
}
.dossier:hover .mug img { filter: grayscale(1) contrast(1.1) brightness(1.02); transform: scale(1.02); }
.stamp {
  position: absolute; top: 18px; right: 12px; z-index: 2;
  transform: rotate(9deg);
  font-family: var(--type); font-size: 1.1rem; letter-spacing: .26em; text-indent: .26em;
  color: var(--verm-hot); border: 3px double var(--verm-hot);
  padding: .18rem .65rem; opacity: .92;
  text-shadow: 0 0 14px rgba(179,35,31,.5);
  background: rgba(17,17,19,.35);
}
.dossier h3 {
  font-family: var(--display); font-weight: 700; font-size: 1.55rem;
  margin-top: 1.1rem; color: var(--lamp); line-height: 1.1;
}
.dossier-role { font-family: var(--type); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--verm-hot); margin-top: .3rem; }
.dossier-facts { margin-top: 1rem; border-top: 1px solid #2c2d33; }
.dossier-facts > div { display: grid; grid-template-columns: 92px 1fr; gap: .8rem; padding: .5rem 0; border-bottom: 1px solid #2c2d33; }
.dossier-facts dt { font-family: var(--type); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--fog); padding-top: .22em; }
.dossier-facts dd { font-size: .98rem; line-height: 1.45; color: #bdbbb2; }

/* ============================================================
   HOW IT PLAYS
   ============================================================ */
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6rem 3.4rem; margin-top: 2.8rem; max-width: 980px; }
.how-item h3 {
  font-family: var(--display); font-weight: 700; font-size: 1.5rem;
  color: var(--lamp); margin-bottom: .5rem;
}
.how-item p { color: #a5a39a; font-size: 1.08rem; max-width: 46ch; }
.spec-strip {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 0;
  margin-top: 3.6rem; border-block: 1px solid #2a2b31; padding: 1rem 0;
  font-family: var(--type); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--fog);
}
.spec-strip span { padding: 0 1.4rem; }
.spec-strip span + span { border-left: 1px solid #2a2b31; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: #0d0d0f; border-top: 1px solid #222329; padding: 4.5rem 0 2.6rem; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 3rem; }
.foot-name { font-family: var(--display); font-weight: 800; font-size: 1.7rem; color: var(--lamp); }
.foot-blurb { margin-top: .7rem; color: #a5a39a; max-width: 44ch; }
.foot-label { font-family: var(--type); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--fog); margin-top: 1.1rem; }
.foot-label:first-child { margin-top: 0; }
.foot-links { margin-top: .35rem; color: #bdbbb2; }
.fine-print {
  margin-top: 3.2rem; padding-top: 1.4rem; border-top: 1px solid #1d1e23;
  font-size: .82rem; line-height: 1.65; color: #5b5e64; max-width: 90ch;
}
.credit { margin-top: 1.3rem; font-family: var(--type); font-size: .68rem; letter-spacing: .06em; color: #4c4f55; }
.credit a { color: #6e7178; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .board { height: 640px; }
  .cast-grid { gap: 1.2rem; }
}

@media (max-width: 860px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .cast-grid { grid-template-columns: 1fr; max-width: 460px; }
  .how-grid { grid-template-columns: 1fr; gap: 2rem; }
  .foot-grid { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 720px) {
  .masthead { padding: 1rem 1.2rem; }
  .mast-right { display: none; }
  .hero-inner { padding-bottom: 16vh; }
  .section { padding: 5rem 0 4.5rem; }

  /* board collapses to a hand-laid stack */
  .board {
    height: auto; padding: 2rem 1.4rem 2.4rem;
    display: grid; gap: 2.2rem; justify-items: center;
  }
  .strings { display: none; }
  .pin-item { position: static; width: min(var(--w) * 1.15, 100%); }
  .pin-item[data-depth] { transform: none !important; }
}

@media (max-width: 480px) {
  body { font-size: 1.08rem; }
  .hero-copy { margin-top: 2.4rem; }
  .cta-row .btn { width: 100%; text-align: center; }
  .spec-strip span { padding: 0 .9rem; }
  .facts > div { padding: 1.1rem 1.1rem 1rem; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .blind-light { transform: none !important; }
  .pin-inner, .dossier, .mug img, .btn, .choice { transition: none; }
  .reply .caret { animation: none; }
}
