/* The public landing page (templates/landing.html, webapp/views/landing.py).

   Light, centred and plain: white, one soft grey, a hairline border, and the product's own blue
   for anything that can be clicked. The page is read once, on a cold connection, often on a
   phone, so there is one small self-hosted web font (the headings, below), no images beyond the
   logo, and no video.

   **Nothing here animates and nothing here is scripted.** The page has no script tag at all;
   the questions open with `<details>`. Hover and focus change colour and nothing else. If motion
   is ever added back it belongs behind a class a script adds, so that a page without the script
   is still the finished page - but for now there is none to add it.

   Colours come from the tokens in style.css. `templates/landing.html` sets `data-theme="light"`,
   so the `:root` block there - not the dark override - is what these var() calls resolve to.

   Verify with `uv run python scripts/layout_probe.py --render --measure --pages landing`;
   tests/test_landing_page.py pins the promises, the prices and the no-script rule. */

/* The headings' one web font, served from here rather than from Google (2026-10-01). A visitor's
   browser fetching it from fonts.googleapis.com sends their IP address to Google before they have
   agreed to anything - a German court fined exactly that (LG Muenchen I, 3 O 17493/20, 2022) - and
   the Cookie Policy says no third party is contacted while this page loads. Plus Jakarta Sans,
   SIL Open Font License 1.1 (static/fonts/plus-jakarta-sans/OFL.txt); 700 only, Latin and
   Latin Extended - the page is English. */
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans/plus-jakarta-sans-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans/plus-jakarta-sans-700-latin.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;
}

.lp-body {
  /* Landing-only additions to the app's light tokens.

     The greys are not neutral: every one of them is pulled towards the product's blue, the way
     the page this was modelled on tints everything towards its purple. A neutral grey beside a
     saturated blue button reads as two unrelated palettes; a blue-tinted grey reads as one light
     blue page. The accent itself stays --accent-solid (#0A74DA) wherever it carries white text or
     small text, because the lighter tints below do not have the contrast for that. */
  --lp-ink: #0E1A2B;          /* headings: darker than --text, faintly blue */
  --lp-muted: #51637C;        /* body copy that is not a heading */
  --lp-line: #DCE7F5;         /* hairline */
  --lp-soft: #F2F7FD;         /* the alternating band */
  --lp-tint: #E7F0FC;         /* chips, pills, quiet fills */
  --lp-sky: #3E9BEE;          /* the lighter blue, for large text only */
  --lp-max: 1120px;
  --lp-shadow: 0 1px 2px rgba(13, 42, 80, 0.05), 0 12px 30px rgba(13, 42, 80, 0.08);

  margin: 0;
  background: #fff;
  color: var(--lp-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.lp-body :focus-visible {
  outline: 2px solid var(--accent-solid);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.lp-narrow { max-width: 760px; }
.lp-center { text-align: center; }

/* ─── nav ─────────────────────────────────────────────────────────────────── */

.lp-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--lp-line);
}

.lp-nav-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  max-width: var(--lp-max);
  margin: 0 auto;
  padding: 12px 28px;
}

.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
}

/* No radius: the mark has no tile of its own to round off. */
.lp-brand-mark { display: block; }

.lp-brand-name {
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--accent-solid);
  white-space: nowrap;
}

.lp-brand-name strong { font-weight: 700; color: var(--lp-ink); }

.lp-nav-links {
  display: flex;
  gap: 24px;
  font-size: 14.5px;
}

.lp-nav-links a {
  color: var(--lp-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.lp-nav-links a:hover { color: var(--lp-ink); }

.lp-nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

/* ─── buttons ─────────────────────────────────────────────────────────────── */

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.lp-btn-primary {
  background: var(--accent-solid);
  color: #fff;
}

.lp-btn-primary:hover { background: var(--accent-solid-hover); }

.lp-btn-outline {
  background: #fff;
  border-color: var(--lp-line);
  color: var(--lp-ink);
}

.lp-btn-outline:hover { border-color: #B9D3F0; background: var(--lp-soft); }

.lp-btn-quiet { color: var(--lp-muted); background: transparent; }
.lp-btn-quiet:hover { color: var(--lp-ink); }

.lp-btn-lg { padding: 13px 24px; font-size: 15.5px; }
.lp-btn-block { display: flex; width: 100%; margin-top: auto; }

/* ─── type ────────────────────────────────────────────────────────────────── */

.lp-h1 {
  margin: 0 0 20px;
  font-size: clamp(36px, 5.4vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 700;
  /* The headline's own face; the system stack is the fallback while it loads or offline. */
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Large text only (the H1), where the lighter blue still clears 3:1 on white. */
.lp-accent { color: var(--lp-sky); }

.lp-h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.028em;
  font-weight: 750;
}

.lp-kicker {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-solid);
}

.lp-lede,
.lp-body-lg {
  margin: 0;
  font-size: clamp(16px, 1.45vw, 18px);
  color: var(--lp-muted);
}

.lp-lede { max-width: 640px; margin: 0 auto 30px; }

/* --- the hero's swapping noun -------------------------------------------------------
   "Your rules." -> "Your words." -> "Your call.", the three things that stay the reader's.

   The only animation on this page (tests/test_landing_page.py pins that), and it earns the
   exception by failing safe in every direction:

   * inline-grid stacks the three words in ONE cell, so the box is as wide as the longest of
     them and the sentence before it never moves as they swap;
   * with no motion - a reader who asked for less, an engine that does not animate - the rule
     below the guard leaves exactly one visible word and the line reads "Your rules.";
   * it is decoration, so the markup hands a screen reader the whole sentence instead
     (.lp-sr-only) and hides this from it entirely.                                        */
.lp-swap {
  display: inline-grid;
  vertical-align: bottom;
  color: var(--lp-sky);
  text-align: left;
}

.lp-swap > span {
  grid-area: 1 / 1;
}

/* The static baseline: one word, no stack. */
.lp-swap > span + span {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .lp-swap > span + span {
    display: block;
  }

  .lp-swap > span {
    opacity: 0;
    animation: lp-swap 9s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  }

  .lp-swap > span:nth-child(2) { animation-delay: 3s; }
  .lp-swap > span:nth-child(3) { animation-delay: 6s; }
}

/* Three seconds held, half a second moving: long enough to read the word and notice it is a
   list, slow enough not to nag at someone reading the paragraph under it. */
/* Each word owns exactly a third of the loop (3s of 9s) and is GONE by the end of its third:
   out at 33%, and the next one starts its rise at 33.3%. Overlapping the two - a crossfade -
   left both of them half-lit at the same time, which reads as a rendering fault rather than
   as one word replacing another. */
@keyframes lp-swap {
  0%   { opacity: 0; transform: translateY(0.34em); }
  4%   { opacity: 1; transform: translateY(0); }
  29%  { opacity: 1; transform: translateY(0); }
  33%  { opacity: 0; transform: translateY(-0.34em); }
  100% { opacity: 0; transform: translateY(-0.34em); }
}

/* Said to a screen reader, never drawn. */
.lp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.lp-section { padding: 92px 0; }

.lp-band {
  padding: 92px 0;
  background: var(--lp-soft);
  border-block: 1px solid var(--lp-line);
}

/* ─── hero ────────────────────────────────────────────────────────────────── */

/* A pale blue that gives out before the product shot, so the shot sits on white and keeps its
   edges. One gradient, no blur, no second hue. */
.lp-hero {
  /* 96px, not 74: the badge that used to sit above the headline carried 22px of its own
     margin, and taking it away moved the headline up into the nav. */
  padding: 96px 28px 0;
  text-align: center;
  background: linear-gradient(180deg, #EAF2FD 0%, #F5F9FE 46%, #fff 82%);
}

.lp-hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.lp-center-cta { margin-top: 26px; }

.lp-trustline {
  margin: 18px 0 0;
  font-size: 13.5px;
  color: #7A8799;
}

/* ─── the product shot ────────────────────────────────────────────────────── */

/* A closed card, not one bleeding off the bottom of the section: the band that follows has its own
   background, so a shot running under it just looks cut in half. */
.lp-shot {
  max-width: 940px;
  margin: 56px auto 0;
  overflow: hidden;
  border: 1px solid var(--lp-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--lp-shadow);
  text-align: left;
  font-size: 13.5px;
}

.lp-hero { padding-bottom: 86px; }

.lp-shot-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--lp-line);
  background: var(--lp-soft);
}

.lp-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #CBDAEC;
  flex: 0 0 auto;
}

.lp-shot-title {
  margin-left: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lp-muted);
}

.lp-shot-count {
  margin-left: auto;
  font-size: 11.5px;
  color: #8B97A8;
  font-variant-numeric: tabular-nums;
}

.lp-shot-tools {
  display: flex;
  gap: 4px;
  padding: 10px 12px 4px;
}

.lp-shot-tool {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--lp-muted);
}

.lp-shot-tool.is-on {
  background: rgba(10, 116, 218, 0.1);
  color: var(--accent-solid);
}

/* Rows, in the order the real list puts things: sender, subject, chips, snippet, date. */
.lp-rows { list-style: none; margin: 0; padding: 4px 6px 10px; }

.lp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border-radius: 8px;
  color: var(--lp-muted);
}

.lp-row + .lp-row { border-top: 1px solid var(--lp-line); }
.lp-row.is-unread { background: rgba(10, 116, 218, 0.04); }
.lp-row.is-unread .lp-row-from,
.lp-row.is-unread .lp-row-subject { font-weight: 700; color: var(--lp-ink); }

.lp-row-from {
  flex: 0 0 96px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lp-row-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  white-space: nowrap;
}

.lp-row-subject {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--lp-ink);
}

.lp-row-snip {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 400;
}

.lp-row-time {
  flex: 0 0 auto;
  font-size: 12px;
  color: #8B97A8;
  font-variant-numeric: tabular-nums;
}

/* A category chip carries the rule's own name; the app renders it capitalised. */
.lp-chip {
  flex: 0 0 auto;
  padding: 1px 9px;
  border: 1px solid #CBDDF4;
  border-radius: 999px;
  background: var(--lp-tint);
  color: #2F5580;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

/* A detection chip is green and keeps its "Detected:" prefix verbatim - the prefix is what tells
   the two kinds of chip apart in the real row. */
.lp-chip-detect {
  border-color: #A9DEBC;
  background: #E7F7ED;
  color: #16653B;
  text-transform: none;
}

.lp-att {
  flex: 0 0 auto;
  padding: 1px 9px;
  border: 1px solid var(--lp-line);
  border-radius: 999px;
  background: #fff;
  color: #6C7A8D;
  font-size: 11px;
  font-weight: 600;
}

/* ─── simple content blocks ───────────────────────────────────────────────── */

.lp-three {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 52px;
}

.lp-fact h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.012em;
}

.lp-fact p { margin: 0; color: var(--lp-muted); font-size: 15px; }

.lp-checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px 34px;
  margin-top: 40px;
}

.lp-checks p {
  position: relative;
  margin: 0;
  padding-left: 30px;
  font-size: 15.5px;
  color: var(--lp-ink);
}

.lp-checks p::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--accent-solid);
  border-bottom: 2px solid var(--accent-solid);
  transform: rotate(-45deg);
}

/* ─── feature cards ───────────────────────────────────────────────────────── */

.lp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 52px;
}

.lp-grid-4 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }

.lp-card {
  padding: 24px 22px;
  border: 1px solid var(--lp-line);
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lp-card:hover { border-color: #CFD8E4; box-shadow: var(--lp-shadow); }

.lp-card-plain { background: var(--lp-soft); border-color: #D2E2F6; }
.lp-card-plain:hover { box-shadow: none; }

.lp-card h3 {
  margin: 0 0 8px;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.012em;
}

.lp-card p { margin: 0; font-size: 14.5px; color: var(--lp-muted); }

.lp-card code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--lp-tint);
  font-size: 12.5px;
  color: var(--accent-solid);
}

/* ─── steps ───────────────────────────────────────────────────────────────── */

.lp-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 32px;
  list-style: none;
  margin: 52px auto 0;
  padding-left: 28px;
  padding-right: 28px;
}

.lp-step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--accent-solid);
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
}

.lp-steps h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.lp-steps p { margin: 0; font-size: 15px; color: var(--lp-muted); }
.lp-steps strong { color: var(--lp-ink); font-weight: 650; }

/* ─── plans ───────────────────────────────────────────────────────────────── */

.lp-plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  align-items: stretch;
  margin-top: 52px;
}

.lp-plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  border: 1px solid var(--lp-line);
  border-radius: 12px;
  background: #fff;
}

.lp-plan.is-featured {
  border-color: var(--accent-solid);
  box-shadow: 0 0 0 1px var(--accent-solid);
}

.lp-plan-name {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--lp-muted);
}

.lp-plan-price { margin: 0 0 12px; display: flex; align-items: baseline; gap: 5px; }
.lp-plan-amount { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; }
.lp-plan-per { font-size: 14px; color: var(--lp-muted); }
.lp-plan-pitch { margin: 0 0 18px; font-size: 14.5px; color: var(--lp-muted); }

.lp-plan-list {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.lp-plan-list li {
  position: relative;
  padding-left: 26px;
  font-size: 14.5px;
  line-height: 1.45;
}

.lp-plan-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 7px;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--accent-solid);
  border-bottom: 2px solid var(--accent-solid);
  transform: rotate(-45deg);
}

.lp-plans-note {
  max-width: 640px;
  margin: 30px auto 0;
  padding: 0 28px;
  font-size: 14px;
  color: var(--lp-muted);
  text-align: center;
}

/* ─── faq ─────────────────────────────────────────────────────────────────── */

.lp-faq { margin-top: 44px; }

.lp-faq details {
  border-bottom: 1px solid var(--lp-line);
}

.lp-faq details:first-of-type { border-top: 1px solid var(--lp-line); }

.lp-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 2px;
  cursor: pointer;
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.012em;
  list-style: none;
}

.lp-faq summary::-webkit-details-marker { display: none; }

/* The open/closed cue, drawn rather than imaged: a plus that loses its upright when open. */
.lp-faq summary::after {
  content: "";
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  background:
    linear-gradient(var(--lp-muted), var(--lp-muted)) center/11px 1.6px no-repeat,
    linear-gradient(var(--lp-muted), var(--lp-muted)) center/1.6px 11px no-repeat;
}

.lp-faq details[open] summary::after {
  background: linear-gradient(var(--lp-muted), var(--lp-muted)) center/11px 1.6px no-repeat;
}

.lp-faq details p {
  margin: -4px 0 22px;
  padding-right: 34px;
  font-size: 15.5px;
  color: var(--lp-muted);
}

.lp-faq strong { color: var(--lp-ink); font-weight: 650; }

/* ─── closing ─────────────────────────────────────────────────────────────── */

.lp-cta {
  padding: 96px 0 104px;
  background: var(--lp-soft);
  border-top: 1px solid var(--lp-line);
}

/* ─── footer ──────────────────────────────────────────────────────────────── */

.lp-footer {
  padding: 48px 0 56px;
  border-top: 1px solid var(--lp-line);
  background: #fff;
}

.lp-footer-cols {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 32px;
}

.lp-footer-brand p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--lp-muted);
  max-width: 28ch;
}

.lp-footer h4 {
  margin: 0 0 12px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lp-ink);
}

.lp-footer nav { display: flex; flex-direction: column; gap: 9px; }

.lp-footer nav a {
  font-size: 14px;
  color: var(--lp-muted);
  text-decoration: none;
}

.lp-footer nav a:hover { color: var(--accent-solid); text-decoration: underline; }

/* ─── narrow screens ──────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .lp-nav-links { display: none; }
  .lp-section, .lp-band { padding: 68px 0; }
  .lp-cta { padding: 72px 0 80px; }
  .lp-footer-cols { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 700px) {
  .lp-wrap, .lp-nav-inner, .lp-steps, .lp-plans-note { padding-left: 18px; padding-right: 18px; }
  .lp-hero { padding: 48px 18px 0; }
  .lp-section, .lp-band { padding: 56px 0; }
  .lp-cta { padding: 60px 0 66px; }

  .lp-hero-cta { flex-direction: column; align-items: stretch; }
  .lp-hero-cta .lp-btn { width: 100%; }

  .lp-shot { margin-top: 40px; font-size: 12.5px; }
  .lp-shot-count { display: none; }
  /* A phone row has room for a sender, a subject and its chips - nothing else. Without this the
     subject is the thing that shrinks away, leaving a row that is all chip and no message. */
  .lp-row-from { flex-basis: 74px; }
  .lp-row-time,
  .lp-row-snip,
  .lp-att { display: none; }
  .lp-chip { font-size: 10.5px; padding: 1px 7px; }

  .lp-three, .lp-grid, .lp-steps, .lp-plans, .lp-checks { margin-top: 36px; gap: 16px; }
  .lp-steps { gap: 26px; }
  .lp-plan-amount { font-size: 32px; }
  .lp-faq summary { font-size: 15.5px; padding: 17px 2px; }
  .lp-faq details p { font-size: 14.5px; padding-right: 0; }
  .lp-footer-cols { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 420px) {
  .lp-nav-cta .lp-btn-quiet { display: none; }   /* Sign in also sits in the footer */
}
