/* Daycard launch site. Tokens from docs/site/BRIEF.md. */
:root {
  color-scheme: light dark;
  --bg: #faf8f3;
  --surface: #ffffff;
  --surface-sunken: #f2efe7;
  --fridge: #eceae4;
  --fridge-edge: #d9d5cb;
  --border: #e1dccf;
  --border-strong: #b9b2a1;
  --ink: #1b2a41;
  --ink-muted: #56627a;
  --accent: #11674f;
  --accent-hover: #0c5240;
  --accent-soft: #e2f1eb;
  --on-accent: #ffffff;
  --magnet: #c8412b;
  --focus: #1d63c9;

  --morning-tint: #fdf1dc;
  --morning-ink: #8a5300;
  --noon-tint: #fdf7d3;
  --noon-ink: #7a6200;
  --evening-tint: #fbe6dd;
  --evening-ink: #9a3d1c;
  --bedtime-tint: #e7e9f7;
  --bedtime-ink: #3a438f;

  --shadow-card: 0 1px 2px rgb(27 42 65 / 0.08), 0 8px 24px rgb(27 42 65 / 0.1), 0 24px 60px rgb(27 42 65 / 0.08);
  --shadow-accent: 0 1px 2px rgb(12 82 64 / 0.25), 0 4px 12px rgb(17 103 79 / 0.22);
  --shadow-lift: 0 2px 4px rgb(27 42 65 / 0.08), 0 14px 32px rgb(27 42 65 / 0.12);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --t1: 120ms;
  --t2: 240ms;
  --t3: 400ms;
  --t4: 600ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  --header-h: 64px;
  --gutter: clamp(16px, 4vw, 40px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1724;
    --surface: #172133;
    --surface-sunken: #0b121d;
    --fridge: #1d2738;
    --fridge-edge: #2a3850;
    --border: #2a3850;
    --border-strong: #43546f;
    --ink: #e8edf5;
    --ink-muted: #a3afc2;
    --accent: #4cc39b;
    --accent-hover: #6fd3b0;
    --accent-soft: #143a31;
    --on-accent: #06241b;
    --magnet: #e0634c;
    --focus: #7fb0ff;
    --shadow-card: 0 1px 2px rgb(0 0 0 / 0.4), 0 12px 32px rgb(0 0 0 / 0.45);
    --shadow-accent: 0 1px 2px rgb(0 0 0 / 0.4), 0 4px 14px rgb(76 195 155 / 0.18);
    --shadow-lift: 0 2px 4px rgb(0 0 0 / 0.4), 0 16px 36px rgb(0 0 0 / 0.5);
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
}
h1,
h2,
h3,
p,
ul,
ol,
figure {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
}
img,
svg {
  display: block;
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  min-height: 44px;
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  font-weight: 700;
}
.skip-link:focus {
  top: 10px;
}

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}
h1.display {
  font-size: clamp(2.5rem, 1.6rem + 4vw, 4.75rem);
}
.h2 {
  font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
  max-width: 22ch;
}
.h2--small {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
}
.lead {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 38rem;
  text-wrap: pretty;
}
/* The brief asks for 0.8125rem; set at 15 px to keep the page rule of no text under 15 px. */
.eyebrow {
  font-size: 0.9375rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 14px;
}
.quiet {
  color: var(--ink-muted);
}
section {
  position: relative;
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  min-width: 44px;
  padding: 12px 22px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  border: 2px solid transparent;
  transition:
    transform var(--t1) var(--ease),
    filter var(--t2) var(--ease);
}
.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-accent);
}
.btn--primary:hover {
  background: var(--accent-hover);
}
.btn--secondary {
  border-color: var(--accent);
  color: var(--accent);
  background: transparent;
}
.btn--secondary:hover {
  background: var(--accent-soft);
}
.btn:active {
  transform: translateY(1px) scale(0.98);
}
.btn--compact {
  min-height: 44px;
  padding: 10px 18px;
}
.btn--large {
  min-height: 56px;
  padding: 14px 30px;
  font-size: 1.125rem;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 4px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent);
}
.text-link:hover {
  text-decoration-color: currentColor;
  color: var(--accent-hover);
}
.text-link:active svg {
  transform: translateY(2px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
}
.site-header__inner {
  max-width: 1200px;
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  min-width: 44px;
  text-decoration: none;
  color: var(--ink);
}
.logo-mark {
  width: 32px;
  height: 32px;
  flex: none;
}
.logo-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.logo:hover .logo-word {
  color: var(--accent);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.site-nav ul {
  display: flex;
  gap: 4px;
}
.site-nav ul a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 500;
}
.site-nav ul a:hover {
  background: var(--surface-sunken);
}
.site-nav ul a:active {
  color: var(--accent);
}
@media (max-width: 720px) {
  .site-nav ul {
    display: none;
  }
}

/* ---------- The card mockup (always light, never reads theme variables) ---------- */
.dc-frame {
  container-type: inline-size;
  width: 100%;
}
.dc {
  aspect-ratio: 1.45;
  display: flex;
  flex-direction: column;
  padding: 3cqi 3.4cqi 2.4cqi;
  background: #ffffff;
  color: #1b2a41;
  border: 1px solid #e1dccf;
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  font-family: var(--font-body);
  line-height: 1.2;
  overflow: hidden;
  color-scheme: light;
}
.dc p {
  margin: 0;
}
.dc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2cqi;
  margin-bottom: 2cqi;
}
.dc-title {
  font-weight: 700;
  font-size: 2cqi;
  color: #56627a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dc-patient {
  position: relative;
  display: inline-block;
  font-weight: 700;
  font-size: 4.2cqi;
  letter-spacing: -0.01em;
  overflow: hidden;
}
.dc-mask {
  display: none;
}
.dc-updated {
  font-size: 1.6cqi;
  color: #56627a;
  white-space: nowrap;
}
.dc-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}
.dc-col-med {
  width: 36%;
}
.dc-corner {
  text-align: left;
  vertical-align: bottom;
  font-size: 1.5cqi;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #56627a;
  padding: 0 1cqi 1cqi 0;
}
.dc-slot {
  --tint: #fdf1dc;
  --ink: #8a5300;
  position: relative;
  background: var(--tint);
  color: var(--ink);
  padding: 1.1cqi 0.5cqi;
  font-size: 1.85cqi;
  font-weight: 700;
}
.dc-slot--noon {
  --tint: #fdf7d3;
  --ink: #7a6200;
}
.dc-slot--evening {
  --tint: #fbe6dd;
  --ink: #9a3d1c;
}
.dc-slot--bedtime {
  --tint: #e7e9f7;
  --ink: #3a438f;
}
.dc-slot--morning {
  border-top-left-radius: 1.4cqi;
}
.dc-slot--bedtime {
  border-top-right-radius: 1.4cqi;
}
.dc-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #ffffff;
  opacity: 0;
  border-radius: inherit;
}
.dc-slot-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4cqi;
}
.dc-slot-icon {
  width: 3.3cqi;
  height: 3.3cqi;
}
.dc-row > * {
  border-bottom: 1px solid #e1dccf;
  padding: 1.15cqi 0.8cqi;
}
.dc-med {
  text-align: left;
  font-weight: 400;
  padding-left: 0 !important;
}
.dc-name {
  display: block;
  font-weight: 700;
  font-size: 2.2cqi;
}
.dc-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5cqi 0.9cqi;
  margin-top: 0.45cqi;
}
.dc-purpose {
  font-size: 1.5cqi;
  color: #56627a;
}
.dc-badges {
  display: contents;
}
.dc-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35cqi;
  padding: 0.15cqi 0.75cqi 0.15cqi 0.5cqi;
  border: 1px solid #b9b2a1;
  border-radius: 99px;
  font-size: 1.3cqi;
  font-weight: 500;
  white-space: nowrap;
}
.dc-badge-icon {
  width: 1.7cqi;
  height: 1.7cqi;
}
.dc-note {
  font-size: 1.4cqi;
  font-style: italic;
  color: #1b2a41;
}
.dc-dose {
  text-align: center;
  font-size: 2cqi;
  font-weight: 500;
  white-space: nowrap;
}
.dc-dose[data-empty]::before {
  content: "\2014" / "";
  color: #b9b2a1;
}
.dc-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 2cqi;
  padding-top: 1.4cqi;
  border-top: 1px solid #e1dccf;
  font-size: 1.5cqi;
  color: #56627a;
}
.dc-pharmacy span:first-child {
  font-weight: 700;
  color: #1b2a41;
}
/* In the hand: keep the table, scale the type up and let the card grow taller. */
@container (max-width: 420px) {
  .dc {
    aspect-ratio: auto;
    padding: 4cqi 4cqi 3cqi;
  }
  .dc-col-med {
    width: 28%;
  }
  .dc-title {
    font-size: 3.2cqi;
  }
  .dc-patient {
    font-size: 6.4cqi;
  }
  .dc-updated {
    font-size: 3cqi;
  }
  .dc-slot {
    font-size: 3cqi;
    padding: 1.6cqi 0.3cqi;
  }
  .dc-corner {
    font-size: 3cqi;
  }
  .dc-slot-icon {
    width: 5cqi;
    height: 5cqi;
  }
  .dc-name {
    font-size: 3.9cqi;
  }
  .dc-dose {
    font-size: 3.4cqi;
    padding-inline: 0.3cqi;
  }
  .dc-row > * {
    padding-block: 2cqi;
  }
  .dc-foot {
    font-size: 3cqi;
  }
  .dc-bring {
    display: none;
  }
}
@container (max-width: 360px) {
  .dc-details {
    display: none;
  }
}
/* The header strip used in "Five boxes". */
.dc--strip {
  aspect-ratio: auto;
  padding: 1.6cqi;
}
.dc--strip .dc-corner {
  padding-bottom: 1.6cqi;
}

/* ---------- Fridge door ---------- */
.door {
  position: relative;
  isolation: isolate;
}
.door__panel {
  position: absolute;
  inset: 0;
  background: var(--fridge);
  border: 1px solid var(--fridge-edge);
  border-radius: 28px;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.6),
    inset 0 24px 40px -24px rgb(255 255 255 / 0.5);
}
@media (prefers-color-scheme: dark) {
  .door__panel {
    box-shadow:
      inset 0 1px 0 rgb(255 255 255 / 0.07),
      inset 0 24px 40px -24px rgb(255 255 255 / 0.05);
  }
}
.door__handle {
  position: absolute;
  left: 18px;
  top: 16%;
  bottom: 16%;
  width: 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--fridge-edge) 80%, var(--ink) 12%);
}
.magnet {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgb(255 255 255 / 0.65), rgb(255 255 255 / 0) 42%), var(--magnet);
  box-shadow:
    0 2px 3px rgb(0 0 0 / 0.25),
    0 6px 10px -2px rgb(0 0 0 / 0.2);
}

/* ---------- Hero ---------- */
.hero {
  padding: clamp(32px, 6vw, 88px) 0 clamp(56px, 8vw, 120px);
}
.hero__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero__text h1 {
  margin-bottom: 22px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin: 32px 0 18px;
}
.hero-door {
  --px: 0;
  --py: 0;
  aspect-ratio: 5 / 6;
  max-height: 680px;
  width: 100%;
}
.plane {
  position: absolute;
  inset: 0;
  transition: transform var(--t2) var(--ease);
}
.plane--back {
  transform: translate(calc(var(--px) * 2px), calc(var(--py) * 2px));
}
.plane--mid {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 7% 0 11%;
  transform: translate(calc(var(--px) * 6px), calc(var(--py) * 6px));
}
.hero-card {
  position: relative;
  flex: 0 0 100%;
  min-width: 0;
  transform: rotate(2deg);
}
/* The magnet rides on the card's top edge, with a little extra parallax of its own. */
.hero-magnet {
  top: -12px;
  left: calc(50% - 14px);
  pointer-events: none;
  translate: calc(var(--px) * 4px) calc(var(--py) * 4px);
  transition: translate var(--t2) var(--ease);
}

@media (max-width: 899px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  /* The card grows taller in the hand, so the door takes its height from the card. */
  .hero-door {
    aspect-ratio: auto;
  }
  .hero-card {
    transform: rotate(1deg);
  }
  .plane--mid {
    position: relative;
    padding: 32px 5% 32px 9%;
  }
}

/* ---------- Problem ---------- */
.problem {
  background: var(--surface-sunken);
  padding: clamp(64px, 9vw, 128px) 0;
}
.problem__grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.problem__text .h2 {
  margin-bottom: 22px;
}
.boxes {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4%;
  height: 140px;
}
.box {
  position: relative;
  flex: none;
  width: calc(var(--w) * 1px);
  height: calc(var(--h) * 1px);
  border-radius: 4px;
  background: var(--tone);
  box-shadow:
    inset -6px 0 0 rgb(0 0 0 / 0.05),
    0 2px 6px rgb(27 42 65 / 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}
.box--1 {
  --tone: #e3e7ea;
}
.box--2 {
  --tone: #ece4d8;
}
.box--3 {
  --tone: #dfe6e0;
}
.box--4 {
  --tone: #e9e1e6;
}
.box--5 {
  --tone: #e2e3ec;
}
.box-label {
  width: 80%;
  max-height: 78%;
  padding: 4px;
  background: #ffffff;
  border: 1px solid #d9d5cb;
  font-size: 7px;
  line-height: 1.2;
  color: #6f7787;
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
}
.box-label span:first-child {
  font-weight: 700;
  color: #4a5262;
}
.problem__line {
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
  margin: 28px 0 22px;
}
.problem__strip {
  max-width: 560px;
  margin-inline: auto;
}
@media (max-width: 899px) {
  .problem__grid {
    grid-template-columns: 1fr;
  }
}
@media (min-width: 900px) {
  .box {
    width: calc(var(--w) * 1.8px);
    height: calc(var(--h) * 1.8px);
  }
  .boxes {
    height: 220px;
  }
  .problem__strip {
    max-width: 640px;
  }
}
@media (max-width: 480px) {
  .box {
    width: calc(var(--w) * 0.72px);
    height: calc(var(--h) * 0.72px);
  }
  .boxes {
    height: 100px;
    gap: 3%;
  }
}

/* ---------- How it works ---------- */
.how {
  padding: clamp(72px, 10vw, 140px) 0 clamp(48px, 6vw, 96px);
}
.how .h2 {
  margin-bottom: clamp(32px, 5vw, 64px);
}
.how__grid {
  display: grid;
  gap: 48px;
}
.how__steps {
  display: grid;
  gap: 56px;
}
.step__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  font-size: clamp(3.5rem, 2.5rem + 3vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: color-mix(in srgb, var(--accent) 30%, transparent);
  margin-bottom: 8px;
}
.step h3 {
  font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem);
  line-height: 1.2;
  margin-bottom: 10px;
}
.step p {
  color: var(--ink-muted);
  max-width: 32rem;
}
.step__static {
  margin-top: 24px;
  max-width: 640px;
}
.how__stage-col {
  display: none;
}
.saved-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  min-height: 40px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 700;
}
.saved-pill svg {
  color: var(--accent);
}
.how-stage {
  position: sticky;
  top: 96px;
  padding-top: 64px;
}
.how-stage__tilt {
  transition: transform var(--t4) var(--ease);
}
.how-chip {
  position: absolute;
  top: 0;
  left: 6%;
  z-index: 2;
  display: grid;
  min-height: 48px;
  padding: 0 18px;
  align-items: center;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lift);
  font-size: 0.9375rem;
  white-space: nowrap;
}
.how-chip > * {
  grid-area: 1 / 1;
  transition: opacity var(--t2) var(--ease);
}
.how-chip__label {
  color: var(--ink-muted);
}
.how-chip__sep {
  color: var(--border-strong);
  margin: 0 4px;
}
.how-chip__print {
  opacity: 0;
  justify-self: center;
  padding: 8px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--accent);
}

@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .how__grid {
    grid-template-columns: 5fr 7fr;
    gap: clamp(32px, 5vw, 80px);
  }
  .how__stage-col {
    display: block;
  }
  .step {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .how__steps {
    gap: 0;
  }
  .step__static {
    display: none;
  }
  .js .step {
    opacity: 0.45;
    transition: opacity var(--t3) var(--ease);
  }
  .js .step.is-active {
    opacity: 1;
  }
  .how-stage[data-state] .dc-row {
    transition: transform var(--t4) var(--ease);
  }
  .how-stage[data-state="1"] .how-stage__tilt,
  .how-stage[data-state="2"] .how-stage__tilt {
    transform: rotate(2deg);
  }
  .how-stage[data-state="1"] .dc-badge {
    opacity: 0;
  }
  .how-stage[data-state="2"] .dc-badge {
    animation: badge-pop var(--t3) var(--spring) both;
  }
  .how-stage[data-state="1"] .dc-mask {
    display: block;
    position: absolute;
    inset: 0;
    background: #ffffff;
    animation: name-reveal 0.8s steps(14, end) 0.2s both;
  }
  .how-stage .is-arriving > * {
    animation: rise-6 var(--t3) var(--ease) both;
  }
  .how-stage .is-arriving:nth-child(2) > * {
    animation-delay: 70ms;
  }
  .how-stage .is-arriving:nth-child(3) > * {
    animation-delay: 140ms;
  }
  .how-stage .is-arriving:nth-child(4) > * {
    animation-delay: 210ms;
  }
  .how-chip .caret {
    animation: blink 1s steps(1) infinite;
  }
  .how-stage[data-state="3"] .how-chip__form {
    opacity: 0;
  }
  .how-stage[data-state="3"] .how-chip__print {
    opacity: 1;
    animation: press var(--t3) var(--ease) 0.25s both;
  }
  .how-stage[data-state="3"] .dc-slot::after {
    animation: wash 0.7s var(--ease) 0.45s both;
  }
  .how-stage__saved {
    transition:
      opacity var(--t3) var(--ease),
      transform var(--t3) var(--ease);
  }
  .how-stage[data-state="1"] .how-stage__saved,
  .how-stage[data-state="2"] .how-stage__saved {
    opacity: 0;
    transform: translateY(6px);
  }
  .how-stage[data-state="3"] .how-stage__saved {
    transition-delay: 0.9s;
  }
  .how-stage:not([data-state="3"]) .how-chip__print {
    opacity: 0;
  }
  .how-stage:not([data-state]) .how-chip {
    display: none;
  }
}

/* ---------- Readable from across the kitchen ---------- */
.peak {
  padding: clamp(72px, 10vw, 140px) 0 clamp(56px, 8vw, 112px);
}
.peak__intro .h2 {
  margin-bottom: 22px;
}
.peak__track {
  display: none;
}
.peak__static {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
  margin-top: 48px;
}
.peak__fig figcaption {
  margin-top: 14px;
  color: var(--ink-muted);
  font-weight: 700;
}
.peak__far {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-height: 100%;
}
.peak__far-card {
  width: 42%;
}
.peak__far-label {
  flex: none;
  width: 84px;
  height: 30px;
  overflow: hidden;
}
.peak__far-label .box-label-true {
  transform: scale(0.42);
  transform-origin: top left;
}
.box-label-true {
  flex: none;
  width: 200px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #d9d5cb;
  color: #4a5262;
  font-size: 7.5px;
  line-height: 1.35;
  box-shadow: 0 1px 3px rgb(27 42 65 / 0.1);
}
@media (max-width: 899px) {
  .peak__static {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .peak__static {
    display: none;
  }
  .peak__track {
    display: block;
    height: 200vh;
    margin-top: 32px;
    view-timeline-name: --peak;
  }
  .peak__sticky {
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    display: grid;
    place-items: center;
    overflow: hidden;
  }
  .peak__dim {
    position: absolute;
    inset: 0;
    background: var(--fridge);
    opacity: var(--progress, 0);
  }
  .peak__scale {
    position: relative;
    display: flex;
    align-items: center;
    gap: 32px;
    transform: scale(calc(1 - 0.58 * var(--progress, 0)));
  }
  .peak__card {
    width: min(760px, 66vw);
  }
  .peak__caption {
    position: absolute;
    bottom: 8vh;
    left: 0;
    right: 0;
    text-align: center;
    padding-inline: var(--gutter);
    font-size: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
    font-weight: 700;
  }
  .js .peak__caption {
    opacity: clamp(0, (var(--progress, 0) - 0.8) * 5, 1);
  }
  @supports (animation-timeline: view()) {
    .peak__scale,
    .peak__dim,
    .peak__caption,
    .js .peak__caption {
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: --peak;
      animation-range: contain 0% contain 100%;
    }
    .peak__scale {
      animation-name: peak-shrink;
    }
    .peak__dim {
      animation-name: fade-in;
    }
    .peak__caption,
    .js .peak__caption {
      animation-name: peak-caption;
    }
  }
}
.spec-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
}
.spec-chips li {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 180px;
  padding: 20px 28px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-muted);
}
.spec-chips__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-variation-settings: "SOFT" 50, "WONK" 0;
  font-size: 2.75rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
}
@media (max-width: 480px) {
  .spec-chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .spec-chips li {
    min-width: 0;
    padding: 16px 8px;
    text-align: center;
  }
  .spec-chips__num {
    font-size: 2rem;
  }
}

/* ---------- Never colour alone ---------- */
.mono {
  padding: clamp(64px, 9vw, 128px) 0;
  background: var(--surface-sunken);
}
.mono__lead {
  margin: 22px 0 32px;
}
.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 28px;
}
.segmented label {
  position: relative;
  cursor: pointer;
}
.segmented input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.segmented span {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  color: var(--ink-muted);
  transition: transform var(--t1) var(--ease);
}
.segmented label:hover span {
  color: var(--ink);
}
.segmented input:checked + span {
  background: var(--accent);
  color: var(--on-accent);
}
.segmented input:focus-visible + span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.segmented label:active span {
  transform: scale(0.97);
}
.mono__grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}
.mono__card {
  position: relative;
}
.mono__card .dc-frame {
  transition: filter 300ms var(--ease);
}
.grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease);
}
.mono__demo:has(#tone-mono:checked) .mono__card .dc-frame {
  filter: grayscale(1) contrast(1.1);
}
.mono__demo:has(#tone-mono:checked) .grain {
  opacity: 0.04;
}
.legend__title {
  font-size: 1.0625rem;
  margin: 0 0 12px;
}
.legend__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 14px 10px;
  margin-bottom: 28px;
}
.legend__list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.25;
}
.legend__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
@media (max-width: 899px) {
  .mono__grid {
    grid-template-columns: 1fr;
  }
  .legend__list {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Features bento ---------- */
.features {
  padding: clamp(72px, 10vw, 140px) 0;
}
.features .h2 {
  margin-bottom: clamp(32px, 5vw, 56px);
}
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  transition:
    transform var(--t2) var(--ease),
    box-shadow var(--t2) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
  }
}
.tile h3 {
  font-size: 1.3125rem;
  line-height: 1.25;
}
.tile p {
  color: var(--ink-muted);
}
.tile__visual {
  margin-bottom: 10px;
}
.tile__visual--row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--ink-muted);
}
.tile--large {
  grid-column: span 4;
  grid-row: span 2;
}
.tile--large .tile__visual {
  flex: 1;
}
.tile--half {
  grid-column: span 2;
}
.tile--wide {
  grid-column: span 3;
}
.tile--strip {
  grid-column: span 6;
  flex-direction: row;
  align-items: center;
  gap: 32px;
}
.tile--strip .tile__visual {
  margin: 0;
  flex: none;
}
.mini-search {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 420px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 2px solid var(--accent);
  background: var(--bg);
  margin-bottom: 14px;
  color: var(--ink-muted);
}
.mini-search span:first-of-type {
  color: var(--ink);
}
.mini-search .caret {
  margin-left: -8px;
}
.mini-list {
  display: grid;
  gap: 8px;
  max-width: 520px;
}
.mini-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--ink-muted);
}
.mini-list b {
  color: var(--ink);
  font-size: 1.0625rem;
}
.mini-list .is-hit {
  background: var(--accent-soft);
  border-color: var(--accent);
}
.mini-list li:not(.is-hit) {
  opacity: 0.6;
}
.mini-foot {
  padding: 14px 16px;
  border-radius: 10px;
  background: #ffffff;
  color: #56627a;
  border: 1px solid #e1dccf;
  font-size: 0.9375rem;
}
.mini-foot b {
  color: #1b2a41;
}
.a4 {
  position: relative;
  width: 168px;
  aspect-ratio: 297 / 210;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg);
  padding: 12px;
}
.a4__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 10px;
  border-radius: 4px;
  background: #ffffff;
  border: 1px solid #e1dccf;
}
.a4__card span {
  height: 5px;
  border-radius: 3px;
  background: #e7e9f7;
}
.a4__card span:first-child {
  width: 50%;
  background: #1b2a41;
  opacity: 0.6;
}
.a4__tick {
  position: absolute;
  background: var(--accent);
}
.a4__tick--top {
  top: 0;
  left: 50%;
  width: 1.5px;
  height: 12px;
}
.a4__tick--left {
  left: 0;
  top: 50%;
  height: 1.5px;
  width: 12px;
}
.a4__mm {
  position: absolute;
  left: calc(100% + 10px);
  top: -2px;
  white-space: nowrap;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--accent);
}
.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 700;
}
.arrow {
  color: var(--accent);
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.split__half {
  position: relative;
  display: grid;
  place-items: center;
  padding: 26px 14px 12px;
}
.split__half--light {
  background: #faf8f3;
}
.split__half--dark {
  background: #0f1724;
}
.chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 16px;
  background: #f2efe7;
  border-bottom: 1px solid #e1dccf;
}
.split__half--dark .chrome {
  background: #172133;
  border-color: #2a3850;
}
.mini-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 80%;
  max-width: 150px;
  padding: 10px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e1dccf;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.15);
}
.mini-card i {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #fdf1dc 0 25%, #fdf7d3 25% 50%, #fbe6dd 50% 75%, #e7e9f7 75%);
}
.mini-card i:first-child {
  width: 55%;
  background: #1b2a41;
  opacity: 0.6;
}
kbd {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--surface-sunken);
  border: 1px solid var(--border-strong);
  border-bottom-width: 3px;
  font: inherit;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--ink);
}
kbd.is-focus {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
@media (max-width: 899px) {
  .bento {
    grid-template-columns: 1fr;
  }
  .tile--large,
  .tile--half,
  .tile--wide,
  .tile--strip {
    grid-column: auto;
    grid-row: auto;
  }
  .tile--strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}
@media (max-width: 480px) {
  .tile {
    padding: 22px;
  }
}

/* ---------- Try it ---------- */
.try {
  padding: clamp(64px, 9vw, 120px) 0;
}
.try__intro .h2 {
  margin-bottom: 18px;
}
.browser {
  max-width: 1120px;
  margin: 40px auto 0;
  margin-inline: max(var(--gutter), calc((100% - 1120px) / 2));
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.browser__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  background: var(--surface-sunken);
  border-bottom: 1px solid var(--border);
}
.browser__dots {
  position: absolute;
  left: 14px;
  display: flex;
  gap: 7px;
}
.browser__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.browser__address {
  padding: 2px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  font-size: 0.9375rem;
  white-space: nowrap;
}
.browser iframe {
  display: block;
  width: 100%;
  height: 760px;
  border: 0;
  background: var(--bg);
}
.try__after {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 28px;
  justify-content: center;
  text-align: center;
}
@media (max-width: 899px) {
  .browser iframe {
    height: 680px;
  }
}
@media (max-width: 480px) {
  .browser {
    margin-inline: 12px;
  }
  .browser__bar {
    height: 32px;
  }
  .browser__address {
    padding: 0 12px;
  }
  .browser iframe {
    height: 640px;
  }
}

/* ---------- Privacy band ---------- */
.privacy-wrap {
  padding: 0 var(--gutter) clamp(64px, 9vw, 120px);
}
.privacy {
  max-width: 44rem;
  margin-inline: auto;
  padding: clamp(28px, 5vw, 48px);
  border-radius: 20px;
  background: var(--accent-soft);
  text-align: center;
}
.privacy__icon {
  margin: 0 auto 16px;
  color: var(--accent);
}
.privacy h2 {
  margin: 0 auto 14px;
}
.privacy p {
  color: var(--ink);
}

/* ---------- Closing ---------- */
.closing {
  background: var(--fridge);
  border-block: 1px solid var(--fridge-edge);
  padding: clamp(56px, 8vw, 112px) 0;
}
.closing__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.closing__text .h2 {
  margin-bottom: 18px;
}
.closing__text .lead {
  margin-bottom: 32px;
}
.door--wide {
  padding: 44px 6% 36px 10%;
}
.door--wide .door__panel {
  background: color-mix(in srgb, var(--fridge) 70%, var(--surface));
}
.closing__card {
  position: relative;
}
.door--wide .magnet--left {
  left: calc(10% + 28px);
  top: 30px;
}
.door--wide .magnet--right {
  right: calc(6% + 28px);
  top: 30px;
}
@media (max-width: 899px) {
  .closing__grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 56px 0 40px;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px 32px;
  align-items: start;
}
.site-footer__grid p {
  color: var(--ink-muted);
}
.site-footer__links {
  display: flex;
  gap: 8px;
}
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 8px;
  font-weight: 500;
}
.site-footer__links a:hover {
  color: var(--accent);
}
.small-print {
  grid-column: 1 / -1;
  font-size: 0.9375rem;
}
@media (max-width: 640px) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }
  .site-footer__links {
    margin-left: -10px;
  }
}

/* ---------- Motion (only with motion allowed, only once JS is running) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-card {
    animation: card-in var(--t4) var(--spring) 0.1s both;
  }
  .js .hero-magnet {
    animation: magnet-drop var(--t3) var(--spring) 0.22s both;
  }
  .js .hero-card .dc-row > * {
    animation: rise-6 var(--t3) var(--ease) both;
  }
  .js .hero-card .dc-row:nth-child(1) > * {
    animation-delay: 0.6s;
  }
  .js .hero-card .dc-row:nth-child(2) > * {
    animation-delay: 0.67s;
  }
  .js .hero-card .dc-row:nth-child(3) > * {
    animation-delay: 0.74s;
  }
  .js .hero-card .dc-row:nth-child(4) > * {
    animation-delay: 0.81s;
  }
  .js .hero-card .dc-row:nth-child(5) > * {
    animation-delay: 0.88s;
  }
  @media (max-width: 899px) {
    .js .hero-card {
      animation-name: card-in-phone;
    }
  }

  .js [data-reveal].display {
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity var(--t4) var(--ease),
      transform var(--t4) var(--ease);
  }
  .js [data-reveal].display.is-in {
    opacity: 1;
    transform: none;
  }

  .js .problem__visual .box {
    transition: transform var(--t4) var(--ease);
    transition-delay: calc(var(--i) * 60ms);
  }
  .js .problem__visual.is-in .box {
    transform: translateX(var(--shift));
  }
  .box:nth-child(1) {
    --shift: 150%;
  }
  .box:nth-child(2) {
    --shift: 60%;
  }
  .box:nth-child(4) {
    --shift: -55%;
  }
  .box:nth-child(5) {
    --shift: -150%;
  }
  .box:nth-child(3) {
    --shift: 0;
    z-index: 1;
  }
  .js .problem__strip,
  .js .problem__line {
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity var(--t4) var(--ease) 0.4s,
      transform var(--t4) var(--ease) 0.4s;
  }
  .js .problem__visual.is-in .problem__strip,
  .js .problem__visual.is-in .problem__line {
    opacity: 1;
    transform: none;
  }

  .js .browser[data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity var(--t4) var(--ease),
      transform var(--t4) var(--ease);
  }
  .js .browser.is-in {
    opacity: 1;
    transform: none;
  }

  .js .closing__door .closing__card,
  .js .closing__door .magnet {
    opacity: 0;
  }
  .js .closing__door.is-in .closing__card {
    animation: drop-16 var(--t4) var(--ease) both;
  }
  .js .closing__door.is-in .magnet--left {
    animation: magnet-snap var(--t3) var(--spring) 0.45s both;
  }
  .js .closing__door.is-in .magnet--right {
    animation: magnet-snap var(--t3) var(--spring) 0.55s both;
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(-24px) rotate(0deg);
  }
  60% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: rotate(2deg);
  }
}
@keyframes card-in-phone {
  from {
    opacity: 0;
    transform: translateY(-24px) rotate(0deg);
  }
  to {
    opacity: 1;
    transform: rotate(1deg);
  }
}
@keyframes magnet-drop {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(1.15);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes magnet-snap {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(1.2);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes drop-16 {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes rise-6 {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes badge-pop {
  0% {
    opacity: 0;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.06);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes name-reveal {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(101%);
  }
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}
@keyframes press {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.92) translateY(1px);
  }
}
@keyframes wash {
  0%,
  100% {
    opacity: 0;
  }
  25%,
  75% {
    opacity: 0.92;
  }
}
@keyframes peak-shrink {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(0.42);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes peak-caption {
  0%,
  80% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* ---------- Reduced motion: everything in its final state ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .plane {
    transform: none;
  }
  .hero-magnet {
    translate: none;
  }
}
