/* =========================================================
   THE DUMB NETWORK
   ========================================================= */

:root {
  --black: #0c0c0c;
  --char: #171717;
  --char-2: #222;
  --yellow: #ffc61a;
  --yellow-deep: #f2b100;
  --red: #e0141e;
  --green: #0f7a3d;
  --green-deep: #0a5c2d;
  --paper: #ece6d8;
  --paper-edge: #d8d0bd;
  --ink: #141414;
  --white: #f7f5f0;
  --muted: #b8b2a6;

  --f-display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --f-label: "Oswald", "Arial Narrow", sans-serif;
  --f-type: "Special Elite", "Courier New", monospace;
  --f-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1180px;
  --radius: 6px;
}

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

html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }

body {
  margin: 0;
  color: var(--white);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  background-color: var(--black);
  /* grime: layered speckle so the black isn't flat */
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1.4px),
    radial-gradient(rgba(255, 198, 26, 0.03) 1px, transparent 1.6px),
    radial-gradient(ellipse at 20% 0%, #1d1d1d 0%, transparent 55%),
    radial-gradient(ellipse at 90% 30%, #1a1612 0%, transparent 50%);
  background-size: 7px 7px, 13px 13px, 100% 100%, 100% 100%;
  background-position: 0 0, 3px 5px, 0 0, 0 0;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--yellow); }
a:hover { color: var(--white); }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }

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

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(12, 12, 12, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--yellow);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 0.6rem;
}

.logo {
  display: inline-flex; flex-direction: column; line-height: 0.88;
  text-decoration: none; color: var(--white);
  font-family: var(--f-display); text-transform: uppercase;
  transform: rotate(-2deg);
}
.logo__the { font-size: 0.95rem; letter-spacing: 0.08em; }
.logo__dumb { font-size: 2rem; color: var(--yellow); }
.logo__net { font-size: 1.05rem; letter-spacing: 0.04em; }
.logo:hover { color: var(--white); }

.nav ul { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: block; padding: 0.45rem 0.8rem;
  font-family: var(--f-label); font-weight: 600; font-size: 0.95rem;
  text-transform: uppercase; letter-spacing: 0.04em; text-decoration: none;
  color: var(--white); border: 2px solid transparent; border-radius: var(--radius);
}
.nav a:hover { border-color: var(--yellow); color: var(--yellow); }
.nav a[aria-current="page"] { background: var(--yellow); color: var(--ink); }
.nav a[data-nav="criminals"][aria-current="page"] { background: var(--red); color: var(--white); }
.nav a[data-nav="laws"][aria-current="page"] { background: var(--green); color: var(--white); }

/* ---------- Police tape ---------- */

.tape {
  position: relative; overflow: hidden; white-space: nowrap;
  padding: 0.5rem 0;
  background: var(--yellow); color: var(--ink);
  font-family: var(--f-display); font-size: 1.25rem; letter-spacing: 0.06em;
  text-transform: uppercase;
  border-block: 4px solid var(--ink);
  box-shadow: 0 0 0 3px var(--yellow);
  transform: rotate(-1.2deg); margin: 2.5rem -1rem;
}
.tape span { display: inline-block; padding-inline: 1.2rem; }
.tape span::after { content: "\25B2"; margin-left: 2.4rem; font-size: 0.8em; }

/* ---------- Home hero ---------- */

.hero { padding-top: 1.5rem; }
.hero__art {
  border: 3px solid var(--char-2); border-radius: 10px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.hero__art img { width: 100%; height: auto; }
.hero__pitch {
  margin: 1.6rem auto 0; max-width: 46rem; text-align: center;
  font-family: var(--f-label); font-size: clamp(1.15rem, 2.4vw, 1.5rem);
  text-transform: uppercase; letter-spacing: 0.02em; color: var(--white);
}
.hero__pitch em { font-style: normal; color: var(--yellow); }

/* ---------- Headings ---------- */

.kicker {
  display: inline-block; margin: 0 0 0.6rem;
  padding: 0.15rem 0.6rem;
  font-family: var(--f-label); font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.12em;
  background: var(--white); color: var(--ink);
  transform: rotate(-1.5deg);
}
.h2 {
  margin: 0 0 1.4rem;
  font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1; text-transform: uppercase;
}
.h2 span { color: var(--yellow); }

.block { padding-block: 3rem; }

/* ---------- Section tiles ---------- */

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 1.25rem; }

.tile {
  position: relative; display: flex; flex-direction: column; gap: 0.4rem;
  padding: 1.5rem 1.4rem 1.3rem; min-height: 220px;
  text-decoration: none; border-radius: 10px;
  border: 4px solid currentColor;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tile:hover { transform: translateY(-4px) rotate(-0.6deg); box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5); }
.tile__icon { width: 52px; height: 52px; }
.tile__icon svg { width: 100%; height: 100%; fill: currentColor; }
.tile__name { font-family: var(--f-display); font-size: 2.1rem; line-height: 1; text-transform: uppercase; }
.tile__tag { font-size: 1rem; line-height: 1.4; flex: 1; }
.tile__count { font-family: var(--f-label); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.9rem; }

.tile--signs { background: var(--yellow); color: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 4px var(--yellow); }
.tile--signs:hover { color: var(--ink); }
.tile--criminals { background: var(--red); color: var(--white); border-color: var(--white); box-shadow: inset 0 0 0 4px var(--red); }
.tile--criminals:hover { color: var(--white); }
.tile--laws { background: var(--green); color: var(--white); border-color: var(--white); box-shadow: inset 0 0 0 4px var(--green); }
.tile--laws:hover { color: var(--white); }

/* ---------- Dumb of the Day ---------- */

.dotd { display: grid; grid-template-columns: minmax(0, 340px) 1fr; gap: 2rem; align-items: center; }
.dotd__intro p { color: var(--muted); max-width: 28rem; }
.dotd__label {
  margin: 0 0 0.8rem; font-family: var(--f-label); text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 0.85rem; color: var(--muted);
}
.dotd__card { max-width: 560px; }

/* ---------- Latest ---------- */

.latest + .latest { margin-top: 2.6rem; }
.latest__head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; border-bottom: 2px dashed #333; padding-bottom: 0.5rem; }
.latest__head h3 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 1.7rem; text-transform: uppercase; }
.latest--signs h3 { color: var(--yellow); }
.latest--criminals h3 { color: #ff4d55; }
.latest--laws h3 { color: #3fcf7c; }
.latest__head a { font-family: var(--f-label); text-transform: uppercase; font-weight: 600; text-decoration: none; }

/* ---------- Coming soon ---------- */

.soon { display: flex; flex-wrap: wrap; gap: 0.7rem; padding: 0; margin: 0; list-style: none; }
.soon li {
  padding: 0.5rem 0.9rem; border: 2px dashed #444; border-radius: var(--radius);
  font-family: var(--f-label); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted);
}

/* ---------- Section page header ---------- */

.page-head { position: relative; padding-block: 3rem 2rem; overflow: hidden; }
.page-head__inner { position: relative; z-index: 1; max-width: 46rem; }
.page-head h1 {
  margin: 0 0 0.6rem;
  font-family: var(--f-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(3rem, 9vw, 6rem); line-height: 0.9;
}
.page-head h1 span { display: inline-block; padding: 0 0.15em; transform: rotate(-1.5deg); }
.page-head__tag { margin: 0 0 0.6rem; font-family: var(--f-label); font-size: 1.3rem; text-transform: uppercase; }
.page-head__intro { margin: 0; color: var(--muted); max-width: 38rem; }

.page-head--signs h1 span { background: var(--yellow); color: var(--ink); }
.page-head--signs .page-head__tag { color: var(--yellow); }
.page-head--criminals h1 span { background: var(--red); color: var(--ink); }
.page-head--criminals .page-head__tag { color: #ff4d55; }
.page-head--laws h1 span { background: var(--green); color: var(--white); }
.page-head--laws .page-head__tag { color: #3fcf7c; }

.page-head--art { display: grid; grid-template-columns: 1fr minmax(0, 520px); gap: 2rem; align-items: center; }
.page-head__art { border: 3px solid var(--char-2); border-radius: 10px; overflow: hidden; transform: rotate(1.2deg); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6); }

/* ---------- Toolbar ---------- */

.toolbar {
  display: flex; flex-wrap: wrap; gap: 0.8rem; align-items: center;
  padding: 0.9rem; margin-bottom: 1.8rem;
  background: var(--char); border: 2px solid var(--char-2); border-radius: 10px;
}
.toolbar input {
  flex: 1 1 240px; min-width: 0;
  padding: 0.7rem 0.9rem; font: inherit; color: var(--white);
  background: var(--black); border: 2px solid #333; border-radius: var(--radius);
}
.toolbar input:focus { border-color: var(--yellow); outline: none; }
.toolbar__count { font-family: var(--f-label); text-transform: uppercase; color: var(--muted); letter-spacing: 0.05em; }

.btn {
  padding: 0.7rem 1.1rem; border: 0; border-radius: var(--radius); cursor: pointer;
  font-family: var(--f-label); font-weight: 700; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em;
  background: var(--yellow); color: var(--ink);
  box-shadow: 3px 3px 0 var(--white);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--white); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--white); }

/* ---------- Grids ---------- */

.grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); align-items: start; }
.grid--criminals { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.empty { grid-column: 1 / -1; font-family: var(--f-type); font-size: 1.2rem; color: var(--muted); }

/* ---------- Cards (shared) ---------- */

.card { position: relative; scroll-margin-top: 110px; }
.card__where { margin: 0.4rem 0 0; font-family: var(--f-label); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.85rem; }
.card__body { margin: 0.6rem 0 0; font-size: 0.98rem; line-height: 1.5; }
.card__actions { display: flex; gap: 0.9rem; align-items: center; margin-top: 0.9rem; }
.card__share, .card__source {
  padding: 0; border: 0; background: none; cursor: pointer;
  font-family: var(--f-label); font-weight: 600; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.06em; color: inherit; opacity: 0.7;
  text-decoration: underline; text-underline-offset: 3px;
}
.card__share:hover, .card__source:hover { opacity: 1; color: inherit; }

.card.is-spotlit { animation: spotlight 1.6s ease; }
@keyframes spotlight {
  0%, 100% { transform: none; }
  15% { transform: scale(1.04) rotate(-1deg); box-shadow: 0 0 0 6px var(--white), 0 20px 50px rgba(0, 0, 0, 0.7); }
  60% { transform: scale(1.02); }
}

/* Caution sign */
.sign {
  background: var(--yellow); color: var(--ink);
  border: 4px solid var(--ink); border-radius: 8px;
  box-shadow: 0 0 0 3px var(--yellow), 0 10px 24px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.sign__bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.8rem; background: var(--ink); color: var(--yellow);
  font-family: var(--f-display); font-size: 1.35rem; letter-spacing: 0.12em; text-transform: uppercase;
}
.sign__bar svg { width: 26px; height: 26px; fill: currentColor; }
.sign__inner { padding: 1rem 1.1rem 1.1rem; }
.sign__text { margin: 0; font-family: var(--f-label); font-weight: 700; font-size: 1.55rem; line-height: 1.15; text-transform: uppercase; }

/* Case file */
.case {
  padding: 1.1rem 1.2rem 1.2rem; color: var(--ink);
  background:
    repeating-linear-gradient(transparent 0 27px, rgba(0, 0, 0, 0.06) 27px 28px),
    linear-gradient(160deg, #f3eee2, var(--paper) 60%, var(--paper-edge));
  border-radius: 3px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  font-family: var(--f-type);
}
.case:nth-child(odd) { transform: rotate(-0.6deg); }
.case:nth-child(even) { transform: rotate(0.5deg); }
.case__head { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: #555; }
.case__stamp {
  padding: 0.1rem 0.5rem; border: 3px solid var(--red); border-radius: 4px;
  color: var(--red); font-family: var(--f-display); font-size: 1.1rem; letter-spacing: 0.1em;
  transform: rotate(-8deg); opacity: 0.85;
}
.case__quote { margin: 0.8rem 0 0; font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: 1.55rem; line-height: 1.2; }
.case__quote::before { content: "\201C"; }
.case__quote::after { content: "\201D"; }
.case .card__where { font-family: var(--f-type); color: #6b1a1a; font-weight: 400; }
.case .card__body { font-family: var(--f-type); font-size: 0.95rem; }

/* Highway-style law sign */
.law__sign {
  position: relative; padding: 1.2rem 1.2rem 1.3rem; text-align: center;
  background: var(--green); color: var(--white);
  border: 3px solid var(--white); border-radius: 12px;
  box-shadow: 0 0 0 5px var(--green), 0 12px 26px rgba(0, 0, 0, 0.5);
  margin: 5px;
}
.law__sign::before, .law__sign::after {
  content: ""; position: absolute; top: 8px; width: 7px; height: 7px; border-radius: 50%;
  background: #cfd6d1; box-shadow: inset -1px -1px 0 rgba(0, 0, 0, 0.4);
}
.law__sign::before { left: 10px; }
.law__sign::after { right: 10px; }
.law__state {
  display: inline-block; margin: 0 0 0.5rem; padding: 0.05rem 0.6rem;
  border: 2px solid var(--white); border-radius: 4px;
  font-family: var(--f-label); font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em;
}
.law__text { margin: 0; font-family: var(--f-label); font-weight: 600; font-size: 1.3rem; line-height: 1.25; }
.law .card__body { padding: 0.5rem 0.5rem 0; color: var(--muted); }
.law .card__actions { padding-inline: 0.5rem; color: var(--white); }

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

.site-footer { margin-top: 4rem; padding-block: 2rem 3rem; border-top: 3px solid var(--yellow); background: #090909; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: center; }
.site-footer p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.site-footer .mug {
  font-family: var(--f-display); text-transform: uppercase; font-size: 1.1rem; color: var(--white);
  padding: 0.5rem 0.9rem; background: var(--char); border-radius: 8px; border: 2px solid #333;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .dotd, .page-head--art { grid-template-columns: 1fr; }
  .page-head__art { order: -1; transform: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .site-header { position: static; }
  .nav a { padding: 0.35rem 0.6rem; font-size: 0.85rem; }
  .tape { font-size: 1rem; }
}

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