/* whereismysandwich.com — noir, but for lunch */

:root {
  --bg: #0b0a09;
  --bg-raised: #15120f;
  --ink: #e8e0d2;
  --ink-dim: #9a8f7f;
  --ink-faint: #5c544a;
  --blood: #8e1c1c;
  --blood-bright: #c4302b;
  --mustard: #c9a227;
  --rule: #2a241e;

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
}

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

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.6;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, #1d1712 0%, transparent 70%),
    radial-gradient(ellipse 120% 80% at 50% 120%, #1a0807 0%, transparent 60%),
    var(--bg);
  overflow-x: hidden;
}

/* Film grain over everything */
.grain {
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 100;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -4%); }
  60%  { transform: translate(-4%, -1%); }
  80%  { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Hero ---------- */

.hero {
  max-width: 64rem;
  margin: 0 auto;
  padding: 4rem 1rem 2rem;
  text-align: center;
}

.case-no {
  margin: 0 0 1.5rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.case-no .open {
  color: var(--blood-bright);
}

.title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 7.5rem);
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  text-shadow: 0 0 40px rgba(0, 0, 0, 0.9);
}

.title span {
  color: var(--blood-bright);
  font-style: italic;
  text-transform: none;
  animation: flicker 7s infinite;
}

@keyframes flicker {
  0%, 91%, 93%, 96%, 100% { opacity: 1; }
  92%  { opacity: 0.35; }
  94%  { opacity: 0.6; }
  95%  { opacity: 0.2; }
}

.lede {
  max-width: 34rem;
  margin: 1.75rem auto 0;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--ink-dim);
}

/* ---------- Evidence photo ---------- */

.evidence {
  position: relative;
  max-width: 40rem;
  margin: 3rem auto 0;
}

.spotlight {
  position: absolute;
  inset: 5% -10% 15%;
  background: radial-gradient(ellipse at center, rgba(201, 162, 39, 0.16) 0%, rgba(201, 162, 39, 0.04) 40%, transparent 70%);
  filter: blur(10px);
}

.evidence img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  /* the image is square with lots of empty space above and below the sub */
  margin: -14% 0 -18%;
  filter: saturate(0.7) contrast(1.1) brightness(0.85) drop-shadow(0 30px 40px rgba(0, 0, 0, 0.8));
  animation: hover 6s ease-in-out infinite;
}

@keyframes hover {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-10px) rotate(0.5deg); }
}

.stamp {
  position: absolute;
  top: 12%;
  right: 2%;
  padding: 0.2em 0.6em;
  border: 4px solid var(--blood-bright);
  color: var(--blood-bright);
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(1rem, 4vw, 1.75rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transform: rotate(12deg);
  opacity: 0.85;
  mix-blend-mode: screen;
}

.evidence figcaption {
  position: relative;
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

/* ---------- Main ---------- */

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

h2 {
  margin: 0 0 1.5rem;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mustard);
  display: flex;
  align-items: center;
  gap: 1rem;
}

h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.file {
  margin-top: 5rem;
}

.timeline {
  margin: 0;
}

.timeline > div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.timeline dt {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 0.35rem;
}

.timeline dd {
  margin: 0;
}

.timeline em {
  color: var(--blood-bright);
}

.timeline .unresolved dt,
.timeline .unresolved dd {
  color: var(--blood-bright);
}

.pull {
  margin: 5rem 0;
  padding: 0;
  text-align: center;
}

.pull p {
  margin: 0;
  font-style: italic;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  line-height: 1.25;
  color: var(--ink);
}

.pull p::before,
.pull p::after {
  color: var(--blood);
}

.pull p::before { content: "\201C"; }
.pull p::after  { content: "\201D"; }

/* ---------- Buttons ---------- */

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

.button {
  display: block;
  padding: 1.1rem 1rem;
  text-align: center;
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--bg-raised);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, box-shadow 0.25s, background 0.25s;
}

.button:hover {
  border-color: var(--blood);
  color: var(--blood-bright);
  background: #1a0d0b;
  box-shadow: 0 0 24px rgba(142, 28, 28, 0.35);
}

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

.button:active {
  transform: translateY(1px);
}

/* ---------- Footer ---------- */

footer {
  max-width: 44rem;
  margin: 6rem auto 0;
  padding: 0 1rem 3rem;
}

.disclaimer {
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--mustard);
  background: var(--bg-raised);
  font-size: 1.05rem;
  color: var(--ink-dim);
}

.disclaimer p {
  margin: 0;
}

.disclaimer .disclaimer-label {
  margin-bottom: 0.5rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--mustard);
}

.credit {
  margin: 1rem 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

.credit a {
  color: var(--ink-dim);
  text-underline-offset: 0.2em;
}

.credit a:hover {
  color: var(--mustard);
}

.colophon {
  margin: 2rem 0 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
  .hero {
    padding-top: 2.5rem;
  }

  .timeline > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .buttons {
    grid-template-columns: 1fr;
  }
}

/* ---------- Motion sensitivity ---------- */

@media (prefers-reduced-motion: reduce) {
  .grain,
  .title span,
  .evidence img {
    animation: none;
  }
}
