:root {
  --bg:       #0B1026;   /* deep twilight, not black */
  --surface:  #121A38;
  --surface2: #182148;
  --line:     #26305C;
  --ink:      #E8ECF8;
  --muted:    #8A94B8;

  /* one accent per tool — stellar-classification style */
  --astryx:    #F2C14E;  /* star gold */
  --photyx:    #E4536B;  /* hydrogen-alpha crimson */
  --mindforge: #37D67A;  /* matrix green */
  --scriptum:  #7C9EF5;  /* ink periwinkle */

  --display: 'Julius Sans One', sans-serif;
  --body:    'IBM Plex Sans', sans-serif;
  --mono:    'IBM Plex Mono', monospace;
}

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.6;
  min-height: 100vh;
}

/* per-tool accent scope for detail pages */
body.accent-astryx    { --accent: var(--astryx); }
body.accent-photyx    { --accent: var(--photyx); }
body.accent-mindforge { --accent: var(--mindforge); }
body.accent-scriptum  { --accent: var(--scriptum); }

a { color: inherit; }

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Hero (home) ---------- */

header {
  padding: 4.5rem 0 3rem;
  text-align: center;
}

.wordmark {
  font-family: var(--display);
  font-size: clamp(1.9rem, 5vw, 3rem);
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  text-transform: uppercase;
}
.wordmark .tld { color: var(--muted); }

.tagline {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.constellation {
  display: block;
  margin: 2.25rem auto 0;
  width: min(420px, 80vw);
  height: auto;
}
.constellation line { stroke: var(--line); stroke-width: 1; }
.constellation .star { r: 4; }
.constellation .halo { r: 9; fill: none; stroke-width: 1; opacity: 0.35; }
.s-astryx    { fill: var(--astryx);    stroke: var(--astryx); }
.s-photyx    { fill: var(--photyx);    stroke: var(--photyx); }
.s-mindforge { fill: var(--mindforge); stroke: var(--mindforge); }
.s-scriptum  { fill: var(--scriptum);  stroke: var(--scriptum); }

@media (prefers-reduced-motion: no-preference) {
  .constellation .halo { animation: twinkle 4s ease-in-out infinite; }
  .constellation .halo:nth-of-type(2) { animation-delay: 1s; }
  .constellation .halo:nth-of-type(3) { animation-delay: 2s; }
  .constellation .halo:nth-of-type(4) { animation-delay: 3s; }
  @keyframes twinkle { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.5; } }
}

/* ---------- Layout ---------- */

main { padding-bottom: 4rem; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.6rem 1.6rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  border-top: 3px solid var(--accent, var(--line));
}
.card.astryx    { --accent: var(--astryx); }
.card.photyx    { --accent: var(--photyx); }
.card.mindforge { --accent: var(--mindforge); }
.card.scriptum  { --accent: var(--scriptum); }

.card h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}

.card p { color: var(--muted); font-size: 0.95rem; flex-grow: 1; }

.learn-more {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
  width: fit-content;
}
.learn-more:hover { text-decoration: underline; text-underline-offset: 3px; }

.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.25rem; }

.btn {
  font-family: var(--mono);
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 500; }
.btn.primary:hover { filter: brightness(1.12); }
.btn.quiet { color: var(--ink); background: transparent; }
.btn.quiet:hover { background: var(--surface2); border-color: var(--muted); }
.btn.tour { color: var(--accent); border-color: var(--accent); background: transparent; }
.btn.tour:hover { background: var(--accent); color: var(--bg); }
.btn.soon { color: var(--muted); background: transparent; border-style: dashed; cursor: default; }
.btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Astryx hero card ---------- */

.card.astryx.hero { grid-column: 1 / -1; padding: 2rem 2rem 1.9rem; gap: 1.5rem; }

.hero-top { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--astryx);
  text-transform: uppercase;
}

.hero-body { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.25rem; align-items: center; }
.hero-copy h2 { font-size: 1.7rem; }
.hero-copy > p.lede { color: var(--ink); font-size: 1.05rem; max-width: 46ch; }

.feature-list { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; margin: 0.25rem 0; }
.feature-list li { display: flex; gap: 0.65rem; align-items: flex-start; color: var(--ink); font-size: 0.92rem; }
.feature-list svg { flex-shrink: 0; margin-top: 0.2rem; }
.feature-list b { color: var(--ink); font-weight: 600; }
.feature-list span.desc { color: var(--muted); }

@media (max-width: 760px) {
  .hero-body { grid-template-columns: 1fr; }
}

/* ---------- Secondary row (home) ---------- */

.secondary-row { margin-top: 1.25rem; }
.secondary-heading {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.85rem 0.1rem;
}

/* ---------- Mock panel (reused: home hero + all detail-page slides) ---------- */

.hero-visual, .mock-panel {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.panel-head .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 0.4rem; }

.panel-target { padding: 1rem 1rem 0.25rem; }
.panel-target .name { font-family: var(--display); font-size: 1.05rem; letter-spacing: 0.06em; }
.panel-target .cat { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }

.panel-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; padding: 0.9rem 1rem; }
.stat { font-family: var(--mono); }
.stat .label { font-size: 0.65rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.stat .value { font-size: 0.95rem; color: var(--ink); margin-top: 0.15rem; }
.stat .value.accent { color: var(--accent); }

.panel-chart { padding: 0 1rem 1rem; }
.panel-chart svg { width: 100%; height: auto; display: block; }

.panel-frame { border-top: 1px solid var(--line); padding: 0.9rem 1rem 1rem; }
.panel-frame-label { font-family: var(--mono); font-size: 0.65rem; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.5rem; }
.panel-frame svg { width: 100%; height: auto; display: block; border-radius: 4px; }

/* mock components used across detail-page slides */

.mock-list { display: flex; flex-direction: column; }
.mock-row { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.85rem; }
.mock-row:last-child { border-bottom: none; }
.mock-row .name { color: var(--ink); }
.mock-row .meta { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }

.pill {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-transform: uppercase;
  white-space: nowrap;
}
.pill.muted { border-color: var(--line); color: var(--muted); }

.mock-grid-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; padding: 1rem; }
.thumb {
  aspect-ratio: 1;
  border-radius: 5px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0.3rem;
  background: linear-gradient(135deg, var(--surface) 0%, var(--line) 100%);
}
.thumb .mark { width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.6rem; font-family: var(--mono); }
.thumb.keep .mark { background: var(--accent); color: var(--bg); }
.thumb.reject .mark { background: transparent; border: 1px solid var(--muted); color: var(--muted); }

.mock-flip { display: flex; align-items: center; gap: 0.75rem; padding: 1.25rem 1rem; }
.flip-face {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  min-height: 110px;
}
.flip-face .tag { font-family: var(--mono); font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.flip-face .word { font-family: var(--display); font-size: 1.1rem; letter-spacing: 0.04em; }
.flip-face .sub { font-size: 0.78rem; color: var(--muted); }
.flip-arrow { color: var(--muted); font-family: var(--mono); flex-shrink: 0; }

.mock-heatmap { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; padding: 1rem; }
.mock-heatmap .cell { aspect-ratio: 1; border-radius: 2px; background: var(--accent); }

.mock-bars { display: flex; align-items: flex-end; gap: 0.7rem; padding: 1rem 1rem 0.5rem; height: 120px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar-col .bar { width: 100%; background: var(--accent); border-radius: 3px 3px 0 0; opacity: 0.9; }
.bar-col .bar-label { font-family: var(--mono); font-size: 0.6rem; color: var(--muted); margin-top: 0.4rem; }

/* ---------- Detail (tool) page ---------- */

.sub-header { padding: 3.5rem 0 2.5rem; text-align: left; }
.back-link {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
}
.back-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.page-title {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 2.7rem);
  color: var(--accent);
  margin-top: 1.1rem;
}
.page-subtitle { color: var(--muted); margin-top: 0.4rem; font-size: 1.02rem; }

.slideshow { outline: none; }
.slides { position: relative; }

.slide { display: none; grid-template-columns: 1fr 1.1fr; gap: 2.25rem; align-items: center; }
.slide.is-active { display: grid; }

@media (prefers-reduced-motion: no-preference) {
  .slide.is-active { animation: slidein 0.3s ease; }
  @keyframes slidein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
}

.slide-text .slide-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.slide-text h2 { font-size: 1.5rem; margin-top: 0.5rem; }
.slide-text p { color: var(--muted); margin-top: 0.75rem; max-width: 44ch; }

@media (max-width: 760px) {
  .slide { grid-template-columns: 1fr; }
}

.slide-controls { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-top: 2.5rem; }
.nav-arrow {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nav-arrow:hover { border-color: var(--accent); color: var(--accent); }
.nav-arrow:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.dots { display: flex; gap: 0.5rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; border: 1px solid var(--line); padding: 0; cursor: pointer; }
.dot.is-active { background: var(--accent); border-color: var(--accent); }
.dot:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.cta-row { margin-top: 3rem; display: flex; justify-content: center; gap: 0.75rem; flex-wrap: wrap; }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  text-align: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
}
footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
footer a:hover { color: var(--ink); }
