/* =========================================================
   PIPEJIMOTHY — noir detective × comic book
   ========================================================= */

:root {
  --ink: #0a0806;
  --soot: #14100c;
  --parch: #ecdcb8;
  --parch-dim: #c9b78d;
  --brass: #d8a63a;
  --brass-deep: #9a6b18;
  --blood: #b5321f;
  --teal: #2f8c88;
  --panel: #1b1510;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #0a0806;
  color: var(--parch);
  font-family: "Special Elite", ui-monospace, monospace;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* ---------------- fixed photographic background ------------- */
.bg-stack {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
}
.bg-stack .bg-photo {
  position: absolute;
  inset: -4%;
  background: url("../1.png") center 30% / cover no-repeat;
  filter: saturate(.75) contrast(1.05) brightness(.5);
  transform: scale(1.06);
  will-change: transform;
}
.bg-stack .bg-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(216,166,58,.16), transparent 60%),
    radial-gradient(100% 70% at 50% 110%, rgba(47,140,136,.14), transparent 60%),
    linear-gradient(180deg, rgba(10,8,6,.72) 0%, rgba(10,8,6,.88) 45%, rgba(10,8,6,.95) 100%);
}
.bg-stack .bg-vig {
  position: absolute;
  inset: 0;
  background: radial-gradient(115% 90% at 50% 45%, transparent 35%, rgba(0,0,0,.85) 100%);
}

/* halftone comic dots + paper grain, whole page */
.grain-layer {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: .5;
  background-image:
    radial-gradient(rgba(236,220,184,.16) 1px, transparent 1.4px),
    radial-gradient(rgba(0,0,0,.35) 1px, transparent 1.4px);
  background-size: 6px 6px, 6px 6px;
  background-position: 0 0, 3px 3px;
  mix-blend-mode: overlay;
}
.scan-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .22;
  background: repeating-linear-gradient(
    0deg, rgba(0,0,0,.5) 0 1px, transparent 1px 4px);
}

/* ---------------- typography -------------------------------- */
.font-comic { font-family: "Bangers", "Special Elite", cursive; letter-spacing: .045em; }
.font-type  { font-family: "Special Elite", monospace; }

.ink-title {
  font-family: "Bangers", cursive;
  line-height: .92;
  color: var(--parch);
  text-shadow:
    0 1px 0 #000, 0 2px 0 #000, 0 3px 0 #000,
    3px 4px 0 var(--brass-deep),
    6px 8px 0 rgba(0,0,0,.65);
}
.ink-title .hot { color: var(--brass); }

.stamp {
  display: inline-block;
  font-family: "Bangers", cursive;
  letter-spacing: .18em;
  color: var(--blood);
  border: 3px solid var(--blood);
  padding: .18rem .8rem;
  border-radius: 3px;
  transform: rotate(-6deg);
  opacity: .92;
  box-shadow: inset 0 0 0 1px rgba(181,50,31,.5);
  text-transform: uppercase;
}

.eyebrow {
  font-family: "Bangers", cursive;
  letter-spacing: .35em;
  color: var(--brass);
  text-transform: uppercase;
  font-size: .82rem;
}

/* ---------------- comic panel core -------------------------- */
.panel {
  position: relative;
  background:
    linear-gradient(150deg, rgba(38,29,20,.96), rgba(14,11,8,.96));
  border: 3px solid #000;
  border-radius: 4px;
  box-shadow:
    inset 0 0 0 2px rgba(236,220,184,.14),
    9px 11px 0 rgba(0,0,0,.62),
    0 0 44px rgba(0,0,0,.5);
}
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 2px;
  pointer-events: none;
  background-image: radial-gradient(rgba(236,220,184,.09) 1px, transparent 1.3px);
  background-size: 5px 5px;
  opacity: .55;
}
.panel-parch {
  background:
    linear-gradient(150deg, #e9d9b4, #cdb98d);
  color: #1a1208;
  border: 3px solid #000;
  box-shadow: 9px 11px 0 rgba(0,0,0,.6);
}
.panel-parch::after {
  background-image: radial-gradient(rgba(90,60,20,.14) 1px, transparent 1.3px);
  background-size: 5px 5px;
  opacity: .7;
}

/* torn tape */
.tape {
  position: absolute;
  width: 116px; height: 30px;
  background: linear-gradient(180deg, rgba(224,206,158,.9), rgba(196,175,124,.85));
  box-shadow: 0 3px 10px rgba(0,0,0,.5);
  opacity: .88;
  filter: saturate(.8);
}
.tape::before, .tape::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 7px;
  background: repeating-linear-gradient(180deg, transparent 0 4px, rgba(0,0,0,.35) 4px 5px);
}
.tape::before { left: 0; }
.tape::after  { right: 0; }
.tape-tl { top: -14px; left: -22px; transform: rotate(-24deg); }
.tape-tr { top: -14px; right: -22px; transform: rotate(21deg); }

/* ---------------- 3D perspective stage ---------------------- */
.stage { perspective: 1500px; perspective-origin: 50% 40%; }
.stage-deep { perspective: 1100px; }

.tilt {
  transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.2,.8,.25,1), box-shadow .45s ease;
  will-change: transform;
}
.tilt-l  { transform: perspective(1500px) rotateY(9deg)  rotateX(3deg); }
.tilt-r  { transform: perspective(1500px) rotateY(-9deg) rotateX(3deg); }
.tilt-up { transform: perspective(1500px) rotateX(8deg); }
.tilt:hover {
  transform: perspective(1500px) rotateY(0deg) rotateX(0deg) translateZ(46px);
  box-shadow:
    inset 0 0 0 2px rgba(216,166,58,.35),
    16px 20px 0 rgba(0,0,0,.6),
    0 0 70px rgba(216,166,58,.18);
}

/* ---------------- pinned evidence photos -------------------- */
.evidence {
  position: relative;
  padding: 12px 12px 46px;
  background: linear-gradient(160deg, #efe0bd, #cdb98d);
  border: 2px solid #000;
  box-shadow: 8px 12px 0 rgba(0,0,0,.55), 0 0 40px rgba(0,0,0,.45);
  transition: transform .5s cubic-bezier(.2,.8,.25,1), filter .5s ease;
  transform-style: preserve-3d;
}
.evidence img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 2px solid #12100c;
  filter: sepia(.22) contrast(1.06) saturate(.92);
}
.evidence figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  text-align: center;
  font-family: "Special Elite", monospace;
  font-size: .74rem;
  letter-spacing: .12em;
  color: #3a2a12;
  text-transform: uppercase;
}
.evidence .pin {
  position: absolute;
  top: -13px; left: 50%;
  width: 22px; height: 22px;
  margin-left: -11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff7a5c, #8d1f0d 70%);
  box-shadow: 0 5px 10px rgba(0,0,0,.6), inset 0 -2px 3px rgba(0,0,0,.4);
  z-index: 3;
}
.evidence:hover {
  transform: perspective(1200px) translateZ(42px) rotate(0deg) scale(1.02);
  filter: brightness(1.08);
  z-index: 5;
}

/* ---------------- buttons ----------------------------------- */
.btn-comic {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: "Bangers", cursive;
  letter-spacing: .08em;
  font-size: 1.06rem;
  padding: .72rem 1.5rem;
  color: #14100c;
  background: linear-gradient(180deg, #f0c257, #c98d1e);
  border: 3px solid #000;
  border-radius: 4px;
  box-shadow: 5px 6px 0 #000;
  text-decoration: none;
  transition: transform .14s ease, box-shadow .14s ease, filter .2s ease;
  text-transform: uppercase;
}
.btn-comic:hover { transform: translate(-2px,-2px); box-shadow: 8px 10px 0 #000; filter: brightness(1.06); }
.btn-comic:active { transform: translate(3px,4px); box-shadow: 1px 1px 0 #000; }

.btn-ghost {
  color: var(--parch);
  background: linear-gradient(180deg, rgba(40,31,22,.95), rgba(20,16,12,.95));
  box-shadow: 5px 6px 0 rgba(0,0,0,.85);
}
.btn-ghost:hover { color: var(--brass); }

.btn-blood { background: linear-gradient(180deg, #d64a30, #8e2313); color: #ffeedd; }
.btn-teal  { background: linear-gradient(180deg, #3fb0aa, #1f6d6a); color: #041312; }

/* ---------------- nav --------------------------------------- */
.nav-shell {
  background: linear-gradient(180deg, rgba(10,8,6,.94), rgba(10,8,6,.72));
  border-bottom: 3px solid #000;
  box-shadow: 0 6px 0 rgba(0,0,0,.45), 0 14px 40px rgba(0,0,0,.6);
  backdrop-filter: blur(9px);
}
.nav-link {
  font-family: "Bangers", cursive;
  letter-spacing: .12em;
  color: var(--parch);
  text-decoration: none;
  position: relative;
  padding: .2rem 0;
  transition: color .2s ease;
  text-transform: uppercase;
}
.nav-link::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: -3px;
  height: 3px; background: var(--brass);
  transition: right .25s ease;
}
.nav-link:hover { color: var(--brass); }
.nav-link:hover::after { right: 0; }

/* ---------------- ticker ------------------------------------ */
.ticker-3d {
  transform: perspective(700px) rotateX(15deg);
  transform-origin: center top;
  background: linear-gradient(180deg, #d8a63a, #8f6413);
  border-top: 3px solid #000;
  border-bottom: 3px solid #000;
  box-shadow: 0 10px 0 rgba(0,0,0,.55), 0 20px 50px rgba(0,0,0,.6);
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: slide 30s linear infinite;
}
.ticker-track span {
  font-family: "Bangers", cursive;
  font-size: 1.28rem;
  letter-spacing: .14em;
  color: #180f03;
  padding: .55rem 1.4rem;
  white-space: nowrap;
  text-transform: uppercase;
}
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------------- burst / sound effect ---------------------- */
.burst {
  font-family: "Bangers", cursive;
  color: #16100a;
  background: var(--brass);
  border: 3px solid #000;
  padding: .5rem 1rem;
  box-shadow: 5px 6px 0 #000;
  clip-path: polygon(6% 0, 96% 4%, 100% 52%, 94% 100%, 8% 96%, 0 48%);
  letter-spacing: .1em;
  text-transform: uppercase;
  display: inline-block;
}
.burst-blood { background: var(--blood); color: #ffe9d9; }
.burst-teal  { background: var(--teal); color: #04110f; }

/* ---------------- CA bar ------------------------------------ */
.ca-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 3px solid #000;
  background: linear-gradient(180deg, rgba(233,217,180,.96), rgba(203,185,141,.96));
  box-shadow: 6px 8px 0 rgba(0,0,0,.6);
  border-radius: 4px;
  overflow: hidden;
}
.ca-bar .label {
  font-family: "Bangers", cursive;
  background: #14100c;
  color: var(--brass);
  padding: .7rem .95rem;
  letter-spacing: .16em;
  display: flex; align-items: center;
  border-right: 3px solid #000;
  white-space: nowrap;
}
.ca-bar code {
  flex: 1;
  min-width: 0;
  display: flex; align-items: center;
  padding: .7rem .9rem;
  font-family: "Special Elite", monospace;
  color: #241806;
  font-size: .9rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.ca-bar code::-webkit-scrollbar { display: none; }
.ca-bar button {
  font-family: "Bangers", cursive;
  letter-spacing: .1em;
  background: #b5321f;
  color: #ffeadf;
  border: 0;
  border-left: 3px solid #000;
  padding: 0 1.15rem;
  cursor: pointer;
  transition: background .2s ease;
  text-transform: uppercase;
}
.ca-bar button:hover { background: #d64a30; }

/* ---------------- step panels ------------------------------- */
.step-no {
  font-family: "Bangers", cursive;
  font-size: 3.1rem;
  line-height: 1;
  color: var(--brass);
  text-shadow: 3px 4px 0 #000;
}
.step-panel {
  transition: transform .5s cubic-bezier(.2,.8,.25,1), box-shadow .4s ease;
  transform-style: preserve-3d;
}
.step-panel:hover {
  transform: perspective(1500px) translateY(-12px) translateZ(40px) rotateX(-4deg);
  box-shadow:
    inset 0 0 0 2px rgba(216,166,58,.32),
    14px 18px 0 rgba(0,0,0,.6),
    0 0 60px rgba(216,166,58,.16);
}

/* ---------------- stat chips -------------------------------- */
.stat {
  border: 3px solid #000;
  background: linear-gradient(160deg, rgba(47,140,136,.22), rgba(14,11,8,.94));
  box-shadow: 6px 8px 0 rgba(0,0,0,.6);
  padding: 1rem .9rem;
  text-align: center;
  transition: transform .4s ease, background .4s ease;
}
.stat:hover { transform: translateY(-6px); background: linear-gradient(160deg, rgba(216,166,58,.28), rgba(14,11,8,.94)); }
.stat .k { font-family: "Bangers", cursive; font-size: 1.7rem; color: var(--brass); letter-spacing: .05em; }
.stat .v { font-size: .72rem; letter-spacing: .18em; color: rgba(236,220,184,.68); text-transform: uppercase; }

/* ---------------- chart frame ------------------------------- */
.monitor {
  border: 3px solid #000;
  background: #06110f;
  box-shadow:
    inset 0 0 0 2px rgba(47,140,136,.35),
    12px 14px 0 rgba(0,0,0,.6),
    0 0 80px rgba(47,140,136,.14);
  overflow: hidden;
}
.monitor iframe { display: block; width: 100%; height: 100%; border: 0; }
.monitor-glass {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.05), transparent 22%);
}

/* ---------------- banner (join us) -------------------------- */
.banner-frame {
  position: relative;
  border: 3px solid #000;
  box-shadow: 12px 14px 0 rgba(0,0,0,.6), 0 0 70px rgba(216,166,58,.15);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.2,.8,.25,1);
}
.banner-frame img { display: block; width: 100%; }
.banner-frame:hover { transform: perspective(1500px) rotateX(0deg) translateZ(34px) scale(1.01); }
.banner-frame .sheen {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255,235,190,.22) 50%, transparent 62%);
  transform: translateX(-60%);
  transition: transform 1s ease;
  pointer-events: none;
}
.banner-frame:hover .sheen { transform: translateX(60%); }

/* ---------------- section edges ----------------------------- */
.edge-top    { clip-path: polygon(0 2.4vw, 100% 0, 100% 100%, 0 100%); }
.edge-bottom { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2.4vw), 0 100%); }
.edge-both   { clip-path: polygon(0 2.4vw, 100% 0, 100% calc(100% - 2.4vw), 0 100%); }

.veil { background: linear-gradient(180deg, rgba(10,8,6,.55), rgba(10,8,6,.86)); }
.veil-brass { background: linear-gradient(180deg, rgba(28,20,10,.75), rgba(10,8,6,.9)); }

/* red investigation string */
.string-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(181,50,31,.85), transparent);
  transform-origin: left center;
  pointer-events: none;
  opacity: .55;
}

/* ---------------- reveal on scroll -------------------------- */
.reveal { opacity: 0; transform: translateY(38px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.25,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------------- misc -------------------------------------- */
.smoke {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(236,220,184,.16), transparent 68%);
  filter: blur(16px);
  animation: drift 13s ease-in-out infinite;
  pointer-events: none;
}
@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); opacity: .35; }
  50%     { transform: translate(24px,-42px) scale(1.28); opacity: .6; }
}

.float-slow { animation: floaty 7s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

.hero-logo {
  filter: drop-shadow(0 22px 34px rgba(0,0,0,.8)) drop-shadow(0 0 30px rgba(216,166,58,.32));
}

.toast {
  position: fixed;
  left: 50%; bottom: 26px;
  transform: translate(-50%, 130%);
  z-index: 90;
  transition: transform .4s cubic-bezier(.2,.8,.25,1);
}
.toast.show { transform: translate(-50%, 0); }

::selection { background: var(--brass); color: #14100c; }

::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: #0a0806; }
::-webkit-scrollbar-thumb { background: #9a6b18; border: 2px solid #0a0806; }
::-webkit-scrollbar-thumb:hover { background: var(--brass); }

@media (max-width: 900px) {
  .tilt-l, .tilt-r, .tilt-up { transform: none; }
  .ticker-3d { transform: none; }
  .panel { box-shadow: 6px 7px 0 rgba(0,0,0,.6); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track, .smoke, .float-slow { animation: none; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
