/* Keyseal's site: white paper, ink, and sealing wax used only where something is typed or can be clicked. */
:root {
    --paper: #ffffff;
    --ink: #1b1817;
    --quiet: #6e6662;
    --rule: #e4dfdc;
    --wax: #8e2a2a;
    --wash: #f6f3f2;
    --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --measure: 62ch;
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --paper: #161413;
        --ink: #ece7e4;
        --quiet: #a39b97;
        --rule: #34302e;
        --wax: #e86b61;
        --wash: #201d1c;
    }
}

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

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 17px/1.55 var(--sans);
    text-rendering: optimizeLegibility;
}

a { color: var(--wax); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--wax); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -999px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { left: 16px; top: 12px; background: var(--paper); padding: 6px 10px; z-index: 2; }

/* Header and footer: one line each, quiet. */
.top, .bottom, main { max-width: 960px; margin: 0 auto; padding: 0 28px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 22px; padding-bottom: 22px; }
.mark { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.top nav, .bottom nav { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; }
.top nav a, .bottom nav a { color: var(--quiet); text-decoration: none; }
.top nav a:hover, .bottom nav a:hover { color: var(--ink); }
.top .nav-download { color: var(--wax); font-weight: 600; }
.bottom { margin-top: 96px; padding-top: 28px; padding-bottom: 48px; border-top: 1px solid var(--rule); }
.fine { color: var(--quiet); font-size: 13px; max-width: var(--measure); }

/* Type. Headings are set tight and heavy; everything reads at one measure. */
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.025em; margin: 0; }
h1 { font-size: clamp(38px, 6.2vw, 64px); font-weight: 800; letter-spacing: -0.035em; max-width: 15ch; }
h2 { font-size: 27px; font-weight: 750; margin-top: 64px; }
h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
p, ul, ol, table, form, details { max-width: var(--measure); }
p { margin: 14px 0 0; }
.lede { font-size: 20px; line-height: 1.5; color: var(--quiet); margin-top: 22px; }
code, kbd, .trigger { font-family: var(--mono); font-size: 0.92em; }
.trigger { color: var(--wax); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }

/* The hero: a line of someone's mail, where a trigger turns into its text. */
.hero { padding-top: 56px; }
.typing {
    margin-top: 44px;
    max-width: 640px;
    border-left: 3px solid var(--rule);
    padding: 6px 0 6px 20px;
    font-size: clamp(19px, 2.6vw, 24px);
    line-height: 1.45;
    min-height: 3em;
}
.typing .typed { white-space: pre-wrap; }
.typing .marked { font-family: var(--mono); color: var(--wax); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
.typing .caret { display: inline-block; width: 2px; height: 1.1em; vertical-align: -0.18em; background: var(--ink); margin-left: 1px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .typing .caret { animation: none; } }

/* Promises: each claim beside what proves it. */
.promises { list-style: none; padding: 0; margin: 40px 0 0; max-width: 760px; }
.promises li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 8px 32px; padding: 22px 0; border-top: 1px solid var(--rule); }
.promises li:last-child { border-bottom: 1px solid var(--rule); }
.promises p { margin: 0; color: var(--quiet); }
@media (max-width: 640px) { .promises li { grid-template-columns: 1fr; } }

/* Screenshots: taken at 2×, shown at their own size or narrower. The shadow is in the picture. */
.shot { margin: 0; }
.shot img { display: block; max-width: 100%; height: auto; }
.shot figcaption { color: var(--quiet); font-size: 15px; margin-top: 2px; }
.hero-shot { margin-top: 40px; }
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px 36px; align-items: end; margin-top: 28px; }
.shots.pair { max-width: 760px; margin-top: 56px; }
.icon { display: block; }

/* Forms. */
form { margin-top: 22px; }
.field { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
form.feedback label { display: block; font-weight: 600; margin: 18px 0 6px; }
form.feedback details { margin-top: 18px; }
form.feedback summary { cursor: pointer; color: var(--wax); font-weight: 600; }
textarea {
    font: inherit;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 10px 12px;
    width: 100%;
    max-width: var(--measure);
    box-sizing: border-box;
    resize: vertical;
}
form.feedback input[type="email"] { width: 100%; max-width: var(--measure); box-sizing: border-box; }
textarea:focus { border-color: var(--wax); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--wax) 22%, transparent); }
input[type="email"] {
    font: inherit;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 8px;
    padding: 10px 12px;
    min-width: 0;
    flex: 1 1 260px;
}
input[type="email"]:focus { border-color: var(--wax); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--wax) 22%, transparent); }
button, .button {
    font: inherit;
    font-weight: 650;
    color: #fff;
    background: var(--wax);
    border: 0;
    border-radius: 8px;
    padding: 10px 18px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}
@media (prefers-color-scheme: dark) { button, .button { color: #1b0f0e; } }
button:disabled { opacity: 0.55; cursor: default; }
.button.plain { background: transparent; color: var(--wax); border: 1px solid var(--rule); }
.note { color: var(--quiet); font-size: 15px; }
.status { min-height: 1.5em; margin-top: 12px; font-weight: 550; }
.status.error { color: var(--wax); }
.cf-turnstile { margin-top: 12px; }
.waitlist { margin-top: 72px; padding: 28px 30px 30px; background: var(--wash); border-radius: 14px; max-width: 760px; }
.waitlist h2 { margin-top: 0; }

/* Pricing: a real comparison, so a real table. */
table { border-collapse: collapse; width: 100%; margin-top: 28px; font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--rule); }
thead th { font-size: 15px; color: var(--quiet); font-weight: 600; }
tbody th { font-weight: 600; width: 26%; }
.pricing-table { max-width: 820px; }
.pricing-table thead th:nth-child(3) { color: var(--ink); }
.price { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; display: block; color: var(--ink); }

/* Long pages: terms, privacy, what Keyseal stores. */
.doc { padding-top: 40px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); max-width: none; }
.doc h2 { font-size: 22px; margin-top: 44px; }
.doc h3 { font-size: 17px; margin-top: 26px; }
.doc h2 + h3 { margin-top: 16px; }
.doc h3 + p { margin-top: 6px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-top: 8px; }
.doc table td, .doc table th { font-size: 15px; }
/* Tested apps: five columns, so wider than prose, and scrolled sideways on a phone. */
.scroll { overflow-x: auto; max-width: 920px; }
.scroll table { max-width: none; min-width: 640px; }
.tested tbody th { width: 22%; }
pre { font-family: var(--mono); font-size: 13px; line-height: 1.5; white-space: pre-wrap; background: var(--wash); padding: 14px 16px; border-radius: 8px; max-width: 760px; overflow-x: auto; }
details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 600; }
.release { border-top: 1px solid var(--rule); margin-top: 32px; padding-top: 8px; }
.release h2 { margin-top: 16px; }

/* The thank-you page's license. */
.license { margin-top: 28px; }
.license .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
