/* Keen: global styles
   Derived from Guard's global.css so the three product sites share one type
   scale, header, footer and component set. Same family (Fraunces + IBM Plex
   Sans on warm paper); Keen wears the soft indigo of its app icon, beside
   Nest's teal and Guard's blue, so the products read as siblings, not twins.
   Avoid: aggressive gradients, fake 3D, oversized startup claims. */

/* ── Self-hosted fonts (latin subset) ─────────────────────────────────────
   Identical files to Nest: Fraunces (variable, full axis), IBM Plex Sans
   (static 400/500/600/700) and JetBrains Mono (static 400/500). Source:
   Fontsource, OFL-1.1. Files live in ../fonts/. */

/* Fraunces is cut to what the site uses (2026-11-17, fontTools instancer, from
   Fontsource's full-axis latin files): the upright face keeps opsz 96-144,
   wght 450-500 and SOFT 30-50 for the headings' font-variation-settings; the
   italic keeps opsz 14-24 at wght 400, SOFT 0 for the section labels and the
   colophon. WONK is fixed at 1, its default. A heading set outside those
   ranges is drawn at the nearest value, so widen the cut before using one. */

@font-face {
    font-family: "Fraunces";
    font-style: normal;
    font-display: swap;
    font-weight: 450 500;
    src: url("../fonts/fraunces-headings.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;
}
@font-face {
    font-family: "Fraunces";
    font-style: italic;
    font-display: swap;
    font-weight: 400;
    src: url("../fonts/fraunces-italic-labels.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;
}
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-display: swap;
    font-weight: 400;
    src: url("../fonts/ibm-plex-sans-latin-400-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;
}
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-display: swap;
    font-weight: 500;
    src: url("../fonts/ibm-plex-sans-latin-500-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;
}
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-display: swap;
    font-weight: 600;
    src: url("../fonts/ibm-plex-sans-latin-600-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;
}
@font-face {
    font-family: "IBM Plex Sans";
    font-style: normal;
    font-display: swap;
    font-weight: 700;
    src: url("../fonts/ibm-plex-sans-latin-700-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;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 400;
    src: url("../fonts/jetbrains-mono-latin-400-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;
}
@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-display: swap;
    font-weight: 500;
    src: url("../fonts/jetbrains-mono-latin-500-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 {
    /* Keen indigo: taken from the app icon (Company/Assets/Keen/AppIcon). */
    --indigo-800: #2f3566;
    --indigo-700: #3d4475;   /* primary */
    --indigo-600: #565e90;
    --indigo-500: #6a73a8;
    --indigo-100: #dde0f1;
    --indigo-50:  #eceef8;

    /* Ink shifted to a cool slate so it sits under the indigo accent. */
    --ink-900:  #10151f;
    --ink-800:  #1b2331;
    --ink-700:  #2b3444;
    --ink-500:  #59647a;
    --ink-400:  #7c8698;
    --ink-300:  #a6adbb;

    /* Warm paper ground, shared with the rest of the family. */
    --paper:    #eeede9;
    --paper-2:  #e6e4df;
    --paper-3:  #dcd9d2;
    --line:     #d8d4cc;
    --line-2:   #c7c2b8;
    --warn-bg:  #fbf4e6;
    --warn-ln:  #e5d5a8;

    --maxw: 1040px;
    --radius: 12px;
    --radius-sm: 8px;

    --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo,
                 Consolas, "Liberation Mono", monospace;

    --shadow-card:  0 1px 0 rgba(16,21,31,0.02), 0 1px 3px rgba(16,21,31,0.04);
    --shadow-lift:  0 6px 20px -8px rgba(16,21,31,0.18), 0 2px 6px rgba(16,21,31,0.06);
    --shadow-press: 0 1px 0 rgba(16,21,31,0.04);

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink-900);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.6;
    font-optical-sizing: auto;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection { background: var(--indigo-100); color: var(--ink-900); }

a {
    color: var(--indigo-700);
    text-decoration: none;
    border-bottom: 1px solid rgba(61,68,117, 0.25);
    transition: border-color 160ms var(--ease), color 160ms var(--ease);
}
a:hover { border-bottom-color: var(--indigo-700); color: var(--indigo-800); }

h1, h2 {
    font-family: var(--font-display);
    color: var(--ink-900);
    line-height: 1.1;
    margin: 0 0 0.5em;
    font-weight: 500;
    letter-spacing: -0.005em;
    font-variation-settings: "opsz" 96, "SOFT" 30;
}
h3, h4 {
    color: var(--ink-900);
    line-height: 1.25;
    margin: 0 0 0.4em;
    font-weight: 600;
    letter-spacing: -0.01em;
}
h1 { font-size: 2.8rem; }
h2 { font-size: 1.85rem; margin-top: 0.4em; }
h3 { font-size: 1.08rem; margin-top: 1.2em; }

p { margin: 0 0 1em; color: var(--ink-700); }

ul, ol { color: var(--ink-700); padding-left: 1.3em; }
li { margin: 0.3em 0; }

code, kbd {
    font-family: var(--font-mono);
    font-size: 0.92em;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0.05em 0.4em;
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 3rem 0;
}

/* Layout ------------------------------------------------------------ */

.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

.site-header {
    border-bottom: 1px solid var(--line);
    background: color-mix(in oklab, var(--paper) 85%, transparent);
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
}
.site-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    padding-bottom: 16px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 1.02rem;
    letter-spacing: -0.005em;
}
.brand a { border: 0; }
.brand-home {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-900);
}
.brand img { width: 26px; height: 26px; display: block; border-radius: 6px; }
.brand .albedo { color: var(--ink-400); font-weight: 500; }
.brand .keen { color: var(--ink-900); }
.brand-home:hover .keen,
.brand .albedo:hover { color: var(--indigo-700); }

.nav {
    display: flex;
    gap: 26px;
    font-size: 0.95rem;
}
.nav a {
    color: var(--ink-500);
    border-bottom: 0;
    padding: 4px 0;
    position: relative;
    transition: color 160ms var(--ease);
}
.nav a:hover { color: var(--ink-900); }
.nav a.active { color: var(--ink-900); }
.nav a.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: -2px;
    height: 2px;
    background: var(--indigo-600);
    border-radius: 2px;
}

.site-footer {
    border-top: 1px solid var(--line);
    margin-top: 5rem;
    padding: 2.4rem 0 3rem;
    background: var(--paper);
    color: var(--ink-500);
    font-size: 0.92rem;
}
.site-footer .wrap {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}
.site-footer a { color: var(--ink-700); border-bottom: 0; }
.site-footer a:hover { color: var(--indigo-700); }
.site-footer .umbrella { color: var(--ink-400); }
.site-footer a.umbrella .arrow {
    display: inline-block;
    transition: transform 200ms var(--ease);
}
.site-footer a.umbrella:hover .arrow {
    transform: translateX(2px);
}
.site-footer .social-x {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    font-size: 0.86rem;
}
.site-footer .social-x svg { display: block; }
.site-footer .colophon {
    flex-basis: 100%;
    margin: 1.4rem 0 0;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--line);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--ink-400);
    letter-spacing: 0.02em;
}
.site-footer .colophon em {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--ink-500);
    letter-spacing: 0;
}

/* Sections ---------------------------------------------------------- */

section { padding: 2rem 0; }
main > section:nth-of-type(even) { background: var(--paper-2); }

.lede {
    font-size: 1.18rem;
    color: var(--ink-700);
    max-width: 640px;
}

main { counter-reset: section; }

.eyebrow {
    counter-increment: section;
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
    font-size: 1.2rem;
    color: var(--ink-500);
    margin: 0 0 1.1em;
    display: block;
}
.eyebrow::before {
    content: "§ " counter(section, decimal-leading-zero) "  ";
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 0.86em;
    color: var(--ink-400);
    letter-spacing: 0.02em;
    margin-right: 4px;
}

/* Hero -------------------------------------------------------------- */

.hero {
    padding: 2.4rem 0 0;
    position: relative;
    overflow: hidden;
}
main > section:first-of-type { padding-top: 2.4rem; }
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at center, rgba(61,68,117,0.10) 1px, transparent 1.4px);
    background-size: 22px 22px;
    mask-image: radial-gradient(ellipse 60% 50% at 28% 18%, rgba(0,0,0,0.6), transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 28% 18%, rgba(0,0,0,0.6), transparent 72%);
    pointer-events: none;
    z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }

.hero h1 {
    font-size: 3.4rem;
    margin-bottom: 0.4em;
    font-weight: 450;
    font-variation-settings: "opsz" 144, "SOFT" 50;
}
.hero-lede {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2.5rem;
    margin: 0.6em 0 1.6rem;
}
.hero .pitch {
    font-size: 1.18rem;
    color: var(--ink-700);
    margin: 0;
    flex: 0 1 56ch;
}
.hero .pitch > p { margin: 0; }
/* The product-boundary line (spec §6.2) sits under the lede, one step quieter,
   so the hero reads as a promise followed by its limits, not one long block. */
.hero .pitch > .boundary {
    margin-top: 0.8rem;
    font-size: 0.98rem;
    color: var(--ink-500);
}
.hero .tagline {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.01em;
    color: var(--ink-500);
    margin: 0 0 0 auto;
    padding: 0;
    list-style: none;
    flex: 0 0 auto;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
}
.hero .tagline li {
    margin: 0;
    padding: 0.6rem 0;
    white-space: nowrap;
}
.hero .tagline li + li {
    border-top: 1px solid var(--line);
}

.hero-note {
    margin-top: 1.2rem;
    color: var(--ink-400);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.hero-note::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--ink-300);
}

.hero-text {
    position: relative;
    z-index: 2;
    min-width: 0;
}

/* Hero shot: the staged Keen window, floated off the paper by a layered
   shadow and a soft indigo pedestal. */
.hero-shot-wrap {
    position: relative;
    z-index: 1;
    margin-top: 3.2rem;
    padding-bottom: 4.5rem;
}
.hero-shot-wrap::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 4%;
    transform: translateX(-50%);
    width: 86%;
    height: 92%;
    background: radial-gradient(ellipse at center,
        rgba(86,94,144,0.26), rgba(86,94,144,0.09) 45%, transparent 70%);
    filter: blur(46px);
    z-index: -1;
    pointer-events: none;
}

/* ── App screenshot ─────────────────────────────────────────────────── */

.appshot { position: relative; margin: 0; }
.appshot-frame {
    line-height: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line-2);
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.5) inset,
        0 2px 6px rgba(16,21,31,0.06),
        0 18px 40px -20px rgba(16,21,31,0.30),
        0 40px 80px -36px rgba(16,21,31,0.28);
}
.appshot-frame img { width: 100%; height: auto; display: block; }
/* Buttons ----------------------------------------------------------- */

.cta-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 0.4rem;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.98rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 160ms var(--ease),
                border-color 160ms var(--ease),
                transform 160ms var(--ease),
                box-shadow 160ms var(--ease);
    font-family: inherit;
}
.btn-primary {
    background: var(--indigo-700);
    color: #fff;
    border-color: var(--indigo-700);
    box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 1px 2px rgba(16,21,31,0.12);
}
.btn-primary:hover {
    background: var(--indigo-800);
    color: #fff;
    border-color: var(--indigo-800);
    transform: translateY(-1px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 6px 16px -6px rgba(61,68,117,0.5);
}
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-press); }

.btn-secondary {
    background: #fff;
    color: var(--ink-800);
    border-color: var(--line);
    box-shadow: var(--shadow-card);
}
.btn-secondary:hover {
    border-color: var(--ink-300);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lift);
}
.btn-secondary:active { transform: translateY(0); box-shadow: var(--shadow-press); }

a.btn { border-bottom: 1px solid; }
a.btn-primary { border-bottom-color: var(--indigo-700); }
a.btn-primary:hover { border-bottom-color: var(--indigo-800); }
a.btn-secondary { border-bottom-color: var(--line); }
a.btn-secondary:hover { border-bottom-color: var(--ink-300); }

.btn .arrow {
    width: 14px;
    height: 14px;
    transition: transform 160ms var(--ease);
}
.btn:hover .arrow { transform: translateX(2px); }

/* Cards ------------------------------------------------------------- */

/* Three cards across, as on Nest (Guard pairs its four 2x2). */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 1.6rem;
}
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 22px 20px;
    box-shadow: var(--shadow-card);
    transition: transform 200ms var(--ease),
                box-shadow 200ms var(--ease),
                border-color 200ms var(--ease);
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
    border-color: var(--line-2);
}
.card .ic {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--indigo-50);
    color: var(--indigo-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.card .ic svg { width: 20px; height: 20px; }
.card h3 {
    font-size: 1.02rem;
    margin: 0 0 0.35em;
    color: var(--ink-900);
}
.card p {
    font-size: 0.95rem;
    color: var(--ink-500);
    margin: 0;
    line-height: 1.55;
}

/* Pricing card ------------------------------------------------------ */

.pricing-card {
    max-width: 560px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    padding: 28px 28px 26px;
    margin: 1.8rem 0;
    box-shadow: var(--shadow-card);
    position: relative;
}
.pricing-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(180deg, var(--indigo-100), transparent 60%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}
.pricing-card .price {
    font-size: 2rem;
    color: var(--ink-900);
    font-weight: 600;
    margin: 0.2em 0;
    letter-spacing: -0.02em;
    line-height: 1.15;
    /* Baseline-aligned flex so the note keeps its own leading: it sits beside
       the figure when it fits and drops to its own line when it doesn't,
       instead of wrapping inside the 2rem line box and tearing a gap open. */
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.45em;
    row-gap: 0.15em;
}
.pricing-card .price small {
    font-size: 0.92rem;
    color: var(--ink-500);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.5;
    max-width: 100%;
}
.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 1em 0 1.4em;
    color: var(--ink-700);
}
.pricing-card li {
    padding: 7px 0 7px 26px;
    position: relative;
    font-size: 0.96rem;
}
.pricing-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: var(--indigo-50);
    border: 1px solid var(--indigo-100);
}
.pricing-card li::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 16px;
    width: 8px;
    height: 4px;
    border-left: 1.6px solid var(--indigo-700);
    border-bottom: 1.6px solid var(--indigo-700);
    transform: rotate(-45deg);
}

/* Callout / not-a-thing block --------------------------------------- */

.callout {
    background: var(--indigo-50);
    border-left: 3px solid var(--indigo-600);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    margin: 1.2rem 0;
}
.callout p { margin: 0; color: var(--ink-700); }
.callout strong { color: var(--ink-900); }

.notice {
    background: var(--warn-bg);
    border: 1px solid var(--warn-ln);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    color: var(--ink-700);
    font-size: 0.96rem;
}
.notice strong { color: var(--ink-900); }

/* Demo video link --------------------------------------------------- */

.video-link {
    margin-top: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 10px 16px;
    border-radius: 999px;
    box-shadow: var(--shadow-card);
    color: var(--ink-700);
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 160ms var(--ease), border-color 160ms var(--ease);
}
.video-link:hover {
    border-color: var(--indigo-700);
    box-shadow: var(--shadow-lift);
}
.video-link .play {
    width: 22px; height: 22px;
    border-radius: 999px;
    background: var(--indigo-700);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.video-link .play svg { width: 10px; height: 10px; }

/* Release notes ----------------------------------------------------- */

.release {
    border-bottom: 1px solid var(--line);
    padding: 1.4rem 0;
}
.release:last-child { border-bottom: 0; }
.release h3 {
    margin: 0 0 0.2em;
    font-size: 1.05rem;
}
.release .meta {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--ink-400);
    margin-bottom: 0.6em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.release .meta .tag {
    background: var(--paper-2);
    border: 1px solid var(--line);
    padding: 2px 8px;
    border-radius: 999px;
    color: var(--ink-500);
}

/* Help / FAQ -------------------------------------------------------- */

.qa {
    margin: 1rem 0;
    padding: 1.1rem 1.2rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}
.qa h3 { margin: 0 0 0.3em; font-size: 1.05rem; }
.qa p  { margin: 0 0 0.4em; }
.qa p:last-child { margin-bottom: 0; }

/* Steps ------------------------------------------------------------- */

.steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 1.6rem 0;
    display: grid;
    gap: 12px;
}
.steps li {
    counter-increment: step;
    position: relative;
    padding: 16px 18px 16px 58px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    color: var(--ink-700);
}
.steps li::before {
    content: counter(step);
    position: absolute;
    left: 16px;
    top: 15px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--indigo-50);
    border: 1px solid var(--indigo-100);
    color: var(--indigo-700);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.steps li strong { color: var(--ink-900); }

/* Form -------------------------------------------------------------- */

input[type="email"], input[type="text"] {
    width: 100%;
    max-width: 360px;
    padding: 11px 13px;
    font-size: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
    font-family: inherit;
    color: var(--ink-900);
    transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}
input[type="email"]:focus, input[type="text"]:focus {
    outline: none;
    border-color: var(--indigo-600);
    box-shadow: 0 0 0 4px rgba(61,68,117,0.12);
}

/* Reveal animation -------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
    .hero h1, .hero .pitch, .hero .tagline, .hero .cta-row, .hero .hero-note {
        animation: rise 600ms var(--ease) both;
    }
    .hero .pitch    { animation-delay: 60ms; }
    .hero .tagline  { animation-delay: 120ms; }
    .hero .cta-row  { animation-delay: 180ms; }
    .hero .hero-note { animation-delay: 240ms; }

    @keyframes rise {
        from { opacity: 0; transform: translateY(6px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    .hero-shot-wrap {
        animation: shot-rise 820ms var(--ease) both;
        animation-delay: 320ms;
    }
    @keyframes shot-rise {
        from { opacity: 0; transform: translateY(26px) scale(0.985); }
        to   { opacity: 1; transform: none; }
    }
}

/* Responsive -------------------------------------------------------- */

@media (max-width: 880px) {
    .hero-lede { flex-direction: column; justify-content: flex-start; gap: 1.2rem; }
    .hero .pitch { flex: none; }
    .hero .tagline { margin: 0 auto; }
    .hero-shot-wrap { margin-top: 2.4rem; padding-bottom: 3rem; }
    .hero-shot-wrap::before { filter: blur(36px); }
}

@media (max-width: 720px) {
    h1 { font-size: 1.9rem; }
    .hero { padding: 1.6rem 0 0; }
    .hero h1 { font-size: 2.1rem; }
    .hero-shot-wrap { margin-top: 1.8rem; padding-bottom: 2.2rem; }
    .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
    .nav { flex-wrap: wrap; gap: 16px; }
    section { padding: 1.5rem 0; }
    .appshot-frame { border-radius: 10px; }
}

/* --- P3 polish: readability + keyboard focus ------------------------- */

/* Hold body prose to a comfortable reading measure (~70 characters).
   Cards, the hero, and the legal .doc set their own widths, so they are
   left untouched by these direct-child selectors. */
main > section > .wrap > p,
main > section > .wrap > ul,
main > section > .wrap > ol,
.qa > p {
    max-width: 660px;
}

/* Visible, on-brand keyboard focus for interactive elements. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--indigo-700);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* --- Keen additions ------------------------------------------------- */

/* Skip link: off-screen until focused. */
.skip {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 30;
    background: #fff;
    color: var(--ink-900);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}
.skip:focus { top: 12px; }

/* In good company: the closing family section ------------------------- */
/* Shared verbatim by every product site. Lists only announced products. */

.family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 1.6rem;
}
.family-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow-card);
}
.family-card img { width: 36px; height: 36px; display: block; margin-bottom: 10px; }
.family-card h3 { margin: 0; font-size: 1.02rem; }
.family-card p { margin: 0 0 0.9rem; font-size: 0.95rem; color: var(--ink-500); line-height: 1.55; }
.family-card .here,
.family-card a.visit {
    margin-top: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}
.family-card .here { color: var(--ink-400); }
.family-card a.visit { border-bottom: 0; align-self: flex-start; }
.family-card a.visit .arrow {
    display: inline-block;
    transition: transform 200ms var(--ease);
}
.family-card a.visit:hover .arrow { transform: translateX(2px); }

/* --- Reading touches (2026-11-09) -------------------------------------
   One block, identical on the Nest, Guard and Keen sites. */

/* Small text people are meant to read uses --ink-500 (about 5:1 on paper);
   --ink-400 (about 3:1) stays for decoration such as the section numbers. */
.hero-note,
.site-footer .umbrella,
.site-footer .colophon,
.family-card .here { color: var(--ink-500); }

/* The hero note's dot sits on the first line when the note wraps. */
.hero-note { align-items: flex-start; }
.hero-note::before { flex: none; margin-top: 0.62em; }

/* Help: question cards end where the step cards and the text end. */
.qa { max-width: 660px; }

/* A grid of four reads as two pairs, not three plus a straggler. */
@media (min-width: 700px) {
    .card-grid.pairs { grid-template-columns: repeat(2, 1fr); }
}

/* Buy pages: the fact line gets air before the pitch, the pitch a measure. */
.hero .wrap > .tagline { margin: 0 0 0.9rem; }
.hero .wrap > .pitch { max-width: 56ch; }

/* Section rhythm: a little more room between bands on wider screens, and
   the last band runs down to the footer instead of leaving a bare strip. */
@media (min-width: 721px) {
    section { padding: 2.75rem 0; }
}
main > section:last-of-type { padding-bottom: 4rem; }
.site-footer { margin-top: 0; }

/* Phones: the datasheet lines up with the text around it, and the header
   nav fits one line so the sticky header stays short. */
@media (max-width: 880px) {
    .hero .tagline { margin: 0; }
}
@media (max-width: 720px) {
    .site-header .wrap { padding-top: 12px; padding-bottom: 10px; gap: 6px; }
    .nav { gap: 6px 15px; font-size: 0.92rem; }
}
@media (max-width: 380px) {
    .nav { gap: 6px 11px; font-size: 0.86rem; }
}

/* Download page: one card per system --------------------------------- */
.dl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin: 1.8rem 0 0.8rem;
    max-width: 760px;
}
.dl-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 22px 18px;
    box-shadow: var(--shadow-card);
}
.dl-card h3 { margin: 0 0 0.2em; font-size: 1.1rem; }
.dl-card .dl-meta { font-size: 0.9rem; color: var(--ink-500); margin: 0 0 1rem; }
.dl-card .dl-sum {
    margin: 0.9rem 0 0;
    font-size: 0.78rem;
    color: var(--ink-500);
    overflow-wrap: anywhere;
}
.dl-card .dl-sum code { font-size: 0.95em; }
/* The quiet second way in on Windows: the portable zip, for computers that
   block installers. Under the checksum, a line rule apart from it. */
.dl-card .dl-alt {
    margin: 0.9rem 0 0;
    padding-top: 0.8rem;
    border-top: 1px solid var(--line);
    font-size: 0.88rem;
    color: var(--ink-500);
}

/* Help page: keyboard shortcuts ---------------------------------------- */
.keys {
    border-collapse: collapse;
    margin: 1rem 0 0;
    max-width: 660px;
    width: 100%;
    font-size: 0.95rem;
}
.keys th, .keys td {
    text-align: left;
    padding: 9px 0;
    border-top: 1px solid var(--line);
    vertical-align: top;
}
.keys tr:last-child th, .keys tr:last-child td { border-bottom: 1px solid var(--line); }
.keys th {
    font-family: var(--font-mono);
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--ink-900);
    white-space: nowrap;
    padding-right: 1.4rem;
    width: 1%;
}
.keys td { color: var(--ink-700); }

/* Features page ------------------------------------------------------- */

/* A row of jump links to the groups below. */
.feature-jump {
    list-style: none;
    padding: 0;
    margin: 1.4rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.feature-jump li { margin: 0; }
.feature-jump a {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--ink-700);
    font-size: 0.9rem;
}
.feature-jump a:hover { border-color: var(--indigo-600); color: var(--indigo-800); }

/* Each feature a row: the name in bold leads, the sentence follows. */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 1.2rem 0 0;
}
.feature-list li {
    margin: 0;
    padding: 0.7rem 0 0.7rem 1.4rem;
    border-top: 1px solid var(--line);
    position: relative;
}
.feature-list li:last-child { border-bottom: 1px solid var(--line); }
.feature-list li::before {
    content: "";
    position: absolute;
    left: 0.2rem;
    top: 1.35rem;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--indigo-600);
}
.feature-list strong { color: var(--ink-900); font-weight: 600; }

/* A jump link lands with its target clear of the sticky header, whatever
   element carries the id. The header is about 67px tall on wider screens
   and about 90px on phones, where the nav wraps under the brand. */
[id] { scroll-margin-top: 84px; }
@media (max-width: 720px) {
    [id] { scroll-margin-top: 106px; }
}

/* Phones: Keen's menu carries Features where the siblings carry Buy, so it
   is one short word too wide for one line. The Keen name and icon already
   lead home, so the Home link steps aside on narrow screens. */
@media (max-width: 440px) {
    .site-header .nav a[href="/"] { display: none; }
}

/* Download page: a command to check the file. No script: one click selects the
   whole command (user-select: all), the visitor copies it with Ctrl+C. No line
   break inside or after it, so pasting never runs it before Enter. ---------- */
.cmd {
    margin: 0.3rem 0 0.6rem;
    max-width: 760px;
    padding: 12px 14px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--ink-900);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    -webkit-user-select: all;
    user-select: all;
    cursor: text;
}
.cmd-label { margin: 1.4rem 0 0.2rem; font-weight: 600; color: var(--ink-900); }

/* Phones: the buttons come straight after the pitch, and the datasheet
   (which repeats facts the pitch already states) drops below the hero
   note. .hero-lede dissolves so its two children can be ordered among
   the hero's own. Same block as the Nest site. */
@media (max-width: 880px) {
    .hero-text { display: flex; flex-direction: column; }
    .hero-text .hero-lede { display: contents; }
    .hero-text .pitch { order: 1; margin-bottom: 1.6rem; }
    .hero-text .cta-row { order: 2; }
    .hero-text .hero-note { order: 3; }
    .hero-text .tagline { order: 4; margin-top: 1.4rem; align-self: flex-start; }
}
