/* ─────────────────────────────────────────────
   toolcli — landing styles
   sf startup · clean · dark · neon green accent
   ───────────────────────────────────────────── */

:root {
  --bg:        #000000;
  --bg-1:      #080808;
  --bg-2:      #0e0e0e;
  --bg-3:      #141414;
  --line:      #1c1c1c;
  --line-2:    #2a2a2a;
  --line-3:    #3a3a3a;
  --fg:        #f5f5f5;
  --fg-warm:   #e8e6e0;
  --fg-mute:   #a3a3a3;
  --fg-dim:    #6e6e6e;
  --ok:        #84ff66;
  --ok-2:      #b6ff9a;
  --ok-soft:   #84ff6622;
  --ok-faint:  #84ff6610;
  --maxw:      1180px;
  --pad:       clamp(20px, 4vw, 56px);
  --r:         16px;
  --r-sm:      10px;
  --t-fast:    180ms cubic-bezier(.2,.7,.2,1);
  --t:         320ms cubic-bezier(.2,.7,.2,1);
  --t-slow:    700ms cubic-bezier(.16,.85,.3,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: 'ss01' on, 'cv11' on;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { min-height: 100dvh; overflow-x: hidden; }

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

a { color: inherit; text-decoration: none; }
button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
ol, ul { list-style: none; padding: 0; margin: 0; }

code, pre {
  font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-feature-settings: 'ss02' on;
}

/* ─── ambient parallax layers ─── */
.layer {
  position: fixed;
  left: -8%;
  right: -8%;
  top: -30vh;
  height: 220vh;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center top;
  will-change: transform;
  /* progressive fade on BOTH ends — no hard cuts when parallax shifts */
  mask-image: linear-gradient(to bottom,
    transparent 0%,
    black 12%,
    black 60%,
    transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom,
    transparent 0%,
    black 12%,
    black 60%,
    transparent 100%);
}
.layer-grid {
  background-image: url('/img/grid_bg.png');
  background-position: center 25%;
  background-size: 140% auto;
  opacity: .42;
}
.layer-aurora {
  /* multiple soft gradients = no edge to cut */
  background:
    radial-gradient(ellipse 80% 60% at 50% 75%, rgba(132,255,102,.16), transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 80%, rgba(132,255,102,.28), transparent 70%),
    radial-gradient(ellipse 30% 25% at 50% 82%, rgba(132,255,102,.36), transparent 70%);
  opacity: .85;
  /* override the strict mask — aurora should fade naturally everywhere */
  mask-image: none;
  -webkit-mask-image: none;
}

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: .035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

/* ─── nav ─── */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad);
  background: linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,.5) 60%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: -.012em;
  font-size: 17px;
}
.brand-icon {
  filter: drop-shadow(0 0 10px rgba(132,255,102,.35));
  transition: filter var(--t);
}
.brand:hover .brand-icon {
  filter: drop-shadow(0 0 14px rgba(132,255,102,.6));
}

.nav-links {
  display: flex; align-items: center; gap: clamp(18px, 3vw, 32px);
  font-size: 14px; color: var(--fg-mute);
}
.nav-links a { transition: color var(--t-fast); }
.nav-links a:hover { color: var(--fg); }
.nav-links .cta {
  color: var(--bg);
  background: var(--ok);
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: -.005em;
  box-shadow: 0 0 0 1px rgba(132,255,102,.4), 0 0 28px rgba(132,255,102,.2);
  transition: all var(--t-fast);
}
.nav-links .cta:hover {
  background: var(--ok-2);
  box-shadow: 0 0 0 1px rgba(132,255,102,.6), 0 0 36px rgba(132,255,102,.4);
  transform: translateY(-1px);
}
.nav-links a:focus-visible,
.copy:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--ok);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ─── shell ─── */
main {
  position: relative; z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}
section { padding: clamp(64px, 10vw, 120px) 0; position: relative; }

.kicker {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ok);
  margin-bottom: 18px;
  display: inline-flex; align-items: center; gap: 12px;
}
.kicker::before {
  content: '';
  width: 18px; height: 1px; background: var(--ok); opacity: .6;
}

section header h2 {
  font-size: clamp(36px, 5.5vw, 72px);
  line-height: 1;
  letter-spacing: -.04em;
  font-weight: 300;
  margin: 0 0 22px;
  max-width: 16ch;
  color: var(--fg-warm);
}
section header h2 em {
  font-style: italic;
  font-weight: 600;
  background: linear-gradient(180deg, var(--ok-2) 0%, var(--ok) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ─── HERO ─── */
.hero {
  text-align: center;
  padding-top: clamp(48px, 9vw, 92px);
  padding-bottom: clamp(56px, 10vw, 120px);
}
.hero-inner {
  display: grid;
  justify-items: center;
  gap: 0;
}

.logo-wrap {
  position: relative;
  width: clamp(150px, 17vw, 210px);
  aspect-ratio: 1;
  margin-bottom: 36px;
  animation: floatLogo 6s ease-in-out infinite, fadeUp .9s var(--t-slow) both;
  isolation: isolate;
}
.logo-wrap img {
  width: 100%; height: 100%;
  object-fit: contain;
  position: relative; z-index: 2;
  filter: drop-shadow(0 0 30px rgba(132,255,102,.25));
}
.logo-glow {
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle, rgba(132,255,102,.32) 0%, rgba(132,255,102,0) 55%);
  filter: blur(28px);
  z-index: 1;
  animation: pulseGlow 3.4s ease-in-out infinite;
  pointer-events: none;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: 'Geist Mono', monospace;
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 28px;
  background: rgba(255,255,255,.02);
  backdrop-filter: blur(6px);
  animation: fadeUp .9s var(--t-slow) .1s both;
}
.eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 14px var(--ok);
  animation: pulse 2.4s ease-in-out infinite;
}

.headline {
  font-size: clamp(48px, 9vw, 124px);
  line-height: .94;
  letter-spacing: -.05em;
  font-weight: 200;
  margin: 0 0 28px;
  color: var(--fg-warm);
  max-width: 14ch;
}
.headline .line { display: block; opacity: 0; transform: translateY(18px); animation: fadeUp 1s var(--t-slow) both; }
.headline .line:nth-child(1) { animation-delay: .15s; }
.headline .line:nth-child(2) { animation-delay: .28s; }
.headline em {
  font-style: italic;
  font-weight: 600;
  background: linear-gradient(180deg, var(--ok-2) 0%, var(--ok) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sub {
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.6;
  color: var(--fg-mute);
  max-width: 56ch;
  margin: 0 0 36px;
  animation: fadeUp 1s var(--t-slow) .42s both;
}
.sub strong { color: var(--fg); font-weight: 500; }

.install-pill {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
  font-family: 'Geist Mono', monospace;
  font-size: 14.5px;
  margin-bottom: 16px;
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 30px 60px -20px rgba(0,0,0,.6),
    0 0 0 0 rgba(132,255,102,.0);
  transition: box-shadow var(--t);
  animation: fadeUp 1s var(--t-slow) .52s both;
}
.install-pill:hover {
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 30px 60px -20px rgba(0,0,0,.6),
    0 0 0 1px rgba(132,255,102,.3);
}
.install-pill .prompt { color: var(--fg-dim); }
.install-pill code { color: var(--fg); }
.copy {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--fg-mute);
  border: 1px solid var(--line-2);
  padding: 5px 10px;
  border-radius: 6px;
  transition: all var(--t-fast);
}
.copy:hover { color: var(--fg); border-color: var(--fg-mute); }
.copy.copied { color: var(--ok); border-color: var(--ok); }

.hero-meta {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--fg-dim);
  animation: fadeUp 1s var(--t-slow) .6s both;
}

/* ─── DIAGRAM ─── */
.diagram {
  position: relative;
}
.diagram header {
  text-align: center;
  margin-bottom: 50px;
}
.diagram header h2 { margin-left: auto; margin-right: auto; }
.diagram .lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-mute);
  max-width: 60ch;
  margin: 0 auto;
}
.diagram .lede em { color: var(--ok); font-style: normal; font-weight: 500; }

.diagram-frame {
  border: 1px solid var(--line-2);
  border-radius: 20px;
  padding: clamp(20px, 3vw, 40px);
  background:
    radial-gradient(ellipse 60% 80% at 50% 50%, rgba(132,255,102,.04), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg) 80%);
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 60px 120px -40px rgba(0,0,0,.8),
    0 0 0 1px rgba(132,255,102,.05);
}

.diagram-svg {
  width: 100%;
  height: auto;
  display: block;
  font-family: 'Geist', sans-serif;
}
.diagram-svg .col-label {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: .26em;
  text-transform: uppercase;
  fill: var(--fg-dim);
}
.diagram-svg .col-label.hub-label { fill: var(--ok); }
.diagram-svg .label {
  font-size: 14px;
  font-weight: 500;
  fill: var(--fg);
  text-anchor: middle;
  dominant-baseline: middle;
}
.diagram-svg .hint {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: .04em;
  fill: var(--fg-dim);
  text-anchor: middle;
}
.diagram-svg .hub-title {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -.022em;
  fill: var(--ok);
  text-anchor: middle;
}
.diagram-svg .hub-sub {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  fill: var(--fg-mute);
  text-anchor: middle;
}
.diagram-svg .phase-num {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  fill: var(--fg-dim);
}
.diagram-svg .phase-tag {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: .12em;
  fill: var(--ok);
}
.diagram-svg .phase-desc {
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  fill: var(--fg-mute);
}
.diagram-svg .ret-label {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: .04em;
  fill: var(--ok);
  text-anchor: middle;
}
.diagram-svg .diag-foot {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  fill: var(--fg-dim);
  text-anchor: middle;
}

/* boxes hover */
.diagram-svg .box rect { transition: stroke var(--t), fill var(--t); }
.diagram-svg .agent:hover rect { stroke: var(--fg-mute); }
.diagram-svg .mcp:hover rect { stroke: var(--fg-mute); }

/* flow paths */
.diagram-svg .flow path {
  fill: none;
  stroke: url(#flow);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 6 6;
  animation: dashFlow 1.4s linear infinite;
}
.diagram-svg .flow.flow-back path {
  stroke: var(--ok);
  stroke-opacity: .5;
  stroke-dasharray: 3 4;
  animation: dashFlowBack 2s linear infinite;
}

@keyframes dashFlow {
  from { stroke-dashoffset: 12; }
  to   { stroke-dashoffset: 0; }
}
@keyframes dashFlowBack {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: 14; }
}

@media (max-width: 760px) {
  .diagram-frame { padding: 14px; }
}

/* ─── CHIPS (3 benefits) ─── */
.chips { padding: clamp(20px, 5vw, 60px) 0 clamp(60px, 9vw, 100px); }
.chip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 760px) { .chip-grid { grid-template-columns: 1fr; } }

.chip {
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: 28px 26px 30px;
  background:
    linear-gradient(180deg, rgba(132,255,102,.02), transparent 80%),
    linear-gradient(180deg, var(--bg-1), var(--bg));
  position: relative;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
  isolation: isolate;
}
.chip:hover {
  transform: translateY(-3px);
  border-color: var(--line-3);
  box-shadow: 0 24px 50px -24px rgba(132,255,102,.14), 0 0 0 1px rgba(132,255,102,.16);
}
.chip-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(132,255,102,.08);
  color: var(--ok);
  margin-bottom: 18px;
  box-shadow: 0 0 24px rgba(132,255,102,.12) inset;
}
.chip h3 {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.02em;
  margin: 0 0 10px;
  color: var(--fg);
}
.chip p {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--fg-mute);
  margin: 0;
}
.chip code {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 5px;
  font-size: .9em;
  color: var(--fg);
}

/* ─── TRY NOW ─── */
.try {
  text-align: center;
  padding-top: clamp(80px, 11vw, 130px);
}
.try-wrap {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: 28px;
  padding: clamp(48px, 7vw, 80px) clamp(24px, 5vw, 56px);
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(132,255,102,.06), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg));
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 60px 120px -40px rgba(0,0,0,.8);
}
.try-bg {
  position: absolute;
  inset: -40% -10% auto -10%;
  height: 80%;
  background:
    radial-gradient(ellipse 50% 70% at 50% 100%, rgba(132,255,102,.18), transparent 70%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
}
.try .kicker { position: relative; z-index: 1; }
.try h2 {
  position: relative; z-index: 1;
  font-size: clamp(48px, 8vw, 104px);
  font-weight: 200;
  letter-spacing: -.045em;
  line-height: .96;
  margin: 0 auto 18px;
  color: var(--fg-warm);
  max-width: none;
}
.try-sub {
  position: relative; z-index: 1;
  font-family: 'Geist Mono', monospace;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin: 0 0 40px;
}
.try-steps {
  position: relative; z-index: 1;
  display: grid;
  gap: 10px;
  max-width: 600px;
  margin: 0 auto 40px;
  text-align: left;
}
.try-step {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  font-family: 'Geist Mono', monospace;
  font-size: 13.5px;
  color: var(--fg);
  transition: border-color var(--t), background var(--t);
}
.try-step:hover {
  border-color: var(--line-3);
  background: rgba(132,255,102,.025);
}
.try-step .num {
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--ok);
  text-align: center;
  font-weight: 500;
  border-right: 1px solid var(--line-2);
  padding-right: 14px;
}
.try-step code { color: var(--fg); }

.cta-row {
  position: relative; z-index: 1;
  display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}
.btn {
  padding: 14px 28px;
  border-radius: 999px;
  font-family: 'Geist', sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -.005em;
  border: 1px solid transparent;
  transition: all var(--t-fast);
}
.btn.primary {
  background: var(--ok);
  color: var(--bg);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(132,255,102,.4), 0 0 32px rgba(132,255,102,.25);
}
.btn.primary:hover {
  background: var(--ok-2);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(132,255,102,.6), 0 0 44px rgba(132,255,102,.45);
}
.btn.ghost { background: transparent; border-color: var(--line-2); color: var(--fg); }
.btn.ghost:hover { border-color: var(--fg); transform: translateY(-1px); }

/* ─── FOOTER ─── */
.foot {
  padding: 32px var(--pad) 64px;
  border-top: 1px solid var(--line);
  position: relative; z-index: 2;
}
.foot-row {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
  color: var(--fg-dim);
  flex-wrap: wrap;
  gap: 12px;
}
.foot-row .brand { font-weight: 500; gap: 8px; color: var(--fg-mute); }
.brand-icon-sm {
  filter: drop-shadow(0 0 6px rgba(132,255,102,.3));
}
.foot-row .muted { font-family: 'Geist Mono', monospace; letter-spacing: .04em; font-size: 12px; }
.foot-row .muted a {
  color: var(--fg-mute);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
}
.foot-row .muted a:hover { color: var(--ok); text-decoration-color: var(--ok); }

/* ─── REVEAL ─── */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--t-slow), transform var(--t-slow);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js .reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 12px var(--ok); }
  50%      { box-shadow: 0 0 22px var(--ok); }
}
@keyframes pulseGlow {
  0%, 100% { opacity: .8; transform: scale(1); }
  50%      { opacity: 1;  transform: scale(1.04); }
}
@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .layer { transform: none !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}
