/* Keep — keep.gallery
 *
 * The app's own visual language, on the web. Black ground, white ink, hairlines instead
 * of boxes, and the two hues Keep spends: keepGreen on a keep, favoriteRose on a
 * favourite. Every token below is the one in Keep/Design/Theme.swift.
 *
 * Dark is primary and light is an exact inversion, the same deal the app makes with the
 * system — with one exception: anything drawn as a *device* (the phone, the .mock
 * screens) stays in the app's dark appearance in both, because those are screenshots of
 * an app, not part of the page.
 */

:root {
  color-scheme: dark light;

  --ground: #000000;
  --raised: #0e0e0e;          /* groundRaised, dark: white 5.5% */
  --raised-2: #171717;
  --ink: #ffffff;
  --ink-2: rgba(255, 255, 255, 0.55);   /* inkSecondary — labels, captions */
  --ink-body: rgba(255, 255, 255, 0.68); /* running text, which has to be read */
  --ink-3: rgba(255, 255, 255, 0.30);   /* inkTertiary  */
  --hairline: rgba(255, 255, 255, 0.14);
  --hairline-2: rgba(255, 255, 255, 0.07);

  /* The only two colours in the app, and the only two here. */
  --keep: #4d8f61;
  --rose: #cc616b;
  --keep-wash: rgba(77, 143, 97, 0.16);
  --rose-wash: rgba(204, 97, 107, 0.16);

  --gutter: 22px;
  --measure: 1140px;

  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui,
             "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", var(--font-ui);

  /* Keep's radii, to the point: card 22 · sheet 24 · button 14 · thumbnail 8 · pill 999 */
  --r-card: 22px;
  --r-sheet: 24px;
  --r-button: 14px;
  --r-thumb: 8px;
}

@media (prefers-color-scheme: light) {
  :root {
    --ground: #ffffff;
    --raised: #f5f5f5;        /* groundRaised, light: white 96% */
    --raised-2: #ececec;
    --ink: #000000;
    --ink-2: rgba(0, 0, 0, 0.55);
    --ink-body: rgba(0, 0, 0, 0.66);
    --ink-3: rgba(0, 0, 0, 0.30);
    --hairline: rgba(0, 0, 0, 0.12);
    --hairline-2: rgba(0, 0, 0, 0.06);
    --keep-wash: rgba(77, 143, 97, 0.12);
    --rose-wash: rgba(204, 97, 107, 0.12);
  }
}

*, *::before, *::after { 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;
  overflow-x: clip;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 12px 16px; background: var(--ink); color: var(--ground);
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- type ---- */

h1, h2, h3 { margin: 0; }

.h1 {
  font-size: clamp(2.6rem, 6.6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.97;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.04;
  text-wrap: balance;
}

.h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.lede {
  color: var(--ink-body);
  font-size: clamp(1.0625rem, 1.4vw, 1.2rem);
  font-weight: 450;
  letter-spacing: -0.015em;
  line-height: 1.45;
  margin: 0;
  max-width: 34ch;
}
.lede strong { color: var(--ink); font-weight: 600; }

/* The app labels a run of things with a caption in small caps, not a chip. */
.eyebrow {
  display: block;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.eyebrow.is-keep { color: var(--keep); }

.tabular { font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- layout ---- */

.wrap { max-width: var(--measure); margin: 0 auto; padding-inline: var(--gutter); }

.section {
  padding-block: clamp(72px, 9vw, 124px);
  text-align: center;
}
/* Hairlines, not bands: a rule between sections rather than a change of ground. */
.section + .section,
.section + .close,
.offer + .section { border-top: 0.5px solid var(--hairline); }

.section-head {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-bottom: clamp(40px, 5.5vw, 64px);
}
.section-head .h2 { max-width: 17ch; }
.section-head .lede { max-width: 50ch; }

.section-cta {
  margin-top: clamp(40px, 5vw, 64px);
  display: grid;
  justify-items: center;
  gap: 14px;
}

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

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 0.5px solid var(--hairline-2);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 26px;
  height: 66px;
  max-width: var(--measure);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
}
.brand img { width: 28px; height: 28px; border-radius: 7px; }

.nav-links { display: flex; gap: 24px; }
.nav-links a {
  font-size: 15px; font-weight: 500; color: var(--ink-2); text-decoration: none;
}
.nav-links a:hover { color: var(--ink); }
@media (max-width: 860px) { .nav-links { display: none; } }

/* -------------------------------------------------------------- buttons --- */

/* PrimaryButton: ink fill, ground label, radius 14, height 52. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--r-button);
  background: var(--ink);
  color: var(--ground);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, opacity 0.16s ease;
}
.btn:hover { transform: translateY(-1px); opacity: 0.9; }
.btn:active { transform: scale(0.98); }
.btn svg { fill: currentColor; }

/* SecondaryButton: transparent, 1pt ink border, ink label. */
.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}
.btn-ghost:hover { background: var(--raised); opacity: 1; }

.btn-sm { height: 40px; padding: 0 16px; font-size: 15px; border-radius: 12px; }

.btn-store { padding-inline: 20px 26px; }
.btn-store .lines { display: grid; text-align: left; line-height: 1.08; }
.btn-store .lines span:first-child { font-size: 10px; font-weight: 500; opacity: 0.7; letter-spacing: 0.04em; }
.btn-store .lines span:last-child { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.cta-note { color: var(--ink-2); font-size: 13.5px; margin: 14px 0 0; max-width: 46ch; }
.cta-note strong { color: var(--ink); font-weight: 600; }

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

.hero { padding-block: clamp(40px, 5vw, 72px) clamp(52px, 6.5vw, 84px); text-align: center; }
.hero-content { display: grid; justify-items: center; gap: 18px; }
.hero .h1 { max-width: 15ch; }
.hero .lede { max-width: 50ch; }
.hero .cta-row { margin-top: 10px; }

.hero-stage {
  margin-top: clamp(40px, 5vw, 60px);
  display: grid;
  justify-items: center;
  gap: 18px;
}

/* The three words the app stamps on a card, used once as a hero rule. */
.stamp-rule {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 18px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stamp-rule li { display: inline-flex; align-items: center; gap: 8px; }
.stamp-rule .dot { width: 3px; height: 3px; border-radius: 999px; background: currentColor; }
.stamp-rule .is-keep { color: var(--keep); }
.stamp-rule .is-fav { color: var(--rose); }

/* --------------------------------------------------------------- phone ---- */
/* Always the app's dark appearance, in both page themes. */

.phone {
  position: relative;
  width: min(304px, 82vw);
  aspect-ratio: 304 / 618;
  padding: 11px;
  border-radius: 52px;
  background: #0a0a0a;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 30px 60px -24px rgba(0, 0, 0, 0.8);
}
@media (prefers-color-scheme: light) {
  .phone {
    box-shadow:
      0 0 0 1.5px rgba(0, 0, 0, 0.55),
      0 30px 60px -24px rgba(0, 0, 0, 0.45);
  }
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 42px;
  overflow: hidden;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
}

.screen-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 38px 18px 8px;
  color: rgba(255, 255, 255, 0.55);
  flex: none;
}
.screen-bar .title {
  margin-right: auto;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.screen-bar .count { font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- deck ---- */

.deck {
  position: relative;
  flex: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
}
.deck.is-holding { cursor: grabbing; }
.deck:focus { outline: none; }
.deck:focus-visible { outline: 2px solid #fff; outline-offset: -6px; }

.stage {
  position: relative;
  width: calc(100% - 32px);
  aspect-ratio: 4 / 5;
}

.card {
  position: absolute;
  inset: 0;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0e0e0e;
  transform-origin: 50% 60%;
  will-change: transform, opacity;
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1),
              opacity 0.34s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.deck.is-dragging .card { transition: none; }
.card.is-front { box-shadow: 0 16px 28px -16px rgba(0, 0, 0, 0.9); }

.photo { position: absolute; inset: 0; background-color: #0e0e0e; }
.photo::before {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 60px 18px rgba(0, 0, 0, 0.42);
}
.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.15;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

.card-badge {
  position: absolute;
  top: 11px;
  left: 11px;
  display: inline-flex;
  align-items: center;
  height: 23px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.card-badge.is-on { opacity: 1; }

.card-date {
  position: absolute;
  left: 13px;
  bottom: 13px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.card-heart {
  position: absolute;
  right: 11px;
  bottom: 11px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
}
.card-heart svg { fill: none; stroke: currentColor; stroke-width: 1.7; }
.card-heart.is-on { color: var(--rose); }
.card-heart.is-on svg { fill: currentColor; }

.card:not(.is-front) .card-heart,
.card:not(.is-front) .card-date,
.card:not(.is-front) .card-badge { opacity: 0; pointer-events: none; }

.stamp {
  position: absolute;
  top: 44px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
}

.mark {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 30;
  transform: translate(-50%, -50%) scale(0.92);
  padding: 9px 18px;
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.22);
  box-shadow: inset 0 0 0 999px var(--mark-hue, transparent);
}
.mark.is-flashing { animation: mark-flash 0.62s ease-out; }
@keyframes mark-flash {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.92); }
  18%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  70%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

.deck-done {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px;
  border-radius: var(--r-card);
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
}
.deck-done.is-on { display: flex; }
.deck-done .check { color: var(--keep); }
.deck-done .h3 { font-size: 17px; }
.deck-done p { margin: 0; font-size: 13px; color: rgba(255, 255, 255, 0.55); }
.deck-done button {
  margin-top: 14px;
  height: 40px;
  padding: 0 20px;
  border-radius: 12px;
  border: 0;
  background: #fff;
  color: #000;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.counters {
  flex: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 12px 12px 22px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.14);
  margin: 10px 14px 0;
}
.counter { border-left: 0.5px solid rgba(255, 255, 255, 0.14); }
.counter:first-child { border-left: 0; }
.counter.is-zero { opacity: 0.45; }
.counter dt {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.counter dd {
  margin: 2px 0 0;
  font-family: var(--font-round);
  font-variant-numeric: tabular-nums;
  font-size: 17px;
  font-weight: 600;
}

/* --------------------------------------------------------- deck controls -- */

.keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.key {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: var(--raised);
  box-shadow: inset 0 0 0 0.5px var(--hairline);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.15s ease;
}
.key:hover { background: var(--raised-2); }
.key .glyph { font-size: 14px; color: var(--ink-3); }
.key.is-keep .glyph { color: var(--keep); }
.key.is-heart .glyph { color: var(--rose); }

.deck-hint { margin: 0; color: var(--ink-3); font-size: 13px; }

/* ------------------------------------------------------------- problem ---- */

#problem { padding-block-start: clamp(34px, 4.5vw, 66px); }
.problem-block { display: grid; justify-items: center; gap: 18px; }
.problem-block .h2 { max-width: 13ch; }
.problem-block .lede { max-width: 54ch; }

.aside-note {
  margin: 30px auto 0;
  max-width: 56ch;
  color: var(--ink-body);
  font-size: 1.0625rem;
  line-height: 1.55;
}
.aside-note strong { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------- how: copy + live demo --- */

.how-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 340px);
  align-items: center;
  gap: clamp(36px, 5vw, 80px);
  text-align: left;
}
@media (max-width: 900px) {
  .how-split { grid-template-columns: 1fr; gap: 48px; justify-items: center; }
}

.how-copy { display: grid; justify-items: start; gap: 14px; }
.how-copy .h2 { max-width: 15ch; }
.how-copy .lede { max-width: 44ch; }

.gesture-list { display: grid; gap: 0; margin: 16px 0 0; padding: 0; list-style: none; width: 100%; }

.gesture-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 13px 12px;
  border-top: 0.5px solid var(--hairline);
  border-radius: 12px;
  transition: background 0.35s ease;
}
.gesture-row:last-child { border-bottom: 0.5px solid var(--hairline); }
.gesture-row.is-on { background: var(--raised); }

.gesture-row .arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-size: 18px;
  color: var(--ink-2);
  transition: background 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}
.gesture-row.is-keep .arrow { background: var(--keep-wash); color: var(--keep); box-shadow: none; }
.gesture-row.is-fav .arrow { background: var(--rose-wash); color: var(--rose); box-shadow: none; }
.gesture-row.is-on .arrow { background: var(--ink); color: var(--ground); box-shadow: none; }
.gesture-row.is-on.is-keep .arrow { background: var(--keep); color: #fff; }
.gesture-row.is-on.is-fav .arrow { background: var(--rose); color: #fff; }

.row-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 16px;
  row-gap: 1px;
  align-items: baseline;
  min-width: 0;
}
.row-name {
  grid-area: 1 / 1;
  font-family: var(--font-round);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.row-desc { grid-area: 2 / 1; color: var(--ink-body); font-size: 14.5px; line-height: 1.4; }
.gesture-row .in-photos {
  grid-area: 1 / 2;
  margin: 0;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--ink-3);
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .row-text { grid-template-columns: minmax(0, 1fr); }
  .gesture-row .in-photos { grid-area: 3 / 1; margin-top: 3px; text-align: left; white-space: normal; }
}

.how-demo { display: grid; justify-items: center; gap: 16px; }
.demo-caption {
  margin: 0;
  max-width: 30ch;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.demo-stage { position: relative; flex: 1; margin: 10px 16px 16px; }

.demo-card {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0e0e0e;
  transform: scale(0.955);
  opacity: 0.5;
  transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.38s ease;
}
.demo-card.is-front {
  z-index: 2;
  transform: none;
  opacity: 1;
  box-shadow: 0 16px 28px -16px rgba(0, 0, 0, 0.9);
}
.demo-card.is-cut { transition: none; }

.demo-stage .card-badge,
.demo-stage .card-heart { z-index: 26; }
.demo-stage .card-badge { top: auto; bottom: 12px; }
.card-heart.is-cued { box-shadow: 0 0 0 3px rgba(204, 97, 107, 0.4); }

.cue {
  position: absolute;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: rgba(255, 255, 255, 0.86);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: background 0.28s ease, color 0.28s ease, box-shadow 0.28s ease;
}
.cue-up    { top: 10px;    left: 50%; transform: translateX(-50%); }
.cue-down  { bottom: 11px; left: 50%; transform: translateX(-50%); }
.cue-left  { left: 9px;    top: 50%;  transform: translateY(-50%); }
.cue-right { right: 9px;   top: 50%;  transform: translateY(-50%); }

.cue.is-on { background: #fff; color: #000; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.22); }
.cue.for-keep.is-on { background: var(--keep); color: #fff; box-shadow: 0 0 0 3px rgba(77, 143, 97, 0.35); }

/* -------------------------------------------------------------- columns --- */
/* Three or six things across, each under its own rule. Boxes would be cards. */

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: clamp(24px, 3.4vw, 44px);
  row-gap: clamp(34px, 4vw, 52px);
  text-align: left;
}
@media (max-width: 980px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; } }

.bento-card {
  display: grid;
  align-content: start;
  gap: 8px;
  padding-top: 24px;
  border-top: 0.5px solid var(--hairline);
}
.bento-card h3 {
  font-family: var(--font-round);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.bento-card p { margin: 0; color: var(--ink-body); font-size: 15px; line-height: 1.5; max-width: 34ch; }
.bento-card .mock { margin-bottom: 14px; }

.card-num {
  font-family: var(--font-round);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}
.card-num.is-keep { color: var(--keep); }

/* ---------------------------------------------------------- app mockups --- */
/* A screen from the app: always the app's dark appearance. */

.mock {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 4 / 3;
  padding: 12px;
  border-radius: 16px;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  color: #fff;
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (prefers-color-scheme: light) { .mock { box-shadow: none; } }

.mock-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.mock-head .right { margin-left: auto; letter-spacing: 0.06em; }

.mock-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; flex: 1; }
.mock-row { display: flex; gap: 7px; flex: 1; }

.thumb {
  position: relative;
  border-radius: var(--r-thumb);
  overflow: hidden;
  background: #141414;
  flex: 1;
  min-height: 0;
}
.thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 26px 8px rgba(0, 0, 0, 0.4);
}
.thumb .cap {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 5px;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
}
.thumb .cap .pct { margin-left: auto; color: rgba(255, 255, 255, 0.7); font-weight: 500; }
.thumb .cap .tick { margin-left: auto; color: var(--keep); }
.thumb .mini-heart { position: absolute; right: 6px; top: 5px; z-index: 2; color: var(--rose); font-size: 10px; }
.thumb .mini-star { position: absolute; left: 6px; bottom: 5px; z-index: 2; color: #fff; font-size: 10px; }

.mock-list { display: grid; gap: 5px; flex: 1; align-content: center; }
.mock-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 2px;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.14);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.mock-item:last-child { border-bottom: 0; }
.mock-item .n { margin-left: auto; color: rgba(255, 255, 255, 0.5); font-variant-numeric: tabular-nums; }
.mock-item .tick { margin-left: auto; color: var(--keep); }
.mock-item .dot { width: 5px; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.35); }

.mock-stat { display: grid; gap: 2px; flex: 1; align-content: center; }
.mock-stat .big {
  font-family: var(--font-round);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.mock-stat .sub { font-size: 10px; font-weight: 500; color: rgba(255, 255, 255, 0.5); }

.mock-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.mock-chip {
  padding: 4px 9px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.65);
}
.mock-chip.is-on { background: #fff; color: #000; box-shadow: none; }

/* photographs, drawn: a wash and two blooms */
.g1 { background-image: radial-gradient(78% 68% at 24% 22%,#2f6f8f 0,transparent 62%),radial-gradient(72% 64% at 76% 76%,#c26a3a 0,transparent 60%),linear-gradient(160deg,#12202c,#0a0d11); }
.g2 { background-image: radial-gradient(72% 66% at 68% 24%,#7b6ab5 0,transparent 60%),radial-gradient(80% 70% at 24% 78%,#3f8f86 0,transparent 62%),linear-gradient(200deg,#161425,#0b0b10); }
.g3 { background-image: radial-gradient(70% 62% at 30% 70%,#b8484f 0,transparent 58%),radial-gradient(76% 68% at 74% 24%,#d8a24a 0,transparent 62%),linear-gradient(140deg,#20140f,#0c0a09); }
.g4 { background-image: radial-gradient(80% 70% at 26% 30%,#4f7fb8 0,transparent 62%),radial-gradient(66% 60% at 78% 72%,#8fb4c4 0,transparent 58%),linear-gradient(170deg,#0f1a24,#090c0f); }
.g5 { background-image: radial-gradient(70% 64% at 72% 32%,#e0763f 0,transparent 58%),radial-gradient(78% 68% at 26% 74%,#5b3a72 0,transparent 62%),linear-gradient(190deg,#1a1218,#0a090c); }
.g6 { background-image: radial-gradient(76% 66% at 28% 28%,#3d8f7a 0,transparent 60%),radial-gradient(70% 64% at 76% 74%,#d9b06a 0,transparent 58%),linear-gradient(160deg,#0f1b18,#090c0b); }

/* ------------------------------------------------------------- the first -- */
/* What happens after the tap, in four numbered rules. */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: clamp(20px, 3vw, 40px);
  row-gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
  counter-reset: step;
}
@media (max-width: 860px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.steps li {
  padding-top: 18px;
  border-top: 0.5px solid var(--hairline);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-round);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.steps b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.025em; }
.steps span { display: block; margin-top: 4px; color: var(--ink-body); font-size: 14.5px; line-height: 1.45; }
.steps .free { color: var(--keep); font-weight: 600; }

/* ---------------------------------------------------------------- offer --- */

.offer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
  text-align: left;
}
@media (max-width: 940px) {
  .offer-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
}

.offer-copy { display: grid; gap: 16px; }
.offer-copy .h2 { max-width: 16ch; }
.offer-copy .lede { max-width: 44ch; }

/* The free/paid ledger — the offer in six words. */
.ledger { display: grid; gap: 0; margin: 4px 0 0; padding: 0; list-style: none; }
.ledger li {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 11px 2px;
  border-top: 0.5px solid var(--hairline);
  font-size: 15.5px;
}
.ledger li:last-child { border-bottom: 0.5px solid var(--hairline); }
.ledger .what { color: var(--ink-body); }
.ledger .price {
  margin-left: auto;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.ledger .price.is-free { color: var(--keep); }

/* Plans, as the paywall draws them: three rows, one filled. */
.plans { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }

.plan {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 16px;
  width: 100%;
  padding: 16px 18px;
  border: 0;
  border-radius: var(--r-card);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--hairline);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 0.28s ease, color 0.28s ease, transform 0.12s ease;
}
.plan:active { transform: scale(0.985); }
.plan[aria-checked="true"] {
  background: var(--ink);
  color: var(--ground);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.plan-name {
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-round);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.plan-badge {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 8px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--hairline);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.plan[aria-checked="true"] .plan-badge {
  box-shadow: none;
  background: color-mix(in srgb, var(--ground) 22%, transparent);
  color: var(--ground);
}
.plan-note { grid-area: 2 / 1; margin: 0; font-size: 13.5px; line-height: 1.35; color: var(--ink-2); }
.plan[aria-checked="true"] .plan-note { color: color-mix(in srgb, var(--ground) 70%, transparent); }
.plan-price {
  grid-area: 1 / 2 / 3 / 3;
  align-self: center;
  text-align: right;
  font-family: var(--font-round);
  font-variant-numeric: tabular-nums;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.plan-price .per { display: block; font-family: var(--font-ui); font-size: 11px; font-weight: 500; letter-spacing: 0.02em; color: var(--ink-3); }
.plan[aria-checked="true"] .plan-price .per { color: color-mix(in srgb, var(--ground) 55%, transparent); }

.plan-fine {
  margin: 14px 0 0;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.55;
}
.plan-fine a { color: var(--ink); text-underline-offset: 3px; }

/* The timeline, three dated rows on a rail — the paywall's, to the point: hollow
   circles, and an outlined heart in favoriteRose on the row that is happening now. */
.timeline { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.tl {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 12px;
  padding: 0 0 18px;
}
.tl:last-child { padding-bottom: 0; }
/* The rule runs between the markers only — under this one, stopping above the next. */
.tl:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 12.5px;
  top: 24px;
  bottom: 4px;
  width: 1px;
  background: color-mix(in srgb, var(--ink) 25%, transparent);
}
.tl .dot {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 20px;
  display: grid;
  place-items: center;
  color: var(--ink-3);
}
.tl:not(.is-now) .dot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 35%, transparent);
}
.tl.is-now .dot { color: var(--rose); }
.tl .dot svg { fill: none; stroke: currentColor; stroke-width: 1.7; }
.tl-when { display: block; font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.tl-what { display: block; margin-top: 1px; color: var(--ink-body); font-size: 14px; line-height: 1.4; }

.offer-panel {
  padding: clamp(24px, 3vw, 32px);
  border-radius: var(--r-sheet);
  background: var(--raised);
  box-shadow: inset 0 0 0 0.5px var(--hairline);
  display: grid;
  gap: 22px;
}
.offer-panel .rule { height: 0.5px; background: var(--hairline); }
.offer-panel h3 { font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.offer-panel .btn { width: 100%; }

/* -------------------------------------------------------------- privacy --- */

.privacy-block { display: grid; justify-items: center; gap: 16px; }
.privacy-block .h2 { max-width: 20ch; }
.privacy-block .lede { max-width: 54ch; }
.fine {
  max-width: 62ch;
  margin: 6px 0 0;
  color: var(--ink-body);
  font-size: 14.5px;
  line-height: 1.65;
}
.fine a { color: var(--ink); text-underline-offset: 3px; }

/* ----------------------------------------------------------------- faq ---- */

.faq { max-width: 760px; margin: 0 auto; text-align: left; }
.faq details { border-bottom: 0.5px solid var(--hairline); }
.faq details:first-child { border-top: 0.5px solid var(--hairline); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 4px;
  font-size: 16.5px;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  margin-left: auto;
  font-weight: 400;
  font-size: 20px;
  color: var(--ink-3);
}
.faq details[open] summary::after { content: "\2013"; }
.faq p {
  margin: -4px 0 0;
  padding: 0 4px 20px;
  max-width: 66ch;
  color: var(--ink-body);
  font-size: 15px;
  line-height: 1.6;
}
.faq p a { color: var(--ink); text-underline-offset: 3px; }

/* ------------------------------------------------------------ close cta --- */

.close { padding-block: clamp(76px, 9vw, 132px); text-align: center; }
.close-panel {
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(44px, 6vw, 76px) var(--gutter);
  border-radius: var(--r-sheet);
  background: var(--raised);
  box-shadow: inset 0 0 0 0.5px var(--hairline);
  display: grid;
  justify-items: center;
  gap: 16px;
}
.close-panel .lede { max-width: 44ch; }

/* -------------------------------------------------------------- footer ---- */

.footer {
  padding-block: 40px 56px;
  border-top: 0.5px solid var(--hairline);
  text-align: center;
  color: var(--ink-2);
  font-size: 14px;
}
.footer-brand {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin: 14px 0 10px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }
.footer .fine-legal { color: var(--ink-2); font-size: 12.5px; max-width: 60ch; margin: 12px auto 0; line-height: 1.5; }

/* --------------------------------------------------------------- legal ---- */

.page { max-width: 68ch; margin: 0 auto; padding: clamp(40px, 6vw, 76px) var(--gutter) 90px; }
.page h1 { font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.04em; margin: 0 0 8px; }
.page h2 { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.03em; margin: 40px 0 10px; }
.page p, .page li { color: var(--ink-body); }
.page li { margin-bottom: 8px; }
.page a { color: var(--ink); text-underline-offset: 3px; }
.page strong { color: var(--ink); font-weight: 600; }
.page .updated { font-size: 14px; color: var(--ink-3); margin-bottom: 36px; }
.page .back {
  display: inline-flex; align-items: center; gap: 7px;
  margin-bottom: 32px; font-size: 15px; font-weight: 500;
  color: var(--ink-2); text-decoration: none;
}
.page .back:hover { color: var(--ink); }
.page .lead {
  font-size: 1.0625rem;
  color: var(--ink);
  border-left: 2px solid var(--hairline);
  padding-left: 16px;
  margin-bottom: 28px;
}

/* ============================================================== the phone ==
 *
 * Most of the people who read this page are holding the product. Everything below is
 * about that: thumb-sized targets, a CTA that comes back once the hero has gone, and a
 * deck that can never take the page's scroll hostage.
 */

/* The CTA that follows you. Shown by offer.js once the hero has scrolled away, and
   hidden again at the closing panel, which already has a button doing this job. */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--hairline);
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.bar[hidden] { display: none; }
.bar .btn { width: 100%; }
.bar-note {
  text-align: center;
  color: var(--ink-2);
  font-size: 12px;
  letter-spacing: -0.005em;
}
.bar.is-up { transform: none; }

@media (max-width: 860px) {
  .bar { display: flex; }
  /* so the last line of the footer clears the bar */
  body { padding-bottom: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .bar { transition: none; }
}

/* Only the deck can drag, and on a touch screen it only ever drags sideways.
   `touch-action: none` is what makes an up-or-down drag reach the deck at all — and on a
   phone that would mean a card eating a scroll, so there it keeps `pan-y` and the two
   vertical verdicts move to the buttons underneath. A demo is not worth a page that
   won't scroll. */
.deck { touch-action: none; }
@media (pointer: coarse) {
  .deck { touch-action: pan-y; }
}

/* One hint for a pointer, one for a thumb. */
.deck-hint-touch { display: none; }
@media (pointer: coarse) {
  .deck-hint { display: none; }
  .deck-hint-touch { display: block; margin: 0; color: var(--ink-3); font-size: 13px; text-align: center; max-width: 34ch; }
}

button, .btn, .key, .plan, summary { -webkit-tap-highlight-color: transparent; }

@media (max-width: 860px) {
  .nav-inner { height: 58px; gap: 12px; }
  .brand { font-size: 18px; }
  .brand img { width: 26px; height: 26px; }

  /* 44x44 is the app's floor, and it is the floor here too. */
  .btn-sm { height: 44px; }
  .key { height: 44px; padding: 0 16px; font-size: 14px; }
  .faq summary { padding: 17px 4px; }

  .section { padding-block: clamp(56px, 11vw, 84px); }
  .section-head { margin-bottom: 34px; }
  .hero { padding-block: 26px 44px; }
  .hero-stage { margin-top: 34px; }

  .aside-note { margin-top: 24px; font-size: 1rem; }
  .lede { max-width: 42ch; }
}

@media (max-width: 620px) {
  :root { --gutter: 20px; }

  /* The bar carries the CTA from here down, so the nav is just the mark. */
  .nav .btn-sm { display: none; }

  /* Wrapping a middot onto its own line reads as a typo. */
  .stamp-rule .dot { display: none; }
  .stamp-rule { gap: 6px 15px; font-size: 12px; }

  .h1 { font-size: clamp(2.3rem, 10.4vw, 3rem); line-height: 1.0; }
  .h2 { font-size: clamp(1.75rem, 7.6vw, 2.3rem); }
  .hero .h1, .section-head .h2, .problem-block .h2 { max-width: none; }
  .hero .lede, .section-head .lede { max-width: 40ch; }

  /* The bar is doing this job from here down; a second full-width button in the
     middle of the page is a third of a screen spent saying the same thing. */
  .cta-note { font-size: 13px; }
  .section-cta .btn-store,
  .close-panel .btn-store { width: 100%; max-width: 340px; }

  .offer-panel { padding: 20px 18px 22px; gap: 20px; }
  .plan { padding: 14px 15px; border-radius: 18px; }
  .plan-name { font-size: 17px; }
  .plan-price { font-size: 19px; }
  .plan-note { font-size: 13px; }

  .ledger li { font-size: 14.5px; gap: 10px; padding: 10px 0; }
  .steps b { font-size: 16.5px; }

  /* A screen from the app, not a poster of one: full-bleed it goes tall and empty. */
  .mock { max-width: 270px; }
  .bento-card p, .steps span { font-size: 15px; }
  .close-panel { padding: 40px 22px 44px; border-radius: 22px; }
  .footer nav { gap: 16px; }
}

/* The narrowest phone still in service. Nothing may overflow at 320px. */
@media (max-width: 380px) {
  .nav .btn-sm .long { display: none; }
  .phone { width: min(304px, 88vw); }
  .keys { gap: 6px; }
  .key { padding: 0 13px; font-size: 13px; }
  .stamp-rule { font-size: 11px; letter-spacing: 0.18em; gap: 8px 12px; }
  .plan-price .per { font-size: 10px; }
}

/* A phone on its side: the deck would fill the viewport twice over. */
@media (max-height: 560px) and (orientation: landscape) and (pointer: coarse) {
  .phone { width: min(240px, 60vw); }
  .bar { display: none; }
  body { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .demo-card, .plan, .btn, .gesture-row, .cue, .mark { transition: none !important; }
  .mark.is-flashing { animation: none; }
}
