:root {
  --bg: #0a0a12;
  --bg-soft: #14141f;
  --fg: #f4f4f8;
  --fg-dim: #9d9db1;
  --cyan: #00e5ff;
  --magenta: #ff2dd6;
  --card-border: rgba(0, 229, 255, 0.18);
  --card-border-hover: rgba(255, 45, 214, 0.55);
  --max-w: 1100px;
  --intro-duration: 2500ms;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 60% at 50% 35%, rgba(255, 45, 214, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 100% 70% at 50% 30%, rgba(0, 229, 255, 0.05) 0%, transparent 70%),
    var(--bg);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 45, 214, 0.22) 0%, transparent 22%),
    radial-gradient(circle at 50% 45%, rgba(0, 229, 255, 0.16) 0%, transparent 38%);
  pointer-events: none;
}

.logo {
  width: clamp(260px, 55vmin, 560px);
  height: auto;
  position: relative;
  z-index: 1;
  animation: spin-in var(--intro-duration) cubic-bezier(0.16, 1, 0.3, 1) both;
}


.logo-fallback {
  width: clamp(260px, 55vmin, 560px);
  height: clamp(180px, 38vmin, 380px);
  display: grid;
  place-items: center;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 7vmin, 5rem);
  letter-spacing: 0.05em;
  background: var(--bg-soft);
  border: 2px solid var(--cyan);
  border-radius: 16px;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(0, 229, 255, 0.7), 0 0 24px rgba(255, 45, 214, 0.4);
}

.logo-missing .hero::after {
  content: 'logo image missing — drop it at assets/logo.png';
  position: absolute;
  bottom: 6rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--fg-dim);
  font-size: 0.85rem;
  opacity: 0.7;
}

@keyframes spin-in {
  0% {
    transform: scale(0.25) rotate(0deg);
    opacity: 0;
    filter: blur(6px);
  }
  60% {
    opacity: 1;
    filter: blur(0);
  }
  100% {
    transform: scale(1) rotate(1440deg);
    opacity: 1;
  }
}

/* Static brightness/saturation lift on the neon — applied always, including
   during spin. Keeps GPU cost flat (no per-frame filter recomputation). */
img.logo {
  filter: brightness(1.18) saturate(1.25);
}

/* The "wall halo" pulses behind the logo, not on the logo itself. Animating
   opacity on a transparent overlay is cheap; animating drop-shadow on a 1MP
   bitmap is not. */
@keyframes halo-pulse {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1; }
}

body.ready .logo {
  animation: none;
  transform: scale(1) rotate(0deg);
  opacity: 1;
}

body.ready .hero-glow {
  animation: halo-pulse 4.5s ease-in-out infinite;
}

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.6rem;
  color: var(--fg-dim);
  opacity: 0;
  transition: opacity 0.6s ease 0.4s;
  animation: bob 2.2s ease-in-out infinite;
}

body.ready .scroll-cue { opacity: 0.6; }
.scroll-cue:hover { opacity: 1; color: var(--cyan); }

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

/* ---------- COMING SOON (splash) ---------- */
.coming-soon {
  position: absolute;
  bottom: clamp(1.5rem, 4vh, 3rem);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.1rem, 2.6vmin, 1.6rem);
  letter-spacing: 0.35em;
  color: var(--magenta);
  text-shadow:
    0 0 8px rgba(255, 45, 214, 0.55),
    0 0 18px rgba(255, 45, 214, 0.35);
  opacity: 0;
  transition: opacity 0.8s ease 0.3s;
  white-space: nowrap;
}

body.ready .coming-soon {
  opacity: 1;
  animation: coming-soon-flicker 4s ease-in-out 1s infinite;
}

@keyframes coming-soon-flicker {
  0%, 100% {
    text-shadow:
      0 0 8px rgba(255, 45, 214, 0.55),
      0 0 18px rgba(255, 45, 214, 0.35);
  }
  50% {
    text-shadow:
      0 0 14px rgba(255, 45, 214, 0.85),
      0 0 28px rgba(255, 45, 214, 0.55),
      0 0 50px rgba(255, 45, 214, 0.25);
  }
}

/* ---------- SECTION REVEAL ---------- */
main { opacity: 0; transition: opacity 0.6s ease 0.2s; }
body.ready main { opacity: 1; }

.section-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 5vmin, 3.2rem);
  letter-spacing: 0.06em;
  margin: 0 0 1.5rem;
  text-align: center;
  color: var(--fg);
}

.section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  margin: 0.6rem auto 0;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(255, 45, 214, 0.5);
}

/* ---------- APPS ---------- */
.apps {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4rem 1.5rem 2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  position: relative;
  padding: 1.75rem 1.5rem 4rem;
  background: linear-gradient(180deg, rgba(20, 20, 31, 0.9), rgba(10, 10, 18, 0.9));
  border: 1px solid var(--card-border);
  border-radius: 14px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  opacity: 0;
  transform: translateY(20px);
}

body.ready .card { opacity: 1; transform: translateY(0); transition: opacity 0.55s ease, transform 0.55s ease, border-color 0.25s ease, box-shadow 0.25s ease; }
body.ready .card:nth-child(1) { transition-delay: 0.05s; }
body.ready .card:nth-child(2) { transition-delay: 0.20s; }
body.ready .card:nth-child(3) { transition-delay: 0.35s; }

.card:hover {
  transform: translateY(-4px);
  border-color: var(--card-border-hover);
  box-shadow: 0 0 0 1px rgba(255, 45, 214, 0.2), 0 8px 30px rgba(255, 45, 214, 0.15);
}

.card-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.35);
}

.card-desc {
  margin: 0 0 1.25rem;
  color: var(--fg-dim);
  line-height: 1.5;
  font-size: 0.95rem;
}

.card-cta {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--cyan);
  border-radius: 999px;
  color: var(--cyan);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.card-cta:hover {
  background: var(--cyan);
  color: var(--bg);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.5);
}

.card-cta[data-status="soon"] {
  border-color: var(--fg-dim);
  color: var(--fg-dim);
  cursor: not-allowed;
}

.card-cta[data-status="soon"]:hover {
  background: transparent;
  color: var(--fg-dim);
  box-shadow: none;
}

.card-badge {
  position: absolute;
  bottom: 1.25rem;
  left: 1.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--magenta);
  opacity: 0.75;
}

/* ---------- BUSINESS ---------- */
.business {
  max-width: 720px;
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
}

body.ready .business {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.55s ease 0.55s, transform 0.55s ease 0.55s;
}

.business-copy {
  font-size: clamp(1rem, 2.2vmin, 1.15rem);
  line-height: 1.65;
  color: var(--fg-dim);
  margin: 0 0 1.75rem;
}

.business-cta {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border: 2px solid var(--magenta);
  border-radius: 999px;
  color: var(--magenta);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.9rem;
  box-shadow: 0 0 18px rgba(255, 45, 214, 0.3), inset 0 0 12px rgba(255, 45, 214, 0.08);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.business-cta:hover {
  background: var(--magenta);
  color: var(--bg);
  box-shadow: 0 0 28px rgba(255, 45, 214, 0.7);
  transform: translateY(-2px);
}

/* ---------- FOOTER ---------- */
footer {
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  color: var(--fg-dim);
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.6s ease 0.8s;
}
body.ready footer { opacity: 0.6; }

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  .logo {
    animation: none;
    transform: scale(1) rotate(0deg);
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(0, 229, 255, 0.4));
  }
  body.ready .logo { animation: none; }
  main, .card, .business, footer {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .scroll-cue, .coming-soon {
    opacity: 1 !important;
    transform: translateX(-50%) !important;
    transition: none !important;
    animation: none !important;
  }
  .scroll-cue { animation: none; }
}
