/* Plotwise launch site. Palette shared with the app (docs/site/BRIEF.md). */

:root {
  color-scheme: light dark;

  --bg: #f6f1e7; /* warm paper */
  --surface: #fffcf5; /* card */
  --sunken: #efe7d8; /* alternate band */
  --ink: #2b2620; /* text */
  --ink-muted: #6b6155; /* secondary text */
  --border: #e0d5c2;
  --border-strong: #c9b99f;
  --accent: #3f7d3a; /* leaf green: primary action, links, "Now" */
  --accent-hover: #346a30;
  --accent-ink: #ffffff;
  --accent-soft: #e2eed8;
  --soil: #7a5a3c; /* bed frame */
  --soil-light: #a07c58; /* bed rim */
  --square: #f1e6d2; /* empty square */
  --frost: #5b8fb9; /* the frost line, used only for it */
  --frost-soft: #dbe8f2;
  --plant-ink: #2b2620;
  --focus: #2f6fb0;

  --family-nightshade: #f1b0a0;
  --family-brassica: #b4c6e8;
  --family-leafy: #a8d98e;
  --family-root: #f5c88a;
  --family-legume: #9fd8cc;
  --family-allium: #dcc4ec;
  --family-cucurbit: #f3e08a;
  --family-herb: #cfd8a2;
  --family-grain: #e6cfa0;
  --family-flower: #f5b5d0;

  --serif:
    "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow-deep:
    0 2px 6px rgb(60 45 25 / 0.08), 0 24px 60px rgb(60 45 25 / 0.14);
  --shadow-soft:
    0 1px 2px rgb(60 45 25 / 0.06), 0 8px 24px rgb(60 45 25 / 0.06);
  --section-space: clamp(96px, 14vw, 168px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1714;
    --surface: #24201b;
    --sunken: #1f1b17;
    --ink: #efe8dc;
    --ink-muted: #b3a896;
    --border: #3a332b;
    --border-strong: #51473b;
    --accent: #7cc06f;
    --accent-hover: #93d087;
    --accent-ink: #13210f;
    --accent-soft: #263723;
    --soil: #5a4029;
    --soil-light: #7a5a3c;
    --square: #2e2821;
    --frost: #8fbbe0;
    --frost-soft: #22303b;
    --plant-ink: #f6f0e6;

    --family-nightshade: #85402f;
    --family-brassica: #36507f;
    --family-leafy: #3f6e30;
    --family-root: #8a5a22;
    --family-legume: #1f6a5e;
    --family-allium: #5f4783;
    --family-cucurbit: #7a6a18;
    --family-herb: #5a6a2c;
    --family-grain: #6f5b36;
    --family-flower: #82385c;

    --shadow-deep: 0 2px 6px rgb(0 0 0 / 0.3), 0 24px 60px rgb(0 0 0 / 0.45);
    --shadow-soft: 0 1px 2px rgb(0 0 0 / 0.25), 0 8px 24px rgb(0 0 0 / 0.25);
  }
}

/* Forced themes for the "light and dark" feature art. */
.theme-light {
  --surface: #fffcf5;
  --border-strong: #c9b99f;
  --soil: #7a5a3c;
  --soil-light: #a07c58;
  --square: #f1e6d2;
  --plant-ink: #2b2620;
  --family-nightshade: #f1b0a0;
  --family-brassica: #b4c6e8;
  --family-leafy: #a8d98e;
  --family-root: #f5c88a;
  --family-legume: #9fd8cc;
  --family-allium: #dcc4ec;
  --family-herb: #cfd8a2;
  --family-flower: #f5b5d0;
}

.theme-dark {
  --surface: #24201b;
  --border-strong: #51473b;
  --soil: #5a4029;
  --soil-light: #7a5a3c;
  --square: #2e2821;
  --plant-ink: #f6f0e6;
  --family-nightshade: #85402f;
  --family-brassica: #36507f;
  --family-leafy: #3f6e30;
  --family-root: #8a5a22;
  --family-legume: #1f6a5e;
  --family-allium: #5f4783;
  --family-herb: #5a6a2c;
  --family-flower: #82385c;
}

.f-nightshade {
  --fam: var(--family-nightshade);
}
.f-brassica {
  --fam: var(--family-brassica);
}
.f-leafy {
  --fam: var(--family-leafy);
}
.f-root {
  --fam: var(--family-root);
}
.f-legume {
  --fam: var(--family-legume);
}
.f-allium {
  --fam: var(--family-allium);
}
.f-cucurbit {
  --fam: var(--family-cucurbit);
}
.f-herb {
  --fam: var(--family-herb);
}
.f-grain {
  --fam: var(--family-grain);
}
.f-flower {
  --fam: var(--family-flower);
}

/* ---------- Base ---------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

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

ol,
ul {
  padding: 0;
  list-style: none;
}

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

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

a:focus-visible,
button:focus-visible,
iframe:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.num {
  font-family: var(--sans);
  font-variant-numeric: tabular-nums;
}

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

.wrap {
  width: 100%;
  max-width: calc(1180px + 2 * clamp(20px, 5vw, 48px));
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

.display,
.section-title,
h3 {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 600;
}

.display {
  font-size: clamp(2.6rem, 7vw, 5.25rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.display em,
.section-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  max-width: 22ch;
}

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  margin-bottom: 16px;
}

.lede {
  max-width: 62ch;
  margin-top: 20px;
  color: var(--ink-muted);
}

section {
  padding-block: calc(var(--section-space) / 2);
}

.band {
  background: var(--sunken);
  padding-block: var(--section-space);
  margin-block: calc(var(--section-space) / 2);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    transform 160ms var(--ease);
}

.btn:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}

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

.btn--primary {
  height: 52px;
  padding: 0 28px;
  font-size: 17px;
}

.btn--lg {
  height: 56px;
  padding: 0 32px;
}

.btn--pill {
  min-height: 40px;
  padding: 0 18px;
  font-size: 15px;
}

.arrow {
  display: inline-block;
  transition: transform 200ms var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.text-link:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.text-link:active,
.nav-link:active,
.site-footer a:active {
  opacity: 0.7;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand .logo {
  width: 28px;
  height: 28px;
  flex: none;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink-muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
}

.nav-link:hover {
  color: var(--ink);
}

.nav .btn {
  margin-left: 10px;
}

@media (min-width: 720px) {
  .site-header {
    position: sticky;
    top: 0;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .site-header.is-scrolled {
    border-bottom-color: var(--border);
  }
}

@media (max-width: 719px) {
  .nav-link {
    display: none;
  }
}

/* ---------- Bed (shared) ---------- */

.bed {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 14px;
  background: var(--soil);
  border-radius: 18px;
  box-shadow: inset 0 0 0 3px var(--soil-light);
}

.tile {
  position: relative;
  aspect-ratio: 1;
  min-width: 0;
  border-radius: 8px;
  background: var(--fam, var(--square));
  container-type: inline-size;
  transition: background-color 260ms ease;
}

.tile-name {
  position: absolute;
  top: 6%;
  left: 8%;
  right: 6%;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--plant-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 260ms ease;
}

.dots {
  position: absolute;
  inset: 24% 12% 10%;
  display: grid;
  place-items: center;
  grid-template-columns: repeat(var(--n), 1fr);
}

.tile[data-n="1"] {
  --n: 1;
  --dot: 18cqi;
}
.tile[data-n="4"] {
  --n: 2;
  --dot: 11cqi;
}
.tile[data-n="9"] {
  --n: 3;
  --dot: 8cqi;
}
.tile[data-n="16"] {
  --n: 4;
  --dot: 6cqi;
}

.dots i {
  width: var(--dot);
  height: var(--dot);
  border-radius: 50%;
  background: color-mix(in srgb, var(--plant-ink) 55%, transparent);
  transition:
    transform 220ms var(--ease),
    opacity 220ms ease;
}

.tile.is-pending {
  background: var(--square);
}

.tile.is-pending .tile-name {
  opacity: 0;
}

.tile.is-pending .dots i {
  opacity: 0;
  transform: scale(0.4);
}

.bed-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.bed-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 20px;
}

.bed-size {
  font-size: 13px;
  color: var(--ink-muted);
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(24px, 4vw, 48px);
}

.hero-inner {
  display: grid;
  gap: 28px;
  grid-template-areas: "copy" "bed" "actions";
}

.hero-copy {
  grid-area: copy;
}

.hero-sub {
  margin-top: 24px;
  max-width: 62ch;
  font-size: 19px;
  color: var(--ink-muted);
}

.hero-actions {
  grid-area: actions;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}

.reassure {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ink-muted);
}

.hero-bed {
  grid-area: bed;
  justify-self: center;
  width: 100%;
  max-width: 520px;
}

.bed-card {
  --rx: 10deg;
  --ry: 0deg;
  position: relative;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-deep);
}

.bed-totals {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-muted);
  min-height: 3em;
}

.chip-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
  pointer-events: none;
  transition: transform 160ms var(--ease);
}

.chip-cursor[hidden] {
  display: none;
}

@media (min-width: 720px) {
  .hero-inner {
    grid-template-columns: 5fr 6fr;
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas: ". bed" "copy bed" "actions bed" ". bed";
    column-gap: clamp(32px, 5vw, 72px);
    row-gap: 36px;
    min-height: min(88vh, 820px);
  }

  .hero-bed {
    max-width: 480px;
  }

  .hero-bed {
    align-self: center;
  }

  .bed-card {
    transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry))
      rotateZ(-2deg);
  }
}

@media (max-width: 719px) {
  body {
    font-size: 16px;
  }

  .hero-sub {
    font-size: 17px;
  }

  .hero-bed {
    max-width: 360px;
  }

  .bed-card {
    padding: 14px;
  }

  .hero .bed {
    padding: 10px;
    gap: 3px;
  }

  .tile-name {
    font-size: 10px;
  }

  .btn-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .btn-row .btn,
  .btn-row .text-link {
    width: 100%;
    justify-content: center;
  }
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  gap: 20px;
  margin-top: 48px;
}

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.step-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 56px;
  line-height: 1;
  color: var(--accent);
}

.step-art {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  margin: 18px 0 22px;
}

.step h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.step p {
  color: var(--ink-muted);
}

.art-grow {
  display: grid;
  grid-template-columns: repeat(4, 28px);
  grid-auto-rows: 28px;
  gap: 3px;
  padding: 8px;
  height: auto;
  align-self: center;
  margin-block: 24px 28px;
  background: var(--soil);
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px var(--soil-light);
}

.art-grow .cell {
  width: 28px;
  height: 28px;
  background: var(--square);
  border-radius: 5px;
  transition:
    opacity 300ms ease,
    transform 300ms var(--ease);
}

.art-dots {
  gap: 6px;
}

.art-dots .tile {
  width: 25%;
  max-width: 72px;
}

.art-dots .tile-name {
  font-size: 10px;
}

.art-frost {
  flex-direction: column;
  align-items: stretch;
  gap: 26px;
}

.chip-frost {
  display: inline-block;
  align-self: flex-start;
  padding: 8px 14px;
  background: var(--frost-soft);
  border-left: 3px solid var(--frost);
  border-radius: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.mini-line {
  position: relative;
  display: block;
  height: 2px;
  margin: 0 18px 22px;
  background: var(--frost);
}

.mini-line i {
  position: absolute;
  left: calc(var(--x) * 100%);
  top: -5px;
  height: 12px;
  border-left: 2px solid var(--frost);
  font-style: normal;
}

.mini-line b {
  position: absolute;
  top: 16px;
  left: -1px;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* ---------- The frost line ---------- */

@property --p {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

.frost-scroll {
  --p: 1;
  margin-top: 56px;
}

.tl {
  display: none;
}

.tasks .chip-frost {
  margin-bottom: 8px;
}

.task-month h3 {
  font-size: 22px;
  margin: 28px 0 12px;
}

.task-cards {
  display: grid;
  gap: 10px;
}

.task {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 6px solid var(--fam);
  border-radius: 14px;
}

.task-top {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
}

.task-swatch {
  display: none;
}

.task-plant {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
}

.task-meta {
  font-size: 14px;
  color: var(--ink-muted);
}

.task.is-past {
  opacity: 0.72;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--now {
  background: var(--accent);
  color: var(--accent-ink);
}

.badge--past {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink-muted);
}

.task .badge {
  margin-left: auto;
}

@media (min-width: 900px) {
  .tasks {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .tl {
    display: block;
    padding-top: 8px;
  }

  .tl-months {
    position: relative;
    height: 30px;
  }

  .tl-months span {
    position: absolute;
    left: calc(var(--s) / 84 * 100%);
    font-family: var(--serif);
    font-size: 18px;
  }

  .tl-track {
    position: relative;
    padding: 64px 0 56px;
    border-top: 1px solid var(--border-strong);
  }

  .tl-tick {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--s) / 84 * 100%);
    border-left: 1px solid var(--border);
  }

  .tl-frost {
    --t: clamp(0, var(--p) / 0.08, 1);
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--s) / 84 * 100%);
    border-left: 2px dashed var(--frost);
    transform-origin: top;
    transform: scaleY(var(--t));
    z-index: 1;
  }

  .tl-frost .chip-frost {
    position: absolute;
    top: 12px;
    left: 0;
    transform: translateX(-50%) scaleY(calc(1 / max(var(--t), 0.01)));
    transform-origin: top;
    opacity: var(--t);
    font-size: 13px;
    padding: 5px 12px;
    border-left-width: 3px;
  }

  .tl-today {
    --t: clamp(0, (var(--p) - 0.84) / 0.1, 1);
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    opacity: var(--t);
    transform: translateX(calc((var(--t) - 1) * 23 / 84 * 100%));
  }

  .tl-today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(23 / 84 * 100%);
    border-left: 2px solid var(--accent);
  }

  .pill-today {
    position: absolute;
    bottom: -14px;
    left: -1px;
    transform: translateX(-50%);
    padding: 3px 12px;
    background: var(--accent);
    color: var(--accent-ink);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
  }

  .tl-rows {
    display: grid;
    gap: 10px;
  }

  .tl-row {
    --t: clamp(0, (var(--p) - 0.08 - var(--i) * 0.08) * 10, 1);
    position: relative;
    height: 34px;
  }

  .tl-row.is-short {
    height: 52px;
  }

  .tl-bar {
    position: absolute;
    top: 0;
    height: 34px;
    left: calc(var(--s) / 84 * 100%);
    width: calc((var(--e) - var(--s)) / 84 * 100%);
    background: var(--fam);
    border-radius: 999px;
    transform-origin: left;
    transform: scaleX(var(--t));
  }

  .tl-row.is-past .tl-bar {
    opacity: 0.45;
  }

  .tl-text {
    position: absolute;
    top: 0;
    left: calc(var(--s) / 84 * 100%);
    display: flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding-left: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--plant-ink);
    white-space: nowrap;
    opacity: var(--t);
  }

  .tl-row.is-past .tl-text {
    opacity: calc(var(--t) * 0.75);
  }

  .tl-text strong {
    font-weight: 600;
  }

  .tl-date {
    margin-left: 10px;
    font-size: 12px;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
    color: var(--ink-muted);
  }

  .tl-row.is-short .tl-date {
    position: absolute;
    top: 34px;
    left: 14px;
    margin: 0;
    line-height: 18px;
  }

  .tl-text .badge {
    opacity: clamp(0, (var(--p) - 0.94) / 0.06, 1);
  }

  .tl-row.is-past .badge {
    border: 0;
    background: color-mix(in srgb, var(--plant-ink) 12%, transparent);
    color: var(--plant-ink);
  }
}

/* ---------- Features ---------- */

.bento {
  display: grid;
  gap: 20px;
  margin-top: 48px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 0 0 rgb(0 0 0 / 0);
  overflow: hidden;
}

.card h3 {
  font-size: 22px;
  line-height: 1.2;
}

.card p {
  color: var(--ink-muted);
}

@media (min-width: 900px) {
  /* Two wide cards and three narrow ones: the phone card spans the rows beside "counts" and "saves". */
  .bento {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
      "c1 c1 c2"
      "c5 c5 c3"
      "c5 c5 c4";
  }

  .bento > :nth-child(1) {
    grid-area: c1;
  }
  .bento > :nth-child(2) {
    grid-area: c2;
  }
  .bento > :nth-child(3) {
    grid-area: c3;
  }
  .bento > :nth-child(4) {
    grid-area: c4;
  }
  .bento > :nth-child(5) {
    grid-area: c5;
  }

  .card--wide {
    flex-direction: row;
    align-items: center;
    gap: 32px;
  }

  .card--wide .card-copy {
    flex: 1 1 0;
  }
}

.card-copy {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.art-lib {
  position: relative;
  flex: 1 1 0;
  height: 210px;
  overflow: hidden;
  mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent);
  -webkit-mask-image: linear-gradient(
    transparent,
    #000 22%,
    #000 78%,
    transparent
  );
}

.lib-row {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 14px;
  margin-bottom: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
}

.lib-row .num {
  margin-left: auto;
  color: var(--ink-muted);
}

.swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 5px;
  background: var(--fam);
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
}

.lib-set + .lib-set {
  display: none;
}

.art-families {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px 8px;
  margin-top: auto;
  padding-top: 10px;
}

.art-families li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-muted);
}

.art-families .swatch {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.art-count {
  margin-top: auto;
  padding-top: 16px;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 28px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--ink) !important;
}

.art-saved {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  font-size: 12px;
  font-weight: 600;
}

.art-saved svg {
  width: 40px;
  height: 40px;
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.art-saved path {
  fill: none;
}

.art-themes {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex: 1 1 0;
}

.phone-outline {
  width: 172px;
  padding: 40px 12px;
  border: 1.5px solid var(--border-strong);
  border-radius: 22px;
  background: var(--surface);
}

.dark-panel {
  width: 150px;
  padding: 12px;
  border-radius: 18px;
  background: var(--surface);
}

.bed--mini {
  gap: 2px;
  padding: 6px;
  border-radius: 9px;
  box-shadow: inset 0 0 0 2px var(--soil-light);
}

.bed--mini .tile {
  border-radius: 3px;
}

/* ---------- See the real thing ---------- */

.see-head {
  margin-bottom: 48px;
}

.see-stage {
  display: flex;
  justify-content: center;
}

.phone-mock {
  width: 100%;
  max-width: 340px;
  padding: 14px;
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
  border-radius: 36px;
  box-shadow: var(--shadow-deep);
}

.mock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 12px;
}

.mock-brand .logo {
  width: 24px;
  height: 24px;
  display: block;
}

.mock-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--sunken);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.mock-tabs span {
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--ink-muted);
}

.mock-tabs .is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.mock-lib {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.mock-lib .lib-row {
  height: 36px;
  margin: 0;
  padding: 0 10px;
  gap: 8px;
  font-size: 13px;
  background: var(--surface);
}

.mock-card {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
}

.mock-card .bed-name {
  font-size: 17px;
}

.bed--small {
  padding: 8px;
  gap: 3px;
  border-radius: 12px;
}

.bed--small .tile {
  border-radius: 5px;
}

.bed--small .tile-name {
  font-size: 9px;
}

.browser {
  width: 100%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  box-shadow: var(--shadow-deep);
}

.browser-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
}

.browser-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.browser-bar span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 18px;
  background: var(--bg);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-muted);
}

.browser iframe {
  display: block;
  width: 100%;
  height: 720px;
  border: 0;
  background: var(--bg);
}

.see-cta {
  margin-top: 40px;
  text-align: center;
}

.see-narrow {
  display: none;
}

@media (max-width: 719px) {
  .see-wide {
    display: none;
  }

  .see-narrow {
    display: flex;
    width: 100%;
    max-width: 340px;
    margin-inline: auto;
  }
}

/* ---------- Closing ---------- */

.closing-inner {
  position: relative;
  display: grid;
  place-items: center;
  padding-block: 24px;
}

.closing-bed {
  position: absolute;
  inset: 0 clamp(20px, 5vw, 48px);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-content: center;
  gap: 4px;
  padding: 12px;
  background: var(--soil);
  border-radius: 20px;
  box-shadow: inset 0 0 0 3px var(--soil-light);
  opacity: 0.38;
}

.closing-bed .tile {
  opacity: 1;
  container-type: normal;
}

.closing-bed .tile.is-pending {
  background: var(--square);
}

.closing-panel {
  position: relative;
  max-width: 640px;
  margin: 56px 20px;
  padding: 40px;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.closing-title {
  font-size: calc(clamp(2.6rem, 7vw, 5.25rem) * 0.8);
}

.closing-panel p {
  margin: 18px auto 28px;
  max-width: 40ch;
  color: var(--ink-muted);
}

@media (max-width: 719px) {
  .closing-bed {
    grid-template-columns: repeat(6, 1fr);
    padding: 8px;
    gap: 3px;
  }

  .closing-bed .is-wide {
    display: none;
  }

  .closing-panel {
    margin: 32px 12px;
    padding: 28px 20px;
  }

  .closing-panel .btn {
    width: 100%;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 80px;
  padding-block: 28px 40px;
  font-size: 14px;
  color: var(--ink-muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.brand--small .logo {
  width: 22px;
  height: 22px;
}

.brand--small .wordmark {
  font-size: 18px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-left: 6px;
  font-weight: 600;
  text-underline-offset: 4px;
}

@media (max-width: 719px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer a {
    margin-left: 0;
  }
}

/* ---------- Motion (only when the visitor allows it) ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0ms !important;
    animation: none !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    transition:
      opacity 600ms ease,
      transform 600ms var(--ease);
    transition-delay: calc(var(--i, 0) * 120ms);
  }

  .js .reveal.is-pending {
    opacity: 0;
    transform: translateY(24px);
  }

  .js .card.reveal {
    transition-delay: calc(var(--i, 0) * 100ms);
  }

  .js .task.reveal {
    transition-delay: calc(var(--i, 0) * 80ms);
  }

  .js .art-grow.is-pending .cell.is-outer {
    opacity: 0;
    transform: scale(0.5);
  }

  .art-grow .cell {
    transition-delay: calc(max(var(--r), var(--c)) * 120ms);
  }

  .js .art-dots.is-pending .dots i {
    opacity: 0;
    transform: scale(0.4);
  }

  .art-dots .tile:nth-child(2) i {
    transition-delay: 120ms;
  }
  .art-dots .tile:nth-child(3) i {
    transition-delay: 240ms;
  }
  .art-dots .tile:nth-child(4) i {
    transition-delay: 360ms;
  }

  .closing-bed .tile {
    transition-delay: calc(var(--c) * 60ms);
  }

  @media (min-width: 900px) and (hover: hover) {
    .card {
      transition:
        opacity 600ms ease,
        transform 600ms var(--ease),
        box-shadow 200ms ease;
    }

    .card:hover {
      transform: translateY(-3px);
      box-shadow: var(--shadow-deep);
      transition-delay: 0ms;
    }

    .lib-set + .lib-set {
      display: block;
    }

    .lib-strip {
      animation: drift 40s linear infinite;
    }

    .art-lib:hover .lib-strip {
      animation-play-state: paused;
    }
  }

  @media (min-width: 900px) {
    .js .frost-scroll.is-scrolly {
      height: 180vh;
      view-timeline: --frost block;
    }

    .js .frost-scroll.is-scrolly .tl {
      position: sticky;
      top: 12vh;
    }

    @supports (animation-timeline: view()) {
      .js .frost-scroll.is-scrolly {
        animation: frost-draw linear both;
        animation-timeline: --frost;
        animation-range: entry 40% contain 100%;
      }
    }
  }
}

@keyframes frost-draw {
  from {
    --p: 0;
  }
  to {
    --p: 1;
  }
}

@keyframes drift {
  to {
    transform: translateY(-50%);
  }
}
