/* ============================================================
   Rey Player & Telegorda — Landing page custom styles
   Dark high-tech · Glassmorphism · Metallic gold accents
   ============================================================ */

:root {
  --gold-1: #f9d976;
  --gold-2: #f7b733;
  --gold-3: #d4af37;
  --gold-4: #b8860b;
}

html {
  scroll-behavior: smooth;
}

/* ---------- Zero horizontal scroll on every device ---------- */
html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  position: relative;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*,
*::before,
*::after {
  -webkit-tap-highlight-color: transparent;
}

.text-balance {
  text-wrap: balance;
}

/* ---------- Metallic gold gradient text (iOS-safe) ---------- */
.text-gold-gradient {
  background: linear-gradient(
    135deg,
    var(--gold-1) 0%,
    var(--gold-2) 22%,
    var(--gold-3) 48%,
    var(--gold-4) 70%,
    var(--gold-1) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gold-shimmer 6s linear infinite;
}

@keyframes gold-shimmer {
  to {
    background-position: 200% center;
  }
}

/* ---------- Glassmorphism base ----------
   -webkit- prefix declared FIRST so iOS Safari (which may ignore the
   unprefixed property) always gets the blur. Applied to every glass
   surface: header, language toggle, guide panel, app cards, hero badge. */
.glass {
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

/* Lightweight blur helper for smaller glass chips (e.g. the hero badge) */
.glass-soft {
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  backdrop-filter: blur(10px) saturate(160%);
}

/* ---------- Ambient background — Live Sports & Media Streaming ---------- */
.bg-decor {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(1200px 620px at 50% -12%, rgba(74, 222, 128, 0.12), transparent 60%),
    radial-gradient(1100px 560px at 50% -6%, rgba(212, 175, 55, 0.10), transparent 62%),
    radial-gradient(900px 500px at 100% 100%, rgba(74, 222, 128, 0.07), transparent 60%),
    #0f172a;
}

/* Stadium floodlight wash across the top (softness baked into the gradients) */
.stadium-glow {
  position: absolute;
  top: -260px;
  left: 50%;
  transform: translateX(-50%);
  width: 1300px;
  height: 620px;
  background:
    radial-gradient(closest-side, rgba(74, 222, 128, 0.14), transparent 78%),
    radial-gradient(closest-side, rgba(249, 217, 118, 0.14), transparent 78%);
  background-repeat: no-repeat;
  background-size: 66% 100%, 66% 100%;
  background-position: 20% 0, 80% 0;
  opacity: 0.9;
}

/* Two angled floodlight beams */
.light-beam {
  position: absolute;
  top: -60px;
  width: 360px;
  height: 640px;
  -webkit-clip-path: polygon(40% 0, 60% 0, 100% 100%, 0% 100%);
  clip-path: polygon(40% 0, 60% 0, 100% 100%, 0% 100%);
  opacity: 0.6;
}

.light-beam--l {
  left: 10%;
  transform: rotate(13deg);
  background: linear-gradient(to bottom, rgba(74, 222, 128, 0.12), transparent 68%);
}

.light-beam--r {
  right: 10%;
  transform: rotate(-13deg);
  background: linear-gradient(to bottom, rgba(249, 217, 118, 0.12), transparent 68%);
}

/* Faint soccer pitch outline behind the content */
.pitch {
  position: absolute;
  top: 42%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1120px, 94%);
  height: auto;
  fill: none;
  stroke: rgba(74, 222, 128, 0.08);
  stroke-width: 1.5;
}

.pitch .pitch-dot {
  fill: rgba(74, 222, 128, 0.12);
  stroke: none;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* ---------- Residual cinema film strip (hybrid movie identity) ---------- */
.film-strip {
  position: absolute;
  left: -6%;
  width: 112%;
  height: 54px;
  background: rgba(255, 255, 255, 0.015);
  border-top: 1px solid rgba(212, 175, 55, 0.08);
  border-bottom: 1px solid rgba(212, 175, 55, 0.08);
  opacity: 0.5;
}

/* sprocket holes, top + bottom rows */
.film-strip::before,
.film-strip::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 9px;
  background: repeating-linear-gradient(
    to right,
    rgba(255, 255, 255, 0.07) 0 12px,
    transparent 12px 30px
  );
}

.film-strip::before {
  top: 7px;
}

.film-strip::after {
  bottom: 7px;
}

.film-strip--top {
  top: 128px;
  transform: rotate(-3deg);
}

/* ---------- Floating glyphs: live sports first, movies second ---------- */
.media-glyph {
  position: absolute;
  color: rgba(212, 175, 55, 0.06);
  filter: drop-shadow(0 0 24px rgba(212, 175, 55, 0.05));
  animation: glyph-float 22s ease-in-out infinite;
  will-change: transform;
}

/* sports glyphs get a faint neon-green tint to read as "live action" */
.media-glyph--1,
.media-glyph--2,
.media-glyph--3,
.media-glyph--5,
.media-glyph--6,
.media-glyph--8 {
  color: rgba(74, 222, 128, 0.07);
  filter: drop-shadow(0 0 24px rgba(74, 222, 128, 0.06));
}

.media-glyph--1 { top: 12%; left: 5%;  font-size: 88px;  animation-delay: 0s; }
.media-glyph--2 { top: 60%; left: 3%;  font-size: 120px; animation-delay: -4s; }
.media-glyph--3 { top: 22%; right: 7%; font-size: 78px;  animation-delay: -8s; }
.media-glyph--4 { bottom: 10%; right: 5%; font-size: 104px; animation-delay: -12s; }
.media-glyph--5 { top: 46%; left: 47%; font-size: 150px; animation-delay: -16s; }
.media-glyph--6 { bottom: 26%; left: 9%; font-size: 92px; animation-delay: -6s; }
.media-glyph--7 { top: 70%; right: 10%; font-size: 84px; animation-delay: -10s; }
.media-glyph--8 { top: 38%; right: 3%; font-size: 66px; animation-delay: -14s; }
.media-glyph--9 { top: 34%; left: 2%; font-size: 70px; animation-delay: -18s; }

@keyframes glyph-float {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(-6deg);
  }
  50% {
    transform: translate3d(0, -26px, 0) rotate(6deg);
  }
}

.orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(90px);
  opacity: 0.5;
  animation: float 16s ease-in-out infinite;
}

.orb--gold {
  width: 420px;
  height: 420px;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(212, 175, 55, 0.35);
}

.orb--green {
  width: 380px;
  height: 380px;
  bottom: 4%;
  left: -110px;
  background: rgba(74, 222, 128, 0.26);
  animation-delay: -5s;
}

.orb--emerald {
  width: 320px;
  height: 320px;
  bottom: 10%;
  right: -80px;
  background: rgba(16, 185, 129, 0.22);
  animation-delay: -9s;
}

@keyframes float {
  0%, 100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, 26px, 0) scale(1.06);
  }
}

.orb--gold {
  animation-name: float-center;
}

@keyframes float-center {
  0%, 100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  50% {
    transform: translateX(-50%) translateY(24px) scale(1.05);
  }
}

/* ---------- Sticky header ---------- */
.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(15, 23, 42, 0.82);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom-color: rgba(212, 175, 55, 0.18);
  box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.8);
}

/* ---------- Language toggle (top-right, high visibility) ---------- */
.lang-toggle {
  background: rgba(17, 28, 51, 0.75);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  backdrop-filter: blur(12px) saturate(160%);
  border: 1px solid rgba(212, 175, 55, 0.45);
  box-shadow:
    0 10px 30px -12px rgba(0, 0, 0, 0.7),
    0 0 22px -10px rgba(212, 175, 55, 0.55);
}

/* Language buttons — iOS/Android-compliant 44px touch targets */
.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  color: #cbd5e1;
  border: 1px solid transparent;
  touch-action: manipulation;
}

.lang-btn:not(.active) {
  border-color: rgba(255, 255, 255, 0.14);
}

.lang-btn:hover {
  color: #ffffff;
  border-color: rgba(212, 175, 55, 0.5);
}

.lang-btn.active {
  color: #0f172a;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
  border-color: transparent;
  box-shadow: 0 0 18px -4px rgba(212, 175, 55, 0.8);
}

.lang-btn:focus-visible {
  outline: 2px solid var(--gold-1);
  outline-offset: 2px;
}

/* ---------- Quick installation guide panel ---------- */
.guide-panel {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  padding: 2rem 1.75rem;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.02) 60%),
    rgba(17, 28, 51, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.28);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 24px 55px -30px rgba(0, 0, 0, 0.75),
    0 0 60px -24px rgba(212, 175, 55, 0.25);
}

.guide-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  font-size: 1.375rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.guide-steps {
  margin: 1.75rem auto 0;
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  list-style: none;
  padding: 0;
  counter-reset: guide;
}

.guide-step {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.guide-step:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

.guide-step__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 9999px;
  font-weight: 800;
  font-size: 0.9rem;
  color: #0f172a;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
  box-shadow: 0 0 16px -4px rgba(212, 175, 55, 0.7);
}

.guide-step__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
  font-size: 1.05rem;
  color: var(--gold-1);
  background: rgba(212, 175, 55, 0.10);
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.guide-step__text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.guide-step__text strong {
  color: var(--gold-soft);
  font-weight: 700;
}

.guide-conclusion {
  margin: 1.5rem auto 0;
  max-width: 40rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
}

@media (max-width: 480px) {
  .guide-step {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "num text"
      "icon text";
    row-gap: 0.4rem;
  }
  .guide-step__num { grid-area: num; }
  .guide-step__icon { grid-area: icon; }
  .guide-step__text { grid-area: text; }
}

/* ---------- App cards ---------- */
.app-version {
  min-height: 1.25rem;
  margin-top: 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.app-card {
  position: relative;
  border-radius: 1.5rem;
  padding: 2rem 1.75rem;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 55%),
    rgba(17, 28, 51, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.10);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 45px -25px rgba(0, 0, 0, 0.7);
  transition:
    transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

.app-card:hover {
  transform: translateY(-8px) scale(1.015);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 50px -12px rgba(212, 175, 55, 0.35);
}

/* Stadium-lighting accent glows behind each card (always faintly lit) */
.app-card--sport {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 45px -25px rgba(0, 0, 0, 0.7),
    0 0 60px -22px rgba(74, 222, 128, 0.45);
}

.app-card--sport:hover {
  border-color: rgba(74, 222, 128, 0.5);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 70px -10px rgba(74, 222, 128, 0.5);
}

.app-card--media {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 20px 45px -25px rgba(0, 0, 0, 0.7),
    0 0 60px -22px rgba(249, 217, 118, 0.45);
}

.app-card--media:hover {
  border-color: rgba(249, 217, 118, 0.55);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 70px -10px rgba(249, 217, 118, 0.5);
}

/* Rotating conic glow behind the card on hover */
.app-card__glow {
  position: absolute;
  inset: -40%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(212, 175, 55, 0.18) 60deg,
    transparent 140deg,
    transparent 360deg
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  animation: spin 8s linear infinite;
}

.app-card--sport .app-card__glow {
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(74, 222, 128, 0.20) 60deg,
    transparent 140deg,
    transparent 360deg
  );
}

.app-card:hover .app-card__glow {
  opacity: 1;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

.app-card > *:not(.app-card__glow) {
  position: relative;
  z-index: 1;
}

/* ---------- App logo ---------- */
.logo-wrap {
  position: relative;
  width: 112px;
  height: 112px;
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 34px -10px rgba(212, 175, 55, 0.55);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.group:hover .logo-wrap {
  transform: scale(1.08) rotate(-3deg);
}

/* real logo image (sized via Tailwind w-24 h-24 rounded-2xl) */
.app-logo {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.5));
}

/* fallback media icon — only visible when the logo image is missing */
.logo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--gold-1);
}

/* ---------- Buttons ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 48px; /* iOS/Android touch-target guideline */
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-decoration: none;
  touch-action: manipulation;
  transition:
    transform 0.25s ease,
    filter 0.25s ease,
    box-shadow 0.25s ease;
  will-change: transform;
}

.btn i {
  font-size: 1.05rem;
}

.btn:hover {
  transform: scale(1.035);
  filter: brightness(1.12);
}

.btn:active {
  transform: scale(0.99);
}

.btn--green {
  background: linear-gradient(135deg, #22c55e, #15803d);
}

.btn--green:hover {
  box-shadow: 0 0 30px -6px rgba(34, 197, 94, 0.6);
}

.btn--blue {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.btn--blue:hover {
  box-shadow: 0 0 30px -6px rgba(59, 130, 246, 0.6);
}

.btn--gray {
  background: linear-gradient(135deg, #64748b, #334155);
}

.btn--gray:hover {
  box-shadow: 0 0 30px -6px rgba(148, 163, 184, 0.5);
}

/* ---------- Reveal on load ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: reveal-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
