/* KontrolTower landing: palette matches the app (frontend/src/index.css) */
:root {
  --bg: #0b1120;
  --bg-panel: #0f172b;
  --bg-surface: #141e37;
  --bg-hover: #1a2643;
  --border: #212c4a;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --text: #98a4bd;
  --text-h: #eef2fb;
  --text-dim: #64718d;
  /* Brand: periwinkle on dark, indigo for depth (from the KontrolTower.ai logo pack) */
  --accent: #8b8cf8;
  --accent-light: rgba(139, 140, 248, 0.14);
  --accent-border: rgba(139, 140, 248, 0.42);
  --brand: #8b8cf8;
  --brand-deep: #4f46e5;
  --brand-tint: #c7c8ff;
  --brand-light: rgba(139, 140, 248, 0.12);
  --on-brand: #0b1120;
  --amber: #f59e0b;
  --red: #ef4444;
  --radius: 14px;
  --sans: 'Inter', system-ui, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--text-h); margin: 0; letter-spacing: -0.02em; line-height: 1.15; font-family: var(--display); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0; }
b, strong { color: var(--text-h); font-weight: 600; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; }
.center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand); color: var(--on-brand); font-weight: 600; font-size: 0.95rem;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  box-shadow: 0 8px 28px rgba(139, 140, 248, 0.22);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 34px rgba(139, 140, 248, 0.32); }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-ghost { background: transparent; color: var(--text-h); border-color: var(--border); box-shadow: none; }
.btn-ghost:hover { background: var(--bg-surface); box-shadow: none; }
.btn-sm { padding: 8px 14px; font-size: 0.875rem; box-shadow: none; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 13, 31, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-h); font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand img { height: 30px; width: auto; }
.footer .brand img { height: 23px; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 0.92rem; }
.nav-links a:not(.btn) { color: var(--text); transition: color .15s; }
.nav-links a:not(.btn):hover { color: var(--text-h); }
.nav-toggle, .nav-burger { display: none; }

/* Hero */
.hero { position: relative; padding: 96px 0 88px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% 20%, rgba(79, 70, 229, 0.18), transparent 70%),
    radial-gradient(500px 360px at 10% 0%, rgba(139, 140, 248, 0.10), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px), linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 500; color: var(--brand);
  background: var(--brand-light); border: 1px solid rgba(139, 140, 248, 0.25); padding: 6px 12px; border-radius: 999px; margin-bottom: 24px;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 rgba(139, 140, 248, .6); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(139, 140, 248, .55); } 70% { box-shadow: 0 0 0 8px rgba(139, 140, 248, 0); } 100% { box-shadow: 0 0 0 0 rgba(139, 140, 248, 0); } }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; }
.grad { background: linear-gradient(90deg, var(--brand-tint), var(--brand) 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: 1.15rem; margin-top: 22px; max-width: 560px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.cta-row.center { justify-content: center; }
.hero-points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 0.9rem; color: var(--text-dim); }
.hero-points li::before { content: "✓"; color: var(--brand); margin-right: 8px; font-weight: 700; }

/* Cards */
.card { background: linear-gradient(180deg, var(--bg-surface), var(--bg-panel)); border: 1px solid var(--border); border-radius: var(--radius); }

.hero-visual { position: relative; }
.glow { position: absolute; inset: 10% 5%; background: radial-gradient(closest-side, rgba(79, 70, 229, .45), transparent); filter: blur(40px); z-index: -1; }
.brief { padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.55); transform: perspective(1400px) rotateY(-6deg) rotateX(3deg); }
.brief-head { display: flex; gap: 12px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.avatar { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand-deep), var(--brand)); }
.brief-title { color: var(--text-h); font-weight: 600; }
.brief-sub { font-size: 0.82rem; color: var(--text-dim); }
.brief-section { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-dim); margin: 16px 0 8px; font-weight: 600; }
.row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.02); border: 1px solid var(--border-subtle); margin-bottom: 6px; font-size: 0.88rem; }
.row-text { flex: 1; color: var(--text-h); min-width: 0; }
.pill { font-size: 0.7rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.pill-indigo { background: rgba(79,70,229,.22); color: var(--brand-tint); border: 1px solid rgba(79,70,229,.6); }
.pill-mint { background: var(--brand-light); color: var(--brand); border: 1px solid rgba(139, 140, 248, .3); }
.mini-btn { font-size: 0.75rem; font-weight: 600; padding: 5px 10px; border-radius: 7px; border: 1px solid var(--border); color: var(--text-h); white-space: nowrap; }
.mini-btn.solid { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.status { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.status.amber { background: var(--amber); box-shadow: 0 0 10px rgba(245,158,11,.6); }
.status.red { background: var(--red); box-shadow: 0 0 10px rgba(239,68,68,.6); }
.brief-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 0.78rem; color: var(--text-dim); }
.team { display: flex; }
.team span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 0.66rem; font-weight: 700; color: var(--text-h); background: var(--bg-hover); border: 2px solid var(--bg-panel); margin-left: -8px; }
.team span:first-child { margin-left: 0; background: var(--brand-deep); }
.mono { font-family: var(--mono); }

/* Sections */
.section { padding: 104px 0; position: relative; }
.section.alt { background: linear-gradient(180deg, rgba(12,20,41,.6), rgba(12,20,41,.2)); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.kicker { font-size: 0.8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--brand); font-weight: 600; margin-bottom: 14px; }
.sub { font-size: 1.06rem; margin-top: 18px; }
.sub em { color: var(--text-h); font-style: normal; }
.section-head { max-width: 760px; margin-bottom: 56px; }

/* Founder band */
.band { padding: 88px 0; background: #0f152a; border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.band-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.band h2 { font-size: clamp(1.6rem, 2.8vw, 2.25rem); line-height: 1.18; }
.band p { font-size: 1.08rem; line-height: 1.7; }

/* How it works pillars */
.pillar { padding: 32px; transition: border-color .2s, transform .2s; }
.pillar:hover { border-color: var(--accent-border); transform: translateY(-2px); }
.pillar-num { display: block; font-family: var(--display); font-weight: 600; color: var(--brand); margin-bottom: 18px; }
.pillar h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 14px; }
.pillar p { font-size: 1rem; line-height: 1.65; }

/* Compare */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 56px; max-width: 920px; }
.compare-col { padding: 28px; }
.compare-col ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.compare-col li { padding-left: 28px; position: relative; }
.compare-col li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.before li::before { content: "✕"; color: var(--text-dim); }
.before { opacity: .85; }
.after { border-color: rgba(139, 140, 248, .3); box-shadow: 0 0 0 1px rgba(139, 140, 248, .08), 0 20px 50px rgba(139, 140, 248, .06); }
.after li { color: var(--text-h); }
.after li::before { content: "✓"; color: var(--brand); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; counter-reset: s; }
.steps li { padding: 24px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-panel); transition: border-color .2s, transform .2s; }
.steps li:hover { border-color: var(--accent-border); transform: translateY(-2px); }
.steps .num { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); }
.steps h3 { margin: 10px 0 8px; }
.steps p { font-size: 0.92rem; }
.steps em { color: var(--brand); font-style: normal; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.checks { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.checks li { padding-left: 32px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: var(--brand); background: var(--brand-light); }

/* Chat */
.chat { padding: 24px; display: grid; gap: 14px; }
.msg { padding: 14px 16px; border-radius: 12px; font-size: 0.93rem; max-width: 92%; }
.msg.you { justify-self: end; background: var(--accent-light); border: 1px solid var(--accent-border); color: var(--text-h); }
.msg.atlas { background: rgba(255,255,255,.03); border: 1px solid var(--border); }
.msg .who { font-size: 0.75rem; font-weight: 700; color: var(--brand); margin-bottom: 6px; letter-spacing: .04em; }
.msg ol { margin: 10px 0; padding-left: 20px; color: var(--text-h); }
.msg li { margin: 4px 0; }
.tag { font-family: var(--mono); font-size: 0.75rem; padding: 2px 6px; border-radius: 5px; background: var(--brand-light); color: var(--brand); }
.chat-actions { display: flex; gap: 8px; }

/* Teams */
.teams { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.team-card { padding: 22px; }
.team-card h3 { display: flex; align-items: center; gap: 10px; font-size: 0.95rem; margin-bottom: 16px; }
.t-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); box-shadow: 0 0 12px var(--c); }
.team-card ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 0.88rem; }
.team-card li b { display: block; font-size: 0.95rem; }
.team-card .note { margin-top: 16px; font-size: 0.78rem; color: var(--text-dim); }
.models { margin-top: 32px; text-align: center; color: var(--text); }

/* Pipeline */
.pipeline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stage { position: relative; padding: 11px 13px; border-radius: 10px; background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-h); font-weight: 500; font-size: 0.88rem; white-space: nowrap; }
.stage:not(:last-child)::after { content: "→"; position: absolute; right: -9px; top: 50%; transform: translate(50%, -50%); color: var(--text-dim); font-size: .8rem; }
.pipeline .stage:not(:last-child) { margin-right: 10px; }
.stage.gate { border-color: var(--brand); background: var(--brand-light); color: var(--brand); }
.stage.end { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.05); }
.legend { margin-top: 20px; font-size: 0.85rem; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.gate-key { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--brand); background: var(--brand-light); }

/* Features */
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feat { padding: 28px; transition: border-color .2s; }
.feat:hover { border-color: var(--accent-border); }
.ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-light); color: #aab0ff; font-size: 1.1rem; font-weight: 700; margin-bottom: 18px; }
.feat h3 { margin-bottom: 8px; }
.feat p { font-size: 0.93rem; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.chip { padding: 14px 22px; border-radius: 12px; background: var(--bg-surface); border: 1px solid var(--border); color: var(--text-h); font-weight: 600; }
.chip.muted { color: var(--text-dim); border-style: dashed; background: transparent; font-weight: 500; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; max-width: 960px; }
.stats div { text-align: center; padding: 24px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-panel); }
.stats b { display: block; font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; background: linear-gradient(90deg, var(--brand-tint), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats span { font-size: 0.85rem; color: var(--text-dim); }

/* CTA */
.cta { background: radial-gradient(700px 360px at 50% 100%, rgba(139, 140, 248, .12), transparent 70%), radial-gradient(600px 300px at 50% 0%, rgba(79, 70, 229, .12), transparent 70%); }
.cta-logo { margin: 0 auto 28px; border-radius: 16px; box-shadow: 0 0 0 1px var(--border), 0 16px 50px rgba(139,140,248,.25); }

/* Footer */
.footer { border-top: 1px solid var(--border-subtle); padding: 32px 0; font-size: 0.88rem; color: var(--text-dim); }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer .brand { font-size: 0.98rem; }
.footer a:not(.brand):hover { color: var(--text-h); }

/* Grid children may shrink below their content width */
.hero-grid > *, .split > *, .band-grid > *, .compare > *, .teams > *, .grid3 > *, .steps > *, .stats > * { min-width: 0; }

@media (min-width: 1100px) {
  .steps { grid-template-columns: repeat(7, 1fr); gap: 12px; }
  .steps li { padding: 20px 16px; }
  .steps p { font-size: 0.86rem; }
}

/* Responsive */
@media (max-width: 1024px) {
  .teams { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .hero { padding: 64px 0; }
  .hero-grid, .split, .band-grid { grid-template-columns: 1fr; gap: 24px 48px; }
  .band { padding: 64px 0; }
  .brief { transform: none; }
  .grid3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 80px 0; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .nav-burger { display: grid; place-items: center; width: 40px; height: 40px; cursor: pointer; border: 1px solid var(--border); border-radius: 10px; }
  .nav-burger span, .nav-burger span::before, .nav-burger span::after { display: block; width: 18px; height: 2px; background: var(--text-h); border-radius: 2px; position: relative; content: ""; }
  .nav-burger span::before { position: absolute; top: -6px; }
  .nav-burger span::after { position: absolute; top: 6px; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-panel); border-bottom: 1px solid var(--border); padding: 8px 16px 16px; display: none;
  }
  .nav-links a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
  .nav-links .btn { margin-top: 12px; }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .compare, .grid3, .teams { grid-template-columns: 1fr; }
  .pillar { padding: 24px; }
  .section-head { margin-bottom: 40px; }
  .row { flex-wrap: wrap; }
  .stage:not(:last-child)::after { display: none; }
  .pipeline .stage:not(:last-child) { margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
