/* Cinzel Bold, self-hosted (SIL Open Font License, see fonts/OFL.txt) */
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/cinzel-700-latin.woff2") format("woff2");
}

:root {
  --bg: #0e0b14;
  --bg-raised: #18131f;
  --bg-deep: #09070d;
  --bar: rgba(14, 11, 20, 0.92);
  --line: #2c2438;
  --text: #ece9f2;
  --muted: #9d96ab;
  --accent: #8b6cd9;
  --accent-hi: #b49cf0;
  --button: #5b3fa8;
  --button-hi: #7155c4;
  --metal-text: linear-gradient(180deg, #ffffff 0%, #f4f2f8 35%, #c9c4d6 70%, #8a8499 100%);
  --display: "Cinzel", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent-hi); }
a:hover { color: var(--text); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header: one bar, links split either side of the crest */
header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  background: var(--bar);
  border-bottom: 1px solid #3a2f4d;
  box-shadow: 0 2px 0 rgba(139, 108, 217, 0.15), 0 6px 18px rgba(0, 0, 0, 0.5);
}
nav.main {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 120px 1fr 1fr;
  grid-template-rows: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
  align-items: stretch;
}
nav.main a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
  font: 700 13px/1 var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
}
nav.main a:hover { color: var(--accent-hi); }
nav.main a[aria-current="page"] { color: var(--accent-hi); border-bottom-color: var(--accent); }
nav.main a.crest { border: 0; align-items: flex-start; }
nav.main a.crest img {
  width: 76px;
  height: auto;
  margin-top: 6px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.7));
  transition: transform 0.15s;
}
nav.main a.crest:hover img { transform: translateY(2px); }

/* Mobile bottom tab bar, hidden on wide screens */
nav.tabs { display: none; }

.button {
  display: inline-block;
  background: var(--button);
  border: 1px solid var(--button-hi);
  color: #f4f0fb;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  padding: 9px 22px;
  border-radius: 4px;
}
.button:hover { background: var(--button-hi); color: #fff; }

/* Type */
main { flex: 1; }
.page { padding: 72px 0 72px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(32px, 6vw, 46px); margin: 0 0 14px; }
h2 { font-size: 26px; margin: 48px 0 14px; }
h3 { font-size: 18px; margin: 0 0 6px; }
p { margin: 0 0 16px; }
.lead { font-size: 18px; color: var(--muted); max-width: 680px; }
.metal {
  background: var(--metal-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Home: dark violet backdrop with drifting fog and a faint crest */
body.home main { position: relative; }
.atmos {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 55% 45% at 50% 32%, rgba(139, 108, 217, 0.32), transparent 70%),
    radial-gradient(ellipse 90% 55% at 50% 115%, rgba(91, 63, 168, 0.4), transparent 70%),
    linear-gradient(180deg, #08060d 0%, #0e0b14 55%, #120d1c 100%);
}
.atmos .scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}
.atmos .shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 45% 35% at 50% 34%, rgba(9, 7, 13, 0.55), transparent 75%),
    linear-gradient(180deg, rgba(9, 7, 13, 0.6) 0%, rgba(9, 7, 13, 0.1) 30%, rgba(9, 7, 13, 0.1) 60%, rgba(14, 11, 20, 0.95) 100%);
}
.atmos i {
  position: absolute;
  width: 150vw;
  height: 55vh;
  left: -25vw;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(180, 156, 240, 0.14), transparent 65%);
  filter: blur(30px);
  animation: drift 38s ease-in-out infinite alternate;
}
.atmos i:nth-of-type(1) { top: 52%; }
.atmos i:nth-of-type(2) { top: 64%; animation-duration: 52s; animation-direction: alternate-reverse; opacity: 0.8; }
.atmos i:nth-of-type(3) { top: 8%; height: 40vh; animation-duration: 64s; opacity: 0.5; }
@keyframes drift {
  from { transform: translateX(-12vw); }
  to   { transform: translateX(12vw); }
}
@media (prefers-reduced-motion: reduce) {
  .atmos i { animation: none; }
}

.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(80px, 14vh, 150px) 16px 64px;
}
.hero h1 {
  font-size: clamp(52px, 11vw, 112px);
  letter-spacing: 0.06em;
  line-height: 1;
  margin: 0;
  filter: drop-shadow(0 3px 0 #1a1326) drop-shadow(0 8px 20px rgba(0, 0, 0, 0.85));
}
.hero .soon {
  font: 700 clamp(20px, 3.6vw, 34px) var(--display);
  letter-spacing: 0.12em;
  margin: 18px 0 0;
  color: var(--accent-hi);
  text-shadow: 0 0 18px rgba(139, 108, 217, 0.75), 0 2px 10px rgba(0, 0, 0, 0.9);
}
.hero .pitch {
  font: 700 clamp(16px, 2.2vw, 21px) var(--display);
  letter-spacing: 0.04em;
  color: var(--text);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95);
  margin: 10px 0 0;
}
.hero .latest {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bar);
  border: 1px solid #3a2f4d;
  border-radius: 999px;
  padding: 8px 18px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
}
.hero .latest:hover { border-color: var(--accent); color: #fff; }
.hero .latest b { color: var(--accent-hi); }

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 14px;
}
.card {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
}
.card p { color: var(--muted); margin: 0; font-size: 15px; }

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--accent);
  background: var(--bg-deep);
  margin-right: 6px;
  vertical-align: middle;
}
.tag.latest { background: var(--button); border-color: var(--button-hi); color: #f4f0fb; }
.card .tag { margin-bottom: 10px; }

/* Updates timeline */
.month {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  margin: 32px 0 8px;
}
.timeline { position: relative; padding-left: 92px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 76px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.entry { position: relative; margin-bottom: 12px; scroll-margin-top: 84px; }
.entry .day {
  position: absolute;
  left: -92px;
  top: 12px;
  width: 64px;
  text-align: right;
}
.entry .day b { display: block; font: 700 30px/1 var(--display); color: var(--text); }
.entry .day small { color: var(--muted); font-size: 11px; }
.entry::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 22px;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border: 2px solid var(--bg);
  transform: rotate(45deg);
}
.entry details {
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.entry details[open] { border-color: #4a3c63; }
.entry summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 44px 14px 18px;
  position: relative;
}
.entry summary::-webkit-details-marker { display: none; }
.entry summary::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 22px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s;
}
.entry details[open] summary::after { transform: rotate(-135deg); top: 26px; }
.entry summary h2 {
  font-size: 20px;
  margin: 0 0 6px;
  font-variant: small-caps;
  letter-spacing: 0.02em;
}
.entry .body { padding: 14px 18px 16px; color: var(--text); border-top: 1px solid var(--line); }
.entry .body ul { margin: 0 0 12px; padding-left: 20px; }
.entry .body li { margin-bottom: 4px; }
.entry .body p, .entry .body li { max-width: 70ch; }
.entry .body p:last-child, .entry .body ul:last-child { margin-bottom: 0; }

/* Footer */
footer.site {
  border-top: 1px solid #3a2f4d;
  box-shadow: 0 -2px 0 rgba(139, 108, 217, 0.12);
  background: var(--bg-deep);
  color: var(--muted);
  font-size: 13px;
  padding: 36px 0 40px;
}
footer.site .wrap { max-width: 920px; }
footer.site .ftop { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
footer.site .about { display: flex; gap: 20px; align-items: flex-start; }
footer.site .about img { width: 72px; flex: none; }
footer.site .name { font: 700 30px/1 var(--display); letter-spacing: 0.06em; margin: 4px 0 12px; }
footer.site p { margin: 0 0 5px; max-width: 62ch; }
footer.site .socials { display: flex; gap: 20px; flex: none; }
footer.site .social { color: #6e6880; }
footer.site .social:hover { color: var(--accent-hi); }
footer.site .social svg { width: 44px; height: 44px; fill: currentColor; }
footer.site .fcols { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 32px; margin-top: 40px; }
footer.site h4 {
  font: 700 22px/1 var(--display);
  letter-spacing: 0.04em;
  color: #c9c4d6;
  margin: 0 0 16px;
}
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: 12px; }
footer.site li a { font-size: 15px; text-decoration: none; color: var(--accent-hi); }
footer.site li a:hover { color: var(--text); }

@media (max-width: 700px) {
  body { padding-bottom: 64px; }
  header.site { height: 56px; }
  nav.main { display: flex; justify-content: center; }
  nav.main a:not(.crest) { display: none; }
  nav.main a.crest img { width: 60px; margin-top: 4px; }

  nav.tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    height: 64px;
    background: var(--bar);
    border-top: 1px solid #3a2f4d;
  }
  nav.tabs a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    border-top: 3px solid transparent;
  }
  nav.tabs a[aria-current="page"] { color: var(--accent-hi); border-top-color: var(--accent); }
  nav.tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

  .hero { min-height: calc(100vh - 56px - 64px); }
  .atmos .scene { object-position: 30% 60%; }
  .page { padding-top: 48px; }

  footer.site .fcols { grid-template-columns: 1fr 1fr; gap: 24px; }
  footer.site .about img { width: 52px; }
  footer.site .name { font-size: 24px; }
  footer.site .socials { gap: 14px; }
  footer.site .social svg { width: 28px; height: 28px; }

  .timeline { padding-left: 0; }
  .timeline::before, .entry::before { display: none; }
  .entry { scroll-margin-top: 70px; }
  .entry .day { position: static; width: auto; text-align: left; margin-bottom: 6px; }
  .entry .day b { display: inline; font-size: 18px; margin-right: 6px; }
}

/* Discord button and dev status */
.button.discord { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; padding: 11px 24px; }
.ico { width: 22px; height: 22px; fill: currentColor; }
.hero .button.discord { margin-top: 28px; box-shadow: 0 0 24px rgba(139, 108, 217, 0.45); }

/* Features page */
.feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 36px;
  align-items: center;
  margin: 56px 0;
}
.emblem {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border-radius: 6px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 50% 60% at 50% 50%, rgba(139, 108, 217, 0.28), transparent 70%),
    linear-gradient(180deg, #120d1c, #0b0812);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.emblem svg {
  width: 30%;
  fill: none;
  stroke: var(--accent-hi);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(139, 108, 217, 0.7));
}
.feature.flip .emblem { order: 2; }
.feature h2 { margin: 0 0 12px; }
.feature p { color: var(--muted); }
.feature p:last-child { margin-bottom: 0; }

.onlist { margin: 0; border-top: 1px solid var(--line); }
.onlist div {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
}
.onlist dt { font: 700 16px/1.5 var(--display); }
.onlist dd { margin: 0; color: var(--muted); max-width: 62ch; }
.ideas { margin-top: 32px; }

@media (max-width: 700px) {
  .feature { grid-template-columns: 1fr; gap: 18px; margin: 40px 0; }
  .feature.flip .emblem { order: 0; }
  .onlist div { grid-template-columns: 1fr; gap: 2px; }
}

.cta {
  margin-top: 56px;
  padding: 36px 24px;
  text-align: center;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: 6px;
}
.cta h2 { margin: 0 0 8px; }
.cta p { color: var(--muted); margin-bottom: 20px; }

/* Embers drifting up through the home fog */
.atmos b {
  position: absolute;
  bottom: -12px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #d6c8ff;
  box-shadow: 0 0 6px 2px rgba(180, 156, 240, 0.75);
  opacity: 0;
  animation: ember var(--d) linear var(--w) infinite;
}
@keyframes ember {
  0%   { transform: translate(0, 0); opacity: 0; }
  10%  { opacity: 0.9; }
  50%  { transform: translate(var(--sway), -52vh); }
  85%  { opacity: 0.5; }
  100% { transform: translate(0, -108vh); opacity: 0; }
}

/* Home entrance: crest glows in, then the title, tagline and button rise in turn */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes scene-in { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
body.home .atmos .scene { animation: scene-in 1.6s ease-out both; }
body.home .hero > * { animation: rise 0.7s ease-out both; }
body.home .hero > :nth-child(1) { animation-delay: 0.2s; }
body.home .hero > :nth-child(2) { animation-delay: 0.45s; }
body.home .hero > :nth-child(3) { animation-delay: 0.6s; }
body.home .hero > :nth-child(4) { animation-delay: 0.75s; }
body.home .hero > :nth-child(5) { animation-delay: 0.9s; }
body.home .hero > :nth-child(6) { animation-delay: 1.1s; }

/* Live Discord count under the button */
.dcount { margin: 12px 0 0; font-size: 13px; color: var(--muted); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9); }
.dcount b { color: var(--text); }
.dcount i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin: 0 6px 1px 0;
  border-radius: 50%;
  background: #3ba55d;
  box-shadow: 0 0 6px #3ba55d;
}

/* Features: sections rise in on scroll, emblems glow on hover */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.js [data-reveal].seen { opacity: 1; transform: none; }
.emblem, .emblem svg { transition: border-color 0.25s, filter 0.25s, transform 0.25s; }
.feature:hover .emblem { border-color: #4a3c63; }
.feature:hover .emblem svg { filter: drop-shadow(0 0 18px rgba(180, 156, 240, 0.95)); transform: scale(1.06); }

@media (prefers-reduced-motion: reduce) {
  .atmos b { display: none; }
  body.home .atmos .scene, body.home .hero > * { animation: none; }
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Play page FAQ */
.faq { border-top: 1px solid var(--line); max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 16px 40px 16px 4px;
  font: 700 17px/1.4 var(--display);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 22px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 26px; }
.faq summary:hover { color: var(--accent-hi); }
.faq details p { margin: 0 4px 18px; color: var(--muted); max-width: 65ch; }

/* Privacy and Legal pages */
.legal h2 { font-size: 20px; margin: 36px 0 8px; }
.legal p { max-width: 68ch; }
.legal .updated { color: var(--muted); font-size: 14px; }

/* Support page */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0 8px; }
.card-link {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
  transition: border-color 0.2s;
}
.card-link:hover { border-color: var(--accent); color: var(--text); }
.card-link b { display: block; font: 700 17px/1.3 var(--display); color: var(--text); margin-bottom: 4px; }
.card-link svg { flex: none; width: 28px; height: 28px; fill: none; stroke: var(--accent-hi); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tips { margin: 0; padding-left: 20px; max-width: 68ch; }
.tips li { margin-bottom: 10px; color: var(--muted); }
.tips b { color: var(--text); }
#stay-safe { scroll-margin-top: 84px; }
@media (max-width: 700px) { .cards { grid-template-columns: 1fr; } }
