@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Space+Grotesk:wght@400;600;700&display=swap');

:root {
  --bg: #0b1020;
  --bg-2: #0d1428;
  --surface: #0f1a33;
  --text: #e9eef7;
  --muted: #a7b4cc;
  --primary: #6ee7ff;
  --accent: #7c5cff;
  --accent-2: #28e0a9;
  --ring: 0 0 0 0 rgba(124, 92, 255, 0);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% 0%, #0e1b3b 0%, var(--bg) 60%),
              radial-gradient(1400px 800px at 100% 100%, #0b1a31 0%, var(--bg-2) 40%);
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  overflow-x: hidden;
}

/* Ambient glow accents */
.glow::before,
body::before {
  content: '';
  position: fixed;
  inset: -30% -30% auto auto;
  width: 60vmax;
  height: 60vmax;
  background: radial-gradient(closest-side, rgba(124, 92, 255, 0.18), transparent 70%);
  filter: blur(40px) saturate(120%);
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: '';
  position: fixed;
  inset: auto auto -30% -30%;
  width: 60vmax;
  height: 60vmax;
  background: radial-gradient(closest-side, rgba(110, 231, 255, 0.2), transparent 70%);
  filter: blur(40px) saturate(120%);
  pointer-events: none;
  z-index: -2;
}

/* Animated background blobs */
.bg-blobs {
  position: fixed;
  inset: -6% -6% -6% -6%;
  pointer-events: none;
  z-index: -1;
  contain: layout style paint;
}
.blob {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--size, 22vmax);
  height: var(--size, 22vmax);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--color, rgba(124,92,255,.55)), rgba(0,0,0,0) 60%);
  opacity: .18;
  filter: blur(64px) saturate(140%);
  will-change: transform;
  transform: translate(0, 0);
  transition: transform 24s linear;
}

/* Bottom glass nav */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 22px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 20px 40px rgba(2,10,30,.45);
  border-radius: 16px;
  backdrop-filter: blur(12px) saturate(160%);
}
.nav-logo {
  height: 40px;
  width: auto;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
  transition: transform .2s ease, background .25s ease, box-shadow .25s ease;
}
.nav-logo:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, rgba(124,92,255,.14), rgba(110,231,255,.08));
  box-shadow: inset 0 0 0 1px rgba(124,92,255,.3);
}
.bottom-nav a{
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: .2px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
  transition: transform .2s ease, color .2s ease, background .25s ease, box-shadow .25s ease;
}
.bottom-nav a:hover{ transform: translateY(-1px); color: #eff9ff; background: linear-gradient(180deg, rgba(124,92,255,.14), rgba(110,231,255,.08)); box-shadow: inset 0 0 0 1px rgba(124,92,255,.3) }
@media (max-width: 560px){ .bottom-nav { gap: 6px; padding: 8px; } .bottom-nav a{ padding: 9px 12px; font-weight: 700; } }

main { display: grid; align-items: center; }
.container { max-width: 1100px; margin: 0 auto; padding: 40px 20px; }

/* Hero */
.hero { text-align: center; padding: 52px 0 24px; }
.hero-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 14px;
}
.hero-logo {
  height: 64px;
  width: auto;
  animation: titleIn .9s cubic-bezier(.2,.9,.25,1) both;
}
.heading {
  margin: 0;
  font-family: 'Space Grotesk', Inter, system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--text), #eaf3ff 35%, var(--primary) 60%, var(--accent) 80%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: titleIn .9s cubic-bezier(.2,.9,.25,1) both;
}
.subheading {
  margin: 0 auto 12px;
  max-width: 820px;
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  color: var(--muted);
  font-weight: 600;
  opacity: .92;
  animation: fadeUp .8s .1s both;
}
.text {
  margin: 8px auto 0;
  max-width: 760px;
  font-size: clamp(1rem, 2.2vw, 1.1rem);
  line-height: 1.7;
  color: #cdd7ea;
  animation: fadeUp .8s .2s both;
}

@keyframes titleIn{ from{ opacity:0; transform: translateY(14px) scale(.98) } to{ opacity:1; transform:translateY(0) scale(1) } }
@keyframes fadeUp { from{ opacity:0; transform: translateY(12px) } to{ opacity:1; transform: translateY(0) } }

/* Glass panels */
.glass-panel{
  margin: 18px auto 0;
  padding: 22px 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10), 0 14px 38px rgba(2,10,30,.45);
  backdrop-filter: blur(10px) saturate(160%);
}

/* Links grid */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 26px;
}
.card {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  text-decoration: none; color: var(--text);
  padding: 18px 18px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.10), 0 16px 36px rgba(3,10,30,.5);
  transition: transform .25s cubic-bezier(.2,.9,.25,1), box-shadow .25s ease, background .25s ease;
}
.card:hover{ transform: translateY(-6px) scale(1.01); background: linear-gradient(180deg, rgba(124,92,255,.14), rgba(110,231,255,.10)); box-shadow: inset 0 0 0 1px rgba(124,92,255,.35), 0 22px 60px rgba(124,92,255,.28) }
.card .icon svg{ width: 20px; height: 20px; display:block; }
.card .label{ font-weight: 700; letter-spacing: .2px; }

/* Redirect page */
.redirect { text-align: center; padding-top: 30px; }
.redirect .big-icon svg{ width: 72px; height: 72px; filter: drop-shadow(0 8px 28px rgba(124,92,255,.35)); }
.spinner { width: 52px; height: 52px; border: 4px solid rgba(124,92,255,.25); border-top-color: var(--accent); border-radius: 999px; margin: 26px auto; animation: spin 1s linear infinite; }
@keyframes spin { to{ transform: rotate(360deg) } }
.redirect p { color: var(--muted); }

/* Footer spacing for visual balance */
footer { height: 72px; }

/* Accessibility: reduce heavy motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none!important; transition: none!important; }
  .bg-blobs { display: none !important; }
}
