/* AOS marketing site — dark, terminal-adjacent, no framework. */
:root {
  --bg: #0b1220;
  --bg-2: #0f1729;
  --panel: #121c31;
  --line: #1e2a44;
  --ink: #e6edf7;
  --ink-2: #a7b4c9;
  --ink-3: #64748b;
  --acc: #4ade80;      /* the ledger green */
  --acc-2: #22d3ee;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --sans: -apple-system, "Segoe UI", Inter, Roboto, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.6; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 1rem; }
h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
p { color: var(--ink-2); }
em { font-style: normal; color: var(--acc); }
code { font-family: var(--mono); font-size: 0.9em; color: var(--acc-2); }
section { padding: 5rem 0; }
.kicker { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--acc); margin-bottom: 0.9rem; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(11,18,32,0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; gap: 1.5rem; height: 3.6rem; }
.wordmark { font-family: var(--mono); font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.tld { color: var(--acc); }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 0.88rem; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 0.75rem; }
.nav-burger { display: none; background: none; border: 1px solid var(--line); color: var(--ink); font-size: 1.2rem; border-radius: 8px; width: 2.2rem; height: 2.2rem; cursor: pointer; }
.badge { font-family: var(--mono); font-size: 0.68rem; color: var(--acc); border: 1px solid rgba(74,222,128,0.35); border-radius: 999px; padding: 0.15rem 0.6rem; white-space: nowrap; }

/* buttons */
.btn { display: inline-block; text-decoration: none; font-weight: 600; font-size: 0.92rem; border-radius: 10px; padding: 0.65rem 1.2rem; border: 1px solid var(--line); color: var(--ink); background: transparent; font-family: inherit; line-height: inherit; cursor: pointer; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; }
.btn-lg { padding: 0.85rem 1.7rem; font-size: 1rem; }
.btn-primary { background: var(--acc); border-color: var(--acc); color: #052012; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost:hover { border-color: var(--ink-3); }

/* hero */
.hero { padding: 6rem 0 5rem; background: radial-gradient(ellipse 80% 60% at 70% -10%, rgba(34,211,238,0.10), transparent), radial-gradient(ellipse 60% 50% at 10% 110%, rgba(74,222,128,0.07), transparent); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: center; }
.hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); margin-bottom: 1.1rem; }
.lede { font-size: 1.05rem; margin-bottom: 1.6rem; }
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.hero-fine { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); }

/* terminal */
.term { background: #0a0f1c; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,0.45); }
.term-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--line); }
.term-bar i { width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--line); }
.term-bar span { margin-left: 0.5rem; font-family: var(--mono); font-size: 0.68rem; color: var(--ink-3); }
.term-body { font-family: var(--mono); font-size: 0.76rem; line-height: 1.75; padding: 1rem 1.1rem; color: var(--ink-2); overflow-x: auto; }
.t-dim { color: var(--ink-3); }
.t-str { color: var(--acc-2); }
.t-ok { color: var(--acc); }

/* proof */
.proof { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.proof-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 2.2rem 0; text-align: left; }
.proof-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.6rem; }
.proof-q { font-family: var(--mono); font-size: 0.7rem; color: var(--acc); border: 1px solid rgba(74,222,128,0.35); border-radius: 6px; padding: 0.1rem 0.45rem; }
.proof-card h3 { margin: 0.8rem 0 0.5rem; font-size: 1.15rem; }
.thesis { font-size: 1.15rem; color: var(--ink-2); line-height: 1.7; }
.thesis strong { color: var(--ink); }

/* features */
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem; }
.feat { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.3rem; }
.feat-ico { font-family: var(--mono); font-size: 1.1rem; color: var(--acc); width: 2.1rem; height: 2.1rem; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(74,222,128,0.3); border-radius: 9px; margin-bottom: 0.8rem; }
.feat p { font-size: 0.84rem; }

/* lifecycle */
.lifecycle { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pipe { font-family: var(--mono); font-size: 0.8rem; display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; align-items: center; background: #0a0f1c; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; margin: 1.6rem 0 2.2rem; }
.pipe span { color: var(--ink-2); }
.pipe i { color: var(--ink-3); font-style: normal; }
.pipe-hot { color: var(--acc) !important; }

/* The animated governed run: one shared 20s clock; each stage owns a 2s window (--i).
   The readout narrates the same window. Falls back to static when motion is reduced. */
.pipe-anim span { animation: stage-live 20s infinite; animation-delay: calc(var(--i) * 2s); }
@keyframes stage-live {
  0%, 1% { color: var(--ink-2); text-shadow: none; }
  3%, 9% { color: var(--acc); text-shadow: 0 0 14px rgba(74,222,128,0.55); }
  12%, 100% { color: var(--ink-2); text-shadow: none; }
}
.pipe-readout { position: relative; height: 1.6rem; margin: -1.2rem 0 2.2rem; font-family: var(--mono); font-size: 0.74rem; color: var(--acc); overflow: hidden; }
.pipe-readout span { position: absolute; inset: 0; opacity: 0; animation: readout-line 20s infinite; animation-delay: calc(var(--i) * 2s); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
@keyframes readout-line {
  0%, 1% { opacity: 0; transform: translateY(6px); }
  3%, 9% { opacity: 1; transform: none; }
  11%, 100% { opacity: 0; transform: translateY(-6px); }
}
@media (prefers-reduced-motion: reduce) {
  .pipe-anim span { animation: none; }
  .pipe-readout { display: none; }
}
.life-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.life-cols p { font-size: 0.92rem; }

/* flow — the animated call diagram. Two stories on one 18s clock. */
.flow { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.flow-lede { max-width: 44rem; }
.flow-wrap { margin-top: 2rem; background: #0a0f1c; border: 1px solid var(--line); border-radius: 12px; padding: 1.2rem 1.2rem 0.9rem; overflow-x: auto; }
.flow-wrap svg { width: 100%; min-width: 640px; height: auto; display: block; }
.fbox rect { fill: var(--panel); stroke: var(--line); }
.faos > rect { stroke: rgba(74,222,128,0.5); }
.fbox-int rect { stroke: rgba(74,222,128,0.55); }
.fbox-esc rect { stroke: rgba(34,211,238,0.55); }
.ft { fill: var(--ink); font: 600 15px var(--sans); }
.fs { fill: var(--ink-2); font: 400 12.5px var(--mono); }
.fc { fill: var(--ink); font: 600 12.5px var(--mono); }
.fcs { fill: var(--ink-3); font: 400 11px var(--mono); }
.fmid { text-anchor: middle; }
.fbadge { fill: var(--acc); font: 600 12px var(--mono); }
.fbox-esc .fbadge { fill: var(--acc-2); }
.fchip { fill: rgba(255,255,255,0.02); stroke: var(--line); }
.fedge { stroke: var(--line); stroke-width: 1.4; fill: none; }
.fhot { stroke-dasharray: 7 6; animation: fdash 0.8s linear infinite; }
.flow-int .fhot { stroke: var(--acc); stroke-width: 2; }
.flow-esc .fhot { stroke: var(--acc-2); stroke-width: 2; }
/* the alternating phases */
.flow-int { animation: phase-a 18s ease-in-out infinite; }
.flow-esc { animation: phase-b 18s ease-in-out infinite; }
.fchip-route { animation: chip-a 18s ease-in-out infinite; }
.fchip-floors { animation: chip-b 18s ease-in-out infinite; }
@keyframes fdash { to { stroke-dashoffset: -13; } }
@keyframes phase-a { 0%, 44% { opacity: 1; } 50%, 94% { opacity: 0.22; } 100% { opacity: 1; } }
@keyframes phase-b { 0%, 44% { opacity: 0.22; } 50%, 94% { opacity: 1; } 100% { opacity: 0.22; } }
@keyframes chip-a { 0%, 44% { stroke: rgba(74,222,128,0.75); } 50%, 94% { stroke: var(--line); } 100% { stroke: rgba(74,222,128,0.75); } }
@keyframes chip-b { 0%, 44% { stroke: var(--line); } 50%, 94% { stroke: rgba(34,211,238,0.85); } 100% { stroke: var(--line); } }
.flow-caption { position: relative; height: 2.6rem; margin-top: 0.6rem; font-family: var(--mono); font-size: 0.72rem; overflow: hidden; }
.flow-caption span { position: absolute; inset: 0; opacity: 0; line-height: 1.35; }
.cap-int { color: var(--acc); animation: cap-a 18s ease-in-out infinite; }
.cap-esc { color: var(--acc-2); animation: cap-b 18s ease-in-out infinite; }
@keyframes cap-a { 0%, 44% { opacity: 1; } 48%, 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes cap-b { 0%, 44% { opacity: 0; } 50%, 94% { opacity: 1; } 98%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .fhot { animation: none; }
  .flow-int, .flow-esc, .fchip-route, .fchip-floors { animation: none; opacity: 1; }
  .flow-caption { height: auto; }
  .flow-caption span { position: static; display: block; opacity: 1; margin-bottom: 0.3rem; }
}

/* the console screenshots */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 2rem; }
.shot { margin: 0; }
.shot img { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 18px 50px rgba(0,0,0,0.45); }
.shot figcaption { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-3); margin-top: 0.6rem; line-height: 1.5; }
@media (max-width: 880px) { .shots { grid-template-columns: 1fr; } }

/* integrity */
.int-lede { max-width: 46rem; }
.int-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; margin-top: 2rem; }
.int { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--acc); border-radius: 10px; padding: 1rem 1.1rem; }
.int b { display: block; font-size: 0.86rem; margin-bottom: 0.3rem; }
.int span { font-size: 0.78rem; color: var(--ink-2); }
@media (max-width: 880px) { .int-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .int-grid { grid-template-columns: 1fr; } }

/* doors */
.door-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.door { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem; }
.door p { font-size: 0.88rem; }
.doors-note { margin-top: 1.6rem; font-size: 0.88rem; border-left: 3px solid var(--acc); padding-left: 1rem; }

/* companions */
.comp-lede { max-width: 42rem; }
.comp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.comp { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; }
.comp-tag { font-family: var(--mono); font-size: 0.62rem; font-weight: 400; color: var(--acc-2); border: 1px solid rgba(34,211,238,0.35); border-radius: 999px; padding: 0.12rem 0.55rem; margin-left: 0.5rem; vertical-align: middle; white-space: nowrap; }
.comp p { font-size: 0.9rem; }
.comp-compat { font-family: var(--mono); font-size: 0.7rem !important; color: var(--acc); border-top: 1px solid var(--line); padding-top: 0.7rem; margin-top: 0.8rem; }
.comp-note { margin-top: 1.6rem; font-size: 0.88rem; border-left: 3px solid var(--acc-2); padding-left: 1rem; }

/* use cases */
.use-cases { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.uc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.uc { border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem; }
.uc p { font-size: 0.88rem; }

/* editions */
.ed-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.ed { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.5rem; }
.ed-hot { border-color: rgba(74,222,128,0.45); box-shadow: 0 0 40px rgba(74,222,128,0.07); }
.ed-price { font-family: var(--mono); color: var(--acc); margin: 0.2rem 0 1rem; }
.ed ul { list-style: none; }
.ed li { font-size: 0.86rem; color: var(--ink-2); padding: 0.28rem 0 0.28rem 1.2rem; position: relative; }
.ed li::before { content: "✓"; position: absolute; left: 0; color: var(--acc); font-size: 0.8rem; }
.ed-note { margin-top: 1.6rem; font-size: 0.88rem; text-align: center; }

/* cta */
.cta { background: radial-gradient(ellipse 70% 90% at 50% 120%, rgba(74,222,128,0.12), transparent); text-align: center; padding: 6rem 0; }
.cta p { max-width: 34rem; margin: 0 auto 1.6rem; }
.cta-fine { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); margin-top: 1.2rem; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 2.2rem 0; }
.foot-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.foot-tag { font-family: var(--mono); font-size: 0.66rem; color: var(--ink-3); margin-top: 0.5rem; }
.foot-meta { display: flex; align-items: center; gap: 1rem; font-size: 0.78rem; color: var(--ink-3); }

.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--acc); cursor: pointer; }
.linklike:hover { text-decoration: underline; }

/* video lightbox */
.vmodal { position: fixed; inset: 0; z-index: 100; background: rgba(4,8,16,0.88); display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.vmodal-box { position: relative; width: min(60rem, 100%); }
.vmodal-vert { width: min(24rem, 100%); }
.vmodal-vert .vmodal-frame { aspect-ratio: 9 / 16; max-height: 86vh; margin: 0 auto; }
.vmodal-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.vmodal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vmodal-close { position: absolute; top: -2.6rem; right: 0; background: none; border: 1px solid var(--line); color: var(--ink); font-size: 1.3rem; line-height: 1; width: 2.1rem; height: 2.1rem; border-radius: 8px; cursor: pointer; }
.vmodal-close:hover { border-color: var(--acc); color: var(--acc); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* responsive */
@media (max-width: 880px) {
  .hero-grid, .proof-grid, .life-cols, .door-grid, .uc-grid { grid-template-columns: 1fr; }
  .feat-grid { grid-template-columns: 1fr 1fr; }
  .ed-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; position: absolute; top: 3.6rem; left: 0; right: 0; background: var(--bg-2); border-bottom: 1px solid var(--line); flex-direction: column; padding: 1rem 1.25rem; gap: 0.9rem; }
  .nav-links.open { display: flex; }
  .nav-burger { display: block; margin-left: auto; }
  .nav-cta { margin-left: 0; }
  .nav-inner { gap: 0.75rem; }
}
@media (max-width: 520px) {
  .feat-grid { grid-template-columns: 1fr; }
  section { padding: 3.5rem 0; }
}
