/* ------------------------------------------------------------------
   lokigai landing — styles
   Tokens mirror Docs/branding.md
------------------------------------------------------------------- */

:root {
  --color-primary: #0132E4;
  --color-primary-600: #0124B5;
  --color-primary-500: #2A4BF0;
  --color-primary-100: #EEF1FF;
  --color-accent: #00D1FF;
  --color-ink: #0B1020;
  --color-ink-2: #1F2937;
  --color-muted: #64748B;
  --color-border: #E2E8F0;
  --color-surface: #FFFFFF;
  --color-bg: #F8FAFC;
  --color-bg-2: #F1F5F9;
  --color-success: #10B981;
  --color-warning: #F59E0B;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(11, 16, 32, 0.06);
  --shadow-md: 0 8px 24px rgba(11, 16, 32, 0.08);
  --shadow-lg: 0 24px 60px rgba(1, 50, 228, 0.18);

  --container: 1200px;
  --nav-h: 72px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  color: var(--color-ink-2);
  background: var(--color-bg);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5 {
  color: var(--color-ink);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.25rem, 4vw + 1rem, 4rem); line-height: 1.05; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem); line-height: 1.15; }
h3 { font-size: 1.25rem; line-height: 1.3; }
p  { margin: 0 0 1em; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: var(--color-primary-100);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.grad {
  /* Keep stops dark enough to maintain AA contrast on white. The cyan accent
     lives elsewhere (focus rings, OG glow). Text must always be readable. */
  background: linear-gradient(135deg, #0132E4 0%, #2A4BF0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 60ch;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: .95rem;
}
.btn--lg { padding: 16px 28px; font-size: 1rem; }
.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-primary-600);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-border);
}
.btn--ghost:hover {
  background: var(--color-primary-100);
  border-color: var(--color-primary);
  color: var(--color-primary);
  text-decoration: none;
}

/* ---------------- Nav ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.nav.is-scrolled {
  border-bottom-color: var(--color-border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 32px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--color-ink); }
.brand:hover { text-decoration: none; }
.brand__mark { width: 36px; height: 36px; object-fit: contain; }
.brand__mark--dark {
  /* Footer has a dark bg — the blue mark on dark is fine, but bump contrast a touch */
  filter: brightness(1.15) saturate(1.1);
}
.brand__name { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.nav__links { display: flex; gap: 28px; }
.nav__links a { color: var(--color-ink-2); font-weight: 500; font-size: .95rem; }
.nav__links a:hover { color: var(--color-primary); text-decoration: none; }
.nav__actions { display: flex; gap: 12px; align-items: center; }

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 0;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-ink);
  margin: 0 auto;
  transition: transform .2s ease, opacity .2s ease;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(0, 209, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at 10% 20%, rgba(1, 50, 228, 0.12), transparent 60%),
    linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
  z-index: -1;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero__copy h1 { margin-bottom: 20px; }
.hero__copy .lead { font-size: 1.2rem; margin-bottom: 32px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Mock UI */
.hero__visual { position: relative; }
.mock {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg);
  transition: transform .4s ease;
}
.mock:hover { transform: perspective(1400px) rotateY(-3deg) rotateX(1deg); }
.mock__chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--color-bg-2);
  border-bottom: 1px solid var(--color-border);
}
.mock__chrome > span {
  width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1;
}
.mock__chrome > span:nth-child(1) { background: #f87171; }
.mock__chrome > span:nth-child(2) { background: #fbbf24; }
.mock__chrome > span:nth-child(3) { background: #34d399; }
.mock__url {
  margin-left: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  color: var(--color-muted);
  flex: 1;
  text-align: center;
}
.mock__body { display: grid; grid-template-columns: 180px 1fr; min-height: 360px; }
.mock__sidebar { border-right: 1px solid var(--color-border); padding: 16px 12px; background: #fff; }
.mock__side-item {
  font-size: .85rem;
  color: var(--color-ink-2);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
}
.mock__side-item--active { background: var(--color-primary-100); color: var(--color-primary); font-weight: 600; }
.mock__editor { padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--color-bg); }
.mock__seg {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px 44px 12px 14px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-left: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: .78rem;
}
.mock__seg--done { border-left-color: var(--color-success); background: #f0fdf4; }
.mock__seg--active { border-left-color: var(--color-primary); background: var(--color-primary-100); }
.mock__src { color: var(--color-muted); }
.mock__tgt { color: var(--color-ink); font-weight: 500; }
.mock__tgt--draft { color: var(--color-warning); }
.mock__tgt--empty { color: #cbd5e1; }
.mock__badge {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  font-size: .65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}
.mock__badge--100 { background: #dcfce7; color: #047857; }
.mock__badge--92 { background: var(--color-primary-100); color: var(--color-primary); }
.mock__badge--mt { background: #fef3c7; color: #b45309; }

/* ---------------- Sections ---------------- */
.section { padding: 96px 0; }
.section--alt { background: var(--color-bg-2); }
.section--cta { padding: 80px 0; }
.section__header { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section__header .lead { margin-left: auto; margin-right: auto; }

/* Grid */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}
.card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-primary-100);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.card__icon svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--color-muted); font-size: .95rem; margin: 0; }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.steps li {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.steps__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem;
  color: var(--color-primary);
  background: var(--color-primary-100);
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
  font-weight: 700;
}
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--color-muted); margin: 0; }

/* Agents */
.agent {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.agent::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}
.agent h3 { font-size: 1.05rem; color: var(--color-ink); margin: 0 0 8px; line-height: 1.3; }
.agent p { color: var(--color-muted); font-size: .9rem; margin: 0; }

/* CTA */
.section--cta {
  background: linear-gradient(135deg, #0132E4 0%, #2A4BF0 60%, #00D1FF 160%);
  color: #fff;
}
.cta { text-align: center; max-width: 720px; margin: 0 auto; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,0.85); font-size: 1.125rem; max-width: 56ch; margin: 0 auto 32px; }
.cta__buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.section--cta .btn--primary { background: #fff; color: var(--color-primary); }
.section--cta .btn--primary:hover { background: #f1f5f9; }
.section--cta .btn--ghost { color: #fff; border-color: rgba(255,255,255,0.4); }
.section--cta .btn--ghost:hover { background: rgba(255,255,255,0.1); border-color: #fff; color: #fff; }

/* Footer */
.footer { background: #0B1020; color: #cbd5e1; padding: 72px 0 32px; }
.footer .brand__name { color: #fff; }
.footer__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer__tag { color: #94a3b8; margin-top: 12px; max-width: 28ch; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer h3 { color: #fff; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; margin-top: 0; line-height: 1.3; }
.footer a { display: block; color: #94a3b8; margin-bottom: 10px; font-size: .9rem; }
.footer a:hover { color: #fff; text-decoration: none; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  padding-top: 32px;
  font-size: .85rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .hero { padding: 56px 0 64px; }
  .hero__inner { grid-template-columns: 1fr; gap: 48px; }
  .hero__visual { order: 2; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .nav__links, .nav__actions { display: none; }
  .nav__toggle { display: flex; }
  .nav.is-open .nav__links {
    display: flex;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }
  .nav.is-open .nav__actions {
    display: flex;
    position: absolute;
    top: calc(var(--nav-h) + 180px);
    left: 0; right: 0;
    padding: 0 24px 20px;
    background: #fff;
    justify-content: stretch;
  }
  .nav.is-open .nav__actions .btn { flex: 1; justify-content: center; }
  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .footer__cols { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 560px) {
  .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .mock__body { grid-template-columns: 1fr; }
  .mock__sidebar { display: none; }
}
