/* ============================================================
   Kingstons Construction — homepage
   Palette from the client's own logo: ink black, brand red,
   drawing paper. Type: Besley (Clarendon revival) + Archivo,
   with Saira Stencil for site-marking numerals only.
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face { font-family: 'Besley'; src: url('../fonts/besley-v22-latin-800.woff2') format('woff2'); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Besley'; src: url('../fonts/besley-v22-latin-900.woff2') format('woff2'); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Besley'; src: url('../fonts/besley-v22-latin-500italic.woff2') format('woff2'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('../fonts/archivo-v25-latin-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('../fonts/archivo-v25-latin-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('../fonts/archivo-v25-latin-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('../fonts/archivo-v25-latin-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Saira Stencil'; src: url('../fonts/saira-stencil-v2-latin-regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --ink: #131110;
  --ink-2: #1c1916;
  --ink-3: #262220;
  --paper: #f4f1ea;
  --paper-2: #eae5da;
  --red: #e01b1c;
  --red-deep: #b31315;
  --graphite: #423e38;
  --white: #ffffff;
  --t-on-ink: #f2efe9;
  --t-on-ink-dim: rgba(242, 239, 233, 0.68);
  --t-on-paper: #211d19;
  --t-on-paper-dim: rgba(33, 29, 25, 0.72);
  --line-on-ink: rgba(242, 239, 233, 0.16);
  --line-on-paper: rgba(33, 29, 25, 0.16);
  --font-display: 'Besley', Georgia, 'Times New Roman', serif;
  --font-body: 'Archivo', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-stencil: 'Saira Stencil', var(--font-body);
  --wrap-max: 1480px;
  --wrap-pad: clamp(20px, 4vw, 64px);
  --hdr-h: 104px;
  --hdr-h-small: 68px;
  --sec-pad: clamp(4.5rem, 9vw, 8.5rem);
}
@media (max-width: 900px) {
  :root { --hdr-h: 80px; --hdr-h-small: 62px; }
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--t-on-paper);
  background: var(--ink);
  min-width: 0;
}
main { overflow-x: clip; }   /* never on body/html — breaks fixed headers on touch */
img, video, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.skip-link {
  position: fixed; top: -100px; left: 16px; z-index: 200;
  background: var(--red); color: #fff; padding: 10px 18px; font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: var(--wrap-max); margin-inline: auto; padding-inline: var(--wrap-pad); }

/* ---------- Type system ---------- */
.h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.1rem, 4.4vw, 3.8rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.55rem, 2.6vw, 2.3rem);
  line-height: 1.12;
}
/* A drawn red datum line above each section heading: the drawing-sheet motif,
   no label text. */
.head-rule {
  display: block; width: 44px; height: 3px; background: var(--red);
  margin-bottom: 1.5rem; transform-origin: left center;
  position: relative;
}
.head-rule::after {
  content: ''; position: absolute; right: -8px; top: -2.5px;
  width: 8px; height: 8px; background: var(--red);
  transform: rotate(45deg) scale(0.6);
}

.section-head { margin-bottom: clamp(2.4rem, 5vw, 4rem); max-width: none; }

/* ---------- Sections ---------- */
.s-ink { background: var(--ink); color: var(--t-on-ink); }
.s-ink .h2, .s-ink .h3 { color: var(--white); }
.s-paper { background: var(--paper); color: var(--t-on-paper); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 18px 30px; border: 1px solid transparent;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s, transform 0.25s;
}
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-deep); transform: translateY(-2px); }
.btn-ghost { border-color: rgba(242, 239, 233, 0.4); color: var(--t-on-ink); }
.btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); transform: translateY(-2px); }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: linear-gradient(to bottom, rgba(10, 9, 8, 0.82), rgba(10, 9, 8, 0));
  transition: background-color 0.35s;
}
.site-header.is-solid { background: rgba(15, 13, 12, 0.96); box-shadow: 0 1px 0 var(--line-on-ink); }
.header-bar {
  max-width: var(--wrap-max); margin-inline: auto; padding-inline: var(--wrap-pad);
  height: var(--hdr-h);
  display: flex; align-items: center; gap: clamp(18px, 3vw, 44px);
  transition: height 0.35s ease;
}
.site-header.is-solid .header-bar { height: var(--hdr-h-small); }
.header-logo { flex: none; }
.header-logo img {
  height: 70px; width: auto;
  transition: height 0.35s ease;
}
.site-header.is-solid .header-logo img { height: 42px; }
.header-nav { display: flex; gap: clamp(16px, 2.2vw, 34px); margin-left: auto; }
.header-nav a {
  color: var(--t-on-ink); font-weight: 500; font-size: 0.98rem;
  position: relative; padding: 6px 0;
}
.header-nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--red); transform: scaleX(0); transform-origin: left center;
  transition: transform 0.25s;
}
.header-nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.header-tels { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.12; }
.header-tel { display: block; color: var(--t-on-ink); }
.header-tel-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--t-on-ink-dim); }
.header-tel-num { font-family: var(--font-display); font-weight: 800; font-size: 1rem; }
.header-tel:hover .header-tel-num { color: var(--red); }
.menu-toggle { display: none; align-items: center; gap: 10px; padding: 10px; }
.menu-toggle-box { display: inline-flex; flex-direction: column; gap: 6px; width: 26px; }
.menu-toggle-box span { height: 2px; background: var(--t-on-ink); transition: transform 0.3s, opacity 0.3s; }
.menu-toggle-text { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
body.menu-open .menu-toggle-box span:first-child { transform: translateY(4px) rotate(45deg); }
body.menu-open .menu-toggle-box span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 1240px) {
  .header-logo img { height: 58px; }
}
@media (max-width: 1080px) {
  .header-nav { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 900px) {
  .header-logo img { height: 48px; }
  .site-header.is-solid .header-logo img { height: 38px; }
  .header-tels { display: none; }
}

.mobile-menu {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15, 13, 12, 0.98);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
body.menu-open .mobile-menu { opacity: 1; pointer-events: auto; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.mobile-menu nav a {
  color: var(--t-on-ink);
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 8vw, 2.9rem); line-height: 1.3;
  padding: 6px 20px;
}
.mobile-menu nav a:hover { color: var(--red); }
.mobile-menu-tel { font-family: var(--font-body) !important; font-size: 1.15rem !important; font-weight: 600 !important; color: var(--t-on-ink-dim) !important; }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  color: var(--t-on-ink);
  overflow: clip;
  padding-bottom: clamp(3rem, 7vh, 5.5rem);
}
.hero-media { position: absolute; inset: 0; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(12, 10, 9, 0.92) 0%, rgba(12, 10, 9, 0.45) 38%, rgba(12, 10, 9, 0.18) 62%, rgba(12, 10, 9, 0.5) 100%),
    linear-gradient(100deg, rgba(12, 10, 9, 0.72) 0%, rgba(12, 10, 9, 0.15) 55%, rgba(12, 10, 9, 0) 75%);
}
.hero-truss {
  position: absolute; right: -7vw; bottom: 16vh;
  width: clamp(300px, 36vw, 600px);
  opacity: 0.32;
  pointer-events: none;
}
.truss-line { stroke: var(--red); stroke-width: 2; }
.hero-content { position: relative; z-index: 2; width: 100%; }
.hero-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(3.4rem, 9.2vw, 8.2rem);
  line-height: 0.98; letter-spacing: -0.015em;
  color: #fff;
  margin-bottom: 1.6rem;
  max-width: 12ch;
  /* flex column so the mask lines' negative margins cannot collapse */
  display: flex; flex-direction: column; align-items: flex-start;
}
/* Each line is a reveal mask for the entrance animation. The mask must hold
   the font's whole content area (ascenders, the g descender, italic bearings)
   because line-height is tighter than the glyph extents; negative margins
   cancel the padding so the set stays optically solid. */
.hero-line {
  display: block; overflow: hidden;
  padding: 0.42em 0.06em 0.42em;
  margin: -0.42em -0.06em -0.42em;
}
.hero-line > span { display: inline-block; }
.hero-sub {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.6;
  color: rgba(242, 239, 233, 0.88);
  max-width: 56ch;
  margin-bottom: 2.2rem;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 2.6rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 0; align-items: center; }
.hero-trust li {
  font-size: 0.85rem; font-weight: 500; color: rgba(242, 239, 233, 0.75);
  display: flex; align-items: center;
}
.hero-trust li + li::before {
  content: ''; width: 5px; height: 5px; background: var(--red);
  display: inline-block; margin-inline: 16px; transform: rotate(45deg);
}
.hero-scrollcue {
  position: absolute; z-index: 2; right: var(--wrap-pad); bottom: clamp(3rem, 7vh, 5.5rem);
  width: 30px; height: 54px; border: 1px solid rgba(242, 239, 233, 0.4); border-radius: 16px;
  display: flex; justify-content: center; padding-top: 9px;
}
.hero-scrollcue span { width: 3px; height: 9px; background: var(--red); border-radius: 2px; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); opacity: 1; } 55% { transform: translateY(16px); opacity: 0.2; } 70% { opacity: 0; } 71% { transform: translateY(0); opacity: 0; } }
@media (max-width: 900px) {
  .hero-scrollcue { display: none; }
  .hero-truss { right: -18vw; bottom: 42vh; opacity: 0.32; width: 90vw; }
}

/* ============================================================
   Welcome
   ============================================================ */
.welcome { padding-block: var(--sec-pad); position: relative; }
.welcome-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 6vw, 6rem); align-items: center;
}
.welcome-copy .h2 { margin-bottom: 1.6rem; }
.welcome-copy p + p { margin-top: 1.05em; }
.welcome-copy > p { color: var(--t-on-paper-dim); max-width: 62ch; }
.welcome-sig { margin-top: 2.2rem; padding-top: 1.6rem; border-top: 1px solid var(--line-on-paper); }
.sig-name { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; color: var(--t-on-paper); }
.sig-role { font-size: 0.9rem; color: var(--t-on-paper-dim); }
.welcome-media { position: relative; }

.framed-photo { position: relative; }
.framed-photo img { position: relative; z-index: 1; box-shadow: 0 24px 60px -24px rgba(23, 19, 15, 0.55); }
.framed-photo::before {
  content: ''; position: absolute; z-index: 0;
  inset: 0; transform: translate(18px, 18px);
  border: 1px solid var(--red);
}
.framed-photo::after {
  content: ''; position: absolute; z-index: 2;
  width: 14px; height: 14px; background: var(--red);
  top: -7px; left: -7px;
}
.welcome-seal {
  position: absolute; z-index: 3; right: -22px; bottom: -34px;
  width: 152px; height: 152px; border-radius: 50%;
  background: var(--red); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 2px;
  box-shadow: 0 18px 40px -18px rgba(179, 19, 21, 0.7);
}
.seal-num { font-family: var(--font-stencil); font-size: 3rem; line-height: 1; }
.seal-text { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; line-height: 1.35; }
@media (max-width: 980px) {
  .welcome-grid { grid-template-columns: 1fr; }
  .welcome-media { max-width: 560px; }
  .welcome-seal { right: 8px; bottom: -28px; }
}

/* ============================================================
   Services
   ============================================================ */
.services { padding-block: var(--sec-pad); }
/* Heading and its intro share the row, so neither half sits empty. */
.services .section-head {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.2rem, 3.5vw, 3.5rem); align-items: end;
}
.services .section-head .head-rule { grid-column: 1 / -1; }
.services-intro { color: var(--t-on-ink-dim); padding-bottom: 0.4rem; }
@media (max-width: 900px) {
  .services .section-head { grid-template-columns: 1fr; gap: 1.1rem; }
}
.services-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 5vw, 5rem); align-items: start;
}
.services-list { border-top: 1px solid var(--line-on-ink); }
.svc { border-bottom: 1px solid var(--line-on-ink); }
.svc-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(16px, 2.5vw, 30px); align-items: start;
  padding-block: clamp(1.2rem, 2.4vw, 1.9rem);
  transition: padding-left 0.3s;
}
.svc-num {
  font-family: var(--font-stencil); font-size: 1.05rem; color: var(--red);
  padding-top: 0.55em; min-width: 2ch;
}
.svc-arrow { align-self: center; }
.svc-name {
  display: block; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 2.15rem); line-height: 1.1; color: #fff;
  transition: color 0.25s;
}
.svc-desc { display: block; color: var(--t-on-ink-dim); margin-top: 6px; max-width: 52ch; }
.svc-arrow { font-size: 1.5rem; color: var(--red); opacity: 0; transform: translateX(-8px); transition: opacity 0.25s, transform 0.25s; }
.svc-row:hover { padding-left: 10px; }
.svc-row:hover .svc-name { color: var(--red); }
.svc-row:hover .svc-arrow { opacity: 1; transform: none; }
.svc-inline-media { display: none; }
.services-media { position: sticky; top: calc(var(--hdr-h-small) + 24px); display: grid; gap: 1.4rem; }
.services-media-frame { position: relative; aspect-ratio: 3 / 4; overflow: hidden; }
.services-media-frame::after {
  content: ''; position: absolute; inset: 0; z-index: 3;
  border: 1px solid var(--red); transform: translate(14px, 14px);
  pointer-events: none;
}
.services-video, .services-still {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.services-still { z-index: 2; opacity: 0; transition: opacity 0.4s; }
.services-media.show-still .services-still { opacity: 1; }
.services-media-note {
  font-size: 0.9rem; color: var(--t-on-ink-dim);
  padding-left: 18px; border-left: 2px solid var(--red);
}
.services-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--ink-3); border: 1px solid var(--line-on-ink);
  padding: 20px 22px;
}
.services-cta strong { font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; color: #fff; line-height: 1.2; }
.services-cta .btn { padding: 13px 20px; font-size: 0.92rem; flex: none; }
@media (max-width: 980px) {
  .services-grid { grid-template-columns: 1fr; }
  .services-media { display: none; }
  .svc-inline-media { display: block; margin: 0 0 1.4rem 0; }
  .svc-inline-media img { width: 100%; }
}

/* ============================================================
   Projects reel
   ============================================================ */
.reel-section { background: var(--ink-2); color: var(--t-on-ink); }
.reel-intro { padding-block: var(--sec-pad) clamp(2rem, 5vw, 3.5rem); }
.reel-sub { color: var(--t-on-ink-dim); max-width: 60ch; }

/* Fallback stack (no-JS / reduced motion): big readable slides */
.reel-stage { position: relative; }
.reel-slide { position: relative; margin-bottom: 4px; }
.reel-slide img { width: 100%; height: auto; }
.reel-cap {
  position: relative;
  padding: 1.2rem var(--wrap-pad) 2.6rem;
  max-width: 900px;
}
.reel-cap-tag {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #fff; background: var(--red); padding: 5px 10px; margin-bottom: 10px;
}
.reel-cap-title { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 2.6vw, 2.1rem); color: #fff; }
.reel-cap-fact { display: block; color: var(--t-on-ink-dim); margin-top: 6px; max-width: 60ch; }
.reel-ui { display: none; }

/* Live reel (JS adds .is-live when motion is welcome) */
.reel.is-live { /* height set by JS: one viewport per slide + one exit */ }
.reel.is-live .reel-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: clip;
}
.reel.is-live .reel-slide {
  position: absolute; inset: 0; margin: 0;
  opacity: 0; visibility: hidden;
}
.reel.is-live .reel-slide.is-first { opacity: 1; visibility: visible; }
.reel.is-live .reel-slide picture { position: absolute; inset: 0; }
.reel.is-live .reel-slide img { width: 100%; height: 100%; object-fit: cover; }
.reel.is-live .reel-slide::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(12, 10, 9, 0.88) 0%, rgba(12, 10, 9, 0.25) 34%, rgba(12, 10, 9, 0) 55%);
}
.reel.is-live .reel-cap {
  position: absolute; z-index: 2; left: 0; right: auto; bottom: clamp(2rem, 6vh, 4rem);
  padding: 0 var(--wrap-pad);
}
.reel.is-live .reel-ui { display: block; }
.reel-count {
  position: absolute; z-index: 20; top: calc(var(--hdr-h-small) + 20px); right: var(--wrap-pad);
  font-family: var(--font-stencil); font-size: 1.5rem; color: #fff;
  text-shadow: 0 1px 14px rgba(10, 9, 8, 0.75), 0 0 3px rgba(10, 9, 8, 0.6);
}
.reel-count em { font-style: normal; color: rgba(242, 239, 233, 0.78); font-size: 1rem; margin-left: 4px; }
.reel-rail {
  position: absolute; z-index: 20; right: var(--wrap-pad); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px;
}
.reel-dot {
  width: 12px; height: 12px; padding: 0; border: 1px solid rgba(242, 239, 233, 0.55);
  transform: rotate(45deg); background: transparent;
  transition: background-color 0.25s, border-color 0.25s, transform 0.25s;
}
.reel-dot:hover { border-color: #fff; transform: rotate(45deg) scale(1.2); }
.reel-dot.is-active { background: var(--red); border-color: var(--red); }
@media (max-width: 900px) {
  .reel-rail { right: 14px; gap: 12px; }
  .reel.is-live .reel-cap { right: 54px; }
}

/* ============================================================
   Numbers
   ============================================================ */
.numbers { padding-block: var(--sec-pad); position: relative; overflow: clip; }
.numbers-plan {
  position: absolute; inset: 0; opacity: 0.1; pointer-events: none;
  background-image: url('../img/plan-texture-1600.webp');
  background-size: 1100px auto; background-position: right -80px top -40px;
  background-repeat: no-repeat;
}
.numbers .wrap { position: relative; }
.numbers-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.6rem, 3vw, 3rem);
}
.stat { padding-top: 1.6rem; position: relative; }
.stat::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px;
  background: var(--graphite); transform-origin: left center;
}
.stat::after {
  content: ''; position: absolute; top: -4px; left: 0; width: 2px; height: 10px;
  background: var(--graphite);
}
.stat-num {
  display: flex; align-items: baseline;
  font-family: var(--font-stencil);
  font-size: clamp(3.6rem, 7.5vw, 6.4rem);
  line-height: 1; color: var(--t-on-paper);
}
.stat-num i { font-style: normal; color: var(--red); font-size: 0.6em; margin-left: 4px; }
.stat-num-text { font-size: clamp(2.6rem, 5vw, 4.4rem); }
.stat-label { display: block; margin-top: 0.8rem; color: var(--t-on-paper-dim); font-size: 0.95rem; max-width: 30ch; }
@media (max-width: 980px) {
  .numbers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .numbers-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Craft
   ============================================================ */
.craft { padding-block: var(--sec-pad); overflow: clip; }
.craft-head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 4vw, 4rem); align-items: end; margin-bottom: clamp(2.4rem, 5vw, 4rem); }
.craft-head .h2 { grid-column: 1; }
.craft-head .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.craft-sub { color: var(--t-on-ink-dim); }
.craft-feature { position: relative; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.craft-video { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
.craft-feature-cap {
  position: absolute; left: calc(var(--wrap-pad) + 20px); bottom: 20px;
  background: rgba(12, 10, 9, 0.82); color: var(--t-on-ink);
  padding: 12px 18px; font-size: 0.9rem;
  border-left: 2px solid var(--red);
}
.craft-feature-cap span { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; color: #fff; }
.filmstrip { display: grid; gap: 4px; }
.strip-row { overflow: hidden; }
.drift-track { display: flex; width: max-content; will-change: transform; }
html.has-motion .strip-row, html.has-motion .areas-track { cursor: grab; touch-action: pan-y; }
html.has-motion .strip-row.is-dragging, html.has-motion .areas-track.is-dragging { cursor: grabbing; }
html.has-motion .strip-row img, html.has-motion .areas-track * { user-select: none; -webkit-user-select: none; }
.strip-set { display: flex; gap: 4px; flex: none; padding-right: 4px; }
.strip-set figure { position: relative; flex: none; width: clamp(240px, 26vw, 420px); }
.strip-set img { width: 100%; height: clamp(170px, 19vw, 300px); object-fit: cover; }
.strip-set figcaption {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 26px 14px 10px;
  font-size: 0.78rem; color: rgba(242, 239, 233, 0.92);
  background: linear-gradient(to top, rgba(12, 10, 9, 0.85), rgba(12, 10, 9, 0));
}
@media (max-width: 900px) {
  .craft-head { grid-template-columns: 1fr; align-items: start; }
  .craft-video { aspect-ratio: 16 / 9; }
}

/* ============================================================
   Quotes
   ============================================================ */
.quotes { padding-block: var(--sec-pad); }
.quotes-stage { position: relative; margin-top: clamp(1.5rem, 3vw, 2.5rem); }
.quote { padding-block: 1rem; }
.quote + .quote { border-top: 1px solid var(--line-on-paper); }
.quote-text {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.7rem, 3.6vw, 3.1rem);
  line-height: 1.22; letter-spacing: -0.005em;
  color: var(--t-on-paper);
  max-width: 28ch;
}
.quote-by { margin-top: 1.2rem; font-size: 0.95rem; font-weight: 600; color: var(--t-on-paper-dim); }
.quote-by::before { content: ''; display: inline-block; width: 26px; height: 2px; background: var(--red); vertical-align: middle; margin-right: 12px; }
.quotes.is-live .quotes-stage { min-height: 340px; }
.quotes.is-live .quote { position: absolute; inset: 0; opacity: 0; visibility: hidden; border: 0; padding: 0; }
.quotes.is-live .quote.is-active { opacity: 1; visibility: visible; }
.quotes-nav { display: none; gap: 12px; margin-top: 2rem; }
.quotes.is-live .quotes-nav { display: flex; }
.quotes-nav button {
  width: 12px; height: 12px; padding: 0;
  border: 1px solid rgba(33, 29, 25, 0.45); transform: rotate(45deg);
  transition: background-color 0.25s, border-color 0.25s;
}
.quotes-nav button.is-active { background: var(--red); border-color: var(--red); }
.quotes-note { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line-on-paper); color: var(--t-on-paper-dim); font-size: 0.95rem; max-width: 64ch; }
@media (max-width: 700px) {
  .quotes.is-live .quotes-stage { min-height: 420px; }
}

/* ============================================================
   Areas marquee
   ============================================================ */
.areas { padding-block: clamp(1.4rem, 3vw, 2.2rem); border-block: 1px solid var(--line-on-ink); overflow: clip; }
.areas-track { overflow: hidden; }
.areas-set {
  display: flex; align-items: center; gap: 30px; padding-right: 30px;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  color: rgba(242, 239, 233, 0.85);
  white-space: nowrap;
}
.areas-set i { color: var(--red); font-style: normal; font-size: 0.55em; }

/* ============================================================
   Trust
   ============================================================ */
.trust { padding-block: var(--sec-pad); }
.trust-grid {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 5vw, 5rem); align-items: center;
}
.trust-copy .h3 { margin-bottom: 1.2rem; }
.trust-copy p { color: var(--t-on-paper-dim); max-width: 56ch; }
.trust-badges {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
.trust-badges li {
  background: #fff; border: 1px solid var(--line-on-paper);
  display: flex; align-items: center; justify-content: center;
  padding: 22px 18px; min-height: 116px;
}
.trust-badges img { max-height: 62px; width: auto; max-width: 100%; }
@media (max-width: 980px) {
  .trust-grid { grid-template-columns: 1fr; }
  .trust-badges { max-width: 560px; }
}
@media (max-width: 520px) {
  .trust-badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   Contact
   ============================================================ */
.contact { position: relative; padding-block: var(--sec-pad); overflow: clip; }
.contact-media { position: absolute; inset: 0; }
.contact-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.contact-scrim { position: absolute; inset: 0; background: linear-gradient(105deg, rgba(12, 10, 9, 0.94) 26%, rgba(12, 10, 9, 0.62) 64%, rgba(12, 10, 9, 0.38) 100%); }
.contact-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(3rem, 6vw, 6rem); align-items: center;
}
.contact-sub { color: var(--t-on-ink-dim); max-width: 54ch; margin-top: 1.2rem; }
.contact-details { margin-top: 2.4rem; display: grid; gap: 4px; }
.contact-line {
  display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: baseline; gap: 18px;
  padding: 14px 0; border-top: 1px solid var(--line-on-ink);
}
.contact-line span { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--t-on-ink-dim); }
.contact-line strong { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.25rem, 2.4vw, 1.9rem); color: #fff; transition: color 0.25s; overflow-wrap: anywhere; }
a.contact-line:hover strong { color: var(--red); }
.contact-line.is-addr strong { font-size: clamp(1.05rem, 1.8vw, 1.35rem); }
.contact-line.is-email strong { font-size: clamp(1.05rem, 1.9vw, 1.45rem); }
@media (max-width: 640px) {
  .contact-line { grid-template-columns: 1fr; gap: 2px; padding: 12px 0; }
  .contact-line strong { font-size: 1.25rem; }
  .contact-line.is-addr strong { font-size: 1.05rem; }
}
.contact-card {
  position: relative; background: var(--paper); color: var(--t-on-paper);
  padding: clamp(2rem, 4vw, 3rem); overflow: clip;
}
.contact-truss { position: absolute; right: -60px; top: -30px; width: 340px; opacity: 0.16; }
.contact-truss .truss-line { stroke-width: 2; }
.contact-card-title { font-family: var(--font-display); font-weight: 900; font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1.05; margin-bottom: 1rem; }
.contact-card-text { color: var(--t-on-paper-dim); margin-bottom: 1.8rem; }
@media (max-width: 980px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card { max-width: 560px; }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: #0c0b0a; color: var(--t-on-ink); padding-top: clamp(3rem, 6vw, 4.5rem); }
.footer-grid {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr);
  gap: clamp(2rem, 4vw, 4rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}
.footer-brand img { height: 51px; width: auto; margin-bottom: 1.2rem; }
.footer-addr { color: var(--t-on-ink-dim); font-size: 0.95rem; }
.footer-nav { display: grid; gap: 10px; align-content: start; }
.footer-nav a { color: var(--t-on-ink-dim); transition: color 0.2s; }
.footer-nav a:hover { color: #fff; }
.footer-contact { display: grid; gap: 10px; align-content: start; }
.footer-contact a { color: var(--t-on-ink-dim); transition: color 0.2s; word-break: break-word; }
.footer-contact a:hover { color: #fff; }
.footer-legal {
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center;
  padding-block: 1.6rem;
  border-top: 1px solid var(--line-on-ink);
  font-size: 0.88rem; color: var(--t-on-ink-dim);
}
.footer-credit a { color: var(--t-on-ink); font-weight: 600; border-bottom: 1px solid var(--red); padding-bottom: 1px; }
.footer-credit a:hover { color: var(--red); }
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* ============================================================
   Inner pages
   ============================================================ */

/* ---------- Page hero (projects & services) ---------- */
.page-hero {
  position: relative; min-height: 62vh; min-height: 62svh;
  display: flex; align-items: flex-end;
  color: var(--t-on-ink); overflow: clip;
  padding-bottom: clamp(2.2rem, 5vh, 4rem);
  background: var(--ink);
}
.page-hero-media { position: absolute; inset: 0; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(12, 10, 9, 0.9) 0%, rgba(12, 10, 9, 0.35) 45%, rgba(12, 10, 9, 0.42) 100%);
}
.page-hero-content { position: relative; z-index: 2; width: 100%; }
.page-hero-tag {
  display: inline-block; font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: #fff; background: var(--red); padding: 6px 12px; margin-bottom: 1.1rem;
}
.page-hero-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2.6rem, 6.5vw, 5.4rem);
  line-height: 1; letter-spacing: -0.01em; color: #fff;
  margin-bottom: 0.5rem;
}
.page-hero-sub { font-size: clamp(1.02rem, 1.5vw, 1.25rem); color: rgba(242, 239, 233, 0.88); max-width: 60ch; }

/* ---------- Type-led index hero ---------- */
.index-hero { position: relative; padding: calc(var(--hdr-h) + clamp(2.5rem, 6vw, 4.5rem)) 0 clamp(2.5rem, 6vw, 4rem); overflow: clip; }
.index-hero-plan {
  position: absolute; inset: 0; opacity: 0.12; pointer-events: none;
  background-image: url('../img/plan-texture-1600.webp');
  background-size: 1100px auto; background-position: right -60px top -40px;
  background-repeat: no-repeat; filter: invert(1);
}
.index-hero .wrap { position: relative; }
.page-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 1; letter-spacing: -0.01em; color: #fff;
  margin-bottom: 1.1rem;
}
.index-hero-sub { color: var(--t-on-ink-dim); max-width: 68ch; font-size: clamp(1rem, 1.4vw, 1.15rem); }

/* ---------- Project overview ---------- */
.proj-overview { padding-block: var(--sec-pad); }
.proj-overview-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(2.5rem, 6vw, 6rem); align-items: start;
}
.proj-overview-copy .h2 { margin-bottom: 1.4rem; }
.proj-overview-copy p { color: var(--t-on-paper-dim); max-width: 62ch; }
.proj-overview-copy p + p { margin-top: 1em; }
.proj-facts { border-top: 2px solid var(--graphite); padding-top: 1.4rem; position: sticky; top: calc(var(--hdr-h-small) + 24px); }
.proj-facts-stat { display: flex; align-items: baseline; gap: 12px; margin-bottom: 1.2rem; }
.proj-facts-num { font-family: var(--font-stencil); font-size: clamp(3rem, 5vw, 4.4rem); line-height: 1; color: var(--t-on-paper); }
.proj-facts-lab { font-size: 0.92rem; color: var(--t-on-paper-dim); max-width: 16ch; line-height: 1.4; }
.proj-facts-list { display: grid; gap: 10px; }
.proj-facts-list li {
  position: relative; padding-left: 22px;
  color: var(--t-on-paper-dim); font-size: 0.97rem; line-height: 1.5;
}
.proj-facts-list li::before {
  content: ''; position: absolute; left: 0; top: 9px;
  width: 9px; height: 9px; background: var(--red); transform: rotate(45deg);
}
@media (max-width: 900px) {
  .proj-overview-grid { grid-template-columns: 1fr; }
  .proj-facts { position: static; }
}

/* ---------- Build line (start-to-finish gallery) ---------- */
.bline { padding-top: var(--sec-pad); overflow: clip; }
.bline-head { margin-bottom: clamp(2rem, 4vw, 3rem); }
.bline-sub { color: var(--t-on-ink-dim); margin-top: 0.8rem; }
/* Fallback: a readable vertical stack, capped so 20+ photos stay scannable */
.bline-track { display: grid; gap: 4px; }
.bline:not(.is-live) .bline-track { max-width: 1080px; margin-inline: auto; padding-inline: var(--wrap-pad); }
.bline-slide { position: relative; margin: 0; }
.bline-slide img { width: 100%; height: auto; display: block; }
.bline-cap { display: flex; align-items: baseline; gap: 12px; padding: 10px 0 22px; }
.bline-ph {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  color: #fff; background: var(--red); padding: 4px 9px; flex: none;
}
.bline-cap-text { font-size: 0.92rem; color: var(--t-on-ink-dim); }
.bline-ui { display: none; }
/* Live: horizontal scroll-driven timeline */
.bline.is-live .bline-pin { /* height set by JS */ }
.bline.is-live .bline-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: clip;
}
.bline.is-live .bline-track {
  display: flex; gap: clamp(10px, 1.5vw, 20px); width: max-content;
  padding-inline: var(--wrap-pad);
  will-change: transform;
}
.bline.is-live .bline-slide { width: clamp(300px, 58vw, 980px); flex: none; }
.bline.is-live .bline-slide img { height: min(62vh, 640px); width: 100%; object-fit: cover; }
.bline.is-live .bline-cap { padding: 12px 2px 0; }
.bline.is-live .bline-ui {
  display: flex; align-items: center; gap: 22px;
  margin-top: clamp(1.4rem, 3vh, 2.4rem);
  padding-inline: var(--wrap-pad);
}
.bline-rail { position: relative; flex: 1; height: 2px; background: rgba(242, 239, 233, 0.18); }
.bline-progress {
  position: absolute; inset: 0; background: var(--red);
  transform-origin: left center; transform: scaleX(0);
}
.bline-count { font-family: var(--font-stencil); font-size: 1.3rem; color: #fff; flex: none; }
.bline-count em { font-style: normal; color: rgba(242, 239, 233, 0.55); font-size: 0.95rem; margin-left: 4px; }
@media (max-width: 700px) {
  .bline.is-live .bline-slide { width: 86vw; }
  .bline.is-live .bline-slide img { height: 52vh; }
}

/* ---------- Project quote & wall ---------- */
.proj-quote { padding-block: var(--sec-pad); position: relative; overflow: clip; }
.proj-quote::after {
  content: ''; position: absolute; top: 0; right: -60px; bottom: 0; width: min(48vw, 720px);
  background-image: url('../img/plan-texture-1600.webp');
  background-size: cover; background-position: center;
  opacity: 0.09; pointer-events: none;
}
.proj-quote .wrap { position: relative; z-index: 1; }
.proj-quote .quote-text { max-width: 32ch; }
.inline-link { color: inherit; font-weight: 600; border-bottom: 2px solid var(--red); transition: color 0.2s; }
.inline-link:hover { color: var(--red); }
.inline-link-ink { color: var(--t-on-ink); }
.inline-link-ink:hover { color: var(--red); }

.quote-wall { padding-block: clamp(3rem, 6vw, 5rem) var(--sec-pad); }
.quote-wall-grid { columns: 2 480px; column-gap: clamp(1.5rem, 3vw, 3rem); }
.qcard {
  break-inside: avoid; margin-bottom: clamp(1.5rem, 3vw, 3rem);
  border-top: 1px solid var(--line-on-paper); padding-top: 1.3rem;
  position: relative;
}
.qcard::before { content: ''; position: absolute; top: -1px; left: 0; width: 44px; height: 3px; background: var(--red); }
.qcard-text { color: var(--t-on-paper-dim); font-size: 1rem; line-height: 1.7; }
.qcard-featured .qcard-text {
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.4;
  color: var(--t-on-paper);
}
.qcard-photo { border-top: 0; padding-top: 0; margin-right: 18px; position: relative; }
.qcard-photo::before {
  content: ''; position: absolute; inset: 0; top: 0; left: 0;
  width: auto; height: auto; background: none;
  border: 1px solid var(--red); transform: translate(14px, 14px);
  pointer-events: none;
}
.qcard-photo img { width: 100%; position: relative; box-shadow: 0 18px 44px -20px rgba(23, 19, 15, 0.5); }
.qcard-by { margin-top: 0.9rem; font-size: 0.92rem; font-weight: 600; color: var(--t-on-paper); }
.qcard-by::before { content: ''; display: inline-block; width: 22px; height: 2px; background: var(--red); vertical-align: middle; margin-right: 10px; }

/* ---------- Next project ---------- */
.proj-next { border-top: 1px solid var(--line-on-ink); }
.proj-next-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 4vw, 4rem); align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  position: relative;
}
.proj-next-card { display: grid; gap: 6px; }
.proj-next-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--t-on-ink-dim); }
.proj-next-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.9rem, 4vw, 3.2rem); line-height: 1.05; color: #fff;
  transition: color 0.25s;
}
.proj-next-card:hover .proj-next-title { color: var(--red); }
.proj-next-sub { color: var(--t-on-ink-dim); }
.proj-next-arrow { font-size: 1.8rem; color: var(--red); margin-top: 6px; transition: transform 0.25s; }
.proj-next-card:hover .proj-next-arrow { transform: translateX(10px); }
.proj-next-media { position: relative; }
.proj-next-media::after { content: ''; position: absolute; inset: 0; border: 1px solid var(--red); transform: translate(12px, 12px); pointer-events: none; }
.proj-next-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.proj-next-all { align-self: start; color: var(--t-on-ink-dim); font-weight: 600; border-bottom: 2px solid var(--red); width: max-content; transition: color 0.2s; }
.proj-next-all:hover { color: #fff; }
@media (max-width: 800px) {
  .proj-next-grid { grid-template-columns: 1fr; }
  .proj-next-media { max-width: 480px; }
}

/* ---------- Project cards ---------- */
.proj-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(1.6rem, 3vw, 2.6rem);
}
/* One or two projects in a category: wide feature cards so no column sits empty */
.proj-cards[data-count="1"], .proj-cards[data-count="2"] { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.proj-cards[data-count="1"] .proj-card, .proj-cards[data-count="2"] .proj-card {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(1.2rem, 2.5vw, 2rem); align-items: center;
}
.proj-cards[data-count="1"] .proj-card-media, .proj-cards[data-count="2"] .proj-card-media { aspect-ratio: 16 / 10; }
.proj-cards[data-count="1"] .proj-card-body, .proj-cards[data-count="2"] .proj-card-body { padding-top: 0; }
@media (max-width: 620px) {
  .proj-cards[data-count="1"] .proj-card, .proj-cards[data-count="2"] .proj-card { grid-template-columns: 1fr; }
  .proj-cards[data-count="1"] .proj-card-body, .proj-cards[data-count="2"] .proj-card-body { padding-top: 14px; }
}
.proj-card { display: block; }
.proj-card-media { display: block; position: relative; overflow: clip; aspect-ratio: 4 / 3; }
.proj-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.proj-card:hover .proj-card-media img { transform: scale(1.05); }
.proj-card-media::after {
  content: ''; position: absolute; inset: 0;
  border: 1px solid var(--red); transform: translate(10px, 10px);
  pointer-events: none; opacity: 0; transition: opacity 0.3s, transform 0.3s;
}
.proj-card:hover .proj-card-media::after { opacity: 1; transform: translate(8px, 8px); }
.proj-card-body { display: grid; gap: 3px; padding-top: 14px; }
.proj-card-title { font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; line-height: 1.15; transition: color 0.25s; }
.s-ink .proj-card-title { color: #fff; }
.s-paper .proj-card-title { color: var(--t-on-paper); }
.proj-card:hover .proj-card-title { color: var(--red); }
.proj-card-sub { font-size: 0.95rem; }
.s-ink .proj-card-sub { color: var(--t-on-ink-dim); }
.s-paper .proj-card-sub { color: var(--t-on-paper-dim); }
.proj-card-weeks { font-family: var(--font-stencil); font-size: 0.95rem; color: var(--red); margin-top: 4px; }

/* ---------- Index categories ---------- */
.index-cat { padding-block: clamp(3rem, 6vw, 5rem); }
.index-cat-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 26px; margin-bottom: clamp(1.8rem, 3.5vw, 2.8rem); }
.index-cat-head .head-rule { flex-basis: 100%; margin-bottom: 0.4rem; }
.index-cat-sub { font-size: 0.98rem; }
.s-ink .index-cat-sub { color: var(--t-on-ink-dim); }
.s-paper .index-cat-sub { color: var(--t-on-paper-dim); }

/* ---------- Service pages ---------- */
.svc-intro { padding-block: var(--sec-pad); }
.svc-intro-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(2.5rem, 6vw, 6rem); align-items: start;
}
.svc-intro-copy .h2 { margin-bottom: 1.4rem; }
.svc-intro-copy p { color: var(--t-on-paper-dim); max-width: 62ch; }
.svc-intro-copy p + p { margin-top: 1em; }
.svc-points { border-top: 2px solid var(--graphite); padding-top: 1.4rem; position: sticky; top: calc(var(--hdr-h-small) + 24px); }
.svc-points-title { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; margin-bottom: 1.1rem; color: var(--t-on-paper); }
.svc-points-btn { margin-top: 1.6rem; width: 100%; }
.svc-projects { padding-block: var(--sec-pad); }
.svc-projects-sub { color: var(--t-on-ink-dim); margin-top: 1rem; max-width: 82ch; }
@media (max-width: 900px) {
  .svc-intro-grid { grid-template-columns: 1fr; }
  .svc-points { position: static; max-width: 480px; }
}

/* ---------- Service page: back chip + the other five ---------- */
.page-hero-back { transition: background-color 0.25s, transform 0.25s; }
.page-hero-back:hover { background: var(--red-deep); transform: translateX(-3px); }

.svc-others { padding-block: clamp(3rem, 6vw, 5rem); border-top: 1px solid var(--line-on-ink); }
.svc-others-head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 26px;
  margin-bottom: clamp(1.8rem, 3.5vw, 2.6rem);
}
.svc-others-head .head-rule { flex-basis: 100%; margin-bottom: 0.4rem; }
.svc-others-all { margin-left: auto; font-weight: 600; color: var(--t-on-ink-dim); border-bottom: 2px solid var(--red); transition: color 0.2s; }
.svc-others-all:hover { color: #fff; }
.svc-others-list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: clamp(1.2rem, 2.2vw, 2rem);
}
.svc-others-list a { display: grid; gap: 4px; }
.svc-others-media { display: block; position: relative; overflow: clip; aspect-ratio: 4 / 3; margin-bottom: 12px; }
.svc-others-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.svc-others-list a:hover .svc-others-media img { transform: scale(1.06); }
.svc-others-media::after {
  content: ''; position: absolute; inset: 0; border: 1px solid var(--red);
  opacity: 0; transform: translate(0, 0); transition: opacity 0.3s, transform 0.3s;
}
.svc-others-list a:hover .svc-others-media::after { opacity: 1; transform: translate(8px, 8px); }
.svc-others-num { font-family: var(--font-stencil); font-size: 0.9rem; color: var(--red); }
.svc-others-name { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; line-height: 1.15; color: #fff; transition: color 0.25s; }
.svc-others-list a:hover .svc-others-name { color: var(--red); }
.svc-others-strap { font-size: 0.92rem; line-height: 1.45; color: var(--t-on-ink-dim); }

/* ---------- Services index (services.php) ---------- */
.svc-hero {
  position: relative; overflow: clip;
  min-height: 88vh; min-height: 88svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--hdr-h) + clamp(2.5rem, 6vw, 4.5rem));
}
.svc-hero-media { position: absolute; inset: 0; }
.svc-hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.svc-hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, rgba(12, 10, 9, 0.94) 0%, rgba(12, 10, 9, 0.55) 30%, rgba(12, 10, 9, 0.2) 60%, rgba(12, 10, 9, 0.55) 100%),
    linear-gradient(100deg, rgba(12, 10, 9, 0.86) 0%, rgba(12, 10, 9, 0.4) 52%, rgba(12, 10, 9, 0.05) 78%);
}
.svc-hero-truss {
  position: absolute; right: -6vw; bottom: 22vh;
  width: clamp(280px, 34vw, 560px); opacity: 0.3; pointer-events: none;
}
.svc-hero-content { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(2.6rem, 5vw, 4.2rem); }
.svc-hero-title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2.9rem, 8vw, 6.6rem);
  line-height: 0.98; letter-spacing: -0.015em; color: #fff;
  margin-bottom: 1.3rem;
  display: flex; flex-direction: column; align-items: flex-start;
}
/* Mask must clear the whole glyph box or descenders clip during the reveal. */
.svc-hero-line { display: block; overflow: hidden; padding: 0.42em 0.06em; margin: -0.42em -0.06em; }
.svc-hero-line > span { display: inline-block; }
.svc-hero-sub {
  font-size: clamp(1.05rem, 1.5vw, 1.28rem); line-height: 1.6;
  color: rgba(242, 239, 233, 0.88); max-width: 76ch;
}
@media (max-width: 900px) {
  .svc-hero { min-height: 0; }
  .svc-hero-truss { right: -20vw; bottom: 30vh; width: 92vw; }
}

/* ---------- Sticky contents rail (services + projects index) ----------
   Lives outside the hero so it can stick for the whole page. Scrolling past
   its resting place adds .is-stuck, which collapses the one-line spans and
   tightens the padding down to just the titles. Titles never wrap: the type
   scale is set so the longest ("Garage Conversions") fits one line in the
   narrowest cell the grid produces. */
:root { --rail-pad-y: clamp(17px, 2vw, 27px); --rail-h: 62px; }
.index-rail {
  position: sticky; top: var(--hdr-h-small); z-index: 40;
  background: var(--ink);
  border-top: 1px solid rgba(242, 239, 233, 0.22);
  border-bottom: 1px solid rgba(242, 239, 233, 0.16);
}
.index-rail ol {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px; background: rgba(242, 239, 233, 0.16);
  max-width: var(--wrap-max); margin-inline: auto;
}
.index-rail li { background: var(--ink); }
.index-rail a {
  position: relative; overflow: hidden; height: 100%;
  display: grid; align-content: start; gap: 4px;
  padding: var(--rail-pad-y) clamp(13px, 1.4vw, 22px);
  transition: padding 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.index-rail a::before {
  content: ''; position: absolute; inset: 0; background: var(--red);
  transform: scaleY(0); transform-origin: bottom center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.index-rail a:hover::before, .index-rail a:focus-visible::before { transform: scaleY(1); }
/* Where you are: a drawn red rule along the foot of the cell. */
.index-rail a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: var(--red); transform: scaleX(0); transform-origin: left center;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.index-rail a.is-current::after { transform: scaleX(1); }
.index-rail-num, .index-rail-name, .index-rail-span { position: relative; z-index: 1; }
.index-rail-num {
  font-family: var(--font-stencil); font-size: 0.92rem; color: var(--red);
  transition: color 0.3s, font-size 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.index-rail a:hover .index-rail-num { color: #fff; }
.index-rail-name {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(0.86rem, 1.15vw, 1.22rem); line-height: 1.15; color: #fff;
  white-space: nowrap;
  transition: font-size 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.index-rail-span {
  font-size: 0.83rem; line-height: 1.35; color: var(--t-on-ink-dim);
  max-height: 4em; overflow: hidden;
  transition: opacity 0.26s, max-height 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.index-rail a:hover .index-rail-span { color: rgba(255, 255, 255, 0.92); }

.index-rail.is-stuck { --rail-pad-y: 11px; box-shadow: 0 10px 26px -18px rgba(0, 0, 0, 0.9); }
.index-rail.is-stuck .index-rail-span { opacity: 0; max-height: 0; }
.index-rail.is-stuck .index-rail-num { font-size: 0.8rem; }
.index-rail.is-stuck .index-rail-name { font-size: clamp(0.86rem, 1vw, 1.05rem); }

/* Anchor jumps have to clear the header and the shrunk rail. */
.svc-block[id], .index-cat[id] { scroll-margin-top: calc(var(--hdr-h-small) + var(--rail-h) + 10px); }

@media (max-width: 1180px) { .index-rail ol { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Measuring the docked height has to ignore the transition, or it reads the
   height it is animating away from. */
.index-rail.is-measuring, .index-rail.is-measuring * { transition: none !important; }
@media (max-width: 1180px) {
  /* Below six across, a docked rail would be two or three rows deep and eat
     the screen: it becomes one swipeable line of titles instead. */
  .index-rail.is-stuck ol { display: flex; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .index-rail.is-stuck ol::-webkit-scrollbar { display: none; }
  .index-rail.is-stuck li { flex: 0 0 auto; }
  .index-rail.is-stuck a { padding-inline: 16px; }
}
@media (max-width: 620px) { .index-rail ol { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) {
  .index-rail a, .index-rail a::before, .index-rail a::after,
  .index-rail-num, .index-rail-name, .index-rail-span { transition: none; }
}

/* The six blocks */
.svc-block { padding-block: clamp(3.6rem, 7vw, 7rem); overflow: clip; }
.svc-block-grid {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(2.5rem, 5vw, 5.5rem); align-items: center;
}
.svc-block.is-flipped .svc-block-media { order: 2; }
.svc-block-media { position: relative; padding: 0 22px clamp(46px, 6vw, 88px) 0; }
.svc-block-photo { position: relative; }
.svc-block-frame { position: absolute; inset: 0; transform: translate(20px, 20px); border: 1px solid var(--red); }
.svc-block-shot {
  display: block; position: relative; overflow: clip; aspect-ratio: 4 / 3;
  box-shadow: 0 26px 60px -26px rgba(12, 10, 9, 0.7);
}
.svc-block-shot img { width: 100%; height: 100%; object-fit: cover; }
.svc-block-wipe {
  position: absolute; inset: 0; background: var(--red);
  transform: scaleX(0); transform-origin: right center;
}
.svc-block-inset {
  display: block;   /* an <a> stays inline otherwise, and the stacked mobile margin dies */
  position: absolute; z-index: 3; left: 0; bottom: 0;
  width: min(48%, 268px); padding: 9px 9px 4px;
  box-shadow: 0 22px 50px -20px rgba(12, 10, 9, 0.72);
}
.svc-block.is-flipped .svc-block-inset { left: auto; right: 22px; }
.s-paper .svc-block-inset { background: var(--paper); }
.s-ink .svc-block-inset { background: var(--ink-3); }
.svc-block-inset-media { display: block; position: relative; overflow: clip; aspect-ratio: 3 / 2; }
.svc-block-inset-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.svc-block-inset:hover .svc-block-inset-media img { transform: scale(1.06); }
.svc-block-inset-cap { display: grid; gap: 2px; padding: 11px 34px 9px 2px; position: relative; }
.svc-block-inset-lab { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--red); }
.svc-block-inset-title { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; line-height: 1.15; transition: color 0.25s; }
.s-ink .svc-block-inset-title { color: #fff; }
.svc-block-inset-go { position: absolute; right: 4px; bottom: 8px; color: var(--red); font-size: 1.15rem; transition: transform 0.25s; }
.svc-block-inset:hover .svc-block-inset-title { color: var(--red); }
.svc-block-inset:hover .svc-block-inset-go { transform: translateX(5px); }

.svc-block-mark { display: flex; align-items: center; gap: 16px; margin-bottom: 1.1rem; }
.svc-block-mark .head-rule { margin-bottom: 0; }
.svc-block-num { font-family: var(--font-stencil); font-size: clamp(1.6rem, 2.6vw, 2.35rem); line-height: 1; color: var(--red); }
.svc-block-copy .h2 { margin-bottom: 0.7rem; }
.svc-block-strap {
  font-family: var(--font-display); font-weight: 500; font-style: italic;
  font-size: clamp(1.14rem, 1.7vw, 1.5rem); line-height: 1.32; margin-bottom: 1.05rem;
}
.s-ink .svc-block-strap { color: rgba(255, 255, 255, 0.92); }
.svc-block-text { margin-bottom: 1.5rem; max-width: 60ch; }
.s-paper .svc-block-text { color: var(--t-on-paper-dim); }
.s-ink .svc-block-text { color: var(--t-on-ink-dim); }
.s-ink .proj-facts-list li { color: var(--t-on-ink-dim); }
.svc-block-points { margin-bottom: 1.7rem; }
.svc-block-similar {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 1.8rem;
  font-weight: 600; font-size: 0.97rem;
  border-bottom: 2px solid var(--red); padding-bottom: 3px;
  transition: color 0.25s;
}
.svc-block-similar span { color: var(--red); transition: transform 0.25s; display: inline-block; }
.svc-block-similar:hover { color: var(--red); }
.svc-block-similar:hover span { transform: translateX(5px); }
.svc-block-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn-quiet { border-color: currentColor; opacity: 0.8; }
.btn-quiet:hover { opacity: 1; background: rgba(128, 122, 112, 0.12); transform: translateY(-2px); }
@media (max-width: 980px) {
  .svc-block-grid { grid-template-columns: 1fr; gap: clamp(2rem, 5vw, 3rem); }
  .svc-block.is-flipped .svc-block-media { order: 0; }
  .svc-block.is-flipped .svc-block-inset { left: 0; right: auto; }
}
@media (max-width: 620px) {
  .svc-block-media { padding: 0 20px 0 0; }
  .svc-block-inset { position: static; width: 100%; max-width: 330px; margin-top: 1.6rem; padding: 0; box-shadow: none; }
  .svc-block-inset-cap { padding-right: 30px; }
}

/* How a job runs */
.svc-flow { padding-block: var(--sec-pad); position: relative; overflow: clip; }
.svc-flow-plan {
  position: absolute; inset: 0; opacity: 0.1; pointer-events: none;
  background-image: url('../img/plan-texture-1600.webp');
  background-size: 1300px auto; background-position: center top -60px;
  background-repeat: repeat; filter: invert(1);
}
.svc-flow .wrap { position: relative; z-index: 1; }
/* Heading and intro share the row so neither half is left empty. */
.svc-flow-head {
  margin-bottom: clamp(2.2rem, 4.5vw, 3.4rem);
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(1.2rem, 3.5vw, 3.5rem); align-items: end;
}
.svc-flow-head .head-rule { grid-column: 1 / -1; }
.svc-flow-sub { color: var(--t-on-ink-dim); font-size: clamp(1rem, 1.3vw, 1.14rem); padding-bottom: 0.4rem; }
@media (max-width: 900px) {
  .svc-flow-head { grid-template-columns: 1fr; gap: 1.1rem; }
}
.svc-flow-steps {
  position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1.4rem, 2.4vw, 2.6rem); padding-top: 2.8rem;
}
.svc-flow-rail {
  position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--red);
  transform-origin: left center;
}
.svc-flow-step { position: relative; }
.svc-flow-step::before {
  content: ''; position: absolute; left: 0; top: -2.8rem; margin-top: -4px;
  width: 10px; height: 10px; background: var(--red); transform: rotate(45deg);
}
.svc-flow-num { display: block; font-family: var(--font-stencil); font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1; color: var(--red); margin-bottom: 0.6rem; }
.svc-flow-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.12rem, 1.5vw, 1.42rem); line-height: 1.15; color: #fff; margin-bottom: 0.55rem; }
.svc-flow-text { color: var(--t-on-ink-dim); font-size: 0.95rem; line-height: 1.6; }
@media (max-width: 1100px) {
  .svc-flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 0; row-gap: clamp(1.8rem, 4vw, 2.6rem); }
  .svc-flow-rail { display: none; }
  .svc-flow-step { border-top: 2px solid var(--red); padding-top: 1.2rem; }
  .svc-flow-step::before { display: none; }
}
@media (max-width: 560px) { .svc-flow-steps { grid-template-columns: 1fr; } }

/* Closing band */
.svc-close { position: relative; padding-block: var(--sec-pad); overflow: clip; }
.svc-close-media { position: absolute; inset: 0; }
.svc-close-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.svc-close-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(12, 10, 9, 0.97) 0%, rgba(12, 10, 9, 0.9) 44%, rgba(12, 10, 9, 0.62) 100%);
}
.svc-close-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2.5rem, 5vw, 5rem); align-items: center;
}
.svc-close-copy .h2 { margin-bottom: 1.1rem; }
.svc-close-copy p { color: var(--t-on-ink-dim); max-width: 66ch; }
.svc-close-copy p + p { margin-top: 1em; }
.svc-close-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }
.svc-close-side-title { margin-bottom: 0.8rem; }
.svc-close-side-text { color: var(--t-on-ink-dim); font-size: 0.98rem; margin-bottom: 1.6rem; }
.svc-close-badges { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) {
  .svc-close-grid { grid-template-columns: 1fr; }
  .svc-close-side { max-width: 560px; }
}
@media (max-width: 520px) { .svc-close-badges { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- CTA band ---------- */
.cta-band {
  border-top: 1px solid var(--line-on-ink); padding-block: clamp(3rem, 6vw, 5rem);
  position: relative; overflow: clip;
}
/* The drawing-sheet texture again, so the closing band is never a flat slab. */
.cta-band::before {
  content: ''; position: absolute; top: -40px; right: -80px; bottom: -40px;
  width: min(56vw, 820px); pointer-events: none;
  background-image: url('../img/plan-texture-1600.webp');
  background-size: cover; background-position: center;
  opacity: 0.1; filter: invert(1);
}
.cta-band .wrap { position: relative; z-index: 1; }
.cta-band-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 4vw, 4rem); align-items: center;
}
.cta-band .h2 { margin-bottom: 0.8rem; }
.cta-band-sub { color: var(--t-on-ink-dim); max-width: 52ch; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; }
@media (max-width: 800px) {
  .cta-band-grid { grid-template-columns: 1fr; }
  .cta-band-actions { justify-content: flex-start; }
}

/* ---------- Contact page ---------- */
.contact-page { padding-top: calc(var(--hdr-h) + clamp(2.5rem, 6vw, 4rem)); min-height: 86vh; }
.contact-extra { padding-block: clamp(3rem, 6vw, 5rem); }
.contact-extra-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2.5rem, 5vw, 5rem);
}
.contact-extra .h3 { margin-bottom: 0.9rem; }
.contact-extra-text { color: var(--t-on-paper-dim); max-width: 58ch; }
@media (max-width: 800px) {
  .contact-extra-grid { grid-template-columns: 1fr; }
}

/* ---------- Anchor offsets ---------- */
section[id] { scroll-margin-top: calc(var(--hdr-h-small) + 8px); }

/* ---------- Stat rule draw-in (class set by JS) ---------- */
html.has-motion .stat::before,
html.has-motion .stat::after { transform: scaleX(0); transform-origin: left center; transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
html.has-motion .stat::after { transform: scaleY(0); transform-origin: top center; }
html.has-motion .stat.stat-in::before { transform: scaleX(1); }
html.has-motion .stat.stat-in::after { transform: scaleY(1); }

/* ============================================================
   Motion guards
   ============================================================ */
/* Elements GSAP will reveal: keep visible unless the page has
   confirmed motion (html.has-motion set by JS inside the
   no-preference media query). */
html.has-motion [data-reveal] { visibility: hidden; }
html.has-motion.motion-ready [data-reveal] { visibility: visible; }

@media (prefers-reduced-motion: reduce) {
  .hero-scrollcue span { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* ---------- Footer legal links ---------- */
.footer-legal-nav { display: flex; gap: 18px; }
.footer-legal-nav a { color: var(--t-on-ink-dim); transition: color 0.2s; }
.footer-legal-nav a:hover { color: #fff; }

/* ---------- Legal pages (privacy, cookies) ---------- */
.legal { padding-block: clamp(3rem, 6vw, 5rem) var(--sec-pad); }
.legal-grid {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(2.5rem, 6vw, 6rem); align-items: start;
}
.legal-toc { position: sticky; top: calc(var(--hdr-h-small) + 24px); border-top: 2px solid var(--graphite); padding-top: 1.2rem; }
.legal-toc-title { font-family: var(--font-stencil); font-size: 0.85rem; letter-spacing: 0.06em; color: var(--red); margin-bottom: 0.8rem; }
.legal-toc ol { counter-reset: toc; display: grid; gap: 6px; }
.legal-toc li { counter-increment: toc; display: flex; gap: 12px; align-items: baseline; }
.legal-toc li::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-stencil); font-size: 0.85rem; color: var(--t-on-paper-dim); min-width: 1.6em; }
.legal-toc a { color: var(--t-on-paper); font-weight: 500; border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.legal-toc a:hover { color: var(--red); border-color: var(--red); }
.legal-body { display: grid; gap: clamp(2.2rem, 4vw, 3.4rem); }
.legal-section { border-top: 1px solid var(--line-on-paper); padding-top: 1.6rem; }
.legal-section .h3 { margin-bottom: 0.9rem; }
.legal-section p { color: var(--t-on-paper-dim); max-width: 78ch; }
.legal-section p + p, .legal-section ul + p, .legal-section p + ul { margin-top: 1em; }
.legal-section strong { color: var(--t-on-paper); font-weight: 600; }
.legal-list { display: grid; gap: 0.6rem; max-width: 78ch; color: var(--t-on-paper-dim); }
.legal-list li { position: relative; padding-left: 1.4rem; }
.legal-list li::before { content: ''; position: absolute; left: 0; top: 0.72em; width: 8px; height: 8px; background: var(--red); transform: rotate(45deg); }
@media (max-width: 900px) {
  .legal-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .legal-toc { position: static; }
  .legal-toc ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .legal-toc ol { grid-template-columns: 1fr; }
}

/* ---------- Not found ---------- */
.notfound { padding-block: clamp(3rem, 6vw, 5rem) var(--sec-pad); }
.notfound-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(1.2rem, 2.5vw, 2.4rem); }
.notfound-card { display: grid; align-content: start; gap: 0.5rem; padding: 1.6rem 1.4rem 1.8rem; background: var(--paper-2); border-top: 2px solid var(--graphite); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s; }
.notfound-card .head-rule { margin-bottom: 0.6rem; }
.notfound-card:hover { transform: translateY(-4px); background: #fff; }
.notfound-card-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.1; color: var(--t-on-paper); }
.notfound-card:hover .notfound-card-title { color: var(--red); }
.notfound-card-line { color: var(--t-on-paper-dim); font-size: 0.98rem; }
@media (max-width: 1000px) { .notfound-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .notfound-grid { grid-template-columns: 1fr; } }
