/* unclusterme.com: calm, spacious, quiet. Same type (Figtree) and 6px corners as the app;
   raspberry only for the main action. */

:root {
  /* The Bleep palette (October 10, 2026): warm cream and peach, night navy, raspberry. */
  --paper: #fefbf8; /* cream, slightly brighter */
  --surface: #ffffff;
  --ink: #1d1821; /* night */
  --muted: #5f5766;
  --faint: #948c99;
  --line: #efe3d6;
  --mist: #f6ece2;
  --accent: #ad105d; /* raspberry */
  --accent-hover: #930d4f;
  --accent-soft: #fbe3d6; /* peach, light */
  --peach: #f8dccb;
  --fog: #e3e7ef;
  --sidebar: #1d1821; /* night */
  --radius: 6px;
  --wrap: 1080px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    'Figtree',
    system-ui,
    -apple-system,
    'Segoe UI',
    sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

/* Even line lengths: short blocks (headings, intros) split into balanced lines, and longer
   text avoids a lone word on its last line. */
h1,
h2,
h3,
.lede,
.section-intro,
.note {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

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

/* --- Header and footer ---------------------------------------------------------------- */

.site-header {
  padding: 28px 0;
}

.site-header .wrap,
.site-footer .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0;
  font-weight: 600;
  font-size: 24px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

/* Wordmark: "un" and the bleep in raspberry. */
.brand .un {
  color: var(--accent);
}

.brand svg {
  width: 15px;
  height: 15px;
  margin: -14px 0 0 2px;
}

.nav {
  margin-left: auto;
  display: flex;
  gap: 28px;
  font-size: 15px;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

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

.site-footer {
  margin-top: 120px;
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 14px;
}

.site-footer nav {
  margin-left: auto;
  display: flex;
  gap: 24px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
}

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

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.button:hover {
  background: var(--accent-hover);
}

.button.quiet {
  background: transparent;
  color: var(--ink);
  border: 2.5px solid var(--accent);
}

.button.quiet:hover {
  background: var(--accent-soft);
  border-color: var(--accent-hover);
}

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

.hero {
  padding-top: 72px;
  padding-bottom: 40px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 20px;
  color: var(--faint);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 auto;
  max-width: 14ch;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.lede {
  max-width: 34em;
  margin: 26px auto 0;
  color: var(--muted);
  font-size: 19px;
}

/* A follow-up line right under the lede ("Oh, and…"), closer to it than a new section. */
.lede.aside {
  margin-top: 14px;
}

.actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.note {
  margin-top: 16px;
  color: var(--faint);
  font-size: 14px;
}

/* Beta hero: centered copy, wider than the default lede so lines don’t break so early. */
.hero-stack {
  max-width: 46em;
  margin: 26px auto 0;
  text-align: center;
}

.hero-stack .lede {
  max-width: none;
  margin-top: 0;
  text-wrap: pretty;
}

.hero-stack .lede.aside {
  margin-top: 14px;
}

.hero-stack .actions {
  justify-content: center;
  margin-top: 32px;
}

.hero-stack .note {
  margin-top: 14px;
}

/* "cluster" in the headline: a little out of order, the way things are before Uncluster. */
.messy {
  display: inline-block;
  color: var(--accent);
  white-space: nowrap;
}

.messy span {
  display: inline-block;
}

.messy span:nth-child(1) {
  transform: translateY(-0.04em) rotate(-8deg);
}
.messy span:nth-child(2) {
  transform: translateY(0.05em) rotate(6deg);
}
.messy span:nth-child(3) {
  transform: translateY(-0.07em) rotate(-4deg);
}
.messy span:nth-child(4) {
  transform: translateY(0.06em) rotate(9deg);
}
.messy span:nth-child(5) {
  transform: translateY(-0.03em) rotate(-10deg);
}
.messy span:nth-child(6) {
  transform: translateY(0.07em) rotate(5deg);
}
.messy span:nth-child(7) {
  transform: translateY(-0.05em) rotate(-6deg);
}
.messy span:nth-child(8) {
  transform: translateY(0.04em) rotate(8deg);
}
.messy span:nth-child(9) {
  transform: translateY(-0.02em) rotate(-3deg);
}
.messy span:nth-child(10) {
  transform: translateY(0.06em) rotate(7deg);
}
.messy span:nth-child(11) {
  transform: translateY(-0.06em) rotate(-9deg);
}

h1 {
  max-width: none;
}

h1 .line {
  display: block;
}

/* --- The quiet sketch of the app ------------------------------------------------------- */

/* A browser window around the sketch, so it reads as a picture of the app, not part of the page. */
.window {
  max-width: 900px;
  margin: 72px auto 0;
  border: 1px solid #ead9c8;
  border-radius: 10px;
  overflow: hidden;
  background: #f4e9dd;
  box-shadow:
    0 2px 4px rgba(31, 36, 48, 0.05),
    0 30px 70px -20px rgba(31, 36, 48, 0.28);
  text-align: left;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid #ead9c8;
}

.dots {
  display: flex;
  gap: 7px;
}

.dots i {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #e3cdbb;
}

.address {
  flex: 0 1 320px;
  margin: 0 auto;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

.tidy-bar {
  align-items: flex-end;
  height: auto;
  min-height: 38px;
  padding-top: 8px;
  gap: 10px;
}

.tidy-bar .dots {
  align-self: center;
  margin-bottom: 8px;
}

.tidy-tabs {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: flex-end;
  gap: 2px;
  overflow: hidden;
}

.tidy-pin {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  padding: 6px 0;
  border: 1px solid #d0bfad;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: #f3e8dc;
}

.tidy-pin svg {
  width: 12px;
  height: 12px;
}

.tidy-pin.on {
  background: #fbf5ee;
  color: var(--ink);
  border-color: #d0bfad;
}

.tidy-pages {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: flex-end;
  gap: 2px;
  overflow: hidden;
}

.tidy-pages span {
  flex: 1 1 0;
  min-width: 0;
  max-width: 140px;
  padding: 6px 10px;
  border: 1px solid #d0bfad;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: #f3e8dc;
  color: #5a5160;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-tidy-tabs].is-swapping,
.sketch-grid.is-swapping,
[data-tidy-main].is-swapping .sketch-title,
[data-tidy-main].is-swapping .sketch-sub {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

[data-tidy-tabs],
.sketch-grid,
[data-tidy-main] .sketch-title,
[data-tidy-main] .sketch-sub {
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

.sketch {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: 340px;
}

.sketch-sidebar {
  background: var(--sidebar);
  color: #d2cad5;
  padding: 22px 0;
  font-size: 13px;
}

.sketch-group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px 4px;
  color: #8a8290;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Same raspberry letter tile as the real sidebar (collapse control at rest). */
.sketch-letter {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  flex-shrink: 0;
  text-transform: uppercase;
}

.sketch-logo {
  display: flex;
  align-items: center;
  padding: 2px 18px 16px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #f5f1f6;
}

.sketch-logo .un {
  color: var(--accent);
}

.sketch-logo .bleep {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 3px;
  margin-top: 1px;
  vertical-align: middle;
}

.sketch-logo .bleep svg {
  display: block;
  width: 100%;
  height: 100%;
}

.sketch-row {
  position: relative;
  margin: 0 8px 0 12px;
  /* Line up under the collection name, past the letter tile. */
  padding: 7px 10px 7px 24px;
  border-radius: var(--radius);
  color: #d7d0d9;
}

.sketch-row.on {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sketch-row.on::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--accent);
}

.sketch-row.is-pressing {
  background: rgba(173, 16, 93, 0.28);
  color: #fff;
  transform: scale(0.98);
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.sketch-main {
  padding: 28px 30px;
  background: var(--paper);
}

.sketch-title {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sketch-sub {
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sketch-body {
  display: grid;
  grid-template-columns: 1fr 168px;
  gap: 18px;
  margin-top: 22px;
  align-items: start;
}

.sketch-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.sketch-grid.alone {
  margin-top: 20px;
}

/* The bookmarks column in the sketch, as in the app. */
.sketch-bookmarks {
  padding: 12px 12px 6px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid #e7e3ea;
  font-size: 12px;
  color: #443b4b;
}

.bm-head {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.bm-section {
  margin: 10px 0 4px;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bm {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bm i,
.bm-card li i {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--c);
}

/* Bookmarks feature: text beside a small card of one cluster's bookmarks. */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.bm-card {
  padding: 26px 28px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow:
    0 2px 4px rgba(31, 36, 48, 0.04),
    0 26px 60px -28px rgba(31, 36, 48, 0.25);
}

.bm-card-head {
  display: flex;
  flex-direction: column;
  margin-bottom: 6px;
}

.bm-card-sub {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bm-card-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.bm-group + .bm-group {
  margin-top: 6px;
}

.bm-card .bm-section {
  font-size: 11px;
  margin-top: 16px;
}

.bm-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-card li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--mist);
  font-size: 15px;
}

.bm-card li:last-child {
  border-bottom: 0;
}

.bm-card li i {
  width: 16px;
  height: 16px;
  margin-top: 4px;
  border-radius: 4px;
}

.bm-card li small {
  display: block;
  color: var(--faint);
  font-size: 13px;
}

.sketch-card {
  padding: 8px 8px 10px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid #e7e3ea;
  box-shadow: 0 1px 2px rgba(31, 36, 48, 0.05);
}

.sketch-card .thumb {
  height: 70px;
  border-radius: 4px;
  background: linear-gradient(160deg, #f3f4f7 0%, #e6e8ee 100%);
}

/* Faint colors, so the cards look like real pages. */
.sketch-card:nth-child(1) .thumb {
  background: linear-gradient(160deg, #f6e9ef 0%, #ecd3df 100%);
}
.sketch-card:nth-child(2) .thumb {
  background: linear-gradient(160deg, #e9eef6 0%, #d6e0ee 100%);
}
.sketch-card:nth-child(4) .thumb {
  background: linear-gradient(160deg, #eaf2ee 0%, #d6e6dd 100%);
}
.sketch-card:nth-child(6) .thumb {
  background: linear-gradient(160deg, #f5efe6 0%, #ebdfcc 100%);
}

.sketch-card .name {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sketch-card .url {
  margin-top: 2px;
  font-size: 11px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Hero demo: many windows → one Uncluster ---------------------------------------- */

.demo {
  max-width: 920px;
  margin: 72px auto 0;
}

.demo-hint {
  margin: 18px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.demo-hint strong {
  font-weight: 600;
  color: var(--ink);
}

.demo-stage {
  /* One shared frame so the merged windows and Uncluster land on the same size. */
  --demo-frame-height: 480px;
  --demo-bar-height: 38px;
  position: relative;
  min-height: var(--demo-frame-height);
}

/* Centered play control — same size/place as before, no dimming scrim. */
.demo-play {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.demo-play-btn {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 10px 28px -8px rgba(173, 16, 93, 0.55);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.demo-play-btn svg {
  display: block;
  width: 26px;
  height: 26px;
  margin-left: 3px;
  fill: #fff;
}

.demo-play:hover .demo-play-btn {
  background: var(--accent-hover);
  transform: scale(1.04);
}

.demo.is-tidy .demo-play,
.demo.is-animating .demo-play {
  display: none;
}

.demo-messy,
.demo-tidy {
  min-height: var(--demo-frame-height);
}

.demo-tidy {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Settled tidy: tidy in document flow. During the morph both layers stay absolute (see below). */
.demo.is-tidy:not(.is-animating) .demo-tidy {
  position: relative;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.demo.is-tidy:not(.is-animating) .demo-messy {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.demo-tidy .window {
  margin: 0;
  max-width: none;
  height: var(--demo-frame-height);
  display: flex;
  flex-direction: column;
  /* Match the before windows: darker chrome, lighter tabs. */
  background: #ebe0d4;
  border-color: #cfc0b0;
}

.demo-tidy .tidy-bar {
  background: #e5d8ca;
  border-bottom-color: #d7c6b4;
}

.demo-tidy .sketch {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.demo-messy {
  position: relative;
}

.chaos-win {
  position: absolute;
  width: 78%;
  border: 1px solid #cfc0b0;
  border-radius: 10px;
  overflow: hidden;
  background: #ebe0d4;
  transform-origin: 50% 40%;
  will-change: transform, opacity;
  box-shadow:
    0 2px 4px rgba(31, 36, 48, 0.06),
    0 22px 48px -18px rgba(31, 36, 48, 0.4);
}

.chaos-win.w1 {
  top: 0;
  left: 2%;
  width: 74%;
  z-index: 1;
  transform: rotate(-3.8deg);
}

.chaos-win.w2 {
  top: 78px;
  left: 18%;
  width: 76%;
  z-index: 2;
  transform: rotate(2.8deg);
}

.chaos-win.w3 {
  top: 168px;
  left: 6%;
  width: 80%;
  z-index: 3;
  transform: rotate(-1.6deg);
}

.chaos-win.w4 {
  top: 258px;
  left: 12%;
  width: 84%;
  z-index: 4;
  transform: rotate(1.1deg);
}

.chaos-bar {
  display: flex;
  align-items: stretch;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px;
  background: #e5d8ca;
  border-bottom: 1px solid #d7c6b4;
}

.chaos-bar .dots {
  align-self: center;
}

.chaos-tabs {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: flex-end;
  gap: 2px;
  padding-top: 8px;
  overflow: hidden;
}

.chaos-tabs span {
  flex: 0 1 auto;
  max-width: 112px;
  padding: 6px 10px;
  border: 1px solid #d0bfad;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: #f3e8dc;
  color: #5a5160;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform-origin: left center;
}

.chaos-tabs span.on {
  background: #fbf5ee;
  color: var(--ink);
  z-index: 1;
}

.chaos-body {
  height: 168px;
  background:
    linear-gradient(180deg, #fbf5ee 0%, #f0e4d6 100%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 18px,
      rgba(29, 24, 33, 0.04) 18px,
      rgba(29, 24, 33, 0.04) 19px
    );
}

.chaos-body.muted {
  background:
    linear-gradient(160deg, #ece4da, #e0d4c6),
    radial-gradient(circle at 70% 40%, rgba(122, 167, 217, 0.2), transparent 45%);
}

.chaos-body.warm {
  background:
    linear-gradient(160deg, #f7ebe3, #edd9cb),
    radial-gradient(circle at 30% 60%, rgba(231, 167, 195, 0.25), transparent 40%);
}

.chaos-body.cool {
  background:
    linear-gradient(160deg, #efe8e1, #e4d7c8),
    radial-gradient(circle at 60% 30%, rgba(140, 192, 162, 0.22), transparent 42%);
}

@media (prefers-reduced-motion: no-preference) {
  /*
    1) Four windows merge into one empty window (tabs across the top).
    2) Only after that lands does the after view appear — on top.
    3) Uncluster pin pops in, then the cluster page dissolves in.
  */
  .demo.is-animating.is-tidy .demo-messy,
  .demo.is-animating.is-tidy .demo-tidy {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  /* Merged empty window stays put underneath; never fights the after view. */
  .demo.is-animating.is-tidy .demo-messy {
    z-index: 1;
    opacity: 1;
    visibility: visible;
  }

  /* Hidden for the whole merge, then comes in on top. */
  .demo.is-animating.is-tidy .demo-tidy {
    z-index: 2;
    animation: after-on-top 1.55s ease both;
  }

  .demo.is-animating.is-tidy .chaos-win.w1 {
    animation: gather-w1 0.8s cubic-bezier(0.33, 1, 0.68, 1) forwards;
  }

  .demo.is-animating.is-tidy .chaos-win.w2 {
    animation: gather-w2 0.8s 0.04s cubic-bezier(0.33, 1, 0.68, 1) forwards;
  }

  .demo.is-animating.is-tidy .chaos-win.w3 {
    animation: gather-w3 0.8s 0.08s cubic-bezier(0.33, 1, 0.68, 1) forwards;
  }

  .demo.is-animating.is-tidy .chaos-win.w4 {
    animation: gather-w4 0.8s 0.12s cubic-bezier(0.33, 1, 0.68, 1) forwards;
  }

  .demo.is-animating.is-tidy .chaos-body {
    animation: body-grow 0.8s 0.12s cubic-bezier(0.33, 1, 0.68, 1) forwards;
  }

  .demo.is-animating.is-tidy .chaos-bar {
    min-height: var(--demo-bar-height);
  }

  /* Pin and page only start after the after view itself is on top. */
  .demo.is-animating.is-tidy .tidy-pin {
    opacity: 0;
    animation: pin-in 0.35s 1s ease both;
  }

  .demo.is-animating.is-tidy .tidy-pages,
  .demo.is-animating.is-tidy .sketch-sidebar,
  .demo.is-animating.is-tidy .sketch-main {
    opacity: 0;
    animation: page-dissolve-in 0.5s 1.15s ease both;
  }

  @keyframes gather-w1 {
    0% {
      transform: rotate(-3.8deg);
    }
    100% {
      top: 0;
      left: 0;
      width: 100%;
      height: var(--demo-frame-height);
      transform: rotate(0deg);
    }
  }

  @keyframes gather-w2 {
    0% {
      transform: rotate(2.8deg);
    }
    100% {
      top: 0;
      left: 0;
      width: 100%;
      height: var(--demo-frame-height);
      transform: rotate(0deg);
    }
  }

  @keyframes gather-w3 {
    0% {
      transform: rotate(-1.6deg);
    }
    100% {
      top: 0;
      left: 0;
      width: 100%;
      height: var(--demo-frame-height);
      transform: rotate(0deg);
    }
  }

  @keyframes gather-w4 {
    0% {
      transform: rotate(1.1deg);
    }
    100% {
      top: 0;
      left: 0;
      width: 100%;
      height: var(--demo-frame-height);
      transform: rotate(0deg);
    }
  }

  @keyframes body-grow {
    to {
      height: calc(var(--demo-frame-height) - var(--demo-bar-height));
    }
  }

  /* ~0–60%: merge only. After view arrives on top once the empty window is ready. */
  @keyframes after-on-top {
    0%,
    60% {
      opacity: 0;
      visibility: hidden;
    }
    68%,
    100% {
      opacity: 1;
      visibility: visible;
    }
  }

  @keyframes pin-in {
    from {
      opacity: 0;
      transform: scale(0.7);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes page-dissolve-in {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-demo-toggle] {
    display: none;
  }
}

/* --- Sections -------------------------------------------------------------------------- */

section.block {
  padding-top: 112px;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.section-intro {
  max-width: 54em;
  margin: 16px 0 0;
  color: var(--muted);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 56px;
}

.step .number {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 14px;
}

.step h3 {
  margin: 18px 0 8px;
  font-size: 19px;
  font-weight: 600;
}

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

/* "The little things": a calm grid of small features. */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.tile {
  padding: 26px 26px 24px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.tile .icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.tile .icon svg {
  width: 20px;
  height: 20px;
}

.tile h3 {
  margin: 18px 0 6px;
  font-size: 18px;
  font-weight: 600;
}

.tile p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* Privacy: the app sidebar's deep ink, a faint raspberry glow, and an icon for each promise. */
.private-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 64px;
  border-radius: 12px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(173, 16, 93, 0.28) 0%, rgba(173, 16, 93, 0) 55%), var(--sidebar);
  color: #efe9ec;
}

.private-panel h2 {
  margin-top: 22px;
  color: #ffffff;
}

.private-panel .section-intro {
  color: #c4bcc8;
}

.badge {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(173, 16, 93, 0.18);
  border: 1px solid rgba(240, 120, 175, 0.35);
  color: #f3a6c8;
}

.badge svg {
  width: 24px;
  height: 24px;
}

.promises {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.promises li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c4bcc8;
  font-size: 15px;
}

.promises strong {
  display: block;
  margin-bottom: 2px;
  color: #ffffff;
  font-weight: 600;
  font-size: 16px;
}

.promises .icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(173, 16, 93, 0.22);
  color: #f3a6c8;
}

.promises .icon svg {
  width: 18px;
  height: 18px;
}

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 780px;
  margin: 48px auto 0;
}

.plan {
  padding: 36px;
  text-align: left;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.plan.featured {
  border-color: #f0c9b4;
  box-shadow: 0 20px 50px -30px rgba(173, 16, 93, 0.35);
}

.plan h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.price {
  margin: 14px 0 4px;
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.price small {
  font-size: 16px;
  color: var(--faint);
  font-weight: 400;
}

.plan ul {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.plan li {
  padding: 6px 0 6px 26px;
  position: relative;
}

.plan li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 15px;
  width: 10px;
  height: 6px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

.centered {
  text-align: center;
}

.centered .section-intro {
  margin-left: auto;
  margin-right: auto;
}

.closing {
  padding-top: 120px;
  text-align: center;
}

/* --- Reading pages (privacy, terms, support) ------------------------------------------- */

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 0;
}

.page h1 {
  max-width: none;
  margin: 0 0 8px;
  font-size: clamp(34px, 5vw, 46px);
  text-align: left;
}

.page h2 {
  margin: 48px 0 12px;
  font-size: 24px;
}

.page h3 {
  margin: 28px 0 8px;
  font-size: 18px;
}

.page p,
.page li {
  color: #443b4b;
}

.page a {
  color: var(--accent);
  text-underline-offset: 3px;
}

.page table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px;
}

.page th,
.page td {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--line);
}

.page th {
  font-weight: 600;
  color: var(--ink);
}

.page em:first-child:last-child {
  display: block;
}

.draft {
  margin: 0 0 32px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: #7a2148;
  font-size: 14px;
}

/* --- Small screens --------------------------------------------------------------------- */

@media (max-width: 1060px) and (min-width: 761px) {
  .tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }
  .nav {
    gap: 18px;
  }
  .nav .hide-small {
    display: none;
  }
  .sketch {
    grid-template-columns: 1fr;
  }
  .window {
    margin-top: 48px;
  }
  .demo {
    margin-top: 48px;
  }
  .demo-stage {
    --demo-frame-height: 400px;
    min-height: var(--demo-frame-height);
  }
  .chaos-win.w1 {
    width: 86%;
    left: 1%;
  }
  .chaos-win.w2 {
    width: 88%;
    left: 8%;
    top: 64px;
  }
  .chaos-win.w3 {
    width: 90%;
    left: 3%;
    top: 136px;
  }
  .chaos-win.w4 {
    width: 92%;
    left: 5%;
    top: 210px;
  }
  .chaos-body {
    height: 110px;
  }
  .sketch-sidebar {
    display: none;
  }
  .sketch-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sketch-body {
    grid-template-columns: 1fr;
  }
  .sketch-bookmarks {
    display: none;
  }
  .feature {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .steps,
  .plans,
  .tiles,
  .private-panel {
    grid-template-columns: 1fr;
  }
  .private-panel {
    padding: 36px 22px;
    gap: 28px;
  }
  section.block {
    padding-top: 80px;
  }
  .hero {
    padding-top: 40px;
  }
  .site-footer .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .site-footer nav {
    margin-left: 0;
  }
}

/* Embedded Notion (or other) form on the beta and support pages. */
.page .form-embed {
  margin-top: 36px;
  margin-bottom: 8px;
}

.page .form-embed iframe {
  /* Tall enough for the feedback form (description, type, email) without an inner scrollbar. */
  height: min(1200px, 95vh);
}

.page .note {
  margin: 12px 0 0;
  font-size: 14px;
  color: #443b4b;
}

#faq,
#feedback {
  scroll-margin-top: 24px;
}

.faq {
  border-bottom: 1px solid var(--line);
}

.faq:first-of-type {
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  cursor: pointer;
  list-style: none;
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  flex: none;
  width: 0.55em;
  height: 0.55em;
  margin-top: -0.15em;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.faq[open] summary::after {
  margin-top: 0.2em;
  transform: rotate(225deg);
}

.faq summary:hover {
  color: var(--accent);
}

.faq summary:hover::after {
  border-color: var(--accent);
}

.faq p {
  margin: 0 0 16px;
  padding-right: 1.5em;
  color: #443b4b;
}

@media (prefers-reduced-motion: reduce) {
  .faq summary::after {
    transition: none;
  }
}

.form-embed {
  margin-top: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  box-shadow:
    0 2px 4px rgba(29, 24, 33, 0.04),
    0 20px 48px -28px rgba(29, 24, 33, 0.28);
}

.form-embed iframe {
  display: block;
  width: 100%;
  height: min(920px, 85vh);
  border: 0;
  background: var(--surface);
}

@media (prefers-reduced-motion: no-preference) {
  .fade {
    animation: fade 0.9s ease both;
  }
  @keyframes fade {
    from {
      opacity: 0;
      transform: translateY(6px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}
