@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

:root {
  --bg: #07070d;
  --text: #f4f4fb;
  --muted: #9a9ab5;
  --c1: #ff7a18;
  --c2: #ffc857;
  --c3: #e11d74;
  --mx: 50vw;
  --my: 50vh;
}

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

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Background ---------- */
.aurora { position: fixed; inset: 0; overflow: hidden; z-index: 0; }

.blob {
  position: absolute;
  width: 55vmax;
  height: 55vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .45;
  will-change: transform;
}
.b1 { background: var(--c1); top: -20vmax; left: -15vmax; animation: float1 22s ease-in-out infinite alternate; }
.b2 { background: var(--c2); bottom: -25vmax; right: -15vmax; opacity: .32; animation: float2 26s ease-in-out infinite alternate; }
.b3 { background: var(--c3); top: 30%; left: 45%; width: 35vmax; height: 35vmax; opacity: .22; animation: float3 30s ease-in-out infinite alternate; }

@keyframes float1 { to { transform: translate(18vw, 14vh) scale(1.2); } }
@keyframes float2 { to { transform: translate(-16vw, -12vh) scale(1.15); } }
@keyframes float3 { to { transform: translate(-22vw, 10vh) scale(.8); } }

#particles { position: fixed; inset: 0; z-index: 1; }

.grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

.spotlight {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(500px circle at var(--mx) var(--my), rgba(255,255,255,.07), transparent 60%);
}

/* ---------- Layout ---------- */
.stage {
  position: relative; z-index: 3;
  min-height: 100%;
  display: grid; place-items: center;
  padding: 24px;
  perspective: 1200px;
}

/* ---------- Card ---------- */
.card {
  --angle: 0deg;
  position: relative;
  width: min(560px, 100%);
  padding: clamp(36px, 7vw, 64px) clamp(24px, 6vw, 56px);
  text-align: center;
  border-radius: 28px;
  background: rgba(14, 14, 26, .55);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06);
  transform-style: preserve-3d;
  will-change: transform;
  opacity: 0;
  animation: spin 8s linear infinite;
}

/* rotating gradient border */
.card::before {
  content: "";
  position: absolute; inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), transparent 0 55%, var(--c1), var(--c2), var(--c3), transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

@keyframes spin { to { --angle: 360deg; } }

.monogram {
  width: 64px; height: 64px;
  margin: 0 auto 26px;
  display: grid; place-items: center;
  font-size: 30px; font-weight: 800; letter-spacing: -.02em;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 10px 30px rgba(255, 122, 24, .45);
  opacity: 0;
}

.eyebrow {
  font-size: 12px; letter-spacing: .5em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px; padding-left: .5em;
  opacity: 0;
}

.title {
  font-size: clamp(56px, 16vw, 112px);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
}
/* Gradient is applied per letter (background-clip:text breaks on animated child spans);
   --i / --n (set in script.js) make the letters line up as one continuous gradient. */
.title .ch {
  display: inline-block;
  will-change: transform;
  background: linear-gradient(110deg, #fff 0%, #ffffff 35%, var(--c2) 70%, var(--c3) 100%);
  background-size: calc(var(--n, 1) * 100%) 100%;
  background-position: calc(var(--i, 0) * 100% / max(var(--n, 1) - 1, 1)) 0;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 0 .02em;
}

.domain {
  margin-top: 10px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 15px; color: var(--c2); letter-spacing: .08em;
  opacity: 0;
}

.divider {
  width: 64px; height: 2px; margin: 34px auto 28px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--c1), var(--c3), transparent);
  opacity: 0;
}

.lead { font-size: clamp(18px, 3.4vw, 22px); font-weight: 600; opacity: 0; }
.sub  { margin-top: 8px; font-size: 15px; color: var(--muted); opacity: 0; }

.foot {
  position: fixed; bottom: 18px; left: 0; right: 0; z-index: 3;
  text-align: center; font-size: 12px; color: var(--muted); letter-spacing: .05em;
}
.foot a { color: inherit; margin-left: 14px; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.2); }
.foot a:hover { color: var(--text); }

/* CSS-only fallback if GSAP fails to load */
.no-gsap .card { animation: spin 8s linear infinite, rise .9s .1s cubic-bezier(.2,.8,.2,1) forwards; }
.no-gsap .monogram, .no-gsap .eyebrow, .no-gsap .domain,
.no-gsap .divider, .no-gsap .lead, .no-gsap .sub { animation: rise .9s .5s ease forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .blob, .title, .card { animation: none !important; }
  .card, .monogram, .eyebrow, .domain, .divider, .lead, .sub { opacity: 1 !important; transform: none !important; }
}

.eyebrow { font-size: 11px; letter-spacing: .32em; padding-left: .32em; }
