/* Mektup marketing site - reuses the dashboard's "Ember Slate" design
   tokens verbatim (see web/src/styles.css) for visual continuity between
   the public site and the signed-in app. Plain CSS, no build step - a
   static marketing page has no reason to carry a bundler. */

:root {
  --radius: 0.5rem;
  --background: oklch(0.98 0.006 85);
  --foreground: oklch(0.22 0.012 60);
  --card: oklch(1 0.004 85);
  --card-foreground: oklch(0.22 0.012 60);
  --primary: oklch(0.58 0.18 42);
  --primary-foreground: oklch(0.99 0.005 85);
  --secondary: oklch(0.94 0.008 70);
  --secondary-foreground: oklch(0.22 0.012 60);
  --muted: oklch(0.95 0.007 75);
  --muted-foreground: oklch(0.48 0.015 65);
  --accent: oklch(0.93 0.015 55);
  --accent-foreground: oklch(0.2 0.01 60);
  --border: oklch(0.88 0.01 70);
  --success: oklch(0.5 0.14 155);
  --warning: oklch(0.6 0.15 80);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: oklch(0.165 0.008 60);
    --foreground: oklch(0.93 0.012 85);
    --card: oklch(0.195 0.009 60);
    --card-foreground: oklch(0.93 0.012 85);
    --primary: oklch(0.72 0.17 45);
    --primary-foreground: oklch(0.17 0.01 60);
    --secondary: oklch(0.235 0.01 60);
    --secondary-foreground: oklch(0.93 0.012 85);
    --muted: oklch(0.23 0.01 60);
    --muted-foreground: oklch(0.62 0.015 70);
    --accent: oklch(0.27 0.013 60);
    --accent-foreground: oklch(0.96 0.012 85);
    --border: oklch(0.285 0.012 60);
    --success: oklch(0.76 0.16 155);
    --warning: oklch(0.81 0.14 85);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --background: oklch(0.165 0.008 60);
  --foreground: oklch(0.93 0.012 85);
  --card: oklch(0.195 0.009 60);
  --card-foreground: oklch(0.93 0.012 85);
  --primary: oklch(0.72 0.17 45);
  --primary-foreground: oklch(0.17 0.01 60);
  --secondary: oklch(0.235 0.01 60);
  --secondary-foreground: oklch(0.93 0.012 85);
  --muted: oklch(0.23 0.01 60);
  --muted-foreground: oklch(0.62 0.015 70);
  --accent: oklch(0.27 0.013 60);
  --accent-foreground: oklch(0.96 0.012 85);
  --border: oklch(0.285 0.012 60);
  --success: oklch(0.76 0.16 155);
  --warning: oklch(0.81 0.14 85);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --background: oklch(0.98 0.006 85);
  --foreground: oklch(0.22 0.012 60);
  --card: oklch(1 0.004 85);
  --card-foreground: oklch(0.22 0.012 60);
  --primary: oklch(0.58 0.18 42);
  --primary-foreground: oklch(0.99 0.005 85);
  --secondary: oklch(0.94 0.008 70);
  --secondary-foreground: oklch(0.22 0.012 60);
  --muted: oklch(0.95 0.007 75);
  --muted-foreground: oklch(0.48 0.015 65);
  --accent: oklch(0.93 0.015 55);
  --accent-foreground: oklch(0.2 0.01 60);
  --border: oklch(0.88 0.01 70);
  --success: oklch(0.5 0.14 155);
  --warning: oklch(0.6 0.15 80);
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

code, pre, .mono { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace; }

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

img, svg { display: block; max-width: 100%; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

h1, h2, h3 { letter-spacing: -0.02em; text-wrap: balance; font-weight: 650; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); line-height: 1.15; }
h3 { font-size: 1.05rem; line-height: 1.3; }

.muted { color: var(--muted-foreground); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--background) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; background: var(--primary);
  color: var(--primary-foreground); display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-link { font-size: 14px; color: var(--muted-foreground); transition: color 150ms; }
.nav-link:hover { color: var(--foreground); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
@media (max-width: 760px) { .nav-links { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 8px; font-size: 14px; font-weight: 550;
  border: 1px solid transparent; cursor: pointer; transition: background-color 150ms, border-color 150ms, opacity 150ms;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: var(--primary-foreground); }
.btn-primary:hover { opacity: 0.92; }
.btn-outline { border-color: var(--border); color: var(--foreground); background: transparent; }
.btn-outline:hover { background: var(--accent); }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 46px; padding: 0 24px; font-size: 15px; }

/* Hero */
.hero { padding: 96px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 { margin-top: 14px; }
.hero p.lead { margin-top: 20px; font-size: 1.125rem; color: var(--muted-foreground); max-width: 46ch; }
.hero-ctas { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--muted-foreground); }

/* Terminal visual */
.terminal {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; box-shadow: 0 20px 60px -20px color-mix(in oklab, var(--foreground) 18%, transparent);
}
.terminal-bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.terminal-body { padding: 20px; font-size: 12.5px; line-height: 1.7; overflow-x: auto; }
.terminal-body .comment { color: var(--muted-foreground); }
.terminal-body .call { color: var(--primary); font-weight: 600; }
.terminal-body .str { color: var(--success); }
.terminal-body .key { color: var(--foreground); opacity: 0.85; }
.terminal-body pre { white-space: pre-wrap; word-break: break-word; }

/* Sections */
section { padding: 72px 0; }
.section-head { max-width: 60ch; margin-bottom: 44px; }
.section-head h2 { margin-top: 10px; }
.section-head p { margin-top: 14px; color: var(--muted-foreground); font-size: 1.05rem; }

.problem-band { background: var(--secondary); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.problem-band .wrap { max-width: 780px; text-align: left; }
.problem-band p { margin-top: 16px; font-size: 1.05rem; color: var(--muted-foreground); }
.problem-band strong { color: var(--foreground); }

/* Feature grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }
.feature-card { border: 1px solid var(--border); border-radius: 12px; padding: 22px; background: var(--card); }
.feature-icon {
  width: 36px; height: 36px; border-radius: 9px; background: var(--accent); color: var(--primary);
  display: flex; align-items: center; justify-content: center; margin-bottom: 14px;
}
.feature-card h3 { margin-bottom: 8px; }
.feature-card p { color: var(--muted-foreground); font-size: 14px; line-height: 1.6; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-left: 44px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: var(--primary); font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted-foreground); font-size: 14px; }

/* Code section */
.code-section .terminal { max-width: 720px; margin: 0 auto; }

/* Pricing */
.grid-pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid-pricing { grid-template-columns: 1fr; } }
.price-card { border: 1px solid var(--border); border-radius: 14px; padding: 28px; background: var(--card); display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.price-name { font-weight: 650; font-size: 1rem; }
.price-badge {
  display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px;
  background: var(--accent); color: var(--primary); margin-left: 8px; vertical-align: middle;
}
.price-amount { margin-top: 14px; font-size: 2.25rem; font-weight: 650; letter-spacing: -0.02em; }
.price-amount span { font-size: 0.95rem; font-weight: 500; color: var(--muted-foreground); }
.price-list { margin-top: 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.price-list li { list-style: none; display: flex; align-items: baseline; gap: 8px; font-size: 14px; color: var(--muted-foreground); }
.price-list li::before { content: '\2713'; color: var(--success); font-weight: 700; }
.price-card .btn { margin-top: 24px; width: 100%; }

/* FAQ */
.faq { max-width: 780px; }
.faq-item { border-bottom: 1px solid var(--border); padding: 20px 0; }
.faq-item h3 { font-size: 1rem; }
.faq-item p { margin-top: 8px; color: var(--muted-foreground); font-size: 14px; line-height: 1.65; }

/* Final CTA */
.cta-band { text-align: center; border-top: 1px solid var(--border); }
.cta-band .btn { margin-top: 24px; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 48px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h4 { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-foreground); margin-bottom: 12px; }
.footer-col a { display: block; font-size: 14px; color: var(--muted-foreground); padding: 4px 0; transition: color 150ms; }
.footer-col a:hover { color: var(--foreground); }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--muted-foreground); }

.theme-toggle {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: transparent;
  color: var(--muted-foreground); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.theme-toggle:hover { background: var(--accent); color: var(--foreground); }
.theme-toggle svg { width: 16px; height: 16px; }
