/* Ribbitree — tokens from Brand Kit v1.1 */

/* Fallback font sized to match Outfit (measured: Outfit text runs 97% of Arial's width at
   regular weight, 95% at bold). While the web font loads, text set in this fallback takes up
   the same space, so nothing jumps when Outfit swaps in. */
@font-face {
  font-family: "Outfit Fallback"; src: local("Arial"), local("ArialMT");
  font-weight: 100 600; size-adjust: 97.3%; ascent-override: 102.8%; descent-override: 26.7%; line-gap-override: 0%;
}
@font-face {
  font-family: "Outfit Fallback"; src: local("Arial Bold"), local("Arial-BoldMT");
  font-weight: 700 900; size-adjust: 95%; ascent-override: 105.3%; descent-override: 27.4%; line-gap-override: 0%;
}
/* Bark ~60%, Cream ~35%, Ember ~5% (accent only: buttons, links, small marks). */
:root {
  --bark: #1E1614;
  --bark-2: #2A201D;   /* one tone step up, for panels on Bark */
  --bark-3: #382C28;
  --cream: #EDE5DA;
  --cream-2: #E0D6C8;  /* one tone step down, for panels on Cream */
  --cream-3: #D3C7B7;
  --ember: #E36A2E;
  --muted: #B9AD9F;    /* secondary text on Bark */
  --muted-dark: #5A4C46; /* secondary text on Cream */

  --bg: var(--bark);
  --ink: var(--cream);
  --panel: var(--bark-2);
  --soft: var(--muted);

  --font: "Outfit", "Outfit Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* five type steps */
  --t-hero: clamp(3.75rem, 15.4vw, 19rem);
  --t-display: clamp(2.5rem, 6.2vw, 6.5rem);
  --t-title: clamp(1.9rem, 4.6vw, 4.75rem);
  --t-statement: clamp(1.375rem, 2.3vw, 2.125rem);
  --t-body: 1.125rem;
  --t-small: 0.9375rem;

  --m: clamp(1rem, 2.2vw, 2rem);          /* page margin */
  --gap-section: clamp(4rem, 7vw, 7rem);
  --r: 28px;                               /* the one radius */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bark);
  color: var(--cream);
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; }
::selection { background: var(--ember); color: var(--bark); }
:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; }
a:not(.btn):focus-visible { border-radius: 4px; }
.field-cream :focus-visible { outline-color: var(--bark); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: fixed; left: var(--m); top: -100px; z-index: 100;
  background: var(--ember); color: var(--bark); padding: 0.75rem 1.25rem;
  border-radius: 999px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 0.75rem; }

.field-cream {
  --bg: var(--cream); --ink: var(--bark); --panel: var(--cream-2); --soft: var(--muted-dark);
  background: var(--cream); color: var(--bark);
}

/* ---------- type ---------- */
.display {
  font-size: var(--t-display);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.statement {
  font-size: var(--t-statement);
  line-height: 1.32;
  letter-spacing: -0.015em;
  font-weight: 500;
  max-width: 30ch;
}

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.5rem; padding: 0.75rem 1.9rem;
  background: var(--ember); color: var(--bark);
  font: inherit; font-weight: 700; font-size: 1.125rem; letter-spacing: -0.01em;
  text-decoration: none; border: 0; border-radius: 999px; cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), scale 0.2s var(--ease);
  will-change: transform;
}
.btn:hover { background: var(--cream); color: var(--bark); }
.btn:active { scale: 0.96; }
.btn--small { min-height: 2.75rem; padding: 0.5rem 1.25rem; font-size: 1rem; }
.btn--dark { background: var(--bark); color: var(--cream); }
.btn--dark:hover { background: var(--ember); color: var(--bark); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-weight: 700; text-decoration: none; padding: 0.5rem 0;
}
.link-arrow::after {
  content: ""; width: 0.7em; height: 0.7em; border-radius: 50%; background: var(--ember);
  transition: translate 0.3s var(--ease);
}
.link-arrow:hover::after { translate: 0.4rem 0; }

/* ---------- top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.875rem var(--m);
  background: var(--bark);
  transition: translate 0.45s var(--ease);
}
.bar.is-hidden { translate: 0 -100%; }
.bar__logo { display: block; flex: none; }
.bar__logo img { width: 9.5rem; height: auto; }
.bar__nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.25rem); }
.bar__nav a:not(.btn) {
  text-decoration: none; font-weight: 500; font-size: 1rem; padding: 0.6rem 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.35s var(--ease);
}
.bar__nav a:not(.btn):hover { background-size: 100% 2px; }
.bar__toggle {
  display: none; font: inherit; font-weight: 700; color: var(--cream);
  background: var(--bark-2); border: 0; border-radius: 999px;
  min-height: 2.75rem; padding: 0 1.25rem; cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  /* frog width: as big as the room under the headline allows for the part that shows on landing
     (about half the mark's width tall), capped at 38vw */
  --frog-w: max(13rem, min(38vw, calc((100svh - 26.5vw - 6.5rem) / 0.49)));
  --frog-hang: calc(var(--frog-w) * 0.3); /* how far the frog hangs below the first screen */
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column;
  padding: 5.25rem var(--m) var(--m);
  overflow-x: clip; overflow-y: visible;
}
/* the intro card comes straight after the hero and sits above the frog */
.hero + .intro { position: relative; z-index: 2; }
@media (min-width: 900px) {
  /* Where the frog meets the intro card it fades out softly over the last few rem, instead of
     being sliced off by a hard edge. The fade is on the image itself (not its box), so it moves
     with the frog when it hops in or follows the mouse, and the sides and top are never cut.
     --frog-edge = where the card begins, measured down the frog image. */
  .hero__frog img {
    --frog-edge: calc(100% - var(--frog-hang) + 1.25rem);
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(var(--frog-edge) - 5.5rem), transparent var(--frog-edge));
    mask-image: linear-gradient(to bottom, #000 calc(var(--frog-edge) - 5.5rem), transparent var(--frog-edge));
  }
}
.hero__title {
  font-size: var(--t-hero); font-weight: 800; line-height: 0.86; letter-spacing: -0.05em;
  position: relative; z-index: 2;
}
.line { display: block; }
.split-word, .hero__title .line__in > div { will-change: transform; }

/* "eyes open" reveal: two circles that grow from where a frog's eyes would be.
   --eye is driven from main.js; the class is only ever added by script. */
.eyes-mask {
  --eye: 0%;
  -webkit-mask-image:
    radial-gradient(circle at 33% 42%, #000 var(--eye), transparent calc(var(--eye) + 0.5px)),
    radial-gradient(circle at 67% 42%, #000 var(--eye), transparent calc(var(--eye) + 0.5px));
  mask-image:
    radial-gradient(circle at 33% 42%, #000 var(--eye), transparent calc(var(--eye) + 0.5px)),
    radial-gradient(circle at 67% 42%, #000 var(--eye), transparent calc(var(--eye) + 0.5px));
}
.line__in { display: block; }
.line--right { text-align: right; }
/* The frog sits low, cut by the bottom of the first screen around its mouth; its lower edge fades
   softly into the page just before the intro card (see the mask just above). */
.hero__frog {
  position: absolute; left: var(--m); bottom: calc(var(--frog-hang) * -1); width: var(--frog-w); z-index: 1;
}
.hero__frog img { width: 100%; will-change: transform; }
.hero__foot {
  margin-top: auto; margin-left: auto; position: relative; z-index: 2;
  display: flex; align-items: flex-end; justify-content: flex-end; gap: 2rem; padding-top: 2rem;
  max-width: calc(100% - var(--frog-w) - 2.5rem);
}
.hero__sub { font-size: 1.375rem; line-height: 1.38; max-width: 30ch; font-weight: 500; }
.hero__foot .btn { flex: none; }

/* ---------- intro ---------- */
.intro {
  display: grid; grid-template-columns: 7fr 5fr; gap: clamp(2rem, 5vw, 5rem);
  padding: var(--gap-section) var(--m);
  align-items: end;
}
.intro__text > * + * { margin-top: 1.75rem; }
.intro__text .display { margin-bottom: clamp(2rem, 5vw, 4.5rem); }
.intro__text p:not(.statement) { max-width: 48ch; color: var(--bark); }
.intro__media { border-radius: var(--r); overflow: hidden; aspect-ratio: 1; }
.intro__media img { width: 100%; height: 116%; object-fit: cover; }

/* ---------- services ---------- */
.services { padding: var(--gap-section) var(--m) clamp(3rem, 6vw, 6rem); }
.services .display { margin-bottom: clamp(1.75rem, 3.5vw, 3.25rem); }
.svc { display: grid; gap: 8px; }
.svc__row {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 3rem); align-items: start;
  padding: clamp(1.25rem, 2.2vw, 2rem);
  background: var(--bark-2); border-radius: var(--r);
  transition: background-color 0.45s var(--ease), color 0.45s var(--ease);
}
.svc__num {
  font-size: 1.25rem; font-weight: 700; color: var(--ember); padding-top: 0.6em;
  font-variant-numeric: tabular-nums; transition: color 0.45s var(--ease);
}
.svc__name {
  font-size: var(--t-title); font-weight: 800; line-height: 0.95; letter-spacing: -0.04em;
  transition: translate 0.55s var(--ease);
}
.svc__body p { margin-bottom: 1.25rem; }
.svc__body ul { display: grid; gap: 0.5rem; color: var(--muted); transition: color 0.45s var(--ease); }
.svc__body li { padding-left: 1.25rem; position: relative; }
.svc__body li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 0.45rem; height: 0.45rem;
  border-radius: 50%; background: var(--ember);
}
@media (hover: hover) {
  .svc__row:hover { background: var(--cream); color: var(--bark); }
  .svc__row:hover .svc__num { color: var(--bark); }
  .svc__row:hover .svc__name { translate: 0.75rem 0; }
  .svc__row:hover .svc__body ul { color: var(--muted-dark); }
}

/* ---------- marquee ---------- */
.marquee {
  overflow: hidden; padding: clamp(2rem, 5vw, 5rem) 0 var(--gap-section);
  cursor: grab; user-select: none; -webkit-user-select: none;
  touch-action: pan-y; /* sideways swipes drag the band, vertical ones still scroll the page */
}
.marquee.is-dragging { cursor: grabbing; }
.marquee__track span { display: inline-block; }
.marquee__track {
  white-space: nowrap; width: max-content;
  font-size: var(--t-display); font-weight: 800; letter-spacing: -0.045em; line-height: 1;
  color: #7A685F; padding-left: var(--m); will-change: transform;
}

/* ---------- work ---------- */
.work { padding: var(--gap-section) var(--m); }
.work__head {
  display: grid; grid-template-columns: 7fr 5fr; gap: clamp(2rem, 5vw, 5rem);
  align-items: end; margin-bottom: clamp(1.75rem, 3.5vw, 3.25rem);
}
.slots { display: grid; grid-template-columns: 7fr 5fr; grid-template-rows: 1fr 1fr; gap: 8px; }
.slot {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 0.35rem;
  min-height: clamp(9rem, 12vw, 11.5rem);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--cream-2); border-radius: var(--r);
  text-decoration: none; color: var(--bark);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.slot--big { grid-row: 1 / 3; }
.slot__title { font-size: var(--t-title); font-weight: 800; letter-spacing: -0.04em; line-height: 0.95; }
.slot__note { color: var(--muted-dark); max-width: 30ch; transition: color 0.4s var(--ease); }
.slot__mark {
  position: absolute; right: -6%; top: -8%; width: 62%; opacity: 0.09;
  transition: translate 0.7s var(--ease), opacity 0.4s var(--ease);
}
.slot:hover { background: var(--bark); color: var(--cream); }
.slot:hover .slot__note { color: var(--muted); }
.slot:hover .slot__mark { translate: 0 -4%; opacity: 0; }

/* ---------- process + work band ----------
   Two columns. Left: "How a project runs" stays in view (CSS sticky) and scrolling swaps its four
   steps, the same stage as before, just held to the side. Right: the project wall is a tall column
   that keeps scrolling past it, so the page never stops moving.
   Without the stage (phones, reduced motion, no script) the steps are simply stacked photo panels. */
.flow {
  /* the process stage keeps a steady width (about 480-768px, growing a little with the screen);
     the project wall takes whatever is left */
  display: grid; grid-template-columns: clamp(30rem, 52vw, 48rem) minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 2rem); align-items: start;
  padding: var(--gap-section) var(--m) clamp(1rem, 2vw, 2rem);
}
.process { --pt: clamp(2.25rem, 4.2vw, 4.5rem); --stage-h: min(76svh, 760px); }
.process__title { font-size: var(--pt); margin-bottom: clamp(1.25rem, 2.5vw, 2.25rem); }
.process__stage {
  position: relative; isolation: isolate; overflow: hidden;
  border-radius: clamp(28px, 3vw, 48px); background: var(--bark-2);
}
.steps { list-style: none; padding: 0; margin: 0; }
.step { position: relative; height: var(--stage-h); min-height: 26rem; overflow: hidden; }
.step__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  will-change: transform;
}
.step picture { display: contents; }
/* the temporary copy used when a step marker is clicked: two holes grow in it,
   from where a frog's eyes would be, until it is gone (--eye is driven from main.js) */
.step--ghost {
  --eye: 0%;
  pointer-events: none;
  -webkit-mask-image:
    radial-gradient(circle at 33% 42%, transparent var(--eye), #000 calc(var(--eye) + 0.5px)),
    radial-gradient(circle at 67% 42%, transparent var(--eye), #000 calc(var(--eye) + 0.5px));
  mask-image:
    radial-gradient(circle at 33% 42%, transparent var(--eye), #000 calc(var(--eye) + 0.5px)),
    radial-gradient(circle at 67% 42%, transparent var(--eye), #000 calc(var(--eye) + 0.5px));
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
/* the frog sits right of centre in the landscape photos: the word goes on the left half */
.step__stick {
  position: absolute; left: 0; right: 0; top: 50%; z-index: 2;
  translate: 0 -50%; text-align: left; padding: 0 50% 0 var(--m);
  overflow: hidden;
}
.step__verb {
  font-size: clamp(3.5rem, 7.4vw, 8.5rem); font-weight: 800; letter-spacing: -0.055em; line-height: 1;
  color: var(--cream); padding-bottom: 0.06em;
  margin-top: 0.14em; /* headroom inside the mask for the hop's overshoot */
}
.step__note {
  position: absolute; left: var(--m); bottom: var(--m); z-index: 3;
  max-width: min(24rem, calc(100% - 6rem)); padding: 1.25rem 1.5rem;
  background: var(--bark); border-radius: var(--r);
  color: var(--cream);
}
.step__note strong { display: block; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 0.35rem; }

/* step markers: a column of numbered dots down the right edge of the stage (stage mode only) */
.process__rail { display: none; position: absolute; inset: 0 clamp(1rem, 2vw, 1.75rem) 0 auto; z-index: 4; pointer-events: none; }
.rail {
  position: relative; height: 100%;
  display: flex; flex-direction: column; justify-content: center; gap: 3.25rem;
}
.rail__line {
  position: absolute; left: 50%; top: calc(50% - 8.4375rem); height: 16.875rem; width: 3px;
  translate: -50% 0; background: var(--bark-3); border-radius: 3px; overflow: hidden;
}
.rail__fill { display: block; width: 100%; height: 100%; background: var(--ember); transform-origin: top; transform: scaleY(0); }
.rail__dot {
  position: relative; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  padding: 0; border: 0; cursor: pointer; pointer-events: auto;
  background: var(--bark); color: var(--muted);
  font-family: inherit; font-size: 0.9375rem; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease), scale 0.4s var(--ease);
}
.rail__dot:hover { background: var(--cream); color: var(--bark); scale: 1.12; }
.rail__dot:active { scale: 0.94; }
.rail__dot.is-on { background: var(--ember); color: var(--bark); scale: 1.12; }
.rail__dot.is-on:hover { background: var(--cream); }

/* stage mode (wide screens with motion; main.js adds .is-stage): the title and stage hold still
   under the top bar while the wall scrolls; the four steps stack in one frame and swap */
.process.is-stage { align-self: stretch; } /* the column runs the full height of the band, so the sticky part has room to travel */
.process.is-stage .process__sticky { position: sticky; top: 5.5rem; }
.process.is-stage {
  /* the stage fills what is left of the screen under the bar and the two-line title */
  /* capped at 44rem so on tall monitors it keeps roughly the same shape instead of growing taller */
  --stage-h: clamp(22rem, calc(100svh - 5.5rem - 1.25rem - 1.84 * var(--pt) - clamp(1.25rem, 2.5vw, 2.25rem)), 44rem);
}
.process.is-stage .steps { position: relative; height: var(--stage-h); overflow: hidden; }
.process.is-stage .step { position: absolute; inset: 0; height: auto; min-height: 0; }
.process.is-stage .process__rail { display: block; }

/* stage mode: every photo is framed so its frog sits centred across, a third of the way down,
   with the step word centred just below it and the note under that. The frog's place in each
   photo is given on its <li> (--fx/--fy, 0-1 across/down; --fm = whichever side of the frog is
   narrower). The photo is made just wide enough that the frog can sit at the centre with picture
   on both sides, then slid so it does; cq units are the stage's own width and height. */
.process.is-stage .steps { container-type: size; }
.process.is-stage .step__img {
  /* wide enough to: fill the height, centre the frog across, and leave photo below it when it sits a third of the way down */
  --w: max(178cqh, calc(100cqw / (2 * var(--fm, 0.5))), calc(178cqh * 0.67 / (1 - var(--fy, 0.5))));
  inset: auto; width: var(--w); height: auto; max-width: none; object-fit: fill;
  left: calc(50cqw - var(--fx, 0.5) * var(--w));
  top: clamp(calc(100cqh - var(--w) / 1.7778), calc(33cqh - var(--fy, 0.5) * var(--w) / 1.7778), 0px);
}
.process.is-stage .step__stick {
  top: 45%; translate: none; text-align: center; padding: 0 var(--m);
}
.process.is-stage .step__verb { font-size: clamp(3rem, 6vw, 7rem); }
.process.is-stage .step__note {
  left: 50%; translate: -50% 0; bottom: clamp(0.75rem, 1.5vw, 1.25rem);
  width: max-content; max-width: min(32rem, calc(100% - 8rem));
  padding: 0.85rem 1.25rem; text-align: center; font-size: 0.975rem;
}
.process.is-stage .step__note strong { display: inline; font-size: 1.05rem; margin: 0 0.25rem 0 0; }

/* the wall: a tall column of open slots that scrolls past the stage */
.flow .work.field-cream { margin: 0; padding: clamp(1.5rem, 2.6vw, 2.75rem); }
.flow .work__head { display: block; margin-bottom: clamp(1.25rem, 2vw, 2rem); }
.flow .work__head .display { font-size: clamp(2.25rem, 4.2vw, 4.5rem); }
.flow .work__head .statement { margin-top: 0.75rem; font-size: clamp(1rem, 1.3vw, 1.25rem); }
.flow .slots { grid-template-columns: 1fr; grid-template-rows: none; gap: 10px; }
.flow .slot { min-height: clamp(18rem, 56svh, 34rem); padding: clamp(1.25rem, 2vw, 2rem); }
.flow .slot--big { grid-row: auto; min-height: clamp(22rem, 72svh, 44rem); }
.flow .slot__title { font-size: clamp(1.75rem, 2.8vw, 3rem); }
.flow .slot__mark { width: 52%; right: -4%; top: -6%; }

/* ---------- faq ---------- */
.faq {
  display: grid; grid-template-columns: 4fr 8fr; gap: clamp(2rem, 5vw, 5rem);
  padding: var(--gap-section) var(--m); align-items: start;
}
.faq__title { position: sticky; top: 6.5rem; }
.faq__list { display: grid; gap: 8px; }
/* the side inset lives on the tile itself, so the question and answer both sit inside it */
.qa {
  background: var(--bark-2); border-radius: var(--r); padding: 0 1.5rem; padding: 0 clamp(1.25rem, 2.5vw, 2rem);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.qa summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: 4.75rem; padding: 1rem 0;
  font-size: 1.375rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.32;
  border-radius: var(--r);
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; flex: none; width: 1.1rem; height: 1.1rem;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 3px no-repeat,
    linear-gradient(currentColor, currentColor) center / 3px 100% no-repeat;
  transition: rotate 0.4s var(--ease);
}
.qa[open] summary::after { rotate: 45deg; }
.qa p { padding: 0 0 1.75rem; max-width: 58ch; }
.qa[open] { background: var(--cream); color: var(--bark); }
@media (hover: hover) { .qa:not([open]):hover { background: var(--bark-3); } }

/* ---------- quote ---------- */
.quote {
  display: grid; grid-template-columns: 5fr 7fr; gap: clamp(2rem, 5vw, 5rem);
  padding: var(--gap-section) var(--m); align-items: start;
}
.quote__head { position: sticky; top: 6.5rem; }
.quote__head .statement { margin-top: clamp(1.5rem, 3vw, 2.75rem); min-height: 5em; }
.form { display: grid; gap: 2rem; }
.form legend, .field label { font-weight: 700; font-size: 1.125rem; margin-bottom: 0.75rem; display: block; padding: 0; }
.opt { font-weight: 400; color: var(--muted-dark); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 3.25rem; padding: 0 1.4rem;
  background: var(--cream-2); border-radius: 999px; font-weight: 500;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), scale 0.2s var(--ease);
}
.chip:hover span { background: var(--cream-3); }
.chip input:checked + span { background: var(--bark); color: var(--cream); }
.chip input:active + span { scale: 0.96; }
.chip input:focus-visible + span { outline: 3px solid var(--bark); outline-offset: 3px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; color: var(--bark);
  background: var(--cream-2); border: 2px solid transparent; border-radius: 16px;
  padding: 0.95rem 1.1rem; min-height: 3.5rem;
  transition: background-color 0.2s, border-color 0.2s;
}
.field textarea { resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { background: var(--cream-3); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none; border-color: var(--bark); background: #F6F1E9;
}
.field [aria-invalid="true"] { border-color: #9B2C10; }
.field__error { color: #9B2C10; font-weight: 500; font-size: var(--t-small); margin-top: 0.4rem; }
.hp { position: absolute; left: -9999px; }
.form__end { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.form__status { font-weight: 500; max-width: 34ch; }
.form__status.is-error { color: #9B2C10; }

/* ---------- service pages ---------- */
.page-hero {
  min-height: 64svh; display: flex; flex-direction: column;
  padding: 6.5rem var(--m) var(--m);
}
.crumbs {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: clamp(2.5rem, 7vh, 5rem);
  font-size: var(--t-small); font-weight: 500; color: var(--muted);
}
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; }
.crumbs a { color: var(--cream); text-decoration: none; padding: 0.35rem 0; display: inline-block; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.page-hero__title {
  font-size: clamp(3.25rem, 10.4vw, 11rem); font-weight: 800; line-height: 0.9; letter-spacing: -0.05em;
}
.page-hero__foot {
  margin-top: auto; padding-top: clamp(1.75rem, 3.5vw, 3.25rem);
  display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem;
}
.page-hero__foot .statement { max-width: 34ch; }
.page-hero__foot .btn { flex: none; }

.included { padding: var(--gap-section) var(--m); }
.included .display { margin-bottom: clamp(1.75rem, 3.5vw, 3.25rem); }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tiles--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile {
  background: var(--panel); border-radius: var(--r);
  padding: clamp(1.5rem, 2.4vw, 2.25rem);
  display: flex; flex-direction: column; gap: 0.75rem;
}
.tile h3 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; }
.tiles--three .tile h3 { font-size: var(--t-title); line-height: 0.95; letter-spacing: -0.04em; margin-bottom: 0.25rem; }
.tile__lead { font-weight: 700; font-size: 1.1875rem; line-height: 1.35; }
.tile a, .split__text p a, .bullets a { text-decoration-thickness: 2px; text-underline-offset: 3px; }

.split {
  display: grid; grid-template-columns: 7fr 5fr; gap: clamp(2rem, 5vw, 5rem);
  padding: var(--gap-section) var(--m); align-items: center;
}
.split--flip { grid-template-columns: 7fr 5fr; }
.split__text > * + * { margin-top: 1.5rem; }
.split__text .display { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.split__text p:not(.statement) { max-width: 52ch; }
.split__media { border-radius: var(--r); overflow: hidden; aspect-ratio: 1; }
.split__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }

.bullets { display: grid; gap: 0.9rem; max-width: 56ch; }
.bullets li { position: relative; padding-left: 1.5rem; }
.bullets li::before {
  content: ""; position: absolute; left: 0; top: 0.6em; width: 0.55rem; height: 0.55rem;
  border-radius: 50%; background: var(--ember);
}

.howto { padding: var(--gap-section) var(--m); }
.steps-mini {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px;
  margin: clamp(1.75rem, 3.5vw, 3.25rem) 0 2rem;
}
.steps-mini li {
  background: var(--bark-2); border-radius: var(--r);
  padding: clamp(1.5rem, 2.4vw, 2.25rem); display: flex; flex-direction: column; gap: 0.75rem;
}
.steps-mini h3 { font-size: clamp(2rem, 3.4vw, 3.25rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1; }

/* the FAQ on a cream field: tiles one step darker, the open one turns Bark */
.field-cream .qa { background: var(--cream-2); }
.field-cream .qa[open] { background: var(--bark); color: var(--cream); }
@media (hover: hover) { .field-cream .qa:not([open]):hover { background: var(--cream-3); } }

.cta-band {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  padding: var(--gap-section) var(--m);
}
.related { display: flex; flex-wrap: wrap; gap: 0.25rem 2rem; margin-top: 1.75rem; }

/* about page: people and facts */
.people { padding: var(--gap-section) var(--m); }
.people .display { margin-bottom: clamp(1.75rem, 3.5vw, 3.25rem); }
.people__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.person { background: var(--panel); border-radius: var(--r); padding: clamp(1.25rem, 2vw, 1.75rem); display: flex; flex-direction: column; gap: 0.4rem; }
.person__photo {
  position: relative; aspect-ratio: 1; border-radius: calc(var(--r) - 8px); overflow: hidden;
  background: var(--cream-3); display: grid; place-items: center; margin-bottom: 1rem;
}
.person__photo img { width: 58%; opacity: 0.16; }
.person__ph { position: absolute; bottom: 1rem; left: 1rem; font-size: var(--t-small); font-weight: 500; color: var(--muted-dark); }
.person__name { font-size: clamp(1.75rem, 2.6vw, 2.5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.person__role { font-weight: 700; color: var(--muted-dark); }
.person__bio { margin-top: 0.5rem; }

.facts { padding: var(--gap-section) var(--m); display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.75rem, 3.5vw, 3.25rem); }
.facts__list { max-width: 64rem; }
.facts__list { display: grid; gap: 8px; margin: 0; }
.facts__list > div {
  display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 1.5rem;
  background: var(--panel); border-radius: var(--r); padding: 1.25rem clamp(1.25rem, 2.5vw, 2rem);
}
.facts__list dt { color: var(--soft); font-weight: 500; }
.facts__list dd { margin: 0; font-weight: 700; font-size: 1.1875rem; }
.facts__list a { text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* home services list: link out to each service page */
.svc__body .link-arrow { margin-top: 1.25rem; }

/* ---------- footer ---------- */
.foot { padding: var(--gap-section) var(--m) var(--m); overflow: hidden; }
@media (min-width: 900px) and (max-width: 1199px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.foot__mark { width: 100%; }
.foot__cols {
  display: grid; grid-template-columns: 6fr 3fr 3fr; gap: 2rem;
  margin-top: clamp(1.75rem, 3.5vw, 3.25rem);
}
.foot__blurb { font-size: var(--t-statement); font-weight: 500; line-height: 1.32; letter-spacing: -0.015em; }
.foot__links { display: grid; gap: 0.6rem; align-content: start; color: var(--muted); }
.foot__links a { color: var(--cream); text-decoration: none; padding: 0.2rem 0; display: inline-block;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat; transition: background-size 0.35s var(--ease); }
.foot__links a:hover { background-size: 100% 2px; }
.foot__legal { margin-top: clamp(1.75rem, 3.5vw, 3.25rem); color: var(--muted); font-size: var(--t-small); }

/* ---------- responsive ---------- */
@media (max-width: 899px) {
  .bar__toggle { display: inline-flex; align-items: center; }
  .bar__nav {
    /* the bar is transformed, so it is this panel's containing block: size it explicitly */
    position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; z-index: -1;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 0.5rem;
    padding: 5rem var(--m) 2rem; background: var(--bark);
    visibility: hidden; opacity: 0; transition: opacity 0.3s var(--ease), visibility 0.3s;
  }
  .bar__nav.is-open { visibility: visible; opacity: 1; }
  .bar__nav a:not(.btn) { font-size: 2.75rem; font-weight: 800; letter-spacing: -0.04em; padding: 0.35rem 0; }
  .bar__nav .btn { margin-top: 1.5rem; min-height: 3.5rem; font-size: 1.125rem; padding: 0.75rem 1.9rem; }

  .hero { padding-top: 5.5rem; }
  .hero__title { font-size: 17.5vw; line-height: 0.9; margin-top: 6svh; }
  .line--right { text-align: left; }
  .hero__frog { position: relative; left: auto; bottom: auto; align-self: flex-end; width: min(64vw, 30svh); margin: 3svh 0 0; }
  .hero__foot { flex-direction: column; align-items: stretch; gap: 1.25rem; width: 100%; max-width: none; padding-top: 2.5rem; }
  .hero__sub { font-size: 1.125rem; max-width: 24ch; }
  .hero__foot .btn { width: 100%; }

  .intro, .work__head, .faq, .quote, .foot__cols { grid-template-columns: 1fr; }
  .split, .split--flip, .tiles, .tiles--three, .steps-mini, .people__list, .facts { grid-template-columns: 1fr; }
  .facts__list > div { grid-template-columns: 1fr; gap: 0.25rem; }
  .page-hero { min-height: 0; padding-top: 5.5rem; }
  .page-hero__title { font-size: 12.5vw; }
  .page-hero__foot { flex-direction: column; align-items: stretch; }
  .page-hero__foot .btn, .cta-band .btn { width: 100%; }
  .split__media { aspect-ratio: 4 / 5; }
  .faq__title, .quote__head { position: static; }
  .svc__row { grid-template-columns: 1fr; gap: 0.75rem; }
  .svc__num { padding-top: 0; }
  .slots { grid-template-columns: 1fr; grid-template-rows: none; }
  .slot--big { grid-row: auto; min-height: 16rem; }
  .form__row { grid-template-columns: 1fr; }
  .quote__head .statement { min-height: 0; }
  .foot__cols { gap: 2rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---------- cream sections as cards ----------
   The page itself is always Bark. Cream sections are not full-width bands; they sit on
   the dark page as large rounded cards, inset from the edges, so the whole site reads as
   one continuous surface with cream panels placed on it. Kept last so it wins over each
   section's own padding. */
.field-cream {
  margin: clamp(0.75rem, 1.6vw, 1.5rem) var(--m);
  border-radius: clamp(28px, 3vw, 48px);
  padding: clamp(3rem, 5.5vw, 5.5rem) clamp(1.25rem, 4vw, 4.5rem);
}
@media (max-width: 899px) {
  .field-cream { margin: 0.75rem 0.5rem; padding: 3.5rem 1.25rem; }
}
/* headings inside a card have a little less room, so they step down one notch to stay on two lines */
.field-cream .display { font-size: clamp(2.5rem, 5.6vw, 5.75rem); }

/* ---------- tighter services list and quote form ---------- */
/* services: slimmer rows, smaller service names, two-column bullet lists */
.svc__row {
  grid-template-columns: 3.25rem minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(0.75rem, 2vw, 2rem);
  padding: 1.25rem 1.5rem;
  padding: clamp(1rem, 1.6vw, 1.5rem) clamp(1.25rem, 2vw, 1.75rem);
}
.svc__num { padding-top: 0.35em; }
.svc__name { font-size: clamp(1.75rem, 3vw, 3rem); }
.svc__body p { margin-bottom: 0.75rem; }
.svc__body ul { grid-template-columns: 1fr 1fr; gap: 0.3rem 1.5rem; font-size: 1rem; }
.svc__body .link-arrow { margin-top: 0.5rem; }

/* quote: smaller gaps, chips and fields */
.quote__head .statement { min-height: 0; margin-top: clamp(1rem, 2vw, 1.75rem); }
.form { gap: 1.25rem; }
.form legend, .field label { font-size: 1rem; margin-bottom: 0.5rem; }
.chip span { min-height: 2.75rem; padding: 0 1.1rem; }
.field input, .field select, .field textarea { padding: 0.65rem 1rem; min-height: 3rem; }
.form__row { gap: 1rem; }


@media (max-width: 899px) {
  .svc__row { grid-template-columns: 1fr; }
  .svc__body ul { grid-template-columns: 1fr; }
}

/* footer fills the whole screen, so at the bottom of the page the RIBBITREE wordmark sits at
   the top of the view and none of the sections above show; the spare height goes above the
   copyright line, so the footer's own layout is unchanged */
.foot { min-height: 100svh; display: flex; flex-direction: column; }
.foot__legal { margin-top: auto; padding-top: clamp(1.75rem, 3.5vw, 3.25rem); }

/* ---------- privacy page, form note, legal link ---------- */
.page-hero--short { min-height: 52svh; }
.legal__body { max-width: 46rem; }
.legal__body h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin: 2.5rem 0 0.75rem; }
.legal__body h2:first-child { margin-top: 0; }
.legal__body p + p { margin-top: 0.9rem; }
.legal__body .bullets { margin: 0.9rem 0; }
.legal__body a, .form__note a, .foot__legal a { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.foot__legal a { color: inherit; padding: 0.4rem 0; display: inline-block; }
.form__note { font-size: var(--t-small); color: var(--muted-dark); flex-basis: 100%; }

/* ---------- UI/UX polish ---------- */
/* keyboard focus is never hidden: a header that slid away comes back while focus is inside it,
   and in-page jumps and Tab scrolling leave room above the target for the fixed header */
.bar.is-hidden:focus-within { translate: 0 0; }
html { scroll-padding-top: 6rem; }

/* ---------- floating quote button ---------- */
/* shown by main.js whenever the header's quote button is out of sight (see .is-shown) */
.float-cta {
  position: fixed; z-index: 40;
  right: var(--m); bottom: calc(var(--m) + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); /* it genuinely floats over the page */
  visibility: hidden; opacity: 0; translate: 0 140%;
  transition: translate 0.45s var(--ease), opacity 0.3s var(--ease), visibility 0s linear 0.45s,
              background-color 0.25s var(--ease), color 0.25s var(--ease), scale 0.2s var(--ease);
}
.float-cta.is-shown {
  visibility: visible; opacity: 1; translate: 0 0;
  transition: translate 0.45s var(--ease), opacity 0.3s var(--ease), visibility 0s,
              background-color 0.25s var(--ease), color 0.25s var(--ease), scale 0.2s var(--ease);
}

/* ---------- premium browser surfaces ----------
   The parts the browser draws by default (scrollbar, caret, select arrow, tap flash,
   link underlines, line breaks) are themed from the palette so nothing looks stock. */
html { scrollbar-color: var(--bark-3) var(--bark); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bark); }
::-webkit-scrollbar-thumb { background: var(--bark-3); border-radius: 999px; border: 2px solid var(--bark); }
::-webkit-scrollbar-thumb:hover { background: #4a3b36; }
html { -webkit-tap-highlight-color: transparent; accent-color: var(--ember); }
input, textarea { caret-color: var(--ember); }
a:not(.btn) { text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
/* no lonely last words in running text; headings already balance */
p, li, dd, summary { text-wrap: pretty; }
/* the budget dropdown: a drawn chevron in the brand ink instead of the system arrow */
.field select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%231E1614' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1.1rem center; background-size: 14px 9px;
}

/* ---------- process + work band on phones and narrow tablets ----------
   One column that simply scrolls: the four steps as stacked photo panels (the portrait
   photographs), then the wall. Nothing holds the scroll. */
@media (max-width: 899px) {
  .flow { grid-template-columns: minmax(0, 1fr); padding-top: var(--gap-section); } /* minmax(0,…): the swipe row must not widen the page */
  .process__title { font-size: clamp(2.5rem, 11vw, 3.75rem); }
  /* one step at a time: the four steps sit side by side in a row that shows exactly one, and a
     swipe (or a tap on the dots below) moves to the next. Each card is the photo with its number
     and word on it, the words underneath. */
  .process__stage {
    display: flex; flex-direction: column; gap: 1rem;
    background: none; border-radius: 0; overflow: visible;
  }
  .steps {
    order: 1; position: relative; display: flex; gap: 0; counter-reset: step; min-width: 0;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .steps::-webkit-scrollbar { display: none; }
  .step {
    flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always;
    display: grid; align-content: start; height: auto; min-height: 0; overflow: visible; counter-increment: step;
  }
  /* the 01-04 buttons: one pill-shaped bar above the photo, with an ember highlight that slides
     along under the numbers as you swipe (main.js sets --pos from the swipe, 0 to 3) */
  .process__rail {
    display: block; order: 0; position: static; inset: auto; touch-action: pan-y;
    padding: 0.3rem; border-radius: 999px; background: var(--bark-2);
  }
  .rail {
    --pos: 0;
    height: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  }
  .rail::before {
    content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 25%;
    border-radius: 999px; background: var(--ember);
    transform: translateX(calc(var(--pos) * 100%));
    box-shadow: 0 2px 6px rgb(0 0 0 / 0.3);
  }
  .rail__line { display: none; }
  .rail__dot, .rail__dot.is-on {
    position: relative; z-index: 1; width: auto; height: 3rem; border-radius: 999px;
    background: transparent; color: var(--muted); scale: 1;
    font-size: 1.0625rem; letter-spacing: 0.02em;
  }
  .rail__dot:hover, .rail__dot.is-on:hover { background: transparent; scale: 1; }
  .rail__dot[aria-current] { color: var(--bark); }
  .step picture {
    display: block; grid-area: 1 / 1; position: relative; overflow: hidden;
    aspect-ratio: 4 / 5; border-radius: clamp(24px, 6vw, 32px); background: var(--bark-2);
  }
  .step picture::after {
    content: ""; position: absolute; inset: 50% 0 0; pointer-events: none;
    background: linear-gradient(to top, rgb(30 22 20 / 0.75), rgb(30 22 20 / 0));
  }
  .step__img { object-position: 50% 15%; }
  .step__stick {
    grid-area: 1 / 1; align-self: end; position: relative; top: auto; translate: none;
    text-align: left; padding: 0 1.1rem 0.5rem;
  }
  .step__stick::before {
    content: "0" counter(step); display: inline-grid; place-items: center;
    width: 2.25rem; height: 2.25rem; border-radius: 50%; margin-bottom: 0.25rem;
    background: var(--ember); color: var(--bark); font-size: 0.875rem; font-weight: 700;
  }
  .step__verb { font-size: clamp(2.75rem, 13.5vw, 4.25rem); margin-top: 0; }
  .step__note {
    position: static; max-width: none; padding: 1rem 0.25rem 0;
    background: none; border-radius: 0; color: var(--muted);
  }
  .step__note strong { color: var(--cream); font-size: 1.25rem; }
  .flow .work { margin-top: 0.75rem; }
  .flow .slot { min-height: 10rem; }
  .flow .slot--big { min-height: 13rem; }
  .flow .work__head .display { font-size: clamp(2.5rem, 11vw, 3.75rem); }
}
@media (max-width: 899px) and (prefers-reduced-motion: reduce) {
  .process__rail { display: none; } /* the dots are driven by the motion script; swiping still works */
}
