:root {
  color-scheme: dark;
  --bg-black: #040008;
  --deep-purple: #170027;
  --royal-purple: #7b2cff;
  --violet: #b985ff;
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --glass: rgba(19, 8, 33, 0.58);
  --glass-strong: rgba(35, 14, 56, 0.72);
  --border: rgba(214, 181, 255, 0.25);
  --shadow: 0 24px 80px rgba(48, 0, 91, 0.45);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg-black);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--white);
  background: var(--bg-black);
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -7;
  pointer-events: none;
  background-image: url("assets/BG.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.025);
  filter: saturate(1.08) contrast(1.05);
  animation: background-breathe 18s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.09;
  mix-blend-mode: screen;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.18) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at center, transparent 0 22%, black 72%);
}

.background-art,
.cosmic-vignette,
.starfield,
.pointer-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.background-art {
  z-index: -6;
  background:
    radial-gradient(circle at 18% 18%, rgba(155, 87, 255, 0.4), transparent 28%),
    radial-gradient(circle at 82% 28%, rgba(121, 44, 255, 0.32), transparent 30%),
    radial-gradient(circle at 52% 92%, rgba(255, 255, 255, 0.13), transparent 26%),
    linear-gradient(180deg, rgba(4, 0, 8, 0.24), rgba(4, 0, 8, 0.74));
  animation: aurora-shift 16s ease-in-out infinite alternate;
}

.starfield {
  z-index: -5;
  opacity: 0.9;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(185, 133, 255, 0.78) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.3px);
  background-position:
    0 0,
    42px 64px,
    120px 24px;
  background-size:
    190px 190px,
    270px 270px,
    330px 330px;
  animation: star-drift 42s linear infinite;
}

.cosmic-vignette {
  z-index: -4;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.03), transparent 22%),
    linear-gradient(90deg, rgba(4, 0, 8, 0.68), transparent 28%, transparent 72%, rgba(4, 0, 8, 0.68)),
    linear-gradient(180deg, rgba(4, 0, 8, 0.34), transparent 34%, rgba(4, 0, 8, 0.72));
}

.pointer-glow {
  z-index: 1;
  width: 32rem;
  height: 32rem;
  left: 0;
  top: 0;
  border-radius: 999px;
  opacity: var(--pointer-opacity, 0);
  transform: translate3d(calc(var(--pointer-x, 50vw) - 50%), calc(var(--pointer-y, 50vh) - 50%), 0);
  background: radial-gradient(circle, rgba(185, 133, 255, 0.22), rgba(123, 44, 255, 0.09) 38%, transparent 72%);
  filter: blur(8px);
  transition: opacity 220ms ease;
  will-change: transform, opacity;
}

.site-shell {
  position: relative;
  z-index: 6;
  display: grid;
  min-height: calc(100svh - 3.5rem);
  place-items: center;
  padding:
    calc(2rem + var(--safe-top))
    max(1.1rem, var(--safe-right))
    1rem
    max(1.1rem, var(--safe-left));
}

.hero-card {
  width: min(100%, 43rem);
  padding: clamp(1.15rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: clamp(1.4rem, 4vw, 2.4rem);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 32%),
    linear-gradient(180deg, var(--glass-strong), rgba(12, 4, 25, 0.54));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(24px) saturate(1.28);
  -webkit-backdrop-filter: blur(24px) saturate(1.28);
  overflow: hidden;
  transform: translateY(18px) scale(0.985);
  opacity: 0;
  animation: panel-entrance 900ms cubic-bezier(0.2, 0.85, 0.2, 1) 120ms forwards;
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
}

.hero-card::before {
  inset: -1px;
  padding: 1px;
  background: linear-gradient(120deg, transparent, rgba(185, 133, 255, 0.72), transparent, rgba(255, 255, 255, 0.34), transparent);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: xor;
  animation: border-flow 6s linear infinite;
}

.hero-card::after {
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.7), transparent 22%);
}

.logo-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(64vw, 17.5rem);
  aspect-ratio: 1;
  margin: 0 auto clamp(0.6rem, 2vw, 1rem);
}

.brand-logo {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 22px rgba(185, 133, 255, 0.52)) drop-shadow(0 26px 42px rgba(0, 0, 0, 0.42));
  transform: scale(0.78) rotate(-2deg);
  opacity: 0;
  animation:
    logo-reveal 980ms cubic-bezier(0.16, 1, 0.3, 1) 360ms forwards,
    logo-idle 6s ease-in-out 1.4s infinite;
}

.logo-orbit {
  position: absolute;
  inset: 10%;
  border: 1px solid rgba(185, 133, 255, 0.24);
  border-radius: 48% 52% 50% 50%;
  filter: drop-shadow(0 0 12px rgba(123, 44, 255, 0.45));
}

.orbit-one {
  animation: orbit-spin 18s linear infinite;
}

.orbit-two {
  inset: 18%;
  transform: rotate(62deg);
  border-color: rgba(255, 255, 255, 0.18);
  animation: orbit-spin 22s linear infinite reverse;
}

.intro-copy {
  position: relative;
  z-index: 2;
  text-align: center;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--violet);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(185, 133, 255, 0.72);
}

h1 {
  max-width: 12ch;
  margin: 0 auto;
  font-size: clamp(2.05rem, 8vw, 4.45rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.tagline {
  margin: 0.9rem auto 1.25rem;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.55;
}

.social-links {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.8rem;
  margin-top: clamp(1rem, 3vw, 1.35rem);
}

.social-card {
  --accent: var(--royal-purple);
  --accent-soft: rgba(123, 44, 255, 0.22);
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.95rem;
  min-height: 5.05rem;
  padding: 0.72rem 0.95rem;
  color: var(--white);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.25rem;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.13), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(0, 0, 0, 0.18)),
    rgba(15, 5, 28, 0.72);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    background-color 220ms ease;
  animation: card-rise 680ms cubic-bezier(0.2, 0.85, 0.2, 1) forwards;
  -webkit-tap-highlight-color: transparent;
}

.social-card:nth-child(1) { animation-delay: 620ms; }
.social-card:nth-child(2) { animation-delay: 740ms; }
.social-card:nth-child(3) { animation-delay: 860ms; }
.social-card:nth-child(4) { animation-delay: 980ms; }

.social-card::before,
.social-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity 220ms ease, transform 360ms ease;
}

.social-card::before {
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 0 18%, var(--accent), transparent 58% 100%);
  transform: translateX(-70%);
}

.social-card::after {
  inset: 0;
  background: radial-gradient(circle at 22% 50%, var(--accent-soft), transparent 42%);
}

.social-card:hover,
.social-card:focus-visible {
  transform: translateY(-4px) scale(1.012);
  border-color: color-mix(in srgb, var(--accent) 64%, white 20%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38), 0 0 30px var(--accent-soft), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.social-card:hover::before,
.social-card:focus-visible::before {
  opacity: 0.24;
  transform: translateX(72%);
}

.social-card:hover::after,
.social-card:focus-visible::after {
  opacity: 1;
}

.social-card:active {
  transform: translateY(0) scale(0.985);
}

.social-card:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.95);
  outline-offset: 4px;
}

.logo-wrap {
  position: relative;
  display: grid;
  width: clamp(3.4rem, 10vw, 4.1rem);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 1.1rem;
  background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.24), rgba(123, 44, 255, 0.11) 48%, rgba(0, 0, 0, 0.24));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 26px var(--accent-soft);
}

.logo-wrap::after {
  content: "";
  position: absolute;
  inset: -22%;
  border-radius: 999px;
  opacity: 0.48;
  background: conic-gradient(from 90deg, transparent, var(--accent), transparent 38%, transparent);
  filter: blur(10px);
  animation: logo-aura 5.5s linear infinite;
}

.platform-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 78%;
  height: 78%;
  object-fit: contain;
  border-radius: 0.85rem;
  filter: drop-shadow(0 0 12px var(--accent-soft));
  animation: platform-float 4.8s ease-in-out infinite;
  transition: transform 220ms ease, filter 220ms ease;
}

.social-card:hover .platform-logo,
.social-card:focus-visible .platform-logo {
  transform: translateY(-2px) rotate(-4deg) scale(1.08);
  filter: drop-shadow(0 0 18px var(--accent));
}

.card-copy {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.card-copy strong {
  font-size: clamp(1.08rem, 3vw, 1.28rem);
  letter-spacing: -0.02em;
}

.card-copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

.card-arrow {
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.09);
  transition: transform 220ms ease, background 220ms ease;
}

.social-card:hover .card-arrow,
.social-card:focus-visible .card-arrow {
  transform: translate(2px, -2px);
  background: var(--accent-soft);
}

.twitch-card {
  --accent: #b985ff;
  --accent-soft: rgba(145, 70, 255, 0.32);
}

.youtube-card {
  --accent: #ff4b71;
  --accent-soft: rgba(255, 47, 89, 0.24);
}

.youtube-card:hover .logo-wrap::before,
.youtube-card:focus-visible .logo-wrap::before {
  content: "";
  position: absolute;
  z-index: 2;
  width: 0;
  height: 0;
  border-top: 0.42rem solid transparent;
  border-bottom: 0.42rem solid transparent;
  border-left: 0.7rem solid rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9));
}

.tiktok-card {
  --accent: #78f7ff;
  --accent-soft: rgba(255, 64, 173, 0.2);
}

.tiktok-card:hover,
.tiktok-card:focus-visible {
  text-shadow: 1px 0 rgba(120, 247, 255, 0.28), -1px 0 rgba(255, 64, 173, 0.18);
}

.discord-card {
  --accent: #9ca8ff;
  --accent-soft: rgba(114, 137, 218, 0.28);
}

.discord-card:hover::after,
.discord-card:focus-visible::after {
  background: radial-gradient(circle at 18% 50%, rgba(156, 168, 255, 0.28), transparent 34%), radial-gradient(circle at 55% 50%, rgba(185, 133, 255, 0.16), transparent 46%);
}

.site-footer {
  position: relative;
  z-index: 6;
  min-height: 3.5rem;
  padding: 0 1rem calc(0.9rem + var(--safe-bottom));
  color: rgba(255, 255, 255, 0.62);
  text-align: center;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

body.is-hidden::before,
body.is-hidden::after,
.is-hidden *,
.is-hidden *::before,
.is-hidden *::after {
  animation-play-state: paused !important;
}

@keyframes background-breathe {
  from { transform: scale(1.025) translate3d(0, 0, 0); }
  to { transform: scale(1.06) translate3d(0, -1.2%, 0); }
}

@keyframes aurora-shift {
  from { opacity: 0.86; transform: translate3d(-1%, -1%, 0) scale(1); }
  to { opacity: 1; transform: translate3d(1.5%, 1%, 0) scale(1.04); }
}

@keyframes star-drift {
  to { background-position: 190px 380px, -228px 334px, 450px -306px; }
}

@keyframes panel-entrance {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes border-flow {
  to { filter: hue-rotate(32deg); }
}

@keyframes logo-reveal {
  60% { transform: scale(1.04) rotate(1deg); opacity: 1; }
  to { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes logo-idle {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes card-rise {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes logo-aura {
  to { transform: rotate(360deg); }
}

@keyframes platform-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}

@media (min-width: 760px) {
  .social-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .site-shell {
    align-items: start;
    padding-top: calc(1rem + var(--safe-top));
  }

  .hero-card {
    margin-top: 0.25rem;
  }

  .logo-stage {
    width: min(58vw, 13.25rem);
  }

  .social-card {
    min-height: 4.65rem;
    border-radius: 1.05rem;
  }
}

@media (max-width: 390px) {
  h1 {
    font-size: clamp(1.85rem, 14vw, 3rem);
  }

  .card-arrow {
    display: none;
  }
}

@media (max-height: 620px) and (orientation: landscape) {
  .site-shell {
    padding-top: calc(0.65rem + var(--safe-top));
  }

  .hero-card {
    width: min(100%, 58rem);
    display: grid;
    grid-template-columns: minmax(10rem, 0.72fr) 1fr;
    gap: 1rem;
    align-items: center;
  }

  .logo-stage {
    width: min(25vw, 12rem);
    margin-bottom: 0;
  }

  .intro-copy {
    text-align: left;
  }

  h1 {
    margin-left: 0;
  }
}

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

  body::before,
  .background-art,
  .starfield,
  .pointer-glow,
  .logo-orbit {
    animation: none !important;
  }

  .pointer-glow {
    display: none;
  }
}
