/* Jess Cole: paint-chip system. One light theme, one accent (cobalt). */
:root {
  --paper: #f7f4ee;
  --on-paper: #1d2130;
  --muted: #4a4f60;
  --card: #fffdf9;
  --on-card: #1d2130;
  --plate: #eeebe4;
  --on-plate: #3d4252;
  --accent: #2438c9;
  --on-accent: #fbfaf7;
  --accent-soft: #e4e7fb;
  --on-accent-soft: #1a2a99;
  --ribbon: #1d2130;
  --on-ribbon: #f7f4ee;
  --error: #b3261e;
  --line: #d9d4ca;

  --chip-1: #2438c9;
  --chip-2: #e9a5a0;
  --chip-3: #3e6b4a;
  --chip-4: #e8742a;
  --chip-5: #e9e4d8;
  --chip-6: #f2c94c;

  --r: 14px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-ui: cubic-bezier(0.2, 0, 0, 1);
  --ease-roll: cubic-bezier(0.45, 0, 0.35, 1);
  --tape: #e6d8a8;
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;
  --shadow: 0 1px 2px rgb(40 44 70 / 0.08), 0 10px 28px -12px rgb(40 44 70 / 0.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--on-paper);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, .pill input:focus-visible + span {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 640px) { .wrap { padding-inline: 32px; } }
.break { word-break: break-all; }

/* Preview ribbon: in flow, never covers content */
.ribbon {
  background: var(--ribbon);
  color: var(--on-ribbon);
  font-size: 0.8125rem;
  text-align: center;
  padding: 6px 16px;
  line-height: 1.4;
}

/* Header */
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-paper); }
.brand-chip {
  width: 22px; height: 30px; border-radius: 4px;
  transition: rotate 0.35s var(--ease-ui);
  background: linear-gradient(var(--chip-1) 0 70%, var(--card) 70%);
  box-shadow: 0 0 0 1px var(--line);
}
.brand:hover .brand-chip { rotate: -8deg; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.125rem; font-weight: 700; }
.brand-text span { font-size: 0.8125rem; color: var(--muted); }
.nav { display: none; align-items: center; gap: 24px; }
.nav a:not(.btn) { color: var(--on-paper); text-decoration: none; font-weight: 500; }
.nav a:not(.btn) { position: relative; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: right center;
  transition: transform 0.3s var(--ease-ui);
}
.nav a:not(.btn):hover::after, .nav a:not(.btn):focus-visible::after { transform: scaleX(1); transform-origin: left center; }
@media (min-width: 900px) { .nav { display: flex; } }

/* Buttons: pill for every interactive control, 14px for surfaces */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border-radius: var(--r-pill);
  font: 600 1rem/1 var(--font);
  text-decoration: none; white-space: nowrap;
  border: 2px solid transparent; cursor: pointer;
  position: relative;
  transition: translate 0.2s var(--ease-ui), scale 0.15s ease-out;
}
.btn::after {
  content: ""; position: absolute; inset: -2px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 10px 22px -8px rgb(36 56 201 / 0.55);
  opacity: 0; transition: opacity 0.2s var(--ease-ui);
}
.btn:hover { translate: 0 -2px; }
.btn:hover::after { opacity: 1; }
.btn:active { scale: 0.96; translate: 0 0; }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-ghost { background: var(--card); color: var(--on-card); border-color: var(--on-card); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 0.9375rem; }
.btn-wide { width: 100%; }

/* Hero */
.hero {
  display: grid;
  gap: 32px;
  padding-top: 24px;
  padding-bottom: 56px;
}
.hero h1 { font-size: clamp(2.25rem, 7.5vw, 4rem); font-weight: 700; max-width: 12ch; }
.lede { margin-top: 18px; font-size: 1.1875rem; color: var(--muted); max-width: 40ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 56px;
    min-height: calc(100dvh - 110px);
    padding-top: 16px;
  }
}

/* The wall you can repaint */
.studio { position: relative; }
.wall {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r);
  --coat: var(--chip-1);
  background: var(--wall, var(--chip-1));
  overflow: hidden;
  box-shadow: var(--shadow);
}
@media (min-width: 900px) { .wall { aspect-ratio: 5 / 4; } }
/* Four roller-width lanes of the current coat. Painted state is the default. */
.coat span {
  position: absolute; top: 0; bottom: 11%;
  width: calc(25% + 1px);
  background: var(--coat);
  transform-origin: top center;
}
.coat span:nth-child(1) { left: 0; }
.coat span:nth-child(2) { left: 25%; transform-origin: bottom center; }
.coat span:nth-child(3) { left: 50%; }
.coat span:nth-child(4) { left: 75%; transform-origin: bottom center; }
.tape {
  position: absolute; left: 0; right: 0; bottom: 11%; height: 4.5%;
  background: var(--tape);
  box-shadow: 0 1px 2px rgb(40 44 70 / 0.18);
  opacity: 0;
}
.roller { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.roller svg { position: absolute; left: 0; bottom: 100%; width: 25%; overflow: visible; }
.roller-frame { fill: none; stroke: var(--on-paper); stroke-width: 4; stroke-linejoin: round; }
.roller-grip { fill: var(--on-paper); }
.roller-sleeve { fill: var(--coat); stroke: rgb(29 33 48 / 0.35); stroke-width: 2; }
.roller-nap { stroke: rgb(255 255 255 / 0.28); stroke-width: 2; }
.skirting {
  position: absolute; left: 0; right: 0; bottom: 0; height: 11%;
  background: linear-gradient(var(--line) 0 3px, var(--card) 3px);
}
.on-wall { margin-top: 14px; font-size: 0.9375rem; color: var(--muted); }
.on-wall strong { color: var(--on-paper); }
.fine { margin-top: 4px; font-size: 0.8125rem; color: var(--muted); }

.deck {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
@media (min-width: 560px) { .deck { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; } }
.chip {
  display: flex; flex-direction: column;
  padding: 5px 5px 0; min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--on-card);
  font: inherit; text-align: left; cursor: pointer;
  box-shadow: 0 1px 2px rgb(40 44 70 / 0.06);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.chip { position: relative; transition: transform 0.25s var(--ease-ui), scale 0.15s ease-out; }
.chip::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  box-shadow: var(--shadow); opacity: 0; transition: opacity 0.25s var(--ease-ui);
}
.chip:hover { transform: translateY(-4px); }
.chip:hover::after, .chip[aria-pressed="true"]::after { opacity: 1; }
.chip:active { scale: 0.96; }
.chip[aria-pressed="true"] { transform: translateY(-8px); border-color: var(--on-card); }
.chip-swatch { display: block; height: 44px; border-radius: 4px; }
.chip-name { display: block; overflow-wrap: normal; hyphens: none; padding: 6px 2px 8px; font-size: 0.75rem; font-weight: 500; line-height: 1.2; }
@media (min-width: 900px) {
  .deck { margin-top: -34px; position: relative; padding-inline: 14px; }
  .chip-name { font-size: 0.6875rem; }
  .chip:nth-child(odd) { rotate: -2deg; }
  .chip:nth-child(even) { rotate: 2deg; }
  .chip-swatch { height: 56px; }
}
.c1 .chip-swatch, .plate-tab.c1 { background: var(--chip-1); }
.c2 .chip-swatch, .plate-tab.c2 { background: var(--chip-2); }
.c3 .chip-swatch, .plate-tab.c3 { background: var(--chip-3); }
.c4 .chip-swatch, .plate-tab.c4 { background: var(--chip-4); }
.c5 .chip-swatch { background: var(--chip-5); box-shadow: inset 0 0 0 1px var(--line); }
.c6 .chip-swatch, .plate-tab.c6 { background: var(--chip-6); }

/* Meet Jess */
.meet { background: var(--accent-soft); color: var(--on-accent-soft); padding-block: 64px; }
.meet-grid { display: grid; gap: 20px; }
.hand {
  font-family: var(--hand);
  font-weight: 600;
  font-size: clamp(3.25rem, 12vw, 6rem);
  line-height: 1.1;
  letter-spacing: 0;
  padding-bottom: 4px;
  rotate: -3deg;
}
.meet-copy { display: grid; gap: 16px; max-width: 58ch; }
.meet-big { font-size: clamp(1.375rem, 3.2vw, 1.875rem); font-weight: 600; line-height: 1.3; }
.meet .text-link { color: var(--on-accent-soft); }
@media (min-width: 900px) {
  .meet { padding-block: 96px; }
  .meet-grid { grid-template-columns: 5fr 7fr; align-items: center; gap: 48px; }
}
.text-link { font-weight: 600; justify-self: start; }
.text-link::after { content: "\2192" / ""; display: inline-block; margin-left: 6px; transition: translate 0.25s var(--ease-ui); }
.text-link:hover::after { translate: 4px 0; }

/* Services: two colour-card strips */
.services { padding-block: 72px; }
.services h2, .work h2 { font-size: clamp(1.875rem, 5vw, 3rem); font-weight: 700; }
.cards { display: grid; gap: 20px; margin-top: 32px; }
@media (min-width: 720px) { .cards { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (min-width: 900px) { .cards { grid-template-columns: 1fr 1fr; max-width: 900px; } .card-strip:nth-child(2) { margin-top: 48px; } }
.card-strip {
  display: grid;
  grid-template-columns: 38% 1fr;
  background: var(--card);
  color: var(--on-card);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.bands { display: grid; grid-template-rows: repeat(4, 1fr); min-height: 200px; }
.bands-blue span:nth-child(1) { background: #d9ddf8; }
.bands-blue span:nth-child(2) { background: #9ea8ec; }
.bands-blue span:nth-child(3) { background: #5a69dc; }
.bands-blue span:nth-child(4) { background: var(--chip-1); }
.bands-pink span:nth-child(1) { background: #fbe6e3; }
.bands-pink span:nth-child(2) { background: #f3c6c2; }
.bands-pink span:nth-child(3) { background: var(--chip-2); }
.bands-pink span:nth-child(4) { background: #c9706a; }
.card-body { padding: 24px 20px; display: grid; align-content: end; gap: 8px; }
.card-body h3 { font-size: 1.625rem; font-weight: 700; }
.card-body p { color: var(--muted); }

/* Work plates */
.work { padding-block: 72px; border-top: 1px solid var(--line); }
.section-lede { margin-top: 12px; color: var(--muted); max-width: 52ch; }
.plates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 32px 0 24px;
}
.plate {
  position: relative;
  margin: 0;
  min-height: 150px;
  display: flex; align-items: flex-end;
  padding: 16px;
  border-radius: var(--r);
  background: var(--plate);
  color: var(--on-plate);
  border: 2px dashed var(--line);
  font-size: 0.9375rem; font-weight: 500; line-height: 1.35;
}
.plate figcaption { position: relative; }
.plate-after { position: absolute; inset: 0; border-radius: calc(var(--r) - 2px); background: var(--accent-soft); clip-path: inset(0 0 0 50%); }
.plate-tab { position: absolute; top: 14px; left: 14px; width: 34px; height: 34px; border-radius: 6px; }
.p-a { grid-column: 1 / -1; min-height: 220px; }
@media (min-width: 900px) {
  .plates { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 200px 200px; gap: 16px; }
  .p-a { grid-column: 1; grid-row: 1 / 3; min-height: 0; }
  .p-b { grid-column: 2 / 4; }
  .plate { min-height: 0; font-size: 1rem; }
}

/* Reviews aggregate */
.reviews { padding-block: 24px 72px; }
.score-card {
  display: grid;
  background: var(--card);
  color: var(--on-card);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.score-swatch { min-height: 90px; background: var(--chip-1); transform-origin: left center; }
@media (min-width: 900px) { .score-swatch { transform-origin: center bottom; } }
.score-body { padding: 28px 22px 32px; display: grid; gap: 12px; justify-items: start; }
.score-big { font-size: clamp(4.5rem, 20vw, 9rem); font-weight: 700; line-height: 0.9; letter-spacing: -0.04em; color: var(--accent); }
.score-body h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 700; }
.score-meta { color: var(--muted); margin-bottom: 8px; }
@media (min-width: 900px) {
  .score-card { grid-template-columns: 180px 1fr; }
  .score-body { padding: 48px 56px; }
}

/* Quote form */
.quote { background: var(--card); color: var(--on-card); padding-block: 72px; border-top: 1px solid var(--line); }
.quote-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .quote-grid { grid-template-columns: 4fr 7fr; gap: 64px; } }
.quote-side h2 { font-size: clamp(1.875rem, 5vw, 3rem); font-weight: 700; margin-bottom: 12px; }
.quote-side p { color: var(--muted); }
.quote-side .contact-line { margin-top: 12px; font-size: 1.25rem; font-weight: 600; }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field-pair { display: grid; gap: 18px; }
@media (min-width: 560px) { .field-pair { grid-template-columns: 1fr 1fr; } }
label, legend { font-weight: 600; font-size: 0.9375rem; padding: 0; }
.field > label, .field > legend { position: relative; }
.field > label::before, .field > legend::before {
  content: ""; position: absolute; left: -13px; top: 0.3em; width: 7px; height: 14px; border-radius: 2px;
  background: var(--accent);
  transform: scaleY(0); transform-origin: bottom center; transition: transform 0.25s var(--ease-ui);
}
.field:focus-within > label::before, .field:focus-within > legend::before { transform: scaleY(1); }
input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%;
  font: inherit;
  color: var(--on-card);
  background: var(--card);
  border: 2px solid #8a8f9f;
  border-radius: 10px;
  padding: 12px 14px;
  min-height: 48px;
}
textarea { resize: vertical; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
.help { font-size: 0.875rem; color: var(--muted); margin-top: -4px; }
.err { font-size: 0.875rem; color: var(--error); font-weight: 500; }
.err:empty { display: none; }
.err:not(:empty) { animation: err-in 0.25s var(--ease-ui); }
@keyframes err-in { from { opacity: 0; transform: translateY(-4px); } }
.shake { animation: shake 0.32s var(--ease-ui); }
@keyframes shake { 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; font-weight: 500; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border-radius: var(--r-pill);
  border: 2px solid var(--line);
  background: var(--card);
  color: var(--on-card);
  transition: scale 0.15s ease-out;
}
.pill:active span { scale: 0.96; }
.pill input:checked + span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.success {
  padding: 20px;
  border-radius: var(--r);
  background: var(--accent-soft);
  color: var(--on-accent-soft);
}
.success h3 { font-size: 1.25rem; margin-bottom: 6px; }
.tick { width: 44px; height: 44px; margin-bottom: 10px; fill: none; stroke: var(--on-accent-soft); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.tick circle { stroke-dasharray: 132; }
.tick path { stroke-dasharray: 32; }

/* Footer */
.foot { background: var(--ribbon); color: var(--on-ribbon); padding-block: 48px 40px; font-size: 0.9375rem; }
.foot a { color: var(--on-ribbon); }
.foot-grid { display: grid; gap: 28px; }
.foot-grid p + p { margin-top: 8px; }
.foot-name { font-weight: 700; font-size: 1.0625rem; }
.foot-h { font-size: 1rem; margin-bottom: 8px; letter-spacing: 0; }
#privacy p { max-width: 48ch; }
@media (min-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } }

/* Mobile dock */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--paper);
  color: var(--on-paper);
  border-top: 1px solid var(--line);
}
.dock .btn { padding: 0 12px; }
.dock .btn::after { display: none; }
body { padding-bottom: 76px; }
@media (min-width: 900px) { .dock { display: none; } body { padding-bottom: 0; } }

/* ------------------------------------------------------------------
   Motion. Everything below is enhancement: the default (no JS, or
   reduced motion) is the finished, painted state.
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: no-preference) {
  /* Signature: a roller paints the wall in four up-and-down lanes,
     then the masking tape peels off the skirting. Done by ~1.2s. */
  .wall.first { --wall: var(--plate); }
  .wall.paint .coat span { animation: lane 0.2s var(--ease-roll) backwards; }
  .wall.paint .coat span:nth-child(1) { animation-delay: 0.08s; }
  .wall.paint .coat span:nth-child(2) { animation-delay: 0.32s; }
  .wall.paint .coat span:nth-child(3) { animation-delay: 0.56s; }
  .wall.paint .coat span:nth-child(4) { animation-delay: 0.80s; }
  .wall.paint .roller { animation: roll 0.92s 0.08s linear both; }
  .wall.first.paint .tape { animation: peel 0.3s 0.92s var(--ease-ui) both; }

  /* Colour cards dealt out of a fan deck */
  .js .chip { animation: deal 0.55s var(--ease) backwards; animation-delay: calc(0.15s + var(--i, 0) * 0.06s); }
  .js .hero-copy > :not(h1) { animation: rise 0.6s var(--ease) backwards; }
  .js .hero-copy > :nth-child(2) { animation-delay: 0.06s; }
  .js .hero-copy > :nth-child(3) { animation-delay: 0.14s; }

  /* Section reveals: semantic chunks, 80ms stagger */
  .js .reveal.armed .r, .js .reveal.armed .form > :not(.success) {
    opacity: 0; transform: translateY(16px); filter: blur(4px);
    transition: opacity 0.5s var(--ease-ui), transform 0.6s var(--ease), filter 0.5s var(--ease-ui);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .js .reveal.armed.in .r, .js .reveal.armed.in .form > :not(.success) { opacity: 1; transform: none; filter: none; }
  /* buttons keep their own press/hover transitions, without the stagger delay */
  .js .reveal.armed .btn.r, .js .reveal.armed .form > .btn {
    --dl: calc(var(--i, 0) * 80ms);
    transition: opacity 0.5s var(--ease-ui) var(--dl), transform 0.6s var(--ease) var(--dl), filter 0.5s var(--ease-ui) var(--dl),
      translate 0.2s var(--ease-ui), scale 0.15s ease-out;
  }

  /* "Hi, I'm Jess" is written on, left to right */
  .js .reveal.armed .hand.r { opacity: 1; filter: none; transform: none; clip-path: inset(-10% 100% -10% 0); transition: clip-path 0.8s cubic-bezier(0.6, 0, 0.3, 1); }
  .js .reveal.armed.in .hand.r { clip-path: inset(-10% 0 -10% 0); }

  /* Colour-card bands fill light to dark */
  .js .reveal.armed .bands span { transform: scaleX(0); transform-origin: left center; transition: transform 0.5s var(--ease); }
  .js .reveal.armed .bands span:nth-child(2) { transition-delay: 70ms; }
  .js .reveal.armed .bands span:nth-child(3) { transition-delay: 140ms; }
  .js .reveal.armed .bands span:nth-child(4) { transition-delay: 210ms; }
  .js .reveal.armed .card-strip:nth-child(2) .bands span { transition-delay: calc(var(--d, 0ms) + 200ms); }
  .js .reveal.armed .card-strip:nth-child(2) .bands span:nth-child(2) { --d: 70ms; }
  .js .reveal.armed .card-strip:nth-child(2) .bands span:nth-child(3) { --d: 140ms; }
  .js .reveal.armed .card-strip:nth-child(2) .bands span:nth-child(4) { --d: 210ms; }
  .js .reveal.armed.in .bands span { transform: none; }

  /* Gallery plates rolled on from the bottom, tabs pop in after */
  .js .reveal.armed .plate.r { opacity: 1; filter: none; transform: none; clip-path: inset(100% 0 0 0 round var(--r)); transition: clip-path 0.6s var(--ease-roll); transition-delay: calc(var(--i, 0) * 80ms); }
  .js .reveal.armed.in .plate.r { clip-path: inset(0 0 0 0 round var(--r)); }
  .js .reveal.armed .plate-tab { transform: scale(0.25); opacity: 0; transition: transform 0.3s var(--ease-ui), opacity 0.3s var(--ease-ui); transition-delay: calc(var(--i, 0) * 80ms + 350ms); }
  .js .reveal.armed.in .plate-tab { transform: none; opacity: 1; }

  /* Score swatch fills like a sample pot going on */
  .js .reveal.armed .score-swatch { transform: scaleX(0); transition: transform 0.7s var(--ease); }
  @media (min-width: 900px) { .js .reveal.armed .score-swatch { transform: scaleY(0); } }
  .js .reveal.armed.in .score-swatch { transform: none; }

  /* Mobile dock arrives once the hero buttons scroll away */
  .js .dock { transform: translateY(110%); transition: transform 0.35s var(--ease-ui); }
  .js .dock.show { transform: none; }

  /* Success: the panel rolls on, the tick draws */
  .success:not([hidden]) { animation: wipe 0.45s var(--ease-roll) both; }
  .success:not([hidden]) .tick circle { animation: draw 0.5s 0.3s var(--ease-ui) backwards; --len: 132; }
  .success:not([hidden]) .tick path { animation: draw 0.3s 0.7s var(--ease-ui) backwards; --len: 32; }

  /* Scroll-linked, only where the browser does it natively */
  @supports (animation-timeline: scroll()) {
    .thread {
      position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30;
      background: var(--chip-4); transform-origin: left center;
      animation: grow linear both; animation-timeline: scroll(root);
    }
  }
  @supports (animation-timeline: view()) {
    .plate-after { animation: after-wipe linear both; animation-timeline: view(); animation-range: entry 30% cover 55%; }
  }
}

@keyframes lane { from { transform: scaleY(0); } }
@keyframes roll {
  /* lane 1 down, across, lane 2 up, across, lane 3 down, across, lane 4 up */
  0%      { opacity: 1; transform: translate(0, 0); animation-timing-function: var(--ease-roll); }
  21.74%  { transform: translate(0, 89%); animation-timing-function: var(--ease-ui); }
  26.09%  { transform: translate(25%, 89%); animation-timing-function: var(--ease-roll); }
  47.83%  { transform: translate(25%, 0); animation-timing-function: var(--ease-ui); }
  52.17%  { transform: translate(50%, 0); animation-timing-function: var(--ease-roll); }
  73.91%  { transform: translate(50%, 89%); animation-timing-function: var(--ease-ui); }
  78.26%  { transform: translate(75%, 89%); animation-timing-function: var(--ease-roll); }
  99%     { opacity: 1; }
  100%    { opacity: 0; transform: translate(75%, -2%); }
}
@keyframes peel {
  0%   { opacity: 1; clip-path: inset(0 0 0 0); transform: none; }
  100% { opacity: 0; clip-path: inset(0 0 0 100%); transform: translateY(-6px) rotate(-1.5deg); }
}
@keyframes deal { from { opacity: 0; transform: translate(-30px, 34px) rotate(-14deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } }
@keyframes wipe { from { clip-path: inset(0 100% 0 0 round var(--r)); } to { clip-path: inset(0 0 0 0 round var(--r)); } }
@keyframes draw { from { stroke-dashoffset: var(--len); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes after-wipe { from { clip-path: inset(0 0 0 100%); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .thread { display: none; }
}


/* 404 */
.lost { min-height: 70dvh; display: grid; align-content: center; gap: 18px; padding-block: 64px; }
.lost h1 { font-size: clamp(2.25rem, 7vw, 3.5rem); font-weight: 700; }
.lost p { color: var(--muted); max-width: 44ch; }
