/* tokens + resets — Spider-Punk */

@font-face {
  font-family: "MagazineLetter";
  src: url("/static/fonts/MagazineLetterByBrntlbrnl-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0d0d0d;
  --paper: #ebe6d8;
  --paper-card: #f4f0e6;
  --stamp: #c4122f;
  --acid: #f0e100;
  --cyan-glitch: #00e5ff;
  --magenta-glitch: #ff2a6d;
  --muted: #5a5a5a;
  --topbar-h: 54px;
  --bottom-h: 56px;
  --app-max: 470px;
  --font-ransom: "MagazineLetter", "Courier New", monospace;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-ui: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: #1a1814;
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

body.ui-app {
  font-family: var(--font-body);
  letter-spacing: 0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.12;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* MagazineLetter only on auth / intro branding */
.auth-brand {
  font-family: var(--font-ransom);
  letter-spacing: 0.04em;
  line-height: 1.05;
}

/* Logged-in shell: readable brand via weight + stamp color */
body.ui-app .wordmark,
body.ui-app .ig-media-title {
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

body.ui-app .ig-media-title {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

@keyframes film-jitter {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-0.5px, 0.5px); }
  50% { transform: translate(0.5px, -0.5px); }
  75% { transform: translate(-0.5px, 0); }
}

@keyframes rgb-split {
  0%, 100% { text-shadow: none; }
  93% { text-shadow: -2px 0 var(--cyan-glitch), 2px 0 var(--magenta-glitch); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.app {
  position: relative;
  z-index: 1;
  width: min(100%, var(--app-max));
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--paper);
  border-left: 3px solid #000;
  border-right: 3px solid #000;
  box-shadow: 0 0 0 1px var(--acid);
  display: flex;
  flex-direction: column;
}

.flash {
  margin: 10px 12px 0;
  padding: 0.55rem 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 2px solid #000;
  background: var(--acid);
}

.flash.err {
  background: var(--stamp);
  color: #fff;
}

@media (min-width: 520px) {
  body {
    background: radial-gradient(ellipse at 50% 0%, #3a2a20 0%, #1a1814 55%);
  }
}
