/* LegacyRO II - pre-launch site (dark theme, owner 2026-11-04). Palette taken from the Scarab Queen emblem:
   plum ink, amethyst, violet crystal, orchid, gold, parchment, olive. */
:root {
  color-scheme: dark;
  --ink: #260e1e;
  --plum: #3b1747;
  --plum-2: #55245f;
  --amethyst: #734a87;
  --violet: #9b3fc4;
  --violet-hi: #c77dea;
  --orchid: #bb5eab;
  --rose: #e2a5b5;
  --gold: #c98a3e;
  --gold-2: #d89d66;
  --gold-hi: #f7d5a5;
  --olive: #6f7240;
  --parchment: #140912;   /* page */
  --paper: #1e0e1c;       /* raised surfaces */
  --paper-2: #26122a;
  --text: #f1e6ee;
  --muted: #bda8b9;
  --head: #f7d5a5;        /* headings: emblem gold */
  --line: rgba(199, 125, 234, .18);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--text);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--violet-hi); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------------------------------------------------------------- top bar */
.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(20, 9, 18, .82);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--head); }
.brand img { width: 38px; height: 38px; }
.brand span { font-family: var(--display); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 15px; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 8px 12px; border-radius: 999px;
}
.nav a:hover, .nav a[aria-current="page"] { background: rgba(199, 125, 234, .14); color: var(--gold-hi); }

/* ---------------------------------------------------------------- hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(50% 48% at 50% 36%, rgba(155, 63, 196, .38), transparent 72%),
    radial-gradient(36% 36% at 80% 72%, rgba(201, 138, 62, .16), transparent 70%),
    radial-gradient(36% 36% at 18% 74%, rgba(187, 94, 171, .16), transparent 70%),
    linear-gradient(180deg, #0e050c 0%, var(--parchment) 100%);
  padding: 32px 0 56px;
  text-align: center;
}
.hero::after { /* gold rule at the foot */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-2) 20%, var(--gold-hi) 50%, var(--gold-2) 80%, transparent);
}
.emblem {
  display: block; margin: 0 auto;
  width: min(460px, 86vw); aspect-ratio: 1; position: relative; z-index: 2;
  border-radius: 18px;
  filter: drop-shadow(0 0 34px rgba(155, 63, 196, .35));
}
.status {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 6px; padding: 6px 14px; border-radius: 999px;
  background: rgba(155, 63, 196, .18); color: var(--gold-hi); border: 1px solid rgba(199, 125, 234, .4);
  font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--violet-hi); box-shadow: 0 0 0 0 rgba(199, 125, 234, .7); animation: ping 2.2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(199, 125, 234, .7); } 80%, 100% { box-shadow: 0 0 0 10px rgba(199, 125, 234, 0); } }
@media (prefers-reduced-motion: reduce) { .status i { animation: none; } html { scroll-behavior: auto; } }
.hero h1 {
  margin: 18px 0 8px;
  font-family: var(--display); font-weight: 700; color: var(--head);
  font-size: clamp(28px, 5vw, 46px); line-height: 1.1; letter-spacing: .02em;
  text-wrap: balance;
}
.hero p.lead { margin: 0 auto; max-width: 640px; color: var(--muted); font-size: clamp(16px, 2.2vw, 18px); text-wrap: pretty; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; text-decoration: none; font-weight: 700;
  border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, var(--violet) 0%, var(--amethyst) 100%);
  box-shadow: 0 8px 20px rgba(115, 74, 135, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { color: #fff; box-shadow: 0 10px 24px rgba(115, 74, 135, .36), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-ghost { color: var(--gold-hi); background: transparent; border-color: rgba(216, 157, 102, .6); }
.btn-ghost:hover { color: #fff; background: rgba(216, 157, 102, .12); }

/* ---------------------------------------------------------------- rates strip */
.rates { background: #0e050c; color: #f4e9f3; border-bottom: 1px solid var(--line); }
.rates .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; }
.rate { padding: 18px 12px; text-align: center; border-right: 1px solid rgba(247, 213, 165, .14); }
.rate:last-child { border-right: 0; }
.rate b { display: block; font-family: var(--display); color: var(--gold-hi); font-size: 22px; letter-spacing: .04em; }
.rate span { font-size: 13px; color: #d9c3d6; }

/* ---------------------------------------------------------------- sections */
section.block { padding: 64px 0; }
section.block.alt { background: var(--paper); border-block: 1px solid var(--line); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--violet-hi); margin: 0 0 6px; }
h2 { font-family: var(--display); color: var(--head); font-size: clamp(24px, 3.4vw, 32px); line-height: 1.2; margin: 0 0 12px; text-wrap: balance; }
h3 { font-family: var(--display); color: var(--head); font-size: 19px; margin: 0 0 6px; }
.intro { color: var(--muted); max-width: 720px; margin: 0 0 28px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; position: relative;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 24px rgba(0, 0, 0, .25);
}
section.block.alt .card { background: var(--paper-2); }
.card::before { /* small crystal mark */
  content: ""; display: block; width: 12px; height: 12px; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--violet-hi), var(--violet));
  transform: rotate(45deg); border-radius: 2px;
  box-shadow: 0 0 0 3px rgba(199, 125, 234, .18);
}
.card p { margin: 0; color: var(--muted); }

.split { display: grid; gap: 32px; grid-template-columns: 1.1fr .9fr; align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { padding-left: 28px; position: relative; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: .55em; width: 9px; height: 9px;
  background: var(--gold-2); transform: rotate(45deg); border-radius: 1px;
}
.ticks li.no::before { background: var(--rose); }

.note {
  border-left: 3px solid var(--violet-hi); background: rgba(155, 63, 196, .12);
  padding: 14px 16px; border-radius: 0 10px 10px 0; color: var(--text);
}

/* ---------------------------------------------------------------- guide page */
.page-head { padding: 40px 0 24px; border-bottom: 1px solid var(--line); background: radial-gradient(60% 120% at 20% 0%, rgba(155, 63, 196, .22), transparent 70%), linear-gradient(180deg, #0e050c, var(--parchment)); }
.page-head h1 { font-family: var(--display); color: var(--head); font-size: clamp(28px, 4.5vw, 40px); margin: 0 0 6px; }
.page-head p { margin: 0; color: var(--muted); max-width: 720px; }
.prose { padding: 32px 0 64px; max-width: 860px; }
.prose h2 { margin-top: 40px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose code { font-size: 13px; background: rgba(199, 125, 234, .14); padding: 1px 6px; border-radius: 6px; color: #ecd2f7; white-space: nowrap; }
.table-scroll { overflow-x: auto; margin: 12px 0 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: rgba(199, 125, 234, .10); color: var(--gold-hi); font-weight: 700; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; color: var(--head); white-space: nowrap; }

/* ---------------------------------------------------------------- footer */
footer { background: #0b0409; color: #a8939f; border-top: 1px solid var(--line); padding: 32px 0; font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
footer a { color: var(--gold-hi); }
footer a:hover { color: #fff; }

@media (max-width: 560px) {
  .brand span { display: none; }
  .nav { flex-wrap: nowrap; gap: 2px; }
  .nav a { padding: 8px 9px; font-size: 13px; white-space: nowrap; }
  .nav a.wide { display: none; }
  section.block { padding: 48px 0; }
  .rate { border-right: 0; border-bottom: 1px solid rgba(247, 213, 165, .14); }
}

/* ---------------------------------------------------------------- emblem motion
   Gentle hover + slow glow pulse + violet crystal shards drifting up.
   Kept restrained on purpose; everything stops for prefers-reduced-motion. */
.emblem-stage { position: relative; width: min(460px, 86vw); margin: 0 auto; isolation: isolate; }
.emblem-stage::before { /* glow that breathes behind the emblem */
  content: ""; position: absolute; inset: 12% 10% 14%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(155, 63, 196, .55), rgba(155, 63, 196, 0));
  filter: blur(18px);
  animation: glow 6s ease-in-out infinite;
}
.emblem-stage .emblem { width: 100%; animation: hover 6s ease-in-out infinite; }
@keyframes hover { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes glow { 0%, 100% { opacity: .55; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.04); } }

.shards { position: absolute; inset: -8% -24% -6%; pointer-events: none; z-index: 3; }
.shard {
  position: absolute; left: var(--x); bottom: var(--y);
  width: var(--sz, 10px); height: calc(var(--sz, 10px) * 1.6);
  background: linear-gradient(160deg, #f8e4ff 0%, var(--violet-hi) 38%, var(--violet) 72%, #5a1f7a 100%);
  clip-path: polygon(50% 0, 100% 45%, 50% 100%, 0 45%);
  filter: drop-shadow(0 0 7px rgba(199, 125, 234, .95));
  opacity: 0;
  animation: rise var(--dur, 9s) linear infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes rise {
  0%   { opacity: 0; transform: translate(0, 0) rotate(0deg) scale(.7); }
  15%  { opacity: 1; }
  70%  { opacity: .75; }
  100% { opacity: 0; transform: translate(var(--dx, 10px), var(--rise, -140px)) rotate(var(--rot, 140deg)) scale(1); }
}
/* 22 shards placed on a ring around the emblem (x/y = start point), each drifting up a little */
.s1  { --x: 2%;  --y: 50%; --sz: 10px; --dur: 9s;   --delay: 0s;   --dx: 10px;  --rot: 160deg; }
.s2  { --x: 6%;  --y: 72%; --sz: 13px; --dur: 11s;  --delay: 2.5s; --dx: -10px; --rot: -120deg; }
.s3  { --x: 6%;  --y: 28%; --sz: 8px;  --dur: 8s;   --delay: 5s;   --dx: 8px;   --rot: 200deg; }
.s4  { --x: 14%; --y: 88%; --sz: 9px;  --dur: 10s;  --delay: 1.2s; --dx: -12px; --rot: 120deg; }
.s5  { --x: 14%; --y: 10%; --sz: 11px; --dur: 9.5s; --delay: 6.5s; --dx: 6px;   --rot: -180deg; }
.s6  { --x: 24%; --y: 98%; --sz: 7px;  --dur: 10s;  --delay: 3.6s; --dx: 12px;  --rot: 150deg; }
.s7  { --x: 26%; --y: 2%;  --sz: 9px;  --dur: 8.5s; --delay: 4.1s; --dx: -8px;  --rot: -140deg; }
.s8  { --x: 38%; --y: 104%;--sz: 12px; --dur: 11.5s;--delay: 0.6s; --dx: 10px;  --rot: 170deg; --rise: -110px; }
.s9  { --x: 40%; --y: -2%; --sz: 7px;  --dur: 10s;  --delay: 7.2s; --dx: -12px; --rot: 130deg; --rise: -90px; }
.s10 { --x: 50%; --y: 106%;--sz: 8px;  --dur: 13s;  --delay: 9s;   --dx: 18px;  --rot: -160deg; --rise: -110px; }
.s11 { --x: 52%; --y: -4%; --sz: 10px; --dur: 9s;   --delay: 2s;   --dx: 8px;   --rot: 150deg; --rise: -90px; }
.s12 { --x: 62%; --y: 104%;--sz: 9px;  --dur: 10.5s;--delay: 5.5s; --dx: -10px; --rot: -130deg; --rise: -110px; }
.s13 { --x: 60%; --y: -2%; --sz: 8px;  --dur: 8.5s; --delay: 3.2s; --dx: 12px;  --rot: 190deg; --rise: -90px; }
.s14 { --x: 76%; --y: 98%; --sz: 11px; --dur: 11s;  --delay: 8.1s; --dx: -14px; --rot: 140deg; }
.s15 { --x: 74%; --y: 2%;  --sz: 9px;  --dur: 9.5s; --delay: 1.8s; --dx: 10px;  --rot: -150deg; }
.s16 { --x: 86%; --y: 88%; --sz: 8px;  --dur: 10s;  --delay: 4.8s; --dx: 8px;   --rot: 170deg; }
.s17 { --x: 86%; --y: 10%; --sz: 12px; --dur: 12s;  --delay: 0.4s; --dx: -10px; --rot: -120deg; }
.s18 { --x: 94%; --y: 72%; --sz: 10px; --dur: 9s;   --delay: 6.9s; --dx: 12px;  --rot: 160deg; }
.s19 { --x: 94%; --y: 28%; --sz: 7px;  --dur: 8s;   --delay: 2.9s; --dx: -8px;  --rot: 200deg; }
.s20 { --x: 98%; --y: 50%; --sz: 9px;  --dur: 10.5s;--delay: 5.9s; --dx: 10px;  --rot: -170deg; }
.s21 { --x: 32%; --y: 60%; --sz: 6px;  --dur: 12s;  --delay: 7.7s; --dx: -6px;  --rot: 140deg; --rise: -100px; }
.s22 { --x: 68%; --y: 40%; --sz: 6px;  --dur: 12.5s;--delay: 3.9s; --dx: 6px;   --rot: -140deg; --rise: -100px; }

@media (prefers-reduced-motion: reduce) {
  .emblem-stage .emblem, .emblem-stage::before { animation: none; }
  .shard { display: none; }
}

/* ---------------------------------------------------------------- pre-registration */
section.block.prereg { background: radial-gradient(60% 80% at 85% 10%, rgba(155, 63, 196, .16), transparent 70%), var(--parchment); }
.prereg-grid { display: grid; gap: 22px; grid-template-columns: 1.15fr .85fr; align-items: start; }
@media (max-width: 860px) { .prereg-grid { grid-template-columns: 1fr; } }
.form::before, .tracker::before { display: none; }
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-weight: 600; font-size: 14px; color: var(--head); padding: 0; }
.row2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.form input[type=text], .form input:not([type]), .form input[type=email], .form input[type=password] {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  background: #120810; color: var(--text); font: inherit;
  border: 1px solid rgba(199, 125, 234, .28);
}
.form input:focus { outline: none; border-color: var(--violet-hi); box-shadow: 0 0 0 3px rgba(199, 125, 234, .2); }
.form input[aria-invalid="true"] { border-color: #ef6b86; }
.sex { grid-auto-flow: column; justify-content: start; gap: 18px; align-items: center; }
.sex legend { margin-bottom: 6px; }
.sex label { font-weight: 500; color: var(--text); display: inline-flex; gap: 8px; align-items: center; }
.sex .err { grid-column: 1 / -1; }
input[type=radio], input[type=checkbox] { accent-color: var(--violet-hi); width: 18px; height: 18px; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.agree input { margin-top: 2px; flex: none; }
.hint { color: var(--muted); font-size: 13px; }
.err { color: #ff8fa6; font-size: 13px; min-height: 0; }
.err:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.form .btn[disabled] { opacity: .6; cursor: progress; }
.form-msg { margin: 0; font-weight: 600; }
.form-msg.ok { color: #9be7b4; }
.form-msg.bad { color: #ff8fa6; }

.tracker .count { margin: 0; display: flex; align-items: baseline; gap: 10px; }
.tracker .count b { font-family: var(--display); font-size: clamp(40px, 6vw, 56px); color: var(--gold-hi); line-height: 1; font-variant-numeric: tabular-nums; }
.tracker .count span { color: var(--muted); }
.bar { height: 10px; border-radius: 999px; background: rgba(199, 125, 234, .14); overflow: hidden; margin: 16px 0 8px; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--violet), var(--violet-hi), var(--gold-hi)); transition: width .8s ease; }
.next { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.milestones { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.milestones li {
  display: grid; grid-template-columns: 74px 1fr; gap: 12px; align-items: center;
  padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02);
}
.milestones li b { font-family: var(--display); color: var(--head); font-variant-numeric: tabular-nums; }
.milestones li span { color: var(--muted); font-size: 14px; }
.milestones li.done { border-color: rgba(155, 231, 180, .45); background: rgba(155, 231, 180, .06); }
.milestones li.done span::after { content: "  ✓ unlocked"; color: #9be7b4; font-weight: 700; }
.milestones li.next-goal { border-color: rgba(199, 125, 234, .55); }
.small { font-size: 13px; color: var(--muted); margin: 0; }

/* ---------------------------------------------------------------- Discord step (pre-register) */
.dc .label { font-weight: 600; font-size: 14px; color: var(--head); }
.btn-discord { justify-self: start; display: inline-flex; align-items: center; gap: 10px; color: #fff; background: #5865f2; border: 0; text-decoration: none; }
.btn-discord:hover { color: #fff; background: #4752c4; }
.dc-linked { display: none; margin: 0; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 10px 14px; border-radius: 10px;
  background: rgba(88, 101, 242, .14); border: 1px solid rgba(88, 101, 242, .45); color: var(--text); }
.dc-linked b { color: var(--gold-hi); overflow-wrap: anywhere; }
.dc-ok { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #3ba55d; color: #fff; font-size: 12px; font-weight: 700; }
.dc[data-state="linked"] .btn-discord { display: none; }
.dc[data-state="linked"] .dc-linked { display: flex; }
.dc[data-state="loading"] .btn-discord { opacity: .6; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--violet-hi); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn:hover { color: var(--gold-hi); }
[hidden] { display: none !important; }
.prose p .btn { margin: 4px 8px 4px 0; }
