/* ══════════════════════════════════════════
   AIPOKOLIPS SYSTEMS — styles.css
   ══════════════════════════════════════════ */

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

:root {
  --black:  #080b0f;
  --black2: #0e1318;
  --black3: #141b22;
  --acid:   #00ff41;
  --acid2:  #00cc34;
  --white:  #d4e8d4;
  --muted:  rgba(212,232,212,0.68);
  --border: rgba(0,255,65,0.12);
  --border2:rgba(0,255,65,0.22);
  --font-pixel:   'Press Start 2P', monospace;
  --font-display: 'Oxanium', sans-serif;
  --font-mono:    'DM Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-mono);
  overflow-x: hidden;
}

/* scanlines */
body::after {
  content: '';
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px, transparent 2px,
    rgba(0,0,0,0.13) 2px, rgba(0,0,0,0.13) 3px
  );
  pointer-events: none;
  z-index: 9000;
}

/* grid overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(0,255,65,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,255,65,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── CURSOR ── */
@media (hover: hover) { body { cursor: none; } }
#cur {
  position: fixed;
  width: 10px; height: 18px;
  background: var(--acid);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-1px,-16px);
  animation: blink-cur 1.1s step-end infinite;
}
#cur.big { width: 18px; height: 18px; }
@media (hover: none) { #cur { display: none; } }
@keyframes blink-cur { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── NAV ── */
nav {
  position: fixed; top:0; left:0; right:0;
  z-index: 500;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 3rem;
  background: linear-gradient(to bottom, var(--black) 55%, transparent);
}
.nav-logo {
  font-family: var(--font-pixel);
  font-size: 0.75rem;
  color: var(--acid);
  text-decoration: none;
  text-shadow: 0 0 12px rgba(0,255,65,0.6);
  letter-spacing: 0.04em;
  line-height: 1;
}
.nav-logo span { color: var(--white); opacity: 0.4; }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a {
  font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); text-decoration: none; transition: color .15s;
}
.nav-links a::before { content: '~/'; color: var(--acid); opacity: 0.5; margin-right: 2px; }
.nav-links a:hover { color: var(--acid); }

/* hamburger */
.nav-burger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; cursor: none; padding: 4px;
}
.nav-burger span {
  display: block; width: 22px; height: 1.5px;
  background: var(--acid);
  transition: transform .2s, opacity .2s;
}
.nav-burger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* mobile drawer */
.mobile-menu {
  display: none;
  position: fixed; top:0; left:0; right:0; bottom:0;
  background: var(--black);
  z-index: 400;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 6rem 3rem 3rem;
  gap: 0;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 8vw, 3.5rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0em;
  color: var(--white);
  text-decoration: none;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  width: 100%;
  transition: color .15s;
}
.mobile-menu a::before { content: '>_ '; font-family: var(--font-pixel); font-size: 0.55rem; color: var(--acid); vertical-align: middle; margin-right: 0.5rem; }
.mobile-menu a:hover { color: var(--acid); }
.mobile-menu-foot {
  margin-top: auto;
  font-size: 0.62rem; letter-spacing: 0.1em; color: var(--muted);
}

/* ── PARTICLE CANVAS ── */
#particle-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: grid; grid-template-rows: 1fr auto;
  padding: 0 3rem 3rem;
  position: relative; overflow: hidden;
}
.hero-glow {
  position: absolute;
  width: 700px; height: 700px;
  left: -100px; top: 30%;
  background: radial-gradient(circle, rgba(0,255,65,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.boot-seq {
  position: absolute; top: 5.5rem; left: 3rem;
  font-family: var(--font-pixel); font-size: 0.48rem;
  color: var(--acid); opacity: 0; line-height: 2.2;
  pointer-events: none; overflow: hidden; max-height: 0;
  animation: boot-reveal 0.1s ease 0.3s forwards, boot-fade 0.5s ease 2.2s forwards;
}
@keyframes boot-reveal { to { max-height: 200px; opacity: 0.45; } }
@keyframes boot-fade   { to { opacity: 0; } }
.boot-line { display: block; overflow: hidden; white-space: nowrap; width: 0; }
.boot-line:nth-child(1) { animation: type-line 0.4s steps(40,end) 0.4s forwards; }
.boot-line:nth-child(2) { animation: type-line 0.4s steps(40,end) 0.9s forwards; }
.boot-line:nth-child(3) { animation: type-line 0.5s steps(40,end) 1.3s forwards; }
.boot-line:nth-child(4) { animation: type-line 0.3s steps(40,end) 1.9s forwards; }
@keyframes type-line { to { width: 100%; } }

.hero-content {
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding-top: 8rem; padding-bottom: 1.5rem;
  position: relative;
}
.hero-eyebrow {
  font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--acid); margin-bottom: 2rem;
  opacity: 0; animation: fadein 0.6s ease 2.3s forwards;
}
.hero-eyebrow::before { content: '>_ '; opacity: 0.6; }
.hero-wordmark {
  font-family: var(--font-pixel);
  font-size: clamp(1.2rem, 4vw, 4rem);
  color: var(--acid);
  text-shadow: 0 0 20px rgba(0,255,65,0.7), 0 0 60px rgba(0,255,65,0.25);
  letter-spacing: 0.06em; line-height: 1.4; margin-bottom: 0.5rem;
  opacity: 0; animation: fadein 0.4s ease 2.1s forwards;
}
.hero-sub {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 5rem);
  font-weight: 800; line-height: 0.96;
  letter-spacing: -0.01em; text-transform: uppercase; color: var(--white);
  opacity: 0; animation: fadein 0.6s ease 2.4s forwards;
}
.hero-sub em {
  font-family: var(--font-display); font-style: normal;
  font-weight: 800; color: var(--acid); font-size: 1em;
}
.hero-prompt {
  display: inline-block; width: 3px; height: 0.85em;
  background: var(--acid); margin-left: 6px; vertical-align: middle;
  opacity: 0;
  animation: blink-cur 1s step-end 3s infinite, fadein 0s ease 3s forwards;
}
.hero-foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  border-top: 1px solid var(--border); padding-top: 1.5rem; position: relative;
  opacity: 0; animation: fadein 0.6s ease 2.8s forwards;
}
.hero-desc { max-width: 42ch; font-size: 1rem; line-height: 1.85; color: var(--muted); }
.hero-cta {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 0.9rem 2rem; border: 1px solid var(--acid); color: var(--acid);
  font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; position: relative; overflow: hidden; transition: color .2s;
}
.hero-cta::before {
  content: ''; position: absolute; inset: 0;
  background: var(--acid); transform: translateX(-101%); transition: transform .25s ease;
}
.hero-cta:hover { color: var(--black); }
.hero-cta:hover::before { transform: translateX(0); }
.hero-cta span, .hero-cta svg { position: relative; z-index: 1; }
@keyframes fadein { from{opacity:0} to{opacity:1} }

/* ── SECTION BASE ── */
section { padding: 5.5rem 3rem; border-top: 1px solid var(--border); position: relative; z-index: 1; }
.sec-label {
  font-family: var(--font-pixel); font-size: 0.45rem;
  letter-spacing: 0.12em; color: var(--acid); opacity: 0.7; margin-bottom: 3rem;
}

/* ── WHAT WE DO ── */
.what-grid { display: grid; grid-template-columns: 1fr 1fr; }
.what-hl {
  font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 3.5rem);
  font-weight: 800; line-height: 0.96; letter-spacing: -0.01em; text-transform: uppercase;
  padding-right: 4rem; padding-bottom: 3rem; border-right: 1px solid var(--border);
}
.what-hl em { font-family: var(--font-display); font-style: normal; font-weight: 800; color: var(--acid); font-size: 1em; }
.what-body { padding-left: 4rem; display: flex; flex-direction: column; justify-content: flex-end; }
.what-body p { font-size: 1rem; line-height: 1.9; color: var(--muted); margin-bottom: 1.25rem; max-width: 100%; }
.what-body p strong { color: var(--white); font-weight: 500; }

/* ── CAPABILITIES ── */
.caps-grid { display: grid; grid-template-columns: repeat(3,1fr); }
.cap {
  padding: 2.6rem 2.2rem; border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative; overflow: hidden; transition: background .2s;
}
.cap:nth-child(3n) { border-right: none; }
.cap:nth-last-child(-n+3) { border-bottom: none; }
.cap::after {
  content: ''; position: absolute; inset: 0;
  border: 1px solid var(--acid); opacity: 0; transition: opacity .3s;
}
.cap:hover::after { opacity: 0.4; }
.cap:hover { background: rgba(0,255,65,0.03); }
.cap-n { font-family: var(--font-pixel); font-size: 0.42rem; color: var(--acid); margin-bottom: 1.4rem; display: block; letter-spacing: 0.1em; }
.cap-t { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 0.9rem; line-height: 1.1; color: var(--white); }
.cap-d { font-size: 0.95rem; line-height: 1.8; color: var(--muted); }
.cap-arr { position: absolute; bottom: 1.8rem; right: 2rem; font-size: 0.9rem; color: var(--border); transition: color .2s, transform .2s; font-family: var(--font-pixel); }
.cap:hover .cap-arr { color: var(--acid); transform: translate(3px,-3px); }

/* ── PIPELINE DEMO ── */
.pipeline-demo {
  margin: 0 3rem;
  border: 1px solid var(--border2);
  background: var(--black2);
  position: relative; z-index: 1;
  overflow: hidden;
}
.pipeline-bar {
  background: var(--black3);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.pipeline-title {
  font-family: var(--font-pixel);
  font-size: 0.42rem; letter-spacing: 0.12em; color: var(--muted); margin-left: 0.5rem;
}
.pipeline-body {
  display: grid;
  grid-template-columns: 1fr auto 2fr;
  gap: 0;
  min-height: 220px;
}
.pipeline-input,
.pipeline-output {
  padding: 1.5rem 2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.9;
  color: var(--muted);
  position: relative;
}
.pipeline-input {
  border-right: 1px solid var(--border);
}
.pipeline-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.5rem;
  position: relative;
}
.pipeline-arrow-line {
  width: 60px;
  height: 1px;
  background: var(--acid);
  position: relative;
  opacity: 0.4;
}
.pipeline-arrow-line::after {
  content: '';
  position: absolute;
  right: -1px; top: -4px;
  border: 4px solid transparent;
  border-left: 6px solid var(--acid);
}
.pipeline-arrow-label {
  position: absolute;
  bottom: calc(50% + 14px);
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-pixel);
  font-size: 0.35rem;
  color: var(--acid);
  opacity: 0.5;
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.pipeline-input-label,
.pipeline-output-label {
  font-family: var(--font-pixel);
  font-size: 0.38rem;
  color: var(--acid);
  opacity: 0.6;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  display: block;
}
.pipeline-typed {
  color: var(--white);
  overflow: hidden;
  white-space: pre-wrap;
  min-height: 5em;
}
.pipeline-typed .cursor-blink {
  display: inline-block;
  width: 2px;
  height: 0.85em;
  background: var(--acid);
  vertical-align: middle;
  margin-left: 2px;
  animation: blink-cur 0.8s step-end infinite;
}
.pipeline-output-item {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  margin-bottom: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-left: 2px solid var(--border);
  font-size: 0.72rem;
}
.pipeline-output-item.visible {
  opacity: 1;
  transform: none;
}
.pipeline-output-item .format-tag {
  font-family: var(--font-pixel);
  font-size: 0.35rem;
  color: var(--acid);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.25rem;
}
.pipeline-output-item .format-text {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.6;
}
.pipeline-output-item.visible {
  border-left-color: var(--acid);
}

/* ── TERMINAL STATS ── */
.terminal {
  background: var(--black2); border: 1px solid var(--border2);
  margin: 0 3rem; position: relative; z-index: 1; font-family: var(--font-pixel);
}
.terminal-bar {
  background: var(--black3); border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.25rem; display: flex; align-items: center; gap: 0.6rem;
}
.t-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border2); display: inline-block; }
.t-dot.g { background: var(--acid2); }
.terminal-title { font-size: 0.42rem; letter-spacing: 0.12em; color: var(--muted); margin-left: 0.5rem; }
.terminal-body { padding: 2rem 2.5rem 1.5rem; display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
.t-stat { display: flex; flex-direction: column; gap: 0.5rem; }
.t-key { font-size: 0.42rem; color: var(--acid); opacity: 0.6; letter-spacing: 0.1em; }
.t-val { font-size: clamp(1.4rem, 3vw, 2.4rem); color: var(--acid); text-shadow: 0 0 14px rgba(0,255,65,0.4); }
.t-unit { font-size: 0.38rem; color: var(--muted); letter-spacing: 0.1em; margin-top: 0.25rem; }
.terminal-foot {
  padding: 0.75rem 2.5rem 1.25rem;
  font-size: 0.36rem; color: var(--muted); letter-spacing: 0.08em;
  border-top: 1px solid var(--border);
}

/* ── APPROACH ── */
.approach-wrap { display: grid; grid-template-columns: 1fr 2fr; gap: 5rem; align-items: start; }
.approach-aside { position: sticky; top: 6.5rem; }
.big-num {
  font-family: var(--font-pixel); font-size: 5rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(0,255,65,0.2);
}
.aside-note { font-size: 0.72rem; line-height: 1.75; color: var(--muted); margin-top: 1.25rem; max-width: 22ch; }
.steps { display: flex; flex-direction: column; }
.step { padding: 2rem 0; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 3.5rem 1fr; gap: 1.5rem; }
.step:first-child { border-top: 1px solid var(--border); }
.step-n { font-family: var(--font-pixel); font-size: 0.42rem; color: var(--acid); padding-top: 0.3rem; letter-spacing: 0.1em; }
.step-t { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.01em; margin-bottom: 0.65rem; }
.step-d { font-size: 0.95rem; line-height: 1.82; color: var(--muted); }

/* ── CTA BAND ── */
.cta-band {
  background: var(--black2); padding: 6rem 3rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 3rem; border-top: 1px solid var(--border);
  position: relative; overflow: hidden; z-index: 1;
}
.cta-band::before { display: none; }
.cta-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 5.5rem);
  line-height: 0.96; letter-spacing: -0.01em; text-transform: uppercase; max-width: 14ch;
}
.cta-title em { font-family: var(--font-display); font-style: normal; font-weight: 800; color: var(--acid); }
.cta-actions { display: flex; flex-direction: column; gap: 1.2rem; align-items: flex-end; }
.btn-acid {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 1rem 2.2rem; background: var(--acid); color: var(--black);
  font-family: var(--font-pixel); font-size: 0.55rem; letter-spacing: 0.08em;
  text-decoration: none; transition: background .15s;
}
.btn-acid:hover { background: var(--acid2); color: var(--black); }
.btn-link { font-size: 0.65rem; letter-spacing: 0.08em; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: none; }

/* ── FOOTER ── */
footer {
  padding: 2.5rem 3rem; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1;
}
.foot-logo { font-family: var(--font-pixel); font-size: 0.55rem; letter-spacing: 0.06em; color: var(--acid); text-shadow: 0 0 10px rgba(0,255,65,0.5); }
.foot-links { display: flex; gap: 2rem; list-style: none; }
.foot-links a { font-size: 0.65rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--acid); }
.foot-copy { font-size: 0.62rem; letter-spacing: 0.08em; color: var(--muted); }

/* ── LEGAL MODAL ── */
.legal-overlay {
  display: none; position: fixed; inset: 0; z-index: 700;
  background: rgba(8,11,15,0.97); overflow-y: auto;
}
.legal-overlay.open { display: block; }
.legal-inner {
  max-width: 620px; margin: 0 auto; padding: 6rem 2rem;
}
.legal-close {
  position: fixed; top: 1.75rem; right: 2.5rem;
  font-family: var(--font-pixel); font-size: 0.55rem;
  color: var(--acid); background: none; border: none; cursor: none;
  letter-spacing: 0.1em; opacity: 0.7; transition: opacity .2s;
}
.legal-close:hover { opacity: 1; }
.legal-tag {
  font-family: var(--font-pixel); font-size: 0.38rem;
  letter-spacing: 0.12em; color: var(--acid); opacity: 0.7;
  margin-bottom: 1.5rem; display: block;
}
.legal-title {
  font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800; text-transform: uppercase; letter-spacing: 0em;
  line-height: 1; margin-bottom: 2.5rem; padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.legal-body { font-size: 0.8rem; line-height: 1.9; color: var(--muted); }
.legal-body p { margin-bottom: 1.25rem; }
.legal-body h3 {
  font-family: var(--font-display); font-size: 1rem; font-weight: 700;
  text-transform: uppercase; color: var(--white);
  margin: 2rem 0 0.6rem;
}
.legal-body a { color: var(--acid); text-underline-offset: 3px; }
.legal-placeholder {
  font-family: var(--font-pixel); font-size: 0.38rem;
  color: var(--acid); opacity: 0.45; letter-spacing: 0.1em;
  border: 1px solid var(--border); padding: 1rem 1.25rem;
  margin-bottom: 2rem; line-height: 2.2;
}

/* ── REVEAL ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s ease; }
.reveal.on { opacity: 1; transform: none; }
.d1{transition-delay:.1s} .d2{transition-delay:.2s} .d3{transition-delay:.3s} .d4{transition-delay:.4s}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  nav { padding: 1.2rem 1.5rem; }
  .nav-links { display: none; }
  .nav-burger { display: flex; }
  .hero, section, footer, .cta-band { padding-left: 1.5rem; padding-right: 1.5rem; }
  .terminal, .pipeline-demo { margin: 0 1.5rem; }
  .what-grid, .approach-wrap { grid-template-columns: 1fr; }
  .what-hl { padding-right: 0; border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 2rem; }
  .what-body { padding-left: 0; padding-top: 2rem; }
  .caps-grid { grid-template-columns: 1fr; }
  .cap { border-right: none; }
  .cap:nth-last-child(1) { border-bottom: none; }
  .terminal-body { grid-template-columns: repeat(2,1fr); gap: 1.25rem; }
  .terminal-title { display: none; }
  .t-key { font-size: 0.38rem; word-break: break-all; }
  .t-val { font-size: clamp(1.4rem, 8vw, 2.2rem); }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .cta-actions { align-items: flex-start; }
  footer { flex-direction: column; gap: 1.5rem; align-items: flex-start; }
  .approach-aside { position: static; }
  .hero-wordmark { font-size: clamp(0.85rem, 5vw, 2.2rem); }
  .boot-seq { left: 1.5rem; }
  .overlay-inner { padding: 5rem 1.5rem; }
  .overlay-close { right: 1.5rem; }
  .news-header { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .hero-cta { width: 100%; justify-content: center; }
  .hero-desc { max-width: 100%; }
  .pipeline-body { grid-template-columns: 1fr; }
  .pipeline-input { border-right: none; border-bottom: 1px solid var(--border); }
  .pipeline-arrow { padding: 1rem 0; }
  .pipeline-arrow-line { width: 1px; height: 40px; }
  .pipeline-arrow-line::after { right: auto; top: auto; bottom: -1px; left: -4px; border: 4px solid transparent; border-top: 6px solid var(--acid); border-left: 4px solid transparent; }
  .pipeline-arrow-label { bottom: auto; top: 50%; left: calc(50% + 16px); transform: translateY(-50%); }
}
