/* ==========================================================================
   Mazamonia — Aurora design system
   Palette lives here once; everything else references the tokens.
   ========================================================================== */

:root {
  /* brand */
  --cyan:      #38F5FF;
  --violet:    #9B5CFF;
  --magenta:   #FF3DBE;
  --gold:      #FFBE3D;
  --aurora:    linear-gradient(115deg, var(--cyan) 0%, var(--violet) 52%, var(--magenta) 100%);

  /* ground */
  --ink:       #0A0814;
  --surface:   #12101F;
  --surface-2: #191630;
  --line:      #272247;
  --line-soft: #1D1936;

  /* type */
  --text:      #EDEBFA;
  --muted:     #9C95C2;
  --dim:       #6F6890;

  /* metrics — a 4px pixel grid, like the logo */
  --r:    4px;
  --gap:  24px;
  --page: 1180px;

  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, "SF Mono", ui-monospace, monospace;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* the faint pixel grid that sits behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(155, 92, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 245, 255, .035) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
}

img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: min(100% - 40px, var(--page)); margin-inline: auto; position: relative; z-index: 1; }

/* --------------------------------------------------------------- typography */
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.15; font-weight: 700; }
h2 { font-size: clamp(28px, 3.4vw, 42px); letter-spacing: -.02em; }
h3 { font-size: 20px; letter-spacing: -.01em; }
p  { margin: 0 0 1em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 12px/1 var(--mono);
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; width: 20px; height: 3px;
  background: var(--aurora); border-radius: 2px;
}

.lead { font-size: 18px; color: var(--muted); max-width: 68ch; }
.grad {
  background: var(--aurora);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* -------------------------------------------------------------------- header */
.top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 8, 20, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.top .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.top img { height: 26px; width: auto; image-rendering: pixelated; }
.nav { display: flex; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  color: var(--muted); font-size: 14px; font-weight: 500;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.on { color: var(--text); border-bottom-color: var(--violet); text-decoration: none; }

/* ---------------------------------------------------------------------- hero */
.hero { position: relative; padding: 96px 0 72px; text-align: center; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: -30% -10% auto; height: 620px; z-index: 0;
  background:
    radial-gradient(50% 55% at 22% 40%, rgba(56, 245, 255, .16), transparent 70%),
    radial-gradient(46% 52% at 78% 30%, rgba(255, 61, 190, .15), transparent 70%),
    radial-gradient(60% 60% at 50% 10%, rgba(155, 92, 255, .18), transparent 72%);
  filter: blur(12px);
}
.hero .wrap { position: relative; z-index: 1; }
.hero-logo { width: min(560px, 84vw); margin: 0 auto 28px; image-rendering: pixelated; }
.hero p { margin-inline: auto; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 22px 0 32px; }
.badge {
  font: 500 13px/1 var(--mono);
  padding: 8px 12px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
}
.badge b { color: var(--text); font-weight: 600; }

.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 100px;
  font-weight: 600; font-size: 15px; border: 1px solid transparent;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--aurora); color: #0A0814; }
.btn-primary:hover { filter: brightness(1.12); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--violet); }

/* ------------------------------------------------------------------- metrics */
.metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line-soft);
  border: 1px solid var(--line-soft); border-radius: var(--r);
  margin-top: 56px; overflow: hidden;
}
.metric { background: var(--surface); padding: 22px 18px; text-align: center; }
.metric .n {
  font: 700 30px/1 var(--sans); letter-spacing: -.03em;
  background: var(--aurora); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.metric .l { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; margin-top: 8px; }

/* ------------------------------------------------------------------ sections */
section { padding: 84px 0; position: relative; z-index: 1; }
section + section { border-top: 1px solid var(--line-soft); }
.section-head { max-width: 780px; margin-bottom: 44px; }

.grid { display: grid; gap: var(--gap); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r); padding: 26px;
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--line); transform: translateY(-3px); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }
.card .tag {
  display: inline-block; font: 600 11px/1 var(--mono); letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim);
  margin-bottom: 14px;
}

/* pillar cards get a gradient hairline on top */
.pillar { position: relative; overflow: hidden; }
.pillar::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--aurora); opacity: .8;
}
.pillar ul { margin: 14px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.pillar li { margin-bottom: 5px; }
.pillar li::marker { color: var(--violet); }

/* the one card that carries the whole pitch — NovaEra's headline feature */
.flagship {
  position: relative; overflow: hidden; padding: 34px 34px 34px 38px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(155, 92, 255, .13), transparent 62%),
    radial-gradient(90% 120% at 100% 100%, rgba(56, 245, 255, .08), transparent 60%),
    var(--surface-2);
  border-color: var(--line);
}
.flagship::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px;
  background: var(--aurora);
}
.flagship h3 { font-size: clamp(20px, 2.6vw, 27px); line-height: 1.25; }
.flagship > p { font-size: 16px; color: var(--text); }
.flagship ul { margin: 18px 0 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
.flagship li { margin-bottom: 7px; }
.flagship li::marker { color: var(--cyan); }
.flagship li b, .flagship > p b { color: var(--text); }

/* -------------------------------------------------------------------- worlds */
.world {
  display: grid; grid-template-columns: 128px 1fr; gap: 22px; align-items: start;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r); padding: 24px;
}
.world-key {
  font: 700 13px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  padding: 10px 0 0; color: var(--cyan);
}
.world-key span { display: block; color: var(--dim); font-weight: 500; letter-spacing: 0; text-transform: none; margin-top: 6px; }
.world h3 { margin-bottom: 8px; }
.world p { color: var(--muted); font-size: 15px; margin-bottom: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: 500 12px/1 var(--mono); padding: 6px 9px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}

/* --------------------------------------------------------------- shot grid */
.shots { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.shot {
  margin: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r);
  transition: border-color .18s ease, transform .18s ease;
}
.shot:hover { border-color: var(--line); transform: translateY(-3px); }
.shot > button {
  display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
  background: #07060F; border-bottom: 1px solid var(--line-soft);
}
.shot > button:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { padding: 20px 22px 22px; }
.shot h3 { font-size: 17px; margin-bottom: 8px; }
.shot p { color: var(--muted); font-size: 14px; margin: 0; }
.shot p b { color: var(--text); font-weight: 600; }
.shot .tag {
  display: inline-block; font: 600 11px/1 var(--mono); letter-spacing: .1em;
  text-transform: uppercase; color: var(--dim); margin-bottom: 12px;
}

/* ---------------------------------------------------------------- lightbox */
#lightbox {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  margin: 0; padding: 0; border: 0; overflow: hidden;
  background: transparent; color: var(--text);

  opacity: 0; transform: scale(.988);
  transition: opacity .22s ease, transform .22s ease,
              overlay .22s ease allow-discrete, display .22s ease allow-discrete;
}
#lightbox[open] { opacity: 1; transform: none; }
@starting-style { #lightbox[open] { opacity: 0; transform: scale(.988); } }

#lightbox::backdrop {
  background: rgba(5, 4, 12, .97);
  backdrop-filter: blur(10px);                /* kills text ghosting from the page below */
  opacity: 0;
  transition: opacity .22s ease, overlay .22s ease allow-discrete, display .22s ease allow-discrete;
}
#lightbox[open]::backdrop { opacity: 1; }
@starting-style { #lightbox[open]::backdrop { opacity: 0; } }

.lb-frame {
  position: relative; height: 100%; display: flex; flex-direction: column;
  gap: 22px; padding: clamp(20px, 3vh, 40px) clamp(16px, 4vw, 60px) clamp(22px, 3vh, 40px);
}
.lb-row { flex: 1; min-height: 0; display: flex; align-items: center; gap: clamp(8px, 2vw, 22px); }
.lb-stage { flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; }
.lb-stage img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  border: 1px solid var(--line); border-radius: var(--r); background: #07060F;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6);
}

/* info block under the shot */
.lb-info { flex: none; max-width: 820px; margin-inline: auto; text-align: center; }
.lb-tag {
  font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 10px;
}
.lb-title {
  font-size: clamp(18px, 2.2vw, 23px); margin-bottom: 8px;
  background: var(--aurora); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lb-desc { color: var(--muted); font-size: 15px; margin: 0; }
.lb-desc b { color: var(--text); font-weight: 600; }
.lb-count {
  margin-top: 14px; font: 500 12px var(--mono); letter-spacing: .08em; color: var(--dim);
}

/* controls */
.lb-close, .lb-nav {
  padding: 0; cursor: pointer; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  transition: color .16s ease, border-color .16s ease, background .16s ease;
}
.lb-close:hover, .lb-nav:hover { color: var(--text); border-color: var(--violet); background: var(--surface-2); }
.lb-close:focus-visible, .lb-nav:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.lb-close {
  position: absolute; top: clamp(12px, 2vh, 22px); right: clamp(12px, 2vw, 26px); z-index: 2;
  width: 40px; height: 40px; font: 400 24px/1 var(--sans);
}
.lb-nav { flex: none; width: 46px; height: 78px; font: 400 30px/1 var(--sans); }

@media (max-width: 720px) {
  .lb-frame { gap: 16px; }
  .lb-nav { width: 38px; height: 62px; font-size: 24px; }
  .lb-desc { font-size: 14px; }
}

/* ------------------------------------------------------------------ mod list */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filter {
  font: 500 13px/1 var(--sans); padding: 9px 14px; border-radius: 100px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  transition: all .15s ease;
}
.filter:hover { color: var(--text); border-color: var(--violet); }
.filter.on { background: var(--aurora); border-color: transparent; color: #0A0814; font-weight: 600; }
.filter .c { opacity: .6; margin-left: 6px; font-family: var(--mono); font-size: 11px; }

.search {
  width: 100%; padding: 14px 16px; margin-bottom: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--text); font: 15px var(--sans);
}
.search:focus { outline: none; border-color: var(--violet); }
.search::placeholder { color: var(--dim); }

#modgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mod {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r); padding: 16px 18px;
  border-left: 3px solid var(--violet);
}
.mod:hover { border-color: var(--line); border-left-color: var(--cyan); }
.mod-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.mod-name { font-weight: 600; font-size: 15px; }
.mod-ver { font: 500 11px var(--mono); color: var(--dim); margin-left: auto; white-space: nowrap; }
.mod-desc { font-size: 13px; color: var(--muted); line-height: 1.5; margin: 0; }
.mod-id { font: 500 11px var(--mono); color: var(--dim); margin-top: 8px; }
.empty { color: var(--dim); padding: 40px 0; text-align: center; }

/* --------------------------------------------------------------------- specs */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); }
th { font: 600 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
td:first-child { color: var(--muted); }
td b { color: var(--text); }
.ok { color: #6BE39A; } .warn { color: var(--gold); }

/* ---------------------------------------------------------------------- code */
.code {
  position: relative;
  background: #0B0918; border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px 20px; margin: 0 0 16px;
  font: 13px/1.7 var(--mono); color: #C9C2EE;
  overflow-x: auto; white-space: pre;
}
.copy {
  position: absolute; top: 10px; right: 10px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: var(--r); padding: 6px 11px; font: 500 12px var(--sans); cursor: pointer;
}
.copy:hover { color: var(--text); border-color: var(--violet); }
.copy.done { color: #6BE39A; border-color: #6BE39A; }

/* --------------------------------------------------------------------- steps */
.steps { counter-reset: s; display: grid; gap: 14px; }
.step {
  counter-increment: s; position: relative; padding: 20px 24px 20px 66px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r);
}
.step::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; left: 22px; top: 20px;
  font: 700 15px var(--mono);
  background: var(--aurora); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.step h3 { font-size: 16px; margin-bottom: 5px; }
.step p { color: var(--muted); font-size: 14px; margin: 0; }

/* ----------------------------------------------------------------------- faq */
details {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r); padding: 18px 22px; margin-bottom: 10px;
}
details[open] { border-color: var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; color: var(--violet); font: 700 18px var(--mono); width: 14px; }
details[open] summary::before { content: "\2212"; }
details p { margin: 14px 0 0; color: var(--muted); font-size: 15px; }

/* -------------------------------------------------------------------- footer */
footer { border-top: 1px solid var(--line-soft); padding: 44px 0; color: var(--dim); font-size: 14px; }
footer .wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
footer img { height: 22px; image-rendering: pixelated; }
footer .right { margin-left: auto; text-align: right; }

/* ------------------------------------------------------------------ reveal-in */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .shot:hover { transform: none; }
  #lightbox, #lightbox::backdrop { transition: none; }
  #lightbox { transform: none; }
}

@media (max-width: 720px) {
  .top .wrap { height: auto; padding-block: 12px; flex-wrap: wrap; gap: 12px; }
  .nav { margin-left: 0; gap: 16px; }
  .world { grid-template-columns: 1fr; }
  section { padding: 60px 0; }
}

/* ------------------------------------------------------- emblem watermarks */
.hero-mark {
  position: absolute; top: 50%; left: 50%;
  width: 620px; max-width: 120vw;
  transform: translate(-50%, -54%);
  opacity: .05; z-index: 0; pointer-events: none;
  image-rendering: pixelated;
}
.foot-mark { height: 30px; image-rendering: pixelated; opacity: .75; }

@media (max-width: 720px) {
  .hero-mark { width: 360px; opacity: .04; }
}
