/* Friend Drive media site — textless splash. Logo is the sign-in entry. */

:root {
  --void: #050308;
  --gold: #f0d78c;
  --gold-deep: #d4b45a;
  --purple: #c084fc;
  --ring: #f3e0a0;
}

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

html,
body {
  margin: 0;
  height: 100%;
  background: var(--void);
  color-scheme: dark;
}

body {
  min-height: 100dvh;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 62% 52% at 50% 47%, rgba(102, 44, 160, 0.3), transparent 62%),
    radial-gradient(ellipse 36% 30% at 50% 58%, rgba(56, 140, 200, 0.1), transparent 58%),
    var(--void);
}

.stage {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100dvh;
  min-height: 100vh;
  padding: 4vh 4vw;
}

/* The logo is the only control. Circular hit area, no visible label. */
.logo-gate {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: min(60vmin, 480px);
  height: min(60vmin, 480px);
  border-radius: 50%;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.halo {
  position: absolute;
  inset: 10%;
  z-index: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(192, 132, 252, 0.32) 0%,
    rgba(90, 50, 160, 0.14) 42%,
    transparent 72%
  );
  filter: blur(10px);
  pointer-events: none;
  animation: halo-breath 8s ease-in-out infinite;
}

.wisps {
  position: absolute;
  z-index: 1;
  width: 168%;
  height: 168%;
  mix-blend-mode: screen;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  overflow: visible;
}

.orbit {
  transform-box: view-box;
  transform-origin: 50% 50%;
}

.orbit-a {
  animation: orbit 32s linear infinite;
  animation-delay: -6s;
}

.orbit-b {
  animation: orbit 38s linear infinite reverse;
  animation-delay: -12s;
}

.orbit-c {
  animation: orbit 26s linear infinite reverse;
  animation-delay: -4s;
}

.orbit-d {
  animation: orbit 44s linear infinite;
  animation-delay: -18s;
}

.orbit-e {
  animation: orbit-swirl 36s linear infinite;
  animation-delay: -9s;
}

.orbit-f {
  animation: orbit-swirl 41s linear infinite reverse;
  animation-delay: -15s;
}

.logo-float {
  position: relative;
  z-index: 2;
  display: block;
  width: 92%;
  animation: float-breath 7s ease-in-out infinite;
  will-change: transform;
}

.logo-gate img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 28px rgba(168, 85, 220, 0.38));
  transition: filter 0.55s ease;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.sparkles {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  width: var(--size, 8px);
  height: var(--size, 8px);
  left: var(--x);
  top: var(--y);
  background: var(--gold);
  clip-path: polygon(
    50% 0%,
    61% 35%,
    100% 50%,
    61% 65%,
    50% 100%,
    39% 65%,
    0% 50%,
    39% 35%
  );
  filter: drop-shadow(0 0 3px var(--gold)) drop-shadow(0 0 7px rgba(240, 215, 140, 0.7));
  animation: twinkle var(--dur, 3.2s) ease-in-out var(--delay, 0s) infinite;
  will-change: transform, opacity;
}

.s1  { --x: 18%; --y: 22%; --size: 9px;  --dur: 3.4s; --delay: 0.1s; }
.s2  { --x: 78%; --y: 18%; --size: 7px;  --dur: 2.8s; --delay: 0.7s; }
.s3  { --x: 88%; --y: 42%; --size: 11px; --dur: 3.8s; --delay: 0.3s; }
.s4  { --x: 82%; --y: 68%; --size: 6px;  --dur: 2.6s; --delay: 1.4s; }
.s5  { --x: 62%; --y: 8%;  --size: 8px;  --dur: 3.1s; --delay: 0.9s; }
.s6  { --x: 12%; --y: 48%; --size: 7px;  --dur: 3.6s; --delay: 1.8s; }
.s7  { --x: 22%; --y: 74%; --size: 10px; --dur: 2.9s; --delay: 0.4s; }
.s8  { --x: 70%; --y: 80%; --size: 6px;  --dur: 3.5s; --delay: 2.1s; }
.s9  { --x: 42%; --y: 6%;  --size: 5px;  --dur: 2.4s; --delay: 1.1s; }
.s10 { --x: 8%;  --y: 32%; --size: 5px;  --dur: 4.0s; --delay: 2.4s; }
.s11 { --x: 90%; --y: 58%; --size: 5px;  --dur: 2.7s; --delay: 1.6s; }
.s12 { --x: 38%; --y: 88%; --size: 7px;  --dur: 3.3s; --delay: 0.6s; }

.logo-gate:hover img,
.logo-gate:focus-visible img {
  filter:
    drop-shadow(0 0 22px rgba(240, 215, 140, 0.55))
    drop-shadow(0 0 48px rgba(168, 85, 220, 0.5));
}

.logo-gate:hover .halo,
.logo-gate:focus-visible .halo {
  background: radial-gradient(
    circle,
    rgba(240, 215, 140, 0.22) 0%,
    rgba(192, 132, 252, 0.3) 36%,
    transparent 72%
  );
}

/* Visible keyboard focus ring — gold, offset from the logo. */
.logo-gate:focus-visible {
  box-shadow:
    0 0 0 2px var(--void),
    0 0 0 4px var(--ring),
    0 0 28px 4px rgba(240, 215, 140, 0.45);
}

.logo-gate:active img {
  filter:
    drop-shadow(0 0 18px rgba(240, 215, 140, 0.65))
    drop-shadow(0 0 36px rgba(168, 85, 220, 0.55));
}

@keyframes float-breath {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-9px) scale(1.025);
  }
}

@keyframes halo-breath {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
}

@keyframes orbit {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes orbit-swirl {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.22;
    transform: scale(0.6) rotate(0deg);
  }
  45% {
    opacity: 1;
    transform: scale(1) rotate(18deg);
  }
  60% {
    opacity: 0.85;
    transform: scale(1.2) rotate(26deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .halo,
  .orbit,
  .logo-float,
  .sparkle {
    animation: none;
  }

  .halo {
    opacity: 0.9;
    transform: none;
  }

  .logo-float {
    transform: none;
  }

  /* Resting orbit offsets so frozen wisps still surround the logo. */
  .orbit-a { transform: rotate(28deg); }
  .orbit-b { transform: rotate(-48deg); }
  .orbit-c { transform: rotate(110deg); }
  .orbit-d { transform: rotate(-130deg); }
  .orbit-e { transform: rotate(62deg); }
  .orbit-f { transform: rotate(-80deg); }

  .sparkle {
    opacity: 0.7;
    transform: none;
  }

  .logo-gate img,
  .logo-gate .halo {
    transition: none;
  }
}
