:root {
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, ui-serif, serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-mono, ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;

  --ground: #0c0a0e;
  --ink: #ece3d0;
  --ink-dim: #9a917f;
  --brass: #c9a24b;
  --copper: #b87333;
  --cyan: #66dbff;
}

html, body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .mud-typography-h1, .mud-typography-h2, .mud-typography-h3,
.mud-typography-h4, .mud-typography-h5, .mud-typography-h6 {
  font-family: var(--font-display);
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--ink);
}

/* ===== app bar ===== */
.arcano-appbar {
  backdrop-filter: blur(9px);
  border-bottom: 1px solid rgba(201, 162, 75, 0.16);
}

/* ===== hero ===== */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 50% 32%, rgba(201, 162, 75, 0.14), transparent 70%),
    radial-gradient(40% 40% at 50% 40%, rgba(102, 219, 255, 0.10), transparent 70%),
    var(--ground);
}

.hero-inner {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-mark {
  filter: drop-shadow(0 0 26px rgba(102, 219, 255, 0.25));
  margin-bottom: 1.4rem;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 1rem;
}

.hero-title {
  font-size: clamp(2.6rem, 1.5rem + 4.8vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

.hero-accent {
  background: linear-gradient(92deg, var(--brass), var(--copper) 55%, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lede {
  max-width: 42ch;
  margin: 1.6rem auto 0;
  font-size: clamp(1.02rem, 1rem + .4vw, 1.25rem);
  line-height: 1.65;
  color: var(--ink);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  justify-content: center;
  margin-top: 2.2rem;
}

.hero-note {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 1.6rem 0 0;
}

.hero-creed {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--ink-dim);
  margin: 2.4rem 0 0;
  font-size: 1.05rem;
}

/* ===== blazor error ui (from template, restyled) ===== */
#blazor-error-ui {
  color: #ece3d0;
  background: #17131e;
  border-top: 1px solid var(--brass);
  bottom: 0;
  box-shadow: 0 -1px 12px rgba(0, 0, 0, .5);
  box-sizing: border-box;
  display: none;
  left: 0;
  padding: 0.9rem 1.4rem;
  position: fixed;
  width: 100%;
  z-index: 1200;
}
#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 1rem;
  top: 0.75rem;
}

/* ===== app-bar nav links ===== */
.nav-links { display: flex; gap: 1.4rem; align-items: center; }
.nav-link {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-dim);
}
.nav-link:hover { color: var(--ink); }

/* ===== generic section ===== */
.section { padding: clamp(4rem, 9vw, 8rem) 1.5rem; border-top: 1px solid rgba(201,162,75,.12); }
.section-alt { background: #100d15; }
.section-inner { max-width: 1140px; margin-inline: auto; }
.section-inner.center { text-align: center; }
.section-title {
  font-family: var(--font-display); font-weight: 600; line-height: 1.08;
  font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.7rem); margin: .6rem 0 0; text-wrap: balance;
}
.two-col { display: grid; grid-template-columns: 1fr; gap: clamp(1rem, 3vw, 2.5rem); }
@media (min-width: 880px) { .two-col { grid-template-columns: .9fr 1.1fr; align-items: start; } }
.body-lg { font-size: clamp(1.02rem, 1rem + .35vw, 1.2rem); line-height: 1.7; margin: 0 0 1rem; }
.body-dim { color: var(--ink-dim); line-height: 1.7; margin: 1rem 0 0; }
.mw-20 { max-width: 20ch; } .mw-22 { max-width: 22ch; } .mw-24 { max-width: 24ch; }
.mw-26 { max-width: 26ch; } .mw-52 { max-width: 52ch; } .mw-62 { max-width: 62ch; }
.mx-auto { margin-inline: auto; } .mt-2 { margin-top: 1.4rem; }

/* ===== feature grid (rigs) ===== */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px; background: rgba(201,162,75,.16); border: 1px solid rgba(201,162,75,.16);
  border-radius: 3px; overflow: hidden; margin-top: 2.2rem;
}
.feature-card { background: var(--ground); padding: 1.7rem 1.5rem; transition: background .2s; }
.section-alt .feature-card { background: #100d15; }
.feature-card:hover { background: #17131e; }
.feature-card .fi { font-size: 1.5rem; color: var(--copper); float: right; }
.feature-card h3 { font-family: var(--font-display); font-size: 1.25rem; margin: .3rem 0 .5rem; }
.feature-card p { color: var(--ink-dim); font-size: .95rem; margin: 0; line-height: 1.6; }

/* ===== faction cards ===== */
.faction-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem; margin-top: 2.2rem;
}
.faction-card {
  border: 1px solid rgba(201,162,75,.14); border-top: 2px solid var(--fac, var(--brass));
  border-radius: 3px; padding: 1.6rem; background: #100d15;
}
.faction-card.is-you {
  background: linear-gradient(180deg, rgba(102,219,255,.09), #100d15);
}
.fac-tag {
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--fac, var(--brass));
}
.fac-creed { font-family: var(--font-display); font-style: italic; font-size: 1.15rem; margin: .5rem 0 .7rem; color: var(--ink); }
.faction-card p:last-child { color: var(--ink-dim); font-size: .93rem; margin: 0; line-height: 1.6; }

/* ===== heroes ===== */
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.1rem; margin-top: 2.2rem; }
.hero-card { border: 1px solid rgba(201,162,75,.14); border-radius: 3px; padding: 1.6rem; background: var(--ground); }
.hero-card h3 { font-family: var(--font-display); font-size: 1.4rem; margin: 0 0 .5rem; }
.hero-card p { color: var(--ink-dim); margin: 0; line-height: 1.6; }

/* ===== roadmap ===== */
.roadmap { list-style: none; padding: 0; margin: 2.2rem 0 0; display: flex; flex-direction: column; gap: 1px; border: 1px solid rgba(201,162,75,.16); border-radius: 3px; overflow: hidden; }
.road-step { display: flex; gap: 1.2rem; align-items: flex-start; padding: 1.4rem 1.5rem; background: var(--ground); }
.road-step.is-now { background: linear-gradient(90deg, rgba(102,219,255,.08), var(--ground)); }
.rs-mark { font-family: var(--font-mono); color: var(--brass); font-size: 1.1rem; min-width: 1.4rem; }
.road-step.is-now .rs-mark { color: var(--cyan); }
.road-step h3 { font-family: var(--font-display); font-size: 1.15rem; margin: 0 0 .3rem; }
.road-step p { color: var(--ink-dim); margin: 0; font-size: .95rem; line-height: 1.55; }

/* ===== cta band ===== */
.cta-band {
  text-align: center;
  background: radial-gradient(70% 130% at 50% 0%, rgba(102,219,255,.12), transparent 60%), #100d15;
}
.cta-band .hero-cta { margin-top: 1.8rem; }
.cta-band .body-lg { margin-top: 1rem; }

/* ===== footer ===== */
.site-footer { border-top: 1px solid rgba(201,162,75,.16); background: var(--ground); padding: 3rem 1.5rem 2.2rem; }
.footer-inner { max-width: 1140px; margin-inline: auto; display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; }
.footer-brand { display: flex; gap: .8rem; align-items: center; }
.footer-brand strong { font-family: var(--font-display); display: block; }
.footer-brand span { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .06em; color: var(--ink-dim); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-nav a { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim); text-decoration: none; }
.footer-nav a:hover { color: var(--brass); }
.footer-legal { max-width: 1140px; margin: 1.8rem auto 0; display: flex; flex-direction: column; gap: .3rem; font-family: var(--font-mono); font-size: .68rem; color: var(--ink-dim); }

/* ===== legal pages ===== */
.legal-page { padding: 7rem 1.5rem 5rem; }
.legal-inner { max-width: 720px; margin-inline: auto; }
.legal-inner h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem); margin: 0 0 1.4rem; }
.legal-inner h2 { font-family: var(--font-display); font-size: 1.2rem; margin: 2rem 0 .5rem; color: var(--brass); }
.legal-inner p { line-height: 1.7; color: var(--ink); }
.legal-inner a { color: var(--cyan); }
.legal-todo { color: #d8663f; font-family: var(--font-mono); font-size: .8rem; border: 1px solid rgba(216,102,63,.4); border-radius: 3px; padding: .6rem .9rem; }
.legal-back { margin-top: 2.5rem; }
.legal-back a { font-family: var(--font-mono); font-size: .8rem; }

/* ===== hero rig canvas ===== */
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-inner { position: relative; z-index: 2; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(58% 60% at 50% 42%, transparent 38%, var(--ground) 90%),
    linear-gradient(180deg, transparent 60%, var(--ground) 100%);
}

/* ===== scroll reveal (JS adds .reveal-ready + .in) ===== */
.reveal-ready .section-inner { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal-ready .section-inner.in { opacity: 1; transform: none; }

/* ===== card hover polish ===== */
.feature-card, .faction-card, .hero-card {
  transition: transform .2s ease, box-shadow .3s ease, background .2s, border-color .2s;
}
.feature-card:hover, .hero-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px -20px var(--brass); }
.faction-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px -20px var(--fac, var(--brass)); border-color: var(--fac, var(--brass)); }

/* ===== roadmap timeline ===== */
.timeline { list-style: none; margin: 2.6rem 0 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--brass) 30%, var(--copper) 70%, rgba(184,115,51,.15));
  border-radius: 2px;
}
.tl-item { position: relative; padding: 0 0 2.2rem 3rem; }
.tl-item:last-child { padding-bottom: 0; }
.tl-node {
  position: absolute; left: 3px; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ground); border: 2px solid var(--brass); box-shadow: 0 0 0 4px var(--ground);
  z-index: 1;
}
.tl-item.is-highlight .tl-node { border-color: var(--cyan); }
.tl-item.is-now .tl-node {
  border-color: var(--cyan); background: var(--cyan);
  box-shadow: 0 0 0 4px var(--ground), 0 0 16px 2px rgba(102,219,255,.7);
  animation: tl-pulse 2.2s ease-in-out infinite;
}
@keyframes tl-pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--ground), 0 0 10px 1px rgba(102,219,255,.5); }
  50%      { box-shadow: 0 0 0 4px var(--ground), 0 0 22px 5px rgba(102,219,255,.85); }
}
@media (prefers-reduced-motion: reduce) { .tl-item.is-now .tl-node { animation: none; } }
.tl-date {
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brass); display: inline-block; margin-bottom: .35rem;
}
.tl-date.is-now-date { color: var(--cyan); }
.tl-body h3 { font-family: var(--font-display); font-size: 1.3rem; margin: 0 0 .4rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.tl-body p { color: var(--ink-dim); margin: 0; line-height: 1.6; max-width: 60ch; }
.tl-badge {
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .12em; font-weight: 700;
  color: #0c0a0e; background: var(--cyan); padding: .12rem .45rem; border-radius: 999px;
}
.tl-disclaimer {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; color: var(--ink-dim);
  margin: 2.2rem 0 0; padding-left: 3rem; font-style: normal;
}

/* ===== rig schematic diagram ===== */
.rig-diagram {
  margin: 2.6rem 0 0; padding: 1.8rem 1.4rem; border: 1px solid rgba(201,162,75,.16);
  border-radius: 6px; overflow-x: auto;
  background:
    radial-gradient(60% 90% at 40% 50%, rgba(102,219,255,.06), transparent 70%),
    radial-gradient(50% 90% at 80% 50%, rgba(184,115,51,.06), transparent 70%),
    #0e0b12;
}
.rig-svg { width: 100%; min-width: 520px; max-width: 820px; height: auto; aspect-ratio: 820 / 300; display: block; margin: 0 auto; }
.pipe { fill: none; stroke: rgba(201,162,75,.28); stroke-width: 2.5; stroke-linecap: round; }
.pipe-flow {
  fill: none; stroke: var(--cyan); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 5 20; filter: drop-shadow(0 0 5px rgba(102,219,255,.8));
  animation: rig-flow 1.1s linear infinite;
}
.pipe-flow.d1 { animation-delay: .28s; }
.pipe-flow.d2 { animation-delay: .55s; }
@keyframes rig-flow { to { stroke-dashoffset: -25; } }
@media (prefers-reduced-motion: reduce) { .pipe-flow { animation: none; opacity: .55; } }

.rnode circle, .rnode rect { fill: #0c0a0e; stroke: var(--brass); stroke-width: 2; filter: drop-shadow(0 0 6px rgba(201,162,75,.4)); }
.rnode.core circle { stroke: var(--cyan); filter: drop-shadow(0 0 11px rgba(102,219,255,.6)); }
.rnode.core .core-dot { fill: var(--cyan); stroke: none; filter: none; }
.rnode.out circle { stroke: var(--copper); }
.rnode text { fill: var(--ink-dim); font-family: var(--font-mono); font-size: 15px; letter-spacing: .08em; text-transform: uppercase; text-anchor: middle; }
.rnode.transform { cursor: help; }
.rnode.transform:hover circle { stroke: var(--cyan); filter: drop-shadow(0 0 10px rgba(102,219,255,.7)); }
.rnode.transform:hover text { fill: var(--ink); }
.rig-caption { text-align: center; color: var(--ink-dim); font-size: .92rem; margin: 1.1rem auto 0; max-width: 62ch; }

/* ===== faction crests ===== */
.crest-wrap { color: var(--fac, var(--brass)); margin-bottom: .8rem; line-height: 0; }
.crest { width: 46px; height: 46px; display: block; }
.faction-card.is-you .crest { animation: crest-glow 2.6s ease-in-out infinite; }
@keyframes crest-glow {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(102,219,255,.45)); }
  50%      { filter: drop-shadow(0 0 11px rgba(102,219,255,.9)); }
}
@media (prefers-reduced-motion: reduce) { .faction-card.is-you .crest { animation: none; } }

/* ===== hero marks ===== */
.hcard-head { display: flex; align-items: center; gap: .85rem; margin-bottom: .5rem; }
.hcard-head h3 { margin: 0; }
.hmark { width: 38px; height: 38px; flex: 0 0 auto; display: block; }
.hmark svg { width: 100%; height: 100%; }
.hmark.steel { color: #c7c0b0; filter: drop-shadow(0 0 4px rgba(199,192,176,.3)); }
.hmark.arcane { color: var(--cyan); filter: drop-shadow(0 0 6px rgba(102,219,255,.4)); }
