/* ==========================================================================
   Tapeline launch site. Palette, type and rules come from docs/site/BRIEF.md
   and match the app in src/styles.css so the live embed sits on the page as
   if cut from the same cloth.
   ========================================================================== */

/* ---------- Tokens: light palette (default) ---------- */
:root {
  color-scheme: light dark;

  /* Paper surfaces */
  --color-paper: #f5f0e6;
  --color-surface: #fffcf6;
  --color-surface-sunken: #ede6d8;
  --color-line: #e1d8c7;
  --color-line-strong: #c6b9a2;

  /* Ink */
  --color-ink: #1d1a17;
  --color-ink-soft: #5b5449;
  --color-ink-faint: #887f72;

  /* Accent: deep thread teal */
  --color-accent: #136b61;
  --color-accent-strong: #0d514a;
  --color-accent-soft: #dcefe9;
  --color-on-accent: #ffffff;

  /* Chalk: the tailor's chalk mark */
  --color-chalk: #d9a441;
  --color-chalk-soft: #f7e4bd;

  /* Status pairs, exactly as the app */
  --status-neutral-bg: #e9e2d4;
  --status-neutral-fg: #4a4338;
  --status-amber-bg: #f7e4bd;
  --status-amber-fg: #744905;
  --status-green-bg: #d6ebd6;
  --status-green-fg: #1e5a2b;
  --status-muted-bg: #ebe8e2;
  --status-muted-fg: #76705f;
  --status-red-bg: #f7d6cf;
  --status-red-fg: #96281a;

  /* Shadows, tinted with the ink hue */
  --shadow-hue: 32 24% 12%;
  --shadow-sm:
    0 1px 1px hsl(var(--shadow-hue) / 0.04),
    0 1px 3px hsl(var(--shadow-hue) / 0.06);
  --shadow-md:
    0 1px 2px hsl(var(--shadow-hue) / 0.05),
    0 4px 8px hsl(var(--shadow-hue) / 0.06),
    0 12px 24px hsl(var(--shadow-hue) / 0.06);
  --shadow-lg:
    0 2px 4px hsl(var(--shadow-hue) / 0.06),
    0 12px 24px hsl(var(--shadow-hue) / 0.1),
    0 32px 64px hsl(var(--shadow-hue) / 0.14);

  /* Type */
  --font-display:
    "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body:
    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Motion */
  --duration-fast: 150ms;
  --duration-base: 200ms;
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  /* Layout */
  --page-max: 72rem;
  --page-pad: clamp(1.25rem, 4vw, 2.5rem);
  --header-height: 3.75rem;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --focus-ring: 0 0 0 3px
    color-mix(in srgb, var(--color-accent) 30%, transparent);
}

/* ---------- Tokens: dark palette ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-paper: #171411;
    --color-surface: #211d19;
    --color-surface-sunken: #110f0d;
    --color-line: #342e28;
    --color-line-strong: #4b443b;

    --color-ink: #ece5d8;
    --color-ink-soft: #b2a99a;
    --color-ink-faint: #857c6f;

    --color-accent: #5fc4b5;
    --color-accent-strong: #84d6c9;
    --color-accent-soft: #173b36;
    --color-on-accent: #0e1b19;

    --color-chalk: #e8b95a;
    --color-chalk-soft: #4a3612;

    --status-neutral-bg: #2e2924;
    --status-neutral-fg: #d6cdbf;
    --status-amber-bg: #4a3612;
    --status-amber-fg: #f3c66e;
    --status-green-bg: #17352a;
    --status-green-fg: #8ad69f;
    --status-muted-bg: #27231f;
    --status-muted-fg: #948b7e;
    --status-red-bg: #4a1f19;
    --status-red-fg: #f4a597;

    --shadow-hue: 32 20% 2%;
    --shadow-sm:
      0 1px 1px hsl(var(--shadow-hue) / 0.3),
      0 1px 3px hsl(var(--shadow-hue) / 0.35);
    --shadow-md:
      0 1px 2px hsl(var(--shadow-hue) / 0.3),
      0 4px 8px hsl(var(--shadow-hue) / 0.3),
      0 12px 24px hsl(var(--shadow-hue) / 0.35);
    --shadow-lg:
      0 2px 4px hsl(var(--shadow-hue) / 0.35),
      0 12px 24px hsl(var(--shadow-hue) / 0.4),
      0 32px 64px hsl(var(--shadow-hue) / 0.5);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--color-paper);
  background-image: radial-gradient(
    80rem 32rem at 50% -14rem,
    color-mix(in srgb, var(--color-accent-soft) 45%, transparent),
    transparent
  );
  background-repeat: no-repeat;
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 30;
  color: var(--color-ink);
}

h1 {
  /* Tops out at 4rem so "The measurement" holds one line in the hero column. */
  font-size: clamp(2.5rem, 1.6rem + 3.4vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.15em;
  transition:
    color var(--duration-fast) var(--ease-out),
    text-decoration-color var(--duration-fast) var(--ease-out);
}
a:hover {
  color: var(--color-accent-strong);
  text-decoration-color: currentColor;
}
a:active {
  color: var(--color-accent-strong);
}

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

svg {
  display: block;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink-faint);
}

.lead {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--color-ink-soft);
  max-width: 58ch;
  text-wrap: pretty;
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-ink-soft);
}

.section-head {
  display: grid;
  gap: 0.75rem;
  max-width: 44rem;
}

/* ---------- Buttons ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition:
    transform var(--duration-fast) var(--ease-spring),
    color var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out),
    box-shadow var(--duration-fast) var(--ease-out);
}
.button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}
.button:active {
  transform: translateY(1px) scale(0.985);
  transition-duration: 60ms;
}
.button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.button--primary {
  background: var(--color-accent);
  color: var(--color-on-accent);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent),
    var(--shadow-sm);
}
.button--primary:hover {
  background: var(--color-accent-strong);
  color: var(--color-on-accent);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 18%, transparent),
    var(--shadow-md);
}
.button--primary:active {
  color: var(--color-on-accent);
  box-shadow: var(--shadow-sm);
}
.button--primary:focus-visible {
  box-shadow: var(--focus-ring), var(--shadow-sm);
}

.button--secondary {
  background: var(--color-surface);
  color: var(--color-ink);
  border-color: var(--color-line-strong);
  box-shadow: var(--shadow-sm);
}
.button--secondary:hover {
  color: var(--color-ink);
  border-color: var(--color-ink-faint);
  box-shadow: var(--shadow-md);
}
.button--secondary:active {
  color: var(--color-ink);
  background: var(--color-surface-sunken);
  box-shadow: none;
}

.button--small {
  min-height: 2.125rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
}

.button--large {
  min-height: 3.25rem;
  padding: 0 1.75rem;
  font-size: 1.125rem;
}

.button--static {
  cursor: default;
  pointer-events: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-height);
  background: color-mix(in srgb, var(--color-paper) 85%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-line);
}

.site-header__inner {
  height: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--color-ink);
  text-decoration: none;
}
.brand:hover,
.brand:active {
  color: var(--color-ink);
  text-decoration: none;
}
.brand__mark {
  width: 32px;
  height: 32px;
  flex: none;
  transition: transform var(--duration-base) var(--ease-spring);
}
.brand:hover .brand__mark {
  transform: rotate(-6deg);
}
.brand__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 30;
  letter-spacing: 0;
  line-height: 1;
}
.brand--small .brand__mark {
  width: 24px;
  height: 24px;
}
.brand--small .brand__name {
  font-size: 1.125rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.site-nav__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-ink-soft);
}
.site-nav__link:hover {
  color: var(--color-ink);
}
.site-nav__link:active {
  color: var(--color-accent-strong);
}
/* Text links take a rounded outline; buttons keep their own radius and ring. */
.site-nav__link:focus-visible,
.brand:focus-visible {
  border-radius: var(--radius-sm);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
}

.hero__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 7rem) var(--page-pad);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2rem;
  align-items: center;
}

.hero__copy {
  grid-column: 1 / 7;
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__note {
  font-size: 0.875rem;
  color: var(--color-ink-faint);
  margin-top: -0.5rem;
}

.hero__visual {
  grid-column: 7 / 13;
}

/* The desk: three pieces of paper, HTML and CSS only. */
.desk {
  position: relative;
  padding: 2.75rem 0 8.5rem;
}

.paper {
  background: var(--color-surface);
  color: var(--color-ink);
  --rot: 0deg;
  transform: rotate(var(--rot));
  animation: paper-rise 450ms var(--ease-out) backwards;
}

@keyframes paper-rise {
  from {
    opacity: 0;
    transform: translateY(12px) rotate(var(--rot));
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(var(--rot));
  }
}

/* 1. The measurement card, at the back */
.paper--card {
  position: relative;
  width: 66%;
  padding: 1.25rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation-delay: 0ms;
}

.card__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.monogram {
  flex: none;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.card__name {
  flex: 1;
  min-width: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 30;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.unit-tag {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-ink-soft);
  background: var(--color-surface-sunken);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.4rem;
}

.card__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}
.card__table th {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink-faint);
  text-align: left;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--color-line);
}
.card__table td {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--color-line);
}
.card__table th:nth-child(2),
.card__table td:nth-child(2) {
  text-align: right;
  padding-right: 0.75rem;
}
.card__table th:last-child,
.card__table td:last-child {
  text-align: right;
}
.card__table tr:last-child td {
  border-bottom: 0;
}
.delta {
  display: inline-block;
  min-width: 2.25rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
}
.delta--amber {
  background: var(--status-amber-bg);
  color: var(--status-amber-fg);
}
.delta--zero {
  color: var(--color-ink-faint);
}

.card__note {
  margin-top: 0.875rem;
  font-size: 0.875rem;
  font-style: italic;
  color: var(--color-ink-faint);
}

/* 2. The board card */
.paper--job {
  --rot: -2deg;
  position: absolute;
  right: 0;
  bottom: 0;
  width: 56%;
  padding: 1rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation-delay: 120ms;
}
.job__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.job__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 30;
  line-height: 1.2;
}
.job__garment {
  font-weight: 500;
  font-size: 0.9375rem;
  margin-top: 0.15rem;
}
.job__lines {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.625rem;
}
.job__foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.875rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.badge--neutral {
  background: var(--status-neutral-bg);
  color: var(--status-neutral-fg);
}
.badge--muted {
  background: var(--status-muted-bg);
  color: var(--status-muted-fg);
}

/* 3. The claim tag, in front */
.tag-wrap {
  position: absolute;
  top: 0;
  right: 0;
  width: 34%;
  --rot: 3deg;
  transform: rotate(var(--rot));
  transform-origin: 50% 0;
  animation: paper-rise 450ms var(--ease-out) 240ms backwards;
  transition:
    transform var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}
.tag__string {
  width: 2.5rem;
  height: 1.75rem;
  margin: 0 auto -0.25rem;
}
.paper--tag {
  --rot: 0deg;
  position: relative;
  padding: 1.5rem 1rem 1rem;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: none;
  transition: box-shadow var(--duration-base) var(--ease-out);
}
.tag__hole {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--color-paper);
  box-shadow: 0 0 0 1px var(--color-line-strong);
}
.tag__eyebrow {
  font-size: 0.6875rem;
}
.tag__number {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 30;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--color-chalk);
  margin: 0.25rem 0 0.5rem;
}
.tag__garment {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.tag__lines {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-ink-soft);
  font-variant-numeric: tabular-nums;
}
.tag__line {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.15rem 0;
}
.tag__line dt {
  flex: none;
}
.tag__line::after {
  content: "";
  order: 1;
  flex: 1;
  border-bottom: 1px dotted var(--color-line-strong);
  transform: translateY(-0.25em);
}
.tag__line dd {
  order: 2;
  margin: 0;
  flex: none;
}
.tag__total {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--color-line);
  font-size: 0.875rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.tag__cut {
  position: relative;
  margin: 0.75rem 0.25rem 0;
  border-top: 1px dashed var(--color-line-strong);
  text-align: center;
}
.tag__cut span {
  position: relative;
  top: -0.6em;
  padding: 0 0.4rem;
  background: var(--color-paper);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink-faint);
}

@media (hover: hover) and (pointer: fine) {
  .desk:hover .tag-wrap {
    transform: translateY(-4px) rotate(var(--rot));
  }
  .desk:hover .paper--tag {
    box-shadow:
      0 4px 8px hsl(var(--shadow-hue) / 0.08),
      0 16px 32px hsl(var(--shadow-hue) / 0.14),
      0 40px 72px hsl(var(--shadow-hue) / 0.18);
  }
}

/* ---------- The pile ---------- */
.pile {
  background: var(--color-surface-sunken);
  padding: 4rem var(--page-pad);
}
.pile__inner {
  max-width: 44rem;
  margin: 0 auto;
  text-align: center;
  display: grid;
  gap: 1rem;
  justify-items: center;
}
.pile__text {
  color: var(--color-ink-soft);
  max-width: 58ch;
  text-wrap: pretty;
}
.chips {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.875rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-ink-soft);
}
.chip svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--color-ink-faint);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- How it works ---------- */
.how {
  padding: 6rem var(--page-pad);
}
.how__inner,
.features__inner,
.see__inner {
  max-width: var(--page-max);
  margin: 0 auto;
}

.steps {
  list-style: none;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  counter-reset: step;
}
.step {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}
.step h3 {
  font-size: 1.375rem;
}
.step > p:not(.step__number) {
  max-width: 60ch;
  color: var(--color-ink-soft);
  text-wrap: pretty;
}
.step__number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 30;
  line-height: 1;
  color: var(--color-chalk);
  margin-top: 0.5rem;
}

/* Step illustrations: 100% wide, 10rem tall, on a surface card */
.illus {
  position: relative;
  width: 100%;
  height: 10rem;
  overflow: hidden;
  padding: 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  font-size: 0.8125rem;
}

/* Step 1: four number fields */
.illus--fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.625rem 0.75rem;
  align-content: center;
}
.mini-field {
  display: grid;
  gap: 0.2rem;
}
.mini-field__label {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-faint);
}
.mini-field__value {
  min-height: 2rem;
  padding: 0 0.625rem;
  display: flex;
  align-items: center;
  border: 1px solid var(--color-line-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-variant-numeric: tabular-nums;
  color: var(--color-ink);
}
.mini-field.is-focused .mini-field__value {
  border-color: var(--color-accent);
  box-shadow: var(--focus-ring);
}

/* Step 2: a miniature job form */
.illus--form {
  display: grid;
  align-content: center;
  gap: 0.45rem;
}
.mini-form__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.mini-form__label {
  flex: none;
  width: 3.5rem;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-faint);
}
.mini-form__field {
  flex: 1;
  min-height: 1.75rem;
  padding: 0 0.5rem;
  display: flex;
  align-items: center;
  border: 1px solid var(--color-line-strong);
  border-radius: 6px;
  color: var(--color-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-form__row--line {
  padding-left: 4rem;
}
.mini-form__price {
  flex: none;
  min-width: 3.5rem;
  min-height: 1.75rem;
  padding: 0 0.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border: 1px solid var(--color-line-strong);
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  color: var(--color-ink);
}

/* Step 3: the board, and the card that moves across it */
.illus--board {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 0.5rem;
}
.mini-board {
  --gap: 0.375rem;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}
.mini-col {
  background: var(--color-surface-sunken);
  border-radius: var(--radius-md);
  padding: 0.375rem;
  min-height: 5.75rem;
}
/* Labels wrap to two lines ("In progress", "Collected") rather than clip. */
.mini-col__head {
  display: flex;
  align-items: flex-start;
  gap: 0.25rem;
  font-size: 0.625rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink-faint);
  white-space: normal;
  overflow: visible;
}
.dot {
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 0.1875rem;
  border-radius: 50%;
}
.dot--neutral {
  background: var(--status-neutral-fg);
}
.dot--amber {
  background: var(--status-amber-fg);
}
.dot--green {
  background: var(--status-green-fg);
}
.dot--muted {
  background: var(--status-muted-fg);
}
.mini-job {
  position: absolute;
  top: 2.5rem;
  left: 0;
  margin: 0 0.375rem;
  width: calc(25% - var(--gap) * 0.75 - 0.75rem);
  padding: 0.375rem;
  display: grid;
  gap: 0.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  animation: job-move 6s var(--ease-out) infinite;
}
.mini-job__badge {
  width: 55%;
  height: 0.375rem;
  border-radius: var(--radius-pill);
  background: var(--status-neutral-bg);
  animation: job-badge 6s var(--ease-out) infinite;
}
.mini-job__line {
  height: 0.25rem;
  border-radius: var(--radius-pill);
  background: var(--color-line-strong);
}
.mini-job__line--short {
  width: 60%;
}

/* One column of travel: the card's own width plus the gap and margins. */
@keyframes job-move {
  0%,
  25% {
    transform: translateX(0);
    opacity: 1;
  }
  33%,
  58% {
    transform: translateX(calc(100% + var(--gap) + 0.75rem));
  }
  66%,
  91% {
    transform: translateX(calc(200% + var(--gap) * 2 + 1.5rem));
    opacity: 1;
  }
  95% {
    transform: translateX(calc(200% + var(--gap) * 2 + 1.5rem));
    opacity: 0;
  }
  95.1% {
    transform: translateX(0);
    opacity: 0;
  }
  100% {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes job-badge {
  0%,
  25% {
    background-color: var(--status-neutral-bg);
  }
  33%,
  58% {
    background-color: var(--status-amber-bg);
  }
  66%,
  95% {
    background-color: var(--status-green-bg);
  }
  95.1%,
  100% {
    background-color: var(--status-neutral-bg);
  }
}

.mini-tag {
  justify-self: start;
  position: relative;
  width: 3.5rem;
  padding: 0.625rem 0.375rem 0.375rem;
  display: grid;
  gap: 0.2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-line-strong);
  border-radius: 4px;
}
.mini-tag__hole {
  position: absolute;
  top: 0.2rem;
  left: 50%;
  width: 5px;
  height: 5px;
  margin-left: -2.5px;
  border-radius: 50%;
  background: var(--color-paper);
  box-shadow: 0 0 0 1px var(--color-line-strong);
}
.mini-tag__line {
  height: 0.2rem;
  border-radius: var(--radius-pill);
  background: var(--color-line-strong);
}
.mini-tag__line--short {
  width: 55%;
}

/* ---------- Features ---------- */
.features {
  padding: 6rem var(--page-pad);
}
.feature-grid {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
.feature {
  padding: 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 0.75rem;
  align-content: start;
}
.feature p {
  color: var(--color-ink-soft);
  text-wrap: pretty;
}
.feature__icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 0.25rem;
}
@media (hover: hover) {
  .feature {
    transition:
      transform var(--duration-fast) var(--ease-out),
      box-shadow var(--duration-fast) var(--ease-out);
  }
  .feature:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
  }
}

.numbers {
  margin: 3rem 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}
.numbers__item {
  padding: 1.5rem 1rem;
  text-align: center;
  border-left: 1px solid var(--color-line);
}
.numbers__item:first-child {
  border-left: 0;
}
.numbers__figure {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 30;
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.numbers dd {
  margin: 0;
}

/* ---------- See it ---------- */
.see {
  padding: 6rem var(--page-pad);
}
.see .section-head {
  margin: 0 auto;
  text-align: center;
  justify-items: center;
}
.frame {
  margin: 3rem auto 0;
  max-width: 64rem;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.frame__bar {
  position: relative;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.875rem;
  border-bottom: 1px solid var(--color-line);
}
.frame__dots {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 0.4rem;
}
.frame__dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-line-strong);
}
.frame__address {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-ink-soft);
  background: var(--color-surface-sunken);
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.875rem;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.frame__body {
  position: relative;
  background: var(--color-paper);
}
.frame__iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 0;
  background: var(--color-paper);
}
.frame__fallback {
  padding: 2rem 1.5rem;
  text-align: center;
  color: var(--color-ink-soft);
}
.see__foot {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  text-align: center;
}
.see__note {
  font-size: 0.875rem;
  color: var(--color-ink-faint);
  max-width: 52ch;
}

/* ---------- Close ---------- */
.close {
  position: relative;
  overflow: hidden;
  padding: 7rem var(--page-pad);
  background: var(--color-surface-sunken);
}
.close__tape {
  position: absolute;
  top: 3rem;
  left: 50%;
  width: 48rem;
  max-width: none;
  height: auto;
  transform: translateX(-50%);
  opacity: 0.2;
  pointer-events: none;
}
.close__inner {
  position: relative;
  max-width: 40rem;
  margin: 0 auto;
  text-align: center;
  display: grid;
  gap: 1.5rem;
  justify-items: center;
}
.close__title {
  font-size: clamp(2.5rem, 1.6rem + 4vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.close__text {
  font-size: 1.125rem;
  color: var(--color-ink-soft);
  max-width: 48ch;
  text-wrap: pretty;
}
.close__note {
  font-size: 0.875rem;
  color: var(--color-ink-faint);
  margin-top: -0.5rem;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-line);
  padding: 2.5rem var(--page-pad);
}
.site-footer__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer__text {
  font-size: 0.875rem;
  color: var(--color-ink-faint);
}

/* ---------- Reveal on entry (main.js adds .js and .is-visible) ----------
   A keyframe animation, so once revealed the element carries nothing that
   could slow its own hover (the feature cards' 150ms lift). */
.js .reveal {
  opacity: 0;
}
.js .reveal.is-visible {
  opacity: 1;
  animation: reveal 500ms var(--ease-out) backwards;
}
.js .reveal--frame.is-visible {
  animation-name: reveal-frame;
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes reveal-frame {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.js .step:nth-child(2).is-visible,
.js .feature:nth-child(2).is-visible,
.js .feature:nth-child(5).is-visible {
  animation-delay: 100ms;
}
.js .step:nth-child(3).is-visible,
.js .feature:nth-child(3).is-visible,
.js .feature:nth-child(6).is-visible {
  animation-delay: 200ms;
}
.js .feature:nth-child(4).is-visible {
  animation-delay: 300ms;
}

/* ---------- Tablet ---------- */
@media (max-width: 1023px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* The hero stacks before the phone breakpoint: the desk needs its width. */
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }
  .hero__copy,
  .hero__visual {
    grid-column: 1 / -1;
  }
  .desk {
    max-width: 32rem;
    margin: 0 auto;
  }
  .steps {
    gap: 1.5rem;
  }
}

/* ---------- Phones ---------- */
@media (max-width: 767px) {
  body {
    font-size: 1rem;
    line-height: 1.55;
  }
  .lead {
    font-size: 1.125rem;
  }
  .site-nav__link {
    display: none;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero__copy,
  .hero__visual {
    grid-column: 1 / -1;
  }

  /* The composition stacks: card, then the board card below it; only the tag overlaps. */
  .desk {
    max-width: 24rem;
    margin: 0 auto;
    padding: 2rem 0 0;
  }
  .paper--card {
    width: 60%;
    padding: 1rem;
  }
  .card__name {
    font-size: 1.125rem;
  }
  .card__table {
    font-size: 0.875rem;
  }
  .paper--job {
    position: relative;
    right: auto;
    bottom: auto;
    width: 72%;
    margin: 1.25rem 0 0 auto;
  }
  /* A wider tag than on desktop: the leaders keep their dots and the garment holds one line. */
  .tag-wrap {
    right: 0;
    width: 42%;
  }
  .paper--tag {
    padding: 1.25rem 0.75rem 0.75rem;
  }
  .tag__number {
    font-size: 2.25rem;
  }
  .tag__garment {
    font-size: 0.8125rem;
  }

  .pile {
    padding: 4rem var(--page-pad);
  }
  .how,
  .features,
  .see {
    padding: 4.5rem var(--page-pad);
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-top: 2.5rem;
    padding-left: 1.25rem;
    border-left: 1px solid var(--color-line-strong);
  }

  .feature-grid {
    grid-template-columns: 1fr;
    margin-top: 2.5rem;
  }
  .numbers {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .numbers__item:nth-child(3) {
    border-left: 0;
  }
  .numbers__item:nth-child(n + 3) {
    border-top: 1px solid var(--color-line);
  }

  .frame__iframe {
    aspect-ratio: 9 / 16;
  }

  .close {
    padding: 5rem var(--page-pad);
  }
  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- Reduced motion: everything off, resting states shown ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal,
  .js .reveal--frame {
    opacity: 1;
    transform: none;
  }
  .paper,
  .tag-wrap {
    opacity: 1;
  }
  .desk:hover .tag-wrap {
    transform: rotate(var(--rot));
  }
  /* The step 3 card is parked in Ready. */
  .mini-job {
    transform: translateX(calc(200% + var(--gap) * 2 + 1.5rem));
  }
  .mini-job__badge {
    background: var(--status-green-bg);
  }
}
