/* Built by build/build.js from build/css/. Edit those files, not this one. */

/* ===== bar.css: library: sections/sticky-call-bar-2 ===== */
/* Sticky call bar 2: a header and a bottom bar that react to what the visitor is doing. No script.

   The header (.cb-head): at the top of the page it shows the name, a line under it (licence, area) and the phone
   number. Once the page is scrolled and it is stuck to the top, it gets shorter, drops the line and keeps the
   number.

   The bottom bar (.cb-foot), phones only: Call, and a second action. While the visitor scrolls down to read, it
   slims to the Call button alone. The moment they scroll back up, or reach the bottom, both buttons are back.
   The phone number is never off the screen.

   Both parts are the browser asking itself "am I stuck?" and "which way did the page last move?". A browser
   that cannot ask shows the header and the bar at full size, always: the same as the first sticky call bar.

   Use either part alone. Set on :root to fit the site:
     --cb-bg, --cb-ink      the header's background and text
     --cb-call, --cb-call-ink   the Call buttons
     --cb-h, --cb-h-stuck   the header's height at the top of the page, and when stuck (4.6rem, 3.2rem) */
:root {
  --cb-bg: #fffdf8;
  --cb-ink: #1f1a17;
  --cb-call: #17603a;
  --cb-call-ink: #fff;
  --cb-h: 4.6rem;
  --cb-h-stuck: 3.2rem;
}

/* The page is the thing that scrolls, so it is the thing the bottom bar asks about. */
html { container-type: scroll-state; container-name: cb-page; }

/* ---- The header ---- */
.cb-head {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--cb-h);           /* the room it takes in the page never changes, so nothing below it jumps */
  container-type: scroll-state;
  container-name: cb-head;
  pointer-events: none;          /* the part it gives up when stuck must not swallow taps */
}
.cb-head-in {                    /* the bar that is seen: this is what gets shorter */
  position: absolute;
  inset: 0 0 auto 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 clamp(1rem, 4vw, 2rem);
  background: var(--cb-bg);
  color: var(--cb-ink);
  border-bottom: 1px solid rgba(0, 0, 0, .1);
  pointer-events: auto;
  overflow: hidden;
  transition: height .25s ease, box-shadow .25s ease;
}
.cb-who { display: grid; min-width: 0; }
.cb-name { font-weight: 800; font-size: 1.1rem; line-height: 1.2; color: inherit; text-decoration: none; letter-spacing: -.01em; transition: font-size .25s ease; }
.cb-extra { font-size: .8rem; line-height: 1.3; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-height: 1.3em; transition: opacity .2s ease, max-height .25s ease; }
.cb-phone {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2.6rem;
  padding: 0 1rem;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  background: var(--cb-call);
  color: var(--cb-call-ink);
}
.cb-phone:focus-visible, .cb-name:focus-visible, .cb-foot :focus-visible { outline: 3px solid var(--cb-call); outline-offset: 3px; box-shadow: 0 0 0 6px #fff; }

@container cb-head scroll-state(stuck: top) {
  .cb-head-in { height: var(--cb-h-stuck); box-shadow: 0 4px 14px rgba(0, 0, 0, .16); }
  .cb-name { font-size: .98rem; }
  .cb-extra { opacity: 0; max-height: 0; }
}

/* ---- The bottom bar: phones only ---- */
.cb-foot {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  display: none;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgb(20 20 20 / .97);
  box-shadow: 0 -6px 18px rgb(0 0 0 / .18);
  transition: padding .22s ease, background-color .22s ease, box-shadow .22s ease;
}
@media (max-width: 760px) { .cb-foot { display: flex; } }
.cb-foot :is(a, button) {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 50px;
  padding: 0 .9rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 600 1rem/1 system-ui, sans-serif;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: min-height .22s ease, flex-grow .22s ease, opacity .18s ease, padding .22s ease, border-width .22s ease;
}
.cb-foot .cb-call { background: var(--cb-call); color: var(--cb-call-ink); }
.cb-foot .cb-second { background: transparent; border-color: #eee; color: #eee; overflow: hidden; }

/* Scrolling down to read, with more page still to come: slim to the Call button alone. */
@container cb-page scroll-state((scrolled: block-end) and (scrollable: block-end)) {
  .cb-foot { padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); background: rgb(20 20 20 / .82); box-shadow: none; }
  .cb-foot :is(a, button) { min-height: 40px; }
  .cb-foot .cb-second { flex-grow: 0; flex-basis: 0; padding: 0; border-width: 0; opacity: 0; visibility: hidden; transition: min-height .22s ease, flex-grow .22s ease, opacity .18s ease, padding .22s ease, border-width .22s ease, visibility 0s .22s; }
  .cb-foot { gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cb-head-in, .cb-name, .cb-extra, .cb-foot, .cb-foot :is(a, button) { transition: none; }
}
@media print { .cb-foot { display: none; } .cb-head { position: static; } }


/* ===== drawer.css: library: sections/quote-drawer ===== */
/* Quote drawer: the quote form rises from the bottom of the phone screen, over the page the visitor was
   reading, and goes back down when they tap outside it, press Escape or press Close. No script.

   It is the browser's own "popover": a button with popovertarget="quote" opens the element with id="quote".
   The rise and fall are the browser's own too (it can now animate a thing arriving and leaving).

   On a wide screen it is a card in the bottom right corner instead of a sheet.
   A browser with no popovers shows the form as an ordinary section of the page, where it sits in the markup.

   Set on :root to fit the site:
     --qd-bg, --qd-ink     the drawer's background and text
     --qd-accent           the handle and the focus ring
     --qd-time             how long it takes to rise (.32s) */
:root { --qd-bg: #fffdf8; --qd-ink: #1f1a17; --qd-accent: #f2b233; --qd-time: .32s; }

.qd {
  position: fixed;
  inset: auto 0 0 0;
  margin: 0;
  width: 100%;
  max-width: none;
  max-height: 88vh;
  max-height: min(88dvh, 46rem);
  padding: 1.6rem clamp(1rem, 5vw, 1.6rem) calc(1.4rem + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 20px 20px 0 0;
  background: var(--qd-bg);
  color: var(--qd-ink);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .3);
  overflow: auto;
  overscroll-behavior: contain;          /* scrolling to the end of the form does not start scrolling the page */
}
.qd::before {                            /* the little handle that says "this is a sheet" */
  content: "";
  position: absolute;
  top: .6rem;
  left: 50%;
  width: 2.6rem;
  height: .28rem;
  margin-left: -1.3rem;
  border-radius: 99px;
  background: currentColor;
  opacity: .22;
}
.qd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin: 0 0 .8rem; }
.qd-title { margin: 0; font-size: 1.4rem; line-height: 1.15; }
.qd-close {
  flex: none;
  min-width: 2.8rem;
  min-height: 2.8rem;
  padding: 0 .9rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
  opacity: .8;
}
.qd-close:hover { opacity: 1; }
.qd :focus-visible { outline: 3px solid var(--qd-accent); outline-offset: 2px; }
.qd-next { margin: 1.1rem 0 0; padding: .9rem 0 0 1.2rem; border-top: 1px solid rgba(0, 0, 0, .12); font-size: .9rem; line-height: 1.5; }
.qd-next li + li { margin-top: .2rem; }
.qd-alt { display: none; }               /* a plain link to the form, for browsers with no popovers */

/* ---- Rising and falling ---- */
.qd::backdrop { background: rgb(0 0 0 / 0); }
@supports selector(:popover-open) {
  .qd:popover-open::backdrop { background: rgb(0 0 0 / .45); }
  @media (prefers-reduced-motion: no-preference) {
    .qd {
      translate: 0 100%;
      transition: translate var(--qd-time) cubic-bezier(.2, .9, .25, 1), overlay var(--qd-time) allow-discrete, display var(--qd-time) allow-discrete;
    }
    .qd:popover-open { translate: 0 0; }
    @starting-style { .qd:popover-open { translate: 0 100%; } }
    .qd::backdrop { transition: background-color var(--qd-time) ease, overlay var(--qd-time) allow-discrete, display var(--qd-time) allow-discrete; }
    @starting-style { .qd:popover-open::backdrop { background: rgb(0 0 0 / 0); } }
  }
}

/* ---- A wide screen: a card in the corner ---- */
@media (min-width: 48rem) {
  .qd {
    inset: auto 1.5rem 1.5rem auto;
    width: min(27rem, calc(100vw - 3rem));
    max-height: min(84vh, 44rem);
    border-radius: 20px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
  }
  .qd::before { display: none; }
  @supports selector(:popover-open) {
    @media (prefers-reduced-motion: no-preference) {
      .qd { translate: 0 1.5rem; opacity: 0; transition: translate var(--qd-time) cubic-bezier(.2, .9, .25, 1), opacity var(--qd-time) ease, overlay var(--qd-time) allow-discrete, display var(--qd-time) allow-discrete; }
      .qd:popover-open { translate: 0 0; opacity: 1; }
      @starting-style { .qd:popover-open { translate: 0 1.5rem; opacity: 0; } }
    }
  }
}

/* ---- No popovers: an ordinary section, and a plain link to it ---- */
@supports not selector(:popover-open) {
  .qd { position: static; max-height: none; border-radius: 16px; box-shadow: none; border: 1px solid rgba(0, 0, 0, .15); }
  .qd::before, .qd-close, .qd-open { display: none; }
  .qd-alt { display: inline; }
}
@media print { .qd { display: none; } }


/* ===== carry.css: library: builders/quote-carry ===== */
/* Quote carry: the notes shown at the top of a quote form. Everything else about the form is the site's own.
   Class names start with carry-. */
.carry-summary {
  --carry-accent: #f2b233;
  --carry-ink: inherit;
  margin: 0 0 1rem;
  padding: .9rem 1rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, .14);
  border-left: 5px solid var(--carry-accent);
  background: rgba(255, 255, 255, .7);
  color: var(--carry-ink);
}
.carry-summary[hidden] { display: none; }
.carry-title { margin: 0 0 .5rem; font-weight: 700; }
.carry-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.carry-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: .75rem; align-items: baseline; }
.carry-label { grid-column: 1; font-size: .82rem; opacity: .75; }
.carry-value { grid-column: 1; font-weight: 600; overflow-wrap: anywhere; }
.carry-remove {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  min-height: 2.4rem;          /* a thumb can hit it */
  padding: .3rem .7rem;
  font: inherit;
  font-size: .85rem;
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 999px;
  cursor: pointer;
  opacity: .8;
}
.carry-remove:hover { opacity: 1; }
.carry-remove:focus-visible { outline: 3px solid var(--carry-accent); outline-offset: 2px; }
.carry-sent { margin: .7rem 0 0; font-size: .85rem; opacity: .8; }

/* The little count beside a "Get a price" link: <span class="carry-count" data-carry-count hidden></span> */
.carry-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.4em;
  height: 1.4em;
  margin-left: .35em;
  padding: 0 .3em;
  border-radius: 999px;
  font-size: .8em;
  font-weight: 700;
  background: var(--carry-accent, #f2b233);
  color: #1c1408;
}
.carry-count[hidden] { display: none; }


/* ===== photo-carry.css: library: animations/photo-carry ===== */
/* Photo carry: tap a job's picture in a gallery and that picture grows into the top of the job's own page,
   instead of the page blinking. Going back, it shrinks home again. No script: this is the browser's own
   cross-page "view transition". See README.md and example.html.

   How to use it:
   - Link this stylesheet from every page of the site (both ends of a move must have it).
   - Give the picture in the gallery and the big picture on its page the SAME class: pc-1 for the first job,
     pc-2 for the second, up to pc-24.
   - On any one page, use each number once only.

   Browsers that don't do cross-page transitions simply change page as normal. With "reduce motion" on it is
   switched off. It works alone or with the library's page wipe, which then handles the rest of the page.

   Set on :root to fit the site:
     --pc-time   how long the picture takes to travel (.5s; keep it under .7s) */
:root { --pc-time: .5s; }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }

  /* Twenty-four slots. A name has to be written in a stylesheet, because the sites allow no inline styles. */
  .pc-1 { view-transition-name: pc-1; }   .pc-2 { view-transition-name: pc-2; }   .pc-3 { view-transition-name: pc-3; }
  .pc-4 { view-transition-name: pc-4; }   .pc-5 { view-transition-name: pc-5; }   .pc-6 { view-transition-name: pc-6; }
  .pc-7 { view-transition-name: pc-7; }   .pc-8 { view-transition-name: pc-8; }   .pc-9 { view-transition-name: pc-9; }
  .pc-10 { view-transition-name: pc-10; } .pc-11 { view-transition-name: pc-11; } .pc-12 { view-transition-name: pc-12; }
  .pc-13 { view-transition-name: pc-13; } .pc-14 { view-transition-name: pc-14; } .pc-15 { view-transition-name: pc-15; }
  .pc-16 { view-transition-name: pc-16; } .pc-17 { view-transition-name: pc-17; } .pc-18 { view-transition-name: pc-18; }
  .pc-19 { view-transition-name: pc-19; } .pc-20 { view-transition-name: pc-20; } .pc-21 { view-transition-name: pc-21; }
  .pc-22 { view-transition-name: pc-22; } .pc-23 { view-transition-name: pc-23; } .pc-24 { view-transition-name: pc-24; }

  /* One class for all of them, so the travel is styled once. */
  :is(.pc-1, .pc-2, .pc-3, .pc-4, .pc-5, .pc-6, .pc-7, .pc-8, .pc-9, .pc-10, .pc-11, .pc-12,
      .pc-13, .pc-14, .pc-15, .pc-16, .pc-17, .pc-18, .pc-19, .pc-20, .pc-21, .pc-22, .pc-23, .pc-24) {
    view-transition-class: pc;
  }

  /* The travel: the box moves and resizes from where the picture was to where it will be. */
  ::view-transition-group(.pc) {
    animation-duration: var(--pc-time);
    animation-timing-function: cubic-bezier(.3, .1, .2, 1);
    z-index: 2;                              /* above the rest of the page while it travels */
  }
  /* The small picture and the big one are different shapes. Fill the travelling box with each, cropped, so the
     picture never squashes on the way. */
  ::view-transition-old(.pc), ::view-transition-new(.pc) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation-duration: var(--pc-time);
  }
}


/* ===== line.css: library: animations/progress-line (pl-tape) ===== */
/* Progress line: a thin line across the top of the screen that fills as the page is scrolled, drawn as a
   thing the trade works with: a tape measure, a pipe filling, a grout joint, a bead of silicone, a trench, a
   string line. No script: the browser ties it to scrolling. See README.md and example.html.

   How to use it: put one element straight after <body>, with the base class and one material:
       <div class="pl pl-tape" aria-hidden="true"></div>

   Where the browser cannot tie an animation to scrolling, the line is simply not shown.

   Set on the element (or :root) to fit the site:
     --pl-top     how far from the top of the screen it sits (0; set it to the height of a sticky header)
     --pl-h       how tall the line is (each material has its own)
     --pl-accent  the colour of the tape, the string and the tool heads
     --pl-ground  the colour of the ground, for the trench */

@property --pl {                /* how far down the page: 0 at the top, 1 at the bottom */
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

.pl {
  --pl-top: 0px;
  --pl-h: 12px;
  --pl-head: 14px;              /* the width of the thing at the leading end */
  --pl-accent: #f2c230;
  --pl-ground: #a8482a;
  display: none;
  position: fixed;
  inset: var(--pl-top) 0 auto 0;
  height: var(--pl-h);
  z-index: 30;
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  .pl { display: block; animation: pl-go linear both; animation-timeline: scroll(root block); }
}
@keyframes pl-go { from { --pl: 0; } to { --pl: 1; } }

/* ::before is what has been done so far. It is uncovered from the left, so its pattern never stretches. */
.pl::before {
  content: "";
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc((1 - var(--pl)) * 100%) 0 0);
}
/* ::after is the thing at the leading end: the tape's hook, the nozzle, the bucket. */
.pl::after {
  content: "";
  position: absolute;
  top: 0;
  left: calc(var(--pl) * (100% - var(--pl-head)));
  width: var(--pl-head);
  height: 100%;
}

/* ---- Tape measure: yellow blade, a mark every 10, a taller one every 50, the steel hook at the end ---- */
.pl-tape { --pl-h: 14px; --pl-head: 7px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .3)); }
.pl-tape::before {
  background:
    repeating-linear-gradient(90deg, rgba(20, 16, 8, .85) 0 1.5px, transparent 1.5px 50px) 0 0 / 100% 78% no-repeat,
    repeating-linear-gradient(90deg, rgba(20, 16, 8, .7) 0 1px, transparent 1px 10px) 0 0 / 100% 42% no-repeat,
    linear-gradient(to bottom, color-mix(in srgb, var(--pl-accent), #fff 25%), var(--pl-accent) 45%, color-mix(in srgb, var(--pl-accent), #000 14%));
}
.pl-tape::after {
  top: -1px;
  height: calc(100% + 5px);
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, #8d9399, #e3e6e9 45%, #9aa0a6);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

/* ---- Pipe: an empty white pipe that fills with water ---- */
.pl-pipe {
  --pl-h: 14px;
  --pl-head: 12px;
  background: linear-gradient(to bottom, #fbfaf6 0 12%, #d8d6cc 22%, #33312e 26% 78%, #b9b7ad 84%, #8f8d84);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .28);
}
.pl-pipe::before { background: linear-gradient(to bottom, transparent 0 26%, #7fc0e6 26%, #2f6f9c 60%, #235676 78%, transparent 78%); }
.pl-pipe::after {              /* the front of the water, rounded */
  top: 26%;
  height: 52%;
  border-radius: 0 99px 99px 0;
  background: linear-gradient(to bottom, #7fc0e6, #2f6f9c 65%, #235676);
}

/* ---- Grout: two rows of tile with an open joint between them, filled as you go ---- */
.pl-grout {
  --pl-h: 16px;
  --pl-head: 16px;
  --pl-tile: #ece7dd;
  --pl-joint: #4a4540;
  --pl-grout: #c9c2b4;
  background:
    repeating-linear-gradient(90deg, var(--pl-joint) 0 3px, transparent 3px 132px),
    linear-gradient(to bottom, var(--pl-tile) 0 38%, var(--pl-joint) 38% 62%, var(--pl-tile) 62%);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
}
.pl-grout::before {
  background:
    repeating-linear-gradient(90deg, var(--pl-grout) 0 3px, transparent 3px 132px),
    linear-gradient(to bottom, transparent 0 38%, var(--pl-grout) 38% 62%, transparent 62%);
}
.pl-grout::after {             /* the rubber float, on its corner */
  top: 1px;
  height: calc(100% - 2px);
  border-radius: 3px;
  background: linear-gradient(135deg, #2f3338, #50565d);
  transform: rotate(8deg);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

/* ---- Bead: a bead of silicone run along a joint, with the nozzle at the end ---- */
.pl-bead { --pl-h: 12px; --pl-head: 22px; --pl-bead: #ffffff; }
.pl-bead::before {
  inset: 22% 0 22% 0;
  border-radius: 0 99px 99px 0;
  clip-path: none;
  width: calc(var(--pl) * (100% - var(--pl-head)) + 4px);
  background: linear-gradient(to bottom, var(--pl-bead), color-mix(in srgb, var(--pl-bead), #000 14%));
  box-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.pl-bead::after {              /* the nozzle, cut at an angle */
  clip-path: polygon(0 34%, 100% 0, 100% 100%, 0 66%);
  background: linear-gradient(to bottom, #f1f3f5, #a9b0b7);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35));
}

/* ---- Trench: a strip of ground, dug as you go, with the bucket at the face ---- */
.pl-trench {
  --pl-h: 14px;
  --pl-head: 16px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .25) 0 1.2px, transparent 1.8px) 3px 2px / 23px 9px,
    radial-gradient(circle, rgba(0, 0, 0, .25) 0 1.2px, transparent 1.8px) 12px 6px / 31px 11px,
    linear-gradient(to bottom, color-mix(in srgb, var(--pl-ground), #fff 10%), var(--pl-ground));
  box-shadow: 0 2px 4px rgba(0, 0, 0, .25);
}
.pl-trench::before {
  background: linear-gradient(to bottom, transparent 0 14%, color-mix(in srgb, var(--pl-ground), #000 62%) 14% 30%, color-mix(in srgb, var(--pl-ground), #000 40%) 30% 86%, transparent 86%);
}
.pl-trench::after {            /* the bucket, teeth forward */
  top: -1px;
  height: calc(100% + 2px);
  clip-path: polygon(0 12%, 62% 12%, 62% 0, 100% 22%, 78% 30%, 100% 50%, 78% 58%, 100% 78%, 62% 100%, 62% 88%, 0 88%);
  background: linear-gradient(to bottom, #3a3d41, #1f2124);
}

/* ---- String line: pulled tight from a peg, with flagging tape on the peg that travels ---- */
.pl-string {
  --pl-h: 16px;
  --pl-head: 9px;
  --pl-accent: #ff5fa2;        /* builder's line is usually fluoro pink or orange */
  background: linear-gradient(90deg, #8a5a2b 0 6px, transparent 6px) 0 0 / 100% 100% no-repeat;   /* the peg at the start */
}
.pl-string::before {
  inset: calc(50% - 1px) 0 auto 0;
  height: 2px;
  background: var(--pl-accent);
  box-shadow: 0 1px 1px rgba(0, 0, 0, .35);
}
.pl-string::after {            /* the travelling peg, with a tail of tape */
  border-radius: 1px 1px 3px 3px;
  background:
    linear-gradient(to bottom, var(--pl-accent) 0 30%, transparent 30%) 0 0 / 100% 100% no-repeat,
    linear-gradient(90deg, #a06a34, #7a4d22);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

@media print { .pl { display: none !important; } }


/* ===== reveal.css: library: animations/scroll-reveal ===== */
/* Scroll reveal: elements with class="reveal" fade and rise into place once. */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }


/* ===== site.css: Constructions161 ===== */
/* Constructions161: the site's own styles. The library pieces above this in styles.css are set up here
   through their custom properties. The thread through the page is the golden ratio, the "161" in the name:
   the spacing steps, the line height and the picture frames are all 1 : 1.618. */

@font-face { font-family: "Space Grotesk"; src: url("/fonts/spacegrotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("/fonts/dmsans.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }

:root {
  --ink: #161616;
  --text: #2c2b29;
  --muted: #5d5952;
  --paper: #f6f2ea;
  --paper-2: #ece6db;
  --card: #fbf8f2;
  --line: rgb(22 22 22 / .14);
  --red: #b3231b;
  --red-deep: #8f1c16;
  --night: #141517;
  --night-2: #1d1f23;
  --on-night: #efe9df;
  --on-night-muted: #b9b2a7;
  --red-on-night: #e7685f;
  --f-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --f-body: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --phi: 1.618;
  /* spacing: each step is the one before times 1.618 */
  --s-1: .382rem; --s0: .618rem; --s1: 1rem; --s2: 1.618rem; --s3: 2.618rem; --s4: 4.236rem; --s5: 6.854rem;
  --gutter: clamp(1rem, 4vw, 2.618rem);
  --max: 76rem;
  --radius: 3px;
  --shadow-paper: 0 1px 1px rgb(42 33 24 / .12), 0 6px 18px -6px rgb(42 33 24 / .28);

  /* library pieces, in this site's colours */
  --cb-bg: rgb(246 242 234 / .96);
  --cb-ink: var(--ink);
  --cb-call: var(--red);
  --cb-call-ink: #fff;
  --cb-h: 4.6rem;
  --cb-h-stuck: 3.4rem;
  --qd-bg: var(--card);
  --qd-ink: var(--ink);
  --qd-accent: var(--red);
  --carry-accent: var(--red);
  --pc-time: .55s;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--cb-h-stuck) + 1rem); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.618 var(--f-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--red); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--red-deep); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--f-head); color: var(--ink); font-weight: 600; letter-spacing: -.03em; line-height: 1.08; margin: 0 0 var(--s1); text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 6.6vw, 4.6rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.02; }
h2 { font-size: clamp(1.85rem, 4.2vw, 2.95rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.38rem); letter-spacing: -.02em; line-height: 1.2; }
p { margin: 0 0 var(--s1); }
p, li { text-wrap: pretty; }
strong { color: var(--ink); font-weight: 600; }

.skip { position: absolute; left: var(--s1); top: -4rem; z-index: 100; padding: .7rem 1rem; background: var(--ink); color: #fff; border-radius: var(--radius); font-weight: 600; text-decoration: none; }
.skip:focus { top: var(--s1); color: #fff; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(var(--s4), 9vw, var(--s5)); }
.section-tight { padding-block: clamp(var(--s3), 6vw, var(--s4)); }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.26rem); line-height: 1.55; color: var(--text); max-width: 38em; }
.muted { color: var(--muted); }
.measure { max-width: 40rem; }
.center { text-align: center; margin-inline: auto; }

/* The eyebrow: a small golden rectangle, then the words */
.eyebrow { display: inline-flex; align-items: center; gap: .62em; margin: 0 0 var(--s1); font: 600 .78rem/1.2 var(--f-head); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ""; flex: none; width: 1.618em; height: 1em; background: linear-gradient(90deg, var(--red) 0 61.8%, transparent 61.8%); box-shadow: inset 0 0 0 1px var(--red); }
.on-night .eyebrow { color: var(--on-night-muted); }
.on-night .eyebrow::before { background: linear-gradient(90deg, var(--red-on-night) 0 61.8%, transparent 61.8%); box-shadow: inset 0 0 0 1px var(--red-on-night); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 3.1rem; padding: .7rem 1.45rem;
  border: 1.5px solid var(--red); border-radius: var(--radius);
  background: var(--red); color: #fff;
  font: 600 1rem/1.1 var(--f-head); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: rgb(22 22 22 / .35); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.on-night .btn-ghost { color: var(--on-night); border-color: rgb(239 233 223 / .45); }
.on-night .btn-ghost:hover { background: var(--on-night); color: var(--night); border-color: var(--on-night); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btns { display: flex; flex-wrap: wrap; gap: var(--s0); }
.arrow { font-family: var(--f-head); font-weight: 600; text-decoration: none; display: inline-flex; gap: .45em; align-items: center; }
.arrow::after { content: "→"; transition: transform .2s ease; }
.arrow:hover::after { transform: translateX(4px); }

/* ---------- Header (sticky-call-bar-2 sets its size and how it reacts) ---------- */
.cb-head-in { gap: var(--s0); backdrop-filter: saturate(1.2) blur(8px); }
.cb-name { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--f-head); font-weight: 700; letter-spacing: -.03em; font-size: 1.12rem; }
.cb-name b { color: var(--red); font-weight: 700; }
.mark { width: 1.618rem; height: 1rem; flex: none; }
.cb-extra { font-size: .74rem; letter-spacing: .02em; color: var(--muted); opacity: 1; }
.cb-phone { font-family: var(--f-head); font-weight: 600; letter-spacing: .01em; border-radius: var(--radius); min-height: 2.6rem; }
.cb-phone svg { width: 1em; height: 1em; }
.head-end { display: flex; align-items: center; gap: var(--s0); flex: none; }

/* The menu: a sheet from the top on a phone (the browser's own popover), a row of links on a wide screen */
.menu-btn { display: inline-grid; place-items: center; width: 2.75rem; height: 2.6rem; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--ink); cursor: pointer; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 1.1rem; height: 1.5px; background: currentColor; position: relative; content: ""; }
.menu-btn span::before { position: absolute; top: -6px; }
.menu-btn span::after { position: absolute; top: 6px; }
.menu {
  position: fixed; inset: 0 0 auto 0; width: 100%; max-width: none; max-height: 100dvh; margin: 0; overflow: auto;
  padding: var(--s1) var(--gutter) var(--s3); border: 0; border-bottom: 1px solid var(--line);
  background: var(--paper); color: var(--ink); box-shadow: 0 20px 40px rgb(0 0 0 / .18);
}
.menu::backdrop { background: rgb(20 21 23 / .45); }
.menu-top { display: flex; justify-content: space-between; align-items: center; min-height: 2.8rem; margin-bottom: var(--s1); }
.menu-top p { margin: 0; font: 600 .78rem/1 var(--f-head); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.menu-close { min-height: 2.75rem; padding: 0 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; font: 600 .95rem var(--f-head); color: var(--ink); cursor: pointer; }
.menu ul { list-style: none; margin: 0; padding: 0; }
.menu li { border-top: 1px solid var(--line); }
.menu li a { display: flex; justify-content: space-between; align-items: center; padding: .9rem 0; font: 600 1.4rem/1.2 var(--f-head); letter-spacing: -.025em; color: var(--ink); text-decoration: none; }
.menu li a::after { content: "→"; color: var(--red); font-size: 1rem; }
.menu li a[aria-current="page"] { color: var(--red); }
.menu .menu-call { margin-top: var(--s2); width: 100%; }
@supports selector(:popover-open) {
  @media (prefers-reduced-motion: no-preference) {
    .menu { translate: 0 -1.5rem; opacity: 0; transition: translate .3s cubic-bezier(.2, .9, .25, 1), opacity .25s ease, overlay .3s allow-discrete, display .3s allow-discrete; }
    .menu:popover-open { translate: 0 0; opacity: 1; }
    @starting-style { .menu:popover-open { translate: 0 -1.5rem; opacity: 0; } }
  }
}
@supports not selector(:popover-open) { .menu-btn { display: none; } }

@media (min-width: 78rem) {
  .cb-who { flex: none; }
  .menu-btn { display: none; }
  .menu, .menu:popover-open {
    display: block; position: static; inset: auto; width: auto; max-height: none; padding: 0; margin: 0 0 0 auto;
    overflow: visible; border: 0; background: transparent; box-shadow: none; opacity: 1; translate: none;
  }
  .menu-top, .menu .menu-call { display: none; }
  .menu ul { display: flex; gap: clamp(.9rem, 1.6vw, 1.6rem); }
  .menu li { border: 0; }
  .menu li a { padding: .4rem 0; font: 500 .95rem/1.2 var(--f-head); letter-spacing: -.01em; position: relative; }
  .menu li a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .25s ease; }
  .menu li a:hover::after, .menu li a[aria-current="page"]::after { transform: scaleX(1); }
  .menu li a[aria-current="page"] { color: var(--ink); }
}
@media (max-width: 23.9rem) {
  .cb-name { font-size: 1rem; }
  .cb-name .mark { display: none; }
  .cb-phone { padding: 0 .7rem; font-size: .92rem; }
}
@media (max-width: 21rem) { .cb-phone .num { display: none; } }

/* The tape measure under the header */
.pl { --pl-top: var(--cb-h); --pl-accent: #efe9df; }
@supports (container-type: scroll-state) { .pl { --pl-top: var(--cb-h-stuck); } }

/* ---------- Hero: built to take a video, filled for now with a moving cut-paper scene ---------- */
.hero { position: relative; isolation: isolate; display: grid; align-items: end; min-height: max(36rem, calc(100svh - var(--cb-h))); background: var(--night); color: var(--on-night); overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media > svg, .hero-media > video, .hero-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgb(14 15 17 / .94) 0%, rgb(14 15 17 / .82) 42%, rgb(14 15 17 / .25) 72%, rgb(14 15 17 / 0) 100%); }
.hero-in { padding-block: var(--s3) clamp(var(--s3), 7vw, var(--s5)); }
.hero h1 { color: #fff; max-width: 11.5em; margin-bottom: var(--s1); }
.hero .lead { color: var(--on-night); max-width: 34em; }
.trust { display: flex; flex-wrap: wrap; gap: .35rem 1.2rem; margin: 0 0 var(--s2); padding: 0; list-style: none; font: 500 .9rem/1.4 var(--f-head); color: var(--on-night-muted); }
.trust li { display: inline-flex; align-items: center; gap: .5rem; }
.trust li::before { content: ""; width: .5rem; height: .5rem; background: var(--red-on-night); flex: none; }
.hero .btn-ghost { color: var(--on-night); border-color: rgb(239 233 223 / .45); }
.hero .btn-ghost:hover { background: var(--on-night); color: var(--night); }
@media (min-width: 56rem) {
  .hero::before { background: linear-gradient(90deg, rgb(14 15 17 / .92) 0%, rgb(14 15 17 / .72) 38%, rgb(14 15 17 / .12) 64%, rgb(14 15 17 / 0) 100%), linear-gradient(to top, rgb(14 15 17 / .6), rgb(14 15 17 / 0) 40%); }
  .hero { align-items: center; }
}
.hero-note { position: absolute; right: var(--gutter); bottom: var(--s1); margin: 0; font: 500 .7rem/1 var(--f-head); letter-spacing: .14em; text-transform: uppercase; color: rgb(239 233 223 / .55); }
@media (max-width: 55.9rem) { .hero-note { display: none; } }

/* The scene's quiet movement. Nothing moves for anyone who has asked for less motion. */
.hx-phi-arc { stroke-dasharray: 1; stroke-dashoffset: 0; }
@media (prefers-reduced-motion: no-preference) {
  .hx-far { animation: hx-drift 34s ease-in-out infinite alternate; }
  .hx-mid { animation: hx-drift 34s ease-in-out infinite alternate-reverse; }
  .hx-glow { animation: hx-glow 26s ease-in-out infinite alternate; }
  .hx-trolley { animation: hx-run 22s cubic-bezier(.45, 0, .2, 1) infinite alternate; }
  .hx-load { animation: hx-lower 11s cubic-bezier(.45, 0, .2, 1) infinite alternate; }
  .hx-cable { transform-box: fill-box; transform-origin: 50% 0; animation: hx-cable 11s cubic-bezier(.45, 0, .2, 1) infinite alternate; }
  .hx-phi-arc { stroke-dashoffset: 1; animation: hx-draw 4.2s cubic-bezier(.3, .1, .2, 1) .5s forwards; }
  .hx-phi-grid { opacity: 0; animation: hx-in 2.4s ease 2.6s forwards; }
  .hx-lit { opacity: 0; animation: hx-in 1.1s ease forwards; }
  .hx-lit-1 { animation-delay: .9s; } .hx-lit-2 { animation-delay: 1.6s; } .hx-lit-3 { animation-delay: 2.3s; } .hx-lit-4 { animation-delay: 3s; }
  .hx-lit-5 { animation: hx-blink 16s ease 4s infinite; }
}
@keyframes hx-drift { to { transform: translateX(-18px); } }
@keyframes hx-glow { from { transform: translateX(60px); opacity: .7; } to { transform: translateX(-220px); opacity: 1; } }
@keyframes hx-run { from { transform: translateX(0); } to { transform: translateX(150px); } }
@keyframes hx-lower { from { transform: translateY(0); } to { transform: translateY(70px); } }
@keyframes hx-cable { from { transform: scaleY(1); } to { transform: scaleY(1.4667); } }
@keyframes hx-draw { to { stroke-dashoffset: 0; } }
@keyframes hx-in { to { opacity: 1; } }
@keyframes hx-blink { 0%, 8% { opacity: 0; } 12%, 100% { opacity: 1; } }

/* ---------- Page heads (inner pages) ---------- */
.page-head { padding-block: clamp(var(--s3), 7vw, var(--s5)) clamp(var(--s2), 4vw, var(--s4)); }
.page-head .lead { margin-bottom: 0; }
.crumbs { margin: 0 0 var(--s2); padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; font-size: .86rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: .4rem; opacity: .5; }
.crumbs a { color: var(--muted); }
.page-art { margin-top: clamp(var(--s2), 4vw, var(--s3)); }

/* ---------- Golden frames: every picture is a 1 : 1.618 rectangle ---------- */
.frame { position: relative; aspect-ratio: 1.618; overflow: hidden; background: var(--paper-2); box-shadow: var(--shadow-paper); }
.frame > img, .frame > svg { width: 100%; height: 100%; object-fit: cover; }
.frame-tag { position: absolute; left: .6rem; bottom: .6rem; margin: 0; padding: .28rem .5rem; background: rgb(251 248 242 / .92); color: var(--muted); font: 600 .68rem/1 var(--f-head); letter-spacing: .12em; text-transform: uppercase; }

/* ---------- Two columns in the golden ratio ---------- */
.split { display: grid; gap: var(--s3); align-items: center; }
@media (min-width: 56rem) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.618fr); gap: clamp(var(--s3), 5vw, var(--s4)); }
  .split-flip { grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr); }
  .split-top { align-items: start; }
}

/* ---------- Services ---------- */
.services { display: grid; gap: var(--s3) var(--s2); margin-top: var(--s3); }
@media (min-width: 46rem) { .services { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.service { display: grid; gap: var(--s1); align-content: start; }
.service h3 { margin: var(--s0) 0 0; }
.service p { margin: 0; color: var(--text); }
.service .arrow { margin-top: var(--s-1); }
.service a.frame-link { display: block; text-decoration: none; }
.service a.frame-link .frame { transition: transform .5s cubic-bezier(.2, .7, .2, 1), box-shadow .5s ease; }
.service a.frame-link:hover .frame { transform: translateY(-4px); box-shadow: 0 2px 2px rgb(42 33 24 / .12), 0 14px 30px -10px rgb(42 33 24 / .38); }
.ticks { list-style: none; margin: 0 0 var(--s2); padding: 0; display: grid; gap: .5rem; }
.ticks li { position: relative; padding-left: 1.7rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .5em; width: .95rem; height: .59rem; border: 1.5px solid var(--red); background: linear-gradient(90deg, var(--red) 0 61.8%, transparent 61.8%); }

/* ---------- Dark bands ---------- */
.on-night { background: var(--night); color: var(--on-night); }
.on-night h2, .on-night h3, .on-night strong { color: #fff; }
.on-night a:not(.btn) { color: var(--on-night); }
.on-night .muted { color: var(--on-night-muted); }
.band-paper { background: var(--paper-2); }

/* ---------- The sectors (home teaser and the projects page) ---------- */
.sectors { display: grid; gap: var(--s2); grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); margin-top: var(--s3); }
.sector { display: grid; gap: var(--s0); align-content: start; }
.sector h3 { margin: var(--s-1) 0 0; font-size: 1.15rem; }
.sector p { margin: 0; font-size: .98rem; }
.sector-btn { justify-self: start; margin-top: var(--s-1); padding: .45rem 0; border: 0; background: none; color: var(--red); font: 600 .95rem var(--f-head); cursor: pointer; text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.sector-btn:hover { color: var(--red-deep); }
a.sector-link { text-decoration: none; color: inherit; }
a.sector-link h3 { color: var(--ink); }
a.sector-link:hover h3 { color: var(--red); }

/* Filters on the projects page: radio buttons, no script. Each one shows only its sector. */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: var(--s2) 0 0; padding: 0; border: 0; }
.filters legend { width: 100%; margin-bottom: var(--s0); font: 600 .78rem/1 var(--f-head); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .5rem 1rem; border: 1px solid rgb(22 22 22 / .28); border-radius: var(--radius); background: var(--card); font: 500 .95rem/1.2 var(--f-head); color: var(--ink); transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip input:hover + span { border-color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.gallery:has(#f-home:checked) .sector:not([data-sector="home"]),
.gallery:has(#f-apartments:checked) .sector:not([data-sector="apartments"]),
.gallery:has(#f-commercial:checked) .sector:not([data-sector="commercial"]),
.gallery:has(#f-retail:checked) .sector:not([data-sector="retail"]),
.gallery:has(#f-medical:checked) .sector:not([data-sector="medical"]),
.gallery:has(#f-education:checked) .sector:not([data-sector="education"]),
.gallery:has(#f-industrial:checked) .sector:not([data-sector="industrial"]),
.gallery:has(#f-renovation:checked) .sector:not([data-sector="renovation"]) { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .gallery .sector { animation: settle .5s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes settle { from { opacity: 0; transform: translateY(10px); } }
.gallery:has(.filters input:not(#f-all):checked) .sectors { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 46rem) {
  .gallery:has(.filters input:not(#f-all):checked) .sector { grid-template-columns: minmax(0, 1.618fr) minmax(0, 1fr); column-gap: var(--s3); align-content: center; }
  .gallery:has(.filters input:not(#f-all):checked) .sector > .frame { grid-column: 1; grid-row: 1 / span 4; }
  .gallery:has(.filters input:not(#f-all):checked) .sector > :not(.frame) { grid-column: 2; }
  .gallery:has(.filters input:not(#f-all):checked) .sector h3 { align-self: end; font-size: 1.6rem; }
  .gallery:has(.filters input:not(#f-all):checked) .sector .sector-btn { align-self: start; }
}

/* ---------- The golden-ratio section ("Why 161?") ---------- */
.phi-art { position: relative; aspect-ratio: 1.618; }
.phi-art svg { width: 100%; height: 100%; overflow: visible; }
.phi-sq { fill: none; stroke: currentColor; stroke-opacity: .28; stroke-width: 1; }
.phi-arc { fill: none; stroke: var(--red-on-night); stroke-width: 2.4; stroke-linecap: round; }
.phi-label { font: 600 30px var(--f-head); fill: var(--on-night-muted); letter-spacing: .04em; }
.phi-num { font: 600 64px var(--f-head); fill: #fff; letter-spacing: -.04em; }
@media (prefers-reduced-motion: no-preference) {
  .js .phi-art .phi-arc { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 3.2s cubic-bezier(.3, .1, .2, 1) .2s; }
  .js .phi-art .phi-sq { opacity: 0; transition: opacity 1.2s ease; }
  .js .phi-art.in .phi-arc { stroke-dashoffset: 0; }
  .js .phi-art.in .phi-sq { opacity: 1; }
  .js .phi-art .phi-sq:nth-child(2) { transition-delay: .3s; } .js .phi-art .phi-sq:nth-child(3) { transition-delay: .6s; }
  .js .phi-art .phi-sq:nth-child(4) { transition-delay: .9s; } .js .phi-art .phi-sq:nth-child(5) { transition-delay: 1.2s; }
  .js .phi-art .phi-sq:nth-child(n+6) { transition-delay: 1.5s; }
}

/* ---------- Facts row ---------- */
.facts { display: grid; gap: 1px; margin: var(--s3) 0 0; padding: 0; list-style: none; background: var(--line); border-block: 1px solid var(--line); }
@media (min-width: 46rem) { .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.facts li { padding: var(--s2) var(--s1) var(--s2) 0; background: var(--paper); }
@media (min-width: 46rem) { .facts li { padding: var(--s2); } .facts li:first-child { padding-left: 0; } }
.facts b { display: block; font: 600 clamp(1.5rem, 3vw, 2.1rem)/1.1 var(--f-head); letter-spacing: -.035em; color: var(--ink); margin-bottom: .35rem; }
.facts span { color: var(--muted); font-size: .96rem; }
.on-night .facts { background: rgb(239 233 223 / .14); border-color: rgb(239 233 223 / .14); }
.on-night .facts li { background: var(--night); }
.on-night .facts b { color: #fff; }
.on-night .facts span { color: var(--on-night-muted); }

/* ---------- Long-form stages (How a project runs) ---------- */
.stages { list-style: none; margin: var(--s3) 0 0; padding: 0; counter-reset: st; display: grid; gap: 0; border-top: 1px solid var(--line); }
.stages > li { counter-increment: st; display: grid; gap: var(--s0) var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
@media (min-width: 52rem) { .stages > li { grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 1fr); } }
.stages > li::before { content: counter(st, decimal-leading-zero); font: 600 1.6rem/1 var(--f-head); color: var(--red); letter-spacing: -.03em; }
.stages h3 { margin: 0 0 var(--s0); }
.stages p { margin: 0 0 var(--s0); }
.stages .c161 { padding-left: var(--s1); border-left: 2px solid var(--red); color: var(--text); }
.stages .c161 b { display: block; font: 600 .74rem/1.4 var(--f-head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }

/* ---------- Compare (D&C or build only) ---------- */
.compare { display: grid; gap: var(--s2); margin-top: var(--s3); }
@media (min-width: 46rem) { .compare { grid-template-columns: 1fr 1fr; } }
.compare > div { padding: var(--s2); background: var(--card); box-shadow: var(--shadow-paper); }
.compare h3 { margin-top: 0; }
.compare .ticks { margin-bottom: 0; }

/* ---------- Quote drawer: the form inside it, and the contact page's form ---------- */
.qd { font-family: var(--f-body); }
.qd-title { font-family: var(--f-head); letter-spacing: -.03em; }
.qd-intro { margin: -.2rem 0 var(--s1); color: var(--muted); font-size: .95rem; }
.form { display: grid; gap: .85rem; }
.form label { display: grid; gap: .3rem; font: 600 .9rem/1.3 var(--f-head); color: var(--ink); }
.form input, .form textarea, .form select {
  width: 100%; min-height: 3rem; padding: .7rem .8rem; border: 1px solid rgb(22 22 22 / .3); border-radius: var(--radius);
  background: #fff; color: var(--ink); font: 400 1rem/1.4 var(--f-body);
}
.form textarea { min-height: 6.5rem; resize: vertical; }
.form input:focus-visible, .form textarea:focus-visible { outline: 3px solid var(--red); outline-offset: 1px; border-color: var(--ink); }
.form .row2 { display: grid; gap: .85rem; }
@media (min-width: 30rem) { .form .row2 { grid-template-columns: 1fr 1fr; } }
.form .btn { width: 100%; margin-top: .2rem; }
.form .hint { font: 400 .82rem/1.4 var(--f-body); color: var(--muted); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.qd-next { color: var(--muted); }
.qd-or { margin: var(--s1) 0 0; font-size: .95rem; }
.carry-summary { background: var(--paper); border-radius: var(--radius); border-color: var(--line); }
.carry-title { font-family: var(--f-head); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: var(--s3); }
@media (min-width: 56rem) { .contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; } }
.big-link { display: block; font: 600 clamp(1.5rem, 4vw, 2.3rem)/1.15 var(--f-head); letter-spacing: -.035em; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.big-link:hover { color: var(--red); }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.contact-list small { display: block; font: 600 .74rem/1.4 var(--f-head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.panel { padding: clamp(var(--s2), 4vw, var(--s3)); background: var(--card); box-shadow: var(--shadow-paper); }
.panel h2 { font-size: clamp(1.5rem, 3vw, 2rem); }

/* ---------- Call band at the foot of each page ---------- */
.callband { padding-block: clamp(var(--s4), 8vw, var(--s5)); }
.callband h2 { max-width: 16em; }
.callband .btns { margin-top: var(--s2); }

/* ---------- Footer ---------- */
.foot { background: #0f1012; color: var(--on-night-muted); padding: var(--s4) 0 var(--s3); font-size: .95rem; }
.foot a { color: var(--on-night); text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; gap: var(--s3) var(--s2); }
@media (min-width: 46rem) { .foot-grid { grid-template-columns: 1.618fr 1fr 1fr 1.2fr; } }
.foot h2 { font: 600 .74rem/1.4 var(--f-head); letter-spacing: .16em; text-transform: uppercase; color: var(--on-night-muted); margin: 0 0 var(--s1); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.foot-brand { font: 700 1.3rem/1.1 var(--f-head); letter-spacing: -.03em; color: #fff; margin-bottom: var(--s0); display: inline-flex; gap: .5rem; align-items: center; }
.foot-brand b { color: var(--red-on-night); }
.foot-legal { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; justify-content: space-between; margin-top: var(--s3); padding-top: var(--s2); border-top: 1px solid rgb(239 233 223 / .12); font-size: .84rem; }
.foot-legal p { margin: 0; }
.credit a { color: var(--on-night-muted); }
@media (max-width: 760px) { .foot { padding-bottom: 7.5rem; } }

/* bottom bar on phones (sticky-call-bar-2), in this site's type */
.cb-foot { background: rgb(15 16 18 / .97); }
.cb-foot :is(a, button) { font: 600 1rem/1 var(--f-head); border-radius: var(--radius); }

/* ---------- Prose (privacy) ---------- */
.prose { max-width: 42rem; }
.prose h2 { font-size: 1.4rem; margin-top: var(--s3); }
.prose ul { padding-left: 1.2rem; }

/* ---------- 404 ---------- */
.lost { min-height: 60vh; display: grid; align-content: center; }
.lost .frame { max-width: 34rem; margin-top: var(--s3); }

/* Print: just the words */
@media print { .hero-media, .pl, .menu-btn, .cb-foot, .qd, .callband .btns { display: none !important; } .hero { min-height: 0; color: #000; background: none; } .hero h1, .hero .lead { color: #000; } }

/* ---------- Small helpers used by the pages ---------- */
.h3 { font-size: clamp(1.2rem, 2vw, 1.38rem); letter-spacing: -.02em; line-height: 1.2; }
.section-more { margin: var(--s3) 0 0; }

/* ---------- The scroll story (library: animations/scroll-story), framed as a golden rectangle ---------- */
.ss { --ss-top: 4.6rem; --ss-top-small: 3.6rem; --ss-bg: var(--paper); --ss-accent: var(--red); margin-top: var(--s3); }
.ss-frame { aspect-ratio: 1.618; border-radius: 0; box-shadow: var(--shadow-paper); background: #f1ece3; }
.ss-step h3 { margin-bottom: .4rem; }
.ss-step p { margin: 0; max-width: 32rem; }
.ss-caption { left: .6rem; bottom: .6rem; }
.ss-caption span { padding: .3rem .55rem; background: rgb(251 248 242 / .94); font: 600 .7rem/1 var(--f-head); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.ss-p5.ss-iris { --ss-x: 58%; --ss-y: 52%; }
@media (max-width: 860px) { .ss-frame { aspect-ratio: 1.618; max-height: 34vh; } }

/* ---------- The hero on a phone: the drawing fills the top, the words sit under it ---------- */
@media (max-width: 55.9rem) {
  .hero { min-height: calc(100svh - var(--cb-h)); }
  .hero-media > svg { top: 0; bottom: auto; height: 66%; }
  .hero::before { background: linear-gradient(to bottom, rgb(14 15 17 / 0) 0%, rgb(14 15 17 / 0) 26%, rgb(14 15 17 / .78) 46%, rgb(20 21 23 / 1) 66%); }
  .hero-in { padding-bottom: calc(var(--s2) + 4.6rem); }
  .hero h1 { font-size: clamp(2.05rem, 9.4vw, 2.6rem); }
  .hero .lead { font-size: 1.02rem; line-height: 1.5; }
  .hero .trust { font-size: .84rem; margin-bottom: var(--s1); }
  .hero .btns { align-items: center; gap: var(--s1) var(--s2); }
  .hero .btn-ghost { border: 0; padding-inline: 0; min-height: 2.75rem; text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 1px; }
  .hero .btn-ghost:hover { background: none; color: #fff; }
}
@media (max-width: 760px) { .hero-in { padding-bottom: calc(var(--s1) + 5rem); } }
@media (max-width: 55.9rem) { .page-head .split { gap: var(--s0); } }
.lost .btns, .callband .btns { margin-bottom: var(--s1); }

/* ---------- Phones: a shorter home page (Jack, 22 Nov 2026: no scrolling for ages) ---------- */
@media (max-width: 45.9rem) {
  .section { padding-block: var(--s3); }
  .section-tight { padding-block: var(--s2); }
  .callband { padding-block: var(--s3); }
  .section-more { margin-top: var(--s1); }
  .hide-phone { display: none; }
  h2 { font-size: clamp(1.6rem, 7.4vw, 1.95rem); }
  .lead { font-size: 1.04rem; }

  /* Services: a short list, the pictures are for wider screens */
  .services { margin-top: var(--s2); gap: 0; border-top: 1px solid var(--line); }
  .services a.frame-link { display: none; }
  .service { gap: .3rem; padding: var(--s1) 0; border-bottom: 1px solid var(--line); }
  .service h3 { margin: 0; }
  .service p { font-size: .95rem; line-height: 1.5; }
  .service .arrow { margin-top: 0; }

  /* Sector tiles: one row to swipe through */
  .sectors-strip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; gap: var(--s1);
    margin: var(--s2) calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) var(--s0); overflow-x: auto;
    scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); overscroll-behavior-x: contain; scrollbar-width: thin; }
  .sectors-strip > * { scroll-snap-align: start; }
  .sectors-strip p { display: none; }

  /* Why 161: the facts side by side */
  .split { gap: var(--s2); }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: var(--s2); }
  .facts li, .facts li:first-child { padding: var(--s1) .5rem var(--s1) 0; }
  .facts b { font-size: 1.02rem; letter-spacing: -.02em; }
  .facts span { display: block; font-size: .76rem; line-height: 1.35; }

  /* Footer: the two link lists side by side */
  .foot { padding-top: var(--s3); }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: var(--s2) var(--s1); }
  .foot-grid > :first-child, .foot-grid > :last-child { grid-column: 1 / -1; }
  .foot-legal { margin-top: var(--s2); }
}

/* the phone icon in the bottom bar and the menu keeps its size whatever the bar is doing */
.cb-foot svg, .menu-call svg { width: 1.1em; height: 1.1em; flex: none; }
@media (min-width: 46rem) { .sectors-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2) var(--s1); } .sectors-strip p { font-size: .94rem; } }
