/* Kraftatlas — landing page
   Palette + type mirror the live dashboard (mapboard/theme.py). */

:root {
  --bg:        #0d1117;
  --bg-soft:   #11161d;
  --card:      #161b22;
  --border:    #21262d;
  --text:      #e6edf3;
  --dim:       #8b949e;
  --accent:    #58a6ff;
  --green:     #2ea043;
  --red:       #f85149;
  --yellow:    #d29922;
  --purple:    #a371f7;

  --mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;

  --maxw: 1120px;
  --r: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* faint engineering grid behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.18;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 25%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

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

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; position: relative; z-index: 1; }

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

/* ── Kicker / eyebrow ─────────────────────────────────────── */
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--accent);
  display: inline-block;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 13px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
  cursor: pointer;
  white-space: nowrap;
}
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-primary {
  background: var(--accent);
  color: #07101f;
  font-weight: 600;
  box-shadow: 0 0 0 0 rgba(88,166,255,.45);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 30px -8px rgba(88,166,255,.6); }
.btn-ghost {
  background: rgba(255,255,255,.02);
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ── Header / nav ─────────────────────────────────────────── */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(13,17,23,.72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 96px; }
.nav .logo img { height: 60px; display: block; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a.link {
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--dim);
  transition: color .2s ease;
}
.nav-links a.link:hover { color: var(--text); }
.nav-cta { padding: 10px 18px; }
@media (max-width: 760px) { .nav-links a.link { display: none; } }

/* ── Hero ─────────────────────────────────────────────────── */
.hero { position: relative; padding: 78px 0 40px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(32px, 4.4vw, 50px);
  line-height: 1.08;
  letter-spacing: -1.3px;
  font-weight: 700;
  margin: 22px 0 20px;
}
.hero h1 .soft { color: var(--dim); }
.hero p.lead {
  font-size: clamp(17px, 2vw, 20px);
  color: var(--dim);
  max-width: 33ch;
  margin-bottom: 32px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-note {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--dim);
  display: flex;
  align-items: center;
  gap: 9px;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(46,160,67,.7);
  animation: pulse 2.2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(46,160,67,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(46,160,67,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,160,67,0); }
}

/* animated grid canvas frame */
.grid-stage {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background:
    radial-gradient(120% 120% at 70% 10%, rgba(88,166,255,.10), transparent 55%),
    var(--bg-soft);
  overflow: hidden;
}
.grid-stage .flow-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}
/* subtle vignette so the corner labels and brand stay legible over the map */
.grid-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(13,17,23,.45) 0%, transparent 22%, transparent 80%, rgba(13,17,23,.55) 100%),
    radial-gradient(120% 120% at 50% 50%, transparent 60%, rgba(13,17,23,.35) 100%);
}
.grid-stage .corner {
  z-index: 2;
  position: absolute;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 1.5px;
  color: var(--dim);
  text-transform: uppercase;
}
.grid-stage .corner.tl { top: 14px; left: 16px; }
.grid-stage .corner.br { bottom: 14px; right: 16px; color: var(--accent); }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-stage { max-width: 460px; margin: 8px auto 0; }
}

/* ── Trust strip ──────────────────────────────────────────── */
.strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-top: 56px;
}
.strip .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 44px;
  padding-top: 22px;
  padding-bottom: 22px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
}
.strip b { color: var(--text); font-weight: 600; }

/* ── Section scaffolding ──────────────────────────────────── */
section.block { padding: 96px 0; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  letter-spacing: -1px;
  line-height: 1.1;
  margin: 16px 0 16px;
  font-weight: 700;
}
.section-head p { color: var(--dim); font-size: 18px; }

/* ── Pain → solution cards ────────────────────────────────── */
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 880px) { .cols { grid-template-columns: 1fr; } }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 26px;
  transition: border-color .25s ease, transform .25s ease;
}
.card:hover { border-color: #2d3540; transform: translateY(-3px); }
.card .ico {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: rgba(88,166,255,.10);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.card .ico svg { width: 19px; height: 19px; stroke: var(--accent); fill: none; stroke-width: 1.7; }
.card h3 { font-size: 18px; margin-bottom: 8px; letter-spacing: -0.2px; }
.card p { color: var(--dim); font-size: 15.5px; }

/* ── Showcase (screenshots) ───────────────────────────────── */
.showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 56px; align-items: center; }
.showcase.flip .copy { order: 2; }
@media (max-width: 920px) { .showcase, .showcase.flip { grid-template-columns: 1fr; }
  .showcase.flip .copy { order: 0; } }
.showcase + .showcase { margin-top: 88px; }
.shot {
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-soft);
  box-shadow: 0 30px 80px -40px rgba(0,0,0,.9);
  transition: transform .3s ease;
}
.shot:hover { transform: translateY(-4px); }
.shot .bar {
  height: 34px; display: flex; align-items: center; gap: 7px;
  padding: 0 14px; border-bottom: 1px solid var(--border); background: var(--bg);
}
.shot .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); display: inline-block; }
.shot .bar .addr {
  margin-left: 12px; font-family: var(--mono); font-size: 11px; color: var(--dim);
}
.shot img { width: 100%; display: block; }
.copy h3 { font-size: 24px; letter-spacing: -0.5px; margin-bottom: 14px; }
.copy p { color: var(--dim); margin-bottom: 16px; }
.feature-list { list-style: none; display: grid; gap: 11px; }
.feature-list li { display: flex; gap: 11px; font-size: 15.5px; color: var(--text); align-items: flex-start; }
.feature-list li::before {
  content: "→"; color: var(--accent); font-family: var(--mono); flex: none; line-height: 1.5;
}
.tag {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--border);
  color: var(--dim); margin-bottom: 18px;
}
.tag.free { color: var(--green); border-color: rgba(46,160,67,.35); background: rgba(46,160,67,.08); }
.tag.edge { color: var(--accent); border-color: rgba(88,166,255,.35); background: rgba(88,166,255,.08); }

/* "coming soon" pill */
.badge-soon {
  display: inline-block; font-family: var(--mono); font-size: 10.5px; letter-spacing: 1px;
  text-transform: uppercase; padding: 3px 9px; border-radius: 6px; vertical-align: middle;
  color: var(--yellow); border: 1px solid rgba(210,153,34,.4); background: rgba(210,153,34,.08);
}

/* ── Pipeline ─────────────────────────────────────────────── */
.pipe { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 10px; }
@media (max-width: 880px) { .pipe { grid-template-columns: 1fr 1fr; } }
.pipe .stage { position: relative; padding: 24px 22px; border: 1px solid var(--border); background: var(--card); }
.pipe .stage:not(:last-child) { border-right: none; }
@media (max-width: 880px) { .pipe .stage:nth-child(2n) { border-left: none; } .pipe .stage { border-right: 1px solid var(--border); } }
.pipe .stage:first-child { border-radius: var(--r) 0 0 var(--r); }
.pipe .stage:last-child  { border-radius: 0 var(--r) var(--r) 0; }
.pipe .step { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 1.5px; }
.pipe .stage h4 { font-size: 16px; margin: 10px 0 7px; }
.pipe .stage p { font-size: 13.5px; color: var(--dim); }
@media (max-width: 880px) {
  .pipe .stage:first-child { border-radius: var(--r) var(--r) 0 0; }
  .pipe .stage:last-child  { border-radius: 0 0 var(--r) var(--r); }
}

/* ── Roadmap ──────────────────────────────────────────────── */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 880px) { .timeline { grid-template-columns: 1fr; } }
.phase {
  border: 1px solid var(--border); border-radius: var(--r); padding: 26px; background: var(--card);
  position: relative; overflow: hidden;
}
.phase::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: var(--accent); opacity: .35; }
.phase .when { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 1px; }
.phase h3 { font-size: 19px; margin: 12px 0 12px; }
.phase ul { list-style: none; display: grid; gap: 9px; }
.phase li { font-size: 14.5px; color: var(--dim); display: flex; gap: 9px; }
.phase li::before { content: "—"; color: var(--border); }
.phase.now::before { opacity: 1; }
.phase.now { box-shadow: inset 0 0 0 1px rgba(88,166,255,.25); }

/* ── CTA band ─────────────────────────────────────────────── */
.cta-band { text-align: center; padding: 110px 0; position: relative; }
.cta-band h2 { font-size: clamp(30px, 4.5vw, 50px); letter-spacing: -1.4px; line-height: 1.06; margin-bottom: 18px; }
.cta-band p { color: var(--dim); font-size: 19px; max-width: 52ch; margin: 0 auto 34px; }
.cta-band .hero-cta { justify-content: center; }

/* ── Footer ───────────────────────────────────────────────── */
footer { border-top: 1px solid var(--border); padding: 46px 0; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot img { height: 26px; opacity: .9; }
.foot .meta { font-family: var(--mono); font-size: 12.5px; color: var(--dim); }
.foot a.link { color: var(--dim); }
.foot a.link:hover { color: var(--accent); }
.foot-links { display: flex; gap: 22px; font-family: var(--mono); font-size: 13px; }

/* ── Scroll reveal ────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
