@import url("fonts/onest.css");

/* Light and dark share one set of roles; the switch in the header sets data-theme on <html>. */
:root {
  --paper: #f3f4f1;
  --surface: #ffffff;
  --sunk: #e9ebe6;
  --ink: #1b1c1f;
  --graphite: #5d6168;
  --hairline: #d9dcd5;
  --amber: #e7a33e;
  --amber-ink: #8f5306;
  --amber-wash: #f7e6c8;
  --minus: #5d6168;
  --shadow: 0 1px 0 rgba(27, 28, 31, 0.04), 0 18px 40px -24px rgba(27, 28, 31, 0.28);
  --radius-l: 22px;
  --radius-m: 14px;
  --gutter: 24px;
  --max: 1180px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #16171a;
  --surface: #1f2024;
  --sunk: #26282d;
  --ink: #ecece8;
  --graphite: #a3a6ad;
  --hairline: #2f3136;
  --amber: #f0b24f;
  --amber-ink: #f3c06d;
  --amber-wash: #3a2c14;
  --minus: #a3a6ad;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 24px 48px -28px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.55 "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "tnum" 0;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.num { font-feature-settings: "tnum" 1, "lnum" 1; white-space: nowrap; }

/* Screenshots exist in both themes; only the one of the current theme is shown. */
:root[data-theme="dark"] .t-light, :root:not([data-theme="dark"]) .t-dark { display: none; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.top.scrolled { border-bottom-color: var(--hairline); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 650; font-size: 19px; letter-spacing: -0.01em; }
.brand img { width: 30px; height: 30px; border-radius: 23%; }
.links { display: flex; gap: 22px; margin-left: 18px; }
.links a { text-decoration: none; color: var(--graphite); font-size: 15px; }
.links a:hover { color: var(--ink); }
.top .tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--graphite); padding: 6px 8px; border-radius: 8px; }
.lang:hover { color: var(--ink); background: var(--sunk); }

.switch {
  position: relative; width: 52px; height: 30px; padding: 0; border: 1px solid var(--hairline);
  border-radius: 999px; background: var(--sunk); cursor: pointer; flex: none;
}
.switch .knob {
  position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  display: grid; place-items: center; color: var(--amber-ink);
  transition: transform 0.22s cubic-bezier(.3, .7, .2, 1);
}
.switch[aria-checked="true"] .knob { transform: translateX(22px); }
.switch svg { width: 14px; height: 14px; }
.switch .moon { display: none; }
.switch[aria-checked="true"] .sun { display: none; }
.switch[aria-checked="true"] .moon { display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 85%, var(--amber)); }
.btn.quiet { background: transparent; color: var(--ink); border-color: var(--hairline); }
.btn.quiet:hover { background: var(--sunk); }
.btn.small { min-height: 36px; padding: 0 16px; font-size: 15px; }
.btn svg { width: 18px; height: 18px; }

.top .menu-btn { display: none; }

/* ---------- hero ---------- */
/* Text on the left, the app window on the right; on a 1440×800 browser both fit the first screen. */
.hero { padding: 40px 0 24px; overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: minmax(340px, 420px) minmax(0, 1fr); gap: 40px; align-items: center;
  max-width: calc(var(--max) + 260px); margin: 0 0 0 max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
}
.kicker { color: var(--amber-ink); font-size: 15px; font-weight: 500; margin: 0 0 14px; }
h1 {
  font-size: clamp(38px, 3.9vw, 54px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 650;
  margin: 0 0 20px; text-wrap: balance;
}
.lede { font-size: 18px; color: var(--graphite); margin: 0 0 28px; text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fine { color: var(--graphite); font-size: 14px; margin: 14px 0 0; }
.hero-shot { margin-right: -120px; }
.hero-shot img { width: 100%; max-width: 1000px; }

/* The signature: the app's own «why this figure», written out as a sum. */
.ledger {
  background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow);
  padding: 26px 28px 24px; border: 1px solid var(--hairline);
}
.ledger { margin-top: 28px; max-width: 480px; }
.ledger h3 { font-size: 15px; font-weight: 500; color: var(--graphite); margin: 0 0 12px; }
.ledger ol { list-style: none; margin: 0; padding: 0; }
.ledger li {
  display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: baseline;
  padding: 7px 0; font-size: 16px; border-bottom: 1px dashed var(--hairline);
}
.ledger li .sign { color: var(--minus); font-weight: 600; }
.ledger li.total { border-bottom: 0; padding-top: 16px; margin-top: 4px; border-top: 2px solid var(--ink); }
.ledger li.total .label { font-weight: 600; white-space: nowrap; }
.ledger li.total { align-items: center; }
.ledger .result { font-size: clamp(26px, 2.6vw, 34px); font-weight: 650; letter-spacing: -0.02em; color: var(--ink); }
.ledger .result .cur { color: var(--amber-ink); }
.ledger .note { margin: 14px 0 0; font-size: 13px; color: var(--graphite); }

.ledger li { opacity: 1; }
.ledger.waiting li { opacity: 0; }
.ledger.in-view li { opacity: 0; transform: translateY(6px); animation: line-in 0.42s ease forwards; }
.ledger.in-view li:nth-child(1) { animation-delay: 0.15s; }
.ledger.in-view li:nth-child(2) { animation-delay: 0.35s; }
.ledger.in-view li:nth-child(3) { animation-delay: 0.55s; }
.ledger.in-view li:nth-child(4) { animation-delay: 0.75s; }
.ledger.in-view li:nth-child(5) { animation-delay: 0.95s; }
.ledger.in-view li:nth-child(6) { animation-delay: 1.2s; }
@keyframes line-in { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ledger.in-view li, .ledger.waiting li { animation: none; opacity: 1; transform: none; } }


/* ---------- sections ---------- */
section.block { padding: 112px 0; }
section.block + section.block { padding-top: 0; }
.head { max-width: 640px; margin-bottom: 48px; }
h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.08; letter-spacing: -0.025em; font-weight: 650; margin: 0 0 16px; text-wrap: balance; }
.head p, .copy p { color: var(--graphite); font-size: 18px; margin: 0; text-wrap: pretty; }

.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
.split.flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.split.flip .copy { order: 2; }
.split .shot { margin: 0 -24px; }
.split .shot.framed { margin: 0; }
.shot.framed img { border-radius: 18px; box-shadow: var(--shadow); border: 1px solid var(--hairline); }

/* entry: try the line yourself */
.tryline { margin-top: 28px; }
.capsule {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--hairline);
  border-radius: 999px; padding: 0 8px 0 18px; min-height: 52px; box-shadow: var(--shadow);
}
.capsule .plus { color: var(--graphite); flex: none; }
.capsule output { flex: 1; font-size: 17px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.capsule output::after { content: ""; display: inline-block; width: 2px; height: 1.1em; vertical-align: -0.18em; margin-left: 1px; background: var(--amber); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .capsule output::after { animation: none; } }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.examples button {
  font: inherit; font-size: 14px; padding: 7px 13px; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid var(--hairline);
}
.examples button[aria-pressed="true"] { background: var(--amber-wash); border-color: var(--amber); }
.parsed { margin: 18px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 15px; }
.parsed dt { color: var(--graphite); }
.parsed dd { margin: 0; font-weight: 500; }

/* video */
.video { position: relative; border-radius: var(--radius-l); overflow: hidden; background: var(--sunk); box-shadow: var(--shadow); border: 1px solid var(--hairline); }
.video video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--sunk); }
.play {
  position: absolute; inset: 0; display: grid; place-items: center; border: 0; padding: 0; cursor: pointer;
  background: linear-gradient(transparent 55%, rgba(0, 0, 0, 0.28));
}
.play img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play .disc {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 22px 14px 16px; border-radius: 999px;
  background: rgba(20, 20, 22, 0.78); color: #fff; font-weight: 600; font-size: 16px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.play .disc span.tri { width: 34px; height: 34px; border-radius: 50%; background: var(--amber); display: grid; place-items: center; }
.play .disc svg { width: 14px; height: 14px; margin-left: 2px; }
.play:hover .disc { background: rgba(20, 20, 22, 0.9); }

/* screens: a segmented control like the app's own */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: var(--sunk); border: 1px solid var(--hairline); margin-bottom: 28px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button {
  font: inherit; font-size: 15px; font-weight: 500; padding: 8px 18px; border-radius: 9px; border: 0; cursor: pointer;
  background: transparent; color: var(--graphite); white-space: nowrap;
}
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.panel[hidden] { display: none; }
.panel figcaption { color: var(--graphite); font-size: 16px; max-width: 46em; margin: 8px 0 0; }
.panel .shot { margin: 0 -24px; }

/* features: a plain list with hairlines, not a card grid */
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; margin: 0; padding: 0; list-style: none; }
.features li { border-top: 1px solid var(--hairline); padding: 22px 0 30px; }
.features .ico { width: 28px; height: 28px; color: var(--amber-ink); margin-bottom: 14px; }
.features h3 { font-size: 18px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.01em; }
.features p { margin: 0; color: var(--graphite); font-size: 15.5px; }

/* privacy: the one inverted band */
.vault { background: var(--ink); color: var(--paper); border-radius: 32px; padding: 72px 56px; margin: 0 var(--gutter); }
:root[data-theme="dark"] .vault { background: #f0efe9; color: #1b1c1f; }
.vault .inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: start; }
.vault h2 { margin-bottom: 16px; }
.vault .intro p { opacity: 0.72; font-size: 18px; margin: 0; }
.vault dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; }
.vault dt { font-weight: 600; font-size: 18px; margin-bottom: 6px; }
.vault dd { margin: 0; opacity: 0.72; font-size: 15.5px; }
.vault .shot { margin: 28px -16px 0; }

/* steps: a real sequence, so numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding-top: 64px; }
.steps li::before {
  content: counter(s); position: absolute; top: 0; left: 0; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 650; font-size: 18px; color: var(--amber-ink); border: 1.5px solid var(--amber);
}
.steps li:not(:last-child)::after { content: ""; position: absolute; top: 22px; left: 56px; right: -20px; border-top: 1.5px dashed var(--hairline); }
.steps h3 { margin: 0 0 6px; font-size: 19px; font-weight: 600; }
.steps p { margin: 0; color: var(--graphite); }

/* download */
.get { text-align: center; }
.get .icon { width: 112px; height: 112px; margin: 0 auto 24px; border-radius: 23%; box-shadow: 0 14px 30px -14px rgba(160, 80, 0, 0.55); }
.get h2 { margin-bottom: 12px; }
.get p.sub { color: var(--graphite); font-size: 18px; margin: 0 0 28px; }
.get .cta { justify-content: center; }
.get .first-run { max-width: 560px; margin: 24px auto 0; color: var(--graphite); font-size: 14.5px; }

/* author */
.author { display: flex; gap: 28px; align-items: center; max-width: 760px; margin: 0 auto; padding: 32px; border-radius: var(--radius-l); border: 1px solid var(--hairline); }
.author .mark { width: 72px; height: 72px; border-radius: 50%; background: var(--amber-wash); color: var(--amber-ink); display: grid; place-items: center; font-weight: 650; font-size: 24px; flex: none; }
.author h3 { margin: 0 0 4px; font-size: 20px; font-weight: 600; }
.author p { margin: 0 0 14px; color: var(--graphite); }

footer { padding: 48px 0 56px; color: var(--graphite); font-size: 14.5px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; border-top: 1px solid var(--hairline); padding-top: 28px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .copy-r { margin-right: auto; }

/* ---------- iPad and narrow laptops ---------- */
@media (max-width: 1080px) {
  .links { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; margin: 0 auto; padding: 0 var(--gutter); max-width: 760px; }
  .hero { padding-top: 48px; }
  .hero-text { text-align: center; }
  .hero-text .cta { justify-content: center; }
  .hero-shot { margin: 0 -12px; }
  .hero-shot img { max-width: none; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split.flip { grid-template-columns: 1fr; gap: 32px; }
  .split.flip .copy { order: 0; }
  .split .shot, .panel .shot { margin: 0 -12px; }
  .vault { padding: 56px 40px; }
  .vault .inner { grid-template-columns: 1fr; gap: 36px; }
  section.block { padding: 88px 0; }
  .top .menu-btn { display: grid; }
}

/* ---------- phones ---------- */
@media (max-width: 680px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .top .wrap { height: 56px; gap: 10px; }
  .brand { font-size: 17px; }
  .top .tools { gap: 6px; }
  .top .tools .btn.small { display: none; }
  .hero { padding-top: 28px; }
  .hero-text { text-align: left; }
  .hero-grid { padding: 0 var(--gutter); }
  .kicker { font-size: 14px; }
  .lede { font-size: 17px; }
  .cta .btn { flex: 1 1 100%; }
  .ledger { padding: 20px 18px 18px; }
  .ledger li { font-size: 15px; grid-template-columns: 18px 1fr auto; }
  .hero-shot { margin: 0 -10px; }
  section.block { padding: 72px 0; }
  .head { margin-bottom: 32px; }
  .head p, .copy p { font-size: 16.5px; }
  .features { grid-template-columns: 1fr; }
  .features li { padding: 18px 0 22px; display: grid; grid-template-columns: 40px 1fr; column-gap: 10px; }
  .features .ico { margin: 2px 0 0; grid-row: span 2; }
  .vault { border-radius: 24px; padding: 40px 20px; margin: 0 8px; }
  .vault dl { grid-template-columns: 1fr; gap: 20px; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .steps li { padding: 0 0 0 64px; min-height: 44px; }
  .steps li:not(:last-child)::after { top: 52px; left: 22px; right: auto; bottom: -18px; border-top: 0; border-left: 1.5px dashed var(--hairline); }
  .author { flex-direction: column; text-align: center; padding: 24px 18px; gap: 16px; }
  .parsed { grid-template-columns: 1fr; gap: 2px; }
  .parsed dd { margin-bottom: 8px; }
  .play .disc { padding: 10px 16px 10px 10px; font-size: 15px; }
  footer .copy-r { width: 100%; }
}

/* The menu that replaces the header links on iPad and phones. */
.sheet { display: none; }
.sheet.open {
  display: block; position: fixed; inset: 64px 0 auto 0; z-index: 19; background: var(--paper);
  border-bottom: 1px solid var(--hairline); padding: 8px var(--gutter) 20px;
}
.sheet a { display: block; padding: 14px 0; text-decoration: none; font-size: 18px; border-bottom: 1px solid var(--hairline); }
.sheet a:last-child { border-bottom: 0; }
@media (max-width: 680px) { .sheet.open { inset: 56px 0 auto 0; } }
.icon-btn { width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--sunk); }
.icon-btn svg { width: 22px; height: 22px; }

/* Plain pages: install and privacy */
.doc-page .wrap.doc { max-width: 720px; padding-top: 56px; padding-bottom: 40px; }
.doc h1 { font-size: 38px; line-height: 1.15; margin: 0 0 18px; font-weight: 650; letter-spacing: -0.01em; }
.doc .lede { font-size: 19px; color: var(--graphite); margin: 0 0 28px; }
.doc .fine { color: var(--graphite); font-size: 14.5px; }
.doc-steps { list-style: none; counter-reset: s; margin: 0 0 28px; padding: 0; display: grid; gap: 22px; }
.doc-steps li { counter-increment: s; position: relative; padding-left: 48px; }
.doc-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--amber-wash); color: var(--amber-ink); font-weight: 650; }
.doc-steps h3 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.doc-steps p { margin: 0; color: var(--graphite); }
.doc-table { width: 100%; border-collapse: collapse; margin: 0 0 22px; }
.doc-table th, .doc-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.doc-table th { font-size: 14px; color: var(--graphite); font-weight: 600; }
.doc p { margin: 0 0 16px; }
