/* FullFelt Studio — "Soft Machine"
   A felt board: deep teal felt ground with felt patches sewn on.
   No inline styles anywhere, so the CSP can stay strict (style-src 'self'). */

@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

@font-face {
  font-family: "Quicksand";
  src: url("/assets/fonts/quicksand.woff2") format("woff2");
  font-weight: 500 800;
  font-style: bold;
  font-display: swap;
}
@font-face {
  font-family: "Zen Kaku Gothic New";
  src: url("/assets/fonts/zen-kaku-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Zen Kaku Gothic New";
  src: url("/assets/fonts/zen-kaku-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Zen Kaku Gothic New";
  src: url("/assets/fonts/zen-kaku-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --felt: #174847;
  --felt-deep: #0f3534;
  --cream: #efe6dd;
  --tomato: #e2462b;
  --tomato-deep: #a92e19;
  --mustard: #e8b23a;
  --mustard-deep: #b9851a;
  --signal: #ff6a1a;
  --ink: #1b2a2a;
  --ink-soft: #46585a;
  --on-felt: #f2ede4;
  --on-felt-soft: #bcd2ce;

  /* felt fibre textures (tileable, generated for this site) */
  --tex-dark: url("/assets/img/felt-dark.webp");
  --tex-light: url("/assets/img/felt-light.webp");

  --stitch: 2px dashed;
  --radius-patch: 28px;
  --radius-small: 14px;
  --lift: 0 2px 0 rgba(6, 26, 25, .35), 0 18px 40px -18px rgba(6, 26, 25, .75);

  --step--1: clamp(.9rem, .87rem + .15vw, 1rem);
  --step-0: clamp(1.05rem, 1rem + .25vw, 1.2rem);
  --step-1: clamp(1.3rem, 1.2rem + .5vw, 1.6rem);
  --step-2: clamp(1.8rem, 1.5rem + 1.4vw, 2.8rem);
  --step-3: clamp(2.6rem, 1.8rem + 4vw, 5.6rem);

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  /* Zen Kaku Gothic New for text; Bricolage stays for the condensed headlines */
  font-family: "Zen Kaku Gothic New", system-ui, sans-serif;
  font-size: var(--step-0);
  line-height: 1.25;
  font-optical-sizing: auto;
  color: var(--on-felt);
  /* One continuous piece of felt: two fine fibre layers and a soft colour
     variation, each repeating at a different size, so together they only
     repeat every few thousand pixels and no seam or pattern shows. */
  background-color: var(--felt);
  background-image:
    url("/assets/img/felt-mottle.webp"),
    url("/assets/img/felt-fibre-a.webp"),
    url("/assets/img/felt-fibre-b.webp");
  background-size: 1450px, 233px, 307px;
  background-position: 0 0, 0 0, 91px 57px;
  background-blend-mode: overlay, overlay, overlay;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- felt surfaces ----------
   Any coloured surface gets the light fibre texture multiplied over its colour,
   plus a soft halo so edges look fuzzy rather than cut. */
.felt,
.patch, .swatch, .contact, .top__cta, .label, .toast, .sectors li,
.game__panel, .game__hole, .game__start {
  background-image: var(--tex-light);
  background-size: 360px;
  background-blend-mode: multiply;
}
.lever__button, .lever__track, .game__board {
  background-image: var(--tex-dark);
  background-size: 360px;
  background-blend-mode: overlay;
}

/* the seam sewn down the page sits on the felt, under everything else */
.seam { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 0; overflow: visible; }
.top, main, .foot { position: relative; z-index: 1; }

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-color: var(--mustard); }

:focus-visible {
  outline: 3px solid var(--mustard);
  outline-offset: 3px;
  border-radius: 6px;
}

/* the big condensed display type stays in Bricolage */
h1, h2, h3, .statement__text, .step__title, .contact__title {
  font-family: "Bricolage", system-ui, sans-serif;
}
h1, h2, h3 { margin: 0; line-height: 1.05; font-weight: 750; letter-spacing: -.01em; }
h2 { font-size: var(--step-2); font-stretch: 82%; }
h3 { font-size: var(--step-1); font-stretch: 90%; line-height: 1.15; }
p { margin: 0 0 1em; max-width: 62ch; }

.skip {
  position: absolute; left: 16px; top: -100px;
  background: var(--mustard); color: var(--ink);
  padding: 10px 16px; border-radius: 10px; z-index: 30; font-weight: 600;
}
.skip:focus { top: 16px; }

/* ---------- header ---------- */
.top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.mark { display: inline-flex; align-items: baseline; gap: 6px; text-decoration: none; line-height: 1; }
.mark__logo { display: block; height: 34px; width: auto; }

.top__nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 32px); font-size: var(--step--1); }
.top__nav a { text-decoration: none; }
.top__nav a:hover { text-decoration: underline; text-decoration-color: var(--mustard); }
.top__cta {
  position: relative;
  background-color: var(--tomato); color: var(--cream);
  padding: 10px 18px; border-radius: 999px; font-weight: 650;
  box-shadow: 0 3px 0 var(--tomato-deep), 0 0 1.5px 1px rgba(226, 70, 43, .55);
}
.top__cta::after {
  content: ""; position: absolute; inset: 4px; border-radius: 999px;
  border: 1.5px dashed rgba(255, 236, 220, .55); pointer-events: none;
}
.top__nav .top__cta:hover { text-decoration: none; }
.top__cta:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--tomato-deep); }
@media (max-width: 720px) {
  .top__nav a:not(.top__cta) { display: none; }
  .mark__logo { height: 28px; }
}

/* ---------- patches (sewn-on cream felt) ---------- */
.patch {
  position: relative;
  margin: 0;
  background-color: var(--cream);
  border-radius: var(--radius-patch);
  box-shadow: var(--lift), 0 0 2px 1.5px rgba(239, 230, 221, .45);
  overflow: hidden;
}
.patch::after {
  content: ""; position: absolute; inset: 11px;
  border: var(--stitch) rgba(27, 42, 42, .3);
  border-radius: calc(var(--radius-patch) - 10px);
  pointer-events: none;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px) var(--gutter) clamp(56px, 8vw, 112px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.hero__title {
  font-size: var(--step-3);
  font-stretch: 76%;
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.02em;
  margin-bottom: .4em;
  text-wrap: balance;
  /* cut from cream felt */
  color: var(--cream);
  background-color: var(--cream);
  background-image: var(--tex-light);
  background-size: 300px;
  background-blend-mode: multiply;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 0 rgba(6, 26, 25, .45));
}
.hero__lede { color: var(--on-felt-soft); font-size: var(--step-0); max-width: 44ch; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .panel { order: -1; }
}

/* ---------- section heads ---------- */
.section-head { max-width: 46rem; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { margin-bottom: .35em; }
.section-head p { color: var(--on-felt-soft); }

/* ---------- services: swatches pinned at slight angles ---------- */
.work { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 6vw, 88px) var(--gutter); }
.work__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 32px);
}
@media (max-width: 1100px) { .work__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .work__grid { grid-template-columns: 1fr; } }

.swatch {
  position: relative;
  display: flex; flex-direction: column;
  background-color: var(--cream); color: var(--ink);
  border-radius: var(--radius-patch);
  padding: 18px 22px 26px;
  box-shadow: var(--lift), 0 0 2px 1.5px rgba(239, 230, 221, .45);
}
.swatch::after {
  content: ""; position: absolute; inset: 9px;
  border: var(--stitch) var(--thread, var(--tomato));
  border-radius: calc(var(--radius-patch) - 9px);
  opacity: .55; pointer-events: none;
}
.swatch--a { --thread: var(--tomato); transform: rotate(-1.4deg); }
.swatch--b { --thread: var(--felt); transform: rotate(1deg) translateY(14px); }
.swatch--c { --thread: var(--signal); transform: rotate(-.6deg); }
.swatch--d { --thread: var(--mustard-deep); transform: rotate(1.6deg) translateY(10px); }
@media (max-width: 600px) { .swatch--b, .swatch--d { transform: rotate(.8deg); } }
.swatch img {
  width: 82%; margin: 0 auto 6px; aspect-ratio: 1; object-fit: cover;
  mix-blend-mode: multiply;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
@media (max-width: 600px) { .swatch img { width: 58%; } }
.swatch h3 { margin-bottom: .45em; }
.swatch > p { font-size: var(--step--1); color: var(--ink-soft); margin-bottom: 1.2em; }

/* a woven care label, sewn on at the bottom of each swatch */
.label {
  margin: auto -8px 0;
  position: relative;
  background-color: #f9f5ee; color: var(--tomato-deep);
  padding: 12px 18px 11px;
  font-size: .86rem; line-height: 1.15; font-weight: 600;
  border-top: 2px solid currentColor; border-bottom: 2px solid currentColor;
  box-shadow: 0 2px 0 rgba(6, 26, 25, .12);
  /* folded ends */
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%, 8px 50%);
  transform: rotate(-.8deg);
}
.label p { margin: 0; text-align: center; }
.swatch--b .label { color: var(--felt); transform: rotate(.7deg); }
.swatch--c .label { color: #b4470e; }
.swatch--d .label { color: #8a5d0c; transform: rotate(.5deg); }

/* ---------- experience ---------- */
.experience {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 6vw, 88px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
.experience__copy h2 { margin-bottom: .5em; }
.experience__copy p { color: var(--on-felt-soft); }
.sectors { list-style: none; margin: 1.4em 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sectors li {
  position: relative;
  background-color: #235c5a;
  background-blend-mode: soft-light;
  border-radius: 999px; padding: 7px 16px;
  font-size: var(--step--1);
  box-shadow: 0 2px 0 rgba(6, 26, 25, .4), 0 0 1.5px 1px rgba(35, 92, 90, .7);
}
.sectors li::after {
  content: ""; position: absolute; inset: 3px; border-radius: 999px;
  border: 1.5px dashed rgba(242, 237, 228, .45); pointer-events: none;
}
@media (max-width: 900px) { .experience { grid-template-columns: 1fr; } }

/* ---------- about ---------- */
.about {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 6vw, 88px) var(--gutter);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
.about__copy h2 { margin-bottom: .5em; }
.about__copy p { color: var(--on-felt-soft); }
.about__copy p:last-child { color: var(--on-felt); font-weight: 600; }
.about__image { margin: 0; }
.about__image img { width: 100%; height: auto; filter: drop-shadow(0 10px 14px rgba(6, 26, 25, .4)); }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } }

/* ---------- contact: a mustard patch ---------- */
.contact {
  position: relative;
  max-width: calc(var(--max) - 2 * var(--gutter));
  margin: clamp(40px, 6vw, 88px) auto clamp(56px, 8vw, 112px);
  width: calc(100% - 2 * var(--gutter));
  background-color: var(--mustard); color: var(--ink);
  border-radius: var(--radius-patch);
  box-shadow: var(--lift), 0 0 2px 1.5px rgba(232, 178, 58, .55);
  padding: clamp(28px, 5vw, 64px);
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(24px, 4vw, 64px);
}
.contact::after {
  content: ""; position: absolute; inset: 12px;
  border: var(--stitch) rgba(27, 42, 42, .35);
  border-radius: calc(var(--radius-patch) - 12px);
  pointer-events: none;
}
/* headline and intro on the left, the form alongside them from the top */
.contact { grid-template-rows: auto 1fr; align-items: start; row-gap: 22px; }
.contact__title {
  grid-column: 1; grid-row: 1;
  font-size: clamp(2.8rem, 7vw, 6.4rem);
  font-stretch: 76%; font-weight: 800; line-height: .92; letter-spacing: -.02em;
  max-width: 11ch;
}
.contact__intro { grid-column: 1; grid-row: 2; }
.contact .form { grid-column: 2; grid-row: 1 / span 2; }
.contact__alt a { font-weight: 650; word-break: break-word; }
@media (max-width: 900px) {
  .contact { grid-template-columns: 1fr; grid-template-rows: none; }
  .contact__title, .contact__intro, .contact .form { grid-column: 1; grid-row: auto; }
  .contact__title { font-size: min(15vw, 6rem); }
}

.form { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--wide, .form__privacy, .lever { grid-column: 1 / -1; }
@media (max-width: 600px) { .form { grid-template-columns: 1fr; } }

.field label { font-weight: 650; font-size: var(--step--1); }
.opt { font-weight: 400; color: #5a4a1e; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background-color: #fbf6e9;
  border: 2px solid #c38f1d;
  border-radius: var(--radius-small);
  padding: 11px 13px;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--felt); outline-offset: 1px; border-color: var(--felt);
}
.field [aria-invalid="true"] { border-color: var(--tomato-deep); background-color: #fff1ec; }
.field__error { margin: 0; color: #8a2412; font-size: .9rem; font-weight: 600; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__privacy { font-size: .9rem; margin: 0; }

/* the lever */
.lever { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 6px; }
.lever__button {
  position: relative;
  display: inline-flex; align-items: center; gap: 14px;
  font: inherit; font-weight: 750; font-size: var(--step-0);
  color: var(--cream); background-color: var(--felt);
  border: 0; border-radius: 999px; cursor: pointer;
  padding: 12px 24px 12px 14px;
  box-shadow: 0 4px 0 var(--felt-deep), 0 0 1.5px 1px rgba(23, 72, 71, .7);
}
.lever__button::after {
  content: ""; position: absolute; inset: 4px; border-radius: 999px;
  border: 1.5px dashed rgba(242, 237, 228, .4); pointer-events: none;
}
.lever__button:hover .lever__handle { transform: translateY(5px); }
.lever__button:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--felt-deep); }
.lever__button[disabled] { cursor: progress; opacity: .85; }
.lever__track {
  position: relative; width: 22px; height: 44px; border-radius: 11px;
  background-color: var(--felt-deep); box-shadow: inset 0 2px 4px rgba(0,0,0,.4);
}
.lever__handle {
  position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--tomato); box-shadow: 0 2px 0 var(--tomato-deep);
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1);
}
.is-pulled .lever__handle { transform: translateY(22px) !important; }
.form__status { margin: 0; font-weight: 650; }
.form__status.is-error { color: #8a2412; }

/* ---------- footer ---------- */
.foot {
  max-width: var(--max); margin: 0 auto;
  padding: 28px var(--gutter) 48px;
  display: flex; flex-wrap: wrap; gap: 8px 32px; justify-content: space-between;
  color: var(--on-felt-soft); font-size: var(--step--1);
  border-top: var(--stitch) rgba(242, 237, 228, .25);
}
.foot p { margin: 0; max-width: none; display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.foot .foot__small { display: block; }
.foot__secret { flex-basis: 100%; opacity: .55; font-size: .85rem; }
.sound-toggle {
  font: inherit; color: inherit; background: none; cursor: pointer;
  border: var(--stitch) rgba(242, 237, 228, .4); border-radius: 999px; padding: 3px 12px;
}
.sound-toggle[aria-pressed="true"] { color: var(--mustard); border-color: var(--mustard); }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 40;
  transform: translateX(-50%);
  background-color: var(--cream); color: var(--ink);
  padding: 14px 22px; border-radius: 999px;
  font-weight: 650; box-shadow: var(--lift);
  max-width: calc(100% - 32px); text-align: center;
}

/* confetti stitches, created by JS */
.bit {
  position: fixed; z-index: 45; pointer-events: none;
  width: 14px; height: 4px; border-radius: 2px;
}

/* ---------- mini-game: Button Bash ---------- */
.game {
  border: 0; padding: 0; background: none; color: var(--ink);
  width: min(440px, calc(100% - 24px)); max-width: none;
  max-height: calc(100dvh - 24px);
  overflow: visible;
}
.game::backdrop { background: rgba(8, 30, 29, .72); }
.game__panel {
  position: relative;
  background-color: var(--cream);
  border-radius: var(--radius-patch);
  padding: clamp(16px, 3dvh, 24px) 22px clamp(14px, 2.5dvh, 22px);
  box-shadow: var(--lift), 0 0 2px 1.5px rgba(239, 230, 221, .5);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}
.game__panel::after {
  content: ""; position: absolute; inset: 10px;
  border: var(--stitch) rgba(27, 42, 42, .3);
  border-radius: calc(var(--radius-patch) - 10px);
  pointer-events: none;
}
.game__close {
  position: absolute; top: 16px; right: 18px; z-index: 2;
  font: inherit; font-size: 1.4rem; line-height: 1; color: var(--ink);
  background: none; border: 0; cursor: pointer; padding: 6px 10px; border-radius: 10px;
}
.game h2 { font-size: var(--step-1); margin-bottom: .3em; padding-right: 40px; }
.game__intro { font-size: .9rem; line-height: 1.2; color: var(--ink-soft); margin-bottom: 10px; }
.game__hud { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.game__board {
  position: relative;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  background-color: var(--felt);
  border-radius: 20px; padding: 14px;
  /* the board shrinks to fit short screens so the whole game is always visible */
  width: min(100%, max(200px, calc(100dvh - 300px)));
  margin: 0 auto;
}
.game__hole {
  --depth: 7px;
  aspect-ratio: 1; border-radius: 50%; border: 0; cursor: pointer; padding: 0;
  background-color: #2a6462;
  box-shadow: inset 0 4px 8px rgba(0,0,0,.35);
  display: grid; place-items: center;
  font: inherit; font-weight: 800; font-size: .85rem; color: rgba(242,237,228,.35);
  transition: background-color .08s, transform .08s, box-shadow .08s;
  -webkit-tap-highlight-color: transparent;
}
.game__hole.is-lit {
  background-color: var(--tomato); color: var(--cream);
  box-shadow: 0 var(--depth) 0 var(--tomato-deep), 0 0 18px 3px rgba(255, 106, 26, .55);
  transform: translateY(calc(var(--depth) * -1));
}
.game__hole.is-gold { background-color: var(--mustard); box-shadow: 0 var(--depth) 0 var(--mustard-deep), 0 0 18px 3px rgba(232, 178, 58, .7); }
.game__hole.is-hit { background-color: var(--signal); transform: translateY(0); box-shadow: inset 0 3px 6px rgba(0,0,0,.3); }
.game__hole.is-miss { background-color: #123d3c; }
.game__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; }
/* two lines reserved so the end-of-game message never changes the panel's height */
.game__msg { margin: 0; flex: 1; min-width: 0; min-height: 2.7em; display: flex; align-items: center; font-weight: 650; font-size: .92rem; line-height: 1.35; }
.game__start { flex: none; }
.game__start {
  font: inherit; font-weight: 750; color: var(--cream);
  background-color: var(--tomato); border: 0; border-radius: 999px;
  padding: 10px 22px; cursor: pointer; box-shadow: 0 3px 0 var(--tomato-deep);
}
.game__start:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--tomato-deep); }

/* ---------- simple pages (privacy, 404) ---------- */
.page { max-width: 46rem; margin: 0 auto; padding: clamp(24px, 5vw, 64px) var(--gutter) 80px; }
.page h1 { font-size: var(--step-2); font-stretch: 80%; margin-bottom: .6em; }
.page h2 { font-size: var(--step-1); margin: 1.8em 0 .5em; font-stretch: 90%; }
.page p, .page li { color: var(--on-felt-soft); }
.page ul { padding-left: 1.2em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* very short screens (phones held sideways): drop the intro so the game still fits */
@media (max-height: 480px) {
  .game__intro { display: none; }
  .game__board { width: min(100%, max(170px, calc(100dvh - 190px))); }
}


/* =========================================================
   Interactive layer
   ========================================================= */

/* ---------- sticky header that becomes a felt strip ---------- */
.top-sentinel { position: absolute; top: 0; height: 1px; width: 1px; }
.top {
  position: sticky; top: 0; z-index: 20;
  max-width: none;
  padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  transition: background-color .25s ease, box-shadow .25s ease;
}
.top.is-stuck {
  background-color: var(--felt-deep);
  background-image: url("/assets/img/felt-fibre-a.webp");
  background-size: 233px;
  background-blend-mode: overlay;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .7);
}
.top.is-stuck::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 5px;
  border-bottom: 2px dashed rgba(232, 178, 58, .45);
  pointer-events: none;
}


/* ---------- scroll-stitched statement ---------- */
.statement { position: relative; height: 240vh; }
.statement__sticky {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: grid; place-content: center; gap: 28px;
  padding: 0 var(--gutter);
}
.statement__text {
  margin: 0 auto; max-width: 21ch;
  font-size: clamp(2.1rem, 1.2rem + 3.6vw, 4.8rem);
  font-stretch: 78%; font-weight: 800; line-height: 1.02; letter-spacing: -.015em;
  text-align: center; text-wrap: balance;
}
.statement .word {
  display: inline-block;
  position: relative;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(239, 230, 221, .28);
}
/* The felt fill sits on top of each outlined word from the start and only its
   opacity changes, which the browser can do smoothly without repainting text. */
.statement .word::after {
  content: attr(data-w);
  position: absolute; left: 0; top: 0;
  -webkit-text-stroke: 0;
  background-color: var(--cream);
  background-image: var(--tex-light);
  background-size: 260px;
  background-blend-mode: multiply;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transition: opacity .35s ease;
  will-change: opacity;
}
.statement .word.is-sewn::after { opacity: 1; }
.statement .word.is-sewn { -webkit-text-stroke-color: transparent; transition: -webkit-text-stroke-color .35s ease; }
/* the word currently under the needle gets a running stitch */
.statement .word.is-needle::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.08em;
  border-bottom: 3px dashed var(--mustard);
}
.statement.is-static { height: auto; padding: 120px 0; }
.statement.is-static .statement__sticky { position: static; height: auto; }

/* ---------- service cards tilt and press ---------- */
.swatch { transition: transform .5s cubic-bezier(.2, .9, .3, 1.25), box-shadow .3s ease; will-change: transform; }
.swatch.is-hover {
  transition: transform .12s ease-out, box-shadow .3s ease;
  box-shadow: 0 2px 0 rgba(6, 26, 25, .35), 0 34px 50px -22px rgba(6, 26, 25, .85), 0 0 2px 1.5px rgba(239, 230, 221, .45);
  z-index: 2;
}
/* a soft dimple where the cursor presses into the felt */
.swatch::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(27, 42, 42, .1), transparent 38%);
  opacity: 0; transition: opacity .3s ease;
}
.swatch.is-hover::before { opacity: 1; }

/* ---------- magnetic buttons ---------- */
.magnetic { transition: translate .3s cubic-bezier(.3, 1.4, .5, 1); }

/* ---------- process rows ---------- */
.process { max-width: var(--max); margin: 0 auto; padding: clamp(40px, 6vw, 88px) var(--gutter); }
.steps { list-style: none; margin: 0; padding: 0; border-bottom: var(--stitch) rgba(242, 237, 228, .3); }
.steps li { border-top: var(--stitch) rgba(242, 237, 228, .3); }
.step summary {
  list-style: none;
  display: grid; grid-template-columns: 4.5rem 1fr auto; align-items: center; gap: 16px;
  padding: clamp(18px, 3vw, 30px) 0;
  cursor: pointer;
}
.step summary::-webkit-details-marker { display: none; }
.step__num { font-weight: 600; color: var(--mustard); font-variant-numeric: tabular-nums; }
.step__title {
  font-size: var(--step-2); font-weight: 800; font-stretch: 80%; line-height: 1;
  transition: translate .35s cubic-bezier(.3, 1.4, .5, 1), color .2s;
}
.step__arrow {
  position: relative; width: 56px; height: 56px; border-radius: 50%; flex: none;
  border: 2px dashed rgba(242, 237, 228, .5);
  transition: background-color .25s, border-color .25s, rotate .35s cubic-bezier(.3, 1.4, .5, 1);
}
.step__arrow::before, .step__arrow::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: var(--cream); border-radius: 2px;
  translate: -50% -50%;
}
.step__arrow::before { width: 18px; height: 3px; }
.step__arrow::after { width: 3px; height: 18px; transition: scale .3s; }
.step summary:hover .step__title { translate: 12px 0; color: var(--mustard); }
.step summary:hover .step__arrow, .step[open] .step__arrow {
  background-color: var(--tomato); border-color: var(--tomato);
  background-image: var(--tex-light); background-size: 200px; background-blend-mode: multiply;
}
.step[open] .step__arrow { rotate: 180deg; }
.step[open] .step__arrow::after { scale: 1 0; }
.step p {
  margin: 0 0 clamp(20px, 3vw, 30px) calc(4.5rem + 16px);
  color: var(--on-felt-soft); font-size: var(--step-1); line-height: 1.2; max-width: 40ch;
}
@media (max-width: 600px) {
  .step summary { grid-template-columns: 2.6rem 1fr auto; }
  .step p { margin-left: calc(2.6rem + 16px); }
  .step__arrow { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .statement { height: auto; padding: 120px 0; }
  .statement__sticky { position: static; height: auto; }
}

/* ---------- the seam ---------- */
.seam__thread, .seam__shadow, .seam__shine, .seam__holes { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.seam__shadow { stroke: rgba(6, 26, 25, .5); stroke-width: 4.6; stroke-dasharray: 11 8; transform: translateY(1.2px); }
.seam__thread { stroke: var(--mustard); stroke-width: 3.4; stroke-dasharray: 11 8; }
.seam__shine { stroke: rgba(255, 236, 190, .55); stroke-width: 1; stroke-dasharray: 11 8; transform: translateY(-.7px); }
/* needle holes between stitches */
.seam__holes { stroke: rgba(6, 26, 25, .45); stroke-width: 3; stroke-dasharray: 0 19; stroke-dashoffset: -14.5; }
.seam__needle { opacity: 0; transition: opacity .3s ease; }
.seam__needle-body { fill: #dfe3e5; stroke: #3b4a4b; stroke-width: 1; }
.seam__needle-eye { fill: #3b4a4b; }
@media (max-width: 700px) {
  .seam__thread { stroke-width: 2.6; stroke-dasharray: 9 7; }
  .seam__shadow { stroke-width: 3.6; stroke-dasharray: 9 7; }
  .seam__shine { stroke-dasharray: 9 7; }
  .seam__holes { stroke-dasharray: 0 16; stroke-dashoffset: -12.5; }
}

/* extra breathing room between sections, so the seam can sweep across slowly */
.work, .experience, .process, .about { padding-block: clamp(56px, 9vw, 140px); }

/* small line above the founder's name */
.about__copy .about__kicker { margin: 0 0 .4em; color: var(--mustard); font-weight: 650; font-size: var(--step--1); }
/* the seam fades in once the page has settled, then the needle starts sewing */
.seam { opacity: 0; transition: opacity .4s ease; }
.seam.is-ready { opacity: 1; }

/* a little more space between sections on phones, so the seam can cross without touching anything */
@media (max-width: 700px) {
  .work, .experience, .process, .about { padding-block: 88px; }
}
/* on phones the cards sit almost edge to edge, so keep their tilt very slight */
@media (max-width: 600px) {
  .swatch--a, .swatch--c { transform: rotate(-.4deg); }
  .swatch--b, .swatch--d { transform: rotate(.4deg); }
}
@media (max-width: 700px) { .contact { margin-top: 96px; } }

/* =========================================================
   The control panel in the hero
   Real felt parts (photographed) assembled on a felt box. Every
   control is placed on the box's top surface, scaled for perspective.
   ========================================================= */
.panel { position: relative; z-index: 1; }
/* with the lights out, the panel stays lit so you can always switch them back on */
.fx-lights main { z-index: auto; }
.fx-lights .hero { z-index: auto; }
.fx-lights .panel { z-index: 36; }
.panel__unit { position: relative; width: 100%; aspect-ratio: 1200 / 980; }
.panel__base {
  width: 100%; height: auto; filter: drop-shadow(0 22px 26px rgba(6, 26, 25, .55)); user-select: none;
  /* the cable trails off softly instead of stopping at the picture's edge */
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent 99%);
  mask-image: linear-gradient(to right, #000 85%, transparent 99%);
}
.panel__controls { position: absolute; inset: 0; }
.panel__controls > * { position: absolute; }
.panel img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.panel .sw--1 { left: 22.5%; top: 25.5%; width: 9.6%; }
.panel .sw--2 { left: 35.3%; top: 25.5%; width: 9.6%; }
.panel .sw--3 { left: 48.1%; top: 25.5%; width: 9.6%; }
.panel .sw--4 { left: 60.9%; top: 25.5%; width: 9.6%; }
.panel .dial--hue { left: 17.5%; top: 60%; width: 15%; }
.panel .dial--vol { left: 66.5%; top: 60%; width: 15%; }
.panel .panel__big { left: 42%; top: 62%; width: 27%; }
.panel .lamp--1 { left: 27.5%; top: 80%; width: 6.6%; }
.panel .lamp--2 { left: 37.0%; top: 80%; width: 6.6%; }
.panel .lamp--3 { left: 46.8%; top: 80%; width: 6.6%; }
.panel .lamp--4 { left: 56.4%; top: 80%; width: 6.6%; }

/* ---- switches: a stitched socket with a felt lever that flips ---- */
.sw {
  padding: 0; border: 0; background: none; cursor: pointer;
  transform: translate(-50%, -50%);
  perspective: 260px;
  -webkit-tap-highlight-color: transparent;
}
/* The lever pivots in the middle of the socket's hole and slides down into it;
   the arm is clipped along the hole's front inner edge so it sits snugly inside. */
.sw__arm {
  position: absolute; inset: 0; pointer-events: none;
  clip-path: polygon(-60% -400%, 160% -400%, 160% 48.65%, 70.0% 48.65%, 68.3% 56.4%, 66.6% 59.4%, 65.0% 61.5%, 63.3% 63.1%, 61.6% 64.4%, 59.9% 65.5%, 58.2% 66.3%, 56.5% 67.0%, 54.9% 67.5%, 53.2% 67.8%, 51.5% 68.0%, 49.8% 68.1%, 48.1% 68.0%, 46.4% 67.8%, 44.8% 67.5%, 43.1% 67.0%, 41.4% 66.3%, 39.7% 65.5%, 38.0% 64.4%, 36.3% 63.1%, 34.6% 61.5%, 33.0% 59.4%, 31.3% 56.4%, 29.6% 48.65%, -60% 48.65%);
}
.panel .sw__lever {
  position: absolute; left: 50%; bottom: 51.35%;
  width: 34%;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(-24deg) scaleY(.92) translateY(14%);
  transition: transform .22s cubic-bezier(.3, 1.6, .5, 1);
  filter: drop-shadow(0 3px 2px rgba(60, 40, 10, .35));
}
/* off leans left, on leans right, like a real toggle */
.panel .sw[aria-checked="true"] .sw__lever { transform: translateX(-50%) rotate(24deg) scaleY(.92) translateY(14%); }
.sw::before { content: ""; position: absolute; inset: -120% -40% -20%; }   /* a bigger, easier hit area */

/* ---- dials ---- */
.dial {
  transform: translate(-50%, -70%);
  cursor: grab; touch-action: none; border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}
.dial.is-turning { cursor: grabbing; }
.dial__knob { position: relative; filter: drop-shadow(0 4px 3px rgba(6, 26, 25, .35)); }
.dial__face {
  position: absolute; left: 50%; top: 31%; width: 100%; aspect-ratio: 1;
  transform: translate(-50%, -50%) scaleY(.64);
  overflow: visible; pointer-events: none;
}
.dial__pointer { stroke: var(--cream); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 7 5; }
/* stitched scale marks on the box around each dial */
.dial__ticks {
  position: absolute; left: 50%; top: 70%; width: 170%; aspect-ratio: 1;
  transform: translate(-50%, -50%) scaleY(.5);
  overflow: visible; pointer-events: none;
}
.dial__arc { fill: none; stroke: #b3a487; stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 2 7; }
.dial:focus-visible { outline: none; }
.dial:focus-visible .dial__knob { filter: drop-shadow(0 0 0 var(--mustard)) drop-shadow(0 0 3px var(--mustard)); }

/* ---- the big red button ---- */
.panel__big {
  padding: 0; border: 0; background: none; cursor: pointer;
  transform: translate(-50%, -72%);
  -webkit-tap-highlight-color: transparent;
}
.panel__big img {
  transform-origin: 50% 85%;
  transition: transform .12s cubic-bezier(.3, 1.6, .5, 1);
  filter: drop-shadow(0 6px 5px rgba(6, 26, 25, .35));
}
.panel__big:active img, .panel__big.is-down img { transform: translateY(4%) scale(1.03, .92); transition-duration: .06s; }

/* ---- lamps: dark felt when off, bright felt when on (no glow) ---- */
.lamp { transform: translate(-50%, -72%); pointer-events: none; }
.lamp img { filter: brightness(.42) saturate(.85); transition: filter .25s ease; }
.lamp.is-on img { filter: brightness(1.12) saturate(1.1); }

.panel :focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; border-radius: 8px; }
.panel__unit { container-type: inline-size; }
/* the message sits on the box's top surface, between the switches and the
   red button, tilted back so it shares the box's perspective (both ends lean in) */
.panel .press__hint {
  position: absolute; left: 12%; width: 60%; top: 31.5%; height: 6.5%;
  margin: 0; max-width: none; min-height: 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: "Quicksand", system-ui, sans-serif; font-weight: 1000;
  font-size: 3.1cqw; line-height: 1; letter-spacing: .01em; white-space: nowrap;
  pointer-events: none;
  color: var(--felt-deep);
  transform: perspective(70cqw) rotateX(15deg);
  transform-origin: 50% 100%;
}

/* the headline colour follows the left-hand dial */
/* the headline's felt: a fibre shade over a solid colour the left dial controls */
.hero__title {
  background-color: transparent;
  background-image: url("/assets/img/felt-shade.webp"), linear-gradient(var(--title-colour, var(--cream)), var(--title-colour, var(--cream)));
  background-size: 300px, 100% 100%;
  background-blend-mode: normal;
}
.statement .word::after {
  background-color: transparent;
  background-image: url("/assets/img/felt-shade.webp"), linear-gradient(var(--cream), var(--cream));
  background-size: 260px, 100% 100%;
  background-blend-mode: normal;
}

/* =========================================================
   What the four switches do
   ========================================================= */
/* 1. Lights out: the page goes dark and the cursor becomes a torch */
.torch {
  position: fixed; inset: 0; z-index: 35; pointer-events: none;
  background: radial-gradient(circle var(--tr, 210px) at var(--tx, 50%) var(--ty, 40%), rgba(4, 16, 16, 0) 0, rgba(4, 16, 16, 0) 55%, rgba(4, 16, 16, .93) 100%);
  opacity: 0; transition: opacity .5s ease;
}
.fx-lights .torch { opacity: 1; }

/* 2. Bunting: a string of felt flags drops in under the header */
.bunting {
  position: fixed; left: 0; right: 0; top: 78px; z-index: 19; height: 90px;
  pointer-events: none; overflow: visible;
  transform: translateY(calc(-100% - 160px)); transition: transform .7s cubic-bezier(.3, 1.4, .5, 1);
}
.fx-bunting .bunting { transform: translateY(0); }
.bunting__string { fill: none; stroke: var(--cream); stroke-width: 2; stroke-dasharray: 6 4; }
.bunting__flag { transform-box: fill-box; transform-origin: 50% 0; animation: flutter 2.6s ease-in-out infinite alternate; }
.bunting__flag:nth-child(3n) { animation-duration: 3.1s; }
.bunting__flag:nth-child(3n+1) { animation-delay: -1.2s; }
@keyframes flutter { from { rotate: -5deg; } to { rotate: 6deg; } }

/* 3. Wobble: everything goes a bit jelly */
.fx-wobble .swatch, .fx-wobble .patch, .fx-wobble .contact, .fx-wobble .sectors li,
.fx-wobble .step summary, .fx-wobble h2, .fx-wobble .hero__lede, .fx-wobble .top__cta {
  animation: jelly 1.1s ease-in-out infinite alternate;
}
.fx-wobble .swatch:nth-child(2n), .fx-wobble .sectors li:nth-child(2n), .fx-wobble h2 { animation-delay: -.55s; }
@keyframes jelly {
  0% { rotate: -1.6deg; scale: 1 1; }
  50% { scale: 1.015 .985; }
  100% { rotate: 1.6deg; scale: .99 1.01; }
}

/* 4. Felt swap: the whole board becomes a different felt */
body { transition: background-color .9s ease; }
.fx-felt { --felt: #5a2448; --felt-deep: #401832; --on-felt-soft: #e2c9d6; }

@media (prefers-reduced-motion: reduce) {
  .bunting__flag, .fx-wobble * { animation: none !important; }
}
.bunting { width: 100%; }

/* a compact footer on phones */
@media (max-width: 700px) {
  .contact { margin-bottom: 36px; }
  .foot { padding: 18px var(--gutter) 22px; gap: 8px; font-size: .88rem; }
  .foot p { gap: 14px; }
  .foot .sound-toggle { padding: 1px 10px; }
  .foot__secret { font-size: .78rem; }
}

/* ---------- the rollercoaster: the car rides the track as you scroll ---------- */
.coaster { position: relative; margin: 0; }
.coaster__track { width: 100%; height: auto; filter: drop-shadow(0 14px 18px rgba(6, 26, 25, .45)); }
.coaster__car {
  position: absolute; left: 0; top: 0;
  width: 10.8%; height: auto;
  transform-origin: 50% 100%;
  will-change: transform;
  pointer-events: none;
  filter: drop-shadow(0 3px 3px rgba(6, 26, 25, .4));
}
