/* ==========================================================================
   DoomScroll — pre-registration / early-access experience
   Single page, six states. Vanilla CSS only.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;

  --bg:        #ffffff;
  --bg-soft:   #fafaff;
  --ink:       #12132b;
  --ink-2:     #33365a;
  --muted:     #6b6f8d;
  --line:      #e7e7f1;
  --line-2:    #d9d9e8;

  --brand:     #6c3ce9;
  --brand-lt:  #8b5cf6;
  --brand-dk:  #4d1fbe;
  --brand-wash:#f3efff;
  --danger:    #e0364f;
  --ok:        #159a63;

  --r-lg: 22px;
  --r:    14px;
  --r-sm: 11px;
  --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(18,19,43,.05);
  --sh-2: 0 10px 30px -12px rgba(18,19,43,.14);
  --sh-3: 0 22px 60px -22px rgba(76,33,184,.35);

  --ease: cubic-bezier(.22,.68,.24,1);
  --ease-out: cubic-bezier(.16,1,.3,1);

  /* origin of the cosmic bloom — sits over the artifact */
  --ox: 71%;
  --oy: 49%;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Outfit", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; }
a { color: var(--brand); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -60px; left: 16px; z-index: 60;
  background: var(--ink); color: #fff; text-decoration: none;
  padding: 10px 16px; border-radius: var(--r-sm); font-size: .875rem;
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 16px; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- ambient cosmic wash ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora span {
  position: absolute; display: block; border-radius: 50%;
  filter: blur(70px);
}
.aurora__a {
  width: 46vw; height: 46vw; right: -6vw; top: -10vw;
  background: radial-gradient(circle, rgba(124,77,255,.16), transparent 68%);
}
.aurora__b {
  width: 38vw; height: 38vw; right: 16vw; bottom: -14vw;
  background: radial-gradient(circle, rgba(59,130,246,.13), transparent 68%);
}
.aurora__c {
  width: 30vw; height: 30vw; left: -10vw; bottom: -6vw;
  background: radial-gradient(circle, rgba(249,115,22,.08), transparent 70%);
}

/* ---------- topbar / wordmark ---------- */
.topbar {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: 26px clamp(20px, 4vw, 56px) 0;
  max-width: 1320px; width: 100%; margin: 0 auto;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  border-radius: var(--r-sm);
}
.brand__mark { width: 34px; height: 34px; display: block; }
.logo-img { width: 100%; height: 100%; object-fit: contain; }
.brand__mark svg { width: 100%; height: 100%; display: block; }
.bm-ring {
  fill: none; stroke: var(--brand); stroke-width: 3.2; stroke-linecap: round;
  stroke-dasharray: 78 26;
  transform-origin: center;
}
.bm-ring--2 { stroke: var(--brand-lt); stroke-dasharray: 48 20; }
.bm-core { fill: var(--brand); }

.brand__word {
  font-size: 1.3rem; font-weight: 800; letter-spacing: -.03em;
}
.brand__word em { font-style: normal; color: var(--brand); }

.topbar__tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .74rem; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 6px 13px; border-radius: var(--r-pill);
}
.topbar__dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
  animation: tagPulse 2.4s ease-in-out infinite;
}
@keyframes tagPulse { 0%,100%{opacity:.35} 50%{opacity:1} }

/* ---------- stage ---------- */
.stage {
  position: relative; z-index: 3;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  max-width: 1320px; width: 100%; margin: 0 auto;
  padding: clamp(24px, 4vw, 56px) clamp(20px, 4vw, 56px) clamp(40px, 5vw, 72px);
}
.stage.is-shaking { animation: shake .5s var(--ease) both; }
@keyframes shake {
  0%,100% { transform: translate3d(0,0,0); }
  12% { transform: translate3d(-3px,1px,0); }
  28% { transform: translate3d(3px,-2px,0); }
  44% { transform: translate3d(-2px,-1px,0); }
  62% { transform: translate3d(2px,2px,0); }
  80% { transform: translate3d(-1px,0,0); }
}

/* ---------- panel + view switching ---------- */
.panel { position: relative; min-width: 0; }
.view { display: none; }
.view.is-active { display: block; animation: viewIn .6s var(--ease-out) both; }
.view.is-leaving { display: block; animation: viewOut .24s var(--ease) both; }

@keyframes viewIn {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to   { opacity: 1; transform: none; }
}
@keyframes viewOut {
  from { opacity: 1; transform: none; }
  to   { opacity: 0; transform: translate3d(0, -10px, 0); }
}

/* stagger the hero on first paint */
.view[data-view="hero"].is-active > * { animation: riseIn .7s var(--ease-out) both; }
.view[data-view="hero"].is-active > *:nth-child(1) { animation-delay: .04s }
.view[data-view="hero"].is-active > *:nth-child(2) { animation-delay: .10s }
.view[data-view="hero"].is-active > *:nth-child(3) { animation-delay: .18s }
.view[data-view="hero"].is-active > *:nth-child(4) { animation-delay: .24s }
.view[data-view="hero"].is-active > *:nth-child(5) { animation-delay: .32s }
.view[data-view="hero"].is-active > *:nth-child(6) { animation-delay: .40s }
@keyframes riseIn {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to   { opacity: 1; transform: none; }
}

/* ---------- copy ---------- */
.eyebrow {
  display: inline-block;
  font-size: .73rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand-dk); background: var(--brand-wash);
  padding: 6px 12px; border-radius: var(--r-pill);
  margin-bottom: 22px;
}
.display {
  font-size: clamp(3.2rem, 6.8vw, 5.5rem);
  font-weight: 800; letter-spacing: -.04em; line-height: 1;
  margin-bottom: 20px;
}
.display--sm { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.title {
  font-size: clamp(2.2rem, 3.8vw, 3rem);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.05;
  margin-bottom: 12px;
}
.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  font-weight: 600; color: var(--ink-2); margin-bottom: 12px;
}
.sub {
  font-size: 1rem; color: var(--muted);
  max-width: 42ch; margin-bottom: 24px;
}
.sub--tight { margin-bottom: 26px; }
.micro { font-size: .8rem; color: var(--muted); margin-top: 18px; }

.gift-banner {
  background: rgba(108, 60, 233, 0.08);
  border: 1px solid rgba(108, 60, 233, 0.2);
  padding: 14px 18px;
  border-radius: var(--r-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--brand-dk);
  margin-bottom: 28px;
  max-width: 46ch;
  line-height: 1.45;
}
.gift-banner strong { font-weight: 700; color: var(--brand); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid transparent; cursor: pointer;
  border-radius: var(--r-pill);
  padding: 15px 26px;
  font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  transition: transform .22s var(--ease), box-shadow .28s var(--ease),
              background-color .22s var(--ease), color .22s var(--ease);
  overflow: hidden;
  isolation: isolate;
}
.btn__arrow { transition: transform .28s var(--ease); }

.btn--primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-lt) 100%);
  box-shadow: var(--sh-2);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-3);
}
.btn--primary:hover .btn__arrow { transform: translateX(4px); }
.btn--primary:active { transform: translateY(0) scale(.985); }

/* energy ripple on hover */
.btn--primary::after {
  content: ""; position: absolute; z-index: -1; inset: -40%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.55), transparent 42%);
  opacity: 0; transform: scale(.35);
  transition: opacity .5s var(--ease), transform .7s var(--ease-out);
}
.btn--primary:hover::after { opacity: 1; transform: scale(1); }

.btn--claim.is-pressed { transform: scale(.955); box-shadow: var(--sh-1); }

.btn--ghost {
  color: var(--ink); background: #fff; border-color: var(--line-2);
  box-shadow: var(--sh-1);
}
.btn--ghost:hover { border-color: var(--brand-lt); color: var(--brand-dk); transform: translateY(-1px); }

.btn--quiet {
  background: transparent; color: var(--muted); padding: 15px 14px;
}
.btn--quiet:hover { color: var(--ink); }

/* ---------- form ---------- */
.form { max-width: 460px; }
.field { margin-bottom: 16px; }
.label {
  display: block; font-size: .8rem; font-weight: 600;
  color: var(--ink-2); margin-bottom: 7px; letter-spacing: -.005em;
}

.control { position: relative; display: flex; align-items: stretch; }
.input {
  width: 100%; min-width: 0;
  font: inherit; color: var(--ink);
  background: rgba(250, 250, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(217, 217, 232, 0.8);
  border-radius: var(--r);
  padding: 13px 15px;
  transition: border-color .2s var(--ease), box-shadow .28s var(--ease), background-color .2s var(--ease), transform .2s var(--ease);
}
.select-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6f8d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
  cursor: pointer;
  padding-right: 40px;
}
.input::placeholder { color: #a2a6bd; }
.input:hover { border-color: #c6c6da; }
.input:focus {
  outline: none; background: rgba(255, 255, 255, 0.9);
  border-color: var(--brand-lt);
  box-shadow: 0 0 0 4px rgba(124,77,255,.14), 0 0 22px -6px rgba(124,77,255,.5), inset 0 2px 4px rgba(0,0,0,0.02);
  transform: translateY(-1px);
}
.control--prefixed .control__prefix {
  display: flex; align-items: center;
  padding: 0 4px 0 15px;
  font-weight: 700; color: var(--muted);
  background: rgba(250, 250, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(217, 217, 232, 0.8); border-right: 0;
  border-radius: var(--r) 0 0 var(--r);
  transition: border-color .2s var(--ease), background-color .2s var(--ease), color .2s var(--ease);
}
.control--prefixed .input {
  border-radius: 0 var(--r) var(--r) 0;
  border-left: 0; padding-left: 2px;
}
.control--prefixed:focus-within .control__prefix {
  border-color: var(--brand-lt); background: #fff; color: var(--brand-dk);
}
.control--prefixed:focus-within .input {
  box-shadow: 0 0 0 4px rgba(124,77,255,.14);
}

.field.has-error .input,
.field.has-error .control__prefix { border-color: var(--danger); }
.field.has-error .input:focus { box-shadow: 0 0 0 4px rgba(224,54,79,.13); }

.msg {
  min-height: 1.1em;
  margin-top: 6px;
  font-size: .8rem; color: var(--danger);
}
.msg:empty { min-height: 0; margin-top: 0; }
.msg.is-ok { color: var(--ok); }

/* checkboxes */
.consents {
  margin: 22px 0 26px;
  padding: 16px 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.field--check { margin-bottom: 10px; }
.field--check:last-of-type { margin-bottom: 0; }
.check {
  display: flex; align-items: flex-start; gap: 11px;
  cursor: pointer; font-size: .88rem; color: var(--ink-2);
}
.check__input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.check__box {
  flex: 0 0 auto;
  width: 20px; height: 20px; margin-top: 1px;
  border: 1.5px solid var(--line-2); border-radius: 6px;
  background: #fff;
  position: relative;
  transition: border-color .18s var(--ease), background-color .18s var(--ease), box-shadow .18s var(--ease);
}
.check__box::after {
  content: ""; position: absolute;
  left: 6px; top: 2.5px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(42deg) scale(.4); opacity: 0;
  transition: transform .2s var(--ease), opacity .16s var(--ease);
}
.check__input:checked + .check__box {
  background: var(--brand); border-color: var(--brand);
}
.check__input:checked + .check__box::after { transform: rotate(42deg) scale(1); opacity: 1; }
.check__input:focus-visible + .check__box {
  box-shadow: 0 0 0 4px rgba(124,77,255,.2);
}
.field--check.has-error .check__box { border-color: var(--danger); }
.check__text a { font-weight: 600; }

/* ---------- success ---------- */
.success__mark { display: block; width: 42px; height: 42px; margin-bottom: 20px; }
.success__mark svg { width: 100%; height: 100%; }
.view--success.is-active .bm-ring { animation: markSpin 9s linear infinite; }
@keyframes markSpin { to { transform: rotate(360deg); } }

/* ==========================================================================
   THE ARTIFACT
   ========================================================================== */
.artifact {
  position: relative; min-width: 0;
  display: flex; align-items: center; justify-content: center;
}
.gauntlet {
  width: 100%;
  max-width: 560px;
  height: auto;
  display: block;
  overflow: visible;
  animation: float 9s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translate3d(0,-6px,0); }
  50%     { transform: translate3d(0,6px,0); }
}

.gauntlet__aura { transition: opacity .8s var(--ease); opacity: .85; }
.gauntlet.is-charged .gauntlet__aura { opacity: 1; }

/* orbital rings */
.ring {
  fill: none; stroke: var(--line-2); stroke-width: 1;
  stroke-dasharray: 2 9; opacity: .85;
  transform-origin: 260px 330px;
}
.ring--1 { animation: spin 90s linear infinite; }
.ring--2 { animation: spin 64s linear infinite reverse; stroke-dasharray: 3 14; }
.ring--3 { animation: spin 44s linear infinite; stroke-dasharray: 1 7; }
@keyframes spin { to { transform: rotate(360deg); } }
.gauntlet.is-charged .ring { stroke: rgba(124,77,255,.55); }

/* chassis */
.plate {
  fill: url(#plate); stroke: var(--line-2); stroke-width: 1.4;
  filter: drop-shadow(0 18px 26px rgba(18,19,43,.09));
  transition: stroke .7s var(--ease);
}
.knuckle {
  fill: url(#band); stroke: var(--line-2); stroke-width: 1.4;
  filter: drop-shadow(0 10px 16px rgba(18,19,43,.10));
  transition: stroke .7s var(--ease);
}
.cuff {
  fill: url(#band); stroke: var(--line-2); stroke-width: 1.4;
  transition: stroke .7s var(--ease);
}
.etch, .vent {
  fill: none; stroke: #dcdcea; stroke-width: 1.4; stroke-linecap: round;
  transition: stroke .7s var(--ease);
}
.gauntlet.is-charged .plate,
.gauntlet.is-charged .knuckle,
.gauntlet.is-charged .cuff { stroke: rgba(124,77,255,.5); }
.gauntlet.is-charged .etch,
.gauntlet.is-charged .vent { stroke: rgba(124,77,255,.4); }

/* energy connections */
.link {
  fill: none;
  stroke: #dfdfec; stroke-width: 1.6; stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
  opacity: .7;
  transition: stroke .5s var(--ease), opacity .5s var(--ease), stroke-width .5s var(--ease);
}
.link.is-on {
  stroke: var(--brand-lt); stroke-width: 2.4; opacity: 1;
  animation: linkDraw .75s var(--ease-out) both, linkFlow 2.6s linear .75s infinite;
  filter: drop-shadow(0 0 5px rgba(124,77,255,.8));
}
@keyframes linkDraw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes linkFlow {
  from { stroke-dasharray: 6 8; stroke-dashoffset: 0; }
  to   { stroke-dasharray: 6 8; stroke-dashoffset: -28; }
}

/* ---------- the six stones ---------- */
.stone { color: var(--stone); }
.stone > * { transform-box: fill-box; transform-origin: center; }

.stone__socket {
  fill: url(#socket); stroke: #d6d6e4; stroke-width: 1.4;
}
.stone__core {
  fill: currentColor; opacity: .3;
  transition: opacity .55s var(--ease);
}
.stone__veil {
  fill: #b6b9cc; opacity: .5;
  transition: opacity .55s var(--ease);
}
.stone__spec {
  fill: #fff; opacity: .5;
  transition: opacity .55s var(--ease);
}
.stone__glow {
  fill: currentColor;
  filter: blur(11px);
  opacity: .1;
  transition: opacity .6s var(--ease);
  animation: dormant 5.5s ease-in-out infinite;
}
.stone[data-stone="2"] .stone__glow { animation-delay: -.9s }
.stone[data-stone="3"] .stone__glow { animation-delay: -1.8s }
.stone[data-stone="4"] .stone__glow { animation-delay: -2.7s }
.stone[data-stone="5"] .stone__glow { animation-delay: -3.6s }
.stone[data-stone="6"] .stone__glow { animation-delay: -4.5s }
@keyframes dormant {
  0%,100% { opacity: .07; transform: scale(.94); }
  50%     { opacity: .17; transform: scale(1.03); }
}

.stone__burst {
  fill: none; stroke: currentColor; stroke-width: 2;
  opacity: 0; transform: scale(.5);
}

/* the core stone carries the most presence */
.stone--core .stone__glow { filter: blur(20px); }
.stone--core .stone__socket { stroke-width: 1.8; }
.stone--core .stone__burst { stroke-width: 2.6; }
.stone--core.is-on .stone__glow { opacity: .95; }

/* activated */
.stone.is-on .stone__core { opacity: 1; }
.stone.is-on .stone__veil { opacity: 0; }
.stone.is-on .stone__spec { opacity: .85; }
.stone.is-on .stone__glow {
  opacity: .85;
  animation: alive 2.4s ease-in-out infinite;
}
@keyframes alive {
  0%,100% { opacity: .6; transform: scale(1); }
  50%     { opacity: 1;  transform: scale(1.16); }
}
.stone.is-on .stone__socket {
  stroke: currentColor;
  animation: socketFlare .7s var(--ease-out) both;
}
@keyframes socketFlare {
  0%   { stroke-width: 1.4; }
  35%  { stroke-width: 4; }
  100% { stroke-width: 2; }
}
.stone.is-on .stone__burst { animation: burst .8s var(--ease-out) both; }
@keyframes burst {
  0%   { opacity: .9; transform: scale(.5); stroke-width: 3; }
  70%  { opacity: .22; }
  100% { opacity: 0; transform: scale(2.5); stroke-width: .5; }
}

/* particles (injected by JS) */
.p {
  fill: currentColor; opacity: 0;
  transform-box: fill-box; transform-origin: center;
}
.stone.is-on .p { animation: particle 1.05s var(--ease-out) both; }
@keyframes particle {
  0%   { opacity: 0; transform: translate(0,0) scale(.4); }
  18%  { opacity: .95; }
  100% { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(.15); }
}

/* ==========================================================================
   COSMIC TRANSITION
   ========================================================================== */
.cosmic {
  position: fixed; inset: 0; z-index: 20;
  pointer-events: none; visibility: hidden; opacity: 0;
}
.cosmic.is-firing { visibility: visible; opacity: 1; }

.cosmic__flash {
  position: absolute; left: var(--ox); top: var(--oy);
  width: 160vmax; height: 160vmax; margin: -80vmax 0 0 -80vmax;
  border-radius: 50%;
  background: radial-gradient(circle,
              rgba(255,255,255,.95) 0%,
              rgba(196,168,255,.55) 22%,
              rgba(124,77,255,.18) 42%,
              rgba(124,77,255,0) 62%);
  opacity: 0; transform: scale(.06);
}
.cosmic.is-firing .cosmic__flash { animation: flash 1.4s var(--ease-out) both; }
@keyframes flash {
  0%   { opacity: 0; transform: scale(.06); }
  16%  { opacity: .95; }
  100% { opacity: 0; transform: scale(1); }
}

.cosmic__ring {
  position: absolute; left: var(--ox); top: var(--oy);
  width: 46vmax; height: 46vmax; margin: -23vmax 0 0 -23vmax;
  border-radius: 50%;
  border: 2px solid rgba(124,77,255,.5);
  opacity: 0; transform: scale(.08);
}
.cosmic.is-firing .cosmic__ring { animation: ringOut 1.5s var(--ease-out) both; }
.cosmic.is-firing .cosmic__ring:nth-of-type(2) { animation-delay: .16s; border-color: rgba(59,130,246,.4); }
.cosmic.is-firing .cosmic__ring:nth-of-type(3) { animation-delay: .32s; border-color: rgba(249,115,22,.34); }
@keyframes ringOut {
  0%   { opacity: 0; transform: scale(.08); border-width: 4px; }
  14%  { opacity: .9; }
  100% { opacity: 0; transform: scale(3.2); border-width: .5px; }
}

.cosmic__streaks { position: absolute; inset: 0; }
.cosmic__streaks span {
  position: absolute; left: var(--ox); top: var(--oy);
  width: 62vmax; height: 2px;
  transform-origin: 0 50%;
  background: linear-gradient(90deg, rgba(124,77,255,.85), rgba(124,77,255,0) 78%);
  opacity: 0;
  transform: rotate(var(--a)) scaleX(0);
}
.cosmic.is-firing .cosmic__streaks span {
  animation: streak 1.15s var(--ease-out) both;
  animation-delay: var(--d);
}
@keyframes streak {
  0%   { opacity: 0; transform: rotate(var(--a)) scaleX(0); }
  22%  { opacity: .9; }
  100% { opacity: 0; transform: rotate(var(--a)) scaleX(1); }
}

/* ==========================================================================
   WEB-INSPIRED TRANSITION
   ========================================================================== */
.web {
  position: fixed; inset: 0; z-index: 30;
  pointer-events: none; visibility: hidden;
}
.web.is-in, .web.is-out { visibility: visible; }
.web__svg { position: absolute; inset: 0; width: 100%; height: 100%; }

.web__veil {
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--ox) var(--oy),
              rgba(255,255,255,.99) 0%,
              rgba(243,239,255,.97) 45%,
              rgba(226,218,255,.94) 100%);
  opacity: 0;
}
.web.is-in .web__veil  { animation: veilIn .62s var(--ease-out) .16s both; }
.web.is-out .web__veil { animation: veilOut .6s var(--ease) both; }
@keyframes veilIn  { from { opacity: 0 } to { opacity: 1 } }
@keyframes veilOut { from { opacity: 1 } to { opacity: 0 } }

.web-line {
  fill: none;
  stroke: rgba(108,60,233,.55);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
}
.web-line--ring { stroke: rgba(108,60,233,.4); stroke-width: 1.3; }

.web.is-in .web-line {
  animation: webDraw .52s var(--ease-out) both;
  animation-delay: var(--d, 0s);
}
.web.is-out .web-line {
  animation: webUndraw .5s var(--ease) both;
  animation-delay: var(--d, 0s);
}
@keyframes webDraw   { from { stroke-dashoffset: 100 } to { stroke-dashoffset: 0 } }
@keyframes webUndraw { from { stroke-dashoffset: 0 } to { stroke-dashoffset: -100 } }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 900px) {
  :root { --ox: 50%; --oy: 34%; }

  .stage {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 12px;
    align-content: start;
  }
  /* wordmark → gauntlet → copy → CTA */
  .artifact { order: -1; }
  .gauntlet { max-width: min(74vw, 400px); }
  .panel { text-align: left; }
  .sub { max-width: 46ch; }
  .form { max-width: 100%; }
}

@media (max-width: 560px) {
  .topbar { padding-top: 20px; }
  .topbar__tag { display: none; }
  .gauntlet { max-width: 82vw; margin: 20px auto 0; }
  .display { font-size: clamp(2.8rem, 12vw, 3.6rem); }
  .actions { gap: 8px; }
  .btn { padding: 15px 22px; }
  .btn--primary { width: 100%; justify-content: center; }
  .btn--quiet { width: 100%; justify-content: center; }
  .consents { padding: 14px; }
  .input { padding: 14px 15px; font-size: 1rem; } /* keeps iOS from zooming */
}

@media (max-height: 720px) and (min-width: 901px) {
  .gauntlet { max-width: 440px; }
}

/* ==========================================================================
   REDUCED MOTION — swap the set pieces for quick fades
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .12s !important;
  }
  .view.is-active { animation: none; opacity: 1; transform: none; }
  .view[data-view="hero"].is-active > * { animation: none; opacity: 1; transform: none; }
  .gauntlet { animation: none; }
  .ring { animation: none; }
  .stone__glow { animation: none; opacity: .12; }
  .stone.is-on .stone__glow { animation: none; opacity: .8; }
  .stone.is-on .p { animation: none; opacity: 0; }
  .stone.is-on .stone__burst { animation: none; opacity: 0; }
  .link.is-on { animation: none; stroke-dashoffset: 0; }
  .stage.is-shaking { animation: none; }
  .cosmic, .web { display: none; }
  .btn--primary::after { display: none; }
}
