/* ==========================================================================
   Bite By Night — Official Site Styles
   ========================================================================== */

:root {
  --bg-void: #0a0708;
  --bg-panel: #130f10;
  --bg-panel-alt: #1a1416;
  --bg-card: #1c1517;
  --border-dim: #2c2224;

  --blood: #b0141f;
  --blood-bright: #e51b28;
  --amber: #e8a33d;
  --amber-dim: #a8762a;

  --text-main: #ece7e4;
  --text-dim: #a89e9b;
  --text-faint: #6f6462;

  --font-display: 'Creepster', cursive;
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Inter', sans-serif;

  --container: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-void);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

h1, h2, h3, h4 { font-family: var(--font-heading); letter-spacing: 0.02em; }

::selection { background: var(--blood); color: #fff; }

/* Subtle film-grain / vignette overlay across whole page */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.9em 1.8em;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--blood-bright), var(--blood) 70%);
  color: #fff;
  box-shadow: 0 6px 20px -4px rgba(176, 20, 31, 0.55);
}
.btn-primary:hover { box-shadow: 0 10px 26px -4px rgba(229, 27, 40, 0.7); }

.btn-ghost {
  background: rgba(255,255,255,0.03);
  color: var(--text-main);
  border-color: var(--border-dim);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

.btn-small { padding: 0.55em 1.3em; font-size: 0.8rem; }

.btn-icon { font-size: 0.75em; }

/* ============ Header ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: linear-gradient(to bottom, rgba(6,4,5,0.9), rgba(6,4,5,0));
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}
.site-header.scrolled {
  background: rgba(10, 7, 8, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 24px rgba(0,0,0,0.5);
  border-bottom: 1px solid var(--border-dim);
}

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}
.brand-icon {
  width: 34px; height: 34px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-dim);
}
.brand-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  color: var(--text-main);
  white-space: nowrap;
}
.brand-accent { color: var(--blood-bright); }

.main-nav {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}
.main-nav a {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.2s ease;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--blood-bright);
  transition: width 0.25s ease;
}
.main-nav a:hover { color: var(--text-main); }
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 1rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px; height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-main);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.05);
}
.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(10,7,8,0.35) 0%, rgba(10,7,8,0.88) 78%),
    linear-gradient(to bottom, rgba(10,7,8,0.55) 0%, rgba(10,7,8,0.35) 30%, rgba(10,7,8,0.75) 75%, var(--bg-void) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding: 0 1.5rem;
}
.hero-eyebrow {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  color: var(--amber);
  margin-bottom: 1.1rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 1;
  color: var(--blood-bright);
  text-shadow:
    0 0 12px rgba(229, 27, 40, 0.55),
    0 0 40px rgba(229, 27, 40, 0.35),
    0 4px 0 rgba(0,0,0,0.6);
  letter-spacing: 0.02em;
  margin-bottom: 1.2rem;
}
.hero-tagline {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  color: var(--text-main);
  font-weight: 500;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.hero-note {
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--text-dim);
  border-radius: 20px;
  z-index: 2;
}
.scroll-cue span {
  position: absolute;
  top: 6px; left: 50%;
  width: 4px; height: 8px;
  background: var(--amber);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollCue 1.8s ease infinite;
}
@keyframes scrollCue {
  0% { opacity: 1; top: 6px; }
  70% { opacity: 0; top: 20px; }
  100% { opacity: 0; top: 20px; }
}

/* ============ Stat Strip ============ */
.stat-strip {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--container);
  margin: -64px auto 0;
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.7);
}
.stat-item {
  text-align: center;
  padding: 1.8rem 1rem;
  border-right: 1px solid var(--border-dim);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--amber);
}
.stat-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.35rem;
}

/* ============ Sections (generic) ============ */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 7rem 1.5rem 2rem;
}
.section-eyebrow {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.76rem;
  color: var(--blood-bright);
  margin-bottom: 0.7rem;
}
.section-title {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  color: var(--text-main);
  margin-bottom: 1.1rem;
}
.section-lede {
  color: var(--text-dim);
  max-width: 640px;
  font-size: 1.02rem;
}
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ============ Story ============ */
.section-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3.5rem;
  align-items: center;
}
.section-copy p {
  color: var(--text-dim);
  margin-bottom: 1.1rem;
}
.section-copy p:last-child { margin-bottom: 0; }
.section-media img {
  border-radius: 12px;
  border: 1px solid var(--border-dim);
  box-shadow: 0 25px 60px -20px rgba(0,0,0,0.8);
}

/* ============ Gameplay Loop ============ */
.gameplay-section .section-lede { margin-bottom: 3rem; }
.loop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
}
.loop-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  padding: 1.8rem 1.5rem;
  position: relative;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.loop-card:hover {
  border-color: var(--blood);
  transform: translateY(-4px);
}
.loop-index {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  color: var(--amber-dim);
  display: block;
  margin-bottom: 0.6rem;
}
.loop-card h3 { font-size: 1.05rem; margin-bottom: 0.6rem; color: var(--text-main); }
.loop-card p { color: var(--text-dim); font-size: 0.92rem; }

/* ============ Killers ============ */
.killers-section .section-lede,
.survivors-section .section-lede { margin-left: auto; margin-right: auto; margin-bottom: 3rem; }

.killer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.killer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dim);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.killer-card:hover {
  transform: translateY(-6px);
  border-color: var(--blood);
  box-shadow: 0 20px 40px -18px rgba(176,20,31,0.45);
}
.killer-media {
  aspect-ratio: 4/3;
  background: #05070a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.killer-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.killer-card:hover .killer-media img { transform: scale(1.06); }

.killer-media--locked {
  background: linear-gradient(135deg, #17181c, #0d0e10);
}
.lock-icon { font-size: 2.6rem; opacity: 0.5; filter: grayscale(1); }

.killer-body { padding: 1.4rem 1.4rem 1.6rem; }
.killer-body h3 { font-size: 1.2rem; color: var(--text-main); margin-bottom: 0.2rem; }
.killer-body .killer-subtitle {
  font-size: 0.78rem;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
}
.killer-body p { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 0.9rem; }
.ability-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-family: var(--font-heading);
  letter-spacing: 0.03em;
  color: var(--text-main);
  background: rgba(176,20,31,0.15);
  border: 1px solid rgba(176,20,31,0.4);
  border-radius: 20px;
  padding: 0.3em 0.8em;
  margin: 0 0.4em 0.4em 0;
}
.killer-card--locked { opacity: 0.75; }
.killer-card--locked:hover { border-color: var(--border-dim); box-shadow: none; transform: none; }

/* ============ Survivor Classes ============ */
.class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.4rem;
}
.class-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  padding: 2rem 1.6rem;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.class-card:hover { border-color: var(--amber); transform: translateY(-4px); }
.class-icon-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  margin: 0 auto 1.1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--bg-panel-alt), #0d0a0b);
  border: 1px solid var(--border-dim);
}
.class-icon-badge img { width: 44px; height: 44px; object-fit: contain; }
.class-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.class-card .class-tag {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--amber);
  margin-bottom: 0.8rem;
}
.class-card p { color: var(--text-dim); font-size: 0.88rem; }

/* ============ Gallery ============ */
.gallery-section { text-align: center; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 190px;
  gap: 0.9rem;
  margin-top: 2.5rem;
  text-align: left;
}
.gallery-item {
  position: relative;
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
  background: #000;
  padding: 0;
}
.gallery-item--wide { grid-column: span 2; }
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.08); filter: brightness(1.1); }
.gallery-item::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.35), transparent 40%);
  pointer-events: none;
}

/* ============ Team ============ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.team-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  padding: 2rem 1.6rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.team-card:hover { transform: translateY(-4px); border-color: var(--blood); }
.team-avatar {
  width: 68px; height: 68px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--avatar-a, var(--blood)), var(--avatar-b, var(--bg-void)));
  box-shadow: 0 8px 20px -6px rgba(0,0,0,0.6);
}
.team-card h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.team-role {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--amber);
}
.team-grid--pair {
  grid-template-columns: repeat(2, minmax(200px, 260px));
  justify-content: center;
}
.team-note {
  text-align: center;
  color: var(--text-dim);
  max-width: 640px;
  margin: 2.5rem auto 0;
  font-size: 0.9rem;
}

/* ============ Community ============ */
.community-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.4rem;
  margin-top: 2.5rem;
}
.community-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  padding: 2rem 1.4rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.community-card:hover {
  transform: translateY(-4px);
  border-color: var(--blood-bright);
  background: var(--bg-panel-alt);
}
.community-icon { font-size: 1.8rem; display: block; margin-bottom: 0.9rem; }
.community-card h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.community-card p { color: var(--text-dim); font-size: 0.85rem; }

/* ============ Lightbox ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(6,4,5,0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
}
.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-dim);
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { border-color: var(--blood-bright); color: var(--blood-bright); }

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid var(--border-dim);
  background: var(--bg-panel);
  margin-top: 6rem;
}
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2.5rem;
}
.footer-brand p { color: var(--text-faint); font-size: 0.85rem; margin-top: 0.5rem; }
.footer-links {
  display: flex;
  gap: 3.5rem;
  flex-wrap: wrap;
}
.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 0.9rem;
}
.footer-col a {
  display: block;
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--amber); }

.footer-bottom {
  border-top: 1px solid var(--border-dim);
  padding: 1.5rem;
  text-align: center;
}
.footer-bottom p { color: var(--text-faint); font-size: 0.8rem; }
.footer-disclaimer { max-width: 640px; margin: 0.5rem auto 0; line-height: 1.5; }

/* ============ Responsive ============ */
@media (max-width: 980px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }

  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(10,7,8,0.97);
    backdrop-filter: blur(10px);
    padding: 1.2rem 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border-dim);
  }

  .section-grid { grid-template-columns: 1fr; }
  .loop-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item--wide { grid-column: span 2; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
}

@media (max-width: 560px) {
  .header-actions .btn-small { display: none; }
  .loop-grid { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .gallery-item--wide { grid-column: span 1; }
  .stat-strip { grid-template-columns: 1fr; margin-left: 1rem; margin-right: 1rem; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border-dim); }
  .stat-item:last-child { border-bottom: none; }
  .footer-inner { flex-direction: column; }
}
