/* KeyGhost site. One stylesheet, no framework, strictly black and white (Linear /
   Notion feel): the only "colour" is contrast. Dark or light follows the OS via
   prefers-color-scheme. Motion lives in app.js and is skipped entirely when the
   visitor asks for reduced motion. */
:root {
  --bg: #ffffff; --bg-2: #fafafa; --fg: #0a0a0a; --fg-2: #3a3a3a; --muted: #737373;
  --line: #ebebeb; --line-2: #d9d9d9; --card: #ffffff; --key: #ffffff; --key-edge: #d4d4d4;
  --invert-bg: #0a0a0a; --invert-fg: #ffffff;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 12px; --max: 1080px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #08090a; --bg-2: #0d0e0f; --fg: #f5f5f5; --fg-2: #c9c9c9; --muted: #8a8a8a;
          --line: #1c1d1f; --line-2: #2a2b2e; --card: #0f1011; --key: #161718; --key-edge: #2e2f32;
          --invert-bg: #f5f5f5; --invert-fg: #08090a; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; }
a { color: inherit; }
::selection { background: var(--fg); color: var(--bg); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }
.label { font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Keycaps, used inline in text and large in the demos. .down is the pressed state. */
kbd, .key { display: inline-flex; align-items: center; justify-content: center; min-width: 1.9em; height: 1.75em;
  padding: 0 .45em; font: 500 .82em/1 var(--mono); color: var(--fg); background: var(--key);
  border: 1px solid var(--key-edge); border-bottom-width: 2px; border-radius: 6px;
  transition: transform .08s ease, border-bottom-width .08s ease, background .08s ease; vertical-align: .08em; }
.key.lg { font-size: 15px; min-width: 42px; height: 40px; border-radius: 9px; border-bottom-width: 3px; }
.key.down { transform: translateY(2px); border-bottom-width: 1px; background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* Header */
header.top { position: sticky; top: 0; z-index: 10; backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 15.5px; letter-spacing: -.01em; text-decoration: none; }
.brand svg { width: 24px; height: 24px; }
nav.links { display: flex; gap: 26px; align-items: center; font-size: 14px; }
nav.links a { text-decoration: none; color: var(--muted); transition: color .15s; }
nav.links a:hover { color: var(--fg); }
@media (max-width: 680px) { nav.links a:not(.btn) { display: none; } }

/* Buttons: solid inverted pill and an outlined one. */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 999px;
  font-weight: 500; font-size: 15px; text-decoration: none; border: 1px solid transparent; transition: opacity .15s, background .15s; }
.btn.primary { background: var(--invert-bg); color: var(--invert-fg); }
.btn.primary:hover { opacity: .86; }
.btn.ghost { border-color: var(--line-2); color: var(--fg); }
.btn.ghost:hover { background: var(--bg-2); }
nav.links .btn { height: 32px; padding: 0 14px; font-size: 13.5px; color: var(--invert-fg); }
nav.links .btn:hover { color: var(--invert-fg); }

/* Hero */
.hero { padding: 72px 0 24px; text-align: center; position: relative; overflow: hidden; }
.hero::before { /* faint grid that fades out, the only decoration */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%); }
.hero > * { position: relative; }
.hero h1 { font-size: clamp(40px, 7vw, 76px); line-height: 1.02; letter-spacing: -.045em; font-weight: 650; margin: 0 0 20px; min-height: 2.04em; }
.caret { display: inline-block; width: .07em; height: .9em; background: var(--fg); margin-left: .04em; vertical-align: -.08em; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero p.lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 600px; margin: 0 auto 32px; letter-spacing: -.01em; }
.cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.fine { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* The paste demo: a fake console window whose field refuses ⌘V, then KeyGhost types
   the clipboard in. Plays on its own; on desktop the visitor can drive it with the
   real keys. */
.stage { margin: 48px auto 0; max-width: 760px; text-align: left; }
.window { border: 1px solid var(--line-2); border-radius: 14px; background: var(--card); overflow: hidden;
  box-shadow: 0 1px 0 var(--line), 0 30px 80px -40px rgba(0,0,0,.45); }
.window .bar { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.window .lights { display: flex; gap: 6px; }
.window .lights i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--line-2); }
.window .title { flex: 1; text-align: center; font: 12px var(--mono); color: var(--muted); margin-right: 48px; }
.console { padding: 26px 26px 30px; font: 14px/1.7 var(--mono); }
.console .dim { color: var(--muted); }
.field { margin-top: 10px; display: flex; align-items: center; min-height: 46px; padding: 0 14px; border: 1px solid var(--line-2);
  border-radius: 8px; background: var(--bg); position: relative; white-space: pre; overflow: hidden; }
.field.focus { border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 10%, transparent); }
.field.shake { animation: shake .36s; }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.field .typed { color: var(--fg); }
.field .caret { height: 1.15em; width: 2px; vertical-align: middle; }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 4px 0; }
.combo { display: flex; align-items: center; gap: 6px; }
.combo .plus { color: var(--muted); font-size: 13px; }
.combo-group { display: flex; align-items: center; gap: 22px; }
.status { font: 12.5px var(--mono); color: var(--muted); min-height: 1.4em; }
.status b { color: var(--fg); font-weight: 500; }
.hint { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 18px; }
@media (max-width: 640px) { .hint.desk { display: none; } }

/* Sections */
section { padding: 110px 0; scroll-margin-top: 58px; }
section + section { border-top: 1px solid var(--line); }
.head { max-width: 640px; margin: 0 0 52px; }
.head.center { margin-left: auto; margin-right: auto; text-align: center; }
h2 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -.035em; line-height: 1.08; font-weight: 650; margin: 0 0 14px; }
.head p { color: var(--muted); margin: 0; font-size: 17px; }

/* Clipboard → keys: the copied string breaks into keycaps that fire one by one. */
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 14px; }
.flow .step { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--card); min-height: 168px; display: flex; flex-direction: column; }
.flow .step h3 { margin: 0 0 14px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.flow .arrow { align-self: center; color: var(--muted); font-family: var(--mono); }
.flow .step p { margin: auto 0 0; color: var(--muted); font-size: 14px; }
.clip { font: 13.5px var(--mono); padding: 10px 12px; border: 1px dashed var(--line-2); border-radius: 8px; color: var(--fg); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.keys { display: flex; flex-wrap: wrap; gap: 5px; }
.keys .key { font-size: 12.5px; min-width: 26px; height: 28px; opacity: .35; }
.keys .key.on { opacity: 1; }
.out { font: 13.5px var(--mono); padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; min-height: 42px; white-space: pre; overflow: hidden; }
@media (max-width: 820px) { .flow { grid-template-columns: 1fr; } .flow .arrow { transform: rotate(90deg); justify-self: center; } }

/* Use cases: a bordered grid like a spec sheet. */
.cases { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.case { padding: 30px; border-bottom: 1px solid var(--line); background: var(--card); }
.case:nth-child(odd) { border-right: 1px solid var(--line); }
.case:nth-last-child(-n+2) { border-bottom: 0; }
.case h3 { margin: 0 0 8px; font-size: 19px; letter-spacing: -.02em; font-weight: 600; }
.case p { margin: 0; color: var(--muted); font-size: 15px; }
.case .eg { margin-top: 14px; font: 12.5px/1.6 var(--mono); color: var(--fg-2); }
@media (max-width: 760px) { .cases { grid-template-columns: 1fr; } .case:nth-child(odd) { border-right: 0; } .case:nth-last-child(2) { border-bottom: 1px solid var(--line); } }

/* Real clip */
.video { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; }
.video video { width: 100%; height: 100%; display: block; object-fit: cover; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); list-style: none; margin: 0; padding: 0; }
.features li { padding: 26px 26px 26px 0; border-bottom: 1px solid var(--line); }
.features li:not(:nth-child(3n+1)) { padding-left: 26px; border-left: 1px solid var(--line); }
.features h3 { margin: 0 0 6px; font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.features p { margin: 0; color: var(--muted); font-size: 14.5px; }
@media (max-width: 820px) { .features { grid-template-columns: 1fr; } .features li, .features li:not(:nth-child(3n+1)) { padding: 22px 0; border-left: 0; } }

/* Pricing */
.price { max-width: 420px; margin: 0 auto; border: 1px solid var(--line-2); border-radius: 16px; padding: 34px; background: var(--card); }
.price .amount { font-size: 60px; font-weight: 650; letter-spacing: -.05em; line-height: 1; }
.price .amount small { font-size: 15px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.price ul { list-style: none; padding: 0; margin: 24px 0 28px; border-top: 1px solid var(--line); }
.price li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; display: flex; gap: 10px; }
.price li::before { content: "→"; font-family: var(--mono); color: var(--muted); }
.price .btn { width: 100%; justify-content: center; }
.price .fine { text-align: center; }

/* FAQ: native <details>, no JS. */
.faq { max-width: 760px; margin: 0 auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 2px; }
.faq summary { cursor: pointer; font-weight: 500; font-size: 16.5px; list-style: none; display: flex; justify-content: space-between; gap: 16px; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--muted); transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

.final { text-align: center; }
.final h2 { min-height: 1.1em; margin-bottom: 28px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 44px; font-size: 13.5px; color: var(--muted); }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--fg); }

/* Legal pages */
.legal { max-width: 700px; padding: 64px 24px 90px; }
.legal h1 { font-size: 40px; letter-spacing: -.04em; font-weight: 650; margin: 0 0 6px; }
.legal .updated { color: var(--muted); margin: 0 0 36px; font-size: 14px; font-family: var(--mono); }
.legal h2 { font-size: 20px; letter-spacing: -.02em; margin: 34px 0 8px; }
.legal p, .legal li { color: var(--fg-2); }
.legal a { text-underline-offset: 3px; }

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

/* Settings demo: a mock of KeyGhost's Settings that drives a fake French server
   console. Native controls (select, range, checkbox) restyled in black and white. */
.opts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .opts { grid-template-columns: 1fr; } }
.settings .rows { padding: 6px 22px 10px; }
.settings .row { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); cursor: default; }
.settings .row:last-child { border-bottom: 0; }
.settings .name { font-weight: 600; font-size: 14.5px; letter-spacing: -.01em; }
.settings .why { grid-column: 1 / -1; color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.settings select { font: inherit; font-size: 13.5px; color: var(--fg); background: var(--bg); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 6px 30px 6px 10px; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg) 50%), linear-gradient(135deg, var(--fg) 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.settings .ctl { display: flex; align-items: center; gap: 10px; }
.settings output { font: 12.5px var(--mono); color: var(--fg-2); min-width: 86px; text-align: right; }
.settings input[type=range] { appearance: none; width: 150px; height: 3px; border-radius: 3px; background: var(--line-2); cursor: pointer; }
.settings input[type=range]::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--fg); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--fg); }
.settings input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--fg); border: 3px solid var(--bg); }
.settings .toggle { cursor: pointer; }
.settings .toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 38px; height: 22px; border-radius: 11px; background: var(--line-2); position: relative; transition: background .15s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); transition: transform .15s; }
.toggle input:checked + .switch { background: var(--fg); }
.toggle input:checked + .switch::after { transform: translateX(16px); }
.toggle input:focus-visible + .switch, .settings select:focus-visible, .settings input[type=range]:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
.target .console { min-height: 168px; }
.verdict { margin-top: 12px; font: 12.5px var(--mono); color: var(--muted); min-height: 1.5em; }
.verdict b { color: var(--fg); font-weight: 500; }
.pressed { margin-top: 14px; }
.pressed .cap { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.pressed .keys { display: flex; flex-wrap: wrap; gap: 6px; min-height: 32px; }
.pressed .key { font-size: 12px; height: 30px; min-width: 30px; }
.pressed .combo-k { display: inline-flex; align-items: center; gap: 4px; }
.pressed .combo-k .plus { color: var(--muted); font-size: 11px; }
.features.small { grid-template-columns: repeat(4, 1fr); margin-top: 56px; }
.features.small li:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
.features.small li + li { padding-left: 22px; border-left: 1px solid var(--line); }
@media (max-width: 820px) { .features.small { grid-template-columns: 1fr 1fr; } .features.small li + li { padding-left: 0; border-left: 0; } }

/* Guides: long-form answers. The short answer comes first, in a bordered block,
   so a reader (or an assistant quoting the page) gets it without scrolling. */
.guide { max-width: 740px; padding: 56px 24px 90px; }
.guide h1 { font-size: clamp(30px, 4.4vw, 42px); line-height: 1.1; letter-spacing: -.04em; font-weight: 650; margin: 0 0 10px; }
.guide .updated { color: var(--muted); margin: 0 0 28px; font-size: 13.5px; font-family: var(--mono); }
.guide .answer { border: 1px solid var(--line-2); border-radius: 14px; padding: 18px 22px; background: var(--bg-2); }
.guide .answer p { margin: 0; color: var(--fg); font-size: 17px; line-height: 1.6; }
.guide h2 { font-size: 22px; letter-spacing: -.02em; margin: 44px 0 12px; }
.guide p, .guide li { color: var(--fg-2); line-height: 1.7; }
.guide a { text-underline-offset: 3px; }
.guide code { font: .9em var(--mono); background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
.guide ol.steps { padding-left: 22px; }
.guide ol.steps li { margin: 6px 0; padding-left: 4px; }
.guide table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 8px 0; }
.guide th, .guide td { text-align: left; vertical-align: top; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); color: var(--fg-2); }
.guide th { color: var(--fg); font-weight: 600; }
.guide .faq { margin: 0; }
.guide-cta { margin: 48px 0 0; padding: 24px; border: 1px solid var(--line-2); border-radius: 14px; }
.guide-cta p { margin: 0 0 16px; color: var(--fg); }
.guide ul.related { padding-left: 18px; }
.guide-list { list-style: none; padding: 0; margin: 32px 0 0; border-top: 1px solid var(--line); }
.guide-list a { display: block; padding: 20px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.guide-list h2 { margin: 0 0 4px; font-size: 19px; color: var(--fg); }
.guide-list p { margin: 0; color: var(--muted); font-size: 15px; }
.guide h2.list-head { margin-top: 56px; }
.guide-list a:hover h2 { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 680px) { .guide table { font-size: 13px; } }
/* .btn sets display, which would beat the hidden attribute: hidden always wins. */
[hidden] { display: none !important; }
