/* ── The Matt Show · shared conspiracy-corkboard theme ─────────────────── */

@font-face {
  font-family: 'Special Elite';
  src: url('fonts/special-elite.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Permanent Marker';
  src: url('fonts/permanent-marker.woff2') format('woff2');
  font-display: swap;
}

:root {
  --room: #14100b;
  --cork: #9c7a52;
  --cork-dark: #7a5c3c;
  --paper: #f4ecd8;
  --paper-dim: #e6dcc2;
  --ink: #2b2118;
  --ink-soft: #5a4a38;
  --red: #c1121f;
  --red-bright: #e63946;
  --stamp-blue: #1d3a6e;
  --manila: #d9b382;
  --gold: #d4a017;
  --green-ok: #2f7d32;
  --type: 'Special Elite', 'American Typewriter', 'Courier New', monospace;
  --marker: 'Permanent Marker', 'Comic Sans MS', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--type);
  background: var(--room);
  color: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font-family: inherit; cursor: pointer; }
input, select { font-family: inherit; }

/* Corkboard surface: layered gradients + SVG grain, no image files needed */
.corkboard {
  background-color: var(--cork);
  background-image:
    radial-gradient(ellipse at 18% 25%, rgba(255,235,200,.10), transparent 55%),
    radial-gradient(ellipse at 80% 70%, rgba(0,0,0,.18), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.16'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 140px rgba(0,0,0,.55);
  border: 14px solid #4a3421;
  border-radius: 6px;
}

/* Dim vignette for the whole room */
.room-vignette::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(0,0,0,.5));
  z-index: 5;
}

/* ── Paper & polaroids ──────────────────────────────────────────────────── */
.paper {
  background:
    linear-gradient(180deg, rgba(0,0,0,.03), transparent 12%),
    var(--paper);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
  border-radius: 2px;
}

.polaroid {
  background: #fdfaf1;
  color: var(--ink);
  padding: .5em .5em 0 .5em;
  box-shadow: 0 8px 16px rgba(0,0,0,.5);
  border-radius: 2px;
  position: relative;
  text-align: center;
}
.polaroid .photo {
  background: radial-gradient(circle at 50% 42%, #cfc4a8, #a99a78);
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.15);
}
.polaroid .caption {
  font-family: var(--marker);
  padding: .3em .1em .45em;
  font-size: .95em;
  line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.polaroid .pin {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff6b6b, var(--red) 60%, #7d0a12);
  box-shadow: 0 3px 4px rgba(0,0,0,.5);
  z-index: 2;
}
.polaroid.offline { filter: grayscale(.9) brightness(.75); }

/* Slight scatter so pinned things feel hand-placed */
.scatter > :nth-child(4n+1) { transform: rotate(-2.2deg); }
.scatter > :nth-child(4n+2) { transform: rotate(1.6deg); }
.scatter > :nth-child(4n+3) { transform: rotate(-1deg); }
.scatter > :nth-child(4n)   { transform: rotate(2.4deg); }

/* ── Rubber stamps ──────────────────────────────────────────────────────── */
.stamp {
  display: inline-block;
  font-family: var(--type);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--red);
  border: 3px double var(--red);
  border-radius: 4px;
  padding: .1em .45em;
  transform: rotate(-6deg);
  opacity: .9;
  mix-blend-mode: multiply;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.12' numOctaves='2'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -0.15'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' fill='white' filter='url(%23r)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='r'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.12' numOctaves='2'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 -0.15'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' fill='white' filter='url(%23r)'/%3E%3C/svg%3E");
}
.stamp.blue { color: var(--stamp-blue); border-color: var(--stamp-blue); }
.stamp.on-dark { mix-blend-mode: normal; }

@keyframes stamp-slam {
  0%   { transform: rotate(-6deg) scale(2.4); opacity: 0; }
  60%  { transform: rotate(-6deg) scale(.94); opacity: 1; }
  100% { transform: rotate(-6deg) scale(1);   opacity: .9; }
}
.stamp.slam { animation: stamp-slam .35s cubic-bezier(.2,1.4,.4,1) both; }

/* ── Redaction / classified header bits ─────────────────────────────────── */
.redacted {
  background: var(--ink);
  color: transparent;
  border-radius: 1px;
  user-select: none;
}
.case-heading {
  font-family: var(--type);
  text-transform: uppercase;
  letter-spacing: .2em;
}

/* ── Belief bars (evidence meters) ──────────────────────────────────────── */
.meter {
  position: relative;
  background:
    linear-gradient(180deg, rgba(0,0,0,.14), transparent 30%, rgba(0,0,0,.1)),
    var(--manila);
  border: 1px solid rgba(43,33,24,.5);
  border-radius: 3px;
  overflow: hidden;
  height: 18px;
}
.meter .fill {
  position: absolute; inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(180deg, var(--red-bright), var(--red));
  transition: width .55s cubic-bezier(.3,.9,.35,1), background-color .3s;
}
.meter .fill.no-baseline { background: repeating-linear-gradient(45deg, #8a8a8a, #8a8a8a 6px, #6f6f6f 6px, #6f6f6f 12px); }
.meter .tick {
  position: absolute; top: -3px; bottom: -3px; width: 2px;
  background: var(--stamp-blue);
  opacity: .9;
  transition: left .55s cubic-bezier(.3,.9,.35,1);
}

.delta { font-weight: bold; white-space: nowrap; }
.delta.up   { color: #57d95c; }
.delta.down { color: #ff7b7b; }
.delta.flat { color: rgba(244,236,216,.55); }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  font-family: var(--type);
  text-transform: uppercase;
  letter-spacing: .12em;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 3px;
  box-shadow: 3px 3px 0 rgba(0,0,0,.55);
  padding: .55em 1.1em;
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 rgba(0,0,0,.55); }
.btn.red { background: var(--red); border-color: #7d0a12; color: #fff; }
.btn.blue { background: var(--stamp-blue); border-color: #101f3c; color: #fff; }
.btn.big { font-size: 1.25em; padding: .8em 1.4em; }
.btn:disabled { opacity: .45; cursor: default; }

/* ── Utility ────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.flicker { animation: flicker 7s infinite; }
@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: .75; }
  94% { opacity: 1; }
  96.5% { opacity: .85; }
  97% { opacity: 1; }
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.pulse { animation: pulse 1.1s ease-in-out infinite; }
