/* Kitchen Contours: paper and ink, their logo blue as the one accent.
   The ruler ticks down the edge of their logo's K are the thread through the page. */

:root {
  --paper: #f5f4f0;
  --paper-2: #ebe9e3;
  --card: #fbfaf7;
  --ink: #333336;          /* logo charcoal */
  --ink-2: #5b5a5f;
  --line: #cfccc4;
  --line-2: #e0ddd6;
  --blue: #1e64ae;         /* logo blue */
  --blue-deep: #1b5899;    /* their site's hover blue */
  --blue-tint: #e4ecf5;
  --blue-on-ink: #9cbde6;
  --night: #2a2a2d;

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --hh: 64px;              /* header height */
  --pad: clamp(16px, 4.4vw, 40px);
  --max: 1240px;
  --r: 6px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hh) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--sans); letter-spacing: -0.003em;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--blue-deep); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-weight: 500; line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.15rem, 7.4vw, 4.6rem); }
h2 { font-size: clamp(1.75rem, 5.2vw, 3.1rem); }
h3 { font-size: clamp(1.2rem, 2.6vw, 1.45rem); letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { padding-left: 1.2em; }
.wrap { width: min(100% - 2 * var(--pad), var(--max)); margin-inline: auto; }
.narrow { max-width: 40rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Mono labels, numbers, small print */
.mono, .label, .crumb, .meta { font-family: var(--mono); }
.label {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .74rem; line-height: 1.3; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
  margin: 0 0 1.1rem;
}
.label::before { /* a short run of ruler ticks */
  content: ""; width: 26px; height: 9px; flex: none;
  background: repeating-linear-gradient(90deg, var(--blue) 0 1px, transparent 1px 5px) bottom / 100% 5px no-repeat,
              linear-gradient(var(--blue), var(--blue)) 0 100% / 1px 9px no-repeat;
}
.lead { font-size: clamp(1.08rem, 2.2vw, 1.3rem); line-height: 1.5; color: var(--ink); max-width: 36rem; }
.muted { color: var(--ink-2); }
.small { font-size: .86rem; }

/* Skip link */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r); font-weight: 500; text-decoration: none; }
.skip:focus { top: 10px; color: #fff; }

/* Buttons */
.btn {
  --b: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 50px; padding: 0 22px; border-radius: var(--r);
  font: 500 1rem/1 var(--sans); letter-spacing: 0; text-decoration: none; cursor: pointer;
  border: 1px solid var(--b); background: var(--b); color: #fff;
  transition: background-color .25s, border-color .25s, color .25s, transform .25s var(--ease);
}
.btn:hover { --b: var(--blue-deep); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-blue { --b: var(--blue); }
.btn-blue:hover { --b: var(--blue-deep); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: #fff; --b: var(--ink); }
.btn-paper { --b: var(--paper); color: var(--ink); }
.btn-paper:hover { --b: #fff; color: var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn .num { font-family: var(--mono); font-size: .95em; letter-spacing: 0; }
.link-arrow { font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: .45em; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover::after { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Header ---------- */
.hd {
  position: sticky; top: 0; z-index: 40; height: var(--hh);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background-color .3s;
}
.hd-in { height: 100%; display: flex; align-items: center; gap: 18px; transition: transform .35s var(--ease); }
.is-scrolled .hd { border-bottom-color: var(--line-2); }
.brand { display: block; flex: none; transition: transform .35s var(--ease); transform-origin: left center; }
.brand img { height: 38px; width: auto; }
.is-scrolled .brand { transform: scale(.86); }
.hd-phone { margin-left: auto; font: 500 .95rem/1 var(--mono); text-decoration: none; display: none; align-items: center; gap: 8px; white-space: nowrap; }
.hd-phone svg { width: 16px; height: 16px; color: var(--blue); }
.hd-quote { display: none; min-height: 40px; padding: 0 16px; font-size: .92rem; }
.nav { margin-left: auto; order: 3; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px 0 12px;
  background: none; border: 0; font: 500 .78rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); cursor: pointer;
}
.menu-btn i { display: grid; gap: 5px; width: 22px; }
.menu-btn i::before, .menu-btn i::after { content: ""; height: 1.5px; background: currentColor; }
.menu-btn i::after { width: 70%; justify-self: end; }

.nav-panel {
  /* phone menu: a sheet that drops from the header */
  position: fixed; inset: 0 0 auto 0; margin: 0; width: 100%; max-width: none; height: auto; max-height: 100dvh; overflow: auto;
  border: 0; padding: 18px var(--pad) 28px; background: var(--paper); color: var(--ink);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.25);
}
.nav-panel::backdrop { background: rgba(30,30,33,.35); }
.nav-panel ul { list-style: none; margin: 0; padding: 0; }
.nav-panel li a {
  display: flex; justify-content: space-between; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--line-2);
  font-size: 1.35rem; letter-spacing: -0.02em; text-decoration: none;
}
.nav-panel li a::after { content: attr(data-n); font: .72rem var(--mono); color: var(--ink-2); letter-spacing: .06em; }
.nav-panel li a[aria-current="page"] { color: var(--blue); }
.nav-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.nav-close { background: none; border: 0; min-height: 44px; padding: 0 0 0 12px; font: 500 .78rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; color: var(--ink); }
.nav-foot { margin-top: 22px; display: grid; gap: 10px; }
.nav-foot .meta { font-size: .78rem; color: var(--ink-2); }
@media (prefers-reduced-motion: no-preference) {
  .nav-panel:popover-open { animation: drop .45s var(--ease); }
  @keyframes drop { from { transform: translateY(-14px); opacity: 0; } }
}

@media (min-width: 760px) {
  .hd-phone { display: inline-flex; }
  .nav { margin-left: 4px; }
  .hd-quote { display: inline-flex; }
}
@media (min-width: 1240px) {
  :root { --hh: 76px; }
  .menu-btn, .nav-top, .nav-foot { display: none; }
  .nav { order: 0; margin-left: 28px; }
  .nav-panel, .nav-panel:not(:popover-open) {
    display: block; position: static; inset: auto; width: auto; max-height: none; overflow: visible;
    padding: 0; background: none; box-shadow: none;
  }
  .nav-panel ul { display: flex; gap: 2px; }
  .nav-panel li a { font-size: .93rem; padding: 8px 10px; border: 0; letter-spacing: 0; position: relative; }
  .nav-panel li a::after { display: none; }
  .nav-panel li a::before { /* tick under the current page, like the logo's ruler */
    content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 5px;
    background: repeating-linear-gradient(90deg, var(--blue) 0 1px, transparent 1px 4px) bottom / 100% 4px no-repeat;
    transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
  }
  .nav-panel li a:hover::before, .nav-panel li a[aria-current="page"]::before { transform: scaleX(1); }
  .brand img { height: 44px; }
}

/* ---------- Tape: the page pulls out a measuring tape ---------- */
.tape {
  position: fixed; left: 0; right: 0; top: var(--hh); z-index: 39; height: 9px; pointer-events: none;
}
.tape i {
  position: absolute; inset: 0 auto 0 0; width: 100%;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.95) 0 1px, transparent 1px 50px) 0 0 / 100% 7px no-repeat,
    repeating-linear-gradient(90deg, rgba(255,255,255,.75) 0 1px, transparent 1px 10px) 0 0 / 100% 4px no-repeat,
    var(--blue);
  transform-origin: left center; transform: scaleX(var(--p, 0));
}
.tape i::after { /* the hook: the angle of the K in their logo */
  content: ""; position: absolute; right: -6px; top: -2px; width: 7px; height: 13px; background: var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 0 70%, 45% 70%, 45% 30%, 0 30%);
}
@supports (animation-timeline: scroll()) {
  .tape i { animation: pull linear both; animation-timeline: scroll(root); }
  @keyframes pull { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
@media (prefers-reduced-motion: reduce) { .tape { display: none; } }

/* ---------- The deck: each section a drawing sheet that slides over the last ---------- */
.deck { position: relative; }
.sheet {
  position: relative; background: var(--card); border-top: 1px solid var(--line-2);
  border-radius: 14px 14px 0 0; padding: clamp(38px, 9vw, 96px) 0 clamp(42px, 9vw, 104px);
  box-shadow: 0 -18px 40px -26px rgba(40,40,45,.35);
}
.sheet:first-child { border-radius: 0; box-shadow: none; border-top: 0; }
.sheet.alt { background: var(--paper); }
.sheet.ink { background: var(--night); color: #ecebe7; border-top-color: #3a3a3e; }
.sheet.ink .label { color: #bdbbb5; }
.sheet.ink .label::before { --blue: var(--blue-on-ink); background: repeating-linear-gradient(90deg, var(--blue-on-ink) 0 1px, transparent 1px 5px) bottom / 100% 5px no-repeat, linear-gradient(var(--blue-on-ink), var(--blue-on-ink)) 0 100% / 1px 9px no-repeat; }
.sheet.ink a:hover { color: var(--blue-on-ink); }
.sheet-tab { /* sheet number in the top corner, mono, like a drawing set */
  position: absolute; top: 14px; right: var(--pad); font: .7rem var(--mono); letter-spacing: .08em; color: var(--ink-2);
  display: flex; gap: 8px; align-items: center;
}
.sheet.ink .sheet-tab { color: #a9a7a1; }
.js .deck > .sheet.stick { position: sticky; top: var(--stick, var(--hh)); }
.sheet .shade { position: absolute; inset: 0; border-radius: inherit; background: #1c1c1f; opacity: calc(var(--cover, 0) * .38); pointer-events: none; z-index: 5; }
@media (prefers-reduced-motion: no-preference) {
  .js .deck > .sheet.stick > .sheet-body { transform: scale(calc(1 - var(--cover, 0) * .04)); transform-origin: 50% 0; }
}

/* Reveal on arrival */
@media (prefers-reduced-motion: no-preference) {
  .js .rv { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
  .js .rv.in { opacity: 1; transform: none; }
}

/* ---------- Home: the detail ---------- */
.hero { padding: 0; background: var(--paper); }
.hero-grid { display: grid; min-height: calc(100svh - var(--hh)); }
.hero-photo { position: relative; overflow: hidden; background: #ddd; min-height: 40svh; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.hero-photo svg.trace { position: absolute; inset: 0; width: 100%; height: 100%; }
.trace path, .trace line { fill: none; stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trace .acc { stroke: var(--blue); stroke-width: 1.6; }
.hero-note {
  position: absolute; left: 16px; bottom: 16px; right: 16px; max-width: 280px;
  font: .7rem/1.45 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink);
  background: rgba(251,250,247,.9); padding: 10px 12px; border-left: 2px solid var(--blue);
}
.hero-copy { padding: 22px var(--pad) 28px; display: flex; flex-direction: column; justify-content: center; }
.hero-copy h1 { font-size: clamp(2rem, 8.6vw, 4.4rem); margin-bottom: .35em; }
.hero-copy .lead { margin-bottom: 1.3em; }
.hero-copy .btn-row .btn { flex: 1 1 auto; }
.hero-facts { margin: 1.4rem 0 0; font: .72rem/1.5 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
@media (prefers-reduced-motion: no-preference) {
  .hero-photo img, .hero-photo .trace { animation: drift 18s var(--ease) both; }
  @keyframes drift { from { transform: scale(1.12) translate(1.5%, -1%); } to { transform: scale(1); } }
  .trace .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.2s 1s var(--ease) forwards; }
  .trace .draw.d2 { animation-delay: 2.2s; animation-duration: 1s; }
  .hero-note { animation: fade 1s 2.8s both; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  @keyframes fade { from { opacity: 0; transform: translateY(6px); } }
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1fr 1.15fr; min-height: calc(100svh - var(--hh)); max-height: 980px; }
  .hero-copy { order: -1; padding: 60px clamp(28px, 5vw, 80px); }
  .hero-photo { min-height: 0; }
  .hero-note { left: auto; right: 28px; bottom: 28px; }
}

/* ---------- Home: the room ---------- */
.room-photo { position: relative; overflow: hidden; border-radius: var(--r); aspect-ratio: 4 / 3; background: var(--paper-2); }
.room-photo img { width: 100%; height: 100%; object-fit: cover; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .room-photo img { animation: pullback linear both; animation-timeline: view(); animation-range: entry 10% cover 55%; }
    @keyframes pullback { from { transform: scale(1.45); transform-origin: 30% 62%; } to { transform: scale(1); transform-origin: 30% 62%; } }
  }
}
.room-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .room-grid { grid-template-columns: 1.1fr 1fr; gap: 64px; } .room-photo { aspect-ratio: 5 / 6; } }

/* Title block: their facts set out like the corner of a drawing sheet */
.titleblock { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--ink); margin: 26px 0 0; font-family: var(--mono); }
.titleblock div { padding: 10px 12px 11px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); min-width: 0; }
.titleblock div:nth-child(2n) { border-right: 0; }
.titleblock div:nth-last-child(-n+1) { border-bottom: 0; }
.titleblock div.wide { grid-column: 1 / -1; border-right: 0; }
.titleblock dt { font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 3px; }
.titleblock dd { margin: 0; font-size: .86rem; line-height: 1.35; color: var(--ink); font-family: var(--sans); font-weight: 500; }
.titleblock dd b { font-family: var(--mono); font-weight: 500; color: var(--blue); }

/* ---------- Swipe rows ---------- */
.row {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 330px); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 4px var(--pad) 18px; margin: 0 calc(-1 * var(--pad)); scroll-padding-inline: var(--pad);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.row > * { scroll-snap-align: start; }
@media (min-width: 1000px) {
  .row { grid-auto-flow: row; grid-template-columns: repeat(var(--cols, 3), 1fr); overflow: visible; padding: 4px 0 0; margin: 0; }
}
.row-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.row-head h2 { margin: 0; }
.swipe-hint { font: .7rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
@media (min-width: 1000px) { .swipe-hint { display: none; } }

/* Room cards */
.rcard { position: relative; display: block; text-decoration: none; color: var(--ink); }
.rcard figure { margin: 0; overflow: hidden; border-radius: var(--r); aspect-ratio: 4 / 5; background: var(--paper-2); }
.rcard img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.rcard:hover img { transform: scale(1.04); }
.rcard .rc-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 2px 0; }
.rcard h3 { margin: 0; font-size: 1.12rem; }
.rcard .meta { font-size: .7rem; color: var(--ink-2); letter-spacing: .06em; white-space: nowrap; }
.rcard:hover h3 { color: var(--blue-deep); }

/* ---------- Line drawings ---------- */
.ld { stroke: var(--ink); fill: none; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; }
.ld .a { stroke: var(--blue); }
.ld .af { fill: var(--blue); stroke: none; }
.ld .soft { stroke: #9d9a93; }
.ld .hatch { stroke: #a9a69f; stroke-width: .8; }
.ld .dim { stroke: var(--blue); stroke-width: .9; }
.ld text { font: 10px var(--mono); fill: var(--ink-2); stroke: none; letter-spacing: .06em; }
.ld text.at { fill: var(--blue); }
.sheet.ink .ld { stroke: #e8e6e0; }
.sheet.ink .ld .a, .sheet.ink .ld .dim { stroke: var(--blue-on-ink); }
.sheet.ink .ld text { fill: #bdbbb5; }
@media (prefers-reduced-motion: no-preference) {
  .js .ld.sketch [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease); transition-delay: var(--d, 0s); }
  .js .ld.sketch.in [pathLength] { stroke-dashoffset: 0; }
}

.ld .fillp { fill: var(--card); }
.sheet.alt .ld .fillp, .mat .ld .fillp { fill: #fdfcfa; }
.sheet.ink .ld .fillp { fill: var(--night); }
.ld .nofill { fill: none; }
.row-4 { --cols: 4; }
.legend { list-style: none; padding: 0; margin: 0 0 22px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
.legend li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; display: flex; gap: 14px; line-height: 1.4; }
.legend b { font: 500 .76rem/1.75 var(--mono); color: var(--blue); flex: none; }

/* Steps (how a job runs) */
.step { border-top: 1px solid var(--ink); padding-top: 14px; }
.sheet.ink .step { border-top-color: #6b6a6e; }
.step .ld { width: 100%; height: auto; aspect-ratio: 4 / 3; margin: 6px 0 14px; }
.step h3 { display: flex; gap: 10px; align-items: baseline; }
.step h3 .mono { font-size: .75rem; color: var(--blue); }
.sheet.ink .step h3 .mono { color: var(--blue-on-ink); }
.step p { font-size: .95rem; color: inherit; opacity: .86; margin: 0; }

/* Section drawing for materials teaser */
.section-draw { display: grid; gap: 26px; align-items: center; }
.section-draw svg { width: 100%; height: auto; max-width: 520px; justify-self: center; overflow: visible; }
@media (min-width: 900px) { .section-draw { grid-template-columns: 1fr 1.25fr; gap: 60px; } }

/* Showroom */
.visit { display: grid; gap: 28px; }
.visit dl { margin: 0; display: grid; gap: 14px; font-size: 1rem; }
.visit dt { font: .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #bdbbb5; }
.visit dd { margin: 2px 0 0; }
.visit .big-phone { font: 500 clamp(1.6rem, 6vw, 2.6rem)/1.1 var(--mono); letter-spacing: -0.02em; text-decoration: none; display: inline-block; margin: 6px 0 4px; }
@media (min-width: 900px) { .visit { grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: end; } }

/* ---------- Measure up (the interactive feature) ---------- */
.mu { display: grid; gap: 22px; }
.mu-draw { position: relative; border: 1px solid var(--line); border-radius: var(--r); background:
    linear-gradient(var(--line-2) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px) 0 0 / 24px 24px, #fdfcfa; overflow: hidden; }
.mu-draw svg { width: 100%; height: auto; aspect-ratio: 1 / 1; touch-action: none; user-select: none; -webkit-user-select: none; }
.mu-draw .wall { stroke: var(--ink); stroke-width: 2.2; fill: none; stroke-linecap: square; }
.mu-draw .bench { fill: rgba(30,100,174,.07); stroke: var(--ink); stroke-width: 1; }
.mu-draw .bench-line { stroke: #8f8c85; stroke-width: .8; stroke-dasharray: 3 3; fill: none; }
.mu-draw .island { fill: rgba(30,100,174,.12); stroke: var(--blue); stroke-width: 1.2; }
.mu-draw .dimline { stroke: var(--blue); stroke-width: 1; fill: none; }
.mu-draw .dimtext { font: 600 13px var(--mono); fill: var(--blue); text-anchor: middle; }
.mu-draw .dimtext-bg { fill: #fdfcfa; }
.mu-draw .lab { font: 10px var(--mono); fill: var(--ink-2); letter-spacing: .08em; text-anchor: middle; }
.mu-draw .grip { fill: #fff; stroke: var(--blue); stroke-width: 1.6; cursor: grab; }
.mu-draw .grip:hover, .mu-draw .grip.on { fill: var(--blue); }
.mu-draw .grip-hit { fill: transparent; cursor: grab; }
.mu-hint { position: absolute; left: 10px; top: 10px; font: .66rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); background: rgba(253,252,250,.9); padding: 4px 6px; }
.mu-noscript { padding: 18px; font-size: .95rem; }
.mu-form fieldset { border: 0; margin: 0 0 16px; padding: 0; min-width: 0; }
.mu-form legend, .fld > span, .fld > label { font: .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; padding: 0; display: block; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px;
  font-size: .92rem; background: #fff; transition: background-color .2s, border-color .2s, color .2s;
}
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.chip input:hover + span { border-color: var(--ink); }
.mu-dims { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fld { display: block; }
.fld input, .fld select, .fld textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: #fff;
  font: 1rem var(--sans); color: var(--ink);
}
.fld input[type="number"] { font-family: var(--mono); }
.fld textarea { min-height: 96px; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.unit { position: relative; display: block; }
.unit::after { content: "mm"; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: .78rem var(--mono); color: var(--ink-2); pointer-events: none; }
.unit input { padding-right: 42px; }
.mu-out {
  margin: 14px 0 16px; padding: 14px 16px; border: 1px solid var(--ink); border-radius: var(--r); background: #fff;
  font: .88rem/1.5 var(--mono);
}
.mu-out b { font-weight: 600; color: var(--blue); }
.mu-out .k { display: block; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 4px; }
.mu-island { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: .95rem; cursor: pointer; }
.mu-island input { width: 20px; height: 20px; accent-color: var(--blue); }
@media (min-width: 900px) { .mu { grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; } .mu-draw { position: sticky; top: calc(var(--hh) + 24px); } }

/* ---------- Quote drawer ---------- */
.qd {
  margin: auto 0 0; inset: auto 0 0 0; width: 100%; max-width: none; max-height: 92dvh; overflow: auto;
  border: 0; border-radius: 16px 16px 0 0; padding: 0; background: var(--card); color: var(--ink);
  box-shadow: 0 -30px 80px -20px rgba(0,0,0,.35);
}
.qd::backdrop { background: rgba(28,28,31,.45); }
.qd-in { padding: 18px var(--pad) 26px; }
.qd-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.qd-close { background: none; border: 0; min-height: 44px; padding: 0 0 0 12px; font: 500 .74rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; color: var(--ink); }
.qd h2 { font-size: 1.6rem; margin: 0 0 .3em; }
.qd-grip { width: 42px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 10px; }
@media (min-width: 760px) {
  .qd { inset: auto 24px 24px auto; width: 440px; border-radius: 12px; max-height: calc(100dvh - 48px); margin: 0; }
  .qd-grip { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .qd:popover-open { animation: rise .5s var(--ease); }
  @keyframes rise { from { transform: translateY(40px); opacity: 0; } }
}
.qform { display: grid; gap: 12px; }
.qform .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.noted { border: 1px dashed var(--blue); border-radius: var(--r); padding: 10px 12px; background: var(--blue-tint); }
.noted[hidden] { display: none; }
.noted .k { font: .66rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--blue-deep); margin-bottom: 6px; display: block; }
.noted ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.noted li { display: flex; gap: 8px; align-items: start; justify-content: space-between; font: .82rem/1.45 var(--mono); }
.noted li button { background: none; border: 0; padding: 0 2px; min-width: 32px; min-height: 28px; cursor: pointer; color: var(--ink-2); font: 1rem var(--sans); }
.next { list-style: none; counter-reset: n; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line-2); display: grid; gap: 6px; font-size: .86rem; color: var(--ink-2); }
.next li { counter-increment: n; display: flex; gap: 10px; }
.next li::before { content: "0" counter(n); font: .74rem/1.7 var(--mono); color: var(--blue); }
.qd-alt { display: none; }
@supports not selector(:popover-open) { .qd-open { display: none !important; } .qd-alt { display: inline-flex; } }

/* ---------- Bottom call bar (phones) ---------- */
.cbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: flex; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--paper) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line-2); transition: padding .35s var(--ease);
}
.cbar .btn { flex: 1 1 50%; min-height: 50px; padding: 0 12px; font-size: .95rem; transition: flex-basis .35s var(--ease), opacity .25s, min-height .35s var(--ease); }
.cbar .cb-call { flex-basis: 64%; white-space: nowrap; }
.cbar .cb-call .num { font-size: .9em; }
.cbar .cb-quote { white-space: nowrap; }
.is-down .cbar { padding-top: 7px; padding-bottom: calc(7px + env(safe-area-inset-bottom)); }
.is-down .cbar .btn { min-height: 44px; }
.is-down .cbar .cb-quote { flex-basis: 0; padding: 0; opacity: 0; overflow: hidden; border-width: 0; pointer-events: none; }
.is-down .cbar .cb-call { flex-basis: 100%; }
@media (min-width: 760px) { .cbar { display: none; } }

/* ---------- Inner pages ---------- */
.page-hero { padding: clamp(34px, 7vw, 76px) 0 clamp(34px, 6vw, 60px); }
.crumb { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 18px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--blue); }
.page-hero h1 { font-size: clamp(2.1rem, 7.6vw, 4.2rem); max-width: 16ch; }
.ph-grid { display: grid; gap: 26px; }
.ph-photo { margin: 0; border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 3; background: var(--paper-2); }
.ph-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) { .ph-grid { grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: end; } .ph-photo { aspect-ratio: 5 / 4; } }

.cols { display: grid; gap: 28px 48px; }
@media (min-width: 800px) { .cols { grid-template-columns: repeat(var(--cols, 2), 1fr); } }
.prose h2 { margin-top: 0; }
.prose h3 { margin: 1.6em 0 .4em; }
.prose > :first-child { margin-top: 0; }
.ticklist { list-style: none; padding: 0; margin: 0 0 1em; border-top: 1px solid var(--line); }
.ticklist li { padding: 12px 0 12px 28px; border-bottom: 1px solid var(--line); position: relative; }
.ticklist li::before { content: ""; position: absolute; left: 0; top: 21px; width: 16px; height: 7px; background: repeating-linear-gradient(90deg, var(--blue) 0 1px, transparent 1px 5px) bottom / 100% 4px no-repeat, linear-gradient(var(--blue), var(--blue)) 0 100% / 1px 7px no-repeat; }
.sheet.ink .ticklist, .sheet.ink .ticklist li { border-color: #4a4a4e; }

.note-card { border: 1px solid var(--ink); border-radius: var(--r); padding: 20px; background: #fff; }
.note-card h3 { margin-top: 0; }

.photo-strip { --cols: 3; }
.photo-strip figure { margin: 0; }
.photo-strip .ph { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper-2); }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; }
.photo-strip figcaption, .gal figcaption { font: .72rem/1.4 var(--mono); letter-spacing: .04em; color: var(--ink-2); padding-top: 8px; }

.cta-band { display: grid; gap: 20px; align-items: center; }
@media (min-width: 900px) { .cta-band { grid-template-columns: 1.4fr 1fr; } .cta-band .btn-row { justify-content: end; } }

/* ---------- Gallery by room ---------- */
.plan-wrap { display: grid; gap: 22px; }
.plan { /* a floor plan in fine line; every room is a filter */
  display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(4, minmax(54px, auto));
  border: 2px solid var(--ink); background: #fdfcfa; position: relative;
}
.plan label {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 8px 9px;
  border: 1px solid var(--ink); margin: -1px 0 0 -1px; cursor: pointer; min-height: 54px;
  font: 500 .8rem/1.2 var(--sans); transition: background-color .25s, color .25s;
}
.plan label small { font: .62rem var(--mono); letter-spacing: .06em; color: var(--ink-2); }
.plan label:hover { background: var(--blue-tint); }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan input:focus-visible + label { outline: 2px solid var(--blue); outline-offset: -4px; }
.plan input:checked + label { background: var(--blue); color: #fff; }
.plan input:checked + label small { color: #dce7f4; }
.plan .r-all { grid-area: 1 / 1 / 2 / 3; }
.plan .r-kitchen { grid-area: 1 / 3 / 3 / 5; }
.plan .r-pantry { grid-area: 1 / 5 / 2 / 7; }
.plan .r-living { grid-area: 2 / 1 / 4 / 3; }
.plan .r-bath { grid-area: 2 / 5 / 3 / 7; }
.plan .r-study { grid-area: 3 / 3 / 4 / 4; }
.plan .r-bed { grid-area: 3 / 4 / 4 / 7; }
.plan .r-outdoor { grid-area: 4 / 1 / 5 / 4; border-style: dashed; }
.plan .r-commercial { grid-area: 4 / 4 / 5 / 7; border-style: double; border-width: 3px; }
.plan-key { font: .7rem/1.5 var(--mono); color: var(--ink-2); letter-spacing: .04em; margin: 8px 0 0; }
.gal { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 8px; }
.gal figure { margin: 0; }
.gal a { display: block; border-radius: 4px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper-2); }
.gal img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.gal a:hover img { transform: scale(1.04); }
@media (min-width: 700px) { .gal { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1100px) { .gal { grid-template-columns: repeat(4, 1fr); } .plan-wrap { grid-template-columns: 380px 1fr; align-items: start; gap: 48px; } .plan-side { position: sticky; top: calc(var(--hh) + 24px); } }
/* the filter, done in CSS so it works with scripts off */
.galwrap:has(#r-kitchen:checked) .gal figure:not([data-room~="kitchen"]),
.galwrap:has(#r-pantry:checked) .gal figure:not([data-room~="pantry"]),
.galwrap:has(#r-living:checked) .gal figure:not([data-room~="living"]),
.galwrap:has(#r-bath:checked) .gal figure:not([data-room~="bath"]),
.galwrap:has(#r-study:checked) .gal figure:not([data-room~="study"]),
.galwrap:has(#r-bed:checked) .gal figure:not([data-room~="bed"]),
.galwrap:has(#r-outdoor:checked) .gal figure:not([data-room~="outdoor"]),
.galwrap:has(#r-commercial:checked) .gal figure:not([data-room~="commercial"]) { display: none; }
.gal-count { font: .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
@media (prefers-reduced-motion: no-preference) {
  .gal figure { animation: fade .6s var(--ease) both; }
}

/* Lightbox */
.lb { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; width: 100%; height: 100%; margin: 0; inset: 0; }
.lb::backdrop { background: rgba(22,22,24,.92); }
.lb-in { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr auto; color: #eee; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; font: .74rem var(--mono); letter-spacing: .06em; }
.lb-bar button, .lb-nav button { background: none; border: 1px solid #77767b; color: #eee; min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: var(--r); cursor: pointer; font: .74rem var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.lb-fig { margin: 0; display: grid; place-items: center; min-height: 0; padding: 0 10px; }
.lb-fig img { max-width: 100%; max-height: calc(100dvh - 150px); width: auto; height: auto; object-fit: contain; border-radius: 3px; }
.lb-nav { display: flex; justify-content: center; gap: 10px; padding: 12px 14px calc(16px + env(safe-area-inset-bottom)); }

/* ---------- Materials library ---------- */
.mat-jump { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 6px; }
.mat-jump a { font: .74rem var(--mono); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.mat-jump a:hover { border-color: var(--ink); color: var(--ink); }
.mats { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .mats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .mats { grid-template-columns: repeat(var(--cols, 3), 1fr); } }
.mat { border: 1px solid var(--line); border-radius: var(--r); background: #fff; padding: 16px 16px 14px; display: flex; flex-direction: column; }
.mat svg { width: 100%; height: auto; aspect-ratio: 16 / 9; margin-bottom: 12px; background: #fdfcfa; border: 1px solid var(--line-2); border-radius: 3px; }
.mat h3 { font-size: 1.08rem; margin: 0 0 .3em; }
.mat p { font-size: .92rem; color: var(--ink-2); margin: 0 0 12px; }
.mat .note-it { margin-top: auto; align-self: start; }
.note-it {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink); font: .74rem var(--mono); letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
}
.note-it::before { content: "+"; font: 1rem var(--sans); }
.note-it[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.note-it[aria-pressed="true"]::before { content: "✓"; }
.no-js .note-it { display: none; }

/* ---------- Footer ---------- */
.ft { background: var(--night); color: #d8d6d0; padding: 40px 0 calc(96px + env(safe-area-inset-bottom)); font-size: .9rem; }
.ft a { color: #f1efea; text-decoration: none; }
.ft a:hover { color: var(--blue-on-ink); text-decoration: underline; }
.ft-grid { display: grid; gap: 24px 18px; grid-template-columns: 1fr 1fr; }
.ft-grid > :first-child, .ft-grid > :last-child { grid-column: 1 / -1; }
.ft p { margin: 0 0 .6em; }
.ft h2 { font: .7rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: #a9a7a1; margin: 0 0 12px; }
.ft ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ft-logo { display: inline-block; margin-bottom: 14px; }
.ft-logo img { height: 46px; width: auto; }
.ft-base { margin-top: 28px; padding-top: 18px; border-top: 1px solid #45454a; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; font: .72rem/1.6 var(--mono); color: #a9a7a1; letter-spacing: .03em; }
.ft-base a { color: #c9c7c1; }
.ft-ruler { height: 12px; margin: 0 0 26px; background:
  repeating-linear-gradient(90deg, #6d6c70 0 1px, transparent 1px 10px) 0 0 / 100% 5px no-repeat,
  repeating-linear-gradient(90deg, var(--blue-on-ink) 0 1px, transparent 1px 50px) 0 0 / 100% 12px no-repeat; opacity: .8; }
@media (min-width: 760px) { .ft { padding: 56px 0 40px; } .ft-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; } .ft-grid > :first-child, .ft-grid > :last-child { grid-column: auto; } .ft ul { gap: 7px; } }

/* ---------- Photo carry: a picture grows into the top of its own page ---------- */
@view-transition { navigation: auto; }
.vt-kitchens { view-transition-name: kitchens; }
.vt-bathrooms { view-transition-name: bathrooms; }
.vt-wardrobes { view-transition-name: wardrobes; }
.vt-living { view-transition-name: living; }
.vt-commercial { view-transition-name: commercial; }
.vt-pantry { view-transition-name: pantry; }
::view-transition-group(*) { animation-duration: .55s; animation-timing-function: var(--ease); }
::view-transition-old(*), ::view-transition-new(*) { height: 100%; object-fit: cover; overflow: clip; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* Kitchen shapes */
.shapes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 8px 0 22px; }
.shape { margin: 0; border: 1px solid var(--line); border-radius: var(--r); background: #fdfcfa; padding: 14px; }
.shape svg { width: 100%; height: auto; }
.shape .a { fill: var(--blue-tint); }
.shape figcaption { font: .74rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-top: 8px; }
@media (min-width: 800px) { .shapes { grid-template-columns: repeat(4, 1fr); gap: 20px; } }

/* Bathroom budget lists */
.budget { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ink); }
.budget div { padding: 12px 10px 14px; border-right: 1px solid var(--ink); display: grid; gap: 22px; }
.budget div:last-child { border-right: 0; }
.budget .mono { font-size: .72rem; color: var(--blue); }
.budget b { font-weight: 500; font-size: .95rem; line-height: 1.2; }

.mats-4 { --cols: 4; }
.plan-set { border: 0; margin: 0; padding: 0; min-width: 0; }
.lb-cap { flex: 1; margin: 0; align-self: center; text-align: center; font: .72rem/1.4 var(--mono); color: #cfcdc7; }
.contact-block { margin: 0; align-self: end; }
.contact-block a { text-decoration: none; }
.contact-block a:hover { text-decoration: underline; }

/* ---------- 404 ---------- */
.lost { min-height: 70svh; display: grid; align-items: center; }
.lost svg { max-width: 300px; margin: 24px 0 18px; }

/* Print */
@media print { .hd, .cbar, .tape, .qd, .ft-ruler { display: none !important; } .sheet { box-shadow: none; } }

.mu-more { margin: 14px 0 0; }
/* on phones the call bar is already under the thumb, so the hero leads with the tool */
@media (max-width: 759px) { .hero-copy .btn-row .btn-blue { display: none; } }
.room-p { color: var(--ink-2); }
@media (max-width: 420px) { .cbar .btn { padding: 0 10px; gap: .45em; } .cbar .btn svg { width: 16px; height: 16px; } }

@media (max-width: 759px) { .ft-about { display: none; } }
.btn-row .link-arrow { margin-right: 18px; }
@media (max-width: 759px) {
  .ft-grid > :first-child { display: none; }
  .mu-compact .chips { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
  .mu-compact .chip { flex: none; }
}

/* wide-screen header: everything on one line */
.hd-quote, .hd-phone, .nav-panel li a { white-space: nowrap; }
@media (min-width: 1240px) {
  .nav-panel li a { padding: 8px 8px; }
  .nav-panel li a::before { left: 8px; right: 8px; }
  .hd-phone { font-size: 0; gap: 0; width: 44px; height: 44px; justify-content: center; border: 1px solid var(--line); border-radius: 50%; }
  .hd-phone svg { width: 18px; height: 18px; }
}
@media (min-width: 1440px) {
  .hd-phone { font-size: .95rem; gap: 8px; width: auto; height: auto; border: 0; border-radius: 0; }
}
@media (min-width: 900px) { .hero-copy h1 { font-size: clamp(2.4rem, 4.3vw, 4.1rem); } }

@media (min-width: 1000px) { .rcard figure { aspect-ratio: 4 / 3; } }
@media (max-width: 759px) {
  .page-hero .ph-grid .btn-row { display: none; }
  .page-hero .lead { margin-bottom: 0; }
  .ph-photo { aspect-ratio: 3 / 2; }
}
/* the gallery plan reads as a plan: a door swing in some rooms */
.plan .r-kitchen::after, .plan .r-bath::after, .plan .r-bed::after, .plan .r-living::after, .plan .r-study::after {
  content: ""; position: absolute; top: -1px; right: 8px; width: 16px; height: 16px; background: #fdfcfa;
  border-left: 1px solid var(--ink); border-bottom: 1px dotted var(--ink); border-bottom-left-radius: 16px;
}
.plan input:checked + label::after { background: var(--blue); border-color: #fff; }
@media (max-width: 699px) { .gal figcaption { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .66rem; } }
