/* Clear Context — night-sky sanctuary */
:root {
  --bg: #07061a;
  --bg-2: #0d0b2b;
  --ink: #f1ecff;
  --muted: #aaa3cf;
  --faint: #6f6898;
  --violet: #8b5cf6;
  --lilac: #c4b5fd;
  --cyan: #5eead4;
  --rose: #f0abfc;
  --gold: #fde68a;
  --glass: rgba(255, 255, 255, .045);
  --glass-2: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .1);
  --font-display: "Cormorant Garamond", "Noto Serif", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", "Noto Sans", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(120% 80% at 50% -10%, #1b1450 0%, var(--bg-2) 40%, var(--bg) 75%) fixed, var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--font-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { display: block; }
::selection { background: rgba(139, 92, 246, .45); color: #fff; }

/* ---------- sky ---------- */
#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; filter: blur(70px); opacity: .55; overflow: hidden; }
.aurora i {
  position: absolute; border-radius: 50%; mix-blend-mode: screen;
  animation: drift 26s ease-in-out infinite alternate;
}
.aurora i:nth-child(1) { width: 52vmax; height: 34vmax; left: 8%; top: 4%; background: radial-gradient(closest-side, rgba(139, 92, 246, .55), transparent); }
.aurora i:nth-child(2) { width: 46vmax; height: 30vmax; right: 2%; top: 22%; background: radial-gradient(closest-side, rgba(94, 234, 212, .32), transparent); animation-duration: 32s; animation-delay: -8s; }
.aurora i:nth-child(3) { width: 40vmax; height: 40vmax; left: 30%; bottom: 0; background: radial-gradient(closest-side, rgba(240, 171, 252, .28), transparent); animation-duration: 38s; animation-delay: -16s; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1) rotate(0deg); }
  50% { transform: translate3d(6vw, -4vh, 0) scale(1.15) rotate(12deg); }
  100% { transform: translate3d(-5vw, 5vh, 0) scale(.92) rotate(-8deg); }
}

/* ---------- header ---------- */
.top {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1160px; margin: 0 auto; padding: 18px var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: .02em; }
.sigil { width: 30px; height: 30px; filter: drop-shadow(0 0 10px rgba(167, 139, 250, .6)); }
.lang-switch { position: relative; }
.lang-switch summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(10px); color: var(--muted); font-size: 14px;
  transition: color .3s, border-color .3s;
}
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary:hover, .lang-switch[open] summary { color: var(--ink); border-color: rgba(196, 181, 253, .4); }
.lang-switch ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px);
  width: min(320px, calc(100vw - 32px));
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
  margin: 0; padding: 8px; list-style: none;
  background: rgba(16, 13, 46, .92); backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  animation: pop .25s var(--ease);
}
.lang-switch a { display: block; padding: 8px 12px; border-radius: 10px; text-decoration: none; font-size: 14px; color: var(--muted); }
.lang-switch a:hover { background: var(--glass-2); color: var(--ink); }
.lang-switch a[aria-current] { color: var(--gold); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }

/* ---------- layout ---------- */
main { position: relative; z-index: 2; }
section { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; letter-spacing: -.01em; line-height: 1.08; margin: 0; }
h2 { font-size: clamp(34px, 5vw, 54px); text-align: center; margin-bottom: 42px; }

/* ---------- hero ---------- */
.hero { overflow-x: clip; text-align: center; padding-top: clamp(24px, 6vh, 64px); padding-bottom: 80px; display: flex; flex-direction: column; align-items: center; }
.kicker {
  display: inline-block; margin: 0 0 22px; padding: 6px 14px;
  font: 600 12px/1 var(--font-body); letter-spacing: .22em; text-transform: uppercase;
  color: var(--cyan); border: 1px solid rgba(94, 234, 212, .25); border-radius: 999px;
  background: rgba(94, 234, 212, .06);
}
.lang-zh .kicker, .lang-ja .kicker, .lang-ko .kicker, .lang-ar .kicker, .lang-fa .kicker, .lang-ur .kicker, .lang-hi .kicker, .lang-bn .kicker, .lang-th .kicker { letter-spacing: .06em; }
.hero h1 {
  font-size: clamp(40px, 7.2vw, 96px);
  max-width: min(16ch, 100%);
  hyphens: auto; overflow-wrap: break-word;
  background: linear-gradient(100deg, #fff 0%, var(--lilac) 25%, #fff 45%, var(--cyan) 65%, var(--rose) 85%, #fff 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 12s linear infinite;
  filter: drop-shadow(0 4px 30px rgba(139, 92, 246, .35));
}
:is(.lang-zh, .lang-ja, .lang-ko, .lang-hi, .lang-bn, .lang-th, .lang-ar, .lang-fa, .lang-ur) .hero h1 { font-size: clamp(36px, 6.4vw, 80px); line-height: 1.25; max-width: 16ch; }
@keyframes shimmer { to { background-position: -250% 0; } }
.sub { max-width: 46ch; margin: 24px auto 0; color: var(--muted); font-size: clamp(17px, 2vw, 20px); }

/* ---------- orb ---------- */
.orb-wrap { margin: 40px 0 32px; display: flex; flex-direction: column; align-items: center; }
.orb {
  --rx: 0deg; --ry: 0deg; --glow: .55;
  position: relative; width: min(64vw, 300px); aspect-ratio: 1; border: 0; padding: 0; border-radius: 50%;
  background: none; cursor: pointer; transform: perspective(700px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .6s var(--ease);
  animation: breathe 7s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.orb:focus-visible { outline: 2px solid var(--cyan); outline-offset: 10px; }
.orb > span { position: absolute; border-radius: 50%; pointer-events: none; }
.orb-halo {
  inset: -28%;
  background: conic-gradient(from 0deg, rgba(139, 92, 246, 0), rgba(139, 92, 246, .7), rgba(94, 234, 212, .55), rgba(240, 171, 252, .6), rgba(139, 92, 246, 0));
  filter: blur(38px); opacity: var(--glow);
  animation: spin 16s linear infinite; transition: opacity .6s;
}
.orb-core {
  inset: 0;
  background:
    radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .95) 0 4%, rgba(233, 213, 255, .7) 9%, transparent 30%),
    radial-gradient(circle at 70% 78%, rgba(94, 234, 212, .55), transparent 45%),
    radial-gradient(circle at 50% 50%, #8b5cf6 0%, #5b21b6 45%, #1e1b4b 78%, #0b0a24 100%);
  box-shadow: inset -18px -24px 60px rgba(7, 6, 26, .8), inset 10px 12px 40px rgba(255, 255, 255, .18), 0 0 80px rgba(139, 92, 246, .45);
}
.orb-swirl {
  inset: 6%;
  background: conic-gradient(from 90deg, transparent 0 20%, rgba(240, 171, 252, .35) 30%, transparent 45%, rgba(94, 234, 212, .3) 62%, transparent 80%);
  mix-blend-mode: screen; filter: blur(6px);
  animation: spin 9s linear infinite reverse;
}
.orb-ring { inset: -9%; border: 1px solid rgba(196, 181, 253, .35); transform: rotateX(72deg) rotateZ(0deg); animation: ring 14s linear infinite; }
.orb-ring.r2 { inset: -18%; border-color: rgba(94, 234, 212, .22); animation-duration: 22s; animation-direction: reverse; border-style: dashed; }
.orb-glint { inset: 14% 52% 58% 16%; background: radial-gradient(closest-side, rgba(255, 255, 255, .9), transparent); filter: blur(4px); opacity: .8; }
.orb:hover { --glow: .9; }
.orb.pulse .orb-core { animation: pulse .9s var(--ease); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ring { to { transform: rotateX(72deg) rotateZ(360deg); } }
@keyframes breathe { 0%, 100% { scale: 1; } 50% { scale: 1.045; } }
@keyframes pulse { 30% { filter: brightness(1.6) saturate(1.3); } }
.ripple {
  position: fixed; z-index: 3; pointer-events: none; border-radius: 50%;
  border: 1.5px solid rgba(196, 181, 253, .8); transform: translate(-50%, -50%);
  animation: ripple 1.6s var(--ease) forwards;
}
@keyframes ripple { from { width: 10px; height: 10px; opacity: 1; } to { width: 520px; height: 520px; opacity: 0; } }
.orb-hint { margin: 30px 0 0; color: var(--faint); font-size: 14px; font-style: italic; font-family: var(--font-display); font-size: 19px; }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px; border-radius: 999px; border: 0; cursor: pointer;
  font: 600 16px/1 var(--font-body); text-decoration: none; color: #120c2e;
  transition: transform .3s var(--ease), box-shadow .3s;
}
.btn-primary {
  background: linear-gradient(120deg, #fff 0%, var(--lilac) 40%, var(--cyan) 100%);
  background-size: 200% 100%;
  box-shadow: 0 10px 40px rgba(139, 92, 246, .45), inset 0 1px 0 rgba(255, 255, 255, .8);
  animation: btnflow 6s ease-in-out infinite alternate;
}
.btn-primary:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 16px 50px rgba(94, 234, 212, .4); }
.btn-primary:active { transform: scale(.98); }
.btn span { font-size: 18px; }
@keyframes btnflow { to { background-position: 100% 0; } }

/* ---------- steps ---------- */
.steps { padding-top: 60px; padding-bottom: 90px; }
.step-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step {
  position: relative; padding: 30px 24px 26px; border-radius: 26px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
  border: 1px solid var(--line); backdrop-filter: blur(12px);
  overflow: hidden; transition: transform .5s var(--ease), border-color .5s;
}
.step::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--a, 0deg), transparent 0 70%, var(--lilac), var(--cyan), transparent);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .5s;
}
.step:hover { transform: translateY(-6px); }
.step:hover::before { opacity: 1; animation: rim 3s linear infinite; }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes rim { to { --a: 360deg; } }
.step-glyph {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; margin-bottom: 22px;
  font-size: 24px; color: var(--gold);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .25), rgba(139, 92, 246, .25) 60%, transparent);
  box-shadow: 0 0 30px rgba(139, 92, 246, .35); border: 1px solid rgba(255, 255, 255, .12);
}
.step-num { position: absolute; top: 22px; inset-inline-end: 24px; font: 500 13px var(--font-mono); color: var(--faint); }
.step h3 { font-size: 27px; margin-bottom: 10px; }
.step p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------- invite ---------- */
.invite {
  max-width: 780px; margin: 0 auto 110px; padding: clamp(28px, 5vw, 48px);
  text-align: center; border-radius: 32px;
  background: radial-gradient(120% 140% at 50% 0%, rgba(139, 92, 246, .22), rgba(255, 255, 255, .03) 60%);
  border: 1px solid rgba(196, 181, 253, .22);
  box-shadow: 0 30px 120px rgba(70, 40, 160, .35), inset 0 1px 0 rgba(255, 255, 255, .08);
  position: relative; overflow: hidden;
}
.invite::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .07) 50%, transparent 70%);
  transform: translateX(-100%); animation: sweep 7s ease-in-out infinite;
}
@keyframes sweep { 60%, 100% { transform: translateX(100%); } }
.invite-label { margin: 0 0 16px; font: 600 12px/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--lilac); }
:is(.lang-zh, .lang-ja, .lang-ko, .lang-hi, .lang-bn, .lang-th, .lang-ar, .lang-fa, .lang-ur) .invite-text { font-family: var(--font-body); font-size: 17px; }
.invite-text {
  margin: 0 0 28px; padding: 22px 24px; border-radius: 18px;
  font: 400 16px/1.7 var(--font-mono); color: var(--ink); text-align: start;
  background: rgba(5, 4, 20, .55); border: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.agent-door { margin: 26px 0 0; font-size: 14px; }
.agent-door a { color: var(--faint); text-decoration: none; border-bottom: 1px dashed rgba(170, 163, 207, .4); transition: color .3s; }
.agent-door a:hover { color: var(--cyan); }

/* ---------- about & faq ---------- */
.about { max-width: 780px; text-align: center; margin-bottom: 110px; }
.about h2 { margin-bottom: 22px; }
.about p { color: var(--muted); font-size: clamp(17px, 2vw, 20px); margin: 0; }
.faqs { max-width: 780px; margin-bottom: 110px; }
.faq { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px 4px; font: 500 clamp(21px, 2.4vw, 25px)/1.3 var(--font-display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { position: relative; flex: none; width: 16px; height: 16px; }
.faq summary i::before, .faq summary i::after { content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 1.5px; background: var(--lilac); transition: transform .4s var(--ease); }
.faq summary i::after { transform: rotate(90deg); }
.faq[open] summary i::after { transform: rotate(0); }
.faq p { margin: 0 4px 24px; color: var(--muted); animation: pop .35s var(--ease); }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 2; text-align: center; padding: 50px var(--gutter) 60px; border-top: 1px solid var(--line); color: var(--faint); font-size: 14px; }
.foot p { display: inline-flex; align-items: center; gap: 10px; margin: 0; }
.foot a { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.foot-langs { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin: 22px auto; padding: 0; max-width: 760px; }
.foot-langs a { text-decoration: none; color: var(--faint); font-size: 13px; }
.foot-langs a:hover, .foot-langs a[aria-current] { color: var(--lilac); }
.copy-note { display: block !important; font-size: 12px; opacity: .7; }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 20; left: 50%; bottom: 28px; transform: translate(-50%, 30px);
  padding: 12px 20px; border-radius: 999px; background: rgba(16, 13, 46, .9); border: 1px solid rgba(94, 234, 212, .35);
  color: var(--cyan); font-size: 14px; opacity: 0; pointer-events: none; transition: .45s var(--ease); backdrop-filter: blur(10px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); filter: blur(6px); transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease); transition-delay: calc(var(--i, 0) * 110ms); }
.js .reveal.in { opacity: 1; transform: none; filter: none; }

/* ---------- 404 ---------- */
.lost { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 16px; padding: var(--gutter); position: relative; z-index: 2; }
.lost h1 { font-size: clamp(36px, 6vw, 64px); }

/* ---------- responsive ---------- */
@media (max-width: 980px) { .step-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  body { font-size: 16px; }
  .step-list { grid-template-columns: 1fr; }
  .step { padding: 24px 22px; display: grid; grid-template-columns: 54px 1fr; column-gap: 16px; align-items: start; }
  .step-glyph { margin: 0; grid-row: span 2; }
  .step h3 { font-size: 24px; margin-top: 4px; }
  .lang-switch summary span { display: none; }
  :is(.lang-zh, .lang-ja, .lang-ko, .lang-hi, .lang-bn, .lang-th, .lang-ar, .lang-fa, .lang-ur) .invite-text { font-family: var(--font-body); font-size: 17px; }
.invite-text { font-size: 14.5px; padding: 18px; }
  .btn { padding: 15px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
