/* Mnemor — shared styles. No dependencies, no fonts to fetch, no trackers. */

:root {
  --accent: #5B4FCF;
  --accent-soft: rgba(91, 79, 207, 0.10);
  --bg: #ffffff;
  --bg-soft: #f6f6f9;
  --text: #16161a;
  --muted: #5f5f6b;
  --line: #e6e6ee;
  --radius: 14px;
  --maxw: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #8B80FF;
    --accent-soft: rgba(139, 128, 255, 0.14);
    --bg: #0e0e12;
    --bg-soft: #16161c;
    --text: #f2f2f5;
    --muted: #a3a3b2;
    --line: #26262f;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

/* Header */
header {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  z-index: 10;
}
header .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand {
  font-weight: 700; font-size: 17px; letter-spacing: -0.01em;
  color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px;
}
/* The shipping app icon, not a coloured square. */
.brand .dot {
  width: 22px; height: 22px; border-radius: 6px;
  display: inline-block; flex: none;
}
nav { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
nav a { color: var(--muted); text-decoration: none; font-size: 14.5px; }
nav a:hover, nav a[aria-current="page"] { color: var(--text); }

/* Hero */
.hero { padding: 68px 0 44px; text-align: center; }
.hero h1 {
  font-size: clamp(32px, 6vw, 46px); line-height: 1.12;
  letter-spacing: -0.025em; margin: 0 0 14px;
}
.hero p.lede {
  font-size: 18px; color: var(--muted); margin: 0 auto 26px; max-width: 34em;
}
.badge {
  display: inline-block; font-size: 12.5px; font-weight: 600;
  color: var(--accent); background: var(--accent-soft);
  padding: 5px 11px; border-radius: 999px; margin-bottom: 18px;
}

/* Content pages */
main { padding: 40px 0 72px; }
main h1 { font-size: clamp(27px, 5vw, 34px); letter-spacing: -0.02em; margin: 0 0 6px; }
main h2 {
  font-size: 20px; letter-spacing: -0.01em; margin: 38px 0 10px;
  padding-top: 18px; border-top: 1px solid var(--line);
}
main h3 { font-size: 16.5px; margin: 22px 0 6px; }
main p, main li { color: var(--text); }
main ul, main ol { padding-left: 22px; }
main li { margin: 6px 0; }
.updated { color: var(--muted); font-size: 14px; margin: 0 0 8px; }

a { color: var(--accent); }

/* Home section headings + lead paragraphs */
.sec {
  font-size: 21px; letter-spacing: -0.015em;
  margin: 44px 0 12px; padding-top: 0; border: 0;
}
.lead-p { color: var(--muted); margin: 0 0 4px; max-width: 62ch; }
.tiny { font-size: 12.5px; color: var(--muted); font-weight: 400; }

/* Cards */
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin: 26px 0; }
@media (min-width: 620px) {
  .grid.two   { grid-template-columns: 1fr 1fr; }
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; background: var(--bg-soft);
}
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; }

.note {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 22px 0;
}
.note p { margin: 0; font-size: 15px; }

/* Table */
table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 14.5px; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
td code { font-size: 13px; }

code {
  background: var(--bg-soft); border: 1px solid var(--line);
  padding: 1px 5px; border-radius: 5px; font-size: 13.5px;
}

/* Buttons */
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 15px;
}
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---- Workflow diagrams (how-it-works) ---- */

/* Layer pills. Colour is a hint; the label always carries the meaning. */
.lay {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--muted);
}
/* Two colours only, so the page teaches one thing: green stays, pink leaves. */
.lay.rules, .lay.device, .lay.cache {
  color: var(--on);
  border-color: color-mix(in srgb, var(--on) 38%, transparent);
  background: color-mix(in srgb, var(--on) 10%, transparent);
}
.lay.cloud {
  color: var(--off);
  border-color: color-mix(in srgb, var(--off) 40%, transparent);
  background: color-mix(in srgb, var(--off) 10%, transparent);
}
.lay.you { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

/* Step state is carried by the colour of the node on the rail, not by a label on
   every row — repeating "on device" fifteen times teaches nobody anything. Only the
   steps that actually send something get a written chip. */
:root {
  --on:  #1f7a4d;  /* stays on the phone */
  --off: #a03a6b;  /* sends an excerpt   */
}
@media (prefers-color-scheme: dark) {
  :root { --on: #63c795; --off: #e88bb8; }
}

/* Legend */
.legend { list-style: none; padding: 0; margin: 16px 0 8px; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.legend li { margin: 0; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.node {
  width: 9px; height: 9px; border-radius: 50%; flex: none;
  background: var(--bg); border: 2px solid var(--on);
}
.node.maybe { border-color: var(--off); }
.node.off   { border-color: var(--off); background: var(--off); }
.node.tap   { border-color: var(--accent); background: var(--accent); }

/* A workflow: vertical steps joined by a rail. */
.flow {
  list-style: none; padding: 0; margin: 10px 0 28px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-soft); overflow: hidden;
}
.flow > li {
  position: relative; margin: 0; padding: 13px 18px 14px 46px;
  border-top: 1px solid var(--line);
}
.flow > li:first-child { border-top: 0; }
/* The rail */
.flow > li::before {
  content: ""; position: absolute; left: 22px; top: 0; bottom: 0;
  width: 1px; background: var(--line);
}
.flow > li:first-child::before { top: 21px; }
.flow > li:last-child::before  { bottom: calc(100% - 21px); }

/* Summary strip: the takeaway, so the reader can skip the steps entirely.
   It is an <li> so the markup stays a valid list — but it is not a step, so it
   carries neither the rail nor a node. */
.flow > li.flow-meta {
  padding: 10px 18px; font-size: 13.5px; color: var(--muted);
  background: color-mix(in srgb, var(--text) 3.5%, transparent);
}
.flow > li.flow-meta::before,
.flow > li.flow-meta::after { content: none; }
.flow > li.flow-meta + li { border-top: 0; }
.flow > li.flow-meta + li::before { top: 21px; }
.flow-meta strong { color: var(--text); font-weight: 600; }
/* The node — green by default, because most steps never leave the device */
.flow > li::after {
  content: ""; position: absolute; left: 18px; top: 17px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--on);
}
.flow > li.maybe::after { border-color: var(--off); }
.flow > li.off::after   { background: var(--off);    border-color: var(--off); }
.flow > li.tap::after   { background: var(--accent); border-color: var(--accent); }

.flow .what { font-size: 15px; font-weight: 600; margin: 0 0 3px; }
.flow .how  { font-size: 14px; color: var(--muted); margin: 0; }

/* The only chip on a step, and only where text is actually sent. */
.sends {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  color: var(--off); border: 1px solid color-mix(in srgb, var(--off) 40%, transparent);
  background: color-mix(in srgb, var(--off) 10%, transparent);
  padding: 2px 7px; border-radius: 999px; margin-left: 9px; vertical-align: 2px;
}
.sends.maybe { background: none; }

/* Closing row: the outcome. */
.flow > li.out { background: var(--accent-soft); }

.wf-title { font-size: 17px; margin: 32px 0 2px; }
.wf-sub   { font-size: 14.5px; color: var(--muted); margin: 0 0 2px; }

/* ---- App screenshots ----
   A bare 2.17:1 rectangle reads as an accident. Inside a drawn bezel it reads as
   a product shot, and paired with copy in a row it stops being a tower. */
.phone {
  padding: 5px; border-radius: 22px;
  background: linear-gradient(155deg, #cdcdda 0%, #f7f7fb 38%, #c2c2d2 100%);
  box-shadow: 0 10px 26px rgba(0,0,0,.15), 0 2px 5px rgba(0,0,0,.10);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 18px; }
@media (prefers-color-scheme: dark) {
  .phone {
    background: linear-gradient(155deg, #43434f 0%, #62626f 38%, #33333d 100%);
    box-shadow: 0 10px 26px rgba(0,0,0,.6), 0 2px 5px rgba(0,0,0,.45);
  }
}

/* Device cluster: three phones overlapping, the middle one taller and in front.
   One strong image instead of screenshots scattered down the page. */
.cluster {
  display: flex; justify-content: center; align-items: flex-end;
  margin: 34px 0 4px;
}
.cluster > div { flex: none; }
.cluster .side { width: 100px; }
.cluster .mid  { width: 134px; position: relative; z-index: 2; }
.cluster .left  { margin-right: -20px; }
.cluster .right { margin-left: -20px; }
.cluster .mid .phone  { padding: 6px; border-radius: 24px; }
.cluster .mid .phone img { border-radius: 19px; }
.cluster .side .phone { padding: 4px; border-radius: 18px; }
.cluster .side .phone img { border-radius: 15px; }
@media (min-width: 560px) {
  .cluster .side { width: 148px; }
  .cluster .mid  { width: 196px; }
  .cluster .left  { margin-right: -28px; }
  .cluster .right { margin-left: -28px; }
  .cluster .mid .phone { padding: 7px; border-radius: 28px; }
  .cluster .mid .phone img { border-radius: 22px; }
  .cluster .side .phone { padding: 5px; border-radius: 22px; }
  .cluster .side .phone img { border-radius: 18px; }
}

/* A single centred screenshot, where one screen is the evidence for a claim. */
.figc { width: 168px; margin: 24px auto 28px; }
.figc figcaption {
  margin-top: 10px; font-size: 12.5px; line-height: 1.45;
  color: var(--muted); text-align: center;
}

/* Small captioned shot, used alongside the workflow diagrams. */
.shot { margin: 0; }
.shot figcaption {
  margin-top: 9px; font-size: 12.5px; line-height: 1.4; color: var(--muted);
}
.shot figcaption strong { color: var(--text); font-weight: 600; display: block; }

/* Workflow paired with the screen it happens on. */
.wf { display: grid; gap: 2px 18px; grid-template-columns: 1fr; align-items: start; }
.wf > .shot { width: 140px; margin: 4px auto 14px; }
.wf > .shot .phone { padding: 4px; border-radius: 17px; }
.wf > .shot .phone img { border-radius: 14px; }
@media (min-width: 700px) {
  .wf { grid-template-columns: 140px minmax(0, 1fr); }
  .wf > .shot { margin: 12px 0 0; }
  .wf > .flow { margin-top: 10px; }
}

/* Footer */
footer { border-top: 1px solid var(--line); padding: 28px 0 44px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
footer .spacer { margin-left: auto; }
