/* The Rift Lounge, style B "Rift glow": dark night, teal-to-violet rift light, lots of motion.
   All motion stops under prefers-reduced-motion (bottom of this file). */
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --bg: #05050a;
  --panel: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.09);
  --teal: #38e0d0;
  --violet: #7c4dff;
  --pink: #c86bff;
  --text: #f4f3fb;
  --muted: #a9a6bf;
  --rift: linear-gradient(90deg, var(--teal), var(--violet));
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --x: 50vw; --y: 30vh; /* cursor position, set by app.js */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { line-height: 1.05; margin: 0 0 0.6em; letter-spacing: -0.03em; }
h1 { font-size: clamp(3rem, 8vw, 6rem); font-weight: 900; }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 850; }
h3 { font-size: 1.2rem; font-weight: 750; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--teal); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; border-radius: 999px; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--teal); color: #000; padding: 0.5rem 1rem; border-radius: 8px; }

/* ---------- Background layers ---------- */
.aurora { position: fixed; inset: -20vmax; z-index: -3; filter: blur(80px); opacity: 0.75; pointer-events: none; }
.aurora i { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: drift 22s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 60vmax; height: 60vmax; left: 5%; top: 0; background: radial-gradient(circle, rgba(124, 77, 255, 0.55), transparent 60%); }
.aurora i:nth-child(2) { width: 50vmax; height: 50vmax; right: 0; top: 10%; background: radial-gradient(circle, rgba(56, 224, 208, 0.40), transparent 60%); animation-duration: 28s; animation-delay: -8s; }
.aurora i:nth-child(3) { width: 45vmax; height: 45vmax; left: 30%; bottom: 0; background: radial-gradient(circle, rgba(200, 107, 255, 0.30), transparent 60%); animation-duration: 34s; animation-delay: -14s; }
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(8vmax, 6vmax) scale(1.15); }
  100% { transform: translate(-6vmax, 10vmax) scale(0.95); }
}
.sparks { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; pointer-events: none; }
.cursor-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(500px circle at var(--x) var(--y), rgba(56, 224, 208, 0.10), transparent 60%);
}
.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 30; background: var(--rift); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); box-shadow: 0 0 12px var(--teal); }

/* ---------- Buttons ---------- */
.btn {
  position: relative; display: inline-block; padding: 1rem 2rem; border-radius: 999px;
  background: var(--rift); color: #05050a; font-weight: 800; text-decoration: none; letter-spacing: 0.01em;
  box-shadow: 0 10px 40px rgba(124, 77, 255, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 14px 50px rgba(56, 224, 208, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.3) inset; }
.btn-small { padding: 0.6rem 1.2rem; font-size: 0.95rem; }
/* Glow button: a light that keeps orbiting the edge, plus a shine sweep on hover */
.btn-glow { isolation: isolate; overflow: hidden; }
.btn-glow::before {
  content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: inherit;
  background: conic-gradient(from var(--angle), var(--teal), var(--violet), var(--pink), var(--teal));
  animation: orbit 3s linear infinite; filter: blur(6px);
}
.btn-glow::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  transform: skewX(-20deg);
}
.btn-glow:hover::after { animation: sweep 0.8s ease; }
.btn-glow span { position: relative; z-index: 1; }
@keyframes orbit { to { --angle: 360deg; } }
@keyframes sweep { to { left: 130%; } }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.8rem max(1.25rem, calc((100% - var(--wrap)) / 2 + 1.25rem));
  background: rgba(5, 5, 10, 0.55); backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.65rem; color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: -0.01em; }
.brand img { width: 40px; height: 40px; border-radius: 50%; mix-blend-mode: lighten; }

main { max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
section { position: relative; padding: clamp(4rem, 10vw, 7rem) 0; }

/* ---------- Hero ---------- */
.hero { min-height: calc(100vh - 66px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: center; gap: clamp(1.5rem, 5vw, 4rem); padding-top: 2rem; }
.rift-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; height: 100%; margin-left: -50vw; z-index: -1; pointer-events: none; opacity: 0.8; } /* full screen width, so no visible box edges */
.rift-line polyline {
  fill: none; stroke: url(#riftGrad); stroke-width: 3; stroke-linejoin: bevel; vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 8px #38e0d0) drop-shadow(0 0 22px #7c4dff);
  stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: draw 2.2s 0.3s cubic-bezier(.6, .1, .2, 1) forwards, flicker 5s 2.6s ease-in-out infinite;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes flicker { 0%, 100% { opacity: 1; } 45% { opacity: 0.55; } 50% { opacity: 1; } 53% { opacity: 0.7; } }

.logo-col { position: relative; }
.hero-logo {
  position: relative; /* emblem has real transparency (brand pack), no blending needed */
  transform: translate(var(--px, 0), var(--py, 0)); transition: transform 0.2s ease-out; animation: rise 1.2s 0.2s both cubic-bezier(.2, .8, .2, 1);
}
.portal {
  position: absolute; inset: 6%; border-radius: 50%;
  background: conic-gradient(from var(--angle), transparent, rgba(56, 224, 208, 0.55), transparent 30%, rgba(124, 77, 255, 0.6), transparent 65%);
  filter: blur(28px); animation: orbit 9s linear infinite;
}
.logo-mark { width: 82%; margin: 0 auto; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 30px rgba(56, 224, 208, 0.18)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
/* A light streak that slides over the metal, cut out to the shape of the logo */
.logo-sheen {
  position: absolute; left: 9%; top: 0; width: 82%; aspect-ratio: 1; pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 255, 255, 0.85) 48%, rgba(120, 255, 240, 0.6) 52%, transparent 65%) 0 0 / 300% 100% no-repeat;
  -webkit-mask: url(assets/logo-mark-1024.webp) center / contain no-repeat; mask: url(assets/logo-mark-1024.webp) center / contain no-repeat;
  -webkit-mask-source-type: alpha; mask-mode: alpha; mix-blend-mode: screen;
  animation: float 6s ease-in-out infinite, metal 4.5s 1.5s ease-in-out infinite;
}
@keyframes metal { 0% { background-position: 120% 0; } 55%, 100% { background-position: -20% 0; } }
.eyebrow { color: var(--teal); text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.82rem; font-weight: 700; margin-bottom: 0.9rem; }
.hero-text > * { animation: rise 0.9s both cubic-bezier(.2, .8, .2, 1); }
.hero-text > :nth-child(2) { animation-delay: 0.15s; }
.hero-text > :nth-child(3) { animation-delay: 0.3s; }
.hero-text > :nth-child(4) { animation-delay: 0.45s; }
.hero-text > :nth-child(5) { animation-delay: 0.6s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.shine {
  display: inline-block;
  background: linear-gradient(100deg, #fff 0%, #fff 35%, #9be9ff 50%, #b89bff 60%, #fff 75%, #fff 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}
.shine + .shine { background-image: var(--rift); background-size: 100% 100%; animation: none; }
@keyframes shimmer { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: #d6d3e8; max-width: 34rem; margin-bottom: 1.8rem; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; }
.link-more { color: var(--muted); text-decoration: none; font-weight: 600; }
.link-more:hover { color: var(--text); }
.note { color: var(--muted); font-size: 0.95rem; margin-top: 1.4rem; }

/* ---------- Marquee ---------- */
.marquee { position: relative; left: 50%; width: 100vw; margin-left: -50vw; overflow: hidden; padding: 1.4rem 0; border-block: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); transform: rotate(-2deg); }
.marquee-track { display: flex; gap: 3rem; width: max-content; animation: marquee 30s linear infinite; }
.marquee span { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 900; text-transform: uppercase; letter-spacing: -0.01em; white-space: nowrap; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.35); }
.marquee span:nth-child(3n + 1) { color: #fff; -webkit-text-stroke: 0; }
.marquee span::after { content: "✦"; margin-left: 3rem; color: var(--teal); -webkit-text-stroke: 0; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Scroll reveal (class "in" is added by app.js) ---------- */
.js .reveal { opacity: 0; transform: translateY(40px) scale(0.98); filter: blur(6px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2, .8, .2, 1), filter 0.8s ease; transition-delay: var(--delay, 0s); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- Feature cards ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1.1rem; perspective: 900px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(4, 1fr); } }
.card {
  position: relative; padding: 1.6rem 1.4rem; border-radius: 20px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(12px);
  transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); transform-style: preserve-3d;
  transition: transform 0.15s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
}
.js .card.reveal.in {
  transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0));
  transition: transform 0.15s ease-out, border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.8s ease, filter 0.8s ease;
}
.card::before { /* spotlight that follows the cursor inside the card */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(56, 224, 208, 0.18), transparent 70%);
}
.card:hover { border-color: rgba(56, 224, 208, 0.45); box-shadow: 0 20px 60px rgba(124, 77, 255, 0.25); }
.card:hover::before { opacity: 1; }
.card-icon { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1rem; border-radius: 14px; font-size: 1.4rem; background: linear-gradient(135deg, rgba(56, 224, 208, 0.25), rgba(124, 77, 255, 0.3)); box-shadow: 0 0 24px rgba(56, 224, 208, 0.2); }
.card p { color: var(--muted); margin: 0; }

/* ---------- Steps ---------- */
.step-list { counter-reset: step; list-style: none; margin: 0; padding: 0 0 0 0.2rem; display: grid; gap: 1.6rem; max-width: 42rem; position: relative; }
.step-list::before { content: ""; position: absolute; left: 1.35rem; top: 1rem; bottom: 1rem; width: 2px; background: linear-gradient(var(--teal), var(--violet)); box-shadow: 0 0 12px var(--teal); }
.step-list li { counter-increment: step; display: flex; gap: 1.2rem; align-items: center; position: relative; }
.step-list li::before {
  content: counter(step); flex: 0 0 2.7rem; height: 2.7rem; line-height: 2.7rem; text-align: center; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--teal); color: var(--text); font-weight: 900; box-shadow: 0 0 18px rgba(56, 224, 208, 0.5);
}
.step-list strong { color: var(--text); }
.step-list span { color: var(--muted); }

.rules p { max-width: 46rem; color: var(--muted); font-size: 1.15rem; }

/* ---------- Final call to action ---------- */
.cta { text-align: center; padding-block: clamp(6rem, 14vw, 10rem); overflow: hidden; }
.cta-portal {
  position: absolute; left: 50%; top: 50%; width: min(560px, 90vw); aspect-ratio: 1; transform: translate(-50%, -50%); z-index: -1; border-radius: 50%;
  background: conic-gradient(from var(--angle), var(--teal), transparent 25%, var(--violet), transparent 60%, var(--pink), transparent 85%, var(--teal));
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 56%, #000 60%, transparent 62%);
          mask: radial-gradient(circle, transparent 54%, #000 56%, #000 60%, transparent 62%);
  filter: drop-shadow(0 0 30px var(--violet)); animation: orbit 7s linear infinite;
}
.cta h2 { font-size: clamp(2.4rem, 6vw, 4.2rem); }

/* ---------- Footer ---------- */
.footer {
  max-width: var(--wrap); margin: 0 auto; padding: 2rem 1.25rem 3rem; color: var(--muted); font-size: 0.9rem;
  background: linear-gradient(var(--line), var(--line)) center top / calc(100% - 2.5rem) 1px no-repeat;
}
.footer .legal { font-size: 0.8rem; max-width: 52rem; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; text-align: center; min-height: auto; }
  .logo-col { max-width: 300px; margin: 0 auto; }
  .lead { margin-left: auto; margin-right: auto; }
  .actions { justify-content: center; }
  .brand span { display: none; }
  .cursor-glow { display: none; }
}

/* ---------- Less motion: everything calm and visible ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .logo-sheen { display: none; }
  .sparks, .cursor-glow { display: none; }
  .rift-line polyline { stroke-dashoffset: 0; }
  .js .reveal { opacity: 1; transform: none; filter: none; }
  .marquee-track { transform: none; }
}
