/* ══════════════════════════════════════════════════════════════
   RAT MOB — ratmob.xyz
   soot black · alley brick · mustard · aged paper
   ══════════════════════════════════════════════════════════════ */

:root {
  --soot: #14100e;
  --soot-2: #1b1512;
  --soot-3: #241d19;
  --brick: #6b1e1e;
  --brick-hi: #8a2a2a;
  --mustard: #d4a017;
  --mustard-dim: #a87c11;
  --cream: #ebe0c4;
  --cream-dim: #c9bd9f;
  --ink: #1a1512;
  --crt: #8ef0a8;

  --serif: "Playfair Display", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  --strip-h: 38px;
  --edge: clamp(1.1rem, 4vw, 4.5rem);
  --panel-shadow: 0 2px 0 rgba(0, 0, 0, .5), 0 18px 40px -12px rgba(0, 0, 0, .85);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--soot);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  padding-top: var(--strip-h);
}

img, svg { display: block; max-width: 100%; }

.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;
}

a { color: var(--mustard); }
::selection { background: var(--brick); color: var(--cream); }

/* ─────────────────────────────────────────── grain, vignette */
.grain-defs { position: absolute; }

.grain {
  position: fixed; inset: 0; z-index: 900; pointer-events: none;
  opacity: .07; mix-blend-mode: overlay;
}
.grain svg { width: 100%; height: 100%; }

.vignette {
  position: fixed; inset: 0; z-index: 899; pointer-events: none;
  background:
    radial-gradient(ellipse 120% 90% at 50% 40%, transparent 40%, rgba(0, 0, 0, .55) 100%),
    linear-gradient(to bottom, rgba(0, 0, 0, .45), transparent 22%);
}

/* ─────────────────────────────────────────── 1. ticker strip */
#ticker-strip {
  position: fixed; top: 0; left: 0; right: 0; z-index: 950;
  height: var(--strip-h);
  display: flex; align-items: center; gap: .55rem;
  padding: 0 clamp(.6rem, 2.5vw, 1.6rem);
  background: var(--brick);
  border-bottom: 1px solid #40100f;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .6);
  font-family: var(--mono);
  font-size: clamp(9.5px, 2.1vw, 12px);
  letter-spacing: .06em;
  color: #f6ecd6;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
#ticker-strip::-webkit-scrollbar { display: none; }

#ticker-strip .dot {
  width: 8px; height: 8px; flex: none; border-radius: 50%;
  background: var(--mustard);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, .22);
  animation: pulse 1.9s steps(2, end) infinite;
}
@keyframes pulse { 50% { opacity: .25; box-shadow: 0 0 0 6px rgba(212, 160, 23, 0); } }

#ticker-strip .ticker { font-weight: 700; letter-spacing: .12em; }
#ticker-strip .ca-label { opacity: .65; }
#ticker-strip .ca {
  overflow: hidden; text-overflow: ellipsis; max-width: 42vw;
  border-bottom: 1px dotted rgba(246, 236, 214, .4);
}

#ticker-strip button,
#ticker-strip a {
  font: inherit; letter-spacing: .1em; text-decoration: none;
  color: #f6ecd6; background: transparent;
  border: 1px solid rgba(246, 236, 214, .55);
  padding: 3px 8px; cursor: pointer; flex: none;
  transition: background .15s, color .15s, transform .1s;
}
#ticker-strip button:hover,
#ticker-strip a:hover { background: var(--mustard); color: #2a1206; border-color: var(--mustard); }
#ticker-strip button:active { transform: translateY(1px); }
#ticker-strip button.copied { background: var(--cream); color: var(--brick); border-color: var(--cream); }
#ticker-strip a { margin-left: auto; font-weight: 700; }

:focus-visible { outline: 2px solid var(--mustard); outline-offset: 2px; }

/* ─────────────────────────────────────────── 2. hero */
.hero {
  position: relative;
  min-height: calc(100svh - var(--strip-h));
  display: flex; align-items: center; justify-content: center;
  padding: clamp(1.6rem, 4vh, 3rem) var(--edge) clamp(3.4rem, 8vh, 4.6rem);
  overflow: hidden;
  border-bottom: 1px solid #2a211c;
  background:
    radial-gradient(ellipse 62% 48% at 50% 66%, rgba(107, 30, 30, .2), transparent 72%),
    linear-gradient(#100d0b, #16110f 60%, #0d0a09);
}

.skyline {
  position: absolute; left: 0; right: 0; bottom: 0; height: min(46vh, 400px);
  z-index: 0; opacity: 1;
  mask-image: linear-gradient(to top, #000 74%, transparent);
  -webkit-mask-image: linear-gradient(to top, #000 74%, transparent);
}
.skyline svg { width: 100%; height: 100%; }

.smoke {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: .05; mix-blend-mode: screen;
}
.smoke svg { width: 100%; height: 100%; }

.hero-inner { position: relative; z-index: 2; text-align: center; width: min(1080px, 100%); }

.credit {
  font-family: var(--mono);
  font-size: clamp(8.5px, 1.6vw, 11px);
  letter-spacing: .34em; text-transform: uppercase;
  color: var(--mustard-dim);
  margin: 0 0 clamp(.8rem, 2.2vh, 1.4rem);
}

.title {
  font-family: var(--serif);
  font-weight: 900;
  font-size: clamp(3.4rem, 13vw, 8.4rem);
  line-height: .82;
  letter-spacing: .01em;
  margin: 0;
  color: var(--cream);
  text-transform: uppercase;
  text-shadow:
    0 1px 0 #6b1e1e,
    0 3px 0 rgba(0, 0, 0, .6),
    0 22px 48px rgba(0, 0, 0, .8);
}
.title span { display: block; }
.title span:last-child { color: var(--mustard); letter-spacing: .06em; }

.tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.05rem, 3.4vw, 2rem);
  color: var(--cream-dim);
  margin: clamp(.7rem, 2vh, 1.2rem) 0 0;
}
.tagline::before, .tagline::after { content: ""; }

.rat-stage {
  position: relative;
  width: min(216px, 52vw);
  margin: clamp(1rem, 2.6vh, 1.6rem) auto clamp(.4rem, 1.4vh, .8rem);
}
.rat-stage .spot {
  position: absolute; inset: -18% -22% -26%;
  background: radial-gradient(ellipse at 50% 45%, rgba(212, 160, 23, .16), transparent 62%);
  filter: blur(2px);
}
.rat-art {
  position: relative;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, .75));
  animation: sniff 5.5s ease-in-out infinite;
}
@keyframes sniff {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  35% { transform: translateY(-5px) rotate(-.6deg); }
  70% { transform: translateY(-2px) rotate(.5deg); }
}
.plaque {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .2em;
  text-transform: uppercase; color: #6e5f4d; margin: .7rem 0 0;
  white-space: nowrap; position: relative; left: 50%;
  transform: translateX(-50%); display: inline-block;
}

.sub {
  font-family: var(--sans); font-size: clamp(.85rem, 2.2vw, 1.05rem);
  letter-spacing: .16em; text-transform: uppercase; color: var(--cream-dim);
  margin: clamp(.6rem, 1.6vh, 1rem) 0 0;
}

.hero-cta {
  display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center;
  margin-top: clamp(1.1rem, 2.6vh, 1.6rem);
}

.btn {
  display: inline-block;
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  letter-spacing: .16em; text-decoration: none; text-transform: uppercase;
  padding: .85rem 1.5rem; border: 1px solid;
  transition: transform .12s, background .18s, color .18s, box-shadow .18s;
}
.btn-gold {
  background: var(--mustard); border-color: var(--mustard); color: #2a1206;
  box-shadow: 0 4px 0 #8a6a10, 0 14px 28px -10px rgba(212, 160, 23, .5);
}
.btn-gold:hover { background: #e8b52a; transform: translateY(-2px); }
.btn-gold:active { transform: translateY(2px); box-shadow: 0 1px 0 #8a6a10; }
.btn-ghost { background: transparent; border-color: #5b4a3c; color: var(--cream-dim); }
.btn-ghost:hover { border-color: var(--cream); color: var(--cream); background: rgba(235, 224, 196, .06); }

.scroll-hint {
  font-family: var(--mono); font-size: 10px; letter-spacing: .24em;
  text-transform: uppercase; color: #6e5f4d;
  position: absolute; left: 0; right: 0; bottom: clamp(.8rem, 2.2vh, 1.6rem); z-index: 3; text-align: center;
  margin: 0;
  animation: bob 2.6s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(5px); opacity: .55; } }

/* ─────────────────────────────────────────── section shell */
.section {
  position: relative;
  padding: clamp(3.5rem, 11vh, 8rem) var(--edge);
  border-bottom: 1px solid #241d19;
}
.section-alt { background: linear-gradient(#171310, #120f0d); }

.wrap { width: min(1180px, 100%); margin: 0 auto; }
.wrap.narrow { width: min(760px, 100%); }

.eyebrow {
  font-family: var(--mono); font-size: 10px; letter-spacing: .34em;
  text-transform: uppercase; color: var(--brick-hi); margin: 0 0 .7rem;
}
.eyebrow.dark { color: #96341f; }

.sect-title {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(2rem, 6.4vw, 4.2rem);
  line-height: 1; letter-spacing: .01em; text-transform: uppercase;
  margin: 0 0 1rem; color: var(--cream);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .55);
}
.sect-title.dark { color: var(--ink); text-shadow: none; }

.lede {
  font-family: var(--serif); font-size: clamp(1rem, 2.3vw, 1.24rem);
  line-height: 1.6; color: var(--cream-dim);
  max-width: 62ch; margin: 0 0 clamp(2rem, 5vh, 3rem);
}

/* ─────────────────────────────────────────── 3. families */
.fam-grid {
  display: grid; gap: clamp(.9rem, 2vw, 1.4rem);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.fam {
  position: relative;
  background:
    linear-gradient(rgba(20, 16, 14, .04), rgba(20, 16, 14, .1)),
    var(--cream);
  color: var(--ink);
  padding: 1.15rem 1.15rem 1.25rem;
  border: 1px solid #b3a483;
  box-shadow: var(--panel-shadow);
  display: flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease;
}
.fam::after {
  content: ""; position: absolute; inset: 4px; pointer-events: none;
  border: 1px solid rgba(26, 21, 18, .16);
}
.fam:hover { transform: translateY(-5px); box-shadow: 0 2px 0 #000, 0 26px 46px -14px rgba(0, 0, 0, .95); }

.fam-top { display: flex; align-items: center; gap: .85rem; }
.mug-frame {
  flex: none; width: 68px; padding: 5px;
  background: var(--soot); border: 1px solid #3a302a;
  box-shadow: inset 0 0 0 1px rgba(235, 224, 196, .08);
}
.mug { width: 100%; height: auto; }

.fam-num {
  font-family: var(--mono); font-size: 9px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--brick);
}
.fam-id h3 {
  font-family: var(--serif); font-weight: 900; text-transform: uppercase;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem); line-height: 1.05;
  margin: .18rem 0 0; letter-spacing: .01em;
}

.fam-facts {
  margin: 1rem 0 .9rem; padding: .85rem 0 0;
  border-top: 1px solid rgba(26, 21, 18, .2);
  display: grid; gap: .6rem;
}
.fam-facts dt {
  font-family: var(--mono); font-size: 9px; letter-spacing: .2em;
  text-transform: uppercase; color: #7b6b52;
}
.fam-facts dd { margin: .1rem 0 0; font-size: .875rem; line-height: 1.45; }
.fam-facts dd { color: #241d19; }

.fam-note {
  margin: auto 0 0; padding-top: .8rem;
  border-top: 1px dashed rgba(26, 21, 18, .25);
  font-family: var(--serif); font-style: italic; font-size: .95rem;
  color: #4b3f31;
}

/* ─────────────────────────────────────────── 4. made men */
.table-frame {
  border: 1px solid #3a302a;
  background: linear-gradient(#191411, #14100e);
  box-shadow: var(--panel-shadow);
  overflow-x: auto;
}
.ledger { width: 100%; border-collapse: collapse; min-width: 640px; }

.ledger thead th {
  font-family: var(--mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase;
  text-align: left; color: #9d8a6b;
  padding: .9rem 1rem; background: #1f1814;
  border-bottom: 1px solid #3a302a; white-space: nowrap;
}
.ledger td {
  padding: .85rem 1rem; border-bottom: 1px solid #241d19;
  font-size: .92rem; vertical-align: middle;
}
.ledger tbody tr:hover { background: rgba(107, 30, 30, .16); }
.ledger tbody tr:last-child td { border-bottom: 0; }

.ledger .rk { font-family: var(--mono); color: #7b6b52; width: 1%; }
.ledger .nm { font-family: var(--serif); font-weight: 700; font-size: 1.04rem; color: var(--cream); }
.ledger .wl code { font-family: var(--mono); font-size: .8rem; color: #9d8a6b; }
.ledger .fm { font-size: .8rem; letter-spacing: .04em; color: var(--cream-dim); text-transform: uppercase; }

.ledger .rank-one { background: rgba(212, 160, 23, .07); }
.ledger .rank-one .rk, .ledger .rank-one .nm { color: var(--mustard); }
.capo {
  display: inline-block; margin-left: .5rem;
  font-family: var(--mono); font-size: 8.5px; letter-spacing: .18em;
  padding: 2px 6px; color: #2a1206; background: var(--mustard);
  vertical-align: 2px;
}

.rp { white-space: nowrap; }
.repbar {
  display: inline-block; vertical-align: middle;
  width: clamp(60px, 12vw, 130px); height: 7px;
  background: #2a211c; border: 1px solid #3a302a; margin-right: .6rem;
}
.repbar i {
  display: block; height: 100%; width: var(--w);
  background: repeating-linear-gradient(90deg, var(--brick) 0 5px, var(--brick-hi) 5px 7px);
}
.rank-one .repbar i {
  background: repeating-linear-gradient(90deg, var(--mustard) 0 5px, #e8b52a 5px 7px);
}
.repnum { font-family: var(--mono); font-size: .78rem; color: var(--cream-dim); }

.fineprint {
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  color: #6e5f4d; margin: 1rem 0 0;
}

/* ─────────────────────────────────────────── 5. wiretap */
.crt {
  position: relative;
  background: #060806;
  border: 1px solid #2c3a2c;
  box-shadow: var(--panel-shadow), inset 0 0 90px rgba(0, 255, 100, .05);
  overflow: hidden;
}
.crt-bar {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .9rem; background: #0c110c;
  border-bottom: 1px solid #223022;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .14em;
  color: #5f8a68; text-transform: uppercase;
}
.crt-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #d43b17; flex: none;
  animation: pulse 1.4s steps(2, end) infinite;
}
.crt-clock { margin-left: auto; color: #3f6a49; }

.crt-body {
  margin: 0; padding: 1.1rem .9rem 1.4rem;
  font-family: var(--mono);
  font-size: clamp(10.5px, 1.65vw, 13px);
  line-height: 1.95; color: var(--crt);
  text-shadow: 0 0 6px rgba(120, 255, 160, .3);
  white-space: pre-wrap; word-break: break-word;
  min-height: 22em;
}
.crt-body .t { color: #3f6a49; }
.crt-body .who { color: #d4f7c0; font-weight: 700; }
.crt-body .note { color: #b58b2a; }
.crt-body .cursor {
  display: inline-block; width: .55em; height: 1em;
  background: var(--crt); vertical-align: -.15em;
  animation: blink 1s steps(2, end) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.crt-foot {
  padding: .55rem .9rem; border-top: 1px solid #223022; background: #0c110c;
  font-family: var(--mono); font-size: 9px; letter-spacing: .18em;
  color: #3f6a49; text-transform: uppercase;
}
.scanlines {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .32) 0 1px, transparent 1px 3px);
  opacity: .55;
}

/* ─────────────────────────────────────────── 6. the code */
.section-paper {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(107, 30, 30, .1), transparent 70%),
    linear-gradient(#efe5cb, #ded2b3);
  color: var(--ink);
  text-align: center;
  border-bottom: 1px solid #b3a483;
}
.oath-intro {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(1rem, 2.4vw, 1.25rem); line-height: 1.65;
  color: #4b3f31; margin: 0 auto clamp(1.6rem, 4vh, 2.4rem); max-width: 54ch;
}
.oath {
  list-style: none; counter-reset: oath; margin: 0 auto; padding: 0;
  max-width: 34ch; text-align: left;
}
.oath li {
  counter-increment: oath;
  font-family: var(--serif); font-style: italic; font-weight: 700;
  font-size: clamp(1.15rem, 3.6vw, 1.9rem);
  line-height: 1.35; padding: .55rem 0 .55rem 2.6rem;
  border-bottom: 1px solid rgba(26, 21, 18, .16);
  position: relative;
}
.oath li:last-child { border-bottom: 0; }
.oath li::before {
  content: counter(oath, upper-roman) ".";
  position: absolute; left: 0; top: .95rem;
  font-family: var(--mono); font-style: normal; font-size: 11px;
  letter-spacing: .1em; color: var(--brick);
}
.oath-sign {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: #7b6b52; margin: clamp(1.6rem, 4vh, 2.4rem) 0 0;
}

/* ─────────────────────────────────────────── 7. how to get made */
.steps {
  display: grid; gap: clamp(1rem, 2.4vw, 1.6rem);
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.step {
  position: relative; padding: 1.6rem 1.3rem 1.4rem;
  background: linear-gradient(#1b1512, #151110);
  border: 1px solid #3a302a; box-shadow: var(--panel-shadow);
}
.step-num {
  display: block; font-family: var(--serif); font-weight: 900;
  font-size: 3.4rem; line-height: .8; color: var(--brick);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .6);
}
.step h3 {
  font-family: var(--serif); font-weight: 800; text-transform: uppercase;
  font-size: 1.3rem; letter-spacing: .02em; margin: .8rem 0 .5rem; color: var(--mustard);
}
.step p { margin: 0; font-size: .95rem; color: var(--cream-dim); }

.made-cta {
  margin-top: clamp(2rem, 5vh, 3rem); text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: .9rem;
}
.ca-inline {
  margin: 0; font-family: var(--mono); font-size: 10.5px;
  letter-spacing: .1em; color: #6e5f4d; word-break: break-all;
}
.ca-inline code { color: var(--cream-dim); }

/* ─────────────────────────────────────────── 8. footer */
.footer {
  padding: clamp(3rem, 8vh, 5rem) var(--edge) clamp(2.4rem, 6vh, 3.4rem);
  background: #0c0a09; text-align: center;
}
.foot-mark { display: flex; justify-content: center; margin-bottom: 1.2rem; opacity: .9; }
.foot-tag {
  font-family: var(--serif); font-style: italic; font-weight: 700;
  font-size: clamp(1.1rem, 3vw, 1.6rem); color: var(--cream); margin: 0 0 1.4rem;
}
.foot-note {
  max-width: 68ch; margin: 0 auto; font-size: .82rem; line-height: 1.7; color: #7b6b52;
}
.selfdestruct {
  font-family: var(--mono); font-size: 11px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--brick-hi);
  margin: 1.8rem 0 0; min-height: 1.4em;
}
.selfdestruct.gone { color: #4a3a30; }
.foot-meta {
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em;
  color: #574a3d; margin: 1.4rem 0 0; word-break: break-all;
}

/* ─────────────────────────────────────────── reveal */
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }

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

/* ─────────────────────────────────────────── responsive */
@media (max-width: 720px) {
  :root { --strip-h: 34px; }
  #ticker-strip a { margin-left: .35rem; }
  #ticker-strip .ca { max-width: 26vw; }
  .title { font-size: clamp(3rem, 21vw, 6rem); }
  .crt-body { min-height: 26em; }
  .step-num { font-size: 2.6rem; }
}

@media (min-width: 1000px) {
  .fam-grid { grid-template-columns: repeat(5, 1fr); }
  .fam-top { flex-direction: column; align-items: flex-start; gap: .7rem; }
  .mug-frame { width: 76px; }
}
