/* ===== CSS RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --red:       #e5162a;
  --red-dark:  #b00f20;
  --red-glow:  rgba(229, 22, 42, 0.35);
  --bg:        #080808;
  --bg-card:   rgba(255,255,255,0.03);
  --text:      #f0ece6;
  --muted:     rgba(240,236,230,0.45);
  --border:    rgba(255,255,255,0.07);

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== LOADER ===== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #040404;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader__reel {
  display: flex;
  gap: 10px;
  align-items: center;
}

.loader__reel span {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1s ease-in-out infinite;
}

.loader__reel span:nth-child(2) { animation-delay: 0.18s; }
.loader__reel span:nth-child(3) { animation-delay: 0.36s; }

@keyframes pulse {
  0%, 100% { transform: scale(0.6); opacity: 0.3; }
  50%       { transform: scale(1);   opacity: 1;   }
}

/* ===== CINEMATIC BACKGROUND ===== */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Deep vignette */
.bg__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 80% at 50% 50%,
    transparent 30%,
    rgba(0,0,0,0.75) 100%
  );
}

/* Subtle horizontal scan-line texture */
.bg__scan {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.04) 3px,
    rgba(0,0,0,0.04) 4px
  );
  opacity: 0.6;
}

/* Dramatic spotlights */
.bg__spotlight {
  position: absolute;
  width: 55vw;
  height: 100vh;
  top: 0;
  opacity: 0.13;
}

.bg__spotlight--left {
  left: -10vw;
  background: radial-gradient(
    ellipse 60% 80% at 20% 60%,
    var(--red) 0%,
    transparent 70%
  );
  animation: breathe 7s ease-in-out infinite alternate;
}

.bg__spotlight--right {
  right: -10vw;
  background: radial-gradient(
    ellipse 60% 80% at 80% 40%,
    var(--red) 0%,
    transparent 70%
  );
  animation: breathe 9s ease-in-out infinite alternate-reverse;
}

@keyframes breathe {
  from { opacity: 0.08; }
  to   { opacity: 0.18; }
}

/* Film grain */
.bg__film-grain {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
  background-repeat: repeat;
  animation: grain 0.4s steps(2) infinite;
  opacity: 0.55;
}

@keyframes grain {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-2%, 1%); }
  50%  { transform: translate(1%, -2%); }
  75%  { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, -1%); }
}

/* ===== FILM STRIP EDGES ===== */
.filmstrip {
  position: fixed;
  top: 0;
  bottom: 0;
  width: 28px;
  z-index: 1;
  display: flex;
  align-items: stretch;
  opacity: 0.18;
}

.filmstrip--left  { left: 0; }
.filmstrip--right { right: 0; }

.filmstrip__track {
  width: 100%;
  border-right:  1px solid rgba(255,255,255,0.12);
  border-left:   1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  padding: 12px 0;
  gap: 0;
}

.filmstrip--right .filmstrip__track {
  border-left:  1px solid rgba(255,255,255,0.12);
  border-right: 1px solid rgba(255,255,255,0.12);
}

.filmstrip__hole {
  width: 14px;
  height: 10px;
  border-radius: 3px;
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.18);
  flex-shrink: 0;
}

/* ===== HERO LAYOUT ===== */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  max-width: 560px;
  width: 100%;
}

/* ===== REVEAL ANIMATIONS ===== */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

[data-reveal].visible {
  opacity: 1;
  transform: translateY(0);
}

/* stagger delays driven by data-reveal value */
[data-reveal="0"] { transition-delay: 0.05s; }
[data-reveal="1"] { transition-delay: 0.15s; }
[data-reveal="2"] { transition-delay: 0.28s; }
[data-reveal="3"] { transition-delay: 0.38s; }
[data-reveal="4"] { transition-delay: 0.52s; }

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg-card);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
  backdrop-filter: blur(6px);
}

.badge__dot {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 8px var(--red);
  animation: blink 2.4s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ===== TITLE ===== */
.title {
  font-family: var(--font-display);
  font-size: clamp(5.5rem, 20vw, 10rem);
  line-height: 0.9;
  letter-spacing: 0.04em;
  color: var(--text);
  text-shadow:
    0 0 60px var(--red-glow),
    0 0 120px rgba(229,22,42,0.15);
  margin-bottom: 20px;
  user-select: none;
}

/* ===== DIVIDER ===== */
.divider {
  width: 48px;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--red-glow);
  margin: 0 auto 22px;
  transition-property: opacity, transform, width;
}

.divider.visible {
  width: 48px;
}

/* ===== SUBTITLE ===== */
.subtitle {
  font-size: clamp(0.85rem, 2.4vw, 1.05rem);
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.02em;
  line-height: 1.6;
  max-width: 340px;
  margin-bottom: 48px;
}

/* ===== CTA WRAP ===== */
.cta-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

/* ===== DOWNLOAD BUTTON ===== */
.btn-download {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 40px 17px 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  overflow: hidden;
  cursor: pointer;
  box-shadow:
    0 0 0 1px rgba(229,22,42,0.4),
    0 4px 24px rgba(229,22,42,0.4),
    0 12px 48px rgba(229,22,42,0.2);
  transition:
    transform 0.22s var(--ease-out),
    box-shadow 0.22s var(--ease-out),
    filter 0.22s;
}

.btn-download:hover {
  transform: translateY(-3px) scale(1.025);
  box-shadow:
    0 0 0 1px rgba(229,22,42,0.6),
    0 8px 32px rgba(229,22,42,0.55),
    0 20px 60px rgba(229,22,42,0.28);
  filter: brightness(1.1);
}

.btn-download:active {
  transform: translateY(0) scale(0.98);
  filter: brightness(0.95);
}

/* Shimmer sweep */
.btn-download__shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255,255,255,0.18) 50%,
    transparent 65%
  );
  transform: translateX(-100%);
  transition: transform 0s;
}

.btn-download:hover .btn-download__shimmer {
  transform: translateX(100%);
  transition: transform 0.55s ease;
}

.btn-download__icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.btn-download__icon svg {
  transition: transform 0.25s var(--ease-out);
}

.btn-download:hover .btn-download__icon svg {
  transform: translateY(2px);
}

.btn-download__label {
  position: relative;
  z-index: 1;
}

/* ===== APK SIZE TEXT ===== */
.apk-size {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .filmstrip { display: none; }

  .hero {
    padding: 32px 20px;
  }

  .btn-download {
    padding: 15px 30px 15px 24px;
    font-size: 0.9rem;
  }
}

@media (min-width: 900px) {
  .filmstrip { opacity: 0.22; }
}
