/* AI Letting — landing page styles. Mobile-first; no build step. */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* DESIGN.md tokens — light */
  --canvas: #ffffff;
  --surface: #f6f8fc;
  --card: #ffffff;
  --hairline: #e3e8f0;
  --hairline-soft: #eef2f8;
  --ink: #0b1220;
  --body: #334155;
  --muted: #64748b;
  --primary: #0b1220;
  --primary-hover: #1b2740;
  --on-primary: #ffffff;
  --accent: #2563eb;
  --accent-soft: #eaf1ff;
  --sky: #38bdf8;
  --ok: #047857; --ok-bg: #e7f6f0;
  --warn: #b45309; --warn-bg: #fdf2e3;
  --bad: #b91c1c; --bad-bg: #fdecec;
  --info: #1d4ed8; --info-bg: #eaf1ff;

  /* Dark navy bands (footer, final call to action) are navy in both modes */
  --band: #0b1220;
  --band-line: #24314f;
  --on-band: #f1f5f9;
  --on-band-muted: #b6c2d9;
  --band-accent: #60a5fa;

  --r-card: 12px;
  --r-control: 8px;
  --r-pill: 999px;
  --shadow: 0 1px 2px rgba(11, 18, 32, .05), 0 8px 24px rgba(11, 18, 32, .08);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0b1220;
    --surface: #0e1628;
    --card: #121c31;
    --hairline: #24314f;
    --hairline-soft: #1a2640;
    --ink: #f1f5f9;
    --body: #cbd5e1;
    --muted: #94a3b8;
    --primary: #f1f5f9;
    --primary-hover: #ffffff;
    --on-primary: #0b1220;
    --accent: #60a5fa;
    --accent-soft: #15254a;
    --sky: #7dd3fc;
    --ok: #6ee7b7; --ok-bg: #0f2e26;
    --warn: #fbbf24; --warn-bg: #33250d;
    --bad: #fca5a5; --bad-bg: #3a1618;
    --info: #93c5fd; --info-bg: #15254a;
    --band: #070d19;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; color-scheme: light dark; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
  background: var(--surface);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--primary); color: var(--on-primary);
  padding: 10px 14px; border-radius: var(--r-control); font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--on-primary); }

/* ---------- Logo (inline SVG mark + wordmark) ---------- */
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 20px; letter-spacing: -0.02em; line-height: 1;
  text-decoration: none;
}
.logo svg { width: 30px; height: 30px; flex: none; }
.logo .ai { color: var(--accent); }
.logo .letting { color: var(--sky); font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 600; font-size: 14px; line-height: 1.2;
  min-height: 44px; padding: 9px 16px;
  border: 1px solid transparent; border-radius: var(--r-control);
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--hairline); }
.btn-secondary:hover { border-color: var(--muted); color: var(--ink); }
.btn-accent { background: #2563eb; color: #ffffff; }
.btn-accent:hover { background: #1d4ed8; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.btn:disabled, .btn[aria-busy="true"] { opacity: .65; cursor: progress; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header { background: var(--canvas); border-bottom: 1px solid var(--hairline); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }

/* ---------- Badge / eyebrow ---------- */
.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--info-bg); color: var(--info);
  font-size: 12px; font-weight: 600;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-dark { background: rgba(96, 165, 250, .14); color: var(--band-accent); }
.hero-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }

/* ---------- Hero ---------- */
.hero { background: var(--surface); padding: 40px 0 56px; }
.hero-grid { display: grid; gap: 40px; }
.hero h1 {
  margin-top: 16px;
  font-size: clamp(30px, 7.5vw, 48px);
  font-weight: 700; line-height: 1.1;
}
.hero h1 span { color: var(--accent); }
.lede { margin-top: 16px; font-size: 17px; color: var(--muted); max-width: 36rem; }
.hero .waitlist-form { margin-top: 28px; max-width: 34rem; }

/* Hero illustration */
.hero-visual { display: flex; justify-content: center; }
.preview-card {
  width: 100%; max-width: 420px;
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: 16px; box-shadow: var(--shadow); padding: 20px;
}
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.preview-title { font-weight: 700; color: var(--ink); }
.preview-tag {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); background: var(--surface); padding: 3px 8px; border-radius: 6px;
}
.preview-list { list-style: none; }
.preview-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 0; border-top: 1px solid var(--hairline-soft); font-size: 14px;
}
.pl { flex: 1; min-width: 0; color: var(--ink); font-weight: 500; }
.pi { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.pi-ok { background: var(--ok); }
.pi-warn { background: var(--warn); }
.chip { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap; }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.preview-foot { margin-top: 12px; font-size: 12px; color: var(--muted); }

/* ---------- Forms ---------- */
.form-label {
  /* Visually hidden by default (waitlist forms have a clear placeholder + button) */
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.form-label.is-visible {
  position: static; width: auto; height: auto; margin: 0 0 6px; overflow: visible;
  clip: auto; white-space: normal; display: block; font-weight: 600; font-size: 13px; color: var(--ink);
}

.input-row { display: flex; flex-direction: column; gap: 10px; }

input[type="email"], input[type="text"], textarea {
  width: 100%; font: inherit; font-size: 16px;
  color: var(--ink); background: var(--canvas);
  border: 1px solid var(--hairline); border-radius: var(--r-control);
  padding: 10px 12px; min-height: 44px;
}
textarea { resize: vertical; min-height: 130px; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus-visible, textarea:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); border-radius: var(--r-control);
}
[aria-invalid="true"] { border-color: var(--bad) !important; }

.field-error { color: var(--bad); font-size: 13px; font-weight: 600; margin-top: 6px; }
.field-error:empty, .form-status:empty { display: none; }

.form-status { margin-top: 12px; font-weight: 600; padding: 10px 14px; border-radius: var(--r-control); }
.form-status.is-success { color: var(--ok); background: var(--ok-bg); }
.form-status.is-error { color: var(--bad); background: var(--bad-bg); }

.form-note { margin-top: 12px; font-size: 12px; color: var(--muted); }

.ts-container:empty { display: none; }
.ts-container { margin-top: 10px; max-width: 100%; overflow: hidden; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; background: var(--surface); }
.section-soft { background: var(--canvas); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.section h2 { margin-top: 10px; font-size: clamp(24px, 5.5vw, 32px); font-weight: 700; }
.section-intro { margin-top: 14px; font-size: 16px; color: var(--muted); max-width: 40rem; }

/* Problem */
.problem-grid { list-style: none; display: grid; gap: 14px; margin-top: 32px; }
.problem-card {
  background: var(--card); border: 1px solid var(--hairline);
  border-radius: var(--r-card); padding: 20px;
}
.problem-card h3 { font-size: 16px; font-weight: 600; }
.problem-card p { margin-top: 6px; color: var(--muted); }

/* Features */
.feature-grid { list-style: none; display: grid; gap: 16px; margin-top: 32px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--r-card); padding: 24px;
}
.feature-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--r-card);
  background: var(--accent-soft); color: var(--accent);
}
.feature-card h3 { margin-top: 16px; font-size: 16px; font-weight: 600; }
.feature-card p { margin-top: 8px; color: var(--muted); }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tag-list li {
  font-size: 12px; font-weight: 600; color: var(--info);
  background: var(--info-bg); padding: 4px 10px; border-radius: var(--r-pill);
}

.also {
  margin-top: 24px; padding: 20px 24px;
  background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-card);
  display: flex; flex-direction: column; gap: 12px;
}
.also-title { font-weight: 600; color: var(--ink); }
.also-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); }
.also-list li { display: inline-flex; align-items: center; gap: 8px; }
.also-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sky); flex: none; }

/* Steps */
.steps { list-style: none; display: grid; gap: 16px; margin-top: 32px; }
.step { background: var(--card); border: 1px solid var(--hairline); padding: 24px; border-radius: var(--r-card); }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary); font-weight: 700;
}
.step h3 { margin-top: 14px; font-size: 16px; font-weight: 600; }
.step p { margin-top: 6px; color: var(--muted); }

/* Final CTA (dark navy band) */
.cta { background: var(--band); color: var(--on-band-muted); }
.cta h2 { color: var(--on-band); }
.cta-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.cta h2 { margin-top: 16px; max-width: 34rem; }
.cta .section-intro { color: var(--on-band-muted); margin-left: auto; margin-right: auto; }
.cta .waitlist-form { margin-top: 28px; width: 100%; max-width: 34rem; text-align: left; }
.cta input[type="email"] { background: #121c31; border-color: var(--band-line); color: #f1f5f9; }
.cta input::placeholder { color: #94a3b8; }
.cta input:focus-visible { border-color: var(--band-accent); box-shadow: 0 0 0 3px rgba(96, 165, 250, .25); }
.cta .field-error { color: #fca5a5; }
.cta .form-status.is-success { color: #6ee7b7; background: rgba(110, 231, 183, .12); }
.cta .form-status.is-error { color: #fca5a5; background: rgba(252, 165, 165, .12); }
.cta :focus-visible { outline-color: var(--band-accent); }

/* ---------- Footer (dark navy) ---------- */
.site-footer { background: var(--band); color: var(--on-band-muted); border-top: 1px solid var(--band-line); padding: 32px 0; }
.footer-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.site-footer .logo .ai { color: var(--band-accent); }
.site-footer .logo .letting { color: #7dd3fc; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: var(--on-band); font-weight: 600; text-decoration: none; }
.footer-links a:hover { color: #7dd3fc; text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--band-accent); }
.copyright { font-size: 13px; }

/* ---------- Contact dialog ---------- */
.contact-dialog {
  width: calc(100% - 24px); max-width: 520px; max-height: calc(100% - 24px);
  padding: 0; border: 1px solid var(--hairline); border-radius: 16px;
  color: var(--body); background: var(--card); box-shadow: var(--shadow);
}
.contact-dialog::backdrop { background: rgba(11, 18, 32, .6); }
.contact-form { padding: 22px 20px 24px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-head h2 { font-size: 20px; font-weight: 700; }
.dialog-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-right: -8px;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
}
.dialog-close:hover { background: var(--surface); }
.dialog-intro { margin-top: 6px; color: var(--muted); }
.field { margin-top: 16px; }
.contact-form .btn-block { margin-top: 16px; }

/* ---------- Privacy page ---------- */
.prose { padding: 48px 0 72px; background: var(--canvas); }
.prose .container { max-width: 760px; }
.prose h1 { font-size: clamp(28px, 6vw, 32px); font-weight: 700; }
.prose .updated { margin-top: 10px; color: var(--muted); }
.prose h2 { margin-top: 40px; font-size: 20px; font-weight: 700; }
.prose h3 { margin-top: 20px; font-size: 16px; font-weight: 600; }
.prose p, .prose ul { margin-top: 12px; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-top: 6px; }
.prose li::marker { color: var(--accent); }
.prose .placeholder { background: var(--warn-bg); color: var(--warn); padding: 0 4px; border-radius: 4px; font-weight: 700; }
.prose .lead { font-size: 17px; color: var(--muted); margin-top: 16px; }

/* ---------- Larger screens ---------- */
@media (min-width: 560px) {
  .input-row { flex-direction: row; }
  .input-row input { flex: 1; min-width: 0; }
  .problem-grid { grid-template-columns: 1fr 1fr; }
  .contact-form { padding: 28px; }
}

@media (min-width: 768px) {
  .container { padding: 0 32px; }
  .site-header .container { min-height: 72px; }
  .logo { font-size: 22px; }
  .logo svg { width: 32px; height: 32px; }
  .section { padding: 88px 0; }
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .feature-card { padding: 28px; }
  .also { flex-direction: row; align-items: center; gap: 24px; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 960px) {
  .hero { padding: 72px 0 96px; }
  .hero-grid { grid-template-columns: 1.15fr .85fr; align-items: center; gap: 56px; }
  .hero-visual { justify-content: flex-end; }
  .problem-grid { grid-template-columns: repeat(4, 1fr); }
}
.sprite { position: absolute; }
