/* ===== Variables & Base ===== */
:root {
  --bg: #000; /* 90% dark base */
  --fg: #e6e6e6; /* primary text */
  --line: rgba(255, 255, 255, 0.08);
  --neon: #ff3131; /* ~10% accent */
  --divider-gradient: linear-gradient(90deg, transparent, rgba(255, 49, 49, 0.28), transparent);
  --header-h: 64px; /* used for anchor scroll offsets */
}

/* Typed custom property so we can smoothly animate the gradient stop alpha */
@property --divider-alpha {
  syntax: "<number>";
  inherits: false;
  initial-value: 0.28;
}
* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Inter,
    Helvetica,
    Arial,
    sans-serif;
  letter-spacing: 0.01em;
}
::selection {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
/* subtle scanlines */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.45),
    rgba(255, 255, 255, 0.45) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* Reveal-on-scroll base animation */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
  will-change: opacity, transform;
}
.reveal.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Header ===== */
/* Hidden until the user has scrolled past enough of the hero to need navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10;
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(6px);
  border: none;
  border-image: none;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition:
    opacity 240ms ease,
    transform 240ms ease,
    background 240ms ease,
    backdrop-filter 240ms ease;
}
.header--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .header {
    transition: none;
  }
}
/* Ensure in-page anchors aren’t hidden under the fixed header */
#story,
#gallery,
#cinematics {
  scroll-margin-top: var(--header-h);
}
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  font-family:
    "Roboto",
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Inter,
    Helvetica,
    Arial,
    sans-serif;
  font-weight: 700; /* Roboto Bold */
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
  display: inline-block;
  padding: 16px 0;
  text-shadow: 0 0 10px rgba(255, 49, 49, 0.6);
}
.brand em {
  color: var(--neon);
  font-style: normal;
}
.nav {
  display: none;
  gap: 24px;
  align-items: center;
}
.nav a {
  color: #cfcfcf;
  text-decoration: none;
  font-size: 14px;
  opacity: 0.85;
}
.nav a:hover {
  opacity: 1;
}
@media (min-width: 640px) {
  .nav {
    display: flex;
  }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh; /* fill the first screen */
  display: grid;
  align-items: center;
}
.hero-video {
  position: absolute;
  top: -6%;
  left: 0;
  right: 0;
  width: 100%;
  height: 112%; /* oversized so parallax drift never reveals an edge */
  object-fit: cover;
  z-index: -1;
  filter: saturate(1.05) contrast(1.02) brightness(0.9);
  opacity: 0.1;
  will-change: transform;
}
.hero .glow {
  position: absolute;
  top: -160px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 360px;
  filter: blur(48px);
  background: radial-gradient(450px 180px at 50% 50%, rgba(255, 49, 49, 0.12), transparent 70%);
  pointer-events: none;
}
/* Soft light that tracks the cursor over the hero, echoing a flashlight beam */
.hero .cursor-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 420px;
  height: 420px;
  margin: -210px 0 0 -210px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 49, 49, 0.16),
    rgba(255, 49, 49, 0.05) 40%,
    transparent 70%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 260ms ease;
  will-change: transform;
}
.hero .cursor-glow.is-active {
  opacity: 1;
}
@media (hover: none) {
  .hero .cursor-glow {
    display: none;
  }
}
.hero .inner {
  text-align: center;
  padding: 52px 0 0px;
  will-change: transform;
}
h1.title {
  margin: 0;
  font-size: clamp(42px, 6vw, 72px);
  font-family:
    "Roboto",
    ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Inter,
    Helvetica,
    Arial,
    sans-serif;
  font-weight: 700; /* Roboto Bold */
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow:
    0 0 14px rgba(255, 49, 49, 0.5),
    0 0 28px rgba(255, 49, 49, 0.18);
  animation: titleFlicker 0.2s ease-in-out infinite;
  will-change: text-shadow, opacity;
}

/* Random-like flicker for the title glow */
@keyframes titleFlicker {
  0% {
    opacity: 0.98;
    text-shadow:
      0 0 12px rgba(255, 49, 49, 0.3),
      0 0 24px rgba(255, 49, 49, 0.12);
  }
  12% {
    opacity: 1;
    text-shadow:
      0 0 16px rgba(255, 49, 49, 0.36),
      0 0 28px rgba(255, 49, 49, 0.16);
  }
  25% {
    opacity: 0.94;
    text-shadow:
      0 0 11px rgba(255, 49, 49, 0.26),
      0 0 22px rgba(255, 49, 49, 0.1);
  }
  40% {
    opacity: 0.99;
    text-shadow:
      0 0 18px rgba(255, 49, 49, 0.42),
      0 0 32px rgba(255, 49, 49, 0.2);
  }
  55% {
    opacity: 0.85;
    text-shadow:
      0 0 10px rgba(255, 49, 49, 0.22),
      0 0 18px rgba(255, 49, 49, 0.08);
  }
  70% {
    opacity: 0.97;
    text-shadow:
      0 0 15px rgba(255, 49, 49, 0.34),
      0 0 28px rgba(255, 49, 49, 0.16);
  }
  85% {
    opacity: 0.91;
    text-shadow:
      0 0 12px rgba(255, 49, 49, 0.28),
      0 0 22px rgba(255, 49, 49, 0.12);
  }
  100% {
    opacity: 0.96;
    text-shadow:
      0 0 13px rgba(255, 49, 49, 0.3),
      0 0 24px rgba(255, 49, 49, 0.12);
  }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .hero .glow,
  h1.title {
    animation: none !important;
  }
}
.subtitle {
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: 12px;
  color: #c9c9c9;
}
.hr {
  width: min(520px, 90%);
  height: 1px;
  margin: 24px auto;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}
.lead {
  max-width: 880px;
  margin: 0 auto;
  line-height: 1.7;
  color: #d0d0d0;
  font-size: 16px;
}
.cta-row {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.btn {
  border: 3px solid transparent;
  border-image: var(--divider-gradient) 1;
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

/* ===== Dividers & Sections ===== */
.divider {
  height: 3px;
  margin: 64px auto;
  width: calc(100% - 48px);
  max-width: 1180px;
  /* Animate the middle neon stop's alpha for a true gradient pulse */
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 49, 49, var(--divider-alpha)),
    transparent
  );
  animation: dividerPulse 5.6s ease-in-out infinite;
}

@keyframes dividerPulse {
  0% {
    --divider-alpha: 0.12;
  }
  50% {
    --divider-alpha: 0.52;
  }
  100% {
    --divider-alpha: 0.12;
  }
}
.section {
  padding: 0 0 8px;
}
/* ===== Stories (side-by-side cards) ===== */
.stories {
  display: grid;
  gap: 32px; /* increased spacing between cards */
  padding: 24px 24px;
  max-width: 1180px;
  margin: 0 auto;
}
.story-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}
.story-card .copy {
  padding: 18px;
}
.story-card .copy h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  text-shadow: 0 0 10px rgba(255, 49, 49, 0.14);
}
.story-card .copy p {
  margin: 0;
  color: #aeb2b7;
  font-size: 14px;
  line-height: 1.7;
}
.story-card .media {
  position: relative;
  perspective: 900px;
}
.story-card .media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 16/9;
  transition: transform 220ms ease;
  transform-style: preserve-3d;
}
@media (prefers-reduced-motion: reduce) {
  .story-card .media img {
    transition: none;
  }
}
/* Two-column layout on wider screens */
@media (min-width: 820px) {
  .story-card {
    grid-template-columns: 1fr 1.1fr; /* text | image */
    align-items: stretch;
  }
  .story-card.reverse {
    grid-template-columns: 1.1fr 1fr; /* image | text when reversed visually */
  }
  .story-card:not(.reverse) .copy {
    order: 0;
  }
  .story-card:not(.reverse) .media {
    order: 1;
  }
  .story-card.reverse .media {
    order: 0;
  }
  .story-card.reverse .copy {
    order: 1;
  }
  .story-card .copy {
    padding: 28px;
  }
}

/* ===== Gallery (2-up) ===== */
.gallery {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 24px 96px;
}
.slideshows {
  display: grid;
  gap: 24px;
}
.slideshow {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
}
.slideshow .slides {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  transition: transform 380ms ease;
}
.slideshow .tile {
  margin: 0; /* reset figure default margins */
}
.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.slide-btn.prev {
  left: 10px;
}
.slide-btn.next {
  right: 10px;
}
.gallery h2 {
  font-size: 24px;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.92);
}
.gallery .meta {
  margin: 6px 0 16px;
  color: #9aa0a6;
  font-size: 14px;
}

/* Exactly two items per row on tablets/desktops; one on small screens */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 720px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tile {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: none;
  background: rgba(255, 255, 255, 0.02);
}
/* Make images big and consistent via aspect-ratio; scales with column width */
.tile img,
.tile video {
  width: 100%;
  aspect-ratio: 16/10;
  height: auto;
  object-fit: cover;
  display: block;
  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}
.tile .overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  pointer-events: none; /* let clicks reach the tile's link/video underneath */
  transition:
    background 0.3s ease,
    opacity 0.3s ease;
}
.tile .badge {
  display: inline-block;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  border-radius: 12px;
  color: #fff;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 24px rgba(255, 49, 49, 0.2);
}
.tile:hover img,
.tile:focus-within img {
  transform: scale(1.05);
  filter: blur(2px) saturate(1.05);
}
.tile:hover .overlay,
.tile:focus-within .overlay {
  opacity: 1;
  background: rgba(0, 0, 0, 0.4);
}
/* keyboard focus */
.tile a {
  position: absolute;
  inset: 0;
  z-index: 1;
  outline: none;
}
.tile a:focus-visible ~ .overlay,
.tile a:focus-visible + .overlay {
  opacity: 1;
  background: rgba(0, 0, 0, 0.4);
}

/* Video tiles (Cinematics): play icon doubles as a hover/is-playing indicator */
.video-tile {
  cursor: pointer;
}
.video-tile::after {
  content: "▶";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 49, 49, 0.25);
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.video-tile.is-playing::after {
  opacity: 0;
}
.video-tile:hover video,
.video-tile.is-playing video {
  transform: scale(1.05);
}
.video-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0%;
  background: var(--neon);
  box-shadow: 0 0 8px rgba(255, 49, 49, 0.6);
  z-index: 2;
}

/* ===== Screenshot Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 60px rgba(255, 49, 49, 0.15);
}
.lightbox-close,
.lightbox-nav {
  position: fixed;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 18px;
}
.lightbox-close {
  top: 24px;
  right: 24px;
}
.lightbox-nav.prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-nav.next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

/* ===== AI Disclaimer ===== */
.ai-disclaimer {
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.ai-disclaimer .container {
  padding: 20px 24px;
}
.ai-disclaimer p {
  margin: 0;
  max-width: 880px;
  color: #9aa0a6;
  font-size: 12px;
  line-height: 1.7;
}
.ai-disclaimer strong {
  color: #cfcfcf;
}

/* ===== Footer ===== */
footer {
  border: none;
  border-image: none;
  background: rgba(0, 0, 0, 0.6);
}
footer .wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  color: #8a8f96;
  font-size: 12px;
}

/* ===== Back to Top Button ===== */
.back-to-top {
  position: fixed;
  right: 52px;
  bottom: 52px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 24px rgba(255, 49, 49, 0.38);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 200ms ease,
    transform 200ms ease,
    background 200ms ease;
  z-index: 20;
}
.back-to-top:hover {
  background: rgba(0, 0, 0, 0.6);
}
.back-to-top--visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top {
    transition: none;
  }
}

/* ===== Section Navigation Dots ===== */
.section-dots {
  position: fixed;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 15;
}
.section-dots a {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  text-decoration: none;
  transition:
    background 200ms ease,
    transform 200ms ease,
    box-shadow 200ms ease;
}
.section-dots a.is-active {
  background: var(--neon);
  box-shadow: 0 0 10px rgba(255, 49, 49, 0.7);
  transform: scale(1.3);
}
@media (max-width: 900px) {
  .section-dots {
    display: none;
  }
}

/* ===== Ambient Snow ===== */
.snow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  opacity: 0.5;
}

/* ===== Glitch Flicker ===== */
/* Rare, brief full-page interference flicker triggered at random intervals */
.glitch-overlay {
  position: fixed;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: overlay;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 49, 49, 0.06) 0px,
      rgba(255, 49, 49, 0.06) 1px,
      transparent 1px,
      transparent 3px
    ),
    rgba(0, 0, 0, 0.15);
}
.glitch-overlay.is-active {
  animation: glitchFlicker 220ms steps(2, end);
}
@keyframes glitchFlicker {
  0% {
    transform: translate(0, 0);
    opacity: 0.9;
  }
  20% {
    transform: translate(-6px, 2px);
    opacity: 0.6;
  }
  40% {
    transform: translate(5px, -2px);
    opacity: 0.85;
  }
  60% {
    transform: translate(-3px, 1px);
    opacity: 0.5;
  }
  80% {
    transform: translate(4px, -1px);
    opacity: 0.8;
  }
  100% {
    transform: translate(0, 0);
    opacity: 0;
  }
}

/* ===== Custom Cursor ===== */
/* Only on devices with a precise pointer that can actually hover */
@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none;
  }
  .custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255, 49, 49, 0.8);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    z-index: 9999;
    mix-blend-mode: difference;
    transition:
      width 150ms ease,
      height 150ms ease,
      background 150ms ease,
      opacity 150ms ease;
  }
  .custom-cursor::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3px;
    height: 3px;
    background: var(--neon);
    border-radius: 50%;
    transform: translate(-50%, -50%);
  }
  .custom-cursor.is-interactive {
    width: 34px;
    height: 34px;
    background: rgba(255, 49, 49, 0.12);
  }
}
