/* Uurwerk — uurwerk.muliphen.nl
   Plain CSS, no build step. Light/dark follows the OS.
   Fonts are self-hosted (Inter, Instrument Serif — both SIL OFL). */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  /* From the Letter logo: cream tile, ink letter */
  --bg: #faf8f3;
  --bg-muted: #f3efe6;
  --card: #ffffff;
  --fg: #22262b;
  --fg-muted: #6b6f75;
  --border: #e6e1d6;
  --accent: #2563eb;            /* insert-mode blue from the app */
  --accent-soft: #dbe6fd;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(34 38 43 / .05), 0 12px 40px rgb(34 38 43 / .08);
  --max: 1120px;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* From the Night logo: slate tile, cream letter */
    --bg: #161c22;
    --bg-muted: #1f2933;
    --card: #1b232b;
    --fg: #efe9dc;
    --fg-muted: #a3a8ad;
    --border: #2c3640;
    --accent: #5b8def;
    --accent-soft: #1e2d4a;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 12px 40px rgb(0 0 0 / .45);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
::selection { background: var(--accent); color: #fff; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 17px; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--fg-muted); }
.nav a:hover { color: var(--fg); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--bg); }
.nav .lang { border: 1px solid var(--border); border-radius: 6px; padding: 1px 8px; font-size: 13px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px;
  border-radius: 9px; border: 1px solid var(--border);
  font: inherit; font-size: 15px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  background: var(--card); color: var(--fg);
  transition: opacity .15s, background .15s, transform .15s;
}
.btn:hover { background: var(--bg-muted); }
.btn-primary { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn-primary:hover { background: var(--fg); opacity: .88; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn kbd { background: transparent; border-color: currentColor; opacity: .55; }

/* Type */
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
h1 { font-size: clamp(2.9rem, 7vw, 5.2rem); line-height: 1; margin: 0 0 22px; }
h2 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); line-height: 1.05; margin: 0 0 14px; }
h1 em, h2 em { font-style: italic; }
h3 { font-size: 1.05rem; margin: 0 0 6px; font-weight: 600; letter-spacing: -.005em; }
.lead { font-size: 1.2rem; color: var(--fg-muted); max-width: 640px; margin: 0 auto 34px; }
.section-lead { color: var(--fg-muted); max-width: 640px; margin: 0 0 48px; font-size: 1.1rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--fg-muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; margin-bottom: 24px;
  background: var(--card);
}
.fine { font-size: 13px; color: var(--fg-muted); margin-top: 16px; }

/* Hero */
.hero { padding: 88px 0 0; text-align: center; overflow: hidden; }
.hero .app-icon { width: 92px; height: 92px; margin: 0 auto 28px; filter: drop-shadow(0 10px 24px rgb(34 38 43 / .14)); }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.shot {
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  background: var(--card); box-shadow: var(--shadow);
}
.hero-shot { margin: 64px auto -1px; max-width: 1080px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* Sections */
section { padding: 104px 0; }
.band { background: var(--bg-muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* Sheet → app */
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); padding: 26px;
}
.card p { margin: 0; color: var(--fg-muted); font-size: 15px; }
.card .num { font-family: var(--serif); font-style: italic; font-size: 2rem; line-height: 1; color: var(--fg-muted); margin-bottom: 14px; display: block; }

/* Features */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.icon {
  width: 38px; height: 38px; border-radius: 9px; border: 1px solid var(--border);
  display: grid; place-items: center; margin-bottom: 18px; background: var(--bg-muted);
}
.icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Showcase rows */
.showcase { display: grid; grid-template-columns: 1fr 1.55fr; gap: 56px; align-items: center; }
.showcase + .showcase { margin-top: 96px; }
.showcase.flip { grid-template-columns: 1.55fr 1fr; }
.showcase.flip .text { order: 2; }
.showcase h3 { font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1.1; margin: 0 0 12px; letter-spacing: 0; }
.showcase p { color: var(--fg-muted); margin: 0 0 12px; }
.showcase ul { margin: 16px 0 0; padding: 0; list-style: none; color: var(--fg-muted); font-size: 15px; }
.showcase li { padding: 6px 0 6px 24px; position: relative; }
.showcase li::before { content: "→"; position: absolute; left: 0; color: var(--fg); }

/* Keyboard */
.statusbar {
  display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
  padding: 18px 22px; font-size: 15px; color: var(--fg-muted); box-shadow: var(--shadow);
}
.statusbar span { white-space: nowrap; }
.statusbar + .statusbar { margin-top: 12px; }
kbd {
  font-family: var(--mono); font-size: 13px; color: var(--fg);
  min-width: 24px; height: 24px; padding: 0 6px; display: inline-grid; place-items: center;
  border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; background: var(--bg-muted);
  margin-right: 4px;
}
.mode { font-family: var(--mono); font-size: 12px; padding: 3px 9px; border-radius: 6px; font-weight: 600; letter-spacing: .04em; }
.mode-normal { background: var(--bg-muted); border: 1px solid var(--border); color: var(--fg); }
.mode-insert { background: var(--accent-soft); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }

/* Themes */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--bg-muted); border: 1px solid var(--border); margin-bottom: 24px; flex-wrap: wrap; }
.tabs button {
  font: inherit; font-size: 14px; border: 0; background: transparent; color: var(--fg-muted);
  padding: 6px 14px; border-radius: 7px; cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--card); color: var(--fg); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.theme-shot img { display: none; }
.theme-shot img.on { display: block; }
.logos { display: flex; gap: 18px; align-items: center; margin-top: 40px; flex-wrap: wrap; }
.logos figure { margin: 0; text-align: center; font-size: 13px; color: var(--fg-muted); }
.logos img { width: 72px; height: 72px; margin-bottom: 8px; }

/* Privacy */
.privacy { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.privacy dl { margin: 0; }
.privacy dt { font-weight: 600; margin-top: 18px; }
.privacy dt:first-child { margin-top: 0; }
.privacy dd { margin: 4px 0 0; color: var(--fg-muted); font-size: 15px; }
code { font-family: var(--mono); font-size: .88em; background: var(--bg-muted); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }

/* Pricing */
.pricing { max-width: 460px; margin: 0 auto; text-align: center; padding: 44px 36px; box-shadow: var(--shadow); }
.pricing img { width: 64px; height: 64px; margin: 0 auto 16px; }
.price { font-family: var(--serif); font-size: 4.2rem; line-height: 1; margin: 12px 0 6px; }
.price-note { font-size: 14px; color: var(--fg-muted); }
.checklist { list-style: none; padding: 0; margin: 28px 0; text-align: left; }
.checklist li { padding: 9px 0 9px 28px; position: relative; border-top: 1px solid var(--border); font-size: 15px; }
.checklist li:first-child { border-top: 0; }
.checklist li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }
.pricing .btn { width: 100%; }

/* FAQ */
.faq > * { max-width: 760px; }
details { border-bottom: 1px solid var(--border); padding: 20px 0; }
details:first-of-type { border-top: 1px solid var(--border); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--fg-muted); font-weight: 400; font-size: 1.2em; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--fg-muted); margin: 10px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 44px 0 56px; font-size: 14px; color: var(--fg-muted); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.site-footer a { color: var(--fg-muted); }
.site-footer a:hover { color: var(--fg); }
.site-footer .made { display: flex; align-items: center; gap: 10px; }
.site-footer .made img { width: 24px; height: 24px; }

/* Vim hint */
.vim-hint {
  position: fixed; right: 16px; bottom: 16px; z-index: 5; font-size: 12px; color: var(--fg-muted);
  background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px;
  display: flex; gap: 4px; align-items: center; box-shadow: var(--shadow);
}
.vim-hint kbd { height: 20px; min-width: 20px; font-size: 11px; margin: 0; }

@media (max-width: 900px) {
  .grid, .three { grid-template-columns: 1fr 1fr; }
  .showcase, .showcase.flip, .privacy { grid-template-columns: 1fr; gap: 28px; }
  .showcase.flip .text { order: 0; }
  .nav a.hide-sm { display: none; }
  .vim-hint { display: none; }
}
@media (max-width: 580px) {
  .grid, .three { grid-template-columns: 1fr; }
  section { padding: 72px 0; }
  .hero { padding-top: 56px; }
  .nav .btn { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
