/* Louie's Website v2 — clean, responsive spooky theme */
@import url('https://fonts.googleapis.com/css2?family=Creepster&display=swap');

:root {
  --bg: #0a0a0f;
  --bg-2: #14141c;
  --bg-3: #1c1c28;
  --fg: #ececf2;
  --muted: #9a9ab0;
  --accent: #c8112a;
  --accent-2: #6b0f1a;
  --purple: #2a0a3a;
  --glow: 0 0 12px rgba(200, 17, 42, 0.55);
  --radius: 8px;
  --maxw: 1280px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Georgia", "Times New Roman", serif;
  font-size: clamp(15px, 1.1vw, 17px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background:
    radial-gradient(ellipse at 50% -10%, rgba(42,10,58,0.6) 0%, transparent 55%),
    radial-gradient(ellipse at 50% 110%, rgba(107,15,26,0.4) 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

/* fog overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='400' height='400'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.035 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.45;
  z-index: 1;
  mix-blend-mode: screen;
}

main, header, nav, footer { position: relative; z-index: 2; }

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

a { color: inherit; }

/* ======== SPACESHIP DOGFIGHT ======== */
.ship-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 4;
}
.ship {
  position: absolute;
  width: clamp(28px, 4vw, 44px);
  aspect-ratio: 2 / 1;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 8px currentColor);
}
.ship svg { width: 100%; height: 100%; }
.ship.team-a { color: #2bd9ff; }
.ship.team-b { color: #ff4d4d; }
.ship.team-c { color: #aaff5a; }
.ship.team-d { color: #ff9c2b; }

.laser {
  position: absolute;
  height: 3px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  transform-origin: 0 50%;
  pointer-events: none;
  box-shadow: 0 0 8px currentColor, 0 0 16px currentColor;
  border-radius: 2px;
}

.boom {
  position: absolute;
  width: 50px;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.2);
  background: radial-gradient(circle, #fffbe0 0%, #ffaa00 35%, #ff3300 60%, transparent 75%);
  pointer-events: none;
  animation: boom 600ms ease-out forwards;
}
@keyframes boom {
  0%   { transform: translate(-50%, -50%) scale(0.2); opacity: 1; }
  60%  { transform: translate(-50%, -50%) scale(1.4); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

/* ======== GHOST ORBS ======== */
.orb-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 3;
}
.orb {
  position: absolute;
  width: 28px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    rgba(255,255,255,0.95) 0%,
    rgba(200,220,255,0.55) 35%,
    rgba(140,90,200,0.25) 65%,
    rgba(0,0,0,0) 75%);
  box-shadow:
    0 0 18px 6px rgba(180,200,255,0.55),
    0 0 40px 14px rgba(120,80,200,0.35);
  opacity: 0;
  will-change: transform, opacity;
}
.orb.tint-red {
  background: radial-gradient(circle at 35% 35%,
    rgba(255,230,230,0.95) 0%,
    rgba(255,140,140,0.55) 35%,
    rgba(200,17,42,0.3) 65%,
    rgba(0,0,0,0) 75%);
  box-shadow:
    0 0 18px 6px rgba(255,120,120,0.55),
    0 0 40px 14px rgba(200,17,42,0.4);
}
.orb.tint-green {
  background: radial-gradient(circle at 35% 35%,
    rgba(230,255,230,0.95) 0%,
    rgba(140,255,170,0.55) 35%,
    rgba(20,140,60,0.3) 65%,
    rgba(0,0,0,0) 75%);
  box-shadow:
    0 0 18px 6px rgba(140,255,170,0.5),
    0 0 40px 14px rgba(20,140,60,0.4);
}

/* ======== HEADER ======== */
.site-header {
  text-align: center;
  padding: clamp(1.5rem, 4vw, 3rem) 1rem 1.25rem;
  border-bottom: 1px solid rgba(200,17,42,0.3);
  background: linear-gradient(180deg, rgba(0,0,0,0.65), rgba(0,0,0,0));
}
.hero-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(0.75rem, 3vw, 2rem);
  max-width: var(--maxw);
  margin: 0 auto;
  flex-wrap: wrap;
}
.hero-logos img {
  width: clamp(48px, 8vw, 88px);
  border-radius: 50%;
  filter: drop-shadow(0 0 6px rgba(200,17,42,0.7));
}

.site-title {
  font-family: "Creepster", "Chiller", "Georgia", serif;
  font-size: clamp(2rem, 7vw, 4.25rem);
  letter-spacing: 0.04em;
  margin: 0;
  color: #fff;
  line-height: 1.05;
  text-shadow:
    0 0 8px rgba(200,17,42,0.85),
    0 0 24px rgba(200,17,42,0.45),
    2px 2px 0 #000;
  animation: flicker 5s infinite;
}
.site-tag {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-style: italic;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
}

@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.6; }
}

/* ======== NAV ======== */
.site-nav {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem;
  background: rgba(0,0,0,0.7);
  border-bottom: 1px solid rgba(200,17,42,0.25);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.site-nav::-webkit-scrollbar { display: none; }

.site-nav a {
  flex: 0 0 auto;
  color: var(--fg);
  text-decoration: none;
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: clamp(0.85rem, 1.6vw, 0.95rem);
  letter-spacing: 0.03em;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.active {
  color: #fff;
  border-color: var(--accent);
  background: rgba(200,17,42,0.18);
  text-shadow: var(--glow);
  outline: none;
}

/* ======== MAIN ======== */
main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.5rem) clamp(0.75rem, 2vw, 1.5rem) clamp(3rem, 6vw, 5rem);
}

.page-title, .section-title {
  text-align: center;
  font-family: "Creepster", "Chiller", "Georgia", serif;
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 0 10px rgba(200,17,42,0.6);
  margin: 0;
}
.page-title { font-size: clamp(1.8rem, 5vw, 3rem); margin: 0.5rem 0 1rem; }
.section-title {
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  margin: clamp(2rem, 5vw, 3rem) 0 1rem;
  padding-top: clamp(1rem, 3vw, 1.75rem);
  border-top: 1px dashed rgba(200,17,42,0.4);
}

/* hero */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2.5rem) 0;
}
.hero-art {
  max-width: min(90%, 640px);
  border: 1px solid rgba(200,17,42,0.4);
  border-radius: var(--radius);
  box-shadow: var(--glow);
}
.hero p {
  font-size: clamp(0.95rem, 1.7vw, 1.1rem);
  color: var(--muted);
  max-width: 60ch;
  margin: 0 auto;
}

/* ======== GALLERY (responsive masonry) ======== */
.gallery {
  column-count: 3;
  column-gap: clamp(0.5rem, 1.5vw, 1rem);
  margin-top: 1rem;
}
@media (max-width: 1024px) { .gallery { column-count: 2; } }
@media (max-width: 560px)  { .gallery { column-count: 1; } }

.card {
  break-inside: avoid;
  margin: 0 0 clamp(0.5rem, 1.5vw, 1rem);
  background: var(--bg-2);
  border: 1px solid rgba(200,17,42,0.22);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
@media (hover: hover) {
  .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(200,17,42,0.4);
    border-color: var(--accent);
  }
}
.card .cap {
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  font-style: italic;
  line-height: 1.4;
}

/* ======== FILTERS ======== */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin: 1rem 0 1.5rem;
}
.filters button {
  background: var(--bg-2);
  color: var(--fg);
  border: 1px solid rgba(200,17,42,0.5);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}
.filters button:hover { background: rgba(200,17,42,0.2); }
.filters button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: var(--glow);
}

/* ======== ARTICLES (info page) ======== */
.article {
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(200,17,42,0.25);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.5vw, 1.75rem);
  margin: clamp(1.25rem, 3vw, 2rem) 0;
}
.article h3 {
  text-align: center;
  font-family: "Creepster", "Chiller", "Georgia", serif;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  font-weight: normal;
  color: #fff;
  text-shadow: 0 0 10px rgba(200,17,42,0.65);
  margin: 0 0 1rem;
}
.article p {
  color: #d6d6dd;
  max-width: 72ch;
  margin: 0.75rem auto;
  hyphens: auto;
}
.article img {
  margin: 1rem auto;
  border: 1px solid rgba(200,17,42,0.3);
  border-radius: 6px;
  max-width: min(100%, 600px);
}
.article .cap {
  text-align: center;
  color: var(--muted);
  font-style: italic;
  margin: -0.25rem 0 1rem;
  font-size: 0.9rem;
}

/* ======== AUDIO TOGGLE ======== */
.audio-toggle {
  position: fixed;
  bottom: clamp(0.75rem, 2vw, 1.25rem);
  right: clamp(0.75rem, 2vw, 1.25rem);
  z-index: 100;
  background: var(--bg-2);
  border: 1px solid var(--accent);
  color: var(--fg);
  width: clamp(48px, 6vw, 56px);
  aspect-ratio: 1;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.6), var(--glow);
  transition: transform 0.2s ease;
}
.audio-toggle:hover { transform: scale(1.08); }
.audio-toggle .label {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: rgba(0,0,0,0.9);
  color: var(--fg);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.audio-toggle:hover .label { opacity: 1; }
@media (hover: none) { .audio-toggle .label { display: none; } }

/* ======== LIGHTBOX ======== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.93);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: clamp(1rem, 3vw, 2rem);
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img, .lightbox video {
  max-width: 95vw;
  max-height: 85vh;
  border: 2px solid var(--accent);
  border-radius: 6px;
  box-shadow: 0 0 40px rgba(200,17,42,0.6);
}
.lightbox .lb-cap {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--fg);
  background: rgba(0,0,0,0.75);
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  font-style: italic;
  max-width: 90vw;
  text-align: center;
  font-size: 0.9rem;
}
.lightbox .lb-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  color: #fff;
  font-size: 2.25rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  padding: 0.25rem 0.5rem;
}

/* ======== FOOTER ======== */
.site-footer {
  text-align: center;
  padding: clamp(1.5rem, 3vw, 2.5rem) 1rem;
  color: var(--muted);
  border-top: 1px solid rgba(200,17,42,0.3);
  font-size: 0.9rem;
}

/* ======== LINK LIST ======== */
.linklist {
  list-style: none;
  padding: 0;
  max-width: 600px;
  margin: 1.5rem auto;
}
.linklist li { margin: 0.5rem 0; }
.linklist a {
  display: block;
  padding: 0.75rem 1rem;
  background: var(--bg-2);
  border: 1px solid rgba(200,17,42,0.3);
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}
.linklist a:hover {
  border-color: var(--accent);
  background: rgba(200,17,42,0.15);
  text-shadow: var(--glow);
}

/* ======== A11Y ======== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.audio-toggle:focus-visible { transform: scale(1.08); }

@media (prefers-reduced-motion: reduce) {
  .site-title { animation: none; }
  .orb-layer, .ship-layer { display: none; }
  * { transition: none !important; animation: none !important; }
}

@media print {
  .audio-toggle, .orb-layer, .ship-layer, audio, .site-nav, .site-footer { display: none !important; }
  body { background: #fff; color: #000; }
}
