/* Mir Sport — under-construction page.
   Brand tokens mirror apps/web/app/globals.css (ink + gold).
   Cosmic theme: starfield + parallax asteroid field + meteor streaks. */

:root {
  --ink: #06080b;
  --ink-elev: #0d1116;
  --surface: #141a21;
  --gold: #f5c542;
  --gold-hi: #ffe58a;
  --gold-deep: #c99a1f;
  --gold-soft: rgba(245, 197, 66, 0.12);
  --gold-glow: rgba(245, 197, 66, 0.38);
  --text: #f5f2ea;
  --text-muted: #9a958a;
  --text-faint: #5c5851;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

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

html, body {
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background-image:
    radial-gradient(ellipse at 20% 0%,  rgba(245, 197, 66, 0.08), transparent 55%),
    radial-gradient(ellipse at 85% 100%, rgba(32, 16, 80, 0.22), transparent 55%),
    radial-gradient(ellipse at 50% 50%, rgba(10, 20, 40, 0.4), transparent 70%),
    linear-gradient(180deg, #05060a 0%, #03040a 100%);
  background-attachment: fixed;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 3px 3px;
  mix-blend-mode: overlay;
  opacity: 0.45;
}

::selection { background: var(--gold); color: #000; }

a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
a:hover { color: var(--gold); border-bottom-color: rgba(245, 197, 66, 0.4); }

/* ─── Atmosphere layer ─── */
.fx {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

/* ─── Nebula orbs ─── */
.orb {
  position: absolute;
  border-radius: 9999px;
  filter: blur(72px);
  will-change: transform, opacity;
}
.orb-1 {
  top: -12%;
  left: -6%;
  width: 48vmax;
  height: 48vmax;
  background: radial-gradient(circle,
    rgba(245, 197, 66, 0.32) 0%,
    rgba(245, 197, 66, 0.08) 35%,
    transparent 70%);
  animation: drift-1 36s ease-in-out infinite;
}
.orb-2 {
  bottom: -18%;
  right: -10%;
  width: 54vmax;
  height: 54vmax;
  background: radial-gradient(circle,
    rgba(80, 44, 160, 0.28) 0%,
    rgba(40, 24, 100, 0.08) 40%,
    transparent 75%);
  animation: drift-2 44s ease-in-out infinite;
  animation-delay: -7s;
}
.orb-3 {
  top: 45%;
  left: 55%;
  width: 36vmax;
  height: 36vmax;
  background: radial-gradient(circle,
    rgba(245, 197, 66, 0.16) 0%,
    transparent 70%);
  animation: drift-3 30s ease-in-out infinite;
  animation-delay: -12s;
  opacity: 0.75;
}
@keyframes drift-1 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  25%      { transform: translate3d(8vw, 5vh, 0) scale(1.06); }
  50%      { transform: translate3d(3vw, 12vh, 0) scale(0.96); }
  75%      { transform: translate3d(-5vw, 4vh, 0) scale(1.03); }
}
@keyframes drift-2 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  30%      { transform: translate3d(-7vw, -5vh, 0) scale(1.05); }
  60%      { transform: translate3d(-3vw, -9vh, 0) scale(0.95); }
}
@keyframes drift-3 {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.3; }
  50%      { transform: translate3d(-11vw, 7vh, 0) scale(1.1); opacity: 0.42; }
}

/* ─── Starfield ─── */
.stars {
  position: absolute;
  inset: 0;
}
.star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 3px rgba(255, 255, 255, 0.6);
  opacity: 0.5;
  animation: twinkle 3.4s ease-in-out infinite;
  animation-delay: var(--d);
}
.stars-far .star { opacity: 0.35; }
.stars-near .star { opacity: 0.85; box-shadow: 0 0 6px rgba(255, 255, 255, 0.8); }
@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.3); }
}
/* Slow parallax drift on the near layer */
.stars-near { animation: stars-parallax 60s linear infinite; }
@keyframes stars-parallax {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-4vw, 2vh, 0); }
}

/* ─── Asteroids ─── */
.ast {
  position: absolute;
  border-radius: 62% 38% 55% 45% / 48% 60% 40% 52%;
  background:
    radial-gradient(circle at 30% 28%,
      #3a342a 0%,
      #1c1812 40%,
      #07060a 100%);
  box-shadow:
    inset -4px -7px 16px rgba(0, 0, 0, 0.75),
    inset 3px 3px 10px rgba(245, 197, 66, 0.09),
    0 0 30px rgba(6, 8, 11, 0.6);
  will-change: transform, opacity;
  filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.5));
}

/* Asteroid 1 — bottom-left → upper-right, medium depth */
.ast-1 {
  top: 72%; left: -6%;
  width: 44px; height: 44px;
  animation: ast-1 26s linear infinite;
  animation-delay: -4s;
}
@keyframes ast-1 {
  0%   { transform: translate3d(0, 0, 0) scale(0.3) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.35; }
  70%  { opacity: 0.9; }
  100% { transform: translate3d(118vw, -80vh, 0) scale(2.4) rotate(200deg); opacity: 0; }
}

/* Asteroid 2 — top-right → bottom-left, CLOSE (hero asteroid, big ending) */
.ast-2 {
  top: -8%; right: -8%;
  width: 56px; height: 56px;
  animation: ast-2 38s linear infinite;
  animation-delay: -11s;
}
@keyframes ast-2 {
  0%   { transform: translate3d(0, 0, 0) scale(0.35) rotate(0deg); opacity: 0; }
  8%   { opacity: 0.4; }
  55%  { opacity: 0.95; }
  100% { transform: translate3d(-115vw, 110vh, 0) scale(3.6) rotate(-260deg); opacity: 0; }
}

/* Asteroid 3 — right → left, high, FAR (small, fast) */
.ast-3 {
  top: 18%; right: -4%;
  width: 22px; height: 22px;
  animation: ast-3 18s linear infinite;
  animation-delay: -1s;
}
@keyframes ast-3 {
  0%   { transform: translate3d(0, 0, 0) scale(0.4) rotate(0deg); opacity: 0; }
  15%  { opacity: 0.3; }
  60%  { opacity: 0.7; }
  100% { transform: translate3d(-112vw, 28vh, 0) scale(1.5) rotate(-160deg); opacity: 0; }
}

/* Asteroid 4 — left → right, mid-height, large */
.ast-4 {
  top: 38%; left: -10%;
  width: 50px; height: 50px;
  animation: ast-4 32s linear infinite;
  animation-delay: -18s;
}
@keyframes ast-4 {
  0%   { transform: translate3d(0, 0, 0) scale(0.3) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.35; }
  65%  { opacity: 0.92; }
  100% { transform: translate3d(125vw, 30vh, 0) scale(3.0) rotate(220deg); opacity: 0; }
}

/* Asteroid 5 — bottom-right → top-left */
.ast-5 {
  bottom: -6%; right: 18%;
  width: 34px; height: 34px;
  animation: ast-5 28s linear infinite;
  animation-delay: -7s;
}
@keyframes ast-5 {
  0%   { transform: translate3d(0, 0, 0) scale(0.35) rotate(0deg); opacity: 0; }
  12%  { opacity: 0.35; }
  70%  { opacity: 0.85; }
  100% { transform: translate3d(-90vw, -115vh, 0) scale(2.6) rotate(-210deg); opacity: 0; }
}

/* Asteroid 6 — diagonal, smallest, deepest */
.ast-6 {
  top: 55%; left: 12%;
  width: 18px; height: 18px;
  animation: ast-6 22s linear infinite;
  animation-delay: -14s;
}
@keyframes ast-6 {
  0%   { transform: translate3d(0, 0, 0) scale(0.5) rotate(0deg); opacity: 0; }
  18%  { opacity: 0.25; }
  75%  { opacity: 0.6; }
  100% { transform: translate3d(90vw, -95vh, 0) scale(1.8) rotate(180deg); opacity: 0; }
}

/* ─── Meteor streaks (rare accent) ─── */
.meteor {
  position: absolute;
  width: 220px;
  height: 1.5px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(245, 197, 66, 0) 10%,
    rgba(245, 197, 66, 1) 80%,
    rgba(255, 245, 200, 1) 95%,
    rgba(255, 255, 255, 0) 100%);
  filter: blur(0.5px) drop-shadow(0 0 14px rgba(245, 197, 66, 0.9));
  opacity: 0;
  will-change: transform, opacity;
}
.meteor-1 {
  top: 15%; left: -25%;
  transform: rotate(18deg);
  animation: meteor-fly 10s ease-in-out infinite;
  animation-delay: 3s;
}
.meteor-2 {
  top: 55%; left: -25%;
  transform: rotate(22deg);
  animation: meteor-fly 10s ease-in-out infinite;
  animation-delay: 7s;
}
@keyframes meteor-fly {
  0%   { opacity: 0; transform: rotate(18deg) translate3d(0, 0, 0); }
  4%   { opacity: 1; }
  12%  { opacity: 0; transform: rotate(18deg) translate3d(150vw, 45vh, 0); }
  100% { opacity: 0; transform: rotate(18deg) translate3d(150vw, 45vh, 0); }
}

/* ─── Vignette ─── */
.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%,
    transparent 0%,
    transparent 40%,
    rgba(3, 4, 10, 0.45) 75%,
    rgba(3, 4, 10, 0.8) 100%);
}

/* ─── Stage ─── */
.stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 24px 32px;
  text-align: center;
}

/* ─── Mast (top pill) ─── */
.mast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.025);
  box-shadow: inset 0 0 0 1px rgba(245, 197, 66, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: rise 0.9s var(--ease-spring) both;
}
.mast-mark img { display: block; width: 20px; height: 20px; }
.mast-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--gold);
}

/* ─── Content ─── */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 820px;
}

.seal {
  width: clamp(84px, 11vmin, 112px);
  height: clamp(84px, 11vmin, 112px);
  margin-bottom: 30px;
  filter: drop-shadow(0 0 36px rgba(245, 197, 66, 0.5));
  animation: rise 0.9s var(--ease-spring) 0.1s both,
             breathe 4.8s ease-in-out 1.2s infinite;
  border-radius: 50%;
}
@keyframes breathe {
  0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 36px rgba(245, 197, 66, 0.5)); }
  50%      { transform: scale(1.04); filter: drop-shadow(0 0 52px rgba(245, 197, 66, 0.7)); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 26px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.32em;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  animation: rise 1s var(--ease-spring) 0.22s both;
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  animation: dot-pulse 1.6s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.85); }
  50%      { opacity: 1;   transform: scale(1.2); box-shadow: 0 0 16px var(--gold); }
}

/* ─── Headline (all words use the same gradient + stagger) ─── */
.headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 7.2vw, 5.4rem);
  letter-spacing: -0.025em;
  line-height: 1.02;
  margin: 0;
  max-width: 22ch;
  text-wrap: balance;
}
.headline .word {
  display: inline-block;
  padding: 0 0.03em;
  background: linear-gradient(135deg, var(--gold-hi) 0%, var(--gold) 50%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(245, 197, 66, 0.2);
  opacity: 0;
  transform: translateY(26px);
  animation: rise-word 1s var(--ease-out-expo) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes rise-word {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

.subcopy {
  margin: 28px auto 0;
  max-width: 46ch;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  text-wrap: balance;
  animation: rise 1.05s var(--ease-spring) 0.9s both;
}

/* ─── Pulse dots ─── */
.pulse {
  display: inline-flex;
  gap: 8px;
  margin-top: 44px;
  animation: rise 1.15s var(--ease-spring) 1.05s both;
}
.pulse span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.35;
  animation: pulse-dot 1.4s ease-in-out infinite;
}
.pulse span:nth-child(2) { animation-delay: 0.2s; }
.pulse span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse-dot {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50%      { opacity: 1;    transform: scale(1.18); box-shadow: 0 0 14px rgba(245, 197, 66, 0.7); }
}

/* ─── Footer ─── */
.foot {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  animation: rise 1.15s var(--ease-spring) 1.2s both;
}
.foot .sep { color: var(--text-faint); opacity: 0.6; }
.foot a { letter-spacing: 0.18em; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  .orb-2, .orb-3, .stars-near, .meteor { display: none; }
  .orb-1 { animation: none; opacity: 0.25; }
  .ast { animation: none; opacity: 0.25; transform: scale(1.2); }
  .star { animation: none; }
  .mast, .seal, .eyebrow, .subcopy, .pulse, .foot { animation: rise 0.5s ease both; }
  .pulse span, .eyebrow .dot { animation: none; }
  .headline .word { animation: rise-word 0.5s ease both; }
}

/* ─── Responsive tweaks ─── */
@media (max-width: 640px) {
  .stage { padding: 24px 18px; }
  .seal { margin-bottom: 22px; }
  .headline { font-size: clamp(2rem, 10vw, 3rem); }
  .ast-2, .ast-4 { transform: scale(0.6); }
  .meteor { opacity: 0 !important; }
}
