/* ============================================================
   MAJESTIC MTA — home.css
   Hero · Online Panel · Features
   ============================================================ */

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Media layer */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

/* Fallback background if video not loaded */
.hero__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0B0C10 0%, #0d1520 50%, #0B0C10 100%);
  z-index: -1;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(11, 12, 16, 0.0) 0%,
    rgba(11, 12, 16, 0.1) 70%,
    rgba(11, 12, 16, 1) 100%
  );
  z-index: 1;
}

.hero__overlay-grid {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.25;
  z-index: 2;
  pointer-events: none;
  will-change: transform;
}

/* Content */
.hero__content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  padding-top: calc(var(--header-h, 80px) + 60px);
  padding-bottom: 120px;
  max-width: 720px;
}

/* Badge */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 10px;
  border-radius: 100px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  background: rgba(0, 229, 255, 0.08);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-accent-primary);
  letter-spacing: 0.02em;
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--color-success);
  animation: live-pulse 2s ease-in-out infinite;
}

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

/* H1 */
.hero__title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.5);
}

.hero__title-accent {
  color: var(--color-accent-primary);
  text-shadow:
    0 0 20px rgba(0, 229, 255, 0.7),
    0 0 60px rgba(0, 229, 255, 0.3);
}

/* ── Char reveal ───────────────────────────────────────────── */
.hero__title-accent {
  overflow: visible;
}

.hero__title-accent .char {
  display: inline-block;
  white-space: pre;
  position: relative;
  transform: translateY(28px);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.hero__title-accent .char.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* ── Char underline glow ───────────────────────────────────── */
.hero__title-accent .char::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 150%;
  height: 5px;
  border-radius: 4px;
  background: var(--color-accent-secondary);
  box-shadow:
    0 0 10px 2px rgba(232, 28, 90, 0.7),
    0 0 28px 6px rgba(232, 28, 90, 0.3);
  opacity: 0;
  pointer-events: none;
}

/* Underline visible — instant on */
.hero__title-accent .char.u-on::after {
  opacity: var(--u, 1);
}

@media (prefers-reduced-motion: reduce) {
  .hero__title-accent .char {
    transform: none;
    opacity: 1;
  }
}

/* Subtitle */
.hero__subtitle {
  font-size: clamp(15px, 1.5vw, 18px);
  line-height: 1.65;
  color: var(--color-text-secondary);
  max-width: 520px;
}

/* CTA */
.hero__cta {
  padding: 16px 40px;
  font-size: 17px;
  min-height: 56px;
}

/* Scroll indicator */
.hero__scroll-down {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  animation: scroll-bounce 2.4s ease-in-out infinite;
}

.hero__scroll-down:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.4);
  transform: translateX(-50%) translateY(-3px);
}

.hero__scroll-down img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  /* Fallback arrow if SVG missing */
}

/* Fallback arrow symbol if SVG missing */
.hero__scroll-down img[src=""] ~ *,
.hero__scroll-down:not(:has(img[src])) {
  font-size: 18px;
  color: var(--color-text-secondary);
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   AURORA BLOBS — ambient background glow for non-hero sections
   ============================================================ */

/* Wrapper for all post-hero sections */
.main__aurora {
  position: relative;
  overflow: hidden;
}

/* Base blob styles */
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  filter: blur(110px);
  z-index: 0;
}

/* ── online-panel blobs ─── */
.aurora-blob--op-cyan {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.23) 0%, transparent 70%);
  top: -120px;
  right: -180px;
  animation: blob-drift-a 22s ease-in-out infinite;
}

.aurora-blob--op-pink {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(232, 28, 90, 0.30) 0%, transparent 70%);
  bottom: -100px;
  left: -140px;
  animation: blob-drift-b 28s ease-in-out infinite;
}

/* ── features blobs ─── */
.aurora-blob--ft-cyan {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.22) 0%, transparent 70%);
  top: 0px;
  left: -180px;
  animation: blob-drift-b 18s ease-in-out infinite;
}

.aurora-blob--ft-pink {
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, rgba(232, 28, 90, 0.24) 0%, transparent 70%);
  bottom: -40px;
  right: -140px;
  animation: blob-drift-a 22s ease-in-out infinite;
}

/* ── Keyframes ─── */
@keyframes blob-drift-a {
  0%   { transform: translate(0px,    0px);  opacity: 1;    }
  25%  { transform: translate(-60px,  40px); opacity: 0.55; }
  50%  { transform: translate(-30px, -50px); opacity: 0.9;  }
  75%  { transform: translate(50px,  -20px); opacity: 0.45; }
  100% { transform: translate(0px,    0px);  opacity: 1;    }
}

@keyframes blob-drift-b {
  0%   { transform: translate(0px,   0px);  opacity: 0.7;  }
  33%  { transform: translate(70px,  50px); opacity: 1;    }
  66%  { transform: translate(40px, -60px); opacity: 0.5;  }
  100% { transform: translate(0px,   0px);  opacity: 0.7;  }
}

/* ── Node Graph canvas ─── */
.aurora-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Sections and their content always above canvas/blobs */
.online-panel,
.features {
  position: relative;
  z-index: 1;
}

.online-panel .container,
.features .container {
  position: relative;
  z-index: 1;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .aurora-blob { animation: none; }
}

/* ============================================================
   SERVER ONLINE PANEL
   ============================================================ */
.online-panel {
  position: relative;
  z-index: 10;
  padding-top: 32px;
}

.online-panel__glass {
  background: rgba(31, 40, 51, 0.65);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--color-border-soft);
  border-radius: 18px;
  padding: 32px;
  box-shadow:
    0 8px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(0, 229, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.online-panel__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* Card */
.online-panel__card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--color-border-soft);
  background: rgba(11, 12, 16, 0.5);
  background-image: url('/img/server-card-bg.webp');
  background-size: cover;
  background-position: center;
  transition: all var(--transition);
}

.online-panel__card:hover {
  border-color: rgba(0, 229, 255, 0.2);
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.08);
  transform: translateY(-2px);
}

.online-panel__card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.online-panel__card-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--color-text-primary);
}

.online-panel__card-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.online-panel__card-status--success {
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
  animation: live-pulse 2s ease-in-out infinite;
}

.online-panel__card-status--warning {
  background: var(--color-warning);
  box-shadow: 0 0 8px var(--color-warning);
  animation: live-pulse 2s ease-in-out infinite;
}

.online-panel__card-status--danger {
  background: var(--color-danger);
  box-shadow: 0 0 8px var(--color-danger);
  animation: live-pulse 1.4s ease-in-out infinite;
}

.online-panel__card-count {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.online-panel__card-online {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 28px;
  line-height: 1;
  color: var(--color-text-primary);
}

.online-panel__card-limit {
  font-size: 14px;
  color: var(--color-text-secondary);
  opacity: 0.6;
}

/* Progress bar */
.online-panel__progress {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.online-panel__progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s ease;
}

.online-panel__progress-bar--success {
  background: linear-gradient(90deg, var(--color-success), rgba(34, 197, 94, 0.7));
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.online-panel__progress-bar--warning {
  background: linear-gradient(90deg, var(--color-warning), rgba(245, 158, 11, 0.7));
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
}

.online-panel__progress-bar--danger {
  background: linear-gradient(90deg, var(--color-danger), rgba(239, 68, 68, 0.7));
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.online-panel__card-label {
  font-size: 12px;
  color: var(--color-text-secondary);
  opacity: 0.5;
  letter-spacing: 0.02em;
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
  padding: 80px 0;
}

.features__title {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: clamp(24px, 3vw, 42px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: var(--color-text-primary);
  margin-bottom: 56px;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* Feature card */
.features__card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(21, 26, 33, 1);
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
  z-index: 1;
}

.features__card:hover {
  border-color: rgba(0, 229, 255, 0.25);
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, 0.1),
    0 12px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(-4px);
}

.features__card:focus-visible {
  outline: 2px solid var(--color-accent-primary);
  outline-offset: 3px;
}

/* Media slot */
.features__card-media {
  position: relative;
  z-index: 0;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(31, 40, 51, 0.8) 0%, rgba(11, 12, 16, 0.9) 100%);
  overflow: hidden;
  /* Fallback if image missing: slot stays visible */
  min-height: 180px;
}

.features__card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

/* scale handled by JS parallax (scale(1.08) already applied);
   on mobile (no parallax) we restore a CSS-only hover zoom */
@media (max-width: 767px) {
  .features__card-img {
    transition: transform 0.5s ease;
  }

  .features__card:hover .features__card-img {
    transform: scale(1.04);
  }
}

.features__card-img-overlay {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.08;
  pointer-events: none;
  z-index: 1;
}

/* CTA under features grid */
.features__cta {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.features__cta .btn {
  padding: 16px 40px;
  font-size: 17px;
  min-height: 56px;
}

/* Card body */
.features__card-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.features__card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
}

.features__card-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-text-secondary);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet: 768–1199px */
@media (max-width: 1199px) {
  .online-panel__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile: <768px */
@media (max-width: 767px) {
  /* Hero */
  .hero__content {
    align-items: center;
    text-align: center;
    padding-top: calc(var(--header-h, 64px) + 40px);
    padding-bottom: 100px;
    max-width: 100%;
  }

  .hero__subtitle {
    max-width: 100%;
  }

  .hero__cta,
  .features__cta .btn {
    width: 100%;
    max-width: 320px;
  }

  /* Online panel */
  .online-panel {
    margin-top: -30px;
    padding-bottom: 60px;
  }

  .online-panel__glass {
    padding: 20px 16px;
  }

  .online-panel__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  /* Features */
  .features {
    padding: 60px 0 80px;
  }

  .features__grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .features__title {
    margin-bottom: 36px;
  }

  .features__card-body {
    padding: 20px;
  }
}

/* Prevent horizontal scroll at 375px */
@media (max-width: 400px) {
  .hero__title {
    font-size: 30px;
  }

  .online-panel__card-online {
    font-size: 22px;
  }
}
