/* Journlet landing page.
   Tokens and rhythm are lifted from the app (src/index.css, src/lib/grid.ts)
   so the site and the app read as one product: same paper, same ink, same
   33px dot pitch, Fraunces for display and Public Sans for text. */

/* Fonts are self-hosted, not loaded from Google. A page whose argument is
   that nobody can read your journal should not hand every visitor's IP to a
   third party in order to render its own headline. Both are variable fonts
   covering the full 100..900 weight range in one file each, and Fraunces
   carries its optical-size axis so display text matches the app.
   Sources: @fontsource-variable/fraunces and @fontsource-variable/public-sans
   (SIL Open Font License, copies in fonts/). No unicode-range: there is only
   one subset, so per-glyph fallback handles anything the file lacks — the ○
   event bullet among them, exactly as it falls back in the app today.
   Italics are synthesised rather than shipped, again matching the app. */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/fraunces-latin-opsz-normal.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Public Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/public-sans-latin-wght-normal.woff2) format("woff2-variations");
}

:root {
  --ink: #26323e;
  /* #6b7683 was 4.20:1 on --paper, under WCAG AA for normal text; this
     clears it at 4.52:1 and is all but indistinguishable. Kept in step with
     app/src/index.css. */
  --ink-soft: #66717d;
  --paper: #f5f4ef;
  --surface: #ffffff;
  --line: #dcdad1;
  --hilite: #ffe066;
  --on-hilite: #26323e;
  --grid: 33px;
  --pad: 40px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7e4dc;
    --ink-soft: #9aa4b0;
    --paper: #191d23;
    --surface: #232a31;
    --line: #333b44;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Public Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  background: var(--surface);
  padding: 8px 14px;
  border-radius: 6px;
  z-index: 10;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- shared shell ---------- */

.nav,
.hero,
.pillars,
.wrap {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ---------- nav ---------- */

.nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-block: 22px;
  gap: 20px;
}
.brand {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav nav {
  display: flex;
  gap: 22px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.nav nav a {
  text-decoration: none;
}
.nav nav a:hover {
  text-decoration: underline;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 44px;
  align-items: center;
  padding-block: 26px 52px;
}
h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.sub {
  font-size: 16px;
  color: var(--ink-soft);
  margin: 0 0 24px;
  max-width: 40ch;
}
.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
}
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 7px;
  padding: 11px 22px;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
}
.btn-quiet {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.reassure {
  font-size: 12.5px;
  color: var(--ink-soft);
  margin: 14px 0 0;
}

/* ---------- sample spread ---------- */

.paper {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 3px 14px rgba(38, 50, 62, 0.08);
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: var(--grid) var(--grid);
  background-position: 18px -16px;
  padding: 22px 20px 26px;
}
.paper-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 17px;
  margin: 0 0 3px;
}
.paper-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0 0 8px;
}
.row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13.5px;
  line-height: var(--grid);
  margin: 0;
}
.glyph {
  width: 16px;
  flex-shrink: 0;
  text-align: center;
}
/* Entry states, mirroring app/src/index.css exactly. Complete softens the ink
   and keeps the entry legible; the line-through means "no longer relevant",
   which is a different thing and must not be conflated with done. */
.is-done {
  color: var(--ink-soft);
}
.is-moved {
  color: var(--ink-soft);
  font-style: italic;
}
.is-struck {
  color: var(--ink-soft);
  text-decoration: line-through;
}

/* The priority signifier: a highlighted * sitting inline before the text,
   never a replacement for the bullet in the glyph column. */
.prio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--hilite);
  color: var(--on-hilite);
  padding: 0 4px;
  margin-right: 6px;
  border-radius: 3px;
  font-weight: 700;
  line-height: 1;
}

/* ---------- notation band ---------- */

.band {
  background: var(--surface);
  border-block: 1px solid var(--line);
  padding-block: 38px;
}
.eyebrow {
  font-family: "Fraunces", Georgia, serif;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 6px;
}
h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 24px;
  margin: 0 0 22px;
}
.ngroup {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.notation {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 24px;
}
.notation:last-of-type {
  margin-bottom: 20px;
}
.notation li {
  display: flex;
  gap: 11px;
  align-items: baseline;
}
.nfoot {
  font-size: 13.5px;
  color: var(--ink-soft);
  margin: 0;
  max-width: 60ch;
}
.nglyph {
  font-size: 17px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.nlabel {
  font-size: 14px;
  font-weight: 500;
}
.ndesc {
  display: block;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink-soft);
}

/* ---------- pillars ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  padding-block: 42px;
}
h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 8px;
}
.pillars p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- install ---------- */

.install {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: 30px;
}
.install-lead {
  font-size: 14px;
  margin: 0 0 22px;
}
.install-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.install-grid > div {
  max-width: 340px;
}
.install strong {
  display: block;
  font-size: 13.5px;
  margin-bottom: 3px;
}
.install span {
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- prose pages (privacy) ---------- */

.prose {
  max-width: 68ch;
  margin-inline: auto;
  padding: 20px var(--pad) 80px;
}
.prose h1 {
  font-size: clamp(28px, 4vw, 36px);
  margin-bottom: 14px;
}
.prose h2 {
  font-size: 20px;
  margin: 38px 0 12px;
}
.prose p,
.prose li {
  font-size: 15.5px;
  margin: 0 0 14px;
}
.prose ul {
  padding-left: 20px;
}
.prose .sub {
  max-width: none;
}
/* Unresolved sections are marked rather than guessed at, so an unfinished
   policy cannot be mistaken for a finished one. */
.todo {
  display: block;
  font-style: normal;
  background: var(--hilite);
  color: var(--on-hilite);
  border-radius: 4px;
  padding: 10px 12px;
  margin-top: 10px;
  font-size: 14px;
}
.prose .meta {
  color: var(--ink-soft);
  font-size: 13px;
  margin-top: 40px;
}

/* ---------- 404 ---------- */

.oops {
  max-width: 1080px;
  margin-inline: auto;
  padding: clamp(40px, 12vh, 120px) var(--pad);
}
.oops .sub {
  margin-bottom: 28px;
}
.nav a.brand {
  text-decoration: none;
}

/* No footer: the install band is the last thing on the page, so it ends on
   something to do. A footer comes back when there is a privacy policy and a
   contact address to put in it. */

/* ---------- narrow ---------- */

@media (max-width: 860px) {
  :root {
    --pad: 22px;
  }
  .hero,
  .pillars,
  .install-grid {
    grid-template-columns: 1fr;
  }
  .notation {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav nav a:not(:last-child) {
    display: none;
  }
  .install-grid > div {
    max-width: none;
  }
}

@media (max-width: 420px) {
  .notation {
    grid-template-columns: 1fr;
  }
}
