/* Lamplight landing site. Fonts: @fontsource (OFL-1.1). */
@font-face { font-family: 'DM Sans'; font-style: normal; font-display: swap; font-weight: 400; src: url(/assets/dm-sans-latin-400-normal.4ab51eb2cd.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: 'DM Sans'; font-style: normal; font-display: swap; font-weight: 500; src: url(/assets/dm-sans-latin-500-normal.19bf198495.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: 'DM Sans'; font-style: normal; font-display: swap; font-weight: 600; src: url(/assets/dm-sans-latin-600-normal.6bb2b2645b.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: 'DM Sans'; font-style: normal; font-display: swap; font-weight: 700; src: url(/assets/dm-sans-latin-700-normal.35c5efa0e5.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: 'Caveat'; font-style: normal; font-display: swap; font-weight: 700; src: url(/assets/caveat-latin-700-normal.15f9638095.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; }

/* The public landing site, Lamplight (landing spec v5, KS-158; Version E, "Picture book in Sage", KS-154). This file
   is the site's whole stylesheet: the build puts only the fonts' @font-face rules before it and reads nothing from the
   app (src/landing.css stays the app's). Every class starts with `site-`. Text sizes and spacing are in rem, so they
   follow the reader's text size; the drawings scale with their column. One breakpoint, at 900px.

   Shape rule: cards, tiles and the bookplate are 22px, the Sage block 28px, inputs 14px, buttons pills. Every outline
   is `--landing-line`; shadows are hard offsets, never blurred. Every automatic motion plays a fixed number of times
   and ends within 5 s of load (WCAG 2.2.2), and nothing moves under reduced motion. */
:root {
  --landing-bg: #f8f9f5;
  --landing-surface: #fff;
  --landing-ink: #2c3c32;
  --landing-muted: #5f6d61;
  --landing-rule: #dde4d9;
  --landing-accent: #456b51;
  --landing-accent-hover: #36563f;
  --landing-tint: #eaf1e6;
  --landing-tint-2: #d5e3cf;
  --landing-field: #7d917b;
  --landing-danger: #90452e;
  --landing-paper: #fffcf3;
  --landing-lamp: #e9a94b;
  --landing-lamp-soft: #fbe7bf;
  --landing-glow: #f0bf6a;
  --landing-on-accent: #fffcf3;
  --landing-on-accent-muted: #e6efe2;
  --landing-on-accent-hand: #fbe3b0;
  --landing-line: 2.5px solid var(--landing-ink);
  --landing-radius: 14px;
  --landing-radius-control: 10px;
  --landing-radius-card: 22px;
  --landing-radius-block: 28px;
  --landing-radius-pill: 999px;
  --landing-press: 0 5px 0 var(--landing-ink);
  --landing-press-down: 0 2px 0 var(--landing-ink);
  --landing-target: 44px;
  --landing-measure: 65ch;
  --landing-focus: 3px solid var(--landing-accent);
  --landing-side: max(calc(24px + env(safe-area-inset-left)), 6%);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--landing-ink);
  background: var(--landing-bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 1.0625rem; line-height: 1.6; }
h1, h2, h3 { overflow-wrap: anywhere; }
svg { display: block; max-width: 100%; }

/* The page: the viewport's height at least, with main taking the spare height so the footer sits at the foot. */
.site-page { min-height: 100svh; display: flex; flex-direction: column; }
.site-main { flex: 1; min-width: 0; }
.site-wrap { width: min(1180px, 100% - 2 * var(--landing-side)); margin-inline: auto; }
.site-page a { color: var(--landing-accent); text-underline-offset: .2em; }
.site-page a:hover { color: var(--landing-accent-hover); }
.site-page :focus-visible { outline: var(--landing-focus); outline-offset: 3px; }

/* Skip to the waitlist: the first focusable element, shown only while it has focus. */
.site-skip-link {
  position: absolute; left: max(24px, env(safe-area-inset-left)); top: .5rem; z-index: 10;
  display: inline-flex; align-items: center; min-height: var(--landing-target); padding: .5rem 1rem;
  border: var(--landing-line); border-radius: var(--landing-radius-pill); background: var(--landing-paper);
  font-weight: 600; transform: translateY(-200%);
}
.site-page .site-skip-link { color: var(--landing-ink); }
.site-skip-link:focus { transform: none; }

/* The header: the wordmark only, an outlined drawing whose letters match DM Sans 700 at 2rem. */
.site-header-inner { display: flex; align-items: center; min-height: 80px; }
.site-wordmark { display: inline-flex; font-size: 2rem; line-height: 1; }
.site-wordmark svg { width: auto; height: 1.6em; }
.site-page a.site-wordmark { border-radius: 6px; }

/* Type. */
.site-hand { font-family: "Caveat", cursive; font-weight: 700; letter-spacing: 0; }
.site-page h2 { margin: 0 0 1rem; font-size: clamp(1.9rem, 3vw, 2.5rem); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.site-page h3 { margin: 0 0 .5rem; font-size: 1.6rem; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }

/* Buttons: an ink-outlined pill on the accent with a hard shadow under it, pressed down while active. */
.site-button {
  display: inline-flex; align-items: center; justify-content: center; max-width: 100%; min-height: 3rem; padding: .5rem 1.625rem;
  border: var(--landing-line); border-radius: var(--landing-radius-pill); background: var(--landing-accent); box-shadow: var(--landing-press);
  color: #fff; font: inherit; font-size: 1rem; font-weight: 700; line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer;
}
.site-page a.site-button { color: #fff; }
.site-button:hover:not([aria-disabled="true"]) { background: var(--landing-accent-hover); }
.site-page a.site-button:hover { color: #fff; }
.site-button[aria-disabled="true"] { cursor: default; background: var(--landing-muted); box-shadow: none; }

/* The hero: centred, the headline at most 16ch and the lede 42ch, then the link to the waitlist and the drawing. */
.site-hero { padding: 1.25rem 0 0; text-align: center; }
.site-hero h1 { max-width: 16ch; margin: 0 auto 1rem; font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; line-height: 1.05; letter-spacing: -.035em; }
.site-hero-hand { display: inline-block; color: var(--landing-accent); font-size: 1.15em; line-height: 1.05; transform: rotate(-3deg); }
.site-lede { max-width: 42ch; margin: 0 auto 1.625rem; color: var(--landing-muted); font-size: 1.1875rem; }
.site-hero-button { min-height: 54px; padding-inline: 1.875rem; }
.site-hero-art-frame { display: block; max-width: 860px; margin: .5rem auto 0; }
.site-hero-art-frame svg { width: 100%; height: auto; }

/* The family album: the Sage colour block, inset from the page's edge. Text on it is paper and its two lighter tints. */
.site-album { margin: 0 max(12px, 2%); padding: 80px 0; border-radius: var(--landing-radius-block); background: var(--landing-accent); color: var(--landing-on-accent); }
.site-album-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.site-album p { max-width: 44ch; margin: 0; color: var(--landing-on-accent-muted); }
.site-page .site-album-hand { display: block; margin-top: 1.25rem; color: var(--landing-on-accent-hand); font-size: 2rem; line-height: 1.2; transform: rotate(-2deg); transform-origin: left center; }
.site-album :focus-visible { outline-color: var(--landing-on-accent); }
.site-album-art-frame { display: block; justify-self: center; width: 100%; max-width: 280px; }
.site-album-art-frame svg { width: 100%; height: auto; }

/* Sections below the hero. */
.site-section { padding: 88px 0; }

/* How it works: Add is tall on the tint, its drawing in the flow at its foot; Remember on lamp-soft; Gather on paper. */
.site-tiles { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-top: 2.25rem; }
.site-tile {
  display: flex; flex-direction: column; min-width: 0; min-height: 220px; padding: 28px;
  border: var(--landing-line); border-radius: var(--landing-radius-card); background: var(--landing-paper);
}
.site-tile p { max-width: 34ch; margin: 0; color: var(--landing-muted); overflow-wrap: anywhere; }
.site-tile-add { grid-row: span 2; background: var(--landing-tint); }
.site-tile-remember { background: var(--landing-lamp-soft); }
.site-tile-add p, .site-tile-remember p { color: var(--landing-ink); }
.site-tile-art { display: block; width: 230px; max-width: 100%; margin: auto 0 0 auto; padding-top: 1.25rem; }
.site-tile-art svg { width: 100%; height: auto; }
.site-page .site-tile-hand { margin-top: .875rem; font-size: 1.6rem; line-height: 1.2; transform: rotate(-2deg); transform-origin: left center; }

/* The bookplate: the KS-128 claims on a paper card with the lamp's offset shadow. */
.site-bookplate {
  max-width: 760px; margin: 0 auto; padding: 48px;
  border: var(--landing-line); border-radius: var(--landing-radius-card); background: var(--landing-paper); box-shadow: 8px 8px 0 var(--landing-lamp);
}
.site-bookplate h2 { text-align: center; }
.site-page .site-bookplate-name { margin: 0 0 1.875rem; color: var(--landing-accent); font-size: 1.9rem; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.site-claims { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 36px; margin: 0; }
.site-claims dt { font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.site-claims dd { margin: .125rem 0 0; color: var(--landing-muted); font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }

/* The join section: a dashed rule, the invitation on the left, the form on the right. */
.site-join-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; padding-top: 72px; border-top: 2.5px dashed var(--landing-tint-2); }
.site-join-inner > div > p { margin: 0; color: var(--landing-muted); }

/* The waitlist (spec v2 § 5, KS-133; restyled in v5): labels above their controls, 48px controls with the ink outline.
   The script adds the inline states; without it the browser's own validation applies. */
.site-waitlist { min-width: 0; scroll-margin-top: 1.5rem; }
.site-waitlist:focus-visible { outline: var(--landing-focus); outline-offset: 6px; border-radius: 2px; }
.site-waitlist-form { display: flex; flex-direction: column; gap: 1rem; }
.site-waitlist-form[hidden] { display: none; }
.site-field { display: flex; flex-direction: column; min-width: 0; }
.site-label { display: block; margin-bottom: .5rem; font-size: .9375rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.site-input {
  width: 100%; min-height: 3rem; border: var(--landing-line); border-radius: var(--landing-radius);
  background: var(--landing-paper); color: var(--landing-ink); padding: .5rem .875rem; font: inherit; font-size: 1rem;
}
.site-input::placeholder { color: var(--landing-muted); opacity: 1; }
.site-select { appearance: auto; }
.site-input[aria-invalid="true"] { border-color: var(--landing-danger); }
.site-input[readonly], .site-input:disabled { color: var(--landing-muted); }
.site-consent { display: flex; align-items: flex-start; gap: .625rem; min-height: var(--landing-target); font-size: .9375rem; line-height: 1.5; cursor: pointer; overflow-wrap: anywhere; }
.site-consent input { flex-shrink: 0; width: 1.25rem; height: 1.25rem; margin: calc((1.5em - 1.25rem) / 2) 0 0; accent-color: var(--landing-accent); }
.site-consent input[aria-invalid="true"] { outline: 2px solid var(--landing-danger); outline-offset: 2px; }
.site-waitlist :is(input, select, button):focus-visible { outline: var(--landing-focus); outline-offset: 3px; }
/* An error starts with a drawn "!" so it never relies on colour alone; the glyph is hidden from assistive tech. */
.site-field-error { display: flex; gap: .5rem; align-items: flex-start; margin: .5rem 0 0; color: var(--landing-danger); font-size: .9375rem; line-height: 1.5; overflow-wrap: anywhere; }
.site-field-error[hidden] { display: none; }
.site-field-error::before {
  content: "!" / ""; flex-shrink: 0; display: inline-grid; place-items: center; width: 1rem; height: 1rem; margin-top: .125rem;
  border-radius: 50%; background: var(--landing-danger); color: #fff; font-size: .6875rem; font-weight: 700; line-height: 1;
}
.site-join { width: 100%; margin-top: .25rem; }
.site-waitlist-alert { margin: -.25rem 0 0; color: var(--landing-danger); font-size: .9375rem; line-height: 1.6; overflow-wrap: anywhere; }
/* Empty live regions stay in the accessibility tree (so what is written into them is announced) and take no room. */
.site-waitlist-alert:empty { margin-top: -1rem; }
.site-waitlist-privacy { margin: -.25rem 0 0; color: var(--landing-muted); font-size: .875rem; line-height: 1.6; overflow-wrap: anywhere; }
/* The live region announces the pending copy the button already shows, so it is read, not drawn twice. */
.site-waitlist-status { position: absolute; width: 1px; height: 1px; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.site-waitlist-success { padding: 1.5rem; border: var(--landing-line); border-radius: var(--landing-radius-card); background: var(--landing-tint); }
.site-waitlist-success[hidden] { display: none; }
.site-waitlist-success:focus-visible { outline: var(--landing-focus); outline-offset: 3px; }
.site-page .site-waitlist-success h2 { margin: 0 0 .5rem; font-size: 1.5rem; line-height: 1.3; }
.site-waitlist-success p { margin: 0; font-size: 1.0625rem; line-height: 1.6; }
/* The honeypot: present for bots, invisible to people and to assistive tech. */
.site-hp, .site-hp > * { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; padding: 0; border: 0; }

/* The demo video (spec v2 § 3, § 5; KS-134), shown only while its switch is on (KS-158): 16:10, at most 960px wide,
   with the ink outline and the card radius, then the error line (only when the file fails), the caption and the
   transcript disclosure. */
.site-demo-video {
  display: block; width: 100%; max-width: 960px; height: auto; aspect-ratio: 16 / 10;
  border: var(--landing-line); border-radius: var(--landing-radius-card); background: var(--landing-surface);
}
.site-demo-error { max-width: var(--landing-measure); margin-top: .75rem; }
.site-demo-caption { max-width: var(--landing-measure); margin: .75rem 0 0; color: var(--landing-muted); font-size: .875rem; line-height: 1.6; overflow-wrap: anywhere; }
.site-demo-transcript { max-width: var(--landing-measure); margin-top: 1rem; }
/* The summary keeps its native disclosure triangle (display: list-item) and a 44px target. */
.site-demo-transcript summary {
  display: list-item; width: fit-content; min-height: var(--landing-target); padding: calc((var(--landing-target) - 1.6em) / 2) 0;
  box-sizing: border-box; color: var(--landing-accent); font-weight: 600; line-height: 1.6; cursor: pointer;
  text-decoration: underline; text-underline-offset: .2em;
}
.site-demo-transcript summary:hover { color: var(--landing-accent-hover); }
.site-demo-transcript ol { margin: .5rem 0 0; padding-left: 1.5rem; font-size: 1rem; line-height: 1.6; overflow-wrap: anywhere; }
.site-demo-transcript li + li { margin-top: .5rem; }

/* /privacy and the result pages: one 65ch column with the heading at the H2 scale. */
.site-policy, .site-result { max-width: var(--landing-measure); padding: 2.5rem 0 4.5rem; overflow-wrap: anywhere; }
.site-page :is(.site-policy, .site-result) h1 { margin: .5rem 0 1rem; font-size: clamp(1.9rem, 3vw, 2.5rem); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; }
.site-page .site-policy h2 { margin: 2.5rem 0 .5rem; font-size: 1.375rem; line-height: 1.3; letter-spacing: -.02em; }
.site-policy p, .site-result p { margin: 0 0 1rem; }
.site-policy-date { color: var(--landing-muted); font-size: .875rem; }
.site-back-link { display: inline-flex; align-items: center; min-height: var(--landing-target); }
.site-confirm-form { margin: .5rem 0 1.25rem; }

/* Footer: Privacy, the contact address and the "formerly" line on the left, the credit on the right; stacked below 600px. */
.site-footer { padding: 1.125rem 0 1.625rem; color: var(--landing-muted); font-size: .875rem; }
.site-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1.5rem; }
.site-footer-start { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.25rem; min-width: 0; }
.site-footer-links { display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0; padding: 0; list-style: none; min-width: 0; }
.site-page .site-footer a { display: inline-flex; align-items: center; min-height: var(--landing-target); color: inherit; overflow-wrap: anywhere; }
.site-page .site-footer a:hover { color: var(--landing-ink); }
.site-footer-formerly, .site-footer-credit { margin: 0; }

@media (max-width: 900px) {
  .site-header-inner { min-height: 68px; }
  .site-wordmark { font-size: 1.75rem; }
  .site-lede { font-size: 1.0625rem; }
  .site-hero-art-frame { margin-inline: -4%; }
  .site-section { padding: 56px 0; }
  .site-album { padding: 48px 0; border-radius: 20px; }
  .site-album-inner, .site-join-inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .site-album-art-frame { max-width: 260px; }
  .site-tiles { grid-template-columns: minmax(0, 1fr); }
  .site-tile-add { grid-row: auto; }
  .site-bookplate { padding: 28px 22px; }
  .site-claims { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .site-footer-inner, .site-footer-start { flex-direction: column; align-items: flex-start; }
}

/* Motion, on load only, and only without reduced motion: the lamps lean in once, the sparkles twinkle twice and the
   wordmark's glow breathes twice and rests at its drawn .35. The longest ends 4.2 s after load. */
@media (prefers-reduced-motion: no-preference) {
  .site-skip-link { transition: transform .15s ease-out; }
  .site-button { transition: background-color .15s; }
  .site-button:active:not([aria-disabled="true"]) { transform: translateY(3px); box-shadow: var(--landing-press-down); transition-duration: .08s; }
  .site-lamp { transform-box: fill-box; transform-origin: 50% 100%; animation: site-lean 2.4s ease-in-out 1; }
  .site-lamp-table { animation-delay: .3s; }
  .site-lamp-small { animation-delay: .6s; }
  .site-spark { transform-box: fill-box; transform-origin: center; animation: site-twinkle 1.6s ease-in-out 2; }
  .site-spark-2 { animation-delay: .5s; }
  .site-spark-3 { animation-delay: 1s; }
  .site-wm-glow { animation: site-breathe 2s ease-in-out 2; }
}
@keyframes site-lean { 0%, 100% { rotate: 0deg; } 50% { rotate: -2deg; } }
@keyframes site-twinkle { 0%, 100% { scale: 1; } 50% { scale: .72; } }
@keyframes site-breathe { 0%, 100% { opacity: .35; } 25% { opacity: .25; } 75% { opacity: .5; } }
