/* TECHNOVATION — THE FIVE REALMS
   Layout: fixed painted world behind; HUD (framed top nav, left realm dock); content floats in ornate frames.
   Single deliberate dark look (dark-fantasy game UI). */
:root {
  --ink-0: #07070a;
  --ink-1: #0e0c11;
  --ink-2: #17141b;
  --parch: #ece2c8;
  --parch-dim: #b8ad94;
  --mute: #8a8274;
  --gold: #d4af5a;
  --gold-hi: #f7dd96;
  --gold-lo: #7d5f25;
  --steel: #a7b0ba;
  --earth: #c08a4a;
  --fire: #ef6a33;
  --water: #3aa7b4;
  --air: #a9c8de;
  --ether: #9a7cf0;
  --ink: #f2efe8;
  --rc: var(--gold);
  --f-display: "Cinzel Decorative", "Cinzel", "Trajan Pro", Georgia, serif;
  --f-head: "Cinzel", "Trajan Pro", Georgia, serif;
  --f-body: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --f-hud: "Chakra Petch", "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --f-rune: "Noto Sans Runic", "Segoe UI Historic", serif;
  --hud-h: 92px;
  --dock-w: 96px;
  --gutter: clamp(16px, 3vw, 40px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--ink-0); overflow-x: clip; }
body {
  margin: 0; background: var(--ink-0); color: var(--parch);
  font: 400 1.08rem/1.6 var(--f-body);
  overflow-x: clip; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
body.locked { overflow: hidden; }

/* ================= GATE (monochrome) ================= */
#gate {
  position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; overflow: hidden;
  display: grid; place-items: center; padding: 24px 16px;
  clip-path: circle(150% at 50% 50%);
  transition: clip-path 1.3s cubic-bezier(.7, 0, .2, 1), opacity 1.3s;
}
#gate.leaving { clip-path: circle(0% at 50% 50%); }
#gate-fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.gate-inner { position: relative; display: grid; justify-items: center; gap: 18px; text-align: center; width: min(720px, 100%); }
.gate-sigil { position: absolute; width: min(860px, 150vw); aspect-ratio: 1; left: 50%; top: 42%; translate: -50% -50%; opacity: .5; pointer-events: none; }
.gate-logo { position: relative; width: min(560px, 86vw); filter: drop-shadow(0 0 18px rgba(255,255,255,.18)); animation: flick 6s infinite; }
@keyframes flick { 0%, 100% { opacity: 1 } 47% { opacity: 1 } 48% { opacity: .82 } 49% { opacity: 1 } 77% { opacity: .9 } 78% { opacity: 1 } }
.gate-sub { position: relative; font: 600 .78rem/1.4 var(--f-hud); letter-spacing: .32em; text-transform: uppercase; color: #cfcfcf; }
.gate-load { position: relative; width: min(420px, 80vw); display: grid; gap: 14px; margin-top: 8px; }
.gate-bar { height: 2px; background: rgba(255,255,255,.15); position: relative; }
.gate-bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: #fff; box-shadow: 0 0 12px #fff; transition: width .2s; }
.gate-tip { font: italic 400 1rem/1.5 var(--f-body); color: #bdbdbd; min-height: 3em; }
.gate-actions { position: relative; display: grid; gap: 12px; justify-items: center; margin-top: 6px; }
.btn-gate {
  font: 700 1.05rem/1 var(--f-head); letter-spacing: .28em; text-transform: uppercase; color: #fff;
  background: transparent; border: 1px solid rgba(255,255,255,.75); padding: 18px 34px; cursor: pointer; position: relative;
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
  animation: breathe 2.6s ease-in-out infinite;
}
.btn-gate::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(255,255,255,.3); clip-path: inherit; }
.btn-gate:hover { background: #fff; color: #000; }
@keyframes breathe { 50% { box-shadow: 0 0 34px rgba(255,255,255,.35); text-shadow: 0 0 12px #fff; } }
.btn-quiet { background: none; border: 0; color: #9a9a9a; font: 500 .85rem var(--f-hud); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; padding: 8px; }
.btn-quiet:hover { color: #fff; }

/* ================= WORLD ================= */
#world { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--ink-0); }
#world canvas, #scene-img { position: absolute; inset: 0; width: 100%; height: 100%; }
#scene-bg, #scene-bg-b { opacity: 0; transition: opacity 1.4s ease; will-change: opacity, transform; }
#scene-bg.on, #scene-bg-b.on { opacity: 1; }
#scene-img { background: center / cover no-repeat; opacity: 0; transition: opacity 1.2s; }
#world.has-img #scene-img { opacity: 1; }
#world.has-img #scene-bg, #world.has-img #scene-bg-b { opacity: 0 !important; }
#scene-fx { mix-blend-mode: screen; }
#vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 70% at 50% 45%, transparent 40%, rgba(0,0,0,.65) 100%),
    linear-gradient(180deg, rgba(0,0,0,.55) 0, transparent 18%, transparent 70%, rgba(0,0,0,.75) 100%);
}
#vignette::after { content: ""; position: absolute; inset: 0; background-image: var(--grain); opacity: .09; mix-blend-mode: overlay; }

/* ================= HUD ================= */
#hud-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: var(--hud-h);
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  background: linear-gradient(180deg, rgba(5,4,7,.85), rgba(5,4,7,0));
}
.hud-logo img { width: 112px; filter: drop-shadow(0 0 8px rgba(255,220,150,.35)); }
.hud-nav { position: relative; justify-self: center; display: flex; gap: clamp(14px, 2.4vw, 40px); padding: 14px 70px 24px; }
.nav-frame { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.nf-fill { fill: rgba(16,13,18,.82); }
.nf-line { fill: none; stroke: var(--gold); stroke-opacity: .7; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.nf-hair { stroke: var(--gold); stroke-opacity: .25; stroke-width: 1; vector-effect: non-scaling-stroke; }
.hud-nav a {
  position: relative; text-decoration: none; font: 700 .95rem/1 var(--f-hud); letter-spacing: .16em; text-transform: uppercase; color: var(--parch);
  padding: 6px 0; transition: color .2s, text-shadow .2s;
}
.hud-nav a::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 6px; height: 6px; background: var(--gold-hi); rotate: 45deg; translate: -50% 0; scale: 0; transition: scale .2s; }
.hud-nav a:hover, .hud-nav a.on { color: var(--gold-hi); text-shadow: 0 0 14px rgba(247,221,150,.6); }
.hud-nav a.on::after { scale: 1; }
.hud-right { display: flex; gap: 10px; }
.hud-btn {
  width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer;
  background: rgba(16,13,18,.82); border: 1px solid rgba(212,175,90,.55);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.hud-btn:hover { border-color: var(--gold-hi); background: rgba(40,30,20,.9); }
.eq { display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.eq i { width: 3px; height: 4px; background: var(--gold-hi); }
.sound-on .eq i { animation: eq 1s ease-in-out infinite; }
.sound-on .eq i:nth-child(2) { animation-delay: -.3s } .sound-on .eq i:nth-child(3) { animation-delay: -.6s } .sound-on .eq i:nth-child(4) { animation-delay: -.15s }
@keyframes eq { 50% { height: 18px } }
#menu-toggle { display: none; }
.burger { display: grid; gap: 5px; } .burger i { width: 20px; height: 2px; background: var(--gold-hi); }

#dock {
  position: fixed; z-index: 35; left: var(--gutter); top: 50%; translate: 0 -50%;
  display: grid; gap: 6px; padding: 14px 8px; width: 76px;
  background: rgba(12,10,14,.78); border: 1px solid rgba(212,175,90,.35); border-radius: 4px;
  backdrop-filter: blur(6px);
}
#dock::before, #dock::after { content: ""; position: absolute; left: 50%; width: 10px; height: 10px; background: var(--gold); rotate: 45deg; translate: -50% 0; }
#dock::before { top: -6px; } #dock::after { bottom: -6px; }
.dock-a { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; text-decoration: none; color: var(--parch-dim); font: 600 .66rem/1 var(--f-hud); letter-spacing: .12em; text-transform: uppercase; border-radius: 3px; transition: color .2s, background .2s; }
.dock-a .glyph { width: 30px; height: 30px; stroke: var(--rc); }
.dock-a:hover, .dock-a.on { color: var(--parch); background: color-mix(in srgb, var(--rc) 18%, transparent); }
.dock-a.on .glyph { filter: drop-shadow(0 0 6px var(--rc)); }

/* ================= GLYPHS / SIGIL ================= */
.glyph { fill: none; stroke: currentColor; stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; }
.glyph .fillc, .m-glyph .fillc { fill: currentColor; }
.medal { width: 100%; height: 100%; overflow: visible; color: var(--rc); }
.m-gear { fill: none; stroke: var(--rc); stroke-opacity: .7; stroke-width: 1.5; }
.medal-gear { transform-origin: 100px 100px; animation: spin 40s linear infinite; }
.m-ring { fill: rgba(8,6,10,.55); stroke: var(--rc); stroke-width: 2; }
.m-ring.thin { fill: none; stroke-width: .8; stroke-opacity: .6; }
.m-glyph path, .m-glyph circle { fill: none; stroke: var(--rc); stroke-width: 4.5; stroke-linejoin: round; stroke-linecap: round; }
.m-glyph .fillc { fill: var(--rc); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spinr { to { transform: rotate(-360deg); } }

.sigil { width: 100%; height: 100%; overflow: visible; }
.sigil [class^="sg-rot"] { transform-origin: 300px 300px; }
.sg-rot-a { animation: spin 120s linear infinite; }
.sg-rot-b { animation: spinr 160s linear infinite; }
.sg-rot-c { animation: spin 90s linear infinite; }
.sg-rot-d { animation: spinr 30s linear infinite; }
.sg-gear { fill: none; stroke: var(--gold); stroke-opacity: .55; stroke-width: 1.4; }
.sg-gear.inner { stroke-opacity: .7; }
.sg-line { fill: none; stroke: var(--gold); stroke-opacity: .45; stroke-width: 1.2; }
.sg-line.thin { stroke-width: .7; stroke-opacity: .35; }
.sg-line.dash { stroke-dasharray: 2 6; }
.sg-tick { stroke: var(--gold); stroke-opacity: .5; stroke-width: 1; }
.sg-star { fill: none; stroke: var(--gold-hi); stroke-opacity: .35; stroke-width: 1; }
.sg-runes { font: 22px var(--f-rune); fill: var(--gold); fill-opacity: .55; letter-spacing: 6px; }
.sg-node-bg { fill: rgba(8,6,10,.9); stroke: var(--rc); stroke-width: 2.5; }
.sg-node path, .sg-node circle:not(.sg-node-bg) { fill: none; stroke: var(--rc); stroke-width: 5; stroke-linejoin: round; }
.sg-node .fillc { fill: var(--rc); }
.sg-node { filter: drop-shadow(0 0 8px var(--rc)); transition: filter .3s; }
.sigil.mono .sg-gear, .sigil.mono .sg-line, .sigil.mono .sg-tick, .sigil.mono .sg-star { stroke: #fff; }
.sigil.mono .sg-runes { fill: #fff; fill-opacity: .4; }
.sigil.mono .sg-node { filter: none; }

/* ================= LAYOUT ================= */
#view { position: relative; z-index: 10; min-height: 100vh; padding: calc(var(--hud-h) + env(safe-area-inset-top, 0px)) var(--gutter) 0 calc(var(--dock-w) + var(--gutter)); outline: none; }
.wrap { width: min(1180px, 100%); margin-inline: auto; }
.sec { padding-block: clamp(56px, 9vw, 120px); display: grid; gap: clamp(28px, 4vw, 48px); }
.rise { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
@keyframes rise { from { transform: translateY(18px); opacity: .5; } }
.kicker { font: 700 .78rem/1.2 var(--f-hud); letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
.lede { font-size: 1.2rem; color: var(--parch-dim); max-width: 62ch; }

.divider { display: flex; align-items: center; gap: 14px; }
.dv-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, rgba(212,175,90,.6)); }
.dv-line:last-child { background: linear-gradient(90deg, rgba(212,175,90,.6), transparent); }
.dv-gems { display: flex; align-items: center; gap: 6px; }
.dv-gems i { width: 14px; height: 14px; background: linear-gradient(135deg, var(--gold-hi), var(--gold-lo)); rotate: 45deg; box-shadow: 0 0 10px rgba(247,221,150,.5); }
.dv-gems i.s { width: 8px; height: 8px; }
.dv-title { font: 800 clamp(1.7rem, 4.2vw, 3.2rem)/1.1 var(--f-head); letter-spacing: .08em; text-transform: uppercase; text-align: center; color: var(--parch); text-shadow: 0 2px 24px rgba(0,0,0,.8); }

/* ================= FRAME ================= */
.frame {
  position: relative; padding: clamp(22px, 3vw, 36px);
  background: linear-gradient(180deg, rgba(18,15,20,.82), rgba(8,7,10,.9));
  border: 1px solid rgba(212,175,90,.5);
  box-shadow: inset 0 0 0 4px rgba(0,0,0,.45), inset 0 0 0 5px rgba(212,175,90,.16), 0 20px 50px rgba(0,0,0,.55);
  backdrop-filter: blur(5px);
  min-width: 0;
}
.frame > .crest { position: absolute; left: 50%; top: -20px; width: min(320px, 80%); height: auto; aspect-ratio: 9 / 1; translate: -50% 0; overflow: visible; pointer-events: none; }
.frame > .crest.foot { top: calc(100% - 7px); bottom: auto; width: min(240px, 60%); height: 14px; max-height: 14px; aspect-ratio: auto; }
.cr-line { fill: none; stroke: var(--rc); stroke-width: 2; }
.cr-line.thin { stroke-width: 1; stroke-opacity: .55; }
.cr-fill { fill: #0d0b0f; stroke: var(--rc); stroke-width: 1.5; }
.cr-gem { fill: var(--rc); filter: drop-shadow(0 0 4px var(--rc)); }
.cr-hatch { stroke: var(--rc); stroke-width: 5; stroke-dasharray: 2 3; stroke-opacity: .5; }
.cr-dot { fill: none; stroke: var(--rc); stroke-width: 1.5; }
.corners { position: absolute; inset: -6px; pointer-events: none; }
.corner { position: absolute; width: 34px; height: 34px; }
.corner:nth-child(1) { left: 0; top: 0; }
.corner:nth-child(2) { right: 0; top: 0; rotate: 90deg; }
.corner:nth-child(3) { right: 0; bottom: 0; rotate: 180deg; }
.corner:nth-child(4) { left: 0; bottom: 0; rotate: 270deg; }
.cn-line { fill: none; stroke: var(--rc); stroke-width: 2.2; }
.cn-line.thin { stroke-width: 1; stroke-opacity: .6; }
.cn-gem { fill: var(--rc); }

/* ================= BUTTONS ================= */
.btn {
  --b: var(--rc);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 700 .9rem/1 var(--f-hud); letter-spacing: .2em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  padding: 15px 26px; color: var(--parch); background: var(--b); border: 0;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  transition: color .2s, filter .2s;
}
.btn::before { content: ""; position: absolute; inset: 1.5px; background: #0d0b10; clip-path: inherit; z-index: -1; transition: background .25s; }
.btn { isolation: isolate; }
.btn:hover { color: #120d06; filter: drop-shadow(0 0 12px color-mix(in srgb, var(--b) 70%, transparent)); }
.btn:hover::before { background: var(--b); }
.btn.solid::before { background: linear-gradient(180deg, color-mix(in srgb, var(--b) 85%, #fff), var(--b)); }
.btn.solid { color: #120d06; }
.btn.solid:hover::before { background: var(--gold-hi); }
.btn[aria-disabled="true"] { cursor: default; color: var(--mute); --b: #4a4438; }
.btn[aria-disabled="true"]:hover { color: var(--mute); filter: none; }
.btn[aria-disabled="true"]:hover::before { background: #0d0b10; }
.btn .arr { font-family: var(--f-body); letter-spacing: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

.soon { display: inline-flex; align-items: center; gap: 8px; font: 600 .8rem/1 var(--f-hud); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.soon::before { content: ""; width: 7px; height: 7px; rotate: 45deg; border: 1px solid var(--gold); animation: pulse 2s infinite; }
@keyframes pulse { 50% { background: var(--gold); box-shadow: 0 0 8px var(--gold); } }

/* ================= HOME HERO ================= */
.hero { position: relative; overflow: hidden; min-height: calc(100svh - var(--hud-h)); display: grid; place-items: center; text-align: center; padding-block: 20px 80px; }
.hero-sigil { position: absolute; width: min(900px, 130vw); aspect-ratio: 1; left: 50%; top: 46%; translate: -50% -50%; opacity: .55; pointer-events: none; }
.hero-inner { position: relative; display: grid; justify-items: center; gap: clamp(10px, 1.6vw, 18px); }
.hero-eyebrow { font: 600 clamp(.7rem, 1.4vw, .85rem)/1.4 var(--f-hud); letter-spacing: .34em; text-transform: uppercase; color: var(--parch-dim); }
.hero-logo { width: min(520px, 80vw); filter: drop-shadow(0 0 2px rgba(255,255,255,.4)) drop-shadow(0 0 30px rgba(255,200,120,.35)); }
.hero-title {
  font: 900 clamp(2.2rem, 7.4vw, 6.4rem)/1 var(--f-display); letter-spacing: .04em;
  background: linear-gradient(180deg, #fff6d8 0%, #f3cf7a 38%, #a57828 62%, #f6dc94 80%, #8a6a2a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: url(#erode) drop-shadow(0 4px 0 rgba(0,0,0,.6)) drop-shadow(0 0 28px rgba(255,180,90,.35));
}
.hero-kick { font: 700 clamp(.85rem, 1.6vw, 1.1rem)/1 var(--f-head); letter-spacing: .5em; color: var(--gold-hi); text-transform: uppercase; margin-bottom: -4px; }
.hero-title small { display: block; font: 700 clamp(.85rem, 1.6vw, 1.1rem)/1 var(--f-head); letter-spacing: .5em; margin-bottom: .6em; }
.hero-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 22px; font: 600 clamp(.9rem, 1.8vw, 1.15rem)/1.2 var(--f-head); letter-spacing: .12em; color: var(--parch); }
.hero-meta .dot { width: 8px; height: 8px; rotate: 45deg; background: var(--gold); }
.scroll-cue { position: absolute; bottom: 18px; left: 50%; translate: -50% 0; display: grid; justify-items: center; gap: 8px; font: 700 .7rem var(--f-hud); letter-spacing: .3em; color: var(--parch-dim); text-decoration: none; }
.scroll-cue i { width: 1px; height: 42px; background: linear-gradient(var(--gold-hi), transparent); animation: drip 2s infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0) } 60% { transform: scaleY(1) } 100% { transform: scaleY(1); opacity: 0 } }

/* countdown */
.count { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 2vw, 22px); text-align: center; }
.count div { display: grid; gap: 6px; }
.count b { font: 700 clamp(2rem, 6vw, 4rem)/1 var(--f-head); color: var(--gold-hi); font-variant-numeric: tabular-nums; text-shadow: 0 0 22px rgba(247,221,150,.4); }
.count span { font: 600 .72rem/1 var(--f-hud); letter-spacing: .26em; text-transform: uppercase; color: var(--parch-dim); }
.count-wrap { display: grid; gap: 22px; justify-items: center; text-align: center; }

/* ================= REALM RING ================= */
.ring { position: relative; width: min(760px, 100%); aspect-ratio: 1; margin-inline: auto; }
.ring-core { position: absolute; inset: 27%; display: grid; place-content: center; text-align: center; gap: 8px; padding: 10px; }
.ring-core .rc-name { font: 900 clamp(1.4rem, 4vw, 2.6rem)/1 var(--f-display); color: var(--rc); text-shadow: 0 0 24px color-mix(in srgb, var(--rc) 50%, transparent); transition: color .4s; }
.ring-core .rc-pillar { font: 700 .8rem/1.3 var(--f-hud); letter-spacing: .22em; text-transform: uppercase; color: var(--parch); }
.ring-core .rc-line { font-size: clamp(.85rem, 1.6vw, 1rem); color: var(--parch-dim); max-width: 30ch; margin-inline: auto; }
.ring-core .rc-count { font: 600 .75rem var(--f-hud); letter-spacing: .2em; color: var(--rc); text-transform: uppercase; }
.ring-svg { position: absolute; inset: 0; }
.ring-svg circle { fill: none; stroke: var(--gold); stroke-opacity: .25; }
.realm-node { position: absolute; width: 22%; aspect-ratio: 1; translate: -50% -50%; display: grid; justify-items: center; text-decoration: none; transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.realm-node .medal { filter: drop-shadow(0 0 12px color-mix(in srgb, var(--rc) 40%, transparent)); }
.realm-node:hover, .realm-node.on { transform: scale(1.12); }
.realm-node:hover .medal, .realm-node.on .medal { filter: drop-shadow(0 0 26px var(--rc)); }
.realm-node .rn-label { position: absolute; top: 100%; margin-top: 6px; font: 700 clamp(.7rem, 1.4vw, .9rem)/1.2 var(--f-head); letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; color: var(--parch); text-shadow: 0 2px 10px #000; }
.realm-node .rn-label small { display: block; font: 600 .62rem/1.4 var(--f-hud); letter-spacing: .16em; color: var(--rc); }

/* pillars */
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.pillar { text-align: center; display: grid; gap: 10px; justify-items: center; padding-top: 34px; }
.pillar h3 { font: 700 1.25rem/1.2 var(--f-head); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-hi); }
.pillar p { color: var(--parch-dim); font-size: 1rem; }
.pillar .pi { width: 54px; height: 54px; color: var(--gold); }
.pillar .pi .ticon { width: 100%; height: 100%; }

/* ================= ROADMAP (quest path) ================= */
.path { position: relative; display: grid; gap: 0; padding-left: 0; list-style: none; margin: 0; }
.path li { position: relative; display: grid; grid-template-columns: 70px 1fr; gap: 18px; align-items: start; padding-bottom: 34px; }
.path li:last-child { padding-bottom: 0; }
.path li::before { content: ""; position: absolute; left: 34px; top: 46px; bottom: -4px; width: 2px; background: linear-gradient(var(--rc), color-mix(in srgb, var(--rc) 20%, transparent)); }
.path li:last-child::before { display: none; }
.path li.sealed::before { background: repeating-linear-gradient(var(--mute) 0 6px, transparent 6px 12px); opacity: .6; }
.wp { width: 70px; height: 46px; display: grid; place-items: center; position: relative; }
.wp i { width: 26px; height: 26px; rotate: 45deg; border: 2px solid var(--rc); background: #0c0a0e; display: grid; place-items: center; box-shadow: 0 0 16px color-mix(in srgb, var(--rc) 60%, transparent); }
.wp i b { rotate: -45deg; font: 700 .8rem/1 var(--f-hud); color: var(--rc); }
.path li.sealed .wp i { border-color: var(--mute); box-shadow: none; }
.path li.sealed .wp i b { color: var(--mute); }
.path li.lit .wp i { background: var(--rc); } .path li.lit .wp i b { color: #120d06; }
.step h3 { font: 700 1.2rem/1.3 var(--f-head); letter-spacing: .06em; color: var(--parch); }
.step .when { font: 600 .82rem/1.4 var(--f-hud); letter-spacing: .14em; text-transform: uppercase; color: var(--rc); margin-top: 4px; }
.step p { color: var(--parch-dim); font-size: .98rem; margin-top: 4px; }
.path li.sealed .step h3 { color: var(--parch-dim); }
.days { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; }
.day-head { font: 800 1.4rem/1 var(--f-head); letter-spacing: .14em; text-transform: uppercase; color: var(--rc); margin-bottom: 22px; display: flex; align-items: center; gap: 12px; }
.day-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--rc), transparent); }

/* ================= ABOUT ================= */
.about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; }
.about h3 { font: 700 1.5rem/1.2 var(--f-head); color: var(--gold-hi); margin-bottom: 12px; letter-spacing: .04em; }
.about p { color: var(--parch-dim); max-width: 60ch; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { text-align: center; padding: 18px 8px; border-top: 1px solid rgba(212,175,90,.4); border-bottom: 1px solid rgba(212,175,90,.4); }
.stat b { display: block; font: 700 clamp(1.8rem, 4vw, 2.8rem)/1 var(--f-head); color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.stat span { font: 600 .74rem/1.3 var(--f-hud); letter-spacing: .18em; text-transform: uppercase; color: var(--parch-dim); }
.tenets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.tenet h4 { margin: 0 0 6px; font: 700 .85rem/1 var(--f-hud); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.tenet p { font-size: .98rem; color: var(--parch-dim); }

.callouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px; }
.callout { display: grid; gap: 14px; align-content: start; }
.callout h3 { font: 800 1.7rem/1.15 var(--f-head); letter-spacing: .04em; color: var(--parch); }
.callout p { color: var(--parch-dim); }

/* ================= REALM PAGE ================= */
.realm-hero { display: grid; justify-items: center; text-align: center; gap: 14px; padding-block: clamp(30px, 6vw, 70px) 10px; }
.realm-hero .rh-medal { width: clamp(110px, 16vw, 170px); aspect-ratio: 1; }
.realm-title {
  font: 900 clamp(3.4rem, 13vw, 10rem)/.9 var(--f-display); letter-spacing: .06em; text-transform: uppercase;
  color: var(--parch); filter: url(#erode) drop-shadow(0 6px 0 rgba(0,0,0,.6)) drop-shadow(0 0 40px color-mix(in srgb, var(--rc) 55%, transparent));
}
.realm-sub { font: 700 clamp(.85rem, 1.8vw, 1.05rem)/1.4 var(--f-head); letter-spacing: .3em; text-transform: uppercase; color: var(--rc); }
.realm-pillar { font: 600 .9rem/1 var(--f-hud); letter-spacing: .24em; text-transform: uppercase; color: var(--parch); padding: 10px 18px; border: 1px solid color-mix(in srgb, var(--rc) 60%, transparent); background: rgba(0,0,0,.45); }
.realm-line { max-width: 56ch; font-size: 1.2rem; color: var(--parch); text-shadow: 0 2px 12px #000; }
.realm-nav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ================= TRIAL CARDS ================= */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 272px), 1fr)); gap: 44px 28px; padding-top: 22px; }
.tcard { padding: 14px 14px 0; display: grid; grid-template-rows: auto auto auto 1fr auto auto; gap: 14px; transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; }
.tcard:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 4px rgba(0,0,0,.45), inset 0 0 0 5px color-mix(in srgb, var(--rc) 40%, transparent), 0 30px 60px rgba(0,0,0,.6), 0 0 40px color-mix(in srgb, var(--rc) 25%, transparent); }
.tc-art {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--rc) 38%, transparent), transparent 62%), linear-gradient(180deg, #120f16, #07060a);
  clip-path: polygon(0 0, 100% 0, 100% 86%, 62% 86%, 56% 100%, 44% 100%, 38% 86%, 0 86%);
}
.tc-art .tc-gear { position: absolute; width: 120%; aspect-ratio: 1; opacity: .2; animation: spin 60s linear infinite; }
.tc-art .tc-gear path { fill: none; stroke: var(--rc); stroke-width: .8; }
.tc-art .ticon { position: relative; width: 44%; height: auto; color: var(--parch); filter: drop-shadow(0 0 10px var(--rc)); transition: transform .5s; }
.tcard:hover .tc-art .ticon { transform: scale(1.08) rotate(-3deg); }
.tc-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ticon { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ticon .fillc { fill: currentColor; }
.ticon .thin { stroke-width: 1.2; }
.ticon .track { stroke-dasharray: 3 3; }
.tc-tags { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.tag { font: 600 .66rem/1 var(--f-hud); letter-spacing: .18em; text-transform: uppercase; padding: 6px 9px; border: 1px solid color-mix(in srgb, var(--rc) 55%, transparent); color: var(--rc); }
.tag.realm { display: inline-flex; align-items: center; gap: 6px; }
.tag.realm .glyph { width: 12px; height: 12px; stroke-width: 8; }
.tc-name { text-align: center; font: 700 1.3rem/1.2 var(--f-head); color: var(--parch); }
.tc-desc { text-align: center; color: var(--parch-dim); font-size: .98rem; }
.tc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tc-btns .btn { padding: 13px 10px; font-size: .76rem; letter-spacing: .14em; }
.tc-bar { margin: 0 -14px; padding: 12px 16px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; background: linear-gradient(90deg, color-mix(in srgb, var(--rc) 55%, #1a0d08), color-mix(in srgb, var(--rc) 30%, #0d0806)); font: 700 .74rem/1.2 var(--f-hud); letter-spacing: .16em; text-transform: uppercase; color: #fff8ea; }
.tc-bar em { font-style: normal; opacity: .85; }

.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chip { font: 600 .78rem/1 var(--f-hud); letter-spacing: .16em; text-transform: uppercase; padding: 11px 16px; cursor: pointer; background: rgba(12,10,14,.75); color: var(--parch-dim); border: 1px solid rgba(212,175,90,.3); display: inline-flex; gap: 8px; align-items: center; }
.chip .glyph { width: 14px; height: 14px; stroke-width: 8; stroke: var(--rc); }
.chip[aria-pressed="true"] { color: #120d06; background: var(--rc); border-color: var(--rc); }
.chip[aria-pressed="true"] .glyph { stroke: #120d06; }

/* ================= TRIAL PAGE ================= */
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; font: 600 .75rem/1 var(--f-hud); letter-spacing: .18em; text-transform: uppercase; color: var(--parch-dim); padding-top: 28px; }
.crumbs a { text-decoration: none; color: var(--rc); }
.trial-head { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 36px; align-items: center; }
.trial-emblem { position: relative; width: 200px; aspect-ratio: 1; display: grid; place-items: center; }
.trial-emblem .medal { position: absolute; inset: 0; }
.trial-emblem .medal .m-glyph { display: none; }
.trial-emblem .ticon { position: relative; width: 44%; color: var(--parch); filter: drop-shadow(0 0 10px var(--rc)); }
.trial-name { font: 900 clamp(2.2rem, 6vw, 4.6rem)/1 var(--f-display); color: var(--parch); filter: url(#erode) drop-shadow(0 0 30px color-mix(in srgb, var(--rc) 45%, transparent)); margin-block: 10px 14px; }
.facts { background: rgba(10,8,12,.86); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 0; border: 1px solid rgba(212,175,90,.3); }
.fact { padding: 16px 18px; border-right: 1px solid rgba(212,175,90,.18); border-bottom: 1px solid rgba(212,175,90,.18); display: grid; gap: 8px; align-content: start; }
.fact span { font: 600 .7rem/1 var(--f-hud); letter-spacing: .22em; text-transform: uppercase; color: var(--parch-dim); }
.fact b { font: 700 1.05rem/1.3 var(--f-head); color: var(--parch); }
.trial-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 34px; align-items: start; }

/* ================= CONTACT / PATRONS ================= */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 40px 24px; padding-top: 22px; }
.person { text-align: center; display: grid; gap: 8px; justify-items: center; padding-top: 36px; }
.person .role { font: 600 .72rem/1 var(--f-hud); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); }
.person h3 { font: 700 1.35rem/1.2 var(--f-head); color: var(--parch); }
.person .phone { font: 600 1.05rem/1 var(--f-hud); letter-spacing: .06em; color: var(--parch); text-decoration: none; user-select: all; font-variant-numeric: tabular-nums; }
.person .phone:hover { color: var(--gold-hi); }
.address { display: grid; gap: 10px; text-align: center; justify-items: center; }
.address p { max-width: 60ch; color: var(--parch-dim); }
.perks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.perk h4 { margin: 0 0 6px; font: 700 1rem/1.2 var(--f-head); color: var(--gold-hi); letter-spacing: .06em; }
.perk p { font-size: .96rem; color: var(--parch-dim); }
.tiers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.tier { text-align: center; padding: 22px 12px; display: grid; gap: 10px; justify-items: center; border: 1px solid color-mix(in srgb, var(--tc) 55%, transparent); background: radial-gradient(circle at 50% 0, color-mix(in srgb, var(--tc) 22%, transparent), transparent 70%), rgba(10,8,12,.8); }
.tier .gem { width: 30px; height: 30px; rotate: 45deg; background: linear-gradient(135deg, #fff, var(--tc) 45%, color-mix(in srgb, var(--tc) 40%, #000)); box-shadow: 0 0 16px var(--tc); }
.tier h4 { margin: 0; font: 700 1rem/1 var(--f-head); letter-spacing: .16em; text-transform: uppercase; color: var(--parch); }
.tier p { font-size: .9rem; color: var(--parch-dim); }

/* ================= FOOTER ================= */
.foot { margin-top: 40px; padding-block: 50px 40px; border-top: 1px solid rgba(212,175,90,.3); background: linear-gradient(180deg, transparent, rgba(0,0,0,.7)); display: grid; gap: 26px; justify-items: center; text-align: center; }
.foot img { width: 180px; opacity: .9; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; }
.foot nav a { text-decoration: none; font: 600 .78rem var(--f-hud); letter-spacing: .2em; text-transform: uppercase; color: var(--parch-dim); }
.foot nav a:hover { color: var(--gold-hi); }
.foot small { color: var(--mute); font-size: .85rem; max-width: 70ch; }

/* ================= OVERLAYS ================= */
#travel { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; align-content: center; gap: 20px; background: radial-gradient(circle, rgba(10,8,12,.9), #000); opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s; }
#travel.on { opacity: 1; visibility: visible; }
.travel-sigil { width: min(300px, 60vw); aspect-ratio: 1; }
.travel-sigil .sigil { animation: spin 2.2s cubic-bezier(.6,0,.4,1) infinite; }
.travel-text { font: 600 .9rem var(--f-hud); letter-spacing: .3em; text-transform: uppercase; color: var(--parch-dim); text-align: center; padding-inline: 16px; }
#discover { position: fixed; left: 0; right: 0; top: 50%; translate: 0 -50%; z-index: 70; display: grid; justify-items: center; gap: 10px; padding: 26px 16px; pointer-events: none; text-align: center; background: linear-gradient(90deg, transparent, rgba(0,0,0,.78) 25%, rgba(0,0,0,.78) 75%, transparent); opacity: 0; visibility: hidden; }
#discover.on { animation: disc 3.2s ease forwards; visibility: visible; }
@keyframes disc { 0% { opacity: 0 } 14% { opacity: 1 } 78% { opacity: 1 } 100% { opacity: 0 } }
.disc-line { width: min(560px, 80vw); height: 1px; background: linear-gradient(90deg, transparent, var(--gold-hi), transparent); }
#discover.on .disc-line { animation: grow 1s ease both; }
@keyframes grow { from { transform: scaleX(0) } }
.disc-kicker { font: 700 .8rem var(--f-hud); letter-spacing: .5em; text-transform: uppercase; color: var(--gold); }
.disc-title { font: 700 clamp(2rem, 6vw, 4rem)/1.05 var(--f-head); letter-spacing: .08em; color: var(--parch); text-shadow: 0 0 30px rgba(247,221,150,.5); }

/* drone */
#drone { position: fixed; left: 0; top: 0; z-index: 60; width: 88px; pointer-events: none; will-change: transform; filter: drop-shadow(0 10px 14px rgba(0,0,0,.6)); }
.drone-svg { width: 100%; overflow: visible; }
.rotor { transform-box: fill-box; transform-origin: center; animation: rotor .09s linear infinite; }
@keyframes rotor { 50% { transform: scaleX(.25); } }
.dr-tip { animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .2 } }
.dr-eyes { transform-box: fill-box; transform-origin: center; animation: eyes 4s infinite; }
@keyframes eyes { 0%, 92%, 100% { transform: scaleY(1) } 95% { transform: scaleY(.1) } }

/* ================= RESPONSIVE ================= */
@media (max-width: 1100px) {
  :root { --dock-w: 0px; }
  #dock { display: none; }
  .hud-nav { padding: 14px 44px 24px; gap: 18px; }
  .hud-nav a { font-size: .82rem; letter-spacing: .12em; }
}
.nav-realms { display: none; }
@media (hover: none) {
  .tcard:hover { transform: none; }
  .realm-node:hover { transform: none; }
}
@media (max-width: 880px) {
  :root { --hud-h: 74px; }
  .frame { backdrop-filter: none; background: linear-gradient(180deg, rgba(18,15,20,.93), rgba(8,7,10,.95)); }
  .nav-realms { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; padding-top: 24px; border-top: 1px solid rgba(212,175,90,.3); max-width: 340px; }
  .nav-realms a { font-size: .72rem !important; letter-spacing: .14em !important; display: grid; justify-items: center; gap: 6px; width: 58px; color: var(--parch-dim); }
  .nav-realms a::after { display: none; }
  .nav-realms .glyph { width: 30px; height: 30px; stroke: var(--rc); }
  body.menu-open { overflow: hidden; }
  .hero { min-height: calc(100svh - var(--hud-h)); padding-bottom: 70px; }
  .hero-logo { width: min(400px, 84vw); }
  .disc-title { font-size: clamp(1.5rem, 7vw, 2.4rem); }
  .travel-sigil { width: 200px; }
  .hud-logo img { width: 84px; }
  #menu-toggle { display: grid; }
  .hud-nav { position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; align-items: center; gap: 26px; padding: 80px 16px; background: rgba(5,4,7,.96); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
  .hud-nav.open { opacity: 1; visibility: visible; z-index: 1; }
  .hud-nav a { font-size: 1.15rem; letter-spacing: .26em; }
  .nav-frame { display: none; }
  #hud-top { grid-template-columns: auto 1fr; }
  .hud-right { justify-self: end; position: relative; z-index: 2; }
  .pillars, .tenets, .perks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about, .callouts, .trial-grid, .days { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiers { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
  .trial-head { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .trial-head .tc-tags { justify-content: center; }
  #drone { width: 64px; }
}
@media (max-width: 600px) {
  .ring { aspect-ratio: auto; display: grid; gap: 14px; }
  .ring-svg, .ring .sigil-bg { display: none; }
  .ring-core { position: static; order: -1; padding-bottom: 10px; }
  .realm-node { position: static; translate: none; width: 100%; aspect-ratio: auto; grid-template-columns: 64px 1fr; align-items: center; gap: 14px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--rc) 45%, transparent); background: rgba(10,8,12,.8); justify-items: start; }
  .realm-node .medal { width: 64px; height: 64px; }
  .realm-node .rn-label { position: static; margin: 0; text-align: left; white-space: normal; }
  .realm-node:hover, .realm-node.on { transform: none; }
  .pillars, .tenets, .perks { grid-template-columns: minmax(0, 1fr); }
  .count b { font-size: 2rem; }
  .path li { grid-template-columns: 50px 1fr; gap: 12px; }
  .path li::before { left: 24px; }
  .wp { width: 50px; }
  .hero-sigil { width: 150vw; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #drone { display: none; }
}
