/* ==========================================================
   Kennet & Basing — UI system v3
   Brand tokens from the KB Branding Figma file, extended with
   a warm "vellum" paper canvas and a red-oxide "primer" accent.
   Language: rounded cards on paper, the KB-shape button,
   and the Bays + Sections illustration systems (js/kb-art.js).
   ========================================================== */
:root {
  /* Primitives — Figma */
  --white: #ffffff;
  --n-100: #efeff1; --n-200: #dcdde1; --n-300: #b9bbc3; --n-400: #8f919b; --n-500: #6c6f7a;
  --n-600: #4e515c; --n-700: #363942; --n-800: #1f2128; --n-900: #0f1115;
  --t-100: #e3f1f4; --t-200: #b8dce3; --t-300: #8cc7d1; --t-400: #5fb1be; --t-500: #19748a;
  --t-600: #155f70; --t-700: #104a56; --t-800: #0a353d; --t-900: #052023;
  --g-100: #f0fff6; --g-200: #d6fbe6; --g-300: #a6f5c0; --g-400: #7eeaa5; --g-500: #5ed88e;
  --g-600: #3fb877; --g-700: #2e8f5c; --g-800: #1e6642; --g-900: #0f3d27;
  /* Proposed extensions */
  --paper: #f4f2ed; --paper-2: #e9e5dc; --paper-3: #dcd6ca;   /* vellum */
  --p-200: #f2d3c7; --p-300: #e6a58e; --p-500: #c4563c; --p-700: #8a3423; /* red-oxide primer */

  /* Semantics */
  --bg: var(--paper);
  --text: var(--n-800);
  --text-2: var(--n-500);
  --ink: var(--t-800);
  --border: rgba(10, 53, 61, .12);
  --action: var(--t-600);
  --action-hover: var(--t-700);

  /* Type */
  --f-head: "Roboto", system-ui, sans-serif;
  --f-body: "Inter", system-ui, -apple-system, sans-serif;
  --f-mono: "Roboto Mono", ui-monospace, Menlo, monospace;

  /* Shape */
  --r-sm: 6px; --r-md: 12px; --r-lg: 20px;


  /* Fluid layout */
  --gutter: clamp(20px, 4.2vw, 96px);
  --max: 1760px;
  --gap: clamp(12px, 1.1vw, 24px);
  --header-h: 72px;
  --sec-y: clamp(80px, 9vw, 160px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
@media (min-width: 768px) { :root { --header-h: 80px; } }
@media (min-width: 1600px) { :root { --header-h: 92px; } }

*, *::before, *::after { box-sizing: border-box; }
html { font-size: clamp(16px, 0.42vw + 10.6px, 19px); scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.5 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible { outline: 2px solid var(--t-700); outline-offset: 3px; border-radius: 4px; }
.section--dark :focus-visible, .mobile-menu :focus-visible, .lightbox :focus-visible { outline-color: var(--g-400); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--t-800); color: var(--white); padding: 12px 16px; border-radius: var(--r-sm); text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- Type ---------- */
.hero__title { font: 700 clamp(2.5rem, 5vw, 6.5rem)/1.04 var(--f-head); letter-spacing: -0.03em; color: var(--ink); text-wrap: balance; }
.h2 { font: 700 clamp(2rem, 3.4vw, 4.25rem)/1.1 var(--f-head); letter-spacing: -0.025em; color: var(--ink); text-wrap: balance; max-width: 20ch; }
.section--dark .h2 { color: var(--white); }
.label { display: inline-flex; align-items: center; gap: 10px; font: 500 .74rem/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--t-500); margin-bottom: 20px; }
.label::before { content: ""; width: 8px; height: 8px; background: currentColor; border-radius: 2px; }
.section--dark .label { color: var(--g-500); }

/* ==========================================================
   KB shape button — the logomark silhouette: top-left and
   bottom-right chamfered at ~41°, every joint rounded, the
   other two corners soft. Responsive: four corner tiles sized
   from the button's height + stretchable middle bands (mask),
   so curves stay true at any width and colour still animates.
   ========================================================== */
:root {
  --kb-tl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M100 0L97 0C82 0 74 3 64 11L17 51C5 61 0 71 0 85L0 100L100 100Z'/%3E%3C/svg%3E");
  --kb-tr: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 0L60 0C88 0 100 12 100 40L100 100L0 100Z'/%3E%3C/svg%3E");
  --kb-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M100 100L40 100C12 100 0 88 0 60L0 0L100 0Z'/%3E%3C/svg%3E");
  --kb-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M0 100L3 100C18 100 26 97 36 89L83 49C95 39 100 29 100 15L100 0L0 0Z'/%3E%3C/svg%3E");
}
.sbtn, .sbtn::before, .sbtn::after,
.nav__list, .nav__list a, .filters__group, .chip, .secnav, .secnav__list a, .tool-badge {
  --t: calc(var(--h) * .4);
  -webkit-mask:
    var(--kb-tl) left top / var(--t) var(--t) no-repeat,
    var(--kb-tr) right top / var(--t) var(--t) no-repeat,
    var(--kb-bl) left bottom / var(--t) var(--t) no-repeat,
    var(--kb-br) right bottom / var(--t) var(--t) no-repeat,
    linear-gradient(#000 0 0) center / calc(100% - 2 * var(--t) + 2px) 100% no-repeat,
    linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--t) + 2px) no-repeat;
          mask:
    var(--kb-tl) left top / var(--t) var(--t) no-repeat,
    var(--kb-tr) right top / var(--t) var(--t) no-repeat,
    var(--kb-bl) left bottom / var(--t) var(--t) no-repeat,
    var(--kb-br) right bottom / var(--t) var(--t) no-repeat,
    linear-gradient(#000 0 0) center / calc(100% - 2 * var(--t) + 2px) 100% no-repeat,
    linear-gradient(#000 0 0) center / 100% calc(100% - 2 * var(--t) + 2px) no-repeat;
}
.sbtn {
  --bg: var(--action); --bg-h: var(--action-hover); --fg: var(--t-100);
  --h: 48px; --pad: 22px;
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--h); padding: 0 calc(var(--pad) + var(--h) * .14);
  border: 0; background: var(--bg); color: var(--fg);
  font: 500 1rem/1 var(--f-body); letter-spacing: -0.005em; text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease), transform .18s var(--ease);
}
.sbtn__label, .sbtn__icon { position: relative; display: flex; align-items: center; }
.sbtn__icon { justify-content: center; }
.sbtn:hover { background: var(--bg-h); transform: translateY(-1px); }
.sbtn:active { transform: translateY(1px); }
/* focus: a ring that follows the shape (the mask would clip a normal outline) */
.sbtn:focus-visible { outline: none; }
.sbtn::before, .sbtn::after { content: ""; position: absolute; pointer-events: none; opacity: 0; z-index: -1; }
.sbtn::before { inset: 3px; --h: calc(var(--hh, 48px) - 6px); background: var(--fg); }
.sbtn::after { inset: 5px; --h: calc(var(--hh, 48px) - 10px); background: var(--bg); }
.sbtn:hover::after { background: var(--bg-h); }
.sbtn:focus-visible::before, .sbtn:focus-visible::after { opacity: 1; }

/* Icons (masked, take currentColor) */
.ic { width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; transition: transform .25s var(--ease); }
.ic--plus  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.ic--arrow { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.ic--down  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6'/%3E%3C/svg%3E"); }
.ic--copy  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='12' height='12' rx='2'/%3E%3Cpath d='M16 8V5a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h3'/%3E%3C/svg%3E"); }
.ic--send  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M8 7h9v9'/%3E%3C/svg%3E"); }
.ic--check { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.sbtn:hover .ic--plus { transform: rotate(90deg); }
.sbtn:hover .ic--arrow, .sbtn:hover .ic--send { transform: translateX(2px); }
.sbtn:hover .ic--down { transform: translateY(2px); }

/* Variants */
.sbtn--ink   { --bg: var(--t-900); --bg-h: var(--t-800); --fg: var(--white); }
.sbtn--light { --bg: var(--paper-2); --bg-h: var(--paper-3); --fg: var(--t-800); }
.sbtn--mint  { --bg: var(--g-500); --bg-h: var(--g-400); --fg: var(--g-900); }
.sbtn--glass { --bg: rgba(227,241,244,.1); --bg-h: rgba(227,241,244,.18); --fg: var(--t-100); }
.sbtn[aria-disabled="true"], .sbtn:disabled { --bg: var(--paper-2); --bg-h: var(--paper-2); --fg: var(--n-400); pointer-events: none; }
.sbtn--icon { padding: 0; width: calc(var(--h) * 1.25); gap: 0; }
/* Sizes */
.sbtn--sm { --h: 40px; --hh: 40px; --pad: 16px; font-size: .9rem; gap: 10px; }
.sbtn--sm .ic { width: 16px; height: 16px; }
.sbtn--lg { --h: 56px; --hh: 56px; --pad: 26px; font-size: 1.05rem; }
.sbtn--block { display: flex; width: 100%; }
.sbtn--block .sbtn__label { flex: 1; justify-content: center; }
.sbtn--xl { --h: 72px; --hh: 72px; --pad: 34px; font-size: 1.25rem; gap: 16px; }
.sbtn--xl .ic { width: 22px; height: 22px; }

/* ---------- Art slots (kb-art.js renders into these) ---------- */
[data-art] { position: relative; overflow: hidden; }
[data-art] > svg { width: 100%; height: 100%; }

/* ---------- Image frames ---------- */
.frame { position: relative; display: block; overflow: hidden; border-radius: var(--r-md); background: var(--t-100); isolation: isolate; }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.frame--tint img { mix-blend-mode: multiply; }
.frame--paper { background: var(--white); box-shadow: inset 0 0 0 1px var(--border); }
.frame--paper img { mix-blend-mode: multiply; }
.frame--contain img { object-fit: contain; padding: 18px; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 50; background: rgba(244,242,237,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .25s; }
.header.is-scrolled { border-bottom-color: var(--border); }
.header__inner { height: var(--header-h); display: flex; align-items: center; gap: 28px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--t-800); }
.logo__mark { width: 50px; height: auto; }
.logo__word { display: grid; font: 800 1.02rem/.95 var(--f-body); letter-spacing: -0.01em; }
.logo__word span { font-weight: 300; }
.nav { margin-left: auto; display: none; }
.nav__list { --h: 46px; display: flex; align-items: center; gap: 2px; height: var(--h); padding: 0 4px; background: var(--paper-2); }
.nav__list a { --h: 38px; display: flex; align-items: center; height: var(--h); padding: 0 16px; white-space: nowrap; font-size: .92rem; font-weight: 500; color: var(--n-600); text-decoration: none; transition: color .2s, background-color .2s; }
.nav__list a:hover { color: var(--t-800); background: rgba(255,255,255,.55); }
.nav__list a[aria-current="true"] { color: var(--t-800); background: var(--white); }
.header__cta { display: none; margin-left: calc(6px - 28px); }
.header__cta.sbtn { --h: 46px; --hh: 46px; }
.menu-btn { margin-left: auto; width: 44px; height: 44px; display: grid; place-items: center; background: var(--paper-2); border: 0; border-radius: var(--r-sm); }
.menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after { display: block; width: 18px; height: 2px; background: var(--t-800); position: relative; transition: transform .25s var(--ease), background .2s; }
.menu-btn__bars::before, .menu-btn__bars::after { content: ""; position: absolute; left: 0; }
.menu-btn__bars::before { top: -6px; }
.menu-btn__bars::after { top: 6px; }
.menu-btn[aria-expanded="true"] .menu-btn__bars { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars::after { transform: translateY(-6px) rotate(-45deg); }
.mobile-menu { position: fixed; inset: var(--header-h) 0 0 0; z-index: 49; background: var(--t-900); color: var(--white); padding: 24px var(--gutter) 32px; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; overflow-y: auto; }
.mobile-menu[hidden] { display: none; }
.mobile-menu li { border-bottom: 1px solid var(--t-700); }
.mobile-menu ul a { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; text-decoration: none; font: 700 1.9rem/1.1 var(--f-head); }
.mobile-menu ul a::after { content: "→"; font-weight: 400; font-size: 1.2rem; color: var(--g-500); }
body.menu-open { overflow: hidden; }
@media (min-width: 1000px) { .nav, .header__cta { display: flex; } .menu-btn, .mobile-menu { display: none !important; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero > .wrap { container-type: inline-size; }
.hero__grid { position: relative; display: grid; gap: 36px; padding-block: 40px 56px; }
.hero__copy { align-self: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 12px 7px 8px; background: var(--paper-2); border-radius: 999px; font: 500 .74rem/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--t-700); margin-bottom: 26px; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--g-500); box-shadow: 0 0 0 3px rgba(94,216,142,.25); }
.hero__title span { color: var(--t-500); }
.hero__lede { margin-top: 1.5rem; font-size: clamp(1.05rem, 1.15vw, 1.3rem); line-height: 1.45; color: var(--n-600); max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2rem; }
.hero__facts { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; margin-top: clamp(32px, 4vh, 56px); border-top: 1px solid var(--border); }
.hero__facts div { padding: 18px clamp(14px, 2vw, 36px) 0 0; margin-right: clamp(14px, 2vw, 36px); border-right: 1px solid var(--border); }
.hero__facts div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hero__facts dt { font: 700 clamp(1.2rem, 1.6vw, 1.9rem)/1.05 var(--f-head); color: var(--t-800); white-space: nowrap; letter-spacing: -0.01em; }
@media (max-width: 600px) { .hero__facts dt { white-space: normal; font-size: 1.15rem; } }
.hero__facts dd { margin-top: 6px; font-size: .85rem; color: var(--text-2); max-width: 17ch; line-height: 1.35; }
.hero__media { position: relative; margin-right: calc((100cqw - 100vw) / 2); }
.hero__media .frame { aspect-ratio: 16 / 10; border-radius: var(--r-lg) 0 0 var(--r-lg); background: var(--t-100); }
.hero__media .frame img { object-fit: contain; padding: 4% 3%; transform: scale(1.12); }
.hero__bays { position: absolute; left: 0; right: 0; bottom: 0; height: 22%; opacity: .9; z-index: -1; }
.hero__piece { position: absolute; left: clamp(-56px, -3vw, -16px); bottom: clamp(20px, 3.4vw, 56px); width: clamp(110px, 10vw, 200px); aspect-ratio: 1; padding: 12px; background: var(--white); border-radius: var(--r-md); box-shadow: 0 10px 30px rgba(5,32,35,.12); }
@media (max-width: 560px) {
  .hero__actions .sbtn { width: 100%; display: flex; }
  .hero__actions .sbtn__label { flex: 1; justify-content: center; }
  .hero__facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero__piece { left: 12px; bottom: -24px; width: 96px; }
}
@media (min-width: 1000px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(40px, 4vw, 96px); min-height: calc(100svh - var(--header-h)); padding-block: 0; }
  .hero__copy { padding: 48px 0 56px; }
  .hero__media { align-self: stretch; padding-block: clamp(16px, 2vw, 32px); }
  .hero__media .frame { aspect-ratio: auto; height: 100%; min-height: 520px; }
  .hero__media .frame img { position: absolute; inset: 0; padding: 8% 4% 8% 8%; transform: scale(1.1); }
}
@media (prefers-reduced-motion: no-preference) {
  .enter { animation: enter .9s var(--ease) both; animation-delay: calc(var(--d, 0) * 90ms + 80ms); }
  .hero__media.enter { animation-name: enterMedia; animation-duration: 1.1s; }
}
@keyframes enter { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes enterMedia { from { opacity: 0; clip-path: inset(-30% -30% 100% -30%); } to { opacity: 1; clip-path: inset(-30% -30% -30% -30%); } }

/* ---------- Sections ---------- */
.section { padding: var(--sec-y) 0; }
.section--dark { background: var(--t-900); color: var(--t-100); }
.section--board { background: var(--paper-2); }
.section-head { display: grid; gap: 20px; align-items: end; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head__aside { color: var(--text-2); font-size: 1.05rem; max-width: 44ch; }
.section--dark .section-head__aside { color: var(--t-300); }
@media (min-width: 960px) { .section-head { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(48px, 6vw, 140px); } }

/* About */
.split { display: grid; gap: 28px; }
.split__text { display: grid; gap: 18px; font-size: 1.1rem; line-height: 1.55; color: var(--n-600); align-content: end; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(48px, 6vw, 140px); } }
.team { display: grid; gap: var(--gap); margin-top: clamp(48px, 6vw, 96px); }
.team li { position: relative; background: var(--white); border-radius: var(--r-lg); padding: 24px; display: grid; grid-template-rows: auto 1fr auto; min-height: 260px; transition: transform .25s var(--ease), box-shadow .25s; }
.team li:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(5,32,35,.08); }
.team__top { display: flex; justify-content: space-between; align-items: flex-start; }
.team__n { font: 500 .74rem/1 var(--f-mono); color: var(--t-500); letter-spacing: .1em; }
.team__art { width: clamp(96px, 7vw, 130px); height: clamp(72px, 5.2vw, 96px); }
.team h3 { margin: 24px 0 6px; font: 700 1.3rem/1.25 var(--f-head); color: var(--t-800); align-self: end; }
.team p { color: var(--n-600); font-size: .95rem; }
@media (min-width: 640px) { .team { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .team { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Services */
/* Six services in one compact row: a grid of 6 on wide screens, a swipe row below that */
.services { display: flex; gap: var(--gap); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter) 6px; scroll-padding-inline: var(--gutter); }
.services::-webkit-scrollbar { display: none; }
.svc { flex: 0 0 min(250px, 70vw); scroll-snap-align: start; background: var(--t-800); border-radius: var(--r-lg); padding: 8px 8px 20px; display: flex; flex-direction: column; transition: transform .25s var(--ease), background-color .25s; }
.svc:hover { transform: translateY(-2px); background: var(--t-700); }
.svc__art { position: relative; aspect-ratio: 5 / 4; border-radius: var(--r-md); overflow: hidden; background: var(--paper); margin-bottom: 16px; }
.svc h3, .svc p { padding-inline: 12px; }
.svc h3 { font: 700 1.05rem/1.25 var(--f-head); color: var(--white); margin-bottom: 6px; }
.svc p { color: var(--t-300); font-size: .84rem; line-height: 1.45; }
@media (min-width: 1100px) { .services { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: visible; margin-inline: 0; padding: 0; } .svc { flex: none; } }
.extras { display: grid; gap: var(--gap); margin-top: var(--gap); }
.extras li { padding: 22px 28px; border: 1px solid var(--t-700); border-radius: var(--r-lg); display: grid; gap: 4px; }
.extras h3 { font: 600 1.05rem/1.3 var(--f-body); color: var(--g-400); }
.extras p { color: var(--t-300); font-size: .95rem; }
@media (min-width: 800px) { .extras { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Process */
/* Process — a structural gridline: grid bubbles 01–06 on a set-out line that draws itself in */
.flow { --b: 54px; position: relative; display: grid; gap: 28px; padding-left: calc(var(--b) + 20px); }
.flow::before, .flow::after { content: ""; position: absolute; left: calc(var(--b) / 2 - 1px); top: calc(var(--b) / 2); bottom: calc(var(--b) / 2); width: 2px; }
.flow::before { background: repeating-linear-gradient(180deg, var(--n-300) 0 6px, transparent 6px 11px); }
.flow::after { background: var(--t-500); transform-origin: top; transform: scaleY(var(--p, 1)); transition: transform 2.6s cubic-bezier(.45,0,.2,1); }
.flow__step { position: relative; min-height: var(--b); }
.flow__bubble { position: absolute; left: calc((var(--b) + 20px) * -1); top: 0; z-index: 1; width: var(--b); height: var(--b); display: grid; place-items: center; border-radius: 50%; background: var(--t-800); color: #fff; box-shadow: 0 0 0 1.5px var(--t-800), 0 0 0 7px var(--paper); font: 500 .95rem/1 var(--f-mono); letter-spacing: .04em; transition: background-color .5s var(--ease), color .5s var(--ease); transition-delay: calc(var(--i) * .42s + .1s); }
.flow__bubble::after { content: ""; position: absolute; left: 50%; bottom: -12px; width: 7px; height: 7px; margin-left: -3.5px; background: var(--t-800); }
.flow__body { padding-top: 4px; }
.flow__tag { display: inline-block; margin-bottom: 8px; padding: 3px 8px; border-radius: 5px; background: var(--paper-2); font: 500 .68rem/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--t-600); }
.flow h3 { font: 700 1.25rem/1.25 var(--f-head); color: var(--t-800); margin-bottom: 6px; }
.flow p { color: var(--n-600); font-size: .96rem; max-width: 40ch; }
/* before it enters view: line undrawn, bubbles open */
.flow.is-armed::after { --p: 0; }
.flow.is-armed .flow__bubble { background: var(--paper); color: var(--t-800); }
@media (min-width: 900px) {
  .flow { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(16px, 2vw, 36px); padding-left: 0; padding-top: calc(var(--b) + 28px); }
  .flow::before, .flow::after { left: calc(100% / 12); right: calc(100% / 12); top: calc(var(--b) / 2 - 1px); bottom: auto; width: auto; height: 2px; }
  .flow::before { background: repeating-linear-gradient(90deg, var(--n-300) 0 6px, transparent 6px 11px); }
  .flow::after { transform-origin: left; transform: scaleX(var(--p, 1)); }
  .flow__bubble { left: 50%; top: calc((var(--b) + 28px) * -1); margin-left: calc(var(--b) / -2); }
  .flow__step { text-align: center; }
  .flow p { margin-inline: auto; }
}
@media (prefers-reduced-motion: reduce) { .flow::after, .flow__bubble { transition: none; } }

/* Work */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 28px; }
.filters__group { --h: 48px; display: inline-flex; align-items: center; gap: 2px; height: var(--h); padding: 0 4px; background: var(--paper-3); }
.filters__group { overflow-x: auto; scrollbar-width: none; max-width: 100%; overscroll-behavior-x: contain; } .filters__group::-webkit-scrollbar { display: none; }
.chip { --h: 40px; flex: none; white-space: nowrap; height: var(--h); padding: 0 18px; background: transparent; border: 0; font-size: .9rem; font-weight: 500; color: var(--t-800); transition: background-color .2s, color .2s; }
.chip:hover { background: rgba(255,255,255,.55); }
.chip[aria-pressed="true"] { background: var(--white); }
.filters__count { margin-left: auto; font: 500 .72rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--text-2); }
@media (max-width: 640px) { .filters__count { display: none; } }
/* Compact, uniform thumbnails — click any one for the full-screen viewer */
.gallery { display: grid; gap: clamp(10px, 1vw, 18px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gallery__item[hidden] { display: none; }
@media (min-width: 720px) { .gallery { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
@media (min-width: 1600px) { .gallery { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); } }
.tile { display: flex; flex-direction: column; gap: 0; width: 100%; height: 100%; padding: 6px; background: var(--white); border: 0; border-radius: var(--r-md); text-align: left; cursor: zoom-in; transition: transform .25s var(--ease), box-shadow .25s; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(5,32,35,.08); }
.tile .frame { aspect-ratio: 4 / 3; border-radius: 8px; }
.tile .frame--contain img { padding: 10px; }
.tile:hover .frame img { transform: scale(1.03); }
.tile__meta { display: grid; gap: 1px; padding: 9px 6px 4px; min-width: 0; }
.tag { justify-self: start; display: inline-block; padding: 3px 8px; margin-bottom: 6px; background: var(--t-100); border-radius: 5px; font: 500 .68rem/1.4 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--t-600); }
.tile__meta strong { font: 700 .95rem/1.25 var(--f-head); color: var(--t-800); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile__meta > span:last-child { color: var(--text-2); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .tag { padding: 2px 6px; margin-bottom: 4px; font-size: .62rem; }
.tile .frame::after { content: ""; position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 7px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a353d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-6 6M4 20l6-6'/%3E%3C/svg%3E") center / 15px no-repeat; box-shadow: 0 2px 8px rgba(5,32,35,.12); opacity: 0; transform: scale(.85); transition: opacity .2s, transform .25s var(--ease); }
.tile:hover .frame::after, .tile:focus-visible .frame::after { opacity: 1; transform: none; }
@media (hover: none) { .tile .frame::after { opacity: 1; transform: none; } }

/* Case study */
.case { display: grid; gap: 48px; }
.case__lede { margin-top: 22px; font-size: 1.08rem; line-height: 1.55; color: var(--t-200); max-width: 52ch; }
.specs { margin-top: 32px; display: grid; gap: 8px; }
.specs div { display: grid; gap: 4px; padding: 14px 16px; background: rgba(227,241,244,.06); border-radius: var(--r-md); }
.specs dt { font: 500 .7rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--g-500); }
.specs dd { font-weight: 500; color: var(--white); }
@media (min-width: 560px) { .specs div { grid-template-columns: 9rem 1fr; gap: 16px; align-items: baseline; } }
.case__media { display: grid; gap: var(--gap); }
.tile--bare { display: block; height: auto; padding: 0; background: none; border-radius: var(--r-md); }
.tile--bare:hover { box-shadow: none; }
.case__main .frame { aspect-ratio: 2 / 1; border-radius: var(--r-lg); }
.case__main, .case__thumbs .tile--bare { cursor: zoom-in; }
.case__thumbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.case__thumbs .frame { aspect-ratio: 3 / 2; }
.tile--bare:hover .frame img { transform: scale(1.03); }
@media (min-width: 640px) { .case__thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .case { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(48px, 5vw, 112px); align-items: center; } }

/* Model → drawing */
.m2d { display: grid; gap: var(--gap); }
@media (min-width: 1100px) { .m2d { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.m2d__pair { display: grid; gap: 12px; align-items: stretch; padding: 10px; background: var(--white); border-radius: var(--r-lg); }
.m2d__model { aspect-ratio: 16 / 10; max-height: 220px; }
.m2d__drawing { cursor: zoom-in; }
.m2d__drawing .frame { aspect-ratio: 16 / 8; }
.m2d__arrow { display: grid; place-items: center; min-height: 32px; color: var(--g-600); }
.m2d__arrow .ic { width: 26px; height: 26px; transform: rotate(90deg); }
@media (min-width: 640px) {
  .m2d__pair { grid-template-columns: minmax(0, 1fr) clamp(28px, 3vw, 48px) minmax(0, 2.2fr); gap: clamp(8px, 1vw, 16px); }
  .m2d__model { aspect-ratio: auto; min-height: 100%; }
  .m2d__drawing { display: flex; }
  .m2d__drawing .frame { flex: 1; width: 100%; }
  .m2d__arrow .ic { transform: none; }
}

/* Statement — type moment with the Bays system */
.statement { background: var(--g-500); color: var(--g-900); padding: clamp(64px, 8vw, 128px) 0; overflow: hidden; }
.statement .wrap { display: grid; gap: clamp(32px, 4vw, 72px); align-items: center; }
.statement__line { font: 800 clamp(2.6rem, 7vw, 8rem)/.98 var(--f-head); letter-spacing: -0.04em; }
.statement__line span { display: block; color: var(--t-900); font-weight: 400; }
.statement__art { aspect-ratio: 3 / 2; background: var(--paper); border-radius: var(--r-lg); padding: clamp(12px, 1.4vw, 24px); }
@media (min-width: 900px) { .statement .wrap { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } }

/* Contact */
.contact { display: grid; gap: 56px; }
.contact__lede { margin-top: 20px; font-size: 1.12rem; line-height: 1.5; color: var(--t-200); max-width: 48ch; }
.email-card { margin-top: 36px; display: grid; gap: 14px; justify-items: start; padding: 22px; background: rgba(227,241,244,.06); border-radius: var(--r-lg); }
.email-card .label { margin: 0; }
.email-card__addr { font: 700 clamp(1.35rem, 2.6vw, 2rem)/1.2 var(--f-head); color: var(--white); text-decoration: none; word-break: break-all; background: linear-gradient(var(--g-500), var(--g-500)) 0 100% / 0 2px no-repeat; transition: background-size .35s var(--ease); }
.email-card__addr:hover { background-size: 100% 2px; }
.promises { display: grid; gap: 20px; margin-top: 32px; }
.promises li { display: grid; gap: 2px; padding-left: 18px; border-left: 2px solid var(--g-500); }
.promises strong { color: var(--white); font-weight: 600; }
.promises span { color: var(--t-300); font-size: .93rem; }
@media (min-width: 600px) { .promises { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; } }
@media (min-width: 1000px) { .contact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(48px, 6vw, 140px); align-items: start; } }

.form { background: var(--paper); color: var(--text); padding: clamp(24px, 3.4vw, 40px); border-radius: var(--r-lg); display: grid; gap: 18px; }
.form__title { font: 700 1.5rem/1.25 var(--f-head); color: var(--t-800); }
.form__hint { color: var(--text-2); font-size: .92rem; margin-top: -8px; }
.field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font: 500 .72rem/1.3 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--n-600); padding: 0; }
.opt { text-transform: none; letter-spacing: 0; font-family: var(--f-body); color: var(--text-2); }
.field input[type="text"], .field input[type="email"], .field input[type="url"], .field input[type="date"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1px solid transparent; border-radius: var(--r-sm); background: var(--white); color: var(--text);
  font: 400 1rem/1.4 var(--f-body); box-shadow: inset 0 0 0 1px var(--border); transition: box-shadow .15s;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--t-800) 50%), linear-gradient(135deg, var(--t-800) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 38px; }
.field textarea { resize: vertical; min-height: 96px; }
.field input:hover, .field select:hover, .field textarea:hover { box-shadow: inset 0 0 0 1px var(--n-300); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--t-600); }
.field [aria-invalid="true"] { background: #fdf3f0; box-shadow: inset 0 0 0 2px var(--p-500); }
.field__err { font-size: .82rem; font-weight: 500; color: var(--p-700); }
.field__err[hidden] { display: none; }
.field-row { display: grid; gap: 18px; }
@media (min-width: 520px) { .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.checks-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.field label.check { position: relative; cursor: pointer; font: 500 .88rem/1.2 var(--f-body); letter-spacing: 0; text-transform: none; color: inherit; }
.check input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.check span { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; background: var(--white); border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--border); color: var(--t-800); font-size: .88rem; font-weight: 500; transition: background-color .15s, color .15s; }
.check span::before { content: ""; width: 14px; height: 14px; border-radius: 4px; box-shadow: inset 0 0 0 1.5px currentColor; }
.check:hover span { box-shadow: inset 0 0 0 1px var(--n-300); }
.check input:checked + span { background: var(--t-800); color: var(--white); box-shadow: none; }
.check input:checked + span::before { box-shadow: none; background: var(--g-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230f3d27' stroke-width='2.4'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 12px no-repeat; }
.check input:focus-visible + span { outline: 2px solid var(--t-700); outline-offset: 2px; }
.form .sbtn { margin-top: 6px; }

/* Footer */
.footer { background: var(--paper-2); }
.footer__strip { height: clamp(70px, 7vw, 120px); }
.footer__inner { display: grid; gap: 18px; align-items: center; padding-block: 36px; }
.footer__tag { font: 500 .76rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--g-700); }
.footer__meta { font-size: .88rem; color: var(--text-2); }
.footer__meta a { color: var(--t-800); }
@media (min-width: 900px) { .footer__inner { grid-template-columns: auto 1fr auto; gap: 40px; } .footer__tag { text-align: center; } }

/* Lightbox */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(5, 32, 35, .97); color: var(--white); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr; animation: lbIn .25s var(--ease); }
.lightbox::backdrop { background: transparent; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 14px var(--gutter); }
.lightbox__count { font: 500 .8rem/1 var(--f-mono); letter-spacing: .1em; color: var(--t-300); }
.lightbox__close { display: inline-flex; gap: 10px; align-items: center; min-height: 44px; padding: 0 16px; background: var(--t-800); border: 0; border-radius: var(--r-sm); font-size: .92rem; }
.lightbox__close:hover { background: var(--t-700); }
kbd { font: 500 .7rem/1 var(--f-mono); padding: 3px 5px; border: 1px solid var(--t-500); border-radius: 4px; color: var(--t-300); }
@media (hover: none) { .lightbox__close kbd { display: none; } }
.lightbox__fig { display: grid; grid-template-rows: 1fr auto; gap: 14px; padding: 0 var(--gutter) 24px; min-height: 0; }
.lightbox__fig img { width: 100%; height: 100%; min-height: 0; object-fit: contain; background: var(--white); padding: clamp(8px, 2vw, 24px); max-width: 1500px; margin: 0 auto; border-radius: var(--r-lg); }
.lightbox__fig figcaption { text-align: center; font-size: .95rem; color: var(--t-200); max-width: 70ch; margin: 0 auto; }
.lightbox__nav { position: fixed; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; display: grid; place-items: center; background: var(--g-500); color: var(--g-900); border: 0; border-radius: var(--r-sm); font-size: 1.2rem; }
.lightbox__nav:hover { background: var(--g-400); }
.lightbox__nav--prev { left: 10px; }
.lightbox__nav--next { right: 10px; }
@media (max-width: 700px) { .lightbox__nav { top: auto; bottom: 16px; transform: none; } .lightbox__fig { padding-bottom: 84px; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 200; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--t-900); color: var(--t-100); padding: 12px 18px; border-radius: var(--r-sm); font-size: .9rem; font-weight: 500; transition: opacity .25s, transform .25s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

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

/* ==========================================================
   Anatomy figures (tools/anatomy) — KB light theme
   ========================================================== */
.fig-wrap { margin-top: clamp(40px, 5vw, 72px); }
.kb-fig, .kb-iso {
  --anatomy-page: var(--paper); --anatomy-card: #ffffff; --anatomy-text: var(--n-600); --anatomy-strong: var(--t-800); --anatomy-muted: var(--n-500);
  --anatomy-paper: #ffffff; --anatomy-face: #ffffff; --anatomy-top: #ffffff;
  --anatomy-shade-0: #b3cdd2; --anatomy-shade-1: #c7dce0; --anatomy-shade-2: #d9e8eb; --anatomy-shade-3: #e9f2f4;
  --anatomy-lit-top: #cfe8ed; --anatomy-lit-shade: #8cc7d1;
  --anatomy-hi: #0a353d; --anatomy-mid: #4c7880; --anatomy-lo: #93b4ba; --anatomy-faint: #d0e0e3; --anatomy-lit: #19748a;
  --anatomy-halo: #4f7279; --anatomy-halo-opacity: .26; --anatomy-dot: #0a353d;
  --anatomy-green: #3fb877; --anatomy-weight: .6px;
  --anatomy-mono: "Roboto Mono", ui-monospace, Menlo, monospace;
}
.kb-fig .iso-figure { margin: 0; }
.kb-fig .iso-plate { padding: clamp(40px, 4vw, 52px) clamp(12px, 2vw, 28px); border-radius: var(--r-lg); background: #fff; box-shadow: none; }
.kb-fig .iso-plate-corners { inset: clamp(16px, 2vw, 24px); }
.kb-fig .iso-plate-corner { font-size: 11px; letter-spacing: .08em; }
.kb-fig .iso-plate-corner[data-corner="fig"] { color: var(--t-500); font-weight: 500; }
.kb-fig .iso-plate-corner[data-corner="readout"] { color: var(--t-800); }
.kb-fig .iso-stage { outline: none; border-radius: var(--r-md); }
.kb-fig .iso-stage:focus-visible { box-shadow: 0 0 0 2px var(--t-600); }
.kb-fig .iso-svg { max-width: 100%; max-height: min(52vh, 460px); width: auto; margin: 0 auto; }
.kb-fig .iso-legend { margin-top: 14px; padding-inline: 6px; color: var(--n-600); font-size: .92rem; }
.kb-fig .iso-caption { max-width: 80ch; }
.kb-fig .kb-hole { fill: var(--t-900); }
.kb-fig .kb-hole-back { fill: var(--anatomy-shade-1); }
.kb-fig .kb-hole-void { fill: #f4f2ed; }
.kb-fig .kb-lamp-on .iso-top { fill: #5ed88e; }
.kb-fig .kb-lamp-on .iso-shade { fill: #3fb877; }
.kb-fig .kb-lamp-on .iso-fill { fill: #3fb877; }
.kb-fig .kb-lamp-on .iso-edge { stroke: #1e6642; }
@media (max-width: 560px) { .kb-fig .iso-plate { padding: 44px 6px 64px; } .kb-fig .iso-plate-corner[data-corner="title"] { display: none; } }
.kb-fig .iso-stage { touch-action: pan-y; }

/* ---------- Anatomy service figures + parts ---------- */
.svc__art.kb-iso { display: block; padding: 6px 8px; background: var(--paper); }
.kb-iso > .kb-anatomy, .svc__art .kb-anatomy { display: block; width: 100%; height: 100%; overflow: visible; }
.hero__piece.kb-iso { padding: 8px; }
.kb-iso .iso-plate { display: none; }
.kb-step { fill: #5ed88e; opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
  .kb-anim { will-change: transform, opacity; }
  .kb-drop  { animation: kbDrop 7s var(--ease) infinite; }
  .kb-bolt  { animation: kbBolt 7s var(--ease) infinite; animation-delay: var(--d, 0s); }
  .kb-sweep { animation: kbSweep 6.5s cubic-bezier(.45,0,.55,1) infinite alternate; }
  .kb-set .kb-studs { animation: kbStuds 7s var(--ease) infinite; }
  .kb-step  { animation: kbStep 6s ease-in-out infinite; animation-delay: var(--d, 0s); }
  .svc:hover .kb-anim, .svc:hover .kb-step, .svc:hover .kb-studs { animation-duration: 4.2s; }
}
@keyframes kbDrop  { 0%, 10% { transform: translate(var(--mx), var(--my)); opacity: 0; } 22% { opacity: 1; } 42%, 82% { transform: translate(0, 0); opacity: 1; } 94%, 100% { transform: translate(var(--mx), var(--my)); opacity: 0; } }
@keyframes kbBolt  { 0%, 18% { transform: translate(var(--mx), var(--my)); opacity: 0; } 34%, 80% { transform: translate(0, 0); opacity: 1; } 92%, 100% { transform: translate(var(--mx), var(--my)); opacity: 0; } }
@keyframes kbSweep { 0%, 8% { transform: translate(var(--ax), var(--ay)); } 92%, 100% { transform: translate(var(--bx), var(--by)); } }
@keyframes kbStuds { 0%, 30% { opacity: 1; } 42%, 84% { opacity: 0; } 94%, 100% { opacity: 1; } }
@keyframes kbStep  { 0%, 6% { opacity: 0; } 14%, 30% { opacity: .75; } 46%, 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .kb-set .kb-studs { opacity: 0; } }

/* Fig 1: plate + legend side by side on wide screens (half the height) */
@media (min-width: 1100px) {
  .kb-fig .iso-figure { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 56px); align-items: end; }
  .kb-fig .iso-legend { margin: 0 0 8px; }
}
.kb-fig .iso-plate-corner[data-corner="title"] { right: 46px; }

/* ---------- Expand to full screen (figures) ---------- */
.fs-host { position: relative; }
.fs-btn { position: absolute; top: 10px; right: 10px; z-index: 3; width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 8px; background: rgba(255,255,255,.92); color: var(--t-800); box-shadow: 0 2px 8px rgba(5,32,35,.14); cursor: pointer; opacity: .9; transition: opacity .2s, transform .2s var(--ease), background-color .2s; }
.fs-btn:hover { opacity: 1; transform: scale(1.06); background: #fff; }
.fs-btn .ic { width: 16px; height: 16px; }
.ic--expand { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M10 20H4v-6M20 4l-6 6M4 20l6-6'/%3E%3C/svg%3E"); }
.ic--close  { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
.kb-fig .iso-plate > .fs-btn { top: 12px; right: 12px; }
.is-full { position: fixed !important; inset: 0 !important; z-index: 400; margin: 0 !important; border-radius: 0 !important; aspect-ratio: auto !important; max-width: none !important; background: var(--paper) !important; padding: clamp(16px, 4vw, 56px) !important; overflow: auto; display: grid !important; place-items: center; animation: fsIn .25s var(--ease); }
@keyframes fsIn { from { opacity: 0; } to { opacity: 1; } }
.is-full > .fs-btn, .is-full .iso-plate > .fs-btn { position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; background: var(--t-900); color: #fff; }
.kb-fig.is-full .iso-figure { width: min(1500px, 100%); display: block; }
.kb-fig.is-full .iso-svg { max-height: 76vh; }
.kb-fig.is-full .iso-legend { margin-top: 14px; }
body.fs-open { overflow: hidden; }


/* ---------- Cycling Bays (statement band) ---------- */
.kb-cycle { position: relative; }
.kb-cycle__frame { position: absolute; inset: clamp(12px, 1.4vw, 24px); opacity: 0; transition: opacity 1s var(--ease); }
.kb-cycle__frame.is-on { opacity: 1; }
.kb-cycle__frame > svg { width: 100%; height: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .kb-cycle__frame .kb-cell { transform-box: fill-box; transform-origin: center; }
  .kb-cycle__frame.is-on .kb-cell { animation: kbCell .7s var(--ease) both; animation-delay: calc(var(--i) * 55ms + 120ms); }
}
@keyframes kbCell { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: none; } }
.footer__strip .kb-cycle__frame { inset: 0; }

/* ---------- Phones + tablets: two-row header — (logo · estimate) / (section tabs) ---------- */
.secnav { display: none; }
.menu-btn, .mobile-menu { display: none !important; }   /* the tab row replaces the hamburger */
@media (max-width: 999px) {
  :root { --header-h: 118px; }   /* 10 + 44 (row 1) + 8 + 46 (row 2) + 10 */
  html { scroll-padding-top: calc(var(--header-h) + 4px); }
  .header__inner { height: auto; flex-wrap: wrap; column-gap: 10px; row-gap: 8px; padding-block: 10px; }
  .logo { height: 44px; }
  .logo__mark { width: 46px; }
  .header__cta { display: none !important; }   /* the estimate button lives inside the tab bar on small screens */
  .secnav {
    --h: 46px; order: 3; flex: 1 1 100%; display: flex; align-items: center; gap: 4px; min-width: 0; height: var(--h); padding: 0 4px; background: var(--paper-2);
  }
  .secnav__list {
    display: flex; gap: 2px; flex: 1; min-width: 0; height: 100%; align-items: center;
    overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent);
            mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 18px), transparent);
  }
  .secnav__list::-webkit-scrollbar { display: none; }
  .secnav__list li { flex: none; }
  .secnav__list a { --h: 38px; display: flex; align-items: center; height: var(--h); padding: 0 14px; color: var(--n-600); font-size: .88rem; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color .2s, color .2s; }
  .secnav__list a:active { transform: scale(.97); }
  .secnav__list a[aria-current="true"] { background: var(--white); color: var(--t-800); }
  /* nested estimate tab: looks like the other tabs; dark teal on hover and when Contact is the current section */
  .secnav__cta.sbtn { --h: 38px; --hh: 38px; --pad: 12px; --bg: transparent; --bg-h: var(--t-800); --fg: var(--n-600); flex: none; font-size: .88rem; font-weight: 500; }
  .secnav__cta.sbtn:hover, .secnav__cta.sbtn:focus-visible, .secnav__cta.sbtn[aria-current="true"] { --bg: var(--t-800); --fg: #fff; }
  .secnav__cta.sbtn:hover { transform: none; }
  .secnav__list .secnav__cta.sbtn { color: var(--fg); background: var(--bg); }
  /* split logo: wordmark on the left, KB mark on the right */
  .header .logo { flex: 1 1 100%; flex-direction: row-reverse; justify-content: space-between; }
}

/* ---------- Photography (Unsplash) ---------- */
.photos { display: grid; gap: var(--gap); margin-top: clamp(40px, 5vw, 72px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.photos img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-lg); aspect-ratio: 4 / 3; transition: transform .6s var(--ease); }
.photos__main { grid-column: 1 / -1; aspect-ratio: 16 / 9 !important; }
@media (min-width: 900px) {
  .photos { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); height: clamp(320px, 32vw, 520px); }
  .photos__main { grid-column: 1; grid-row: 1 / span 2; aspect-ratio: auto !important; }
  .photos img { aspect-ratio: auto; }
}
.credits { font-size: .76rem; color: var(--n-400); }

/* ---------- LinkedIn ---------- */
.ic--linkedin { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.45 20.45h-3.56v-5.57c0-1.33-.03-3.04-1.85-3.04-1.86 0-2.14 1.45-2.14 2.94v5.67H9.35V9h3.41v1.56h.05c.48-.9 1.64-1.85 3.37-1.85 3.6 0 4.27 2.37 4.27 5.46v6.28zM5.34 7.43a2.06 2.06 0 1 1 0-4.13 2.06 2.06 0 0 1 0 4.13zM7.12 20.45H3.56V9h3.56v11.45zM22.22 0H1.77C.79 0 0 .77 0 1.73v20.54C0 23.23.79 24 1.77 24h20.45c.98 0 1.78-.77 1.78-1.73V1.73C24 .77 23.2 0 22.22 0z'/%3E%3C/svg%3E"); }
.email-card__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.footer__social { display: inline-flex; align-items: center; gap: 5px; }
.footer__social .ic { width: 14px; height: 14px; }

/* ---------- Tool badge: "Detailed in Tekla Structures" (own brand style, no third-party artwork) ---------- */
.ic--cube { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='M12 2.8 3.5 7.4v9.2l8.5 4.6 8.5-4.6V7.4L12 2.8z'/%3E%3Cpath d='M3.5 7.4 12 12l8.5-4.6M12 12v9.2'/%3E%3C/svg%3E"); }
.tool-badge { --h: 36px; display: inline-flex; align-items: center; gap: 9px; height: var(--h); margin-top: 1.1rem; padding: 0 16px 0 14px; background: var(--t-100); color: var(--t-800); font: 400 .84rem/1 var(--f-body); }
.tool-badge b { font-weight: 600; }
.tool-badge .ic { width: 17px; height: 17px; color: var(--t-500); }

/* =====================================================================
   Client content (Nov 2026): who we help, point cloud, projects,
   standards, six questions, FAQ, careers. Built from existing tokens.
   ===================================================================== */

/* ---------- Tabs (re-uses the jigsaw filter group) ---------- */
.tabs { margin-bottom: clamp(24px, 3vw, 40px); }
.tabs .chip { cursor: pointer; }
.tabs--dark { background: var(--t-800); }
.tabs--dark .chip { color: var(--t-200); }
.tabs--dark .chip:hover { background: rgba(255,255,255,.08); color: var(--white); }
.tabs--dark .chip[aria-pressed="true"] { background: var(--g-500); color: var(--g-900); }
[role="tabpanel"][hidden] { display: none !important; }

/* ---------- Who we help ---------- */
.aud { display: grid; gap: clamp(24px, 3vw, 56px); align-items: center; }
.aud__text h3 { font: 700 clamp(1.4rem, 2vw, 2rem)/1.2 var(--f-head); color: var(--t-800); letter-spacing: -0.015em; max-width: 24ch; text-wrap: balance; }
.aud__text > p { margin-top: 14px; color: var(--n-600); font-size: 1.05rem; line-height: 1.55; max-width: 52ch; }
.ticks { display: grid; gap: 10px; margin-top: 22px; }
.ticks li { position: relative; padding-left: 30px; color: var(--t-800); font-weight: 500; line-height: 1.4; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 6px; background: var(--g-500) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%230f3d27' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 13px no-repeat; }
.aud__pic { position: relative; padding: 8px; background: var(--white); border-radius: var(--r-lg); cursor: zoom-in; }
.aud__pic .frame { aspect-ratio: 4 / 3; background: var(--white); }
.aud__pic .frame img { padding: 4%; }
.aud__cap { position: absolute; left: 20px; bottom: 20px; padding: 5px 10px; border-radius: 6px; background: var(--t-800); color: var(--white); font: 500 .68rem/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
@media (min-width: 960px) { .aud { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }

/* ---------- Point cloud ---------- */
.pc { display: grid; gap: clamp(32px, 4vw, 80px); align-items: center; }
.pc__lede { margin-top: 20px; color: var(--n-600); font-size: 1.08rem; line-height: 1.55; max-width: 54ch; }
.steps3 { display: grid; gap: 4px; margin-top: 28px; counter-reset: s; }
.steps3 li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 16px 18px; background: var(--white); border-radius: var(--r-md); }
.steps3__n { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--t-800); color: var(--g-500); font: 500 .8rem/1 var(--f-mono); }
.steps3 h3 { font: 700 1.05rem/1.3 var(--f-head); color: var(--t-800); }
.steps3 p { margin-top: 2px; color: var(--n-600); font-size: .93rem; line-height: 1.45; }
.pc__fig { margin: 0; padding: clamp(12px, 1.4vw, 22px); background: var(--paper); border-radius: var(--r-lg); }
.pc__art { aspect-ratio: 4 / 3; }
.pc__fig figcaption { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 14px 6px 2px; font: 500 .7rem/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--n-600); }
.pc__fig figcaption span { display: inline-flex; align-items: center; gap: 8px; }
.pc__dot { width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle, var(--t-700) 1.6px, transparent 2px) 0 0 / 5px 5px; box-shadow: inset 0 0 0 1px var(--n-300); }
.pc__bar { width: 18px; height: 6px; border-radius: 2px; background: var(--g-500); }
@media (min-width: 1000px) { .pc { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); } }

/* ---------- Work: region badge + show more ---------- */
.tile__rg { position: absolute; left: 8px; top: 8px; z-index: 1; padding: 3px 7px; border-radius: 5px; background: var(--t-800); color: var(--white); font: 500 .6rem/1.3 var(--f-mono); letter-spacing: .1em; }
.tile .frame--tint { background: var(--white); }
.gallery__item.is-more { display: none; }
.more { display: flex; justify-content: center; margin-top: clamp(24px, 3vw, 40px); }
.more[hidden] { display: none; }

/* ---------- Featured projects ---------- */
.case__title { font: 700 clamp(1.5rem, 2.2vw, 2.25rem)/1.15 var(--f-head); color: var(--white); letter-spacing: -0.02em; text-wrap: balance; max-width: 22ch; }
.case__main .frame--tint, .case__thumbs .frame--tint { background: var(--white); }
.case__main .frame img { padding: 3%; }

/* ---------- Model → drawing (one pair at a time) ---------- */
.m2d--single .m2d__pair { padding: 12px; }
.m2d--single .m2d__model { position: relative; max-height: none; aspect-ratio: auto; cursor: zoom-in; }
.m2d--single .m2d__drawing { position: relative; }
.m2d--single .frame { width: 100%; aspect-ratio: 4 / 3; background: var(--white); }
.m2d__cap { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 4px 9px; border-radius: 6px; background: var(--t-800); color: var(--white); font: 500 .64rem/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.m2d__drawing .m2d__cap { background: var(--g-500); color: var(--g-900); }
.m2d__pair img { transition: opacity .25s var(--ease); }
.m2d__pair.is-swapping img { opacity: 0; }
@media (min-width: 640px) {
  .m2d--single .m2d__pair { grid-template-columns: minmax(0, 1fr) clamp(28px, 3vw, 48px) minmax(0, 1.3fr); }
  .m2d--single .m2d__model { display: flex; min-height: 0; }
  .m2d--single .m2d__model .frame { flex: 1; aspect-ratio: auto; }
  .m2d--single .m2d__drawing .frame { aspect-ratio: 16 / 11; }
}
@media (min-width: 1100px) { .m2d--single { grid-template-columns: 1fr; } }

/* ---------- Standards & deliverables ---------- */
.std { display: grid; gap: var(--gap); }
.std__card { padding: clamp(22px, 2.6vw, 36px); background: var(--white); border-radius: var(--r-lg); }
.std__card h3 { font: 700 1.25rem/1.25 var(--f-head); color: var(--t-800); margin-bottom: 18px; }
.std__list { display: grid; }
.std__list li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.std__list li:first-child { border-top: 0; padding-top: 0; }
.std__list strong { display: block; color: var(--t-800); font-weight: 600; }
.std__list span:not(.std__flag):not(.sr-only) { color: var(--n-600); font-size: .93rem; line-height: 1.45; }
.std__flag { display: grid; place-items: center; width: 44px; height: 32px; border-radius: 7px; background: var(--t-100); color: var(--t-700); font: 500 .72rem/1 var(--f-mono); letter-spacing: .08em; }
.std__flag--you { background: var(--g-500); color: var(--g-900); }
.std__flag .ic { width: 16px; height: 16px; }
.std__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.std__chips li { padding: 8px 12px; background: var(--paper); border-radius: var(--r-sm); color: var(--t-800); font-size: .88rem; font-weight: 500; }
.std__note { margin-top: 22px; color: var(--n-600); font-size: .95rem; line-height: 1.5; }
@media (min-width: 960px) { .std { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.marks { display: grid; gap: var(--gap); margin-top: var(--gap); }
.marks__group { padding: 18px; background: var(--paper-3); border-radius: var(--r-lg); }
.marks__head { margin-bottom: 12px; font: 500 .7rem/1.3 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--t-700); }
.marks__row { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.mark { display: grid; align-content: center; justify-items: center; gap: 6px; min-height: 104px; padding: 14px 10px; background: var(--white); border-radius: var(--r-md); text-align: center; }
.mark b { font: 800 1.2rem/1 var(--f-head); color: var(--t-800); letter-spacing: -0.01em; }
.mark small { font-size: .74rem; color: var(--n-600); line-height: 1.3; }
.mark--img img { height: 52px; width: auto; }
@media (min-width: 960px) { .marks { grid-template-columns: minmax(0, 1fr) minmax(0, 3.2fr); } .marks__group:first-child .marks__row { grid-template-columns: 1fr; } }

/* ---------- Six questions ---------- */
.qa { display: grid; gap: var(--gap); }
.qa li { padding: 22px 24px; border: 1px solid var(--t-700); border-radius: var(--r-lg); display: grid; gap: 8px; align-content: start; transition: background-color .25s; }
.qa li:hover { background: var(--t-800); }
.qa__q { font: 500 .74rem/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--g-500); }
.qa__a { color: var(--t-200); font-size: .98rem; line-height: 1.5; }
.qa__a strong { color: var(--white); font-weight: 600; }
@media (min-width: 700px) { .qa { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .qa { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: clamp(28px, 4vw, 64px); }
.faq__lede { margin-top: 20px; color: var(--n-600); font-size: 1.05rem; }
.faq__lede a { color: var(--t-700); font-weight: 600; }
.faq__list { display: grid; gap: 6px; align-content: start; }
.faq__item { background: var(--white); border-radius: var(--r-md); }
.faq__item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; cursor: pointer; list-style: none; font: 600 1.02rem/1.35 var(--f-body); color: var(--t-800); }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--t-600); }
.faq__ic { position: relative; flex: none; width: 28px; height: 28px; border-radius: 8px; background: var(--paper-2); transition: background-color .2s, transform .3s var(--ease); }
.faq__ic::before, .faq__ic::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.8px; margin: -0.9px 0 0 -6px; border-radius: 2px; background: var(--t-800); transition: transform .3s var(--ease); }
.faq__ic::after { transform: rotate(90deg); }
.faq__item[open] .faq__ic { background: var(--g-500); }
.faq__item[open] .faq__ic::after { transform: rotate(0deg); }
.faq__item p { padding: 0 20px 20px; color: var(--n-600); line-height: 1.55; max-width: 64ch; }
@media (min-width: 960px) { .faq { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); } }
.careers { display: grid; gap: 22px; align-items: center; margin-top: clamp(40px, 5vw, 72px); padding: clamp(24px, 3vw, 40px); background: var(--t-900); border-radius: var(--r-lg); color: var(--t-100); }
.careers .label { color: var(--g-500); margin-bottom: 12px; }
.careers__title { font: 700 clamp(1.4rem, 2vw, 2rem)/1.2 var(--f-head); color: var(--white); }
.careers__text { margin-top: 8px; color: var(--t-300); max-width: 60ch; }
.careers .sbtn { justify-self: start; }
@media (min-width: 800px) { .careers { grid-template-columns: 1fr auto; } }

