@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&family=Space+Grotesk:wght@600;700&family=Bebas+Neue&family=Rubik+Glitch&family=Bungee&family=Orbitron:wght@700&family=Press+Start+2P&family=Russo+One&family=Teko:wght@700&family=Black+Ops+One&family=Caveat:wght@700&family=Dancing+Script:wght@700&family=Pacifico&family=Permanent+Marker&family=Satisfy&family=Playfair+Display:ital,wght@1,700&family=Cinzel:wght@700&family=Righteous&family=Bangers&family=Fredoka:wght@700&family=Sacramento&display=swap');

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

:root {
  --color-electric-red: #FF4622;
  --color-neon-orange: #FF8A00;
  --color-twitch-purple: #9146FF;
  --color-tactical-blue: #4F46E5;
  --color-surface-dark: #050608;
  --color-surface-glass: rgba(17, 20, 23, 0.72);
  --color-surface-glass-hover: rgba(30, 33, 38, 0.8);
  --color-text-primary: #e1e2e7;
  --color-text-muted: rgba(255, 255, 255, 0.45);
  --color-text-faint: rgba(255, 255, 255, 0.25);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.15);
  --radius: 8px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

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

body {
  background: var(--color-surface-dark);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ========================================
   GATE POPUP OVERLAY
   ======================================== */

.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.gate-overlay.gate-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.gate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 3, 4, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.gate-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: linear-gradient(170deg, rgba(20, 22, 28, 0.95) 0%, rgba(10, 11, 15, 0.98) 100%);
  border: 1px solid rgba(255, 70, 34, 0.2);
  border-radius: 16px;
  padding: 36px 28px 32px;
  text-align: center;
  overflow: hidden;
  animation: gateSlideIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-shadow:
    0 0 60px rgba(255, 70, 34, 0.08),
    0 24px 80px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.gate-glow {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(255, 70, 34, 0.06) 0%, transparent 55%);
  pointer-events: none;
}

.gate-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-electric-red);
  background: rgba(255, 70, 34, 0.1);
  border: 1px solid rgba(255, 70, 34, 0.25);
  border-radius: 100px;
  padding: 6px 16px;
  margin-bottom: 24px;
  animation: pulseBadge 2.5s ease-in-out infinite;
}

.gate-image-wrapper {
  position: relative;
  margin: 0 auto 24px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.4);
}

.gate-image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-select: none;
}

.gate-image-border {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 70, 34, 0.15);
  pointer-events: none;
}

.gate-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 4.5vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
  margin-bottom: 10px;
  color: #fff;
}

.gate-highlight {
  color: var(--color-electric-red);
  text-shadow: 0 0 20px rgba(255, 70, 34, 0.4);
}

.gate-subtitle {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 28px;
}

.gate-accept-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 16px 32px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, #C4321A 0%, #FF4622 45%, #FF6B47 100%);
  box-shadow:
    0 0 30px rgba(255, 70, 34, 0.35),
    0 0 60px rgba(255, 70, 34, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  position: relative;
  overflow: hidden;
}

.gate-accept-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: shimmerSweep 3s ease-in-out infinite;
}

.gate-accept-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 45px rgba(255, 70, 34, 0.5),
    0 0 90px rgba(255, 70, 34, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  filter: brightness(1.1);
}

.gate-accept-btn:active {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    0 0 15px rgba(255, 70, 34, 0.3),
    0 0 30px rgba(255, 70, 34, 0.1);
}

.gate-accept-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ========================================
   SITE CONTENT (hidden behind gate)
   ======================================== */

.site-content {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease 0.2s;
}

.site-content.site-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ========================================
   BACKGROUND SYSTEM
   ======================================== */

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-color: var(--color-surface-dark);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: grayscale(30%);
  opacity: 0.35;
}

/* Mobile background (default / portrait) */
.bg-layer {
  background-image: url('images/bg-mobile.webp');
}

/* Desktop background (landscape) */
@media (min-width: 768px) {
  .bg-layer {
    background-image: url('images/bg-desktop.webp');
  }
}

/* Gradient overlay on top of background */
.bg-gradient-overlay {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: 
    linear-gradient(180deg, 
      rgba(5, 6, 8, 0.7) 0%, 
      rgba(5, 6, 8, 0.3) 30%, 
      rgba(5, 6, 8, 0.3) 60%, 
      rgba(5, 6, 8, 0.85) 100%
    ),
    radial-gradient(ellipse at 20% 20%, rgba(255, 70, 34, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(79, 70, 229, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

/* Subtle scan-lines for tactical feel */
.bg-scanlines {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
}

/* ========================================
   LAYOUT
   ======================================== */

.page-wrapper {
  position: relative;
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

@media (min-width: 768px) {
  .page-wrapper {
    padding: 48px 32px;
  }
}

.main-content {
  width: 100%;
  max-width: 580px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ========================================
   HERO TITLE
   ======================================== */

.hero-section {
  text-align: center;
  margin-bottom: 32px;
  opacity: 0;
  transform: translateY(24px);
  animation: fadeSlideUp 0.7s ease-out 0.1s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 10vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 12px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  /* Flexbox to keep FAIDE and VODS on same baseline, no shifting */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2em;
}

/* Fixed-size container so font changes never shift layout */
.vods-container {
  display: inline-block;
  width: 5.5ch;
  height: 1.15em;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.vods-text {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-electric-red);
  position: absolute;
  inset: 0;
  transition: color 0.15s ease;
  font-size: inherit;
  line-height: 1;
  white-space: nowrap;
}

/* Glitch pseudo-elements */
.vods-text::before,
.vods-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
}

.vods-text.glitching::before {
  color: var(--color-twitch-purple);
  animation: glitch-shift-1 0.3s steps(2) forwards;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  opacity: 0.8;
}

.vods-text.glitching::after {
  color: var(--color-neon-orange);
  animation: glitch-shift-2 0.3s steps(2) forwards;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  opacity: 0.8;
}

.hero-subtitle {
  font-family: var(--font-sans);
  color: var(--color-text-muted);
  font-size: clamp(0.7rem, 2.5vw, 0.85rem);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 0 16px;
  line-height: 1.6;
}

/* ========================================
   DISCORD BUTTON
   ======================================== */

.discord-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px 28px;
  margin-bottom: 32px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(0.8rem, 2.5vw, 0.9rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #fff;
  position: relative;
  overflow: hidden;
  /* Gradient base — Discord brand #5865F2 */
  background: linear-gradient(135deg, #4752C4 0%, #5865F2 40%, #6B73F7 100%);
  /* Big breathing glow */
  box-shadow: 
    0 0 25px rgba(88, 101, 242, 0.5),
    0 0 50px rgba(88, 101, 242, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  animation: discord-breath 3s ease-in-out infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  animation: discord-breath 3s ease-in-out infinite, fadeSlideUpScale 0.6s ease-out 0.25s forwards;
  text-decoration: none;
}

/* Noise texture overlay */
.discord-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  border-radius: inherit;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Shimmer sweep on hover */
.discord-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transition: left 0.5s ease;
  pointer-events: none;
}

.discord-btn:hover::after {
  left: 100%;
}

.discord-btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 
    0 0 35px rgba(88, 101, 242, 0.65),
    0 0 70px rgba(88, 101, 242, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.discord-btn:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 
    0 0 15px rgba(88, 101, 242, 0.4),
    0 0 30px rgba(88, 101, 242, 0.15);
}

.discord-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ========================================
   STATS GRID
   ======================================== */

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .stats-grid {
    gap: 16px;
  }
}

.stat-card {
  background: var(--color-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: default;
  transition: border-color 0.3s ease, background 0.3s ease;
  opacity: 0;
  transform: translateY(16px);
}

.stat-card:nth-child(1) {
  animation: fadeSlideUp 0.5s ease-out 0.35s forwards;
}

.stat-card:nth-child(2) {
  animation: fadeSlideUp 0.5s ease-out 0.45s forwards;
}

.stat-card:hover {
  border-color: var(--color-border-hover);
  background: var(--color-surface-glass-hover);
}

.stat-icon {
  margin-bottom: 8px;
  transition: transform 0.3s ease;
}

.stat-icon svg {
  width: 20px;
  height: 20px;
}

.stat-icon--red svg { color: var(--color-electric-red); }
.stat-icon--muted svg { color: var(--color-text-muted); }

.stat-card:hover .stat-icon {
  transform: scale(1.15);
}

.stat-label {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.stat-sublabel {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--color-text-faint);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ========================================
   ACTION CARDS
   ======================================== */

.action-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-card {
  display: block;
  background: var(--color-surface-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-left: 4px solid transparent;
  border-radius: var(--radius);
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(12px);
}

.action-card:nth-child(1) { animation: fadeSlideUp 0.5s ease-out 0.55s forwards; }
.action-card:nth-child(2) { animation: fadeSlideUp 0.5s ease-out 0.65s forwards; }
.action-card:nth-child(3) { animation: fadeSlideUp 0.5s ease-out 0.75s forwards; }

.action-card--accent-red {
  border-left-color: var(--color-electric-red);
}

.action-card:hover {
  background: var(--color-surface-glass-hover);
  border-color: var(--color-border-hover);
  transform: translateY(-1px);
}

.action-card:hover .action-card__arrow {
  opacity: 1;
  transform: translateX(0);
}

.action-card__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.action-card__left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.action-card__icon {
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.action-card__icon svg {
  width: 20px;
  height: 20px;
}

.action-card__tag {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--color-electric-red);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.action-card__title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.action-card__arrow {
  color: rgba(255, 255, 255, 0.4);
  opacity: 0;
  transform: translateX(-8px);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.action-card__arrow svg {
  width: 18px;
  height: 18px;
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
  margin-top: 56px;
  text-align: center;
  opacity: 0;
  animation: fadeIn 0.6s ease-out 1s forwards;
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--color-text-faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.8;
  max-width: 380px;
  margin: 0 auto;
}

/* ========================================
   AMBIENT GLOW ORBS
   ======================================== */

.ambient-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
}

.ambient-orb--red {
  top: -10%;
  left: -10%;
  width: 50%;
  height: 50%;
  background: rgba(255, 70, 34, 0.05);
}

.ambient-orb--blue {
  bottom: -10%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: rgba(79, 70, 229, 0.05);
}

/* ========================================
   KEYFRAMES
   ======================================== */

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideUpScale {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes discord-breath {
  0%, 100% {
    box-shadow: 
      0 0 25px rgba(88, 101, 242, 0.5),
      0 0 50px rgba(88, 101, 242, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
    filter: brightness(1);
  }
  50% {
    box-shadow: 
      0 0 40px rgba(88, 101, 242, 0.7),
      0 0 80px rgba(88, 101, 242, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
    filter: brightness(1.08);
  }
}

@keyframes glitch-shift-1 {
  0% { transform: translate(-3px, -1px); }
  50% { transform: translate(3px, 1px); }
  100% { transform: translate(-1px, 0); }
}

@keyframes glitch-shift-2 {
  0% { transform: translate(3px, 1px); }
  50% { transform: translate(-3px, -1px); }
  100% { transform: translate(1px, 0); }
}

@keyframes pulse-scale {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes gateSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulseBadge {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 70, 34, 0);
  }
  50% {
    box-shadow: 0 0 12px 2px rgba(255, 70, 34, 0.15);
  }
}

@keyframes shimmerSweep {
  0% { left: -100%; }
  50% { left: 100%; }
  100% { left: 100%; }
}

/* ========================================
   DISCORD POPUP BADGE
   ======================================== */

.discord-btn-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 32px;
}

.discord-btn-wrapper .discord-btn {
  margin-bottom: 0;
}

.discord-popup-badge {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(88, 101, 242, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  z-index: 20;
  box-shadow: 0 4px 16px rgba(88, 101, 242, 0.3);
  transition: none;
}

/* Small arrow/caret pointing down */
.discord-popup-badge::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(88, 101, 242, 0.9);
}

.discord-popup-badge.badge-visible {
  animation: badgePopUp 2s ease-out forwards;
}

@keyframes badgePopUp {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  10% {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px);
  }
  15% {
    transform: translateX(-50%) translateY(-8px);
  }
  70% {
    opacity: 1;
    transform: translateX(-50%) translateY(-8px);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
}

/* Touch-friendly: minimum tap targets */
@media (pointer: coarse) {
  .action-card {
    padding: 18px 18px;
    min-height: 56px;
  }
  .discord-btn {
    padding: 20px 28px;
    min-height: 56px;
  }
  .gate-accept-btn {
    padding: 18px 32px;
    min-height: 56px;
  }
}
