/* =============================================================================
   GhostInTheMachine — marketing site design system
   Brand: GhostWare cyberpunk. Obsidian + electric cyan + neon magenta.
   Fonts: Orbitron (display) / Inter (body) / JetBrains Mono (data).
   ========================================================================== */

:root {
  --obsidian: #04060b;
  --graphite: #0b0e16;
  --panel: #0d1220;
  --panel-2: #101728;
  --line: #1a2740;
  --line-bright: #24406b;
  --cyan: #00e5ff;
  --magenta: #ff2fa0;
  --violet: #9b5cff;
  --gold: #f5c76a;
  --ink: #d9eef7;
  --ink-dim: #8fa6bb;
  --ink-faint: #5f7387;
  --font-display: "Orbitron", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --nav-h: 64px;
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  background:
    radial-gradient(1100px 520px at 18% -6%, rgba(0, 229, 255, 0.07), transparent 60%),
    radial-gradient(900px 480px at 85% -4%, rgba(255, 47, 160, 0.06), transparent 60%),
    var(--obsidian);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* faint circuit grid over everything, fixed so it feels like a surface */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  z-index: 0;
}

::selection { background: rgba(0, 229, 255, 0.28); color: #eafcff; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; height: auto; display: block; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   Header / nav
   ------------------------------------------------------------------------ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(4, 6, 11, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 229, 255, 0.14);
}

.site-nav .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand-lockup { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.16em;
  color: #eafcff;
  white-space: nowrap;
}
.brand-product {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.26em;
  color: var(--cyan);
  margin-top: 5px;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  list-style: none;
}
.nav-links a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-dim);
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--ink); background: rgba(0, 229, 255, 0.07); text-decoration: none; }
.nav-links a.active { color: var(--cyan); }
.nav-links a.nav-buy {
  margin-left: 8px;
  color: #041018;
  background: linear-gradient(100deg, var(--cyan), #4dc3ff);
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.35);
}
.nav-links a.nav-buy:hover { filter: brightness(1.1); background: linear-gradient(100deg, var(--cyan), #4dc3ff); }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 18px 18px;
    background: rgba(4, 6, 11, 0.97);
    border-bottom: 1px solid rgba(0, 229, 255, 0.14);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 15px; }
  .nav-links a.nav-buy { margin-left: 0; text-align: center; }
}

/* --------------------------------------------------------------------------
   Type + sections
   ------------------------------------------------------------------------ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--magenta);
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: 0.04em; line-height: 1.16; }

h1 { font-size: clamp(30px, 5.4vw, 56px); font-weight: 900; margin: 14px 0 18px; color: #eefcff; }
h2 { font-size: clamp(22px, 3.2vw, 34px); font-weight: 800; margin: 12px 0 14px; color: #e8f9ff; }
h3 { font-size: 16px; font-weight: 700; color: var(--cyan); margin-bottom: 8px; }

.grad {
  background: linear-gradient(92deg, var(--cyan) 10%, var(--violet) 55%, var(--magenta) 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede { font-size: clamp(16px, 2vw, 19px); color: var(--ink-dim); max-width: 62ch; }

.section { padding: 84px 0; position: relative; }
.section + .section { border-top: 1px solid rgba(26, 39, 64, 0.6); }
.section-head { max-width: 760px; margin-bottom: 44px; }
.section-head .lede { margin-top: 6px; }

.center { text-align: center; }
.center .section-head, .center .lede { margin-left: auto; margin-right: auto; }

/* --------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------ */
.hero { padding: 96px 0 72px; overflow: hidden; }
.hero .lede { margin-bottom: 30px; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-note { font-family: var(--font-mono); font-size: 12px; color: var(--ink-faint); margin-top: 16px; }

.shot {
  border: 1px solid var(--line-bright);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0, 229, 255, 0.08),
    0 0 60px rgba(0, 229, 255, 0.10),
    0 30px 80px rgba(0, 0, 0, 0.65);
  background: var(--graphite);
}
.shot img { width: 100%; height: auto; }
/* Tall hero shots: cap the height so the full plugin UI fits on screen
   without scrolling; width follows from the image's own aspect ratio. */
.shot--fit { max-width: min(100%, 100vh); margin-left: auto; margin-right: auto; }
.shot-caption {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  margin-top: 12px;
  letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 14px 26px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  text-align: center;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  color: #041018;
  background: linear-gradient(100deg, var(--cyan), #4dc3ff);
  box-shadow: 0 0 26px rgba(0, 229, 255, 0.35);
}
.btn-primary:hover { filter: brightness(1.1); }

.btn-magenta {
  color: #fff;
  background: linear-gradient(100deg, var(--magenta), #ff5fb8);
  box-shadow: 0 0 26px rgba(255, 47, 160, 0.32);
}
.btn-magenta:hover { filter: brightness(1.08); }

.btn-ghost {
  color: var(--cyan);
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.4);
}
.btn-ghost:hover { background: rgba(0, 229, 255, 0.12); }

.btn-block { display: block; width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; filter: none; }

/* --------------------------------------------------------------------------
   Grids + cards
   ------------------------------------------------------------------------ */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.card:hover {
  border-color: rgba(0, 229, 255, 0.4);
  box-shadow: 0 0 34px rgba(0, 229, 255, 0.08), 0 18px 40px rgba(0, 0, 0, 0.45);
  transform: translateY(-2px);
}
.card p { color: var(--ink-dim); font-size: 14.5px; }
.card .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}

.card-accent { border-color: rgba(255, 47, 160, 0.45); }
.card-accent:hover { border-color: rgba(255, 47, 160, 0.7); box-shadow: 0 0 34px rgba(255, 47, 160, 0.1), 0 18px 40px rgba(0, 0, 0, 0.45); }

.card-gold { border-color: rgba(245, 199, 106, 0.4); }
.card-gold h3 { color: var(--gold); }
.card-gold:hover { border-color: rgba(245, 199, 106, 0.65); box-shadow: 0 0 34px rgba(245, 199, 106, 0.08), 0 18px 40px rgba(0, 0, 0, 0.45); }

/* chips (module names, tags) */
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-bright);
  color: #a9ecf8;
  background: rgba(0, 229, 255, 0.05);
  white-space: nowrap;
}
.chip-m { border-color: rgba(255, 47, 160, 0.45); color: #ffb9dd; background: rgba(255, 47, 160, 0.06); }
.chip-v { border-color: rgba(155, 92, 255, 0.45); color: #cfb4ff; background: rgba(155, 92, 255, 0.07); }

/* stats band */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.stat {
  text-align: center;
  padding: 26px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 18, 32, 0.65);
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 900;
  color: var(--cyan);
  text-shadow: 0 0 24px rgba(0, 229, 255, 0.45);
}
.stat span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* split layout (text + image) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.split .lede { font-size: 16px; }

ul.ticks { list-style: none; margin-top: 16px; }
ul.ticks li {
  padding-left: 26px;
  position: relative;
  margin-bottom: 10px;
  color: var(--ink-dim);
  font-size: 15px;
}
ul.ticks li::before {
  content: ">";
  position: absolute;
  left: 0;
  color: var(--magenta);
  font-family: var(--font-mono);
  font-weight: 600;
}
ul.ticks li b { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------------------------------
   Spec tables
   ------------------------------------------------------------------------ */
table.spec { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.spec th, table.spec td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.spec th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}
table.spec td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
table.spec td { color: var(--ink-dim); }

/* --------------------------------------------------------------------------
   FAQ
   ------------------------------------------------------------------------ */
details.faq {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(13, 18, 32, 0.65);
  margin-bottom: 12px;
  overflow: hidden;
}
details.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--ink);
  position: relative;
  padding-right: 48px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 14px;
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--cyan);
}
details.faq[open] summary::after { content: "-"; }
details.faq .faq-body { padding: 0 20px 18px; color: var(--ink-dim); font-size: 14.5px; }
details.faq .faq-body p + p { margin-top: 10px; }

/* --------------------------------------------------------------------------
   Forms
   ------------------------------------------------------------------------ */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 7px;
}
input[type="text"], input[type="email"], input[type="password"] {
  width: 100%;
  background: #081120;
  border: 1px solid var(--line-bright);
  color: var(--ink);
  border-radius: 10px;
  padding: 13px 14px;
  font-size: 15px;
  font-family: var(--font-body);
}
input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.14); }
input.mono { font-family: var(--font-mono); letter-spacing: 0.04em; }

.form-msg { font-size: 14px; margin-top: 12px; min-height: 20px; }
.form-msg.err { color: #ff7b9c; }
.form-msg.ok { color: #6fe8c0; }

.keybox {
  font-family: var(--font-mono);
  font-size: clamp(14px, 2.4vw, 19px);
  letter-spacing: 0.08em;
  color: var(--magenta);
  background: #0a0f1c;
  border: 1px dashed #3a2a4a;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  word-break: break-all;
}

/* --------------------------------------------------------------------------
   Pricing
   ------------------------------------------------------------------------ */
.price-hero {
  border: 1px solid rgba(0, 229, 255, 0.4);
  box-shadow: 0 0 60px rgba(0, 229, 255, 0.1);
  background: linear-gradient(180deg, #101a30, var(--panel));
  border-radius: 18px;
  padding: 40px 34px;
}
.price-big {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 900;
  color: #eefcff;
  line-height: 1;
}
.price-big small { font-size: 0.32em; font-family: var(--font-mono); color: var(--ink-faint); font-weight: 400; letter-spacing: 0.2em; }

.pack-price { font-family: var(--font-display); font-size: 30px; font-weight: 800; color: #eefcff; margin: 4px 0 2px; }
.pack-credits { font-family: var(--font-mono); font-size: 12.5px; color: var(--cyan); margin-bottom: 14px; }
.per-credit { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #041018;
  background: var(--cyan);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 12px;
}
.badge-m { background: var(--magenta); color: #fff; }

/* --------------------------------------------------------------------------
   Steps (install / how-to)
   ------------------------------------------------------------------------ */
.steps { counter-reset: step; list-style: none; }
.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 26px 62px;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  color: var(--magenta);
  border: 1px solid rgba(255, 47, 160, 0.4);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 47, 160, 0.06);
}
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 48px;
  bottom: 4px;
  width: 1px;
  background: linear-gradient(180deg, rgba(255, 47, 160, 0.35), transparent);
}
.steps h3 { color: var(--ink); font-size: 15px; }
.steps p { color: var(--ink-dim); font-size: 14.5px; margin-top: 4px; }
.steps code { font-family: var(--font-mono); font-size: 13px; color: #a9ecf8; background: rgba(0, 229, 255, 0.07); border-radius: 6px; padding: 2px 7px; }

/* --------------------------------------------------------------------------
   CTA band + footer
   ------------------------------------------------------------------------ */
.cta-band {
  border: 1px solid rgba(255, 47, 160, 0.35);
  border-radius: 18px;
  padding: 54px 34px;
  text-align: center;
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(255, 47, 160, 0.12), transparent 70%),
    linear-gradient(180deg, #121022, var(--panel));
}
.cta-band .lede { margin: 8px auto 26px; }

.site-footer {
  border-top: 1px solid rgba(26, 39, 64, 0.8);
  padding: 48px 0 60px;
  margin-top: 40px;
  font-size: 13.5px;
  color: var(--ink-faint);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 14px;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: var(--ink-faint); }
.site-footer a:hover { color: var(--cyan); }
.footer-product { font-family: var(--font-mono); font-size: 12px; color: var(--ink-dim); margin-top: 9px; letter-spacing: 0.04em; }
.footer-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; margin-top: 14px; color: var(--ink-faint); }

/* --------------------------------------------------------------------------
   Brand band (GhostWare studio framing)
   ------------------------------------------------------------------------ */
.brand-band {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 42px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 44px 40px;
  background:
    radial-gradient(620px 240px at 0% 0%, rgba(0, 229, 255, 0.06), transparent 70%),
    radial-gradient(500px 200px at 100% 100%, rgba(255, 47, 160, 0.06), transparent 70%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
}
@media (max-width: 820px) { .brand-band { grid-template-columns: 1fr; padding: 34px 26px; } }
.brand-tagline {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--magenta);
  margin-top: 20px;
}
.roadmap { list-style: none; }
.roadmap li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.roadmap li:last-child { border-bottom: 0; }
.roadmap .no { font-family: var(--font-display); font-weight: 800; font-size: 13px; color: var(--cyan); flex: none; letter-spacing: 0.1em; }
.roadmap .no.dim { color: var(--ink-faint); }
.roadmap b { color: var(--ink); font-weight: 600; }
.roadmap span.desc { color: var(--ink-dim); font-size: 13.5px; }
.roadmap .ship { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; color: #6fe8c0; margin-left: auto; flex: none; text-transform: uppercase; }
.roadmap .ship.soon { color: var(--ink-faint); }

/* --------------------------------------------------------------------------
   Account dashboard
   ------------------------------------------------------------------------ */
.acct-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 22px;
  background: rgba(13, 18, 32, 0.65);
}
.acct-bar .k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.acct-email { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: #eefcff; margin-top: 4px; }

.lic-card { margin-bottom: 18px; }
.lic-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.lic-key { font-size: 15px; letter-spacing: 0.06em; color: var(--magenta); word-break: break-all; }
.pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a9ecf8;
  border: 1px solid var(--line-bright);
  background: rgba(0, 229, 255, 0.06);
  border-radius: 999px;
  padding: 4px 12px;
  flex: none;
}
.lic-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 520px) { .lic-stats { grid-template-columns: 1fr; } }
.lic-stats > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
  background: rgba(8, 17, 32, 0.5);
}
.lic-num { display: block; font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--cyan); }
.lic-lbl { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); margin-top: 6px; }
.lic-actions select {
  background: #081120;
  border: 1px solid var(--line-bright);
  color: var(--ink);
  border-radius: 10px;
  padding: 11px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.lic-actions .btn { padding: 11px 18px; font-size: 13px; }

/* --------------------------------------------------------------------------
   Reveal-on-scroll (gentle; disabled under reduced motion)
   ------------------------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

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

/* ---- module reference pages (/modules) ---- */
a.chip { text-decoration: none; transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease; }
a.chip:hover { border-color: var(--cyan); color: #eafcff; background: rgba(0, 229, 255, 0.12); }

.mtabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 34px; }
.mtab {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-bright);
  color: #a9ecf8;
  background: rgba(0, 229, 255, 0.05);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.mtab:hover { border-color: var(--cyan); color: #eafcff; }
.mtab.active { border-color: var(--cyan); color: #041018; background: var(--cyan); font-weight: 600; }

.mgroup { margin-bottom: 42px; }
.mgroup-head h2 { font-size: clamp(20px, 2.6vw, 26px); }
.mgroup-head p { color: var(--ink-dim); margin-top: 6px; max-width: 78ch; }
.mlist { list-style: none; margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.mrow + .mrow { border-top: 1px solid var(--line); }
.mrow a {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 14px 18px;
  text-decoration: none;
  background: rgba(13, 18, 32, 0.55);
  transition: background 0.18s ease;
}
.mrow a:hover { background: rgba(0, 229, 255, 0.07); }
.mrow-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink); letter-spacing: 0.03em; }
.mrow a:hover .mrow-name { color: var(--cyan); }
.mrow-hook { color: var(--ink-dim); font-size: 14px; }
.mrow-go { color: var(--magenta); font-family: var(--font-mono); }
@media (max-width: 720px) {
  .mrow a { grid-template-columns: 1fr auto; }
  .mrow-hook { grid-column: 1 / -1; }
}

.ctl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 26px; }
.ctl {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(13, 18, 32, 0.65);
  padding: 16px 18px;
}
.ctl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ctl-name { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--cyan); letter-spacing: 0.04em; }
.ctl-range { font-family: var(--font-mono); font-size: 11px; color: var(--ink-faint); }
.ctl p { color: var(--ink-dim); font-size: 14px; margin-top: 8px; }

.mod-shot { position: relative; }
.mod-shot.ph { aspect-ratio: 16 / 10; }
.mod-shot .ph-box { display: none; }
.mod-shot.ph .ph-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(0, 229, 255, 0.04) 0 1px, transparent 1px 3px),
    linear-gradient(140deg, rgba(0, 229, 255, 0.08), rgba(255, 47, 160, 0.08));
}
.mod-shot .ph-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(18px, 2.6vw, 28px);
  letter-spacing: 0.14em;
  color: var(--cyan);
  text-shadow: 0 0 24px rgba(0, 229, 255, 0.45);
}
.mod-shot .ph-sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
}
.mod-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mod-nav-top { margin-bottom: 34px; }

/* --------------------------------------------------------------------------
   Module screenshot callouts + lightbox (module reference sub-pages)
   ------------------------------------------------------------------------ */
.mod-shot[data-lightbox] { cursor: zoom-in; }
.mod-shot .shot-img-wrap { position: relative; }

.mod-shot .co {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  font: inherit;
}
.mod-shot .co-dot {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #06121f;
  background: var(--cyan);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.75), 0 0 2px rgba(0, 229, 255, 0.9);
  position: relative;
}
.mod-shot .co-dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 255, 0.55);
  animation: co-pulse 2.2s ease-out infinite;
}
@keyframes co-pulse {
  0%   { transform: scale(0.7); opacity: 0.9; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mod-shot .co-dot::after { animation: none; opacity: 0.35; }
}
.mod-shot .co-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  white-space: nowrap;
  color: var(--cyan);
  background: rgba(4, 10, 20, 0.88);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 4px;
  padding: 4px 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}
.mod-shot .co.co-flip { flex-direction: row-reverse; }
.mod-shot .co.hot .co-dot,
.mod-shot .co:hover .co-dot,
.mod-shot .co:focus-visible .co-dot {
  background: var(--magenta, #FF2FA0);
  box-shadow: 0 0 16px rgba(255, 47, 160, 0.8);
}
.mod-shot .co.hot .co-tag,
.mod-shot .co:hover .co-tag,
.mod-shot .co:focus-visible .co-tag {
  color: #fff;
  border-color: rgba(255, 47, 160, 0.6);
}
@media (max-width: 700px) {
  .mod-shot .co-tag { display: none; }
  .mod-shot .co-dot { width: 18px; height: 18px; font-size: 10px; }
}
.mod-shot.ph .co, .mod-shot.ph .shot-bar { display: none; }
.mod-shot.ph img { display: none; }

.mod-shot .shot-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid rgba(0, 229, 255, 0.18);
  background: rgba(4, 10, 20, 0.7);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
}
.mod-shot .shot-zoom { color: var(--cyan); opacity: 0.75; }

/* Legend that mirrors the numbered markers on the shot */
.co-legend { list-style: none; margin-top: 22px; display: grid; gap: 12px; }
.co-legend li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid rgba(26, 39, 64, 0.9);
  border-radius: 8px;
  background: rgba(10, 16, 28, 0.55);
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: default;
}
.co-legend li.hot, .co-legend li:hover {
  border-color: rgba(0, 229, 255, 0.45);
  background: rgba(0, 229, 255, 0.05);
}
.co-legend .co-num {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: #06121f;
  background: var(--cyan);
  margin-top: 2px;
}
.co-legend b {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--cyan);
}
.co-legend p { color: var(--ink-dim); font-size: 13.5px; margin-top: 4px; }

/* Full-screen lightbox */
.gw-lb {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(2, 6, 14, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4vh 4vw;
  cursor: zoom-out;
  animation: gw-lb-in 0.16s ease-out;
}
@keyframes gw-lb-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .gw-lb { animation: none; } }
.gw-lb img {
  max-width: 100%;
  max-height: 100%;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.1), 0 0 90px rgba(0, 229, 255, 0.16);
}
.gw-lb .gw-lb-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--ink-faint);
}
