/* ============================================================
   LaunchpadKit landing — same design system as the operator app.
   White-first palette, IBM Plex Sans + Plex Mono, 0.7rem radius,
   1px borders with very light shadows, restrained motion.
   Tokens below are copied 1:1 from app/app/globals.css (:root).
   ============================================================ */

:root {
  --background: #ffffff;
  --foreground: #0b0d12;
  --card: #ffffff;
  --card-foreground: #0b0d12;
  --primary: #4f46e5;
  --primary-foreground: #ffffff;
  --secondary: #f6f7f9;
  --secondary-foreground: #14171f;
  --muted: #f6f7f9;
  --muted-foreground: #61687a;
  --accent: #f2f3f7;
  --accent-foreground: #14171f;
  --destructive: #d92d20;
  --border: #e7e9ee;
  --input: #e7e9ee;
  --ring: #a5a8f0;
  --success: #12805c;
  --warning: #a15c07;
  --radius: 0.7rem;
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);
  --shadow-sm: 0 1px 2px rgba(15, 18, 34, 0.05);
  --shadow: 0 1px 2px rgba(15, 18, 34, 0.04), 0 12px 32px -16px rgba(15, 18, 34, 0.18);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; text-rendering: optimizeLegibility; font-synthesis-weight: none; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { letter-spacing: -0.021em; line-height: 1.12; text-wrap: balance; font-weight: 600; }
p { text-wrap: pretty; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, .mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums slashed-zero; }
::selection { background: color-mix(in oklab, var(--primary) 22%, transparent); }

.hidden { display: none !important; }

/* ---------- nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--background) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 20px; height: 60px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.brand { font-weight: 640; font-size: 1.05rem; letter-spacing: -0.02em; color: var(--foreground); display: inline-flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand-accent { color: var(--primary); }
.nav nav { display: flex; gap: 2px; align-items: center; }
.nav nav a {
  color: var(--muted-foreground); font-size: 0.9rem; font-weight: 500;
  padding: 6px 11px; border-radius: 999px;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav nav a:hover { color: var(--foreground); background: var(--accent); text-decoration: none; }
/* buttons keep their own colours inside the nav (the rule above is more specific) */
.nav nav a.btn, .nav nav a.btn:hover { color: var(--primary-foreground); background: var(--primary); border-color: transparent; }
.nav nav a.btn:hover { background: var(--primary); filter: brightness(1.06); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: var(--primary-foreground);
  border: 1px solid transparent; border-radius: var(--radius-md);
  padding: 10px 18px; font: inherit; font-size: 0.9375rem; font-weight: 560;
  cursor: pointer; box-shadow: var(--shadow-sm);
  transition: transform 0.12s var(--ease), filter 0.12s var(--ease), background 0.12s var(--ease), border-color 0.12s var(--ease);
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: var(--card); color: var(--foreground); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--foreground); filter: none; }
.btn-small { padding: 7px 14px; font-size: 0.875rem; }
.btn-block { display: flex; width: 100%; }

/* ---------- hero ---------- */

.hero { max-width: 880px; margin: 0 auto; padding: 76px 20px 44px; text-align: center; }
.hero h1 { font-size: clamp(1.95rem, 4.2vw, 3.05rem); font-weight: 650; margin-bottom: 18px; }
.lead { font-size: 1.0625rem; color: var(--muted-foreground); max-width: 66ch; margin: 0 auto; }
.hero-cta { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.evidence {
  margin: 34px auto 0; max-width: 820px; text-align: left;
  background: var(--secondary); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px;
  color: var(--muted-foreground); font-size: 0.9375rem;
}
.evidence strong { color: var(--foreground); }

/* ---------- sections ---------- */

.section { max-width: 1080px; margin: 0 auto; padding: 64px 20px; }
.section.alt { background: var(--secondary); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); max-width: none; }
.section.alt > * { max-width: 1040px; margin-left: auto; margin-right: auto; }
.section h2,
.section h1 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin-bottom: 10px; }
.sub { color: var(--muted-foreground); margin-bottom: 28px; max-width: 70ch; }

.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-sm);
  transition: transform 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.card:hover { transform: translateY(-2px); border-color: #d8dce6; box-shadow: var(--shadow); }
.card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.card p { color: var(--muted-foreground); font-size: 0.9375rem; }

/* ---------- pricing ---------- */

.pricing .card { display: flex; flex-direction: column; }
.price.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow-sm); }
.amount { font-size: 1.85rem; font-weight: 680; letter-spacing: -0.022em; }
.amount span { display: block; font-size: 0.8125rem; font-weight: 400; color: var(--muted-foreground); margin-top: 2px; }
.price .btn { margin-top: auto; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0 20px; }
.split h4 { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-foreground); margin-bottom: 8px; font-weight: 600; }
.split ul { list-style: none; margin: 0; padding: 0; font-size: 0.875rem; color: var(--muted-foreground); }
.split li { margin-bottom: 6px; padding-left: 14px; position: relative; }
.split li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 5px; height: 5px; border-radius: 50%; background: var(--border); }
.split li.strong { color: var(--foreground); font-weight: 500; }
.split em { font-style: normal; color: var(--foreground); }

/* ---------- support matrix ---------- */

.matrix-title { font-size: 1.125rem; margin: 44px 0 14px; }
.matrix-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); }
table.matrix { width: 100%; border-collapse: collapse; font-size: 0.875rem; min-width: 620px; }
table.matrix th, table.matrix td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.matrix thead th { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-foreground); background: var(--secondary); font-weight: 600; }
table.matrix tbody th { color: var(--foreground); font-weight: 600; white-space: nowrap; }
table.matrix td { color: var(--muted-foreground); }
table.matrix tbody tr:hover td, table.matrix tbody tr:hover th { background: var(--accent); }
table.matrix tr:last-child th, table.matrix tr:last-child td { border-bottom: 0; }

/* ---------- evidence links ---------- */

.linklist { list-style: none; margin: 12px 0 0; padding: 0; font-size: 0.9375rem; }
.linklist li { margin-bottom: 7px; }
.linklist a { text-decoration: none; }
.linklist a:hover { text-decoration: underline; }
.note-inline { color: var(--muted-foreground); font-size: 0.8125rem; margin-top: 12px; }

/* ---------- faq ---------- */

details {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 14px 18px; margin-bottom: 10px; box-shadow: var(--shadow-sm);
}
details summary { cursor: pointer; font-weight: 560; }
details summary::marker { color: var(--primary); }
details p { color: var(--muted-foreground); font-size: 0.9375rem; margin-top: 10px; }

/* ---------- notes / footer ---------- */

.note { color: var(--muted-foreground); font-size: 0.8125rem; max-width: 760px; margin-top: 22px; }
.muted { color: var(--muted-foreground); font-size: 0.8125rem; margin-top: 6px; }
.success { color: var(--success); font-weight: 600; margin: 12px 0; }

.footer { border-top: 1px solid var(--border); background: var(--secondary); padding: 28px 20px; text-align: center; font-size: 0.9rem; }
.footer p { color: var(--muted-foreground); margin-bottom: 6px; }
.footer p:first-child { color: var(--foreground); font-weight: 500; }

/* ---------- modal ---------- */

.modal { position: fixed; inset: 0; background: rgba(11, 13, 18, 0.5); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px; }
.modal-box {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl);
  max-width: 460px; width: 100%; padding: 26px; position: relative; box-shadow: var(--shadow);
}
.modal-box h3 { margin-bottom: 10px; font-size: 1.125rem; }
.modal-box p { color: var(--muted-foreground); margin-bottom: 16px; }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; color: var(--muted-foreground); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--foreground); }

.waitlist-form { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.waitlist-form input {
  background: var(--card); border: 1px solid var(--input); border-radius: var(--radius-md);
  padding: 10px 12px; font: inherit; color: var(--foreground); width: 100%;
  transition: border-color 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.waitlist-form input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 18%, transparent); }

/* ---------- motion (respects reduced-motion) ---------- */

@keyframes lpk-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero > *, .section > h2, .section > .sub, .card, details { animation: lpk-fade-up 0.5s var(--ease) both; }
.grid3 .card:nth-child(2) { animation-delay: 0.05s; }
.grid3 .card:nth-child(3) { animation-delay: 0.1s; }
.pricing .card:nth-child(2) { animation-delay: 0.05s; }
.pricing .card:nth-child(3) { animation-delay: 0.1s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .card:hover { transform: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 780px) {
  /* the support matrix fits without horizontal scrolling on phones */
  table.matrix { min-width: 0; font-size: 0.8125rem; }
  table.matrix th, table.matrix td { padding: 10px 8px; }
  table.matrix tbody th { white-space: normal; }
  .matrix-wrap { overflow-x: visible; }
  .nav-inner { height: auto; flex-wrap: wrap; row-gap: 8px; padding: 10px 16px; }
  .nav nav { flex-wrap: wrap; gap: 2px 10px; width: 100%; }
  .nav nav a { font-size: 0.875rem; }
  .nav nav a.btn { margin-left: auto; }
  .hero { padding: 48px 16px 32px; }
  .section { padding: 44px 16px; }
  .split { grid-template-columns: 1fr; gap: 12px; }
  .matrix-wrap { max-width: 100%; }
}

/* ---------- demo video ---------- */

.video-wrap {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: #0b0d12; box-shadow: var(--shadow);
}
.video-wrap video { display: block; width: 100%; height: auto; }
@media (max-width: 780px) { .video-wrap { border-radius: var(--radius-md); } }

/* ---------- article (field notes) ---------- */

.article { max-width: 760px; margin: 0 auto; padding: 48px 20px 64px; }
.article h1 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.22; letter-spacing: -0.02em; margin: 10px 0 18px; }
.article h2 { font-size: 1.18rem; margin: 34px 0 10px; letter-spacing: -0.01em; }
.article p { color: var(--muted-foreground); margin-bottom: 14px; }
.article p.lead { color: var(--foreground); font-size: 1.02rem; margin-bottom: 18px; }
.article a { color: var(--primary); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); }
.article a:hover { border-bottom-color: var(--primary); }
.article strong { color: var(--foreground); font-weight: 600; }
.article .note-inline { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 28px; }
@media (max-width: 780px) { .article { padding: 32px 16px 48px; } }
