/* ============================================================
   PROCGENESIS — shell stylesheet
   "Deep space nova" — dark, cool, mysterious. Cyan/ion accents,
   pixel wordmark, no warm tones, no italics.
   ============================================================ */

:root {
  --ink-0: #04060d;
  --ink-1: #070b16;
  --ink-2: #0c1222;
  --ink-3: #111a30;
  --text: #d4dae6;
  --text-dim: #99a2b6;
  --text-faint: #5e6679;
  --accent: #4fdad5;          /* nova teal — original brand accent */
  --accent-bright: #8ff3ec;
  --accent-line: rgba(79, 218, 213, 0.30);
  --ion: #4f9fff;             /* electric blue */
  --ion-line: rgba(79, 159, 255, 0.28);
  --violet: #a78bfa;          /* nebula violet */
  --violet-bright: #c8b5ff;
  --violet-line: rgba(167, 139, 250, 0.30);
  --aurora-green: #58e0a2;
  --nebula: #7a64e0;
  --hairline: rgba(212, 218, 230, 0.09);
  --hairline-strong: rgba(212, 218, 230, 0.17);

  --font-display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;
  --font-pixel: "Silkscreen", "IBM Plex Mono", monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.44, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--ink-0);
  background-image:
    radial-gradient(1100px 700px at 12% -8%, rgba(122, 100, 224, 0.16), transparent 60%),
    radial-gradient(900px 600px at 88% 12%, rgba(79, 159, 255, 0.08), transparent 55%),
    radial-gradient(800px 600px at 8% 75%, rgba(46, 139, 110, 0.10), transparent 55%),
    radial-gradient(1400px 900px at 50% 115%, rgba(122, 100, 224, 0.11), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--ink-0); }

a { color: inherit; }

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

/* ---------- starfield canvas (behind everything) ---------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- typography helpers ---------- */
.overline {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--violet);
  display: flex;
  align-items: center;
  gap: 0.9em;
}
.overline::before {
  content: "";
  width: 2.4em;
  height: 1px;
  background: var(--violet-line);
  flex: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin: 0;
  color: #eef1f7;
  text-wrap: balance;
  text-shadow: 0 2px 26px rgba(2, 4, 10, 0.75), 0 1px 6px rgba(2, 4, 10, 0.5);
}

.accent {
  background: linear-gradient(95deg, var(--accent) 0%, var(--aurora-green) 45%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 18px rgba(79, 218, 213, 0.35)) drop-shadow(0 2px 10px rgba(2, 4, 10, 0.6));
}

.lede {
  font-size: 1.0625rem;
  color: var(--text-dim);
  max-width: 36em;
  text-wrap: pretty;
  text-shadow: 0 1px 14px rgba(2, 4, 10, 0.8);
}
.overline { text-shadow: 0 1px 10px rgba(2, 4, 10, 0.8); }
.hero-stats .stat b, .hero-stats .stat span { text-shadow: 0 1px 12px rgba(2, 4, 10, 0.8); }

.mono-note {
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* ---------- layout ---------- */
.shell {
  width: min(1180px, calc(100% - 4rem));
  margin: 0 auto;
}
@media (max-width: 560px) {
  .shell { width: calc(100% - 2.4rem); }
}

section { position: relative; }

/* graticule divider between sections */
.graticule {
  width: min(1180px, calc(100% - 4rem));
  margin: 0 auto;
  height: 56px;
  position: relative;
  display: flex;
  align-items: center;
}
.graticule::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline-strong) 12%, var(--hairline-strong) 88%, transparent);
}
.graticule::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 7px;
  background-image: repeating-linear-gradient(90deg, var(--hairline-strong) 0 1px, transparent 1px 48px);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.graticule span {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  padding: 0 1.4em;
  background: var(--ink-0);
  font-family: var(--font-pixel);
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* ---------- nav ---------- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.45s var(--ease-out), border-color 0.45s var(--ease-out), backdrop-filter 0.45s;
  border-bottom: 1px solid transparent;
}
.site-nav.scrolled {
  background: rgba(4, 6, 13, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--hairline);
}
.site-nav .nav-inner {
  width: min(1180px, calc(100% - 4rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}
.brand img {
  height: 28px;
  width: 28px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(79, 218, 213, 0.4));
  transition: transform 0.8s var(--ease-spring);
}
.brand:hover img { transform: rotate(24deg) scale(1.08); }
.brand .wordmark {
  font-family: var(--font-pixel);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #eef1f7;
  text-shadow: 0 0 14px rgba(79, 218, 213, 0.45);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-dim);
  padding: 0.4em 0;
  position: relative;
  transition: color 0.3s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(79, 218, 213, 0.6);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #eef1f7; }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  padding: 0.5em 0.9em;
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(4, 6, 13, 0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--hairline);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s var(--ease-out);
  }
  .nav-links.open { max-height: 300px; }
  .nav-links li { width: 100%; text-align: center; }
  .nav-links a { display: block; padding: 1em 0; }
  .nav-links a::after { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95em 1.7em;
  border-radius: 3px;
  cursor: pointer;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s, background 0.35s, color 0.35s, border-color 0.35s;
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, #72e9d6, #3fc79a);
  color: #03110f;
  box-shadow: 0 0 0 1px rgba(143, 243, 236, 0.25), 0 6px 26px -8px rgba(79, 218, 213, 0.55);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(143, 243, 236, 0.4), 0 14px 36px -8px rgba(79, 218, 213, 0.6);
}
.btn-ghost {
  border-color: var(--hairline-strong);
  color: var(--text-dim);
  background: rgba(212, 218, 230, 0.02);
}
.btn-ghost:hover {
  border-color: var(--accent-line);
  color: #eef1f7;
  transform: translateY(-2px);
}
.btn .arrow { transition: transform 0.35s var(--ease-spring); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- plate frame (instrument-panel corners) ---------- */
.plate {
  position: relative;
  background: linear-gradient(160deg, rgba(34, 27, 64, 0.5), rgba(7, 11, 22, 0.6));
  border: 1px solid var(--hairline);
  border-radius: 6px;
}
.plate .corner {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--violet-line);
  border-style: solid;
  border-width: 0;
  transition: width 0.4s var(--ease-out), height 0.4s var(--ease-out), border-color 0.4s;
  pointer-events: none;
}
.plate .corner.tl { top: -1px; left: -1px; border-top-width: 1px; border-left-width: 1px; border-top-left-radius: 6px; }
.plate .corner.tr { top: -1px; right: -1px; border-top-width: 1px; border-right-width: 1px; border-top-right-radius: 6px; }
.plate .corner.bl { bottom: -1px; left: -1px; border-bottom-width: 1px; border-left-width: 1px; border-bottom-left-radius: 6px; }
.plate .corner.br { bottom: -1px; right: -1px; border-bottom-width: 1px; border-right-width: 1px; border-bottom-right-radius: 6px; }
.plate:hover .corner { width: 30px; height: 30px; border-color: var(--accent); }

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 110px 0 60px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
/* soft dark scrim so hero text stays legible over bright nebula */
.hero-copy { position: relative; }
.hero-copy::before {
  content: "";
  position: absolute;
  inset: -3rem -4rem;
  background: radial-gradient(ellipse at 42% 42%, rgba(4, 6, 13, 0.78), rgba(4, 6, 13, 0.4) 55%, transparent 78%);
  z-index: -1;
  pointer-events: none;
}
.hero h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.3rem);
  margin: 0.55em 0 0.45em;
}
.hero .lede { margin: 0 0 2.2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-stats {
  display: flex;
  gap: 2.6rem;
  margin-top: 3.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--hairline);
}
.hero-stats .stat b {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: #eef1f7;
}
.hero-stats .stat span {
  font-family: var(--font-mono);
  font-size: 0.65625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* planet specimen plate */
.specimen {
  padding: 1.4rem 1.4rem 1.1rem;
  text-align: center;
}
.specimen-canvas-wrap {
  position: relative;
  margin: 0 auto;
  max-width: 420px;
}
#planet {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  cursor: grab;
  touch-action: none;
}
#planet.dragging { cursor: grabbing; }
.specimen-meta {
  margin-top: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--hairline);
  padding-top: 1rem;
}
.seed-readout {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3em 0;
  text-align: left;
  transition: color 0.3s;
}
.seed-readout:hover { color: var(--accent-bright); }
.seed-readout .seed-label { color: var(--violet); letter-spacing: 0.22em; }
.specimen-actions { display: flex; gap: 0.5rem; flex: none; }
.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: rgba(212, 218, 230, 0.04);
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.35s var(--ease-spring);
}
.icon-btn:hover {
  color: var(--accent-bright);
  border-color: var(--accent-line);
  transform: translateY(-2px) rotate(-8deg);
}
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn.spin svg { animation: spin-once 0.7s var(--ease-out); }
@keyframes spin-once { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.drag-hint {
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-faint);
}

@media (max-width: 920px) {
  .hero { padding-top: 90px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.8rem; flex-wrap: wrap; }
  .specimen { max-width: 460px; margin: 0 auto; width: 100%; }
}

/* ---------- section heading block ---------- */
.section-head { padding: 4.5rem 0 2.8rem; }
.section-head h2 {
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  margin-top: 0.5em;
  max-width: 16em;
}

/* ---------- generator cards ---------- */
.gen-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
  padding-bottom: 4.5rem;
}
@media (max-width: 980px) { .gen-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .gen-grid { grid-template-columns: 1fr; } }

.gen-card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out), border-color 0.5s;
}
.gen-card:hover {
  transform: translateY(-6px);
  border-color: var(--hairline-strong);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(79, 218, 213, 0.08);
}
.gen-card .thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-bottom: 1px solid var(--hairline);
}
.gen-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 1.4s var(--ease-out), filter 1.4s var(--ease-out);
  filter: saturate(0.9) brightness(0.92);
}
.gen-card:hover .thumb img {
  transform: scale(1.1);
  filter: saturate(1.05) brightness(1.02);
}
.gen-card .thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(4, 6, 13, 0.55));
  pointer-events: none;
}
.gen-card .plate-no {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 1;
  font-family: var(--font-pixel);
  font-size: 0.59375rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-bright);
  background: rgba(4, 6, 13, 0.74);
  border: 1px solid var(--accent-line);
  border-radius: 2px;
  padding: 0.45em 0.8em;
  backdrop-filter: blur(4px);
}
.gen-card .body {
  padding: 1.3rem 1.3rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.gen-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.45em;
}
.gen-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-dim);
  flex: 1;
}
.gen-card .launch {
  margin-top: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.6em;
}
.gen-card .launch .arrow { transition: transform 0.4s var(--ease-spring); }
.gen-card:hover .launch .arrow { transform: translateX(6px); }
.gen-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}
.gen-card .tags span {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 0.35em 0.7em;
}

/* wide variant for generators.html */
.gen-row {
  display: grid;
  grid-template-columns: 300px 1fr;
  text-decoration: none;
  overflow: hidden;
  margin-bottom: 1.3rem;
  transition: transform 0.5s var(--ease-out), box-shadow 0.5s var(--ease-out);
}
.gen-row:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(79, 218, 213, 0.08);
}
.gen-row .thumb {
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--hairline);
  min-height: 200px;
}
.gen-row .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease-out), filter 1.4s var(--ease-out);
  filter: saturate(0.9) brightness(0.92);
}
.gen-row:hover .thumb img {
  transform: scale(1.08);
  filter: saturate(1.05) brightness(1.02);
}
.gen-row .body { padding: 1.6rem 1.8rem; display: flex; flex-direction: column; }
.gen-row h3 { font-size: 1.6rem; margin-bottom: 0.4em; display: flex; align-items: baseline; gap: 0.8em; }
.gen-row h3 .plate-no-inline {
  font-family: var(--font-pixel);
  font-size: 0.59375rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
}
.gen-row p { margin: 0 0 1rem; color: var(--text-dim); flex: 1; max-width: 60em; }
.gen-row .meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.gen-row .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.gen-row .tags span {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-faint);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 0.35em 0.7em;
}
.gen-row .launch {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.6em;
}
.gen-row .launch .arrow { transition: transform 0.4s var(--ease-spring); }
.gen-row:hover .launch .arrow { transform: translateX(6px); }
@media (max-width: 760px) {
  .gen-row { grid-template-columns: 1fr; }
  .gen-row .thumb { border-right: 0; border-bottom: 1px solid var(--hairline); aspect-ratio: 16/7; min-height: 0; }
}

/* ---------- about notes ---------- */
.field-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.3rem;
  padding-bottom: 4.5rem;
}
@media (max-width: 920px) { .field-notes { grid-template-columns: 1fr; } }
.note {
  padding: 1.7rem 1.7rem 1.8rem;
}
.note .q {
  font-family: var(--font-mono);
  font-size: 0.65625rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 1rem;
  display: block;
}
.note h3 {
  font-size: 1.3rem;
  margin-bottom: 0.6em;
}
.note p { margin: 0; color: var(--text-dim); font-size: 0.9375rem; }

/* ---------- gallery strip (index) ---------- */
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.8rem;
  padding-bottom: 2rem;
}
@media (max-width: 920px) { .gallery-strip { grid-template-columns: repeat(3, 1fr); } }
.gallery-strip a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  aspect-ratio: 4 / 3;
  position: relative;
}
.gallery-strip img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.85) brightness(0.85);
  transform: scale(1.02);
  transition: transform 1.2s var(--ease-out), filter 1.2s var(--ease-out);
}
.gallery-strip a:hover img {
  transform: scale(1.12);
  filter: saturate(1.1) brightness(1.05);
}
.gallery-cta { text-align: center; padding-bottom: 4.5rem; }

/* ---------- gallery page ---------- */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-bottom: 2.4rem;
}
.filter-tabs button {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(212, 218, 230, 0.03);
  border: 1px solid var(--hairline-strong);
  border-radius: 3px;
  padding: 0.75em 1.3em;
  cursor: pointer;
  transition: all 0.35s var(--ease-out);
}
.filter-tabs button:hover { color: #eef1f7; border-color: var(--accent-line); }
.filter-tabs button.active {
  color: #03110f;
  background: linear-gradient(180deg, #6fe6df, #2fa9a3);
  border-color: transparent;
}

/* mosaic: dense grid, featured tiles span 2×2, captions reveal on hover */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: clamp(96px, 11.5vw, 170px);
  grid-auto-flow: dense;
  gap: 10px;
  padding-bottom: 5rem;
}
.gallery-item {
  grid-column: span 2;
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--hairline);
  background: var(--ink-2);
  cursor: zoom-in;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), border-color 0.45s, opacity 0.45s var(--ease-out);
}
.gallery-item.feat {
  grid-column: span 4;
  grid-row: span 2;
}
.gallery-item:hover {
  transform: translateY(-4px);
  border-color: var(--violet-line);
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.9), 0 0 34px -14px rgba(122, 100, 224, 0.5);
}
.gallery-item.hidden { display: none; }
.gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.94) brightness(0.94);
  transition: transform 1.2s var(--ease-out), filter 1.2s var(--ease-out);
}
.gallery-item:hover img {
  transform: scale(1.06);
  filter: saturate(1.06) brightness(1.04);
}
.gallery-item .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.15rem;
  padding: 0.9rem 1rem;
  background: linear-gradient(180deg, rgba(4, 6, 13, 0) 40%, rgba(4, 6, 13, 0.88));
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.gallery-item:hover .overlay { opacity: 1; }
.gallery-item .cat {
  font-family: var(--font-pixel);
  font-size: 0.5625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  transform: translateY(8px);
  transition: transform 0.45s var(--ease-out);
}
.gallery-item .cap {
  font-size: 0.875rem;
  color: #e8ecf5;
  transform: translateY(8px);
  transition: transform 0.45s var(--ease-out) 0.04s;
}
.gallery-item:hover .cat,
.gallery-item:hover .cap { transform: none; }
@media (max-width: 920px) {
  .gallery-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(100px, 16vw, 160px); }
}
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: clamp(90px, 24vw, 140px); }
  .gallery-item { grid-column: span 2; }
  .gallery-item.feat { grid-column: span 2; }
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 3, 8, 0.93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3.5rem 1.5rem 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 74vh;
  object-fit: contain;
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.95);
  transform: scale(0.96);
  transition: transform 0.45s var(--ease-out);
}
.lightbox.open img { transform: scale(1); }
.lightbox .lb-caption {
  margin-top: 1.2rem;
  display: flex;
  align-items: baseline;
  gap: 1.2em;
}
.lightbox .lb-caption .cat {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent);
}
.lightbox .lb-caption .cap { color: var(--text-dim); font-size: 0.9375rem; }
.lightbox .lb-close, .lightbox .lb-prev, .lightbox .lb-next {
  position: absolute;
  background: rgba(212, 218, 230, 0.05);
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  color: var(--text-dim);
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s var(--ease-out);
}
.lightbox .lb-close:hover, .lightbox .lb-prev:hover, .lightbox .lb-next:hover {
  color: var(--accent-bright);
  border-color: var(--accent-line);
}
.lightbox .lb-close { top: 1.2rem; right: 1.2rem; }
.lightbox .lb-prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 1.2rem; top: 50%; transform: translateY(-50%); }

/* ---------- contact + signup ---------- */
.signal {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
  padding-bottom: 5rem;
}
@media (max-width: 920px) { .signal { grid-template-columns: 1fr; } }
.signal .panel { padding: 2rem 2rem 2.2rem; }
.signal h3 { font-size: 1.5rem; margin-bottom: 0.5em; }
.signal p { color: var(--text-dim); margin: 0 0 1.4rem; }
.signup-form { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.signup-form input[type="text"],
.signup-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
  background: rgba(4, 6, 13, 0.6);
  border: 1px solid var(--hairline-strong);
  border-radius: 3px;
  padding: 0.9em 1.1em;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.signup-form input:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px rgba(79, 218, 213, 0.12);
}
.signup-form input::placeholder { color: var(--text-faint); }
.contact-links { display: flex; flex-direction: column; gap: 0.7rem; }
.contact-links a {
  display: flex;
  align-items: center;
  gap: 0.9em;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  padding: 0.9em 1.2em;
  transition: all 0.35s var(--ease-out);
}
.contact-links a:hover {
  color: #eef1f7;
  border-color: var(--accent-line);
  transform: translateX(4px);
}
.contact-links .glyph { color: var(--accent); font-size: 1rem; width: 1.2em; text-align: center; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 2.2rem 0 2.6rem;
}
.footer-inner {
  width: min(1180px, calc(100% - 4rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.site-footer .mono-note a { color: inherit; text-decoration: none; transition: color 0.3s; }
.site-footer .mono-note a:hover { color: var(--accent-bright); }
#constellation { height: 64px; width: 200px; opacity: 0.9; }

/* page header for inner pages */
.page-head {
  padding: 150px 0 1.5rem;
}
.page-head h1 { font-size: clamp(2.3rem, 4.6vw, 3.4rem); margin-top: 0.45em; }
.page-head .lede { margin-top: 1rem; }

/* toast (copy seed) */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translate(-50%, 16px);
  z-index: 120;
  background: rgba(12, 18, 34, 0.95);
  border: 1px solid var(--accent-line);
  color: var(--text);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  letter-spacing: 0.14em;
  padding: 0.8em 1.4em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .gen-card .thumb img, .gen-row .thumb img, .gallery-item img, .gallery-strip img { transition: none; }
  * { animation-duration: 0.001s !important; }
}
