/* home.served.css: the SERVED twin of home.css, comments removed and nothing else (tools/strip-served.mjs). The source keeps the sha pins and the record. */

:root {
  --bg: #000;
  --bg-soft: #0b0b12;
  --bg-raise: #101019;
  --ink: #e8e8f0;
  --ink-dim: #8a8a9a;
  --line: rgba(138, 138, 154, 0.16);
  --accent: #22d3ee;
  --accent-deep: #0891b2;
  --sans: 'Archivo', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', 'Cascadia Code', Consolas, monospace;

  --z: 1.35;
  --gutter: clamp(20px, 2.4vw, 64px);
  --gold-hot: #ffe6ad;
  --cyan-hot: #eafdff;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --column: min(1440px, max(78vw, 960px));
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg); }
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
::selection { background: rgba(34, 211, 238, 0.28); color: #fff; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: none;
}

.nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: clamp(28px, 2.6vw, 64px);
  height: clamp(64px, 4.6vw, 84px);
  padding: 0 max(clamp(24px, 2.6vw, 64px), calc((100% - var(--nav-column, var(--column))) / 2));
}
header.nav { position: sticky; top: 0; background: var(--bg); }
.nav-home { display: block; flex: none; }

:root { --ls: 1; }
@media (min-width: 1900px) { :root { --ls: 1.3; } }
.lockup-row { display: flex; align-items: center; gap: calc(10px * var(--ls)); }
.lockup-shield { display: block; height: calc(32px * var(--ls)); width: auto; flex: none; }
.lockup-word { font-size: calc(20px * var(--ls)); font-weight: 700; line-height: 1.2; text-transform: uppercase; white-space: nowrap; color: #fff; }
.lockup-word .empires { color: var(--accent); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(22px, 2.2vw, 52px);
  font-size: clamp(13px, 0.74vw, 18px);
  letter-spacing: 0.04em;
}
.nav-links a { color: var(--ink-dim); white-space: nowrap; transition: color 0.2s ease, text-shadow 0.3s ease; }
.nav-links a:hover { color: var(--ink); text-shadow: 0 0 14px rgba(103, 232, 249, 0.35); }
.nav-links a[aria-current="page"] { color: var(--ink); }

.nav-cta {
  position: relative;
  margin-left: auto;
  flex: none;
  color: var(--accent);
  font-size: clamp(12px, 0.72vw, 18px);
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
  border: 1px solid rgba(34, 211, 238, 0.4);
  padding: clamp(9px, 0.62vw, 15px) clamp(18px, 1.2vw, 30px);
  transition: border-color 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}
.nav-cta::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  box-shadow: 0 0 22px 2px rgba(34, 211, 238, 0.38), inset 0 0 14px rgba(34, 211, 238, 0.16);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.nav-cta:hover { border-color: var(--accent); background: rgba(34, 211, 238, 0.08); color: var(--cyan-hot); }
.nav-cta:hover::before { opacity: 1; }
.nav-cta:active { background: rgba(34, 211, 238, 0.16); }
.nav-cta:active::before { opacity: 1; box-shadow: 0 0 30px 5px rgba(103, 232, 249, 0.55), inset 0 0 18px rgba(103, 232, 249, 0.3); transition-duration: 0.06s; }

.nav-cta .cta-short { display: none; }

.nav-menu, .nav-links .nav-door { display: none; }
@media (max-width: 1023px) {
  .nav { --ls: 0.8; position: relative; height: 64px; gap: 12px; padding: 0 16px; }
  header.nav { position: fixed; top: 0; left: 0; right: 0; }
  body { padding-top: 64px; }
  .nav-cta { font-size: 12px; padding: 8px 12px; margin-left: auto; }
  .nav-menu {
    display: flex; flex: none; align-items: center; justify-content: center; flex-direction: column; gap: 5px;
    width: 44px; height: 44px; margin: 0 -8px 0 0; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer;
  }
  .nav-menu .bar { display: block; width: 22px; height: 2px; background: currentColor; transition: transform 0.2s ease, opacity 0.2s ease; }
  .nav[data-open="true"] .nav-menu .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav[data-open="true"] .nav-menu .bar:nth-child(2) { opacity: 0; }
  .nav[data-open="true"] .nav-menu .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 12px; right: 12px; z-index: 10;
    flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0;
    background: var(--bg); border: 1px solid var(--line); font-size: 16px; letter-spacing: 0.02em;
  }
  .nav[data-open="true"] .nav-links { display: flex; }
  .nav-links a { display: flex; align-items: center; min-height: 52px; padding: 0 20px; white-space: normal; }
  .nav-links a[aria-current="page"] { color: var(--ink); }
  .nav-links .nav-door { display: none; }
  .nav-links a[href="../forge/"], .nav-links a[href="../command/"],
  .page-forge .nav-links a[aria-current="page"], .page-command .nav-links a[aria-current="page"] { display: none; }
}
@media (max-width: 639px) {
  .nav { --ls: 0.72; gap: 8px; }
  .nav-cta { display: inline-block; margin-left: auto; font-size: 11px; letter-spacing: 0.06em; padding: 4px 8px; line-height: 1.4; }
  .nav-cta::after { content: ""; position: absolute; left: -4px; right: -4px; top: -10px; bottom: -10px; }
  .nav-cta .cta-full { display: none; }
  .nav-cta .cta-short { display: inline; }
  .nav-menu { margin-left: 0; }
  .nav-links .nav-door {
    display: none;    justify-content: center; margin: 8px 20px 10px; min-height: 44px;
    color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; border: 1px solid rgba(34, 211, 238, 0.4);
    border-top: 1px solid rgba(34, 211, 238, 0.4);
  }
  .nav-links .nav-door:hover { color: var(--cyan-hot); border-color: var(--accent); background: rgba(34, 211, 238, 0.08); }
  .nav-links .nav-door:active { background: rgba(34, 211, 238, 0.16); }
}
@media (prefers-reduced-motion: reduce) { .nav-menu .bar { transition: none; } }
@media (max-width: 1023px) {
  main.stage > .centre { max-width: 480px; width: 100%; margin-left: auto; margin-right: auto; }
}

.stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 0;
  padding: 0 var(--gutter) var(--gutter);
}

.centre { display: flex; flex-direction: column; align-items: center; row-gap: max(var(--gutter), 32px); width: min(var(--column), 100%); }
.crest-row { display: flex; justify-content: center; }
.creed {
  --beat-off: calc(357px * var(--z));
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  z-index: 3;
}

.beat {
  position: relative;
  display: block;
  font-size: clamp(18px, 1.3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.025em;
  word-spacing: 0.09em;
  line-height: 1.15;
  white-space: nowrap;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.beat-forge .kw { color: var(--cer-gold-hot); }
.beat-command .kw { color: var(--accent); }
.beat-forge, .beat-command { position: absolute; top: 50%; text-align: center; }
.beat-forge   { left: 50%; transform: translate(calc(-50% - var(--beat-off)), -50%); }
.beat-command { left: 50%; transform: translate(calc(-50% + var(--beat-off)), -50%); }
.beat::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease-out;
}
.beat-forge::after   { color: var(--gold-hot); text-shadow: 0 0 14px rgba(255, 217, 102, 0.8), 0 0 40px rgba(255, 217, 102, 0.42); }
.beat-command::after { color: var(--cyan-hot); text-shadow: 0 0 16px rgba(103, 232, 249, 0.9), 0 0 42px rgba(34, 211, 238, 0.55); }
.beat:hover::after, .beat:focus-visible::after { opacity: 1; }
.beat:active::after { opacity: 1; transition-duration: 0.05s; }
.beat-forge:active::after   { text-shadow: 0 0 10px rgba(255, 230, 173, 1), 0 0 30px rgba(255, 217, 102, 0.9), 0 0 70px rgba(255, 217, 102, 0.55); }
.beat-command:active::after { text-shadow: 0 0 10px rgba(234, 253, 255, 1), 0 0 30px rgba(103, 232, 249, 0.95), 0 0 70px rgba(34, 211, 238, 0.65); }

.crest-stage {
  position: relative;
  z-index: 1;
  width: calc(714px * var(--z));
  height: calc(714px * var(--z));
}
.crest-scale {
  position: absolute;
  left: 0;
  top: 0;
  width: 714px;
  height: 714px;
  transform: scale(var(--z));
  transform-origin: 0 0;
}
.crest-scale .ceremony {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 760px;
  margin: -380px 0 0 -380px;
}

.ceremony .ambient { overflow: clip; }

.ceremony .crest-hit {
  grid-area: 1 / 1;
  position: relative;
  z-index: 2;
  width: 132px;
  height: 148px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ceremony .crest-hit:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 4px; }
.ceremony:has(.crest-hit:hover) .badge,
.ceremony:has(.crest-hit:focus-visible) .badge { filter: brightness(1.5) saturate(1.5); }
.ceremony .crest svg { transition: filter 0.45s ease-out; }
.ceremony:has(.crest-hit:hover) .crest svg,
.ceremony:has(.crest-hit:focus-visible) .crest svg { filter: drop-shadow(0 0 10px rgba(255, 217, 102, 0.75)) drop-shadow(0 0 26px rgba(61, 232, 255, 0.45)); }
.ceremony:has(.crest-hit:active) .badge { filter: brightness(1.8) saturate(1.6); transition-duration: 0.08s; }
.ceremony:has(.crest-hit:active) .crest svg { transform: scale(0.972); transition: filter 0.08s, transform 0.08s; }

.ceremony .socket { pointer-events: none; cursor: default; }

.ceremony .socket .tag { font-size: calc(14px / var(--z)); }

.cta { position: relative; z-index: 3; display: flex; justify-content: center; align-items: center; }
.btn-system {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(48px, 3.3vw, 63px);
  padding: 0 clamp(36px, 2.9vw, 57px);
  color: var(--accent);
  font-size: clamp(14px, 0.9vw, 18px);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  white-space: nowrap;
  border: 1px solid rgba(34, 211, 238, 0.6);
  background: rgba(34, 211, 238, 0.055);
  transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease, text-shadow 0.3s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-system::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  box-shadow: 0 0 36px 4px rgba(34, 211, 238, 0.42), inset 0 0 26px rgba(34, 211, 238, 0.2);
  opacity: 0;
  transition: opacity 0.4s ease-out;
}
.btn-label { position: relative; }
.btn-system:hover { border-color: var(--accent); background: rgba(34, 211, 238, 0.1); color: var(--cyan-hot); text-shadow: 0 0 14px rgba(103, 232, 249, 0.75); }
.btn-system:hover::before { opacity: 1; }
.btn-system:active {
  transform: scale(0.975);
  background: rgba(34, 211, 238, 0.2);
  transition-duration: 0.07s;
}
.btn-system:active::before {
  opacity: 1;
  box-shadow: 0 0 52px 10px rgba(103, 232, 249, 0.6), inset 0 0 34px rgba(103, 232, 249, 0.34);
  transition-duration: 0.07s;
}

@media (max-width: 1000px) {
  .creed { flex-direction: column; gap: 18px; }
  .cta { order: -1; }
  .beat-forge, .beat-command { position: static; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ceremony, .ceremony *, .ceremony *::before, .ceremony *::after { animation: none !important; transition: none !important; }
  .ceremony[data-phase="settled"] .badge {
    box-shadow: inset 0 0 70px rgba(34, 211, 238, 0.26), 0 0 52px 15px rgba(34, 211, 238, 0.45), 0 0 150px 48px rgba(34, 211, 238, 0.20);
  }
  .ceremony .socket.lit .glyph { opacity: 1; }
  .ceremony .socket.lit::after { opacity: 0.85; }
  .beat::after, .btn-system::before, .nav-cta::before { transition: none; }
  .btn-system:active { transform: none; }
  .ceremony:has(.crest-hit:active) .crest svg { transform: none; }
}

.footer-legal-row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 8px 14px;
  min-height: 2.4em;
  margin: 0 auto 18px;
  font-size: 0.75rem; letter-spacing: 0.06em; text-transform: none;
  color: var(--ink-dim);
}
.footer-legal-row a { color: var(--ink-dim); text-decoration: underline; text-decoration-color: rgba(138,138,154,0.35); text-underline-offset: 2px; }
.footer-legal-row a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.footer-legal-row .sep { color: rgba(138,138,154,0.4); }

@keyframes cta-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.72; } }
