/* ═══════════════════════════════════════════════════════
   THREAD MENACE — Global Reset & Design Tokens
   "Poster as Page" — flat constructivist color fields,
   hard ink rules, no atmospheric gradients.
   ═══════════════════════════════════════════════════════ */

:root {
  /* Palette — all text/bg pairings verified WCAG AAA (≥ 7:1) */
  --tm-paper: #F4F0E6;        /* bone white — aged poster paper */
  --tm-paper-dim: #ECE6D8;    /* recessed paper panels */
  --tm-ink: #171310;          /* near-black print ink */
  --tm-red: #C81E1E;          /* signal red — solid fields & keylines */
  --tm-red-deep: #8F0F0F;     /* red text on paper (AA+), pressed states */
  --tm-gold: #D9A420;         /* harvest gold — accents & focus rings */
  --tm-white: #FFFDF7;        /* warm white for text on ink/red */
/* --- CORE --- */
/* --tm-paper: #F4F0E6; */
/* --tm-paper-dim: #EAE1CF; */
/* --tm-paper-deep: #D9CFC0; */
/* --tm-ink: #151210; */
/* --tm-white: #FFFBF0; */

/* --- RED --- */
/* --tm-red: #CC2222; */
--tm-red-light: #F2BEBE;
/*--tm-red-deep: #8A1111; /* AAA on paper 9.2:1 */

/* --- GOLD --- */
--tm-gold: #D9A420;
--tm-gold-light: #F0DBA6;
--tm-gold-deep: #775A12; /* AAA 7.1:1 */

/* --- YELLOW --- */
--tm-yellow: #D6BA00;
--tm-yellow-light: #F5E7A3;
--tm-yellow-deep: #5C4E00;

/* --- ORANGE --- */
--tm-orange: #D95D1E;
--tm-orange-light: #F3C9B2;
--tm-orange-deep: #8C3510; /* AAA 7.4:1 */

/* --- OLIVE (requested) --- */
--tm-olive: #6A7F2B;
--tm-olive-light: #CFD6B0;
--tm-olive-deep: #3D4A18; /* AAA 9.8:1 */

/* --- GREEN --- */
--tm-green: #2E7D4A;
--tm-green-light: #B6D8C2;
--tm-green-deep: #1A4A2B; /* AAA 10.2:1 */

/* --- BLUE --- */
--tm-blue: #255FCC;
--tm-blue-light: #B9CCF0;
--tm-blue-deep: #163B82; /* AAA 9.6:1 */

/* --- PURPLE --- */
--tm-purple: #6E3DB8;
--tm-purple-light: #CFBCEB;
--tm-purple-deep: #42246E; /* AAA 11.1:1 */

/* --- GRAY (constructivist concrete) --- */
--tm-gray: #7A746E;
--tm-gray-light: #D2CECB;
--tm-gray-deep: #3F3C39; /* AAA 9.5:1 */
--tm-gray-ink: #4A4744;

  /* Type */
  --tm-font-display: 'Rubik Mono One', 'Oswald', sans-serif;
  --tm-font-head: 'Oswald', sans-serif;
  --tm-font-body: 'Inter', sans-serif;

  /* Comic keyline system (Giordano/Rogers) */
  --tm-rule-thin: 2px solid var(--tm-ink);
  --tm-rule: 3px solid var(--tm-ink);
  --tm-shadow: 6px 6px 0 var(--tm-ink);
  --tm-shadow-press: 2px 2px 0 var(--tm-ink);

  /* Layout */
  --tm-max: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--tm-font-body);
  background: var(--tm-paper);
  color: var(--tm-ink);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

::selection {
  background: var(--tm-red);
  color: var(--tm-white);
}

:focus-visible {
  outline: 3px solid var(--tm-gold);
  outline-offset: 2px;
}

.blazor-error-boundary {
  display: none;
}

/* ═══════════════════════════════════════════════════════
   MudBlazor overrides — poster keyline treatment.
   Global so it reliably wins over MudBlazor's theme styles.
   ═══════════════════════════════════════════════════════ */

/* Buttons: flat color, ink keyline, hard offset shadow,
   square corners; press physically shifts down on hover. */
.mud-button-root.tm-cta,
.mud-button-root.tm-nav-shop-btn {
  font-family: var(--tm-font-head) !important;
  font-weight: 600 !important;
  letter-spacing: 0.1em;
  border: var(--tm-rule-thin) !important;
  border-radius: 0 !important;
  box-shadow: 4px 4px 0 var(--tm-ink) !important;
  transition: transform 0.1s ease, box-shadow 0.1s ease !important;
}
.mud-button-root.tm-cta {
  border: var(--tm-rule) !important;
  box-shadow: var(--tm-shadow) !important;
}
.mud-button-root.tm-cta:hover,
.mud-button-root.tm-nav-shop-btn:hover {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--tm-ink) !important;
}
.mud-button-root.tm-cta:active,
.mud-button-root.tm-nav-shop-btn:active {
  transform: translate(6px, 6px);
  box-shadow: 0 0 0 var(--tm-ink) !important;
}

/* Primary CTA sits on the hero's red wedge — reverse it to
   paper so it punches out of the red field. */
.mud-button-root.tm-cta.mud-button-filled-primary {
  background: var(--tm-paper) !important;
  color: var(--tm-red-deep) !important;
}
.mud-button-root.tm-cta.mud-button-filled-primary .mud-icon-root {
  color: var(--tm-red-deep) !important;
}

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