/*
  Cosia site (cosia.co). Plain CSS, no web fonts, no external requests (docs/site.md).
  Colors are the product tokens of DESIGN.md section 5.1, light and dark.
  Kept in a file of its own so the Content-Security-Policy in _headers can stay at
  'self' with no 'unsafe-inline'.
*/

:root {
  color-scheme: light dark;

  --surface-base: #fcfaf8;
  --surface-raised: #ffffff;
  --surface-sunken: #efece9;
  --text-primary: #1e1a17;
  --text-secondary: #5b534f;
  --text-tertiary: #6f6763;
  --accent: #7c2135;
  --separator: rgb(30 26 23 / 0.08);
  --outline: rgb(30 26 23 / 0.10);
  --fill-quiet: rgb(30 26 23 / 0.04);

  /* Reckless where it is installed (never served from here), else the system serif. */
  --font-serif: "Reckless Standard M", "Reckless", ui-serif, "New York", Georgia, serif;
  /* SF Pro stands in for Suisse Int'l until a web licence exists (DESIGN.md 5.2). */
  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", Arial, sans-serif;

  /* 4 pt grid (DESIGN.md 5.3). */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 96px;

  --radius-control: 8px;
  --radius-card: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface-base: #1f1718;
    --surface-raised: #2a2222;
    --surface-sunken: #110c0c;
    --text-primary: #f0eeec;
    --text-secondary: #bab3ae;
    --text-tertiary: #9b938e;
    --accent: #e2909a;
    --separator: rgb(240 238 236 / 0.10);
    --outline: rgb(240 238 236 / 0.10);
    --fill-quiet: rgb(240 238 236 / 0.05);
  }
}

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

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

body {
  margin: 0;
  background: var(--surface-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 40rem;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4) var(--space-7);
}

@media (min-width: 40em) {
  .page {
    padding: var(--space-7) var(--space-5) var(--space-8);
  }
}

/* Header with the wordmark */

.site-header {
  margin-bottom: var(--space-8);
}

.site-header a {
  display: inline-block;
  border-radius: var(--radius-control);
}

.wordmark {
  display: block;
  color: var(--accent);
  width: 110px;
  height: auto;
}

/* Type */

h1,
h2,
h3,
p,
ul,
ol,
dl {
  margin: 0;
}

.display {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.lead {
  margin-top: var(--space-5);
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 34rem;
  text-wrap: pretty;
}

.meta {
  margin-top: var(--space-3);
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Links in running text have no underline (Finn, 2026-11-20). They are one
   step brighter and medium weight, so they still read as links without
   colour alone; hover takes the accent. */
:where(main, article, .policy) :where(p, li, dd, td) > a:not([class]) {
  color: var(--text-primary);
  font-weight: 500;
  transition: color 150ms cubic-bezier(0.23, 1, 0.32, 1);
}

:where(main, article, .policy) :where(p, li, dd, td) > a:not([class]):hover {
  color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Homepage */

.soon {
  display: inline-block;
  margin-top: var(--space-6);
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  background: var(--fill-quiet);
  box-shadow: inset 0 0 0 1px var(--outline);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.points {
  list-style: none;
  padding: 0;
  margin-top: var(--space-8);
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 40em) {
  .points {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6) var(--space-7);
  }
}

.points h2 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.points p {
  margin-top: var(--space-1);
  color: var(--text-secondary);
  text-wrap: pretty;
}

/* Footer */

.site-footer {
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid var(--separator);
  font-size: 0.9375rem;
  color: var(--text-tertiary);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

/* Footer and link rows: no underline. The links sit in a list (or a row set
   apart by middots), so their brighter ink carries them; hover brightens. */
.site-footer a,
.dl-after a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 150ms cubic-bezier(0.23, 1, 0.32, 1);
}

.site-footer a:hover,
.dl-after a:hover {
  color: var(--text-primary);
}

@media (min-width: 40em) {
  .site-footer .owner {
    margin-left: auto;
  }
}

/* Privacy policy */

.policy {
  max-width: 38rem;
}

.policy section {
  margin-top: var(--space-7);
  scroll-margin-top: var(--space-5);
}

.policy h2 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.005em;
}

.policy h3 {
  margin-top: var(--space-5);
  font-size: 1rem;
  font-weight: 600;
}

.policy p,
.policy ul,
.policy ol,
.policy dl,
.policy .table {
  margin-top: var(--space-3);
}

.policy ul,
.policy ol {
  padding-left: 1.25rem;
}

.policy li + li {
  margin-top: var(--space-2);
}

.policy p,
.policy li {
  text-wrap: pretty;
}

.summary {
  margin-top: var(--space-6);
  padding: var(--space-5);
  border-radius: var(--radius-card);
  background: var(--surface-raised);
  box-shadow: 0 0 0 1px var(--outline);
}

.summary h2 {
  font-size: 1rem;
}

.summary ul {
  margin-top: var(--space-3);
}

.contents {
  margin-top: var(--space-6);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.contents h2 {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.contents ol {
  margin-top: var(--space-2);
  padding-left: 1.75rem;
  columns: 2 14rem;
  column-gap: var(--space-6);
}

.contents li + li {
  margin-top: var(--space-1);
}

.contents a {
  color: var(--text-secondary);
}

.table {
  overflow-x: auto;
  border-radius: var(--radius-control);
}

.table:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.45;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-2) var(--space-3) var(--space-2) 0;
  border-bottom: 1px solid var(--separator);
}

th:last-child,
td:last-child {
  padding-right: 0;
}

thead th {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-tertiary);
}

tbody th {
  font-weight: 500;
}

td {
  color: var(--text-secondary);
}

code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.875em;
  overflow-wrap: anywhere;
}

.nowrap {
  white-space: nowrap;
}

th code {
  white-space: nowrap;
  overflow-wrap: normal;
}

.policy dt {
  font-weight: 500;
}

.policy dd {
  margin: 0 0 var(--space-2);
  color: var(--text-secondary);
}

/* Placeholders and open questions for Finn. Visible on purpose: the page is a draft. */
mark {
  background: var(--surface-sunken);
  color: var(--text-primary);
  padding: 0 0.25em;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--outline);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

@media (prefers-contrast: more) {
  :root {
    --text-tertiary: var(--text-secondary);
    --separator: rgb(30 26 23 / 0.30);
    --outline: rgb(30 26 23 / 0.30);
  }
}

@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root {
    --separator: rgb(240 238 236 / 0.34);
    --outline: rgb(240 238 236 / 0.34);
  }
}

/* ------------------------------------------------------------------
   Docs, changelog and journal (2026-11-19).
   References, principles only: family.co docs (sidebar and topic grid),
   family.co changelog (date column and timeline), the Things blog
   (centred date, serif title, wide picture). Product tokens, system fonts,
   no scripts. One paper-layer move: screenshots lie on a paper field.
------------------------------------------------------------------ */

:root {
  --surface-selected: #efece9;
  --paper-field: #f4f0ea;
  --paper-edge: rgb(59 42 34 / 0.10);
  --radius-row: 12px;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface-selected: #322929;
    --paper-field: #3b2a22;
    --paper-edge: rgb(230 215 204 / 0.12);
  }
}

.page-wide {
  max-width: 72rem;
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) var(--space-7);
}

@media (min-width: 40em) {
  .page-wide {
    padding: var(--space-6) var(--space-6) var(--space-8);
  }
}

/* Header with navigation, shared by every page */

.site-header.with-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
}

.page-wide .site-header {
  margin-bottom: var(--space-7);
}

.site-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-2);
}

.site-nav a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-control);
  font-size: 0.9375rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text-primary);
}

.site-nav a[aria-current="page"] {
  color: var(--text-primary);
  background: var(--surface-selected);
}

/* Micro label: small uppercase sans, the brand's quiet metadata voice */

.micro {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

/* Keys, as in the app's key hints */

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.05em 0.4em;
  border-radius: 5px;
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 1px var(--outline), 0 1px 0 var(--outline);
  font-family: var(--font-mono);
  font-size: 0.8125em;
  line-height: 1.5;
  text-align: center;
  color: var(--text-primary);
  white-space: nowrap;
}

/* Buttons: one primary per page, the only accent fill */

.actions {
  margin-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-control);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-primary);
  background: var(--fill-quiet);
  box-shadow: inset 0 0 0 1px var(--outline);
}

.button.primary {
  background: var(--accent);
  color: #fdfbfa;
  box-shadow: none;
}

@media (prefers-color-scheme: dark) {
  .button.primary {
    color: #221013;
  }
}

/* Screenshot on paper: the one paper-layer move. The screenshot stays clean. */

.on-paper {
  margin: var(--space-6) 0 0;
  padding: clamp(var(--space-4), 5vw, var(--space-7));
  border-radius: var(--radius-card);
  background: var(--paper-field);
  box-shadow: inset 0 0 0 1px var(--paper-edge);
}

.on-paper img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgb(30 26 23 / 0.08), 0 12px 32px rgb(30 26 23 / 0.12);
}

.on-paper figcaption {
  margin-top: var(--space-4);
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Docs: sidebar and article */

.docs {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 56em) {
  .docs {
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: var(--space-8);
  }
}

.docs-nav {
  font-size: 0.9375rem;
}

.docs-nav h2 {
  margin-top: var(--space-5);
}

.docs-nav h2:first-child {
  margin-top: 0;
}

.docs-nav ul {
  list-style: none;
  padding: 0;
  margin-top: var(--space-2);
}

.docs-nav a {
  display: block;
  padding: 6px var(--space-3);
  margin-left: calc(-1 * var(--space-3));
  border-radius: var(--radius-control);
  color: var(--text-secondary);
  text-decoration: none;
}

.docs-nav a:hover {
  color: var(--text-primary);
}

.docs-nav a[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 500;
  background: var(--surface-selected);
}

@media (max-width: 55.99em) {
  .docs-nav {
    padding-bottom: var(--space-5);
    border-bottom: 1px solid var(--separator);
  }
  .docs-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0 var(--space-4);
  }
  .docs-nav a {
    margin-left: 0;
    padding: 6px 0;
  }
  .docs-nav a[aria-current="page"] {
    background: none;
    color: var(--text-primary);
    font-weight: 500;
  }
}

.article {
  max-width: 42rem;
}

.article > .micro {
  display: block;
  margin-bottom: var(--space-3);
}

.article h2 {
  margin-top: var(--space-7);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  scroll-margin-top: var(--space-5);
}

.article h3 {
  margin-top: var(--space-5);
  font-size: 1rem;
  font-weight: 600;
}

.article p,
.article ul,
.article ol,
.article .table {
  margin-top: var(--space-3);
}

.article ul,
.article ol {
  padding-left: 1.25rem;
}

.article li + li {
  margin-top: var(--space-2);
}

.article p,
.article li {
  text-wrap: pretty;
}

.article td kbd + kbd {
  margin-left: 2px;
}

.note {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-row);
  background: var(--surface-sunken);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* Topic grid on the docs home */

.topics {
  list-style: none;
  padding: 0;
  margin-top: var(--space-7);
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 40em) {
  .topics {
    grid-template-columns: 1fr 1fr;
  }
}

.topics a {
  display: block;
  height: 100%;
  padding: var(--space-5);
  border-radius: var(--radius-card);
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 1px var(--outline);
  text-decoration: none;
}

.topics a:hover {
  box-shadow: inset 0 0 0 1px var(--text-tertiary);
}

.topics h3 {
  font-size: 1rem;
  font-weight: 600;
}

.topics p {
  margin-top: var(--space-1);
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.next {
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid var(--separator);
}

.next a {
  display: inline-block;
  margin-top: var(--space-1);
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: none;
}

.next a::after {
  content: " \2192";
  color: var(--text-tertiary);
}

/* Changelog: date column, a quiet line with a dot, then the entry */

.changelog-head {
  max-width: 42rem;
}

.entries {
  list-style: none;
  padding: 0;
  margin-top: var(--space-8);
}

.entry {
  display: grid;
  gap: var(--space-2);
  padding-bottom: var(--space-8);
}

@media (min-width: 48em) {
  .entry {
    grid-template-columns: 9rem 2.5rem minmax(0, 42rem);
    gap: 0;
  }
  .entry-date {
    padding-top: 0.15rem;
  }
  .entry-rail {
    position: relative;
  }
  .entry-rail::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: calc(-1 * var(--space-8));
    left: 50%;
    width: 1px;
    background: var(--separator);
  }
  .entry:last-child .entry-rail::before {
    bottom: 0;
  }
  .entry-rail::after {
    content: "";
    position: absolute;
    top: 0.55rem;
    left: calc(50% - 3px);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-tertiary);
  }
}

.entry-date {
  font-size: 0.9375rem;
  color: var(--text-tertiary);
}

.entry-body h2 {
  margin-top: var(--space-2);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.625rem;
  line-height: 1.2;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.entry-body > p {
  margin-top: var(--space-3);
  color: var(--text-secondary);
  text-wrap: pretty;
}

.entry-body h3 {
  margin-top: var(--space-5);
  font-size: 0.9375rem;
  font-weight: 600;
}

.entry-body ul {
  margin-top: var(--space-2);
  padding-left: 1.25rem;
}

.entry-body li + li {
  margin-top: var(--space-2);
}

.entry-body li {
  text-wrap: pretty;
}

/* Journal: centred, like a letter */

.journal {
  max-width: 40rem;
  margin: 0 auto;
}

.post {
  text-align: center;
}

.post + .post {
  margin-top: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--separator);
}

.post time,
.letter-head time {
  font-size: 0.9375rem;
  color: var(--text-tertiary);
}

.post h2 {
  margin-top: var(--space-3);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.875rem, 5vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.post h2 a {
  text-decoration: none;
}

.post > p {
  margin: var(--space-5) auto 0;
  max-width: 34rem;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--text-secondary);
  text-align: left;
  text-wrap: pretty;
}

.post .on-paper {
  text-align: left;
}

.post .more {
  display: inline-block;
  margin-top: var(--space-5);
  font-weight: 500;
}

.letter-head {
  text-align: center;
}

.letter-head h1 {
  margin-top: var(--space-3);
}

.letter {
  max-width: 36rem;
  margin: var(--space-7) auto 0;
  font-size: 1.125rem;
  line-height: 1.6;
}

.letter p + p,
.letter h2 + p,
.letter p + ul,
.letter ul + p {
  margin-top: var(--space-4);
}

.letter h2 {
  margin-top: var(--space-7);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.25;
}

.letter ul {
  padding-left: 1.25rem;
}

.letter li + li {
  margin-top: var(--space-2);
}

.letter p,
.letter li {
  text-wrap: pretty;
}

.signature {
  margin-top: var(--space-6);
  color: var(--text-secondary);
}

.journal .on-paper,
.letter-figure {
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 64em) {
  .journal .on-paper,
  .letter-figure {
    width: 52rem;
    margin-left: -6rem;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.article .topics {
  padding-left: 0;
  margin-top: var(--space-4);
}

.article .topics li + li {
  margin-top: 0;
}

.article .topics h3 {
  margin-top: 0;
}

/* ------------------------------------------------------------------
   Quiet pass (2026-11-19), after tactile-design and ordinary-interfaces,
   with Buena, Sesame and Legora as the pace: big serif statements, small
   precise UI shots, generous space, one deep accent, no eyebrows.
------------------------------------------------------------------ */

:root {
  --ring: rgb(30 26 23 / 0.08);
  --drop: 0 1px 2px 0 rgb(30 26 23 / 0.12);
  --shadow-raised: 0 0 0 1px var(--ring), var(--drop);
  --shadow-card: 0 0 0 1px rgb(30 26 23 / 0.07), var(--drop), 0 3px 4px -2px rgb(30 26 23 / 0.08);
  --hairline: 0.5px solid rgb(30 26 23 / 0.14);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ring: rgb(240 238 236 / 0.10);
    --drop: 0 1px 2px 0 rgb(0 0 0 / 0.5);
    --shadow-raised: 0 0 0 0.5px #4a3f3f, var(--drop);
    --shadow-card: 0 0 0 0.5px #463b3b, var(--drop), 0 3px 4px -2px rgb(0 0 0 / 0.5);
    --hairline: 0.5px solid rgb(240 238 236 / 0.16);
    /* Dark: the screenshot lies on a raised surface, not on brown paper. */
    --paper-field: #2a2222;
    --paper-edge: #3a3030;
  }
}

/* Statements: larger serif, more air, like an editorial page */
.display {
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.title {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lead {
  font-size: 1.1875rem;
  line-height: 1.55;
}

/* Hairlines are hairlines */
.site-footer,
.next,
.post + .post {
  border-top: var(--hairline);
}

@media (max-width: 55.99em) {
  .docs-nav {
    border-bottom: var(--hairline);
  }
}

/* Buttons: one primary in the accent, a raised white secondary, both pressable */
.button {
  background: var(--surface-raised);
  box-shadow: var(--shadow-raised);
  letter-spacing: -0.01em;
  transition: transform 150ms var(--ease-out), background-color 150ms var(--ease-out);
}

.button.primary {
  box-shadow: 0 0 0 1px var(--accent), var(--drop);
}

.button:active {
  transform: scale(0.97);
}

/* "Coming soon" is a fact, not a control: quiet text, no grey pill */
.soon {
  padding: 0;
  background: none;
  box-shadow: none;
  border-radius: 0;
  font-size: 0.9375rem;
  color: var(--text-tertiary);
}

/* The one paper move: a small, precise UI shot on paper. Crisp edges, no soft blur */
.on-paper {
  padding: clamp(var(--space-3), 4vw, var(--space-6));
  box-shadow: none;
}

.on-paper img {
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}

/* Docs: group names are quiet sentence-case labels, not eyebrows */
.docs-nav .group {
  margin-top: var(--space-5);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-tertiary);
}

.docs-nav .group:first-child {
  margin-top: 0;
}

.article .title + .lead {
  margin-top: var(--space-4);
}

.note {
  border-radius: 8px;
}

/* Changelog: the kind of build is metadata, under the date */
.entry-kind {
  display: block;
  margin-top: 2px;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.entry-body h2 {
  margin-top: 0;
}

/* Journal index: letters, so the titles carry it */
.post h2 {
  font-size: clamp(2rem, 5vw, 2.75rem);
}

.post .more {
  font-size: 0.9375rem;
}

/* Keys sit like small tactile chips */
kbd {
  box-shadow: var(--shadow-raised);
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: background-color 150ms var(--ease-out);
  }
  .button:active {
    transform: none;
  }
}

/* ------------------------------------------------------------------
   Landing page, second version (2026-11-19). Finn: "work with real
   imagery, enterprise look, icons", the app icon, and Sona's always
   visible download button. The page is a paper sheet with rounded
   bottom corners over a Noir frame; a fixed dock at the bottom holds
   the brand, the links and the one call to action. Real app
   screenshots, light and dark, carry every feature. Headlines are two
   tone: the claim in ink, the promise in tertiary.
------------------------------------------------------------------ */

.landing {
  --frame: #1f1718;
  --sheet: #f4f0ea;
  --cream: #e6d7cc;
  --wax: #7c2135;
  background: var(--frame);
  padding-bottom: 128px; /* the dock (72px), its 48px fade and a little air */
}

@media (prefers-color-scheme: dark) {
  .landing {
    --frame: #110c0c;
    --sheet: #1f1718;
  }
}

.sheet {
  background: var(--sheet);
  border-radius: 0 0 28px 28px;
  /* clip, not hidden: hidden makes the sheet a scroll container and breaks scroll timelines */
  overflow: clip;
}

.landing main > section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 120px var(--space-5);
}

@media (max-width: 47.99em) {
  .landing main > section {
    padding: 72px var(--space-4);
  }
}

.ic {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.two-tone {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text-tertiary);
  text-wrap: balance;
}

.two-tone span {
  color: var(--text-primary);
}

/* Hero */
.landing .hero {
  padding-top: 96px;
  padding-bottom: 72px;
  text-align: center;
}

.hero-icon {
  display: block;
  width: 112px;
  height: 112px;
  margin: 0 auto var(--space-6);
  filter: drop-shadow(0 18px 24px rgb(31 23 24 / 0.28));
}

.hero-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(3.25rem, 9vw, 6.25rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: var(--space-5) auto 0;
  max-width: 34rem;
  font-size: 1.1875rem;
  line-height: 1.55;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.hero-actions {
  margin-top: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

.landing .button.primary {
  background: var(--wax);
  color: var(--cream);
  box-shadow: 0 0 0 1px var(--wax), var(--drop);
}

.hero-shot {
  margin: 72px auto 0;
}

.hero-shot img,
.feature-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-card), 0 30px 60px -40px rgb(31 23 24 / 0.45);
}

.trust {
  list-style: none;
  padding: 0;
  margin: var(--space-7) auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3) var(--space-6);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.trust li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.trust .ic {
  color: var(--text-tertiary);
}

/* Features: text and a real screenshot, alternating */
.feature {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}

@media (min-width: 60em) {
  .feature {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 64px;
  }
  .feature-flip .feature-text {
    order: 2;
  }
}

.landing main > .feature {
  border-top: var(--hairline);
}

.feature-text p {
  margin-top: var(--space-4);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.feature-text .key-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-5);
  font-size: 0.875rem;
}

.key-hint span {
  margin-left: var(--space-2);
  color: var(--text-tertiary);
}

.feature-shot {
  margin: 0;
}

/* Numbers */
.landing .numbers {
  border-top: var(--hairline);
}

.numbers dl {
  margin-top: var(--space-7);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-6);
}

@media (min-width: 48em) {
  .numbers dl {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.numbers dd {
  margin: var(--space-2) 0 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.75rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.numbers dd small {
  font-size: 0.4em;
  color: var(--text-tertiary);
  letter-spacing: 0;
}

.numbers dt {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* Private by design: the security grid */
.landing .private {
  max-width: none;
  background: var(--frame);
  color: var(--cream);
}

.private > * {
  max-width: calc(72rem - 2 * var(--space-5));
  margin-left: auto;
  margin-right: auto;
}

.private .two-tone {
  color: rgb(230 215 204 / 0.55);
}

.private .two-tone span {
  color: var(--cream);
}

.sec-grid {
  list-style: none;
  padding: 0;
  margin-top: var(--space-7);
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 40em) {
  .sec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 60em) {
  .sec-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.sec-grid li {
  padding: var(--space-5);
  border-radius: 12px;
  background: rgb(230 215 204 / 0.05);
  box-shadow: inset 0 0 0 0.5px rgb(230 215 204 / 0.14);
}

.sec-grid .ic {
  width: 28px;
  height: 28px;
  stroke-width: 1.4;
  color: var(--cream);
  opacity: 0.9;
}

.sec-grid h3 {
  margin-top: var(--space-4);
  font-size: 1rem;
  font-weight: 600;
}

.sec-grid p {
  margin-top: var(--space-1);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: rgb(230 215 204 / 0.7);
}

.private-note {
  margin-top: var(--space-6);
  font-size: 0.9375rem;
  color: rgb(230 215 204 / 0.7);
}

.private-note a {
  color: var(--cream);
  text-decoration: none;
  white-space: nowrap;
}

.private-note a::after {
  content: " →";
}

.private a:focus-visible {
  outline-color: var(--cream);
}

/* Closing */
.landing .closing {
  text-align: center;
}

.closing-icon {
  width: 64px;
  height: 64px;
  filter: drop-shadow(0 10px 14px rgb(31 23 24 / 0.25));
}

.closing-title {
  margin-top: var(--space-5);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.closing-note {
  margin-top: var(--space-4);
  font-size: 0.9375rem;
  color: var(--text-tertiary);
}

/* Footer on the frame */
.frame-footer {
  max-width: 72rem;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-5);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 0.8125rem;
  color: rgb(230 215 204 / 0.55);
}

.frame-footer ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
}

.frame-footer a {
  color: rgb(230 215 204 / 0.75);
  text-decoration: none;
}

.frame-footer a:hover {
  color: var(--cream);
}

/* The dock: always visible, after Sona */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 72px;
  padding: 0 max(var(--space-5), calc((100vw - 72rem) / 2 + var(--space-5)));
  --dock-bg: rgb(31 23 24 / 0.92);
  background: var(--dock-bg);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  color: var(--cream);
}

/* Text scrolling under the dock fades out over 48px instead of being cut
   at a hard edge (Finn, 2026-11-20). */
.dock::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 48px;
  pointer-events: none;
  background: linear-gradient(to top, var(--dock-bg), transparent);
}

@media (prefers-color-scheme: dark) {
  .dock {
    --dock-bg: rgb(17 12 12 / 0.92);
  }
}

.dock-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border-radius: var(--radius-control);
  text-decoration: none;
  color: var(--cream);
}

.dock-brand img {
  width: 32px;
  height: 32px;
}

.dock-wordmark {
  display: block;
  width: 72px;
  height: auto;
  color: var(--cream);
}

.dock-links {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: flex;
  gap: var(--space-1);
}

.dock-links a {
  display: block;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-control);
  font-size: 0.9375rem;
  color: rgb(230 215 204 / 0.78);
  text-decoration: none;
}

.dock-links a:hover {
  color: var(--cream);
}

.dock-cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-control);
  background: var(--cream);
  color: #1f1718;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.4);
  transition: transform 150ms var(--ease-out);
}

.dock-cta:active {
  transform: scale(0.97);
}

.dock a:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

@media (max-width: 40em) {
  .dock-links {
    display: none;
  }
  .dock-cta {
    margin-left: auto;
  }
  .dock-wordmark {
    width: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dock-cta:active {
    transform: none;
  }
}

/* Fast world, calm object (brand layouts no. 10): full-bleed motion photos, a quiet line on top */
.landing main > .pace,
.landing main > .anywhere {
  max-width: none;
  padding: 0;
}

.pace {
  position: relative;
  height: clamp(30rem, 86vh, 54rem);
  overflow: hidden;
}

.pace-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  filter: brightness(0.78);
}

.pace-line {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: 12vh var(--space-5) 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.25rem, 5.5vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-align: center;
  color: #e6d7cc;
  text-shadow: 0 1px 24px rgb(31 23 24 / 0.35);
  text-wrap: balance;
}

.anywhere {
  padding-bottom: 120px !important;
}

.anywhere-hero {
  position: relative;
  margin: 0;
  height: clamp(28rem, 80vh, 50rem);
  overflow: hidden;
}

.anywhere-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}

.anywhere-hero figcaption {
  position: relative;
  max-width: 72rem;
  margin: 0 auto;
  padding: 72px var(--space-5) 0;
  color: #1e1a17;
}

.anywhere-title {
  max-width: 14ch;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.anywhere-hero figcaption p {
  margin-top: var(--space-3);
  font-size: 1.0625rem;
  color: #3d3632;
}

.anywhere-strip {
  max-width: 72rem;
  margin: var(--space-5) auto 0;
  padding: 0 var(--space-5);
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 48em) {
  .anywhere-strip {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: end;
  }
}

.anywhere-strip figure {
  margin: 0;
}

.anywhere-strip img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.anywhere-strip figcaption {
  margin-top: var(--space-3);
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.3;
  color: var(--text-primary);
}

@media (max-width: 47.99em) {
  .anywhere-hero figcaption {
    padding-top: 40px;
  }
}

/* FAQ on the download page */
.dl-faq {
  margin-top: var(--space-8);
}

.dl-faq .faq-list p a {
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}

.dl-faq .faq-list p a::after {
  content: " →";
}

/* FAQ: plain disclosure rows, no script */
.faq-list {
  margin-top: var(--space-6);
  max-width: 48rem;
  border-top: var(--hairline);
}

.faq-list details {
  border-bottom: var(--hairline);
}

.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  min-height: 56px;
  padding: var(--space-3) 0;
  font-size: 1.0625rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

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

.faq-list summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-tertiary);
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.faq-list details p {
  padding: 0 0 var(--space-5);
  max-width: 40rem;
  color: var(--text-secondary);
  text-wrap: pretty;
}

.landing main > .faq {
  border-top: var(--hairline);
}

/* The airport line sits on the paper above the photo, so it never crosses the person */
.anywhere-hero {
  height: auto;
  display: flex;
  flex-direction: column;
}

.anywhere-hero figcaption {
  order: -1;
  width: 100%;
  padding: 120px var(--space-5) 48px;
  color: var(--text-primary);
}

.anywhere-hero figcaption p {
  color: var(--text-secondary);
}

.anywhere-title {
  max-width: 18ch;
}

.anywhere-hero img {
  position: static;
  height: clamp(24rem, 72vh, 46rem);
}

@media (max-width: 47.99em) {
  .anywhere-hero figcaption {
    padding-top: 72px;
  }
}

/* Small live pieces of the product, after Sona. Product layer: clean, no texture. CSS only. */
.accent-word {
  margin-bottom: var(--space-3);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
}

.piece-row {
  list-style: none;
  padding: 0;
  margin-top: var(--space-7);
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 56em) {
  .piece-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.piece-stage {
  position: relative;
  height: 13rem;
  border-radius: 16px;
  background: var(--surface-base);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.piece h3 {
  margin-top: var(--space-4);
  font-size: 1rem;
  font-weight: 600;
}

.piece p {
  margin-top: var(--space-1);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* Archive: the first row slides out, the list closes the gap */
.piece-stage:has(.mini-row) {
  place-items: stretch;
  align-content: center;
  padding: 0 var(--space-4);
  gap: 6px;
}

.mini-row {
  display: grid;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.8125rem;
  line-height: 1.3;
  background: var(--surface-raised);
  box-shadow: 0 0 0 0.5px var(--ring);
}

.mini-row b {
  font-weight: 600;
}

.mini-row span {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-row-out {
  animation: row-archive 4s var(--ease-out) infinite;
}

.piece-key {
  position: absolute;
  right: 14px;
  bottom: 12px;
  animation: key-press 4s var(--ease-out) infinite;
}

@keyframes row-archive {
  0%, 30% { transform: translateX(0); opacity: 1; max-height: 4rem; margin-bottom: 0; }
  45% { transform: translateX(-110%); opacity: 0; max-height: 4rem; }
  60%, 85% { transform: translateX(-110%); opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; margin-bottom: -6px; }
  100% { transform: translateX(0); opacity: 1; max-height: 4rem; }
}

@keyframes key-press {
  0%, 26% { transform: scale(1); }
  30% { transform: scale(0.88); background: var(--surface-selected); }
  36%, 100% { transform: scale(1); }
}

/* Undo: the pill with its ring counting down ten seconds */
.undo-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
  font-size: 0.875rem;
}

.undo-word {
  margin-left: 6px;
  font-weight: 600;
}

.undo-ring {
  width: 20px;
  height: 20px;
  transform: rotate(-90deg);
}

.undo-ring circle {
  fill: none;
  stroke-width: 2;
}

.undo-track {
  stroke: var(--separator);
}

.undo-count {
  stroke: var(--accent);
  stroke-dasharray: 50.27;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  animation: undo-count 10s linear infinite;
}

@keyframes undo-count {
  to { stroke-dashoffset: 50.27; }
}

/* Snooze: "fri 9am" typed into the tray */
.mini-tray {
  width: min(15rem, 80%);
  padding: 8px;
  border-radius: 14px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
  font-size: 0.8125rem;
}

.mini-field {
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  margin-bottom: 4px;
  border-radius: 8px;
  background: var(--surface-sunken);
}

.typed {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  font-family: var(--font-mono);
  animation: type-in 5s steps(7) infinite;
}

.caret {
  width: 1px;
  height: 14px;
  margin-left: 1px;
  background: var(--accent);
  animation: caret 1s steps(2) infinite;
}

@keyframes type-in {
  0%, 10% { width: 0; }
  45%, 90% { width: 7ch; }
  100% { width: 0; }
}

@keyframes caret {
  50% { opacity: 0; }
}

.mini-option {
  display: flex;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--text-secondary);
}

.mini-option.is-on {
  color: var(--text-primary);
  background: var(--surface-selected);
  animation: option-on 5s var(--ease-out) infinite;
}

@keyframes option-on {
  0%, 40% { background: transparent; }
  50%, 90% { background: var(--surface-selected); }
  100% { background: transparent; }
}

.landing main > .pieces {
  padding-top: 72px;
}

@media (prefers-reduced-motion: reduce) {
  .mini-row-out,
  .piece-key,
  .undo-count,
  .typed,
  .caret,
  .mini-option.is-on {
    animation: none;
  }
  .typed {
    width: 7ch;
  }
  .undo-count {
    stroke-dashoffset: 18;
  }
}

/* Polish (2026-11-19) */
.accent-on-dark {
  color: #e2909a;
}

/* Rhythm: one section height, one gap between title and content */
.landing main > .feature {
  padding-top: 96px;
  padding-bottom: 96px;
}

.landing .hero {
  padding-bottom: 96px;
}

.hero-shot {
  margin-top: 64px;
}

.trust {
  margin-top: var(--space-6);
}

/* Screenshots get a hairline frame so light shots don't melt into the paper */
.hero-shot img,
.feature-shot img {
  box-shadow: 0 0 0 0.5px rgb(30 26 23 / 0.16), var(--drop), 0 30px 60px -40px rgb(31 23 24 / 0.45);
}

@media (prefers-color-scheme: dark) {
  .hero-shot img,
  .feature-shot img {
    box-shadow: 0 0 0 0.5px rgb(240 238 236 / 0.14), 0 30px 60px -40px rgb(0 0 0 / 0.8);
  }
}

/* Feature text sits a little higher than centre, like a caption beside a photo */
@media (min-width: 60em) {
  .feature {
    align-items: start;
  }
  .feature-text {
    padding-top: var(--space-6);
  }
}

/* Numbers: hairline between figures on wide screens */
@media (min-width: 48em) {
  .numbers dl > div + div {
    padding-left: var(--space-5);
    border-left: var(--hairline);
  }
}

/* Live pieces: quieter stage, same radius as the screenshots */
.piece-stage {
  border-radius: 12px;
}

.piece h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.25rem;
}

/* The FAQ answers read as one column with the title */
.faq-list {
  max-width: 44rem;
}

/* The dock gets a little more presence on wide screens */
@media (min-width: 64em) {
  .dock {
    height: 76px;
  }
  .dock-cta {
    min-height: 42px;
    padding: 0 var(--space-5);
  }
}

/* Product shots show the part they are about (Finn: not every time the whole UI) */
.feature-shot.crop {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 0 0 0.5px rgb(30 26 23 / 0.16), var(--drop), 0 30px 60px -40px rgb(31 23 24 / 0.45);
}
@media (prefers-color-scheme: dark) {
  .feature-shot.crop {
    box-shadow: 0 0 0 0.5px rgb(240 238 236 / 0.14), 0 30px 60px -40px rgb(0 0 0 / 0.8);
  }
}
.feature-shot.crop img {
  position: absolute;
  left: 0;
  top: 0;
  max-width: none;
  border-radius: 0;
  box-shadow: none;
}
.crop-reading { aspect-ratio: 0.735; }
.crop-reading img { width: 253.16%; transform: translate(-60.50%, -2.00%); }
.crop-write { aspect-ratio: 1.333; }
.crop-write img { width: 250.00%; transform: translate(-60.00%, -50.00%); }
.crop-today { aspect-ratio: 2.286; }
.crop-today img { width: 166.67%; transform: translate(-0.00%, -0.00%); }
.crop-search { aspect-ratio: 1.107; }
.crop-search img { width: 240.96%; transform: translate(-18.50%, -0.00%); }
@media (min-width: 60em) {
  .crop-reading { max-width: 26rem; justify-self: center; }
}
.feature-shot.crop {
  width: 100%;
}
/* "Ordered by meaning" shows the stacks and the list, not the conversation */
.crop-reading { aspect-ratio: 1.745; max-width: none; }
.crop-reading img { width: 166.67%; transform: translate(0%, -4%); }

/* The text logo above the hero, 24 px high (Finn, 2026-11-19) */
.hero-logo img {
  display: block;
  height: 24px;
  width: auto;
  margin: 0 auto 56px;
}

/* The text logo in every header and above the hero, 30 px high (Finn, 2026-11-19) */
.site-logo img {
  display: block;
  height: 30px;
  width: auto;
}

.hero-logo img {
  height: 30px;
}

/* The hero logo sits near the top of the sheet, well above the icon (Finn, 2026-11-19) */
.landing .hero {
  padding-top: 40px;
}

.hero-logo img {
  margin-bottom: 88px;
}

@media (max-width: 47.99em) {
  .landing .hero {
    padding-top: 28px;
  }
  .hero-logo img {
    margin-bottom: 56px;
  }
}

/* Download now: a black button with the Apple mark (Finn, 2026-11-19), the one call to action */
.landing .button.download {
  gap: 8px;
  min-height: 48px;
  padding: 0 22px 0 18px;
  border-radius: 12px;
  background: #110c0c;
  color: #ffffff;
  font-size: 1.0625rem;
  font-weight: 500;
  box-shadow: 0 0 0 1px #110c0c, var(--drop);
}

.landing .button.download:hover {
  background: #2a2222;
}

@media (prefers-color-scheme: dark) {
  .landing .button.download {
    background: #f0eeec;
    color: #110c0c;
    box-shadow: 0 0 0 1px #f0eeec, var(--drop);
  }
  .landing .button.download:hover {
    background: #ffffff;
  }
}

.apple {
  width: 20px;
  height: 20px;
  flex: none;
  fill: currentColor;
  margin-top: -2px;
}

.hero-req {
  margin-top: var(--space-3);
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.dock-cta {
  gap: 6px;
}

.dock-cta .apple {
  width: 17px;
  height: 17px;
}

/* Journal: the one place for updates (Finn, 2026-11-19), after the Things blog */
.journal-head {
  text-align: center;
  margin-bottom: var(--space-8);
}

.journal-head .lead {
  margin-left: auto;
  margin-right: auto;
}

.letter-photo {
  margin: var(--space-6) 0;
}

.letter-photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 0 0 0.5px rgb(30 26 23 / 0.16), var(--drop), 0 30px 60px -40px rgb(31 23 24 / 0.45);
}

.in-version {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: var(--hairline);
}

.in-version h2 {
  margin-top: 0;
  font-size: 1.125rem;
}

.in-version h3 {
  margin-top: var(--space-4);
  font-size: 0.9375rem;
  font-weight: 600;
}
.letter-photo.crop img {
  border-radius: 0;
  box-shadow: none;
}

/* From a pile to a plan: three photos as one short story (Finn, 2026-11-20) */
.story-row {
  list-style: none;
  padding: 0;
  margin-top: var(--space-7);
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 56em) {
  .story-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.story-row figure {
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 12px;
}

.story-row img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-row li:nth-child(1) img { object-position: 50% 60%; }
.story-row li:nth-child(2) img { object-position: 40% 60%; }
.story-row li:nth-child(3) img { object-position: 60% 30%; }

.story-row p {
  margin-top: var(--space-3);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.story-row b {
  font-weight: 600;
  color: var(--text-primary);
}

.landing main > .story {
  padding-top: 96px;
}

/* Compact UI showcase (Finn, 2026-11-20): smaller feature rows, today and search as a pair */
.landing main > .feature {
  padding-top: 72px;
  padding-bottom: 72px;
}

.feature .two-tone {
  font-size: clamp(1.75rem, 3.2vw, 2.375rem);
}

.feature-text p {
  font-size: 1rem;
}

@media (min-width: 60em) {
  .feature {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 56px;
  }
}

.duo-row {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 56em) {
  .duo-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-6);
  }
}

.duo-card .feature-shot {
  margin: 0;
}

.duo-card .crop-today,
.duo-card .crop-search {
  aspect-ratio: 1.6;
}

.duo-card .crop-search img {
  transform: translate(-18.5%, 0%);
}

.duo-text {
  margin-top: var(--space-5);
}

.duo-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--text-tertiary);
  text-wrap: balance;
}

.duo-title span {
  color: var(--text-primary);
}

.duo-text p:not(.accent-word):not(.key-hint) {
  margin-top: var(--space-3);
  color: var(--text-secondary);
  text-wrap: pretty;
}

.duo-text .key-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-4);
  font-size: 0.875rem;
}

.landing main > .duo {
  padding-top: 72px;
  border-top: var(--hairline);
}

/* Without the strip, the airport section ends with its photo */
.anywhere {
  padding-bottom: 0 !important;
}

/* Security grid: no outlines, the cards are a faint fill only (Finn, 2026-11-20) */
.sec-grid li {
  box-shadow: none;
  background: rgb(230 215 204 / 0.04);
}

.closing-title {
  margin-top: 0;
}

/* The dock carries the text logo, in stamp cream on the dark bar */
.dock-brand img.dock-logo {
  width: auto;
  height: 28px;
}

/* To-dos and Today (Finn, 2026-11-20): a live Today list beside the text, CSS only.
   Rows tick off one by one with the check filling, the count ticks down, and the
   list closes the gap, as in the app. Product layer: clean, near monochrome. */
.landing main > .todos {
  border-top: var(--hairline);
  padding-top: 96px;
  padding-bottom: 96px;
  display: grid;
  gap: var(--space-7);
  align-items: center;
}

@media (min-width: 60em) {
  .landing main > .todos {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 64px;
  }
}

.todos .two-tone {
  font-size: clamp(1.75rem, 3.2vw, 2.375rem);
}

.todos-text > p:not(.accent-word) {
  margin-top: var(--space-4);
  color: var(--text-secondary);
  text-wrap: pretty;
}

.todo-keys {
  list-style: none;
  padding: 0;
  margin-top: var(--space-5);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-4);
  font-size: 0.875rem;
}

.todo-keys li {
  display: flex;
  align-items: center;
  gap: 4px;
}

.todo-keys span {
  margin-left: var(--space-2);
  color: var(--text-tertiary);
}

.today-demo {
  position: relative;
  padding: 20px 16px 64px;
  border-radius: 16px;
  background: var(--surface-base);
  box-shadow: var(--shadow-card), 0 30px 60px -40px rgb(31 23 24 / 0.45);
  font-size: 0.875rem;
  overflow: hidden;
}

.today-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 0 8px 12px;
}

.today-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.5rem;
}

.today-count {
  position: relative;
  width: 1ch;
  height: 1.2em;
  font-variant-numeric: tabular-nums;
  color: var(--text-tertiary);
}

.today-count i {
  position: absolute;
  inset: 0;
  font-style: normal;
  opacity: 0;
}

.today-count .c4 { animation: count-4 9s steps(1) infinite; }
.today-count .c3 { animation: count-3 9s steps(1) infinite; }
.today-count .c2 { animation: count-2 9s steps(1) infinite; }

@keyframes count-4 { 0%, 22% { opacity: 1; } 22.01%, 100% { opacity: 0; } }
@keyframes count-3 { 0%, 22% { opacity: 0; } 22.01%, 52% { opacity: 1; } 52.01%, 100% { opacity: 0; } }
@keyframes count-2 { 0%, 52% { opacity: 0; } 52.01%, 92% { opacity: 1; } 92.01%, 100% { opacity: 0; } }

.today-new {
  margin-left: auto;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.todo {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 10px;
  max-height: 4.5rem;
  overflow: hidden;
}

.todo-main {
  display: grid;
  gap: 1px;
}

.todo-main b {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.todo-main small {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.todo-when {
  font-variant-numeric: tabular-nums;
  color: var(--text-tertiary);
}

.check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--text-secondary);
  position: relative;
}

.check::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--text-secondary);
  transform: scale(0);
}

/* Row 1 is selected first, then ticked; row 2 next; then they return */
.t1 { animation: row-selected 9s linear infinite, row-done-1 9s var(--ease-out) infinite; }
.t1 .check::after { animation: check-1 9s var(--ease-out) infinite; }
.t2 { animation: row-done-2 9s var(--ease-out) infinite; }
.t2 .check::after { animation: check-2 9s var(--ease-out) infinite; }

@keyframes row-selected {
  0%, 4% { background: transparent; }
  6%, 20% { background: var(--surface-selected); }
  22%, 100% { background: transparent; }
}

@keyframes check-1 {
  0%, 16% { transform: scale(0); }
  18%, 92% { transform: scale(1); }
  96%, 100% { transform: scale(0); }
}

@keyframes row-done-1 {
  0%, 20% { opacity: 1; transform: translateX(0); max-height: 4.5rem; }
  24% { opacity: 0; transform: translateX(-24px); max-height: 4.5rem; }
  28%, 92% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
  100% { opacity: 1; transform: translateX(0); max-height: 4.5rem; }
}

@keyframes check-2 {
  0%, 46% { transform: scale(0); }
  48%, 92% { transform: scale(1); }
  96%, 100% { transform: scale(0); }
}

@keyframes row-done-2 {
  0%, 36% { background: transparent; opacity: 1; transform: translateX(0); max-height: 4.5rem; }
  38%, 48% { background: var(--surface-selected); }
  50% { opacity: 1; transform: translateX(0); max-height: 4.5rem; }
  54% { opacity: 0; transform: translateX(-24px); max-height: 4.5rem; background: transparent; }
  58%, 92% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
  100% { opacity: 1; transform: translateX(0); max-height: 4.5rem; }
}

.today-bar {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  gap: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.today-bar span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.landing main > .feature-compact {
  border-top: var(--hairline);
}

@media (prefers-reduced-motion: reduce) {
  .t1, .t2, .t1 .check::after, .t2 .check::after, .today-count i {
    animation: none;
  }
  .today-count .c4 { opacity: 1; }
}

/* Closing: a sealed letter that opens as it scrolls into view (Finn, 2026-11-20).
   Paper layer (DESIGN 5.4): Paper envelope, one Wax seal with the icon die, the
   letter carries the ink wordmark. Envelope open per the cosia-brand motion
   recipe: the flap turns on X through 180 degrees, then the letter slides up.
   Tied to scroll, so it is interruptible and runs backwards; no idle loop.
   The static state is the open letter, so browsers without scroll timelines and
   Reduce Motion both show the end state. */
.landing .closing {
  position: relative;
  padding-top: 64px;
}

.env {
  --env-w: min(25rem, 82vw);
  position: relative;
  width: var(--env-w);
  aspect-ratio: 32 / 21;
  margin: calc(var(--env-w) * 0.42) auto var(--space-6);
  view-timeline: --env block;
  text-align: left;
}

.env-inside,
.env-pocket,
.env-letter,
.env-flap {
  position: absolute;
}

.env-inside {
  inset: 0;
  z-index: 1;
  border-radius: 3px;
  background: #e4dccf url(/img/env/bone.webp) center / cover;
  box-shadow:
    0 1px 2px rgb(28 18 13 / 0.16),
    0 22px 40px -22px rgb(28 18 13 / 0.45);
}

.env-letter {
  z-index: 2;
  left: 5%;
  right: 5%;
  top: 4%;
  height: 92%;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  align-items: center;
  padding: 1.375rem 1.5rem;
  text-align: center;
  border-radius: 2px;
  background: #faf7f2 url(/img/env/letter.webp) center / cover;
  box-shadow: 0 1px 2px rgb(28 18 13 / 0.14), 0 -1px 0 rgb(28 18 13 / 0.04);
  transform: translateY(-60%);
}

/* Letter type scales with the envelope, so the phone shows the same letter */
.env-letter {
  font-size: calc(var(--env-w) / 25);
  gap: 0;
  padding: 1.1em 1.4em;
}

.env-head {
  display: flex;
  align-self: stretch;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.7em;
  border-bottom: 0.5px solid rgb(30 26 23 / 0.18);
}

.env-head span {
  font-size: 0.6em;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5b534f;
}

.env-mark {
  width: auto;
  height: 1.05em;
}

.env-letter .closing-sub {
  margin: 0.8em 0 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.3em;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #1e1a17;
}

.env-stacks {
  list-style: none;
  width: 12.5em;
  margin: 0.9em 0 0;
  padding: 0;
  font-size: 0.72em;
  color: #1e1a17;
}

.env-stacks li {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  padding: 0.18em 0;
}

.env-stacks i {
  flex: 1;
  border-bottom: 1px dotted rgb(30 26 23 / 0.35);
}

.env-stacks b {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #5b534f;
}

/* Three stamps fly up out of the envelope once the letter is up and land
   around it, in front of the letter (paper layer: stamp patches in cocoa, mocha and noir) */
.env-stamp {
  position: absolute;
  z-index: 7;
  left: 50%;
  top: 50%;
  width: calc(var(--env-w) * 0.21);
  height: auto;
  transform: translate(-50%, -50%) translate(var(--x), var(--y)) rotate(var(--r));
}

.env-stamp.s1 { --x: calc(var(--env-w) * -0.64); --y: calc(var(--env-w) * -0.2);  --r: -12deg; }
.env-stamp.s2 { --x: calc(var(--env-w) * 0.63);  --y: calc(var(--env-w) * -0.02); --r: 9deg; }
.env-stamp.s3 { --x: calc(var(--env-w) * 0.52);  --y: calc(var(--env-w) * -0.5);  --r: 15deg; }

@media (max-width: 40em) {
  .env-stamp.s1 { --x: calc(var(--env-w) * -0.5); }
  .env-stamp.s2 { --x: calc(var(--env-w) * 0.5); }
  .env-stamp.s3 { --x: calc(var(--env-w) * 0.47); }
}

.env-pocket {
  inset: 0;
  z-index: 3;
  border-radius: 0 0 3px 3px;
  background:
    url(/img/env/creases.svg) 0 0 / 100% 100%,
    #f4f0ea url(/img/env/paper.webp) center / cover;
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%);
}

.env-flap {
  z-index: 1;
  left: 0;
  right: 0;
  top: 0;
  height: 58%;
  transform-origin: 50% 0;
  transform-style: preserve-3d;
  transform: perspective(1200px) rotateX(180deg);
}

.env-flap-out,
.env-flap-in {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.env-flap-out {
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background:
    url(/img/env/flap.svg) 0 0 / 100% 100%,
    #f4f0ea url(/img/env/paper.webp) top / 100% auto;
}

.env-flap-in {
  clip-path: polygon(0 100%, 100% 100%, 50% 0);
  transform: rotateX(180deg);
  background: #e4dccf url(/img/env/bone.webp) bottom / 100% auto;
}

/* The seal peels off like a sticker before the flap opens: one edge lifts,
   the shadow grows, then it drops and comes to rest beside the envelope */
.env-seal {
  --sx: calc(var(--env-w) * -0.3);
  --sy: calc(var(--env-w) * -0.42);
  position: absolute;
  z-index: 6;
  left: 50%;
  top: 58%;
  width: 22%;
  aspect-ratio: 1;
  transform-origin: 30% 80%;
  transform: translate(-50%, -60%) translate(var(--sx), var(--sy)) rotate(-28deg) scale(0.92);
  /* it leaves out of focus as well as out of sight */
  filter: drop-shadow(0 16px 14px rgb(60 12 24 / 0.18)) blur(8px);
  opacity: 0;
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .env-flap {
      animation: env-flap linear both;
      animation-timeline: --env;
      animation-range: cover 32% cover 42%;
    }
    .env-seal {
      animation: env-seal-peel linear both;
      animation-timeline: --env;
      animation-range: cover 21% cover 33%;
    }
    .seal-front {
      animation: seal-front linear both;
      animation-timeline: --env;
      animation-range: cover 21% cover 33%;
    }
    .seal-back {
      animation: seal-back linear both;
      animation-timeline: --env;
      animation-range: cover 21% cover 33%;
    }
    .env-letter {
      animation: env-letter linear both;
      animation-timeline: --env;
      animation-range: cover 40% cover 51%;
    }
    .env-stamp {
      animation: env-stamp linear both;
      animation-timeline: --env;
      animation-range: cover 47% cover 58%;
    }
    .env-stamp.s2 { animation-range: cover 49% cover 60%; }
    .env-stamp.s3 { animation-range: cover 51% cover 62%; }
  }
}

@keyframes env-flap {
  0% { transform: perspective(1200px) rotateX(0deg); z-index: 5; }
  50% { transform: perspective(1200px) rotateX(90deg); z-index: 5; }
  50.01% { z-index: 1; }
  100% { transform: perspective(1200px) rotateX(180deg); z-index: 1; }
}

@keyframes env-seal-peel {
  0%, 55% {
    transform: translate(-50%, -60%);
    filter: drop-shadow(0 2px 2px rgb(60 12 24 / 0.3)) blur(0px);
    opacity: 1;
  }
  64% {
    transform: translate(-50%, -64%) scale(1.04);
    filter: drop-shadow(0 10px 10px rgb(60 12 24 / 0.24)) blur(0px);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -60%) translate(var(--sx), var(--sy)) rotate(-28deg) scale(0.92);
    filter: drop-shadow(0 16px 14px rgb(60 12 24 / 0.18)) blur(8px);
    opacity: 0;
  }
}

@keyframes env-letter {
  from { transform: translateY(0); }
  to { transform: translateY(-60%); }
}

/* The stamps sit low inside the envelope, behind its front (z 3, painted
   before the pocket). They fly straight up out of the opening, in front of
   the letter, and once clear of the envelope's edge they come forward (z 7)
   and travel to where they land. */
@keyframes env-stamp {
  0% {
    transform: translate(-50%, -50%) translate(0, calc(var(--env-w) * 0.2)) rotate(0deg) scale(0.94);
    z-index: 3;
  }
  45% {
    transform: translate(-50%, -50%) translate(calc(var(--x) * 0.25), calc(var(--env-w) * -0.5)) rotate(calc(var(--r) * 0.4));
    z-index: 3;
  }
  46% { z-index: 7; }
  100% { z-index: 7; }
}

/* Rounded sheet corners above the dock, after Sona: the page reads as a sheet
   that rests on the dark frame while it scrolls. */
.landing .dock {
  background: var(--frame);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: none;
}

.landing .dock::before,
.landing .dock::after {
  content: "";
  position: absolute;
  /* 1 px into the dock, so no seam of the sheet shows under the corner */
  bottom: calc(100% - 1px);
  width: 28px;
  height: 29px;
  pointer-events: none;
}

.landing .dock::before {
  left: 0;
  background: radial-gradient(circle at 100% 0, transparent 27.5px, var(--frame) 28px);
}

.landing .dock::after {
  right: 0;
  background: radial-gradient(circle at 0 0, transparent 27.5px, var(--frame) 28px);
}

/* Dock: links sit in the true centre, whatever the brand and button widths */
.landing .dock {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

.landing .dock-brand { grid-column: 1; justify-self: start; }
.landing .dock-links { grid-column: 2; margin: 0; }
.landing .dock-cta { grid-column: 3; justify-self: end; }

/* Text reveal (Finn, 2026-11-20): text fades and rises into place as it clears
   the dock, instead of sliding out from behind it. The timeline's viewport ends
   above the 72 px dock, so the reveal happens in open space. Scroll-linked, so it
   reverses; Reduce Motion keeps the fade and drops the rise. Demos and the
   envelope run their own motion and are left out. */
@supports (animation-timeline: view()) {
  .landing main :where(h1, h2, h3, p, figcaption):not(.env *, .today-demo *, .piece-stage *, .hero *, .story-row *) {
    animation: text-reveal linear both;
    animation-timeline: view(block 0px 88px);
    animation-range: entry 0% entry 100%;
  }
}

@keyframes text-reveal {
  from { opacity: 0; translate: 0 0.6em; }
}

@media (prefers-reduced-motion: reduce) {
  @keyframes text-reveal {
    from { opacity: 0; }
  }
}

/* Little room under the closing: the less page sits below the envelope, the
   lower it rests at the end of the scroll, so the opened letter stays in view */
.landing main > .closing {
  padding-bottom: 40px;
}

.landing .dock-cta {
  white-space: nowrap;
}

@media (max-width: 40em) {
  .landing .dock {
    grid-template-columns: 1fr auto;
  }
  .landing .dock-cta {
    grid-column: 2;
  }
}

/* Sticker peel for the wax seal, after reactbits.dev sticker-peel, CSS only.
   A fold line at 45 degrees moves in from the lower right corner. The front is
   clipped to the part still stuck down; the curl is the same silhouette,
   mirrored across the fold line, in the lighter wax of the seal's underside.
   The mirror is translate(c, c) followed by the reflection matrix, where c is
   the fold position (x + y = c, in seal widths). It peels, lifts, and lies
   flat again once it lands beside the envelope. */
.seal-front {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%, 0 100%);
}

.seal-curl {
  position: absolute;
  inset: 0;
  filter: drop-shadow(-2px -2px 3px rgb(40 8 16 / 0.35));
}

.seal-back {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  transform: translate(200%, 200%) matrix(0, -1, -1, 0, 0, 0);
  clip-path: polygon(100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%);
  background: linear-gradient(135deg, #3f111c 0%, #5a1d2b 60%, #74303f 100%);
  -webkit-mask: url(/img/env/seal-photo.webp) center / contain no-repeat;
  mask: url(/img/env/seal-photo.webp) center / contain no-repeat;
}

/* Fold position c runs from 2 (flat) through 1 (half) to 0 (fully peeled).
   Keyframes sit at the points where the clip shape changes, so every vertex
   moves in a straight line between them. */
@keyframes seal-front {
  0% { clip-path: polygon(0 0, 100% 0, 100% 100%, 100% 100%, 0 100%); }
  22% { clip-path: polygon(0 0, 100% 0, 100% 50%, 50% 100%, 0 100%); }
  38% { clip-path: polygon(0 0, 100% 0, 100% 0, 0 100%, 0 100%); }
  55%, 100% { clip-path: polygon(0 0, 0 0, 0 0, 0 0, 0 0); }
}

@keyframes seal-back {
  0% {
    transform: translate(200%, 200%) matrix(0, -1, -1, 0, 0, 0);
    clip-path: polygon(100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%);
  }
  22% {
    transform: translate(150%, 150%) matrix(0, -1, -1, 0, 0, 0);
    clip-path: polygon(100% 50%, 100% 50%, 100% 100%, 50% 100%, 50% 100%);
  }
  38% {
    transform: translate(100%, 100%) matrix(0, -1, -1, 0, 0, 0);
    clip-path: polygon(100% 0, 100% 0, 100% 100%, 0 100%, 0 100%);
  }
  55%, 100% {
    transform: translate(0%, 0%) matrix(0, -1, -1, 0, 0, 0);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 0);
  }
}


/* Hero icon highlight (Finn, 2026-11-20): on hover a thin rim of light
   appears along the icon's edge, brightest at the top left where the light
   comes from (DESIGN 5.4). The rim is the icon's own shape minus a slightly
   smaller copy, so it follows the corners exactly. */
.hero-icon-wrap {
  position: relative;
  display: block;
  width: 112px;
  height: 112px;
  margin: 0 auto var(--space-6);
}

.hero-icon-wrap .hero-icon {
  margin: 0;
}

.hero-icon-wrap::after {
  content: "";
  position: absolute;
  inset: -3px;
  pointer-events: none;
  /* White where the light catches it, light grey everywhere else */
  background: conic-gradient(from var(--glow),
    var(--rim-hi) 0deg,
    var(--rim-hi) 25deg,
    var(--rim-lo) 90deg,
    var(--rim-lo) 270deg,
    var(--rim-hi) 335deg,
    var(--rim-hi) 360deg);
  -webkit-mask: url(/img/icon/cosia-dark-512.png) center / 100% 100% no-repeat,
    url(/img/icon/cosia-dark-512.png) center / 95.6% 95.6% no-repeat;
  -webkit-mask-composite: xor;
  mask: url(/img/icon/cosia-dark-512.png) center / 100% 100% no-repeat exclude,
    url(/img/icon/cosia-dark-512.png) center / 95.6% 95.6% no-repeat;
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity 240ms cubic-bezier(0.23, 1, 0.32, 1),
    transform 320ms cubic-bezier(0.23, 1, 0.32, 1),
    --glow 320ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) {
  .hero-icon-wrap:hover::after {
    opacity: 1;
    transform: scale(1);
  }
}

/* The rim's brightest point follows the cursor. The site runs no scripts, so
   nine invisible zones over the icon each turn the glow toward their side;
   a registered angle lets it glide between them. */
@property --glow {
  syntax: "<angle>";
  inherits: true;
  initial-value: 315deg;
}

.hero-icon-wrap {
  --glow: 315deg;
  --rim-hi: #fff;
  --rim-lo: #d9d6d3;
}

/* On the dark page a solid light ring is too loud: the highlight softens and
   the rest becomes a faint line */
@media (prefers-color-scheme: dark) {
  .hero-icon-wrap {
    --rim-hi: rgb(255 255 255 / 0.4);
    --rim-lo: rgb(255 255 255 / 0.06);
  }
}

.glow-zones {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
}

.hero-icon-wrap:has(.z1:hover) { --glow: 315deg; }
.hero-icon-wrap:has(.z2:hover) { --glow: 0deg; }
.hero-icon-wrap:has(.z3:hover) { --glow: 45deg; }
.hero-icon-wrap:has(.z4:hover) { --glow: 270deg; }
.hero-icon-wrap:has(.z6:hover) { --glow: 90deg; }
.hero-icon-wrap:has(.z7:hover) { --glow: 225deg; }
.hero-icon-wrap:has(.z8:hover) { --glow: 180deg; }
.hero-icon-wrap:has(.z9:hover) { --glow: 135deg; }

.hero-icon-wrap {
  transition: --glow 320ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (prefers-reduced-motion: reduce) {
  .hero-icon-wrap { transition: none; }
  .hero-icon-wrap::after { transform: none; }
}

/* Story on phones (Finn, 2026-11-20): the three photos become one swipeable
   row instead of a tall stack. Each card is 72% wide, so the next one peeks
   in as the cue that there is more; cards snap to the gutter. The row bleeds
   to the screen edges while the cards keep the 16 px page gutter. */
@media (max-width: 55.99em) {
  .story-row {
    grid-auto-flow: column;
    grid-auto-columns: 72%;
    gap: var(--space-3);
    margin-top: var(--space-5);
    margin-inline: -16px;
    padding: 0 16px 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }
  .story-row::-webkit-scrollbar {
    display: none;
  }
  .story-row li {
    scroll-snap-align: start;
  }
  .story-row p {
    margin-top: var(--space-2);
    font-size: 0.875rem;
  }
  .landing main > .story {
    padding-top: 64px;
  }
}

/* Three dots under the swipe row show which photo is in view. The row's own
   scroll drives them (no scripts): each dot widens into a short bar while its
   card is in place. The middle card snaps at about 61% of the scroll range. */
.story-dots {
  display: none;
}

@media (max-width: 55.99em) {
  .landing main > .story {
    timeline-scope: --story;
  }
  .story-row {
    scroll-timeline: --story inline;
  }
  /* Left, on the gutter the cards snap to, so the dots sit under the photo
     in view rather than in the gap between two captions */
  .story-dots {
    display: flex;
    justify-content: flex-start;
    gap: 6px;
    margin-top: 20px;
  }
  .story-dots i {
    width: 6px;
    height: 6px;
    border-radius: 3px;
    background: var(--text-tertiary);
    opacity: 0.35;
  }
  .story-dots i:first-child {
    width: 18px;
    opacity: 1;
  }
  @supports (animation-timeline: scroll()) {
    .story-dots i {
      animation: linear both;
      animation-timeline: --story;
    }
    .story-dots i:nth-child(1) { animation-name: dot-1; }
    .story-dots i:nth-child(2) { animation-name: dot-2; }
    .story-dots i:nth-child(3) { animation-name: dot-3; }
  }
}

@keyframes dot-1 {
  0%, 12% { width: 18px; opacity: 1; }
  40%, 100% { width: 6px; opacity: 0.35; }
}

@keyframes dot-2 {
  0%, 25% { width: 6px; opacity: 0.35; }
  52%, 70% { width: 18px; opacity: 1; }
  92%, 100% { width: 6px; opacity: 0.35; }
}

@keyframes dot-3 {
  0%, 70% { width: 6px; opacity: 0.35; }
  92%, 100% { width: 18px; opacity: 1; }
}

/* Product renders (P23): the app's own views drawn at 3x by ImageRenderer, shown
   at their natural size, so they stay sharp on Retina instead of being enlarged
   crops of a 1x screenshot. Framed renders carry the window surface and get a
   hairline and drop that follow their rounded alpha; the writing help render
   brings its own cards and shadows. */
.feature-shot.render {
  margin: 0;
  justify-self: center;
  width: 100%;
  border-radius: 0;
  box-shadow: none;
  background: none;
}

.feature-shot.render img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
}

.feature-shot.render-framed img {
  filter:
    drop-shadow(0 0 0.5px rgb(30 26 23 / 0.3))
    drop-shadow(0 16px 22px rgb(31 23 24 / 0.1));
}

@media (prefers-color-scheme: dark) {
  .feature-shot.render-framed img {
    filter:
      drop-shadow(0 0 0.5px rgb(240 238 236 / 0.24))
      drop-shadow(0 16px 22px rgb(0 0 0 / 0.32));
  }
}

.feature-shot.render-narrow {
  max-width: 32.5rem;
}

/* "What's new" (Finn, 2026-11-20): no underline; the link is one step brighter
   than the sentence around it and carries a chevron, so it reads as a place to
   go. On hover it brightens to primary and the chevron nudges 2 px right. */
.closing-note .link-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 2px;
  padding: 6px 2px;
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms var(--ease-out);
}

.link-more svg {
  width: 6px;
  height: 10px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 150ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .closing-note .link-more:hover {
    color: var(--text-primary);
  }
  .closing-note .link-more:hover svg {
    transform: translateX(2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .link-more svg { transition: none; }
  .closing-note .link-more:hover svg { transform: none; }
}

/* The footer fades in above the dock like the rest of the page's text. It sits
   right on the dock at the end of the page, so its band is the dock's own
   height (76 px) rather than the 88 px the body text uses. */
@supports (animation-timeline: view()) {
  .landing .frame-footer > * {
    animation: reveal-soft linear both;
    animation-timeline: view(block 0px 76px);
    animation-range: entry 0% entry 100%;
  }
}

/* The dock waits (Finn, 2026-11-20): hidden while the hero is in view (the hero
   has its own Download), it rises in once the reader has scrolled about 320 px,
   over the next 100 px, and slides back down on the way up. The 29 px extra
   takes the sheet corners with it. Scroll-linked, so no scripts; without
   scroll timelines the dock is simply always there. */
/* Triggered, not scrubbed (Finn, 2026-11-20): passing 300 px of scroll flips
   one flag on the page (a 1 px scroll-driven step of a registered integer).
   The dock and its contents read the flag through a style query and play
   real, timed transitions, so the reveal looks the same however fast the
   reader scrolls, and plays back out on the way up. */
@property --dock-on {
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}

@supports (animation-timeline: scroll()) {
  html:has(body.landing) {
    animation: dock-flag linear both;
    animation-timeline: scroll(root block);
    animation-range: 300px 301px;
  }

  .landing .dock {
    transform: translateY(calc(100% + 29px));
    transition: transform 260ms cubic-bezier(0.23, 1, 0.32, 1);
  }

  /* Each item reveals on its own beat once the bar has nearly landed:
     brand, Docs, Journal, then the button. On the way out they leave
     together and fast. */
  .landing .dock-brand,
  .landing .dock-links li,
  .landing .dock-cta {
    opacity: 0;
    translate: 0 14px;
    filter: blur(6px);
    transition:
      opacity 160ms cubic-bezier(0.23, 1, 0.32, 1),
      translate 160ms cubic-bezier(0.23, 1, 0.32, 1),
      filter 160ms cubic-bezier(0.23, 1, 0.32, 1);
  }

  @container style(--dock-on: 1) {
    .landing .dock {
      transform: none;
      transition-duration: 420ms;
    }
    .landing .dock-brand,
    .landing .dock-links li,
    .landing .dock-cta {
      opacity: 1;
      translate: 0 0;
      filter: blur(0px);
      transition-duration: 560ms;
    }
    .landing .dock-brand { transition-delay: 220ms; }
    .landing .dock-links li:nth-child(1) { transition-delay: 300ms; }
    .landing .dock-links li:nth-child(2) { transition-delay: 370ms; }
    .landing .dock-cta { transition-delay: 450ms; }
  }
}

@keyframes dock-flag {
  from { --dock-on: 0; }
  to { --dock-on: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .landing .dock {
    transform: none;
    opacity: 0;
    transition: opacity 200ms ease;
  }
  .landing .dock-brand,
  .landing .dock-links li,
  .landing .dock-cta {
    translate: none;
    filter: none;
    transition: opacity 200ms ease;
  }
  @container style(--dock-on: 1) {
    .landing .dock { opacity: 1; transform: none; }
    .landing .dock-brand,
    .landing .dock-links li,
    .landing .dock-cta {
      transition-duration: 200ms;
      transition-delay: 0ms;
    }
  }
}

/* Fade up out of a light blur. Uses translate and filter, never transform,
   so it never fights a button's press scale. */
@keyframes reveal-soft {
  from {
    opacity: 0;
    translate: 0 10px;
    filter: blur(4px);
    animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
  }
}

@media (prefers-reduced-motion: reduce) {
  @keyframes reveal-soft {
    from { opacity: 0; }
  }
}

/* Requirements line (Finn, 2026-11-20, after the Look Alive download row):
   short facts, each with a small line icon, instead of one sentence. */
.req {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 20px;
}

.req-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.req-ic {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.closing-note.req .link-more {
  margin-left: 0;
}

/* The macOS mark is a filled glyph (Finn's icon), so it fills instead of
   stroking, at a quiet 40% like the Figma row */
.req-ic-fill {
  width: 20px;
  height: 20px;
  fill: currentColor;
  fill-opacity: 0.55;
  stroke: none;
}

/* 4 px more air between the Download button and the requirement under it */
.landing .hero-req { margin-top: 16px; }
.landing .closing-note { margin-top: 20px; }

/* Writing help on paper (Finn, 2026-11-20, after a stationery flat lay): the
   clean app render sits on real paper like a photo on a desk (DESIGN 5.4).
   Behind it a folded letter sheet and a Bone card, in front a vellum strip
   with the wordmark. Paper textures come from the brand kit's lighting
   filter, light from the top left; the shadows are layered contact plus
   ambient so the sheets read as lying on the page, not floating. */
.paper-scene {
  position: relative;
  isolation: isolate;
  padding: 9% 0 9% 0;
}

.scene-ui {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 16px; /* the tray and the composer, split apart for air */
}

/* Laid down by hand: the UI as one piece, turned slightly */
.scene-ui { transform: rotate(-1deg); }

.scene-under,
.scene-card,
.scene-sheet,
.scene-clip,
.scene-seal {
  position: absolute;
  pointer-events: none;
}

/* Both sheets are rendered with the paper filter and the brand Texture
   displacement on their edges, so the shadows follow the cut edge
   (drop-shadow, not box-shadow) */
.paper-scene img.scene-sheet {
  z-index: 1;
  left: 24%;
  top: 13%;
  width: 66%;
  height: auto;
  transform: rotate(2.5deg);
  filter:
    drop-shadow(0 0.5px 0.5px rgb(28 18 13 / 0.18))
    drop-shadow(0 8px 10px rgb(28 18 13 / 0.16))
    drop-shadow(0 30px 30px rgb(28 18 13 / 0.2));
}

@media (prefers-color-scheme: dark) {
  .paper-scene img.scene-sheet {
    filter:
      drop-shadow(0 0.5px 0.5px rgb(0 0 0 / 0.5))
      drop-shadow(0 8px 12px rgb(0 0 0 / 0.4))
      drop-shadow(0 30px 34px rgb(0 0 0 / 0.5));
  }
}



/* Less paper (Finn, 2026-11-20): one letter only, held by a paper clip at its
   top edge, and a cream wax seal beside the embossed line. Both are cut out
   of photographs, so their shadows come from the photo plus a soft drop. */
.paper-scene img.scene-clip {
  z-index: 3;
  right: 17%;
  top: 8.6%; /* its gap sits on the letter's top edge, as if clipped on */
  width: 4.2%;
  height: auto;
  transform: rotate(4deg);
  /* a thin wire just above the paper: a tight, sharp shadow to the lower right */
  filter: drop-shadow(0.75px 1.25px 0.75px rgb(28 18 13 / 0.3));
}

.paper-scene img.scene-seal {
  /* sealed across the middle, on top of the UI and the paper */
  z-index: 4;
  left: 50%;
  top: 52.5%;
  width: 15%;
  height: auto;
  transform: translate(-50%, -50%) rotate(-9deg);
  /* Wax is a few millimetres thick and the light comes from the top left:
     a tight contact line where it meets the surface, a short sharp cast to
     the lower right, and a little ambient under it */
  filter:
    drop-shadow(0 0.5px 0.5px rgb(28 18 13 / 0.5))
    drop-shadow(1.5px 2.5px 1.5px rgb(28 18 13 / 0.32))
    drop-shadow(3px 6px 8px rgb(28 18 13 / 0.18));
}

/* More paper, all white stock: a plain sheet under the letter, turned the
   other way, and a small card peeking out at the lower left */
.paper-scene img.scene-under {
  z-index: 0;
  left: 4%;
  top: 15%;
  width: 60%;
  height: auto;
  transform: rotate(-6deg);
}

.paper-scene img.scene-card {
  z-index: 1;
  left: -2%;
  bottom: 4%;
  width: 34%;
  height: auto;
  transform: rotate(-3deg);
}

.paper-scene img.scene-under,
.paper-scene img.scene-card {
  filter:
    drop-shadow(0 0.5px 0.5px rgb(28 18 13 / 0.18))
    drop-shadow(0 6px 8px rgb(28 18 13 / 0.14))
    drop-shadow(0 22px 22px rgb(28 18 13 / 0.16));
}

@media (prefers-color-scheme: dark) {
  .paper-scene img.scene-under,
  .paper-scene img.scene-card {
    filter:
      drop-shadow(0 0.5px 0.5px rgb(0 0 0 / 0.5))
      drop-shadow(0 8px 12px rgb(0 0 0 / 0.4))
      drop-shadow(0 30px 34px rgb(0 0 0 / 0.5));
  }
}

/* Mirrored feature rows put the text second, so the image must get the wide
   column there too (it had the narrow 5/12 one) */
@media (min-width: 60em) {
  .feature.feature-flip {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
}

/* Stacks you can switch (Finn, 2026-11-20): 1, 2 and 3 on the page, or a click
   on the stack rows in the shot, swap the view as in the app. The three
   renders share one grid cell and cross-fade. Without the script only the
   Must see view shows and the hit areas stay hidden. */
.stack-switch {
  position: relative;
  display: grid;
}

.stack-switch .stack-view {
  grid-area: 1 / 1;
  display: block;
  opacity: 0;
  transition: opacity 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.stack-switch[data-current="must"] [data-view="must"],
.stack-switch[data-current="fyi"] [data-view="fyi"],
.stack-switch[data-current="low"] [data-view="low"] {
  opacity: 1;
}

.stack-hits {
  display: none;
}

.js .stack-hits {
  display: block;
  position: absolute;
  /* the three stack rows in the render's sidebar (752 x 440 pt) */
  left: 1%;
  top: 64.8%;
  width: 29%;
  height: 20.4%;
}

.stack-hits button {
  display: block;
  width: 100%;
  height: 33.333%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: transparent;
  font-size: 0;
  cursor: pointer;
}

.stack-hits button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
  .stack-switch .stack-view { transition: none; }
}

/* The writing-help row gives the scene three fifths of the width, and the
   scene reaches a little past its column toward the page edge */
@media (min-width: 60em) {
  .feature.feature-flip:has(.paper-scene) {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 56px;
  }
  .paper-scene {
    margin-left: -4%;
    width: 108%;
  }
}

/* Scroll depth (Finn, 2026-11-20). Quiet and scroll-linked, so it reverses
   with the scroll and never runs on its own:
   - the two full-bleed photos move slower than the page (parallax), the
     line over the crosswalk drifts a little against them;
   - the hero window settles from slightly smaller as it comes up;
   - the story photos drift inside their frames;
   - product shots rise 16 px into place.
   All of it is transform only, and none of it runs under Reduce Motion. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .pace,
    .anywhere-hero {
      view-timeline: --bleed block;
    }

    .pace-photo,
    .anywhere-hero img {
      inset: -9% 0;
      height: 118%;
      animation: bleed-parallax linear both;
      animation-timeline: --bleed;
      animation-range: cover 0% cover 100%;
    }

    .pace-line {
      animation: line-drift linear both;
      animation-timeline: --bleed;
      animation-range: cover 0% cover 100%;
    }

    .hero-shot {
      animation: hero-settle linear both, hero-in 900ms 420ms cubic-bezier(0.23, 1, 0.32, 1) both;
      animation-timeline: view(), auto;
      animation-range: entry 0% cover 45%, normal;
      transform-origin: 50% 0;
    }

    .story-row img {
      scale: 1.08;
      animation: photo-drift linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }

    .feature-shot.render:not(.paper-scene),
    .today-demo,
    .piece-stage {
      animation: shot-rise linear both;
      animation-timeline: view(block 0px 88px);
      animation-range: entry 0% entry 100%;
    }
  }
}

@keyframes bleed-parallax {
  from { translate: 0 -8%; }
  to { translate: 0 8%; }
}

@keyframes line-drift {
  from { translate: 0 18px; }
  to { translate: 0 -18px; }
}

@keyframes hero-settle {
  from { scale: 0.96; }
  to { scale: 1; }
}

@keyframes photo-drift {
  from { translate: 0 -3%; }
  to { translate: 0 3%; }
}

@keyframes shot-rise {
  from { translate: 0 16px; opacity: 0; }
  40% { opacity: 1; }
}

/* Download button: a warm, slightly brown near-black instead of plain black
   (Finn, 2026-11-20); hover lifts it toward Cocoa */
.landing .button.download {
  background: #2a1d18;
  box-shadow: 0 0 0 1px #2a1d18, var(--drop);
}

@media (hover: hover) and (pointer: fine) {
  .landing .button.download:hover {
    background: #3b2a22;
  }
}

@media (prefers-color-scheme: dark) {
  .landing .button.download {
    background: #f0eeec;
    box-shadow: 0 0 0 1px #f0eeec, var(--drop);
  }
  .landing .button.download:hover {
    background: #ffffff;
  }
}

/* Hero entrance (Finn, 2026-11-20): once, on load. The title comes up out of a
   light blur, then the lead, the button and the window follow. Short, ease-out,
   one entrance per element; the window keeps its scroll settle as well.
   Reduce Motion keeps a plain fade. */
@media (prefers-reduced-motion: no-preference) {
  .hero-logo,
  .hero-icon-wrap,
  .hero-title,
  .hero-lead,
  .hero .hero-actions,
  .hero .hero-req {
    animation: hero-in 700ms cubic-bezier(0.23, 1, 0.32, 1) both;
  }
  .hero-logo { animation-delay: 0ms; }
  .hero-icon-wrap { animation-delay: 60ms; }
  .hero-title { animation-name: hero-title-in; animation-duration: 900ms; animation-delay: 120ms; }
  .hero-lead { animation-delay: 240ms; }
  .hero .hero-actions { animation-delay: 300ms; }
  .hero .hero-req { animation-delay: 340ms; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-title,
  .hero-lead,
  .hero .hero-actions,
  .hero-shot {
    animation: hero-fade 400ms ease both;
  }
}

@keyframes hero-in {
  from { opacity: 0; translate: 0 14px; }
}

@keyframes hero-title-in {
  from { opacity: 0; translate: 0 18px; filter: blur(6px); }
}

@keyframes hero-fade {
  from { opacity: 0; }
}

}

/* Download page (Finn, 2026-11-20): where every Download button leads. On a
   Mac the disk image starts by itself (js/download.js); the page says what
   happens next in three steps. One paper object: the Wax envelope with the
   cream seal, the brand's signature pairing (DESIGN 5.4). */
.download-page {
  margin-top: var(--space-6);
}

.dl-hero {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}

@media (min-width: 56em) {
  .dl-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 64px;
  }
}

.dl-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.dl-lead {
  margin-top: var(--space-4);
  max-width: 30ch;
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.dl-actions {
  margin-top: var(--space-5);
}

.download-page .button.download {
  gap: 8px;
  min-height: 48px;
  padding: 0 22px 0 18px;
  border-radius: 12px;
  background: #2a1d18;
  color: #ffffff;
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 0 0 1px #2a1d18, var(--drop);
}

@media (hover: hover) and (pointer: fine) {
  .download-page .button.download:hover { background: #3b2a22; }
}

@media (prefers-color-scheme: dark) {
  .download-page .button.download {
    background: #f0eeec;
    color: #110c0c;
    box-shadow: 0 0 0 1px #f0eeec, var(--drop);
  }
  .download-page .button.download:hover { background: #ffffff; }
}

.download-page .req {
  justify-content: flex-start;
  margin-top: var(--space-4);
  font-size: 0.875rem;
  color: var(--text-tertiary);
}

.dl-object {
  margin: 0;
  padding: 0 4%;
}

.download-page {
  overflow-x: clip; /* the tilted envelope never widens the page */
}



.dl-steps {
  margin-top: 96px;
}

.dl-steps-title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.dl-steps ol {
  list-style: none;
  margin: var(--space-5) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 56em) {
  .dl-steps ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.dl-steps li {
  padding: var(--space-5);
  border-radius: 16px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-card);
}

/* Each step carries a small hand-drawn line illustration in the text
   colour (Finn, 2026-11-20): the disk image dropping into the tray, the
   app moving into the Applications folder, the window with a key. */
.dl-step-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.dl-ill {
  flex: none;
  width: 104px;
  height: 76px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--text-secondary);
}

/* Two-tone step icons: the object gets a soft fill of its line colour, the
   part that moves (the arrow, the drag, the key) takes the accent and nudges
   along its path when the card is hovered. */
.dl-ill .fl {
  fill: color-mix(in srgb, currentColor 12%, transparent);
}

.dl-ill .ac {
  stroke: var(--accent);
  transition: translate 220ms cubic-bezier(0.23, 1, 0.32, 1);
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .dl-steps li:nth-child(1):hover .dl-ill .ac { translate: 0 3px; }
  .dl-steps li:nth-child(2):hover .dl-ill .ac { translate: 3px -1px; }
  .dl-steps li:nth-child(3):hover .dl-ill .ac { translate: 3px 0; }
}

.dl-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.dl-num {
  display: block;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 2rem;
  line-height: 1;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.dl-steps h3 {
  margin-top: var(--space-4);
  font-size: 1rem;
  font-weight: 600;
}

.dl-steps li p {
  margin-top: var(--space-2);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.dl-after {
  margin-top: var(--space-6);
  font-size: 1.0625rem;
  color: var(--text-tertiary);
}

@media (prefers-reduced-motion: no-preference) {
  .dl-title,
  .dl-lead,
  .dl-actions,
  .download-page .req {
    animation: hero-in 700ms cubic-bezier(0.23, 1, 0.32, 1) both;
  }
  .dl-title { animation-name: hero-title-in; animation-duration: 900ms; }
  .dl-lead { animation-delay: 120ms; }
  .dl-actions { animation-delay: 180ms; }
  .download-page .req { animation-delay: 220ms; }
  .dl-steps li {
    animation: hero-in 700ms cubic-bezier(0.23, 1, 0.32, 1) both;
  }
  .dl-steps li:nth-child(1) { animation-delay: 360ms; }
  .dl-steps li:nth-child(2) { animation-delay: 420ms; }
  .dl-steps li:nth-child(3) { animation-delay: 480ms; }
}



/* Behind the hero window (Finn, 2026-11-20): the window lies on a desk of
   paper. Three file dividers, one per stack, show their tabs above it:
   Low priority in brown grey, FYI in kraft, Must see in Wax (the one coloured
   object). A folder with a clipped stack peeks out on the left, a page torn
   from a notebook on the right. Wide screens only; they arrive after the
   window and drift a little on scroll. */
.hero-shot {
  position: relative;
  isolation: isolate;
}

.hero-shot > picture {
  position: relative;
  z-index: 1;
  display: block;
}

/* The window render carries macOS's own continuous corners, which no CSS
   radius matches. Its corners are cut into the image's alpha instead (the
   white unmixed out of the edge pixels), so the frame and shadow are drawn
   with drop-shadow, which follows that exact curve. */
.hero-shot > picture img {
  border-radius: 0;
  box-shadow: none;
  filter:
    drop-shadow(0 0 0.5px rgb(30 26 23 / 0.35))
    drop-shadow(0 1px 2px rgb(31 23 24 / 0.08))
    drop-shadow(0 30px 40px rgb(31 23 24 / 0.22));
}

@media (prefers-color-scheme: dark) {
  .hero-shot > picture img {
    filter:
      drop-shadow(0 0 0.5px rgb(240 238 236 / 0.4))
      drop-shadow(0 30px 40px rgb(0 0 0 / 0.6));
  }
}

.hero-desk {
  display: none;
}

@media (min-width: 60em) {
  .landing .hero-shot {
    margin-top: 72px;
  }

  .hero-desk {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
  }

  .hero-desk img {
    position: absolute;
    height: auto;
    border-radius: 0;
    box-shadow: none;
  }

  /* The dividers stand on their side: their tabs reach out past the
     window's right edge like index tabs, labels reading downward. The
     image (1400 x 150) is 56% of the window wide, so turned it spans about
     nine tenths of the window's height. */
  .hero-desk .hd-tabs {
    left: 73.2%;
    top: 41%;
    width: 56.25%;
    rotate: 90deg;
    opacity: 0.9;
  }

  .hero-desk .hd-folder {
    left: -8.5%;
    top: 20%;
    width: 21%;
    rotate: -7deg;
    filter: drop-shadow(0 10px 18px rgb(31 23 24 / 0.16));
  }

  /* Two loose sheets on the right, under the tabs, so the desk is not
     one-sided. Landscape sheets turned to portrait. */
  .hero-desk .hd-sheet {
    left: 91%;
    top: 58%;
    width: 19%;
    rotate: 84deg;
    filter: drop-shadow(0 8px 14px rgb(31 23 24 / 0.14));
  }

  .hero-desk .hd-sheet-under {
    left: 93%;
    top: 64%;
    rotate: 96deg;
  }

  /* Along the window's top edge, a few papers peek out, spread across the
     width: two sheets, the long warm-grey envelope with its icon sticker,
     and one more sheet (Finn, 2026-11-20). Only a sliver of each shows. */
  .hero-desk .hd-top {
    filter: drop-shadow(0 6px 12px rgb(31 23 24 / 0.12));
  }

  .hero-desk .hd-top-a { left: 12%; top: -5.5%; width: 24%; rotate: 2.5deg; }
  .hero-desk .hd-top-b { left: 30%; top: -2.5%; width: 22%; rotate: -2deg; }
  .hero-desk .hd-top-env { left: 47%; top: -7%; width: 39%; rotate: -2.5deg; }
  .hero-desk .hd-top-c { left: 79%; top: -3%; width: 19%; rotate: 4deg; }

  .hero-desk .hd-page {
    left: -4.5%;
    top: 43%; /* lies over the folder's lower half */
    width: 15%;
    rotate: -10deg;
    filter: drop-shadow(0 8px 14px rgb(31 23 24 / 0.14));
  }
}

@media (min-width: 60em) and (prefers-reduced-motion: no-preference) {
  .hero-desk img {
    animation: hd-in 900ms cubic-bezier(0.23, 1, 0.32, 1) both;
  }
  /* the three tabs slide out from behind the window one after another */
  .hero-desk .hd-tabs { animation-name: hd-tabs-in; animation-duration: 700ms; }
  .hero-desk .hd-tab-low { animation-delay: 620ms; }
  .hero-desk .hd-tab-fyi { animation-delay: 740ms; }
  .hero-desk .hd-tab-must { animation-delay: 860ms; }
  .hero-desk .hd-folder { animation-delay: 620ms; }
  .hero-desk .hd-page { animation-delay: 680ms; }
  .hero-desk .hd-top-a { animation-delay: 480ms; }
  .hero-desk .hd-top-b { animation-delay: 520ms; }
  .hero-desk .hd-top-env { animation-delay: 560ms; }
  .hero-desk .hd-top-c { animation-delay: 600ms; }
  .hero-desk .hd-sheet-under { animation-delay: 560ms; }
  .hero-desk .hd-sheet-top { animation-delay: 600ms; }

  /* Papers slide out from behind the window instead of fading in: the top
     ones rise, the left ones move left, the right ones move right. Uses
     transform, so it adds to the scroll drift's translate and the rotate. */
  .hero-desk .hd-top { animation-name: hd-out-up; animation-duration: 1000ms; }
  .hero-desk .hd-sheet { animation-name: hd-out-right; animation-duration: 1000ms; }
  .hero-desk .hd-folder,
  .hero-desk .hd-page { animation-name: hd-out-left; animation-duration: 1000ms; }

  @supports (animation-timeline: view()) {
    .hero-desk .hd-folder,
    .hero-desk .hd-page {
      animation:
        hd-out-left 1000ms cubic-bezier(0.23, 1, 0.32, 1) both,
        hd-drift linear both;
      animation-timeline: auto, view();
      animation-range: normal, cover 0% cover 100%;
    }
    .hero-desk .hd-folder { animation-delay: 620ms, 0s; }
    .hero-desk .hd-page { animation-delay: 680ms, 0s; --d: -48px; }
  }
}

@keyframes hd-in {
  from { opacity: 0; scale: 0.96; }
}

@keyframes hd-out-up {
  from { transform: translateY(70%); }
}

@keyframes hd-out-left {
  from { transform: translateX(55%); }
}

@keyframes hd-out-right {
  from { transform: translateX(-55%); }
}

@keyframes hd-tabs-in {
  from { translate: -7% 0; }
}

@keyframes hd-drift {
  from { translate: 0 0; }
  to { translate: 0 var(--d, -28px); }
}

/* Download object (Finn, 2026-11-20, after noir stationery): a Cocoa paper
   sleeve with a round thumb cut, and a cream card with the app icon that
   slides up out of it as the page opens. */
.dl-sleeve {
  position: relative;
  width: min(100%, 22rem);
  margin: 0 auto;
  padding-top: 52%;
  rotate: -3deg;
}

.dl-sleeve-front {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 2px rgb(20 12 9 / 0.3)) drop-shadow(0 24px 30px rgb(20 12 9 / 0.28));
}

.dl-card {
  position: absolute;
  z-index: 1;
  left: 9%;
  right: 9%;
  top: 6%;
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  padding-top: 12%;
  border-radius: 6px;
  background: #faf5ee;
  box-shadow: 0 1px 2px rgb(20 12 9 / 0.2), 0 12px 24px -12px rgb(20 12 9 / 0.35);
}

/* The card's icon, after Figma (Boardly, node 2523:6948): the app icon's
   outline with the stamp drawing tucked into an envelope pocket, and the
   envelope's creases crossing the whole card. Positions are the Figma
   frame's (2515 x 1479), in percent. The pocket is filled with the card's
   own colour, so the card is flat #faf5ee with the paper grain multiplied
   over everything. */
.dl-icon {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2515 / 1479;
  margin: -9.9% 0 -16%;
}

.dl-icon img {
  position: absolute;
  height: auto;
  max-width: none;
}

.dl-icon-outline { left: 33.4%; top: 16.36%; width: 31.73%; }
.dl-icon-stamp { left: 39.15%; top: 21.6%; width: 20.24%; }
.dl-icon-pocket { left: 28.91%; top: 8.72%; width: 40.72%; }
.dl-icon-creases { left: 0.1%; top: 0.18%; width: 99.8%; }

.dl-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: url(/img/env/paper.webp) center / cover;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.dl-card-mark {
  width: auto;
  height: 1.05rem;
}

.dl-card-line {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: #5b534f;
}

/* The download has already started on a Mac, so the button is the
   fallback: a quiet line says so right above it. */
.dl-card-hint {
  margin-top: 1.5rem;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: #6f6763;
}

.dl-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 2px; /* a taller target than the small text */
  color: #3b2a22;
  font-weight: 400;
  text-decoration: none;
}

/* a long-dash underline under the word only, not the chevron */
.dl-card-link span {
  padding-bottom: 2px;
  background: repeating-linear-gradient(90deg, rgb(59 42 34 / 0.4) 0 4px, transparent 4px 7px) left bottom / 100% 1px no-repeat;
  transition: background-color 150ms var(--ease-out);
}

.dl-card-link:hover span {
  background-image: repeating-linear-gradient(90deg, rgb(59 42 34 / 0.8) 0 4px, transparent 4px 7px);
}

.dl-card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .dl-card {
    animation:
      dl-card-out 1800ms 350ms cubic-bezier(0.65, 0, 0.35, 1) both,
      dl-card-float 5s 2150ms ease-in-out infinite;
  }
  .dl-sleeve {
    animation: hero-in 800ms cubic-bezier(0.23, 1, 0.32, 1) both;
  }
}

/* The card rises out of the sleeve, comes forward over its edge and
   settles in front of it, a little turned and lifted, then floats gently */
@keyframes dl-card-out {
  0% { translate: 0 46%; z-index: 1; }
  45% { translate: 0 -44%; z-index: 1; animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
  46% { z-index: 3; }
  100% { translate: 0 6%; rotate: 5deg; scale: 1.35; z-index: 3;
         box-shadow: 0 2px 4px rgb(20 12 9 / 0.2), 0 30px 50px -18px rgb(20 12 9 / 0.5); }
}

@keyframes dl-card-float {
  0%, 100% { translate: 0 6%; }
  50% { translate: 0 4.5%; }
}

/* Download page, centred (Finn, 2026-11-20): the sleeve in the middle, the
   words and the button under it */
.dl-hero,
.dl-hero:is(*) {
  grid-template-columns: none;
  justify-items: center;
  gap: var(--space-6);
  text-align: center;
}

.dl-hero .dl-object {
  order: -1;
}

.dl-hero .dl-lead {
  margin-inline: auto;
}

.download-page .dl-hero .req {
  justify-content: center;
}

.dl-sleeve {
  width: 17rem;
  max-width: 100%;
  /* room for the card above the sleeve: 52% of the sleeve's own width
     (a percentage would resolve against the whole row here) */
  padding-top: 8.84rem;
  padding-inline: 0;
}

.dl-steps {
  margin-top: 112px;
}

/* Reduce Motion: the card rests in front of the sleeve, still */
@media (prefers-reduced-motion: reduce) {
  .dl-card {
    z-index: 3;
    translate: 0 6%;
    rotate: 5deg;
    scale: 1.35;
  }
}

/* A download button on the card itself (Finn, 2026-11-20) */









/* A binder clip holds the window at its right edge, below the tabs, handles
   out (Finn, 2026-11-20). It sits on top of the window. */
.hero-shot > .hd-binder {
  display: none;
}

@media (min-width: 60em) {
  .hero-shot > .hd-binder {
    display: block;
    position: absolute;
    z-index: 2;
    left: -4.6%;
    top: 63%; /* on the left edge, across the bottom of the torn page */
    width: 5.4%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
    rotate: -90deg;
  }
}

@media (min-width: 60em) and (prefers-reduced-motion: no-preference) {
  .hero-shot > .hd-binder {
    animation: hd-in 700ms 1080ms cubic-bezier(0.23, 1, 0.32, 1) both;
  }
}

/* Search demo (Finn, 2026-11-20): the query types itself, letter by letter,
   then the results come in one after another, hold, and the list resets
   quietly while hidden. Layers cut from the same render, positioned in
   percent of its 1560 x 1488 frame. */
.search-demo {
  position: relative;
}

.sd-layers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.sd-layers picture,
.sd-layers img {
  display: block;
}

.search-demo .sd-layers img {
  width: 100%;
  height: auto;
  border-radius: 0;
  box-shadow: none;
  filter: none; /* the framed render's shadow belongs to the base only */
}

.sd-field {
  position: absolute;
  left: 10.256%;
  top: 5.78%;
  width: 8.974%;
}

.sd-caret {
  display: none;
}

.sd-row {
  position: absolute;
  left: 5.128%;
  width: 91.026%;
}

.sd-r1 { top: 31.922%; }
.sd-r2 { top: 43.212%; }
.sd-r3 { top: 54.503%; }
.sd-r4 { top: 65.793%; }
.sd-r5 { top: 77.083%; }
.sd-r6 { top: 88.374%; }

@media (prefers-reduced-motion: no-preference) {
  .sd-layers { animation: sd-reset 8s var(--ease-out) infinite; }
  .sd-query { animation: sd-type 8s infinite; }
  .sd-caret {
    display: block;
    position: absolute;
    top: 18%;
    width: 2px;
    height: 64%;
    border-radius: 1px;
    background: var(--accent);
    animation: sd-caret 8s infinite, sd-blink 1s steps(1) infinite;
  }
  .sd-r1 { animation: sd-row1 8s var(--ease-out) infinite; }
  .sd-r2 { animation: sd-row2 8s var(--ease-out) infinite; }
  .sd-r3 { animation: sd-row3 8s var(--ease-out) infinite; }
  .sd-r4 { animation: sd-row4 8s var(--ease-out) infinite; }
  .sd-r5 { animation: sd-row5 8s var(--ease-out) infinite; }
  .sd-r6 { animation: sd-row6 8s var(--ease-out) infinite; }
}

/* one letter at a time, cut between the glyphs of "dinner" */
@keyframes sd-type {
  0%, 6% { clip-path: inset(0 100% 0 0); animation-timing-function: step-end; }
  8% { clip-path: inset(0 77.9% 0 0); animation-timing-function: step-end; }
  10% { clip-path: inset(0 70.4% 0 0); animation-timing-function: step-end; }
  12% { clip-path: inset(0 54.6% 0 0); animation-timing-function: step-end; }
  14% { clip-path: inset(0 38.9% 0 0); animation-timing-function: step-end; }
  16% { clip-path: inset(0 22.1% 0 0); animation-timing-function: step-end; }
  18%, 96% { clip-path: inset(0 0 0 0); animation-timing-function: step-end; }
  97%, 100% { clip-path: inset(0 100% 0 0); }
}

@keyframes sd-caret {
  0%, 6% { left: 7.1%; animation-timing-function: step-end; }
  8% { left: 22.1%; animation-timing-function: step-end; }
  10% { left: 29.6%; animation-timing-function: step-end; }
  12% { left: 45.4%; animation-timing-function: step-end; }
  14% { left: 61.1%; animation-timing-function: step-end; }
  16% { left: 77.9%; animation-timing-function: step-end; }
  18%, 96% { left: 88.6%; animation-timing-function: step-end; }
  97%, 100% { left: 7.1%; }
}

@keyframes sd-blink {
  0% { opacity: 1; }
  50% { opacity: 0; }
}

/* results arrive after the last letter, 2% (160 ms) apart; each row has
   its own keyframes so all of them reset together inside the fade */
@keyframes sd-row1 {
  0%, 22% { opacity: 0; translate: 0 8px; }
  28%, 96% { opacity: 1; translate: 0 0; }
  97%, 100% { opacity: 0; translate: 0 8px; }
}

@keyframes sd-row2 {
  0%, 24% { opacity: 0; translate: 0 8px; }
  30%, 96% { opacity: 1; translate: 0 0; }
  97%, 100% { opacity: 0; translate: 0 8px; }
}

@keyframes sd-row3 {
  0%, 26% { opacity: 0; translate: 0 8px; }
  32%, 96% { opacity: 1; translate: 0 0; }
  97%, 100% { opacity: 0; translate: 0 8px; }
}

@keyframes sd-row4 {
  0%, 28% { opacity: 0; translate: 0 8px; }
  34%, 96% { opacity: 1; translate: 0 0; }
  97%, 100% { opacity: 0; translate: 0 8px; }
}

@keyframes sd-row5 {
  0%, 30% { opacity: 0; translate: 0 8px; }
  36%, 96% { opacity: 1; translate: 0 0; }
  97%, 100% { opacity: 0; translate: 0 8px; }
}

@keyframes sd-row6 {
  0%, 32% { opacity: 0; translate: 0 8px; }
  38%, 96% { opacity: 1; translate: 0 0; }
  97%, 100% { opacity: 0; translate: 0 8px; }
}

/* the restart is quiet: everything fades, resets unseen, comes back */
@keyframes sd-reset {
  0%, 90% { opacity: 1; }
  94%, 98% { opacity: 0; }
  100% { opacity: 1; }
}

/* Writing help demo (Finn, 2026-11-20): the dictated words land in the
   composer one by one, Rewrite is pressed, and the tray with the polished
   version rises in above it, holds, and the scene resets quietly. The
   composer's body text and its Rewrite button are cut from the same
   render and positioned in percent of its 1992 x 719 frame. 9 s loop. */
.wd-composer {
  position: relative;
  display: block;
}

.wd-composer picture,
.wd-composer img {
  display: block;
}

.wd-composer img {
  width: 100%;
  height: auto;
}

.wd-body {
  position: absolute;
  left: 7.028%;
  top: 23.644%;
  width: 79.317%;
}

.wd-btn {
  position: absolute;
  left: 33.333%;
  top: 69.263%;
  width: 15.06%;
}

@media (prefers-reduced-motion: no-preference) {
  .wd-body { animation: wd-say 9s infinite; }
  .wd-btn { animation: wd-press 9s infinite; }
  .wd-tray {
    transform-origin: 50% 100%;
    animation: wd-tray 9s infinite;
  }
}

/* dictation: one word at a time, roughly speaking pace (about 110 ms) */
@keyframes wd-say {
  0%, 4% { clip-path: inset(0 100% 0 0); animation-timing-function: step-end; }
  5.2% { clip-path: inset(0 93.3% 0 0); animation-timing-function: step-end; }
  6.4% { clip-path: inset(0 85.1% 0 0); animation-timing-function: step-end; }
  7.6% { clip-path: inset(0 76.6% 0 0); animation-timing-function: step-end; }
  8.8% { clip-path: inset(0 72.3% 0 0); animation-timing-function: step-end; }
  10.0% { clip-path: inset(0 67.5% 0 0); animation-timing-function: step-end; }
  11.2% { clip-path: inset(0 62.8% 0 0); animation-timing-function: step-end; }
  12.4% { clip-path: inset(0 54.6% 0 0); animation-timing-function: step-end; }
  13.6% { clip-path: inset(0 49.7% 0 0); animation-timing-function: step-end; }
  14.8% { clip-path: inset(0 46.8% 0 0); animation-timing-function: step-end; }
  16.0% { clip-path: inset(0 41.3% 0 0); animation-timing-function: step-end; }
  17.2% { clip-path: inset(0 39.8% 0 0); animation-timing-function: step-end; }
  18.4% { clip-path: inset(0 34.3% 0 0); animation-timing-function: step-end; }
  19.6% { clip-path: inset(0 26.8% 0 0); animation-timing-function: step-end; }
  20.8% { clip-path: inset(0 16.2% 0 0); animation-timing-function: step-end; }
  22.0% { clip-path: inset(0 13.8% 0 0); animation-timing-function: step-end; }
  23.2% { clip-path: inset(0 7.8% 0 0); animation-timing-function: step-end; }
  24.4%, 92% { clip-path: inset(0 0 0 0); opacity: 1; }
  95%, 100% { clip-path: inset(0 0 0 0); opacity: 0; }
}

/* the press is felt, not seen: 0.96 and straight back */
@keyframes wd-press {
  0%, 27% { scale: 1; }
  28.5% { scale: 0.96; animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
  31%, 100% { scale: 1; }
}

/* the tray opens from the composer below it, then leaves before the reset */
@keyframes wd-tray {
  0%, 29.5% { opacity: 0; translate: 0 14px; scale: 0.98; }
  29.6% { opacity: 0; translate: 0 14px; scale: 0.98; animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
  35%, 91% { opacity: 1; translate: 0 0; scale: 1; animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); }
  94%, 100% { opacity: 0; translate: 0 6px; scale: 1; }
}

/* Line work on the card (Finn, 2026-11-20): once the card has risen, its
   lines draw themselves. The outline is traced round from the top left with
   a sweeping conic mask, the two creases grow out from where they cross
   (a clip that opens from the centre), and the stamp slides up out of the
   envelope pocket. The SVGs stay untouched; only masks and clips move. */
@property --dl-sweep {
  syntax: "<angle>";
  inherits: false;
  initial-value: 360deg;
}

@media (prefers-reduced-motion: no-preference) {
  .dl-icon-outline {
    -webkit-mask-image: conic-gradient(from -45deg, #000 var(--dl-sweep), transparent 0);
    mask-image: conic-gradient(from -45deg, #000 var(--dl-sweep), transparent 0);
    animation: dl-trace 1100ms 1500ms cubic-bezier(0.65, 0, 0.35, 1) both;
  }

  .dl-icon-creases {
    animation: dl-creases 1000ms 1900ms cubic-bezier(0.23, 1, 0.32, 1) both;
  }

  .dl-icon-stamp {
    animation: dl-stamp-up 900ms 2300ms cubic-bezier(0.23, 1, 0.32, 1) both;
  }
}

@keyframes dl-trace {
  from { --dl-sweep: 0deg; }
  to { --dl-sweep: 360deg; }
}

@keyframes dl-creases {
  from { clip-path: inset(50% 50% 50% 50%); }
  to { clip-path: inset(0 0 0 0); }
}

/* rises from inside the pocket, which stays in front of it */
@keyframes dl-stamp-up {
  from { translate: 0 22%; opacity: 0; }
  40% { opacity: 1; }
  to { translate: 0 0; opacity: 1; }
}
