/* ═══════════════════════════════════════════
   ZUKI RH — original terminal / underground UI
   ═══════════════════════════════════════════ */

:root {
  --bg: #070807;
  --bg-elevated: #0e100e;
  --bg-card: #0c0e0c;
  --fg: #f2f4f0;
  --fg-dim: #8a9186;
  --muted: #5a6158;
  --line: #1c211c;
  --line-strong: #2a322a;
  --acid: #b8ff3c;
  --acid-dim: #7ab020;
  --acid-glow: rgba(184, 255, 60, 0.18);
  --danger: #ff5a5a;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", Menlo, monospace;
  --display: "Syne", system-ui, sans-serif;
  --radius: 2px;
  --nav-h: 64px;
  --max: 1240px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: var(--mono);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.mono {
  font-family: var(--mono);
}

.accent {
  color: var(--acid);
}

.muted {
  color: var(--muted);
}

/* overlays */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 89;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.08) 2px,
    rgba(0, 0, 0, 0.08) 3px
  );
  opacity: 0.35;
}

/* ─── NAV ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid var(--line-strong);
  background: rgba(7, 8, 7, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  justify-self: start;
  transition: opacity 0.2s var(--ease);
}

.nav-brand:hover {
  opacity: 0.8;
}

.nav-logo {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.nav-brand-text {
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
}

.nav-brand-text em {
  font-style: normal;
  color: var(--acid);
}

.nav-center {
  justify-self: center;
}

.nav-ticker {
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  color: var(--acid);
}

.nav-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* badges + buttons */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line-strong);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  background: var(--bg-elevated);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.badge-chain {
  color: var(--fg);
}

.badge-accent {
  border-color: var(--acid);
  color: var(--acid);
  background: var(--acid-glow);
}

.badge-muted {
  opacity: 0.75;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid var(--fg);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--acid);
  color: #081000;
  border-color: var(--acid);
  box-shadow: 0 0 0 0 var(--acid-glow);
}

.btn-primary:hover {
  background: #d4ff6a;
  box-shadow: 0 0 24px var(--acid-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--fg);
}

.btn-secondary:hover {
  background: var(--fg);
  color: var(--bg);
}

.btn-ghost {
  padding: 0.45rem 0.75rem;
  border-color: var(--line-strong);
  color: var(--fg);
  background: transparent;
  font-size: 0.68rem;
}

.btn-ghost:hover {
  border-color: var(--acid);
  color: var(--acid);
  background: var(--acid-glow);
}

.btn-copy {
  padding: 0.55rem 0.85rem;
  border-color: var(--line-strong);
  background: var(--bg-elevated);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.btn-copy:not(:disabled):hover {
  border-color: var(--acid);
  color: var(--acid);
}

.btn-copy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ─── HERO ─── */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-visual {
  min-width: 0;
}

.hero-window {
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  box-shadow: 0 0 0 1px rgba(184, 255, 60, 0.04), 0 30px 80px rgba(0, 0, 0, 0.55);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: #0a0c0a;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
  text-transform: uppercase;
}

.window-dots {
  display: inline-flex;
  gap: 5px;
}

.window-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  display: block;
}

.window-dots i:nth-child(1) {
  background: #ff5f57;
}
.window-dots i:nth-child(2) {
  background: #febc2e;
}
.window-dots i:nth-child(3) {
  background: #28c840;
}

.window-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-meta {
  color: var(--acid);
  opacity: 0.85;
}

.hero-mascot-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #000;
}

.hero-mascot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(1.05);
  transition: transform 0.6s var(--ease);
}

.hero-window:hover .hero-mascot {
  transform: scale(1.03);
}

.hero-glitch-overlay {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(184, 255, 60, 0.03) 50%,
    transparent 100%
  );
  mix-blend-mode: screen;
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

.hero-file-meta {
  margin-top: 0.75rem;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--acid);
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 0 var(--acid-glow);
  animation: pulse-dot 1.8s ease-out infinite;
}

@keyframes pulse-dot {
  0% {
    box-shadow: 0 0 0 0 rgba(184, 255, 60, 0.55);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(184, 255, 60, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(184, 255, 60, 0);
  }
}

.hero-ticker {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(4rem, 12vw, 7.5rem);
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: var(--fg);
  margin-bottom: 0.85rem;
  text-shadow: 0 0 40px var(--acid-glow);
}

.hero-headline {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.2vw, 2.15rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  color: var(--fg);
}

.hero-lore {
  font-size: 0.85rem;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
  margin-bottom: 1.75rem;
  max-width: 34ch;
}

.ca-block {
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  padding: 0.9rem 1rem;
  margin-bottom: 1.5rem;
  max-width: 420px;
}

.ca-label {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.ca-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ca-value {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--acid);
  word-break: break-all;
  font-family: var(--mono);
}

.ca-value.is-soon {
  animation: soon-pulse 1.8s ease-in-out infinite;
}

@keyframes soon-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* ─── MARQUEE ─── */
.marquee {
  border-block: 1px solid var(--line-strong);
  background: #050605;
  overflow: hidden;
  padding: 0.85rem 0;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--acid);
  white-space: nowrap;
}

.marquee-track span {
  padding-right: 2rem;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* ─── SECTIONS ─── */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4.5rem 1.25rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.85rem;
  margin-bottom: 1.75rem;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--fg-dim);
  text-transform: uppercase;
}

.section-title-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: end;
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.25rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
}

.section-lead {
  font-size: 0.95rem;
  color: var(--fg-dim);
  max-width: 36ch;
  line-height: 1.6;
}

/* gallery */
.gallery-window {
  border: 1px solid var(--line-strong);
  background: var(--bg-card);
  margin-bottom: 1.25rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
}

.gallery-item {
  background: var(--bg);
  cursor: default;
  transition: background 0.2s;
}

.gallery-item:hover {
  background: #0a0c0a;
}

.gallery-img-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  background: #000;
}

.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s var(--ease), filter 0.3s;
  filter: grayscale(0.15) contrast(1.05);
}

.gallery-item:hover img {
  transform: scale(1.06);
  filter: grayscale(0) contrast(1.08) saturate(1.1);
}

.gallery-item figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.85rem;
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gallery-item figcaption .mono {
  color: var(--muted);
}

.file-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line-strong);
}

.file-stats > div {
  padding: 1rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.file-stats > div:last-child {
  border-right: none;
}

.file-stats .muted {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
}

.file-stats strong {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}

/* status */
.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}

.status-card {
  background: var(--bg-card);
  padding: 1.35rem 1.15rem;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: background 0.2s;
}

.status-card:hover {
  background: #101310;
}

.status-label {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--muted);
}

.status-value {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  letter-spacing: -0.02em;
  word-break: break-all;
  line-height: 1.15;
}

.status-sub {
  margin-top: auto;
  font-size: 0.68rem;
  color: var(--fg-dim);
  letter-spacing: 0.04em;
  line-height: 1.4;
}

/* lore */
.lore-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
}

.lore-card {
  background: var(--bg-card);
  padding: 1.75rem 1.5rem;
  transition: background 0.2s;
}

.lore-card:hover {
  background: #101310;
}

.lore-card-feature {
  background: linear-gradient(160deg, #101510 0%, #0a0e08 100%);
  border-left: 2px solid var(--acid);
}

.lore-meta {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--acid-dim);
  margin-bottom: 0.85rem;
}

.lore-card h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 0.85rem;
}

.lore-card p {
  color: var(--fg-dim);
  font-size: 0.9rem;
  line-height: 1.65;
  max-width: 48ch;
}

/* steps */
.steps {
  list-style: none;
  display: grid;
  gap: 1px;
  background: var(--line-strong);
  border: 1px solid var(--line-strong);
  margin-bottom: 1.75rem;
}

.step {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1rem;
  background: var(--bg-card);
  padding: 1.5rem 1.35rem;
  transition: background 0.2s;
}

.step:hover {
  background: #101310;
}

.step-num {
  font-size: 0.85rem;
  color: var(--acid);
  letter-spacing: 0.1em;
  padding-top: 0.15rem;
}

.step h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.45rem;
}

.step p {
  color: var(--fg-dim);
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 60ch;
}

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 1.1rem 1.25rem;
  border: 1px dashed var(--line-strong);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  color: var(--fg-dim);
}

.flow-arrow {
  color: var(--muted);
}

/* CTA band */
.cta-band {
  padding-top: 2rem;
  padding-bottom: 5rem;
}

.cta-band-inner {
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(ellipse at 30% 0%, var(--acid-glow), transparent 55%),
    var(--bg-elevated);
  padding: 3.5rem 1.75rem;
  text-align: center;
}

.cta-kicker {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--acid);
  margin-bottom: 1rem;
}

.cta-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
}

.cta-sub {
  color: var(--fg-dim);
  margin-bottom: 1.75rem;
  font-size: 0.95rem;
}

.cta-band .hero-ctas {
  justify-content: center;
  margin-bottom: 0;
}

/* footer */
.footer {
  border-top: 1px solid var(--line-strong);
  padding: 2.5rem 1.25rem 3rem;
  background: #050605;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-brand img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}

.footer-brand strong {
  display: block;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.footer-brand .mono {
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}

.footer-links a {
  color: var(--fg-dim);
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--acid);
}

.footer-note {
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.6;
  max-width: 70ch;
  letter-spacing: 0.04em;
}

/* toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(12px);
  z-index: 100;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--acid);
  background: #0a1005;
  color: var(--acid);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero-visual {
    max-width: 420px;
    margin: 0 auto;
  }

  .hero-copy {
    text-align: left;
  }

  .section-title-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .status-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .file-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .file-stats > div:nth-child(2) {
    border-right: none;
  }

  .file-stats > div:nth-child(1),
  .file-stats > div:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .nav-inner {
    grid-template-columns: 1fr auto;
  }

  .nav-center {
    display: none;
  }

  .badge-chain {
    display: none;
  }

  .hero {
    padding-top: 1.5rem;
  }

  .hero-ticker {
    font-size: clamp(3.2rem, 18vw, 4.5rem);
  }

  .lore-grid {
    grid-template-columns: 1fr;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .step {
    grid-template-columns: 48px 1fr;
  }

  .section {
    padding: 3.25rem 1rem;
  }

  .btn {
    width: 100%;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .ca-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-copy {
    width: 100%;
  }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .marquee-track,
  .pulse-dot,
  .hero-glitch-overlay,
  .ca-value.is-soon {
    animation: none;
  }
}
