/* ========================================================================
   Kai — shared design system (kaifit.app)
   Dark navy + single mint accent. No framework.
   ======================================================================== */

:root {
  --bg: #0A0F1A;
  --surface: #111827;
  --elev: #1A2333;
  --muted-surface: #0F172A;
  --text: #F1F5F9;
  --muted: #94A3B8;
  --dim: #64748B;
  --accent: #10E090;
  --accent-soft: rgba(16,224,144,0.14);
  --accent-dim: #0FBA68;
  --accent-glow: rgba(16,224,144,0.35);
  --warn: #F59E0B;
  --danger: #EF4444;
  --divider: rgba(148,163,184,0.14);
  --divider-strong: rgba(148,163,184,0.22);
  --code: #0F172A;

  --maxw: 1120px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-dim); }
img { max-width: 100%; display: block; }
hr { border: none; border-top: 1px solid var(--divider); margin: 48px 0; }

/* ============ Layout ============ */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 88px 0; }
@media (max-width: 720px) { section { padding: 56px 0; } }

/* ============ Typography ============ */
h1, h2, h3, h4 { letter-spacing: -0.02em; margin: 0 0 16px; line-height: 1.15; }
h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; }
h3 { font-size: clamp(20px, 2vw, 24px); font-weight: 600; }
h4 { font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
p { color: #CBD5E1; margin: 0 0 14px; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 640px; }
.eyebrow { display: inline-block; color: var(--accent); font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 14px; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }
small, .small { font-size: 13px; color: var(--dim); }

/* ============ Top nav ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,15,26,0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--divider);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); font-weight: 700; font-size: 18px;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-weight: 800; font-size: 16px;
  display: grid; place-items: center;
  box-shadow: 0 0 18px var(--accent-glow);
}
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--muted); font-size: 15px; font-weight: 500;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-cta { padding: 8px 14px; border-radius: 8px; background: var(--accent-soft); border: 1px solid var(--accent); color: var(--accent) !important; font-weight: 600; }
.nav-cta:hover { background: rgba(16,224,144,0.22); }
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-cta { display: inline-flex; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s ease, opacity .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #03130C;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-dim); color: #03130C; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--divider-strong);
}
.btn-ghost:hover { background: var(--surface); }
.btn-block { width: 100%; }

/* ============ Pills / tags ============ */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 1px solid var(--divider-strong);
  color: var(--muted);
}
.pill.pro { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.pill.free { color: var(--muted); }
.pill.new { color: var(--warn); border-color: var(--warn); background: rgba(245,158,11,0.08); }

/* ============ Hero ============ */
.hero {
  position: relative; overflow: hidden;
  padding: 96px 0 72px;
}
.hero::before {
  content: ""; position: absolute; inset: -80px;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 60%);
  filter: blur(60px); opacity: .35; z-index: 0;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 { max-width: 18ch; margin-bottom: 18px; }
.hero h1 .accent { color: var(--accent); }
.hero .lede { margin-bottom: 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-meta { margin-top: 26px; color: var(--dim); font-size: 13px; }

/* ============ Cards / grids ============ */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--divider-strong); transform: translateY(-2px); }
.card .icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border-radius: 10px;
  color: var(--accent);
  font-size: 20px;
  margin-bottom: 14px;
}
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { font-size: 14.5px; color: var(--muted); margin: 0; }

/* ============ Feature rows ============ */
.feature-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
  padding: 56px 0;
  border-bottom: 1px solid var(--divider);
}
.feature-row:last-child { border-bottom: none; }
.feature-row.reverse { grid-template-columns: 1fr 1.1fr; }
.feature-row.reverse .feature-text { order: 2; }
.feature-row.reverse .feature-visual { order: 1; }
@media (max-width: 800px) {
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 24px; }
  .feature-row.reverse .feature-text { order: 1; }
  .feature-row.reverse .feature-visual { order: 2; }
}
.feature-text h3 { font-size: 26px; margin-bottom: 12px; }
.feature-visual {
  background: linear-gradient(180deg, var(--elev), var(--surface));
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 28px;
  min-height: 240px;
  display: grid; place-items: center;
  position: relative; overflow: hidden;
}
.feature-visual .chat-bubble {
  background: var(--muted-surface);
  border: 1px solid var(--divider);
  border-radius: 14px;
  padding: 12px 16px;
  margin: 6px 0;
  font-size: 14px;
  max-width: 80%;
  color: var(--text);
}
.feature-visual .chat-bubble.user {
  background: var(--accent);
  color: #03130C;
  align-self: flex-end;
  margin-left: auto;
}
.feature-visual .chat-stack { display: flex; flex-direction: column; width: 100%; gap: 4px; }

/* ============ Pricing ============ */
.price-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 880px;
  margin: 32px auto 0;
}
@media (max-width: 720px) { .price-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
}
.price-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 40px rgba(16,224,144,0.18);
}
.price-card .pill { position: absolute; top: 24px; right: 24px; }
.price-card h3 { font-size: 22px; margin-bottom: 6px; }
.price-card .price { font-size: 44px; font-weight: 800; margin: 20px 0 6px; letter-spacing: -0.02em; }
.price-card .price span { font-size: 16px; color: var(--muted); font-weight: 500; }
.price-card ul { list-style: none; padding: 0; margin: 24px 0; }
.price-card li {
  padding: 8px 0;
  color: #CBD5E1;
  font-size: 15px;
  display: flex; gap: 10px; align-items: flex-start;
  border-bottom: 1px solid var(--divider);
}
.price-card li:last-child { border-bottom: none; }
.price-card li::before {
  content: "✓"; color: var(--accent); font-weight: 700; flex-shrink: 0;
}
.price-card li.x::before { content: "—"; color: var(--dim); }

/* ============ Waitlist form ============ */
.waitlist {
  background: linear-gradient(180deg, var(--surface), var(--muted-surface));
  border: 1px solid var(--divider);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  position: relative; overflow: hidden;
}
.waitlist::before {
  content: ""; position: absolute; inset: -50%;
  background: radial-gradient(closest-side, var(--accent-glow), transparent 60%);
  filter: blur(60px); opacity: .25;
  pointer-events: none;
}
.waitlist > * { position: relative; }
.waitlist h2 { margin-bottom: 8px; }
.waitlist .lede { margin: 0 auto 24px; }
.waitlist form {
  display: flex; gap: 10px; max-width: 460px; margin: 0 auto;
  flex-wrap: wrap;
}
.waitlist input[type=email] {
  flex: 1; min-width: 0;
  background: var(--muted-surface);
  color: var(--text);
  border: 1px solid var(--divider-strong);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease;
}
.waitlist input[type=email]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.waitlist .form-note { margin-top: 14px; color: var(--dim); font-size: 12.5px; }
.waitlist .form-status { margin-top: 16px; font-size: 14px; min-height: 1.4em; }
.waitlist .form-status.success { color: var(--accent); }
.waitlist .form-status.error { color: var(--danger); }

/* ============ Tables ============ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14.5px;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
}
th { color: var(--muted); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; }
tr:hover td { background: rgba(255,255,255,0.012); }

/* ============ Article (legal pages) ============ */
.article {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}
.article h1 { font-size: 36px; margin-bottom: 8px; }
.article .updated { color: var(--dim); font-size: 14px; margin-bottom: 40px; }
.article h2 { font-size: 22px; margin-top: 40px; margin-bottom: 12px; }
.article h3 { font-size: 17px; margin-top: 28px; }
.article p, .article li { font-size: 15.5px; color: #CBD5E1; }
.article ul, .article ol { padding-left: 22px; }
.article ul li, .article ol li { margin-bottom: 6px; }

/* ============ FAQ ============ */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 12px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-size: 22px;
  font-weight: 400;
  margin-left: 12px;
  transition: transform .2s ease;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 14px 0 0; color: var(--muted); font-size: 15px; }

/* ============ Callout ============ */
.callout {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
  color: #D1FAE5;
}
.callout.warn { background: rgba(245,158,11,0.08); border-color: var(--warn); color: #FDE68A; }
.callout strong { color: var(--text); }

/* ============ Footer ============ */
footer.site {
  border-top: 1px solid var(--divider);
  padding: 56px 0 32px;
  margin-top: 80px;
  color: var(--dim);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-grid h4 { color: var(--text); font-size: 13px; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: 4px 0; }
.footer-grid a { color: var(--muted); font-size: 14px; }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--divider);
  padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: var(--dim);
}

/* ============ Utility ============ */
.spacer-sm { height: 16px; }
.spacer { height: 32px; }
.spacer-lg { height: 56px; }
.text-muted { color: var(--muted); }
.text-dim { color: var(--dim); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
