/* Setaside launch page. Tokens and rules from docs/site/BRIEF.md. */

:root {
  --paper: #f7f3ea;
  --paper-raised: #fffdf8;
  --ink: #1c1a17;
  --ink-muted: #645e55;
  --accent: #1f4d3a;
  --accent-ink: #f7f3ea;
  --accent-tint: color-mix(in srgb, var(--accent) 12%, var(--paper-raised));
  --border: #d9d2c4;
  --stamp: #8a2f2f;
  --slip: #fffdf8;
  --slip-ink: #1c1a17;
  --slip-muted: color-mix(in srgb, var(--slip-ink) 62%, var(--slip));
  --shadow-sm: 0 1px 2px rgb(28 26 23 / 0.05);
  --shadow-md: 0 1px 2px rgb(28 26 23 / 0.05), 0 4px 12px rgb(28 26 23 / 0.07);
  --shadow-lg: 0 2px 4px rgb(28 26 23 / 0.06), 0 12px 32px rgb(28 26 23 / 0.12);

  --font-display:
    Fraunces, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;
  --text-hero: clamp(2.5rem, 1.5rem + 4.5vw, 4.5rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --page-max: 72rem;
  --page-pad: 1rem;
  --section-gap: 4rem;
  --measure: 62ch;

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-press: cubic-bezier(0.34, 1.2, 0.64, 1);
  --fast: 150ms;
  --base: 320ms;
}

/* Cover tones, light scheme. The dark pairs sit in the dark block below. */
[data-tone="moss"] {
  --tone-bg: #4a6b3f;
  --tone-fg: #f1f3e4;
}
[data-tone="oxblood"] {
  --tone-bg: #6e2a2f;
  --tone-fg: #f7e6e0;
}
[data-tone="ochre"] {
  --tone-bg: #c08a2e;
  --tone-fg: #2b2014;
}
[data-tone="slate"] {
  --tone-bg: #4b5a6b;
  --tone-fg: #eef1f5;
}
[data-tone="plum"] {
  --tone-bg: #5a3a63;
  --tone-fg: #f3e8f2;
}
[data-tone="teal"] {
  --tone-bg: #2f6b6a;
  --tone-fg: #e6f3f1;
}
[data-tone="rust"] {
  --tone-bg: #a3522d;
  --tone-fg: #fbeee4;
}
[data-tone="ink"] {
  --tone-bg: #26282f;
  --tone-fg: #e9e6dd;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1e1b18;
    --paper-raised: #27231f;
    --ink: #efe8da;
    --ink-muted: #a89f91;
    --accent: #6fbf9a;
    --accent-ink: #14211b;
    --border: #3a342d;
    --stamp: #8a2f2f;
    --slip: #fffdf8;
    --slip-ink: #1c1a17;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow-md: 0 1px 2px rgb(0 0 0 / 0.3), 0 4px 12px rgb(0 0 0 / 0.35);
    --shadow-lg: 0 2px 4px rgb(0 0 0 / 0.35), 0 12px 32px rgb(0 0 0 / 0.5);
  }
  [data-tone="moss"] {
    --tone-bg: #5f8252;
    --tone-fg: #f4f6ea;
  }
  [data-tone="oxblood"] {
    --tone-bg: #8a3b41;
    --tone-fg: #fbeae6;
  }
  [data-tone="ochre"] {
    --tone-bg: #d39c3c;
    --tone-fg: #2a1f12;
  }
  [data-tone="slate"] {
    --tone-bg: #5f7087;
    --tone-fg: #f2f5f9;
  }
  [data-tone="plum"] {
    --tone-bg: #74507e;
    --tone-fg: #f7eef6;
  }
  [data-tone="teal"] {
    --tone-bg: #3e8886;
    --tone-fg: #eaf6f4;
  }
  [data-tone="rust"] {
    --tone-bg: #bf6639;
    --tone-fg: #fdf1e8;
  }
  [data-tone="ink"] {
    --tone-bg: #3a3d47;
    --tone-fg: #ecebe3;
  }
}

@media (min-width: 640px) {
  :root {
    --page-pad: 2rem;
  }
}

@media (min-width: 960px) {
  :root {
    --section-gap: 6rem;
  }
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  overflow-x: clip;
}

@media (min-width: 960px) {
  body {
    font-size: 1.0625rem;
  }
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
}

h2 {
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
  max-width: 24ch;
  text-wrap: balance;
  margin-bottom: var(--space-5);
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

p code {
  background: var(--accent-tint);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-sm);
}

svg {
  display: inline-block;
  vertical-align: middle;
}

.lede {
  font-size: var(--text-lg);
  color: var(--ink-muted);
  max-width: var(--measure);
  margin-bottom: var(--space-6);
}

.section p {
  max-width: var(--measure);
}

/* Page column, shared by the header, every section and the footer. */
.header__inner,
.section,
.hero,
.footer__inner,
.footer__fine {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}

.section {
  margin-top: var(--section-gap);
}

/* ---------- Skip link ---------- */

.skip {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 20;
  padding: var(--space-2) var(--space-4);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-md);
  transform: translateY(-200%);
}

.skip:focus-visible {
  transform: none;
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Buttons and chips ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.625rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--fast) var(--ease),
    color var(--fast) var(--ease),
    border-color var(--fast) var(--ease),
    box-shadow var(--fast) var(--ease),
    transform var(--fast) var(--ease);
}

.button:hover {
  text-decoration: none;
}

.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.button:active {
  transform: translateY(1px);
  box-shadow: none;
}

.button--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-sm);
}

.button--primary:hover {
  background: color-mix(in srgb, var(--accent) 88%, var(--ink));
  box-shadow: var(--shadow-md);
}

.button--secondary {
  background: var(--paper-raised);
  color: var(--ink);
  border-color: var(--border);
}

.button--secondary:hover {
  border-color: var(--ink-muted);
}

.button--ghost {
  color: var(--accent);
  border-color: transparent;
}

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

.button--inverted {
  background: var(--accent-ink);
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.button--inverted:hover {
  background: color-mix(in srgb, var(--accent-ink) 90%, var(--accent));
  box-shadow: var(--shadow-md);
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--paper-raised);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  transition:
    background-color var(--fast) var(--ease),
    color var(--fast) var(--ease),
    border-color var(--fast) var(--ease),
    transform var(--fast) var(--ease);
}

.chip:hover {
  border-color: var(--ink-muted);
  background: var(--accent-tint);
}

.chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

.chip--pressed,
.chip[aria-current="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

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

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: border-color var(--base) var(--ease);
}

.js .header:not(.is-scrolled) {
  border-bottom-color: transparent;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 4rem;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--accent);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--fast) var(--ease);
}

.lockup .mark {
  transform: translateY(2px);
}

.lockup:hover {
  color: color-mix(in srgb, var(--accent) 75%, var(--ink));
}

.lockup:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.lockup:active {
  color: var(--accent);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1;
}

@media (max-width: 399.98px) {
  .wordmark {
    display: none;
  }
}

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

.hero {
  display: grid;
  gap: var(--space-7);
  padding-top: var(--space-7);
  padding-bottom: var(--space-6);
}

@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
    align-items: center;
    gap: var(--space-7);
    min-height: calc(100vh - 4rem);
    padding-top: var(--space-6);
    padding-bottom: var(--space-8);
  }
}

.hero__title {
  font-size: var(--text-hero);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-variation-settings: "opsz" 144;
  text-wrap: balance;
}

.hero__sub {
  margin-top: var(--space-5);
  font-size: var(--text-lg);
  line-height: 1.5;
  max-width: var(--measure);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.hero__note {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* The composition: a shelf of drawn books with the slip in front. */
/* The shelf and the slip share one grid cell. The scene is only as wide as
   the shelf, so the slip always sits against the shelf's right edge, and it
   hangs below the shelf rule over the feet of the last two books; the scene's
   padding-bottom makes room for the hang so nothing overlaps the next
   section. */
.hero__scene {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: fit-content;
  max-width: 100%;
  padding-top: var(--space-4);
  padding-bottom: 14.5rem;
}

.shelf {
  grid-area: 1 / 1;
  align-self: end;
  display: flex;
  align-items: flex-end;
  width: fit-content;
  max-width: 100%;
  gap: var(--space-2);
  padding: 0 var(--space-3);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 10px 14px -10px rgb(28 26 23 / 0.35);
}

.book {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  flex: 0 0 auto;
  min-width: 0;
  aspect-ratio: 3 / 4.4;
  padding: 0.75rem;
  border-radius: 2px;
  background: var(--tone-bg);
  color: var(--tone-fg);
  box-shadow:
    inset 3px 0 0 rgb(255 255 255 / 0.18),
    0 1px 2px rgb(0 0 0 / 0.15);
  text-align: center;
  animation: rise var(--base) var(--ease) both;
  animation-delay: calc(var(--i, 0) * 60ms);
}

.book--tall {
  width: 8.5rem;
  font-size: 1rem;
}

.book--short {
  width: 6.5rem;
  font-size: 0.85rem;
}

.book--slim {
  width: 5rem;
  padding-inline: 0.5rem;
  font-size: 0.65rem;
}

.book__title {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  padding-bottom: 0.5em;
  border-bottom: 1px solid color-mix(in srgb, currentColor 35%, transparent);
  overflow-wrap: anywhere;
}

.book__author {
  font-size: 0.7em;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  opacity: 0.9;
}

.hero__slip {
  grid-area: 1 / 1;
  align-self: end;
  justify-self: end;
  position: relative;
  width: 11.5rem;
  max-width: 100%;
  margin-bottom: -14.5rem;
  margin-right: -1.5rem;
  animation: settle 400ms var(--ease) backwards;
  animation-delay: 560ms;
}

.slip--prop {
  font-size: 0.6rem;
  transform: rotate(1.5deg);
}

@keyframes rise {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

@keyframes settle {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
}

@media (max-width: 639.98px) {
  .hero__actions .button {
    width: 100%;
  }
  .hero__scene {
    padding-top: 0;
    padding-bottom: 10rem;
  }
  .book--fourth {
    display: none;
  }
  .book--tall {
    width: 6rem;
    font-size: 0.75rem;
  }
  .book--short {
    width: 4.75rem;
    font-size: 0.65rem;
  }
  .hero__slip {
    width: 10rem;
    margin-bottom: -10rem;
    margin-right: 0;
  }
  .slip--prop {
    font-size: 0.46rem;
  }
}

/* ---------- The slip ---------- */

.slip {
  position: relative;
  background: var(--slip);
  color: var(--slip-ink);
  border-radius: 2px;
  box-shadow: var(--shadow-lg);
  padding: 1.5em 1.5em 1.25em;
  line-height: 1.4;
}

.slip--full {
  font-size: 0.9375rem;
  max-width: 26rem;
}

.slip--mini {
  font-size: 0.46rem;
  width: 11.5rem;
  box-shadow: var(--shadow-sm);
}

.slip__head {
  padding-bottom: 0.75em;
  border-bottom: 1px dotted color-mix(in srgb, var(--slip-ink) 45%, transparent);
}

.slip__shop {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35em;
  line-height: 1.1;
}

.slip__kind {
  margin-top: 0.25em;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--slip-muted);
}

.slip__ref {
  margin-top: 0.15em;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.slip__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6em 1em;
  margin-top: 0.9em;
}

.slip__grid dt {
  font-size: 0.75em;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--slip-muted);
}

.slip__grid dd {
  margin: 0;
  font-weight: 500;
}

.slip__books {
  margin-top: 1em;
  padding-left: 1.4em;
  display: grid;
  gap: 0.5em;
}

.slip__books li::marker {
  color: var(--slip-muted);
  font-size: 0.9em;
}

.slip__title {
  display: block;
  font-weight: 600;
}

.slip__meta {
  display: block;
  font-size: 0.85em;
  color: var(--slip-muted);
}

.slip__policy {
  margin-top: 1em;
  font-size: 0.85em;
  color: var(--slip-muted);
}

.slip__bring {
  margin-top: 0.9em;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05em;
}

.stamp {
  position: absolute;
  top: 2.6em;
  right: 1em;
  width: 6.25em;
  height: auto;
  color: var(--stamp);
  opacity: 0.85;
  transform: rotate(-8deg);
  mix-blend-mode: multiply;
}

.stamp text {
  fill: currentColor;
  font-family: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-stretch: condensed;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
}

/* The close-up stamp is pressed once the section is in view. */
.js .stamp--press:not(.is-pressed) {
  opacity: 0;
}

.stamp--press.is-pressed {
  animation: press 260ms var(--ease-press) both;
}

@keyframes press {
  from {
    transform: rotate(-8deg) scale(1.3);
    opacity: 0;
  }
  to {
    transform: rotate(-8deg) scale(1);
    opacity: 0.85;
  }
}

/* ---------- Reveal on entry ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 480ms var(--ease),
    transform 480ms var(--ease);
  transition-delay: calc(var(--i, 0) * 40ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 2. Three things ---------- */

.asks__grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .asks__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

.ask {
  border-top: 1px solid var(--border);
  padding-top: var(--space-4);
}

.ask__q {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.asks__foot {
  margin: var(--space-7) auto 0;
  max-width: none;
  text-align: center;
  color: var(--ink-muted);
}

/* ---------- 3. How it works ---------- */

.how__grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 960px) {
  .how__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-8);
    align-items: start;
  }
  .how__panel {
    order: 2;
    position: sticky;
    top: 6rem;
  }
}

.panel {
  background: var(--paper-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel__tab {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.panel__code {
  padding: var(--space-5);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  tab-size: 2;
}

.panel__code code {
  font-size: inherit;
}

.k {
  color: var(--accent);
}

.s {
  color: var(--ink);
}

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

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-6);
  counter-reset: step;
}

.step {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--space-4);
  counter-increment: step;
}

.step__title,
.step p {
  grid-column: 2;
}

.step::before {
  grid-row: 1 / span 2;
  content: counter(step);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
}

.step__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.note {
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.tag {
  display: inline-block;
  margin-right: var(--space-1);
  padding: 0.1em 0.5em;
  border-radius: var(--radius-sm);
  background: var(--accent-tint);
  color: var(--accent);
  font-size: 0.8125rem;
}

/* ---------- 4. What you get ---------- */

.features__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
}

@media (min-width: 768px) {
  .features__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.card {
  min-width: 0;
  background: var(--paper-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
}

.card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.card__art {
  position: relative;
  height: 8rem;
  max-height: 8rem;
  margin-bottom: var(--space-5);
  overflow: hidden;
}

/* The shelf: two chips and three mini books on a rule. */
.art-shelf {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.art-chips {
  display: flex;
  gap: var(--space-2);
}

.art-chips .chip {
  min-height: 0;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
}

.art-books {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  padding: 0 var(--space-2);
  border-bottom: 2px solid var(--border);
}

.minibook {
  width: 2rem;
  aspect-ratio: 3 / 4.4;
  border-radius: 2px;
  background: var(--tone-bg);
  box-shadow: inset 3px 0 0 rgb(255 255 255 / 0.18);
}

.minibook:nth-child(2) {
  width: 1.75rem;
}

.minibook:nth-child(3) {
  width: 2.25rem;
}

/* Events: two dated rows. */
.art-events {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--space-3);
  padding-top: var(--space-2);
}

.art-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
}

.art-date {
  flex: none;
  font-family: var(--font-mono);
  color: var(--ink-muted);
  white-space: nowrap;
}

/* An illustration never shows an ellipsis: the title wraps to two lines. */
.art-event {
  min-width: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.2;
}

.art-tag {
  flex: none;
  margin-left: auto;
  padding: 0.1em 0.6em;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent);
  font-size: 0.75rem;
  white-space: nowrap;
}

@media (max-width: 479.98px) {
  .art-tag {
    margin-left: 0;
  }
}

/* The slip, in miniature, cropped by the art area with a fade over its
   lower half so the crop reads as intended. */
.art-slip {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: var(--space-2);
  -webkit-mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 50%, transparent 100%);
}

/* Light and dark, side by side. */
.art-swatch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.swatch {
  display: flex;
  align-items: center;
  justify-content: center;
}

.swatch--light {
  background: #f7f3ea;
  border-right: 1px solid #d9d2c4;
}

.swatch--dark {
  background: #1e1b18;
}

.swatch__chip {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
}

.swatch--light .swatch__chip {
  background: #1f4d3a;
  color: #f7f3ea;
}

.swatch--dark .swatch__chip {
  background: #6fbf9a;
  color: #14211b;
}

/* ---------- 5. The slip, up close ---------- */

.closeup__grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 960px) {
  .closeup__grid {
    grid-template-columns: 26rem minmax(0, 1fr);
    gap: var(--space-8);
    align-items: start;
  }
}

@media (max-width: 959.98px) {
  .slip--full {
    order: 2;
  }
}

.closeup__copy {
  display: grid;
  gap: var(--space-4);
}

.refline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--accent-tint);
}

.refline__code {
  font-size: var(--text-lg);
  color: var(--accent);
  background: none;
  padding: 0;
}

.refline__caption {
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* ---------- 6. See it running ---------- */

.demo__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.demo__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.demo__full {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) 0;
  transition: color var(--fast) var(--ease);
}

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

.demo__full:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.demo__full:active {
  color: var(--accent);
}

.frame {
  background: var(--paper-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.frame__bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 2.25rem;
  padding: 0 var(--space-4);
  border-bottom: 1px solid var(--border);
}

.frame__dot {
  width: 10px;
  height: 10px;
  border: 1px solid var(--border);
  border-radius: 50%;
}

.frame__address {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0.15rem 0.75rem;
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

.frame__view {
  display: block;
  width: 100%;
  height: 600px;
  border: 0;
  background: var(--paper);
}

@media (min-width: 640px) {
  .frame__view {
    height: auto;
    aspect-ratio: 16 / 10;
  }
}

.demo__note {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

/* ---------- 7. Make it yours ---------- */

.yours__grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 960px) {
  .yours__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-8);
    align-items: start;
  }
}

.yours__copy {
  display: grid;
  gap: var(--space-4);
}

/* ---------- 8. Close ---------- */

.close {
  margin-top: var(--section-gap);
  padding: var(--space-9) var(--page-pad);
  background: var(--accent);
  color: var(--accent-ink);
  text-align: center;
}

.close__title {
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  max-width: none;
  margin: 0 auto var(--space-4);
}

.close__sub {
  max-width: 48ch;
  margin: 0 auto var(--space-6);
  font-size: var(--text-lg);
}

.close .button:focus-visible {
  outline-color: var(--accent-ink);
}

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

.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-7) 0 var(--space-6);
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.footer__lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-5);
}

.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--fast) var(--ease);
}

.footer__links a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer__links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.footer__links a:active {
  color: var(--accent);
}

.footer__fine {
  margin-top: var(--space-5);
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none;
    transition: none;
  }
  .js .reveal,
  .book,
  .hero__slip {
    opacity: 1;
    transform: none;
  }
  .js .stamp--press,
  .stamp {
    opacity: 0.85;
    transform: rotate(-8deg);
  }
  .slip--prop {
    transform: rotate(1.5deg);
  }
}
