/* ============================================================
   AISAS.IO — "The Telemetry"
   A live operating console. noise -> reasoning -> order.
   ============================================================ */

:root {
  /* Single accent token. Everything accent-colored derives from it,
     including the canvas particles (read in JS via getComputedStyle).
     Alternates: molten amber #FF7A45, electric indigo #6E7BFF. */
  --accent: #8FF0A4;

  --bg: #08090B;
  --surface: #0A0C0F;
  --panel: rgba(14, 16, 20, 0.7);
  --ink: #EDEDEF;
  --ink-58: rgba(237, 237, 239, 0.58);
  --ink-55: rgba(237, 237, 239, 0.55);
  --ink-45: rgba(237, 237, 239, 0.45);
  --ink-40: rgba(237, 237, 239, 0.40);
  --ink-38: rgba(237, 237, 239, 0.38);
  --ink-35: rgba(237, 237, 239, 0.35);
  --ink-30: rgba(237, 237, 239, 0.30);
  --hairline: rgba(237, 237, 239, 0.10);
  --hairline-14: rgba(237, 237, 239, 0.14);

  --maxw: 1400px;
  --pad-x: 36px;
  --section-y: 150px;

  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --display: 'Space Grotesk', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13.5px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, p { margin: 0; }

@keyframes settle {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes blink {
  0%, 55%   { opacity: 1; }
  56%, 100% { opacity: 0; }
}

/* ---- Reveal-on-scroll base state ---- */
[data-reveal] { opacity: 0; }
.is-revealed { animation: settle 0.6s ease-out both; }

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad-x);
  background: transparent;
  border-bottom: 1px solid var(--hairline);
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
}
.nav.is-scrolled {
  background: rgba(8, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.nav__brand { display: flex; align-items: baseline; gap: 14px; }
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}
.nav__tag {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-35);
}
.nav__right { display: flex; align-items: center; gap: 22px; }
.status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-45);
}
.status__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---- CTA buttons ---- */
.btn {
  font-family: var(--mono);
  white-space: nowrap;
  border-radius: 2px;
  cursor: pointer;
}
.btn--outline {
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 9px 16px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: transparent;
  transition: background 0.25s ease, color 0.25s ease;
}
.btn--outline:hover { background: var(--accent); color: var(--bg); }
.btn--fill {
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 14px 26px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  transition: opacity 0.25s ease;
}
.btn--fill:hover { opacity: 0.85; color: var(--bg); }
.btn--fill-lg { padding: 16px 30px; font-size: 12.5px; }

/* ============================================================
   Section chrome
   ============================================================ */
.section { border-top: 1px solid var(--hairline); }
.section--alt { background: var(--surface); }
.section__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--section-y) var(--pad-x);
}
.section__inner--wide { padding-top: 170px; padding-bottom: 170px; }
.section__inner--center { text-align: center; }

.eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  margin-bottom: 24px;
}
.eyebrow--accent { color: var(--accent); }
.eyebrow--muted { color: var(--ink-40); }

.h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 4.2vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}
.h2--wide { max-width: 900px; margin-bottom: 28px; }
.dim { color: var(--ink-38); }

.lede {
  max-width: 560px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-58);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  min-height: 100vh;
  padding: 130px var(--pad-x) 60px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1fr);
  gap: 56px;
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
}
.hero__kicker {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--ink-45);
  margin-bottom: 30px;
  animation: settle 0.6s ease-out both;
}
.hero__kicker .accent { color: var(--accent); }
.hero__title {
  font-family: var(--display);
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin-bottom: 30px;
  animation: settle 0.7s ease-out 0.1s both;
}
.hero__body {
  max-width: 520px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-58);
  margin-bottom: 38px;
  animation: settle 0.7s ease-out 0.2s both;
}
.hero__actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  animation: settle 0.7s ease-out 0.3s both;
}
.hero__hint {
  font-size: 11px;
  color: var(--ink-40);
  white-space: nowrap;
}
.hero__cursor {
  color: var(--accent);
  animation: blink 1.1s step-end infinite;
}

/* ---- Console panel ---- */
.console {
  border: 1px solid var(--hairline-14);
  border-radius: 4px;
  background: var(--panel);
  overflow: hidden;
  animation: settle 0.8s ease-out 0.25s both;
}
.console__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--hairline);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-40);
}
.console__running { color: var(--accent); }
.console__log {
  height: 320px;
  padding: 14px 16px;
  font-size: 11px;
  line-height: 2;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.log-num { color: var(--ink-30); }
.log-msg { color: rgba(237, 237, 239, 0.7); }
.log-tag--read { color: var(--ink-45); }
.log-tag--scan { color: rgba(237, 237, 239, 0.6); }
.log-tag--exec,
.log-tag--hand { color: var(--accent); }

.console__stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border-top: 1px solid var(--hairline);
  font-size: 10px;
  letter-spacing: 0.1em;
}
.stat {
  padding: 12px 16px;
  border-right: 1px solid var(--hairline);
}
.stat:last-child { border-right: none; }
.stat__label { color: var(--ink-35); margin-bottom: 4px; }
.stat__value { font-size: 13px; color: var(--ink); }
.stat__value--accent { color: var(--accent); }

/* ============================================================
   The Model — pipeline + phase grid
   ============================================================ */
.model__title { margin-bottom: 64px; }

.pipe {
  position: relative;
  height: 220px;
  border: 1px solid var(--hairline);
  background: rgba(14, 16, 20, 0.5);
  margin-bottom: 1px;
  overflow: hidden;
}
.pipe__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.pipe__labels {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--ink-35);
  pointer-events: none;
}
.pipe__labels .accent { color: var(--accent); }

.phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}
.phase {
  background: var(--bg);
  padding: 30px 26px;
}
.phase__head {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  margin-bottom: 22px;
}
.phase__id { color: var(--ink-45); }
.phase__status { color: var(--accent); }
.phase__name {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.phase__body {
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-55);
  margin-bottom: 22px;
}
.phase__bar {
  height: 3px;
  background: var(--hairline);
  position: relative;
  overflow: hidden;
}
.phase__bar-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: var(--accent);
  transition: width 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.phase:nth-child(2) .phase__bar-fill { transition-delay: 0.25s; }
.phase:nth-child(3) .phase__bar-fill { transition-delay: 0.5s; }

/* ============================================================
   The USP / Alignment
   ============================================================ */
.usp__title {
  margin: 0 auto 30px;
  max-width: 1000px;
  font-size: clamp(36px, 5.6vw, 82px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.usp__title .accent { color: var(--accent); }
.badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 28px;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--ink-45);
  border: 1px solid rgba(237, 237, 239, 0.12);
  padding: 12px 20px;
  border-radius: 3px;
}
.badges span { white-space: nowrap; }
.badges .ink { color: var(--ink); }
.badges .accent { color: var(--accent); }

/* ============================================================
   The Close
   ============================================================ */
.close {
  position: relative;
  overflow: hidden;
}
.close__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.close__inner { position: relative; z-index: 2; }
.close__title {
  margin: 0 auto 42px;
  max-width: 900px;
  font-size: clamp(32px, 4.8vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 30px var(--pad-x);
  border-top: 1px solid var(--hairline);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--ink-35);
}
.footer__mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: auto;
    padding-top: 120px;
  }
  .console { min-width: 0; }
}

@media (max-width: 720px) {
  :root { --pad-x: 22px; --section-y: 110px; }
  .console__log { height: 260px; }
  /* Keep the nav to one uncramped row: drop the secondary labels. */
  .nav { padding: 16px var(--pad-x); }
  .nav__tag { display: none; }
  .status { font-size: 0; gap: 0; }        /* hide the "SYSTEM LIVE" text, keep the live dot */
  .status__dot { width: 7px; height: 7px; }
  .nav__right { gap: 16px; }
  .btn--outline { padding: 8px 13px; }
}

@media (max-width: 400px) {
  .nav__tag { display: none; }
  .btn--outline { font-size: 10px; letter-spacing: 0.08em; }
}

/* ============================================================
   Reduced motion — render final state, no looping
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__kicker, .hero__title, .hero__body,
  .hero__actions, .console { animation: none; }
  .hero__cursor { animation: none; }
  [data-reveal] { opacity: 1; }
  .is-revealed { animation: none; }
}
