/* Klavette site. System fonts, no external requests. Light and dark. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --bg-raised: #ffffff;
  --text: #1d1d1f;
  --text-muted: #5b5b61;
  --line: #d9d9de;
  --accent: #1d1d1f;
  --accent-text: #ffffff;
  --focus: #0a64d6;
  --radius: 16px;
  --radius-sm: 10px;
  --gutter: 16px;
  --max: 1040px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-soft: #151517;
    --bg-raised: #1c1c1e;
    --text: #f5f5f7;
    --text-muted: #a1a1a8;
    --line: #34343a;
    --accent: #f5f5f7;
    --accent-text: #000000;
    --focus: #62a8ff;
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
}

img, svg, video { max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--accent); color: var(--accent-text);
  padding: 10px 14px; border-radius: var(--radius-sm); z-index: 10;
}
.skip-link:focus { top: var(--gutter); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { font-weight: 700; text-decoration: none; letter-spacing: -0.01em; font-size: 1.125rem; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 0.95rem; }
.site-nav a { text-decoration: none; color: var(--text-muted); padding: 6px 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }

/* Type */
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 8vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.3rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
.lead { font-size: 1.2rem; color: var(--text-muted); max-width: 40em; }
.eyebrow { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.75em; }
.muted { color: var(--text-muted); }
.small { font-size: 0.9rem; }

/* Sections */
section { padding: 56px 0; }
section.soft { background: var(--bg-soft); }
.hero { padding: 48px 0 40px; }
.grid { display: grid; gap: 16px; }
.cols-2, .cols-3 { grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .cols-2 { grid-template-columns: 1fr 1fr; }
  .cols-3 { grid-template-columns: repeat(3, 1fr); }
  .hero-grid { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 40px; }
  section { padding: 80px 0; }
}

.card { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card > :last-child { margin-bottom: 0; }

/* Buttons */
.button, button.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--accent); color: var(--accent-text);
  border: 1px solid var(--accent); border-radius: 999px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.button:hover { opacity: 0.88; }
.button.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }

/* "Coming soon" label that stands in for the App Store badge until it is live */
.coming-soon {
  display: inline-flex; align-items: center;
  min-height: 48px; padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-soft);
  color: var(--text); font-weight: 600; font-size: 0.95rem;
}

/* Demo slot and drawn keyboard */
.demo-slot {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 24px;
  padding: 20px; margin: 0;
}
.demo-slot video { width: 100%; border-radius: var(--radius); display: block; }
.demo-slot figcaption { margin-top: 12px; font-size: 0.85rem; color: var(--text-muted); }
.bar { display: flex; gap: 6px; margin-bottom: 8px; }
.bar span { flex: 1; text-align: center; padding: 9px 4px; border-radius: 10px; background: var(--bg-raised); border: 1px solid var(--line); font-size: 0.95rem; }
.bar span.on { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
.strip { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.strip span { text-align: center; padding: 18px 0; border-radius: 8px; background: var(--bg-raised); border: 1px solid var(--line); font-size: 0.6rem; font-weight: 600; letter-spacing: 0.02em; }
@media (min-width: 420px) { .strip span { font-size: 0.72rem; } }
.strip span.tap { background: var(--text-muted); color: var(--bg); border-color: var(--text-muted); }

/* Steps */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 16px; }
.steps li { counter-increment: step; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 22px 70px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 20px; top: 20px; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-weight: 700; }
.steps li > :last-child { margin-bottom: 0; }
.steps h3 { margin-bottom: 0.3em; }

/* Plans */
.plans { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.plan.best { border: 2px solid var(--accent); }
.plan .price { font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.plan .price small { display: block; font-size: 0.85rem; font-weight: 400; color: var(--text-muted); letter-spacing: 0; margin-top: 4px; }
.plan .tag { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-text); margin-bottom: 10px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 480px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; }

/* FAQ */
details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; min-height: 28px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--text-muted); }
details[open] summary::after { content: "\2212"; }
details > :not(summary) { margin-top: 10px; }
details > :last-child { margin-bottom: 0; }

/* Forms */
form.notify { display: grid; gap: 10px; max-width: 460px; }
form.notify label { font-weight: 600; }
form.notify .row { display: flex; gap: 10px; flex-wrap: wrap; }
input[type="email"], input[type="text"] {
  flex: 1 1 220px; min-height: 48px; padding: 0 16px; font: inherit; color: var(--text);
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 999px;
}
input[type="email"]::placeholder { color: var(--text-muted); }
.form-note { min-height: 1.5em; font-size: 0.95rem; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Prose pages */
.prose { padding: 40px 0 72px; }
.prose h1 { font-size: clamp(2rem, 6vw, 2.8rem); }
.prose h2 { font-size: 1.5rem; margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }
.prose .meta { color: var(--text-muted); font-size: 0.95rem; }
.toc { background: var(--bg-soft); border-radius: var(--radius); padding: 16px 22px; margin: 24px 0; }
.toc ol { margin: 0; }
code, kbd { font-family: var(--font-mono); font-size: 0.9em; background: var(--bg-soft); border-radius: 6px; padding: 1px 6px; }
.callout { border-left: 4px solid var(--accent); background: var(--bg-soft); padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.2em 0; }
.callout > :last-child { margin-bottom: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 0.92rem; color: var(--text-muted); }
.site-footer .wrap { display: grid; gap: 14px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* Spacing helpers (no inline styles: the CSP forbids them) */
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-28 { margin-top: 28px; }
caption { text-align: left; padding-bottom: 8px; }
