/* ============================================
   HORRORTOKU — Design tokens
   Concept: Henshin sequence meets analog-horror VHS tape.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Special+Elite&family=VT323&display=swap');

:root {
  /* Color */
  --void: #0b0b0f;         /* page background */
  --charcoal: #17151a;     /* panel/card background */
  --charcoal-2: #201c22;   /* hover/raised panel */
  --bloodrust: #7a1f1f;    /* primary accent — oxidized red */
  --bloodrust-bright: #a52c2c;
  --swampglow: #5c7a4f;    /* secondary accent — toxic slime green */
  --staticgrey: #c9c5bd;   /* body text on dark */
  --boneyellow: #d8c9a3;   /* aged paper accent, sparing */
  --line: rgba(201, 197, 189, 0.14);

  /* Type */
  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Special Elite', 'Courier New', monospace;
  --font-mono: 'VT323', monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--staticgrey);
  font-family: var(--font-body);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Faint film-grain / scanline overlay across the whole site */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 500;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.025) 0px,
    rgba(255,255,255,0.025) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
  opacity: 0.5;
}

a { color: var(--boneyellow); text-decoration: none; }
a:hover { color: var(--bloodrust-bright); }

h1, h2, h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--staticgrey);
  margin: 0 0 0.4em;
}

p { color: var(--staticgrey); opacity: 0.85; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Focus visibility, accessibility floor */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--boneyellow);
  outline-offset: 3px;
}

/* ============================================
   SPLASH GATE — first-load hero-only screen
   ============================================ */
body.gated {
  overflow-y: auto;
}
body.gated .site-header,
body.gated .section,
body.gated .site-footer {
  display: none;
}
body.gated .hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom: none;
}

body.gate-opened .site-header,
body.gate-opened .section,
body.gate-opened .site-footer {
  animation: gate-fade-in 0.7s ease forwards;
}

@keyframes gate-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  body.gate-opened .site-header,
  body.gate-opened .section,
  body.gate-opened .site-footer {
    animation: none;
  }
}

/* ============================================
   NAV
   ============================================ */
.site-header {
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(11, 11, 15, 0.92);
  backdrop-filter: blur(4px);
  z-index: 100;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  color: var(--staticgrey);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo span { color: var(--bloodrust-bright); }

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--bloodrust);
  filter: grayscale(0.25) contrast(1.05);
}

.nav-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

.nav-links a {
  color: var(--staticgrey);
  opacity: 0.75;
  text-transform: uppercase;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; color: var(--bloodrust-bright); }

/* ============================================
   REC / VHS timestamp chip
   ============================================ */
.rec-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--swampglow);
  letter-spacing: 0.05em;
}
.rec-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bloodrust-bright);
  animation: blink 1.4s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0.15; } }

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 110px 0 90px;
  text-align: center;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.hero-eyebrow {
  font-family: var(--font-mono);
  color: var(--swampglow);
  font-size: 1.2rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.glitch {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 6rem);
  line-height: 1;
  position: relative;
  color: var(--staticgrey);
  display: inline-block;
  margin: 0 0 20px;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
}
.glitch::before {
  color: var(--bloodrust-bright);
  animation: glitch-1 3.2s infinite linear alternate-reverse;
  z-index: -1;
}
.glitch::after {
  color: var(--swampglow);
  animation: glitch-2 2.6s infinite linear alternate-reverse;
  z-index: -1;
}

@keyframes glitch-1 {
  0%   { clip-path: inset(0 0 85% 0); transform: translate(-2px, -1px); }
  20%  { clip-path: inset(20% 0 60% 0); transform: translate(2px, 1px); }
  40%  { clip-path: inset(50% 0 20% 0); transform: translate(-2px, 0); }
  60%  { clip-path: inset(75% 0 5% 0); transform: translate(2px, -1px); }
  80%  { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 1px); }
  100% { clip-path: inset(40% 0 40% 0); transform: translate(1px, 0); }
}
@keyframes glitch-2 {
  0%   { clip-path: inset(60% 0 10% 0); transform: translate(2px, 1px); }
  25%  { clip-path: inset(10% 0 75% 0); transform: translate(-2px, 0); }
  50%  { clip-path: inset(35% 0 45% 0); transform: translate(1px, -1px); }
  75%  { clip-path: inset(80% 0 5% 0); transform: translate(-1px, 1px); }
  100% { clip-path: inset(15% 0 65% 0); transform: translate(2px, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .glitch::before, .glitch::after, .rec-dot { animation: none; }
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 1.15rem;
  max-width: 560px;
  margin: 0 auto 34px;
  color: var(--staticgrey);
  opacity: 0.85;
}

.coming-soon-notice {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bloodrust-bright);
  opacity: 1;
  margin: 12px auto 16px !important;
  text-shadow: 0 0 12px rgba(165, 44, 44, 0.6);
}

.hero-scanbar {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--bloodrust-bright), transparent);
  margin: 40px 0 0;
  opacity: 0.6;
}

.sigil-frame {
  width: min(280px, 60vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto 28px;
  border-radius: 50%;
  padding: 6px;
  position: relative;
  background: radial-gradient(circle at 50% 45%, rgba(122,31,31,0.35), rgba(11,11,15,0) 70%);
}

.sigil-frame::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid var(--bloodrust);
  box-shadow: 0 0 24px rgba(122, 31, 31, 0.45), inset 0 0 30px rgba(92, 122, 79, 0.15);
  animation: sigil-pulse 4s ease-in-out infinite;
}

@keyframes sigil-pulse {
  0%, 100% { box-shadow: 0 0 24px rgba(122, 31, 31, 0.45), inset 0 0 30px rgba(92, 122, 79, 0.15); }
  50%      { box-shadow: 0 0 36px rgba(92, 122, 79, 0.5), inset 0 0 30px rgba(122, 31, 31, 0.2); }
}

.sigil-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  filter: saturate(0.9) contrast(1.08);
}

@media (prefers-reduced-motion: reduce) {
  .sigil-frame::before { animation: none; }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 30px;
  border: 1px solid var(--bloodrust-bright);
  color: var(--staticgrey);
  background: rgba(122, 31, 31, 0.12);
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn:hover {
  background: var(--bloodrust);
  color: var(--staticgrey);
  transform: translateY(-1px);
}

/* ============================================
   SECTION LABELS
   ============================================ */
.section {
  padding: 80px 0;
  border-bottom: 1px solid var(--line);
}
.section:last-of-type { border-bottom: none; }

.section-label {
  font-family: var(--font-mono);
  color: var(--swampglow);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin-bottom: 14px;
}

.section-sub {
  max-width: 640px;
  margin-bottom: 46px;
  opacity: 0.8;
}

/* ============================================
   CATEGORY GRID (home page — "case files")
   ============================================ */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px;
}

.file-card {
  display: block;
  background: var(--charcoal);
  border: 1px solid var(--line);
  border-left: 3px solid var(--bloodrust);
  padding: 26px 24px 22px;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.file-card:hover {
  background: var(--charcoal-2);
  border-left-color: var(--swampglow);
  transform: translateX(2px);
}

.file-tag {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--swampglow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}

.file-card h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  color: var(--staticgrey);
}

.file-card p {
  font-size: 0.95rem;
  margin: 0;
}

.file-card .go {
  display: block;
  margin-top: 16px;
  font-family: var(--font-mono);
  color: var(--bloodrust-bright);
  font-size: 1rem;
  letter-spacing: 0.05em;
}

/* ============================================
   IN-PAGE CASE DIRECTORY (jump links to subcategories)
   ============================================ */
.directory-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.directory-nav a {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 20px 24px;
  border: 2px solid var(--line);
  color: var(--staticgrey);
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.2s ease;
  background: var(--charcoal);
}
.directory-nav a:hover {
  border-color: var(--bloodrust-bright);
  color: var(--bloodrust-bright);
  opacity: 1;
  transform: translateX(4px);
  background: var(--charcoal-2);
}

.dir-thumb {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--bloodrust);
  filter: grayscale(0.3) contrast(1.1);
  transition: filter 0.2s ease;
  flex-shrink: 0;
}

.directory-nav a:hover .dir-thumb {
  filter: grayscale(0) contrast(1.15);
  border-color: var(--bloodrust-bright);
  box-shadow: 0 0 16px rgba(122, 31, 31, 0.6);
}

/* ============================================
   PRODUCT GRID (category pages — "specimens")
   ============================================ */
.specimen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}

.specimen-card {
  background: var(--charcoal);
  border: 1px solid var(--line);
  overflow: hidden;
}

.specimen-thumb {
  aspect-ratio: 4 / 3;
  background:
    repeating-linear-gradient(45deg, var(--charcoal-2) 0, var(--charcoal-2) 10px, var(--charcoal) 10px, var(--charcoal) 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  color: var(--staticgrey);
  opacity: 0.55;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--line);
}

.specimen-body { padding: 18px 20px 20px; }

.specimen-body .file-tag { margin-bottom: 6px; }

.specimen-body h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
}

.specimen-body p {
  font-size: 0.92rem;
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border: 1px solid var(--swampglow);
  color: var(--swampglow);
  position: relative;
}

/* Status indicator circle */
.status-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--swampglow);
  flex-shrink: 0;
}

/* Coming Soon status - RED */
.status-pill.status-coming-soon {
  border-color: var(--bloodrust-bright);
  color: var(--bloodrust-bright);
}

.status-pill.status-coming-soon::before {
  background: var(--bloodrust-bright);
}

/* In the Vault status - GREEN (default) */
.status-pill.status-in-vault {
  border-color: var(--swampglow);
  color: var(--swampglow);
}

.status-pill.status-in-vault::before {
  background: var(--swampglow);
}

/* ============================================
   CATEGORY PAGE HEADER
   ============================================ */
.page-hero {
  padding: 70px 0 50px;
  border-bottom: 1px solid var(--line);
}

.back-link {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--staticgrey);
  opacity: 0.7;
  display: inline-block;
  margin-bottom: 18px;
}
.back-link:hover { opacity: 1; color: var(--bloodrust-bright); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  padding: 50px 0 40px;
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 22px;
  font-family: var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-wrap: wrap;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--staticgrey);
  opacity: 0.5;
  letter-spacing: 0.04em;
}

/* Responsive tightening */
@media (max-width: 640px) {
  .hero { padding: 80px 0 60px; }
  .section { padding: 56px 0; }

  .nav {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .nav-links {
    justify-content: center;
    width: 100%;
  }
}
