/* Bullen Advisors — site styles
   Palette: limestone ground, slate ink, three strata colours
   (Isar = Consulting, Loam = Partnerships, Moraine = Tax and Legal). */

@font-face {
  font-family: "Bitter";
  src: url("fonts/bitter-var.woff") format("woff");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("fonts/fira-sans-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("fonts/fira-sans-italic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("fonts/fira-sans-medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("fonts/fira-sans-semibold.woff") format("woff");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --limestone: #eceee9;
  --paper: #f7f8f5;
  --slate: #1c2a31;
  --slate-soft: #46575e;
  --isar: #2e5a5e;
  --loam: #7a6343;
  --moraine: #9faa97;
  --ochre: #d1ad5a;
  --rule: #c9cfc6;

  --serif: "Bitter", Georgia, "Times New Roman", serif;
  --sans: "Fira Sans", "Segoe UI", system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.9rem, 1.4rem + 1.8vw, 2.75rem);
  --step-4: clamp(3.1rem, 1.8rem + 4.6vw, 5.6rem);

  --wrap: 76rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4.5rem, 9vw, 8rem);
  --header-h: 3.5rem;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--limestone);
  color: var(--slate);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  letter-spacing: -0.01em;
  font-feature-settings: "kern", "liga", "lnum";
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, p, ul, figure, blockquote { margin: 0; }

p, li { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--isar);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--slate);
  color: var(--paper);
  padding: 0.6rem 1rem;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Buttons and links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 1.5px solid var(--slate);
  border-radius: 2px;
  background: var(--slate);
  color: var(--paper);
  font: 500 1rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.button:hover { background: var(--isar); border-color: var(--isar); }
.button--quiet {
  background: transparent;
  color: var(--slate);
}
.button--quiet:hover { background: var(--slate); color: var(--paper); border-color: var(--slate); }

.text-link {
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.text-link:hover { text-decoration-thickness: 2px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--limestone);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-scrolled,
.site-header.is-open { border-bottom-color: var(--slate); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.brand__mark { width: 1.15rem; height: 1.9rem; flex: none; }

/* ---------- Drawer navigation (after Chapitre Résidentiel, photo tiles after Luminaire Authentik) ---------- */
.bar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  height: var(--header-h);
  background: var(--limestone);
}
.bar .brand { justify-self: center; align-self: center; }
.menu-toggle {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0 var(--gutter);
  border: 0;
  background: none;
  color: var(--slate);
  font: 500 0.95rem/1 var(--sans);
  cursor: pointer;
}
.menu-toggle__icon { position: relative; width: 17px; height: 13px; }
.menu-toggle__icon span {
  position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor;
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.3s;
}
.menu-toggle__icon span:nth-child(1) { top: 0; }
.menu-toggle__icon span:nth-child(2) { top: 5.75px; }
.menu-toggle__icon span:nth-child(3) { top: 11.5px; }
.is-open .menu-toggle__icon span:nth-child(1) { transform: translateY(5.75px) rotate(45deg); }
.is-open .menu-toggle__icon span:nth-child(2) { opacity: 0; }
.is-open .menu-toggle__icon span:nth-child(3) { transform: translateY(-5.75px) rotate(-45deg); }
/* rolling label: a second copy slides up on hover */
.roll { position: relative; display: inline-block; height: 1em; overflow: hidden; line-height: 1; }
.roll__track { display: flex; flex-direction: column; gap: 0.3em; transition: transform 0.7s cubic-bezier(0.19, 1, 0.22, 1); }
.menu-toggle:hover .roll__track { transform: translateY(calc(-1em - 0.3em)); }
.bar__cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  padding: 0 var(--gutter);
  background: var(--slate);
  color: var(--paper);
  font: 500 0.95rem/1 var(--sans);
  text-decoration: none;
  transition: background-color 0.2s;
}
.bar__cta:hover { background: var(--isar); }
/* While the hero's own "Start a conversation" card is on screen, the bar's copy steps aside */
.bar__cta { transition: background-color 0.2s, opacity 0.35s, visibility 0s; }
.hero-in-view .bar__cta { opacity: 0; visibility: hidden; transition: background-color 0.2s, opacity 0.35s, visibility 0s 0.35s; }
a.menu-toggle { text-decoration: none; }
.bar__back { width: 0.55rem; height: 0.55rem; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-left: 0.2rem; }

.menu-backdrop {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.is-open .menu-backdrop { opacity: 0.5; pointer-events: auto; }

.menu {
  position: absolute;
  left: 0;
  top: 100%;
  width: 100%;
  z-index: 1;
  overflow: hidden;
  background: #dfe3dc;
  color: var(--slate);
  border-bottom: 1px solid var(--slate);
}
.menu[hidden] { display: none; }
.menu__inner {
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  padding: 2rem var(--gutter) 2.25rem;
}
.menu__main { display: flex; flex-direction: column; justify-content: space-between; gap: 3.5rem; }
.menu__links {
  display: grid;
  grid-template-columns: repeat(2, auto);
  grid-auto-flow: column;
  grid-template-rows: repeat(3, auto);
  gap: 0.6rem 4.5rem;
  list-style: none;
  padding: 0;
}
.menu__link {
  position: relative;
  display: inline-block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2rem, 1.4rem + 1.6vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-decoration: none;
  white-space: nowrap;
}
.menu__link::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.1rem;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.7s cubic-bezier(0.19, 1, 0.22, 1);
}
.menu__link:hover::before,
.menu__link:focus-visible::before,
.menu__link[aria-current="true"]::before { transform: scaleX(1); }
.menu__meta { display: flex; gap: 4.5rem; font-size: 0.95rem; line-height: 1.5; }
.menu__label { color: var(--slate-soft); margin-bottom: 0.4rem; }
.menu__meta a { text-underline-offset: 0.2em; }
.menu__photo {
  position: relative;
  width: min(26rem, 32vw);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--moraine);
  flex: none;
}
.menu__photo img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.35s ease; }
.menu__photo img.is-swapping { opacity: 0; }
.menu__photo figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2rem 1rem 0.8rem;
  color: var(--paper);
  font-size: 0.875rem;
  background: linear-gradient(to top, rgba(28, 42, 49, 0.6), transparent);
}
body.menu-locked { overflow: hidden; }

@media (max-width: 799px) {
  .bar { grid-template-columns: 1fr auto; }
  .bar .brand { order: -1; justify-self: start; padding-left: var(--gutter); }
  .menu-toggle { justify-self: end; padding: 0 var(--gutter); }
  .bar__cta { display: none; }
  .menu { height: calc(100dvh - var(--header-h)); overflow-y: auto; }
  .menu__inner { flex-direction: column; padding: 1.5rem var(--gutter) 2rem; gap: 2.5rem; }
  .menu__links { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; gap: 0.5rem; }
  .menu__meta { flex-direction: column; gap: 1.5rem; }
  .menu__photo { display: none; }
}

/* ---------- Hero (after GKC Architecture & Design, variation 01 "Strata lift") ----------
   A full-screen landscape with the headline on the left and two cards at the foot.
   On first load three limestone layers cover the page and lift away, bottom first. */
.hero {
  position: relative;
  min-height: max(36rem, calc(100svh - var(--header-h)));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--paper);
}
.hero__bg { position: absolute; inset: 0; background: #6f7d7a url("../images/photos/hero-foreland.jpg") 50% 35% / cover no-repeat; }
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.hero__shade {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(28, 42, 49, 0.55), rgba(28, 42, 49, 0.05) 65%),
              linear-gradient(to top, rgba(28, 42, 49, 0.35), transparent 40%);
}
.hero__body {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 5rem var(--gutter) 2.5rem;
  padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--step-4);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 12ch;
}
.hero__lede {
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
  max-width: 30rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: rgba(247, 248, 245, 0.88);
}

.hero__foot {
  position: relative; z-index: 1;
  display: flex; align-items: flex-end; gap: 1rem;
  padding: 0 var(--gutter) var(--gutter);
  padding-left: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
}
.mask { overflow: hidden; flex: none; }
.hero { --card-h: 8.5rem; }
.hero-cta {
  display: flex; flex-direction: column; justify-content: space-between;
  width: 17rem; height: var(--card-h); padding: 1.1rem 1.2rem 1.05rem;
  background: var(--slate); color: var(--paper); text-decoration: none;
  transition: background-color 0.3s;
}
.hero-cta__title,
.cases-news__title { font: 500 1.35rem/1.15 var(--serif); letter-spacing: -0.015em; }
.hero-cta__meta { display: flex; justify-content: flex-end; color: rgba(247, 248, 245, 0.75); }
.hero-cta svg, .cases-news__more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1); }
.hero-cta:hover { background: var(--isar); }
.hero-cta:hover svg { transform: translateX(4px); }

/* Case-study carousel: 4s autoplay, 400ms slide, pause on hover, progress line on top */
.cases-news { position: relative; width: 27rem; max-width: 100%; height: var(--card-h); background: var(--paper); color: var(--slate); }
.cases-news__view { position: relative; height: 100%; overflow: hidden; }
.cases-news__view::before {
  content: ""; position: absolute; left: 0; top: 0; z-index: 2; width: 100%; height: 2px;
  background: var(--isar); transform: scaleX(var(--autoplay-progress, 0)); transform-origin: left top;
}
.cases-news__list { display: flex; height: 100%; margin: 0; padding: 0; list-style: none; transition: transform 0.4s ease; }
.cases-news__item { position: relative; flex: 0 0 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 1.1rem 1.2rem 1.05rem; }
.cases-news__title { max-width: 17rem; text-wrap: balance; }
.cases-news__more { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; color: var(--slate-soft); }
.cases-news__item a { position: absolute; inset: 0; }
.cases-news__item:hover .cases-news__more svg { transform: translateX(4px); }
.cases-news__bar { position: absolute; right: 1.2rem; bottom: 0.85rem; z-index: 3; display: flex; align-items: center; gap: 0.35rem; }
.cases-news__count { margin-right: 0.4rem; font-size: 0.8rem; color: var(--slate-soft); font-variant-numeric: tabular-nums; }
.cases-news__bar button {
  display: grid; place-items: center; width: 2rem; height: 2rem;
  border: 1px solid var(--rule); border-radius: 50%; background: none; color: var(--slate); cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.cases-news__bar button:hover { background: var(--slate); border-color: var(--slate); color: var(--paper); }
.cases-news__bar svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.media-toggle {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%;
  background: rgba(28, 42, 49, 0.55); color: var(--paper); cursor: pointer;
  display: grid; place-items: center;
}
.media-toggle::before { content: ""; width: 0.7rem; height: 0.8rem; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.media-toggle[aria-pressed="true"]::before {
  width: 0; height: 0; border-style: solid; border-width: 0.45rem 0 0.45rem 0.75rem;
  border-color: transparent transparent transparent currentColor; margin-left: 0.2rem;
}
.media-toggle:hover { background: rgba(28, 42, 49, 0.8); }
.media-toggle[hidden], html:not(.js) .media-toggle { display: none; }

/* First-load cover: three limestone layers and the four-square loader */
.loader { display: none; }
.js .loader { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: repeat(3, 1fr); cursor: wait; }
.loader__layer { background: var(--limestone); transition: transform 0.9s cubic-bezier(0.23, 1, 0.32, 1); }
.loader__layer:nth-child(1) { transition-delay: 0.32s; }
.loader__layer:nth-child(2) { transition-delay: 0.16s; }
.loader__spin { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.loader__box { position: relative; width: 80px; height: 80px; transition: transform 0.4s cubic-bezier(0.38, 0.005, 0.215, 1); }
.loader__box i {
  position: absolute; top: 33.33px; width: 13.33px; height: 13.33px;
  border: 1px solid #8f9a93; overflow: hidden; animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.loader__box i::after { content: ""; position: absolute; top: 50%; left: 50%; width: 144%; margin-left: -72%; height: 1px; background: #8f9a93; transform: rotate(-45deg); }
.loader__box i:nth-child(1) { left: 8px; animation: loader1 0.6s infinite; }
.loader__box i:nth-child(2) { left: 8px; animation: loader2 0.6s infinite; }
.loader__box i:nth-child(3) { left: 32px; animation: loader2 0.6s infinite; }
.loader__box i:nth-child(4) { left: 56px; animation: loader3 0.6s infinite; }
@keyframes loader1 { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes loader2 { from { transform: translate(0, 0); } to { transform: translate(24px, 0); } }
@keyframes loader3 { from { transform: scale(1); } to { transform: scale(0); } }
.is-ready .loader { pointer-events: none; cursor: auto; }
.is-ready .loader__layer { transform: translate3d(0, -101vh, 0); }
.is-ready .loader__box { transform: scale3d(0, 0, 1); }
.is-loaded .loader { display: none; }

/* Entrance after the layers lift */
.js .hero h1 { transform: translate3d(0, 60px, 0); opacity: 0; }
.js .hero__lede { transform: translate3d(0, 30px, 0); opacity: 0; }
.js .hero .mask__in { transform: translate3d(0, 100%, 0); }
.js .hero :is(h1, .hero__lede, .mask__in) { transition: transform 1s 0.7s cubic-bezier(0.23, 1, 0.32, 1), opacity 1s 0.7s cubic-bezier(0.23, 1, 0.32, 1); }
.is-ready .hero :is(h1, .hero__lede, .mask__in) { transform: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .js .loader { display: none; }
  .js .hero :is(h1, .hero__lede, .mask__in) { transform: none; opacity: 1; transition: none; }
}

@media (max-width: 699px) {
  .hero { --card-h: 7.5rem; min-height: calc(100svh - var(--header-h)); }
  .hero__body { padding-top: 3.5rem; }
  .hero__foot { flex-direction: column; align-items: stretch; }
  .mask { flex: auto; }
  .hero-cta, .cases-news { width: 100%; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section); }
.section + .section { padding-top: 0; }
.section--paper { background: var(--paper); }
.section--paper + .section,
.section + .section--paper,
.section--dark + .section,
.section + .section--dark { padding-top: var(--section); }

.section--dark {
  background: var(--slate);
  color: var(--paper);
}

[id] { scroll-margin-top: calc(var(--header-h) + 1rem); }

.section-head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 2rem;
  row-gap: 1.25rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head h2 { grid-column: 1 / span 5; }
.section-head p {
  grid-column: 7 / span 6;
  align-self: end;
  color: var(--slate-soft);
  max-width: 36rem;
}
.section--dark .section-head p { color: #c3ccc9; }

h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--step-3);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--step-2);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

@media (max-width: 860px) {
  .section-head { display: block; }
  .section-head p { margin-top: 1rem; }
}

/* Who we are */
.about {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 2rem;
  row-gap: 2rem;
  align-items: center;
}
.about__image { grid-column: 1 / span 5; }
.about__image img { width: 100%; height: auto; }
.about__text { grid-column: 7 / span 6; }
.about__body {
  margin-top: 1.5rem;
  font-size: var(--step-1);
  line-height: 1.55;
  max-width: 36rem;
}
.mission {
  grid-column: 1 / -1;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-top: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--rule);
  text-align: center;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 1.2rem + 2.4vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
@media (max-width: 860px) {
  .about { display: block; }
  .about__image { margin-bottom: 2rem; max-width: 26rem; }
}

/* ---------- Who we serve (after OVA Investment's pinned manifesto) ----------
   A tall track keeps a full-screen photo and the copy pinned while three client types
   take turns. Without motion it is a photo band with the three types listed. */
.serve { position: relative; background: var(--slate); color: var(--paper); }
.serve__bg { position: relative; height: 70vh; min-height: 22rem; overflow: hidden; }
.serve__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 35% 50%; transform-origin: 25% 20%; }
.serve__bg::after { content: ""; position: absolute; inset: 0; background: #000; opacity: 0.1; }
.serve__inner { position: relative; z-index: 2; padding: var(--section) var(--gutter); max-width: var(--wrap); margin-inline: auto; }
.serve__label { font-family: var(--serif); font-weight: 500; font-size: var(--step-3); line-height: 1.08; letter-spacing: -0.02em; }
/* Still version: titles and paragraphs pair up row by row */
.serve__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 2rem; row-gap: 2rem; }
.serve__titles, .serve__rotator, .serve__copy { display: contents; }
.serve__label { grid-column: 1 / -1; margin-bottom: 0.5rem; }
.serve__title { grid-column: 1; font-size: var(--step-3); line-height: 1.08; letter-spacing: -0.02em; }
.serve__text { grid-column: 2; color: rgba(247, 248, 245, 0.85); max-width: 26rem; }
.serve__title:nth-child(1), .serve__text:nth-child(1) { grid-row: 2; }
.serve__title:nth-child(2), .serve__text:nth-child(2) { grid-row: 3; }
.serve__title:nth-child(3), .serve__text:nth-child(3) { grid-row: 4; }
@media (max-width: 699px) {
  .serve__inner { grid-template-columns: 1fr; row-gap: 0.75rem; }
  .serve__title, .serve__text { grid-column: 1; }
  .serve__title:nth-child(1) { grid-row: 2; } .serve__text:nth-child(1) { grid-row: 3; }
  .serve__title:nth-child(2) { grid-row: 4; margin-top: 1.25rem; } .serve__text:nth-child(2) { grid-row: 5; }
  .serve__title:nth-child(3) { grid-row: 6; margin-top: 1.25rem; } .serve__text:nth-child(3) { grid-row: 7; }
}

/* Pinned version */
.motion-on .serve { height: calc(70vh * 3 + 100vh); background: var(--slate); }
.motion-on .serve::before,
.motion-on .serve::after { content: ""; position: absolute; z-index: 1; left: 0; right: 0; pointer-events: none; }
.motion-on .serve::before { top: 0; height: 30svh; background: linear-gradient(0deg, rgba(28, 42, 49, 0) 0%, var(--slate) 95%); }
.motion-on .serve::after { bottom: 0; height: 40svh; background: linear-gradient(180deg, rgba(28, 42, 49, 0) 0%, var(--slate) 95%); }
.motion-on .serve__bg {
  position: sticky; top: var(--header-h);
  height: calc(100lvh - var(--header-h)); min-height: 0;
  opacity: var(--progress-show, 0); transition: opacity 0.2s linear;
}
.motion-on .serve__bg::after { opacity: 0.5; }
.motion-on .serve__bg img { will-change: transform; }
.motion-on .serve__inner {
  position: sticky; top: var(--header-h);
  height: calc(100svh - var(--header-h)); margin-top: calc(-100svh + var(--header-h));
  max-width: none; padding: 0 var(--gutter);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 0.85fr); align-items: center; column-gap: 0;
}
.motion-on .serve__titles { display: block; grid-column: 1 / span 2; grid-row: 1; justify-self: end; text-align: right; padding-right: 2.5rem; }
.motion-on .serve__label {
  font-size: clamp(1.2rem, 0.9rem + 0.8vw, 1.6rem); margin: 0 0 0.6rem; opacity: 0;
  transition: opacity 0.2s linear;
}
.motion-on .serve.is-active .serve__label { opacity: 1; transition: opacity 0.4s linear; }
.motion-on .serve__rotator {
  display: block; position: relative; overflow: clip;
  height: 2.25em; width: 9.5em; max-width: 100%;
  font-size: clamp(2.6rem, 1.4rem + 3.4vw, 5rem);
}
.motion-on .serve__copy { display: block; position: relative; grid-column: 3; grid-row: 1; min-height: 9rem; align-self: center; }
.motion-on .serve__title {
  position: absolute; top: 0; right: 0; width: 100%; margin: 0;
  font-size: 1em; line-height: 1.08; letter-spacing: -0.03em; text-wrap: balance;
}
.motion-on .serve__text { position: absolute; top: 0; left: 0; right: 0; max-width: 24rem; font-size: var(--step-1); line-height: 1.45; visibility: hidden; }
.motion-on .serve__text.is-shown { visibility: visible; }
.motion-on .serve .nowrap { white-space: nowrap; }
.motion-on .serve .char { display: inline-block; opacity: 0; will-change: transform, opacity; }
.motion-on .serve .line { display: block; overflow: clip; }
.motion-on .serve .word { display: inline-block; opacity: 0; will-change: transform, opacity; }
@media (max-width: 699px) {
  .motion-on .serve__inner { grid-template-columns: 1fr; align-content: center; gap: 1.5rem; }
  .motion-on .serve__titles { grid-column: 1; justify-self: stretch; width: 100%; text-align: left; padding-right: 0; }
  .motion-on .serve__copy { grid-column: 1; grid-row: 2; }
  .motion-on .serve__rotator { font-size: clamp(1.9rem, 8vw, 2.5rem); width: 100%; height: 3.3em; }
  .motion-on .serve__title { right: auto; left: 0; }
  .motion-on .serve__text { font-size: 1rem; }
}

/* ---------- Services (after Populous "Disciplines") ----------
   An oversized list of disciplines. Hovering, focusing or tapping one turns it accent teal,
   draws an arrow in from the left, and wipes its photo up into a sticky panel on the right,
   while the previous photo shrinks and fades behind it. The panel also carries that
   discipline's sentence and services. */
.disc { --ease: cubic-bezier(0.215, 0.61, 0.355, 1); position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 3rem; }
.disc__list { list-style: none; padding: 0; margin: 0; align-self: start; }
.disc__btn {
  position: relative; display: flex; align-items: center; width: 100%;
  padding: 0; border: 0; background: none; color: var(--slate); text-align: left; cursor: pointer;
  font: 500 clamp(2.6rem, 1.2rem + 4.4vw, 5.4rem)/1.08 var(--serif); letter-spacing: -0.035em;
  transition: color 0.15s var(--ease);
}
.disc__arrow {
  position: absolute; left: -0.95em; top: 50%; width: 0.6em; height: 0.6em; margin-top: -0.3em;
  clip-path: inset(0 100% 0 0); transform: translateX(-0.25em);
  transition: clip-path 0.3s var(--ease), transform 0.3s var(--ease);
}
.disc__arrow svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }
.disc__row:nth-child(1) { --accent: var(--isar); }
.disc__row:nth-child(2) { --accent: var(--loam); }
.disc__row:nth-child(3) { --accent: #5f6f5c; } /* sage, darkened for readable contrast on paper */
.disc__btn:hover, .disc__btn:focus-visible, .disc__btn[aria-expanded="true"] { color: var(--accent); }
.disc__btn:hover .disc__arrow, .disc__btn:focus-visible .disc__arrow, .disc__btn[aria-expanded="true"] .disc__arrow { clip-path: inset(0 0 0 0); transform: none; }
.disc__btn:focus-visible { outline-offset: 6px; }

.disc__preview { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; display: flex; flex-direction: column; gap: 1.25rem; }
.disc__figure { position: relative; margin: 0; aspect-ratio: 3 / 2; overflow: hidden; background: var(--limestone); }
/* The selected discipline's stratum colour runs along the top of its photo */
.disc__figure::after { content: ""; position: absolute; left: 0; right: 0; top: 0; z-index: 999; height: 8px; background: var(--disc-accent, var(--isar)); transition: background-color 0.6s var(--ease); }
.disc__figure img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform-origin: 50% 0; clip-path: inset(100% 0 0 0); opacity: 1;
  transition: clip-path 0.6s var(--ease), transform 0.6s var(--ease), opacity 0.6s var(--ease);
}
.disc__figure img.is-active { clip-path: inset(0 0 0 0); }
.disc__figure img.is-past { clip-path: inset(0 0 0 0); transform: scale(0.9); opacity: 0; }
.disc__figure img.stop-animations { transition: none; }
.disc__title { font-size: var(--step-2); }
.disc__detail p { color: var(--slate-soft); font-size: 1rem; margin-top: 0.5rem; }
.disc__detail ul { list-style: none; padding: 0; margin: 1rem 0 0; border-top: 1px solid var(--rule); }
.disc__detail li { padding: 0.6rem 0; border-bottom: 1px solid var(--rule); font-size: 1rem; }
.disc__detail:not([hidden]) { animation: disc-in 0.5s var(--ease); }
@keyframes disc-in { from { opacity: 0; transform: translateY(10px); } }
.disc__preview .button { align-self: start; margin-top: 0.5rem; }

@media (max-width: 999px) {
  .disc { grid-template-columns: 1fr; gap: 2rem; }
  .disc__arrow { position: static; order: 2; margin: 0 0 0 auto; clip-path: none; transform: none; width: 0.45em; height: 0.45em; }
  .disc__btn { font-size: clamp(2rem, 1.2rem + 3.6vw, 3.2rem); }
  .disc__preview { position: static; }
}
@media (max-width: 699px) {
  .disc__row + .disc__row { border-top: 1px solid var(--rule); }
  .disc__btn { padding: 0.9rem 0; font-size: var(--step-3); }
}
@media (prefers-reduced-motion: reduce) {
  .disc__btn, .disc__arrow, .disc__figure img { transition-duration: 0s; }
  .disc__detail:not([hidden]) { animation: none; }
}

/* Industries: drill-core strata (Obys Agency tech-stack pattern) */
.ind { --ind-rule: rgba(236, 238, 233, 0.16); --ind-ease: cubic-bezier(0.65, 0.05, 0.36, 1); }
.ind-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  grid-template-rows: auto 7rem auto auto auto 5rem;
}
.ind-rule {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: var(--ind-rule);
  transform-origin: 0 50%;
}
.ind-vrule {
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--ind-rule);
  transform-origin: 50% 0;
}
.ind-vrule--1 { left: calc(100% / 3.3); }
.ind-vrule--2 { left: calc(100% * 2.3 / 3.3); }
.ind-title {
  grid-column: 2; grid-row: 1;
  padding: 1.25rem 1.5rem 2rem;
}
.ind-title h2 { margin: 0; }
.ind-stack {
  grid-column: 2; grid-row: 2 / 7;
  position: relative;
}
.ind-stack__sticky {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  display: flex;
  justify-content: center;
  padding: 1rem 1.5rem 2rem;
}
.ind-stack__svg {
  width: min(100%, 22rem);
  height: auto;
  max-height: calc(100vh - var(--header-h) - 4rem);
  overflow: visible;
  color: var(--paper);
}
.ind-stack__guides line {
  stroke: currentColor;
  stroke-opacity: 0.28;
  stroke-width: 1;
  stroke-dasharray: 2 4;
  vector-effect: non-scaling-stroke;
}
.ind-layer { cursor: default; }
.ind-layer path {
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.ind-layer__fill { fill: var(--slate); transition: fill 0.3s var(--ind-ease); }
.ind-layer__wall { fill: #131d22; }
.ind-layer__cut { fill: none; }
.ind-layer.is-active .ind-layer__fill { fill: var(--ochre); }
.ind-layer.is-active path { stroke: var(--slate); }
.ind-layer.is-active .ind-layer__wall { fill: #a98a43; }

.ind-card {
  position: relative;
  padding: 1.25rem 1.5rem 2.5rem;
  transition: background-color 0.3s var(--ind-ease);
}
.ind-card .ind-rule { background: rgba(236, 238, 233, 0.7); }
.ind-card.is-active { background-color: rgba(236, 238, 233, 0.06); }
.ind-card--a { grid-column: 1; grid-row: 3; }
.ind-card--b { grid-column: 3; grid-row: 4; }
.ind-card--c { grid-column: 1; grid-row: 5; }
.ind-card__label { margin: 0; color: #9fb0ad; font-size: 0.9375rem; }
.ind-card__num {
  margin: 0.25rem 0 1rem;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(4rem, 3rem + 3vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--paper);
  font-variant-numeric: lining-nums;
}
.ind-card h3 { margin: 0 0 1.25rem; }
.ind-card__text { margin: 0; color: #c3ccc9; font-size: 0.9375rem; max-width: 26rem; text-wrap: pretty; }

/* Track record */
.ind-record {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 2.3fr;
}
.ind-record__head {
  margin: 0;
  padding: 1.25rem 1.5rem 2rem 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  padding: 0;
  margin: 0;
}
.stats li {
  padding: 1.5rem 1.5rem 0;
  border-left: 1px solid var(--ind-rule);
}
.stats strong {
  display: block;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.75rem, 2rem + 3vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--paper);
  font-variant-numeric: lining-nums;
}
.stats span {
  display: block;
  margin-top: 0.75rem;
  color: #c3ccc9;
  font-size: 0.9375rem;
  max-width: 12rem;
}

@media (max-width: 1099px) {
  .ind-record { grid-template-columns: 1fr; }
  .ind-record__head { padding-bottom: 1rem; }
  .stats li:first-child { border-left: 0; padding-left: 0; }
}
@media (max-width: 767px) {
  .ind-grid { display: block; }
  .ind-vrule { display: none; }
  .ind-title { padding: 1.25rem 0 1rem; }
  .ind-stack {
    position: sticky;
    top: var(--header-h);
    z-index: 2;
    background: var(--slate);
    border-bottom: 1px solid var(--ind-rule);
  }
  .ind-stack__sticky { position: static; padding: 0.5rem 0 0.75rem; overflow: hidden; }
  .ind-stack__svg { width: auto; height: 30vh; max-height: 15rem; }
  .ind-card { padding: 1.25rem 0 2.5rem; }
  .ind-card + .ind-card { margin-top: 1rem; }
  .ind-card.is-active { background: none; }
  .ind-card.is-active .ind-card__num { color: var(--ochre); }
  .ind-card__num { transition: color 0.3s var(--ind-ease); }
  .ind-record { margin-top: 3rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li { padding: 1.25rem 1rem 1.5rem 0; border-left: 0; border-top: 1px solid var(--ind-rule); }
}

/* Case studies: folio of panels that settle into place (Eduard Bodak pattern) */
.folio {
  display: grid;
  gap: clamp(4rem, 9vw, 8rem);
  list-style: none;
  padding: 0;
  margin: 0;
}
.folio__row {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.folio__place { position: relative; }
.folio__visual {
  position: relative;
  transform-origin: 0 0;
  perspective: 62.5rem;
}
.folio__tilt { will-change: transform; }
.folio__media {
  margin: 0;
  background: var(--slate);
  padding: clamp(1.25rem, 0.8rem + 2.2vw, 3rem) clamp(1.5rem, 1rem + 3vw, 4rem);
}
.folio__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.case {
  height: 100%;
}
.case__sticky {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  padding-top: 0.25rem;
}
@media (max-width: 999px) {
  .folio__row { grid-template-columns: 1fr; gap: 1.5rem; }
  .case__sticky { position: static; }
}
.case h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--step-2);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.case__facts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 0.25rem 2rem;
  margin: 1rem 0 0;
  font-size: var(--step--1);
}
.case__facts dt { color: var(--slate-soft); }
.case__facts dd { margin: 0.1rem 0 0; color: var(--slate); }
@media (max-width: 420px) {
  .case__facts { grid-template-columns: 1fr 1fr; }
}
.case__outcome {
  margin-top: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid var(--isar);
}
.case__outcome h4,
.case__more h4 {
  margin: 0 0 0.3rem;
  font-family: var(--serif);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--isar);
}
.case__more {
  margin-top: auto;
  padding-top: 1.5rem;
}
.case__more summary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  list-style: none;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
.case__more summary::-webkit-details-marker { display: none; }
.case__more summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s;
}
.case__more[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.case__more[open] summary .more-open { display: none; }
.case__more:not([open]) summary .more-close { display: none; }
.case__more section { margin-top: 1.25rem; }
.case__more section + section { margin-top: 1rem; }
.case__more p { color: var(--slate-soft); }
.case p { font-size: 1rem; }


/* Contact: frosted email panel over the Isar (Dolsten & Co. footer pattern) */
.contact-section { background: var(--limestone); overflow: hidden; }
.contact-top { padding-top: var(--section); }
.contact-rule {
  position: relative;
  height: 12px;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.contact-rule::before {
  content: "";
  position: absolute;
  left: 22px; right: 22px; top: 50%;
  height: 1px;
  background: var(--slate-soft);
  opacity: 0.6;
}
.contact-plus svg,
.contact-mail__plus svg { display: block; width: 12px; height: 12px; stroke: currentColor; stroke-width: 1.2; fill: none; }
.contact {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 2rem;
  row-gap: 2.5rem;
}
.contact__lead { grid-column: 1 / span 6; }
.contact__lead h2 { margin: 0 0 1rem; }
.contact__intro {
  font-size: var(--step-1);
  color: var(--slate-soft);
  max-width: 26rem;
  margin: 0;
}
.contact address {
  grid-column: 8 / span 5;
  font-style: normal;
  border-top: 1.5px solid var(--slate);
}
.contact address > * {
  display: block;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}
.contact address a { text-decoration: none; font-weight: 500; }
.contact address a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

.contact-stage {
  position: relative;
  height: clamp(26rem, 52vw, 44rem);
  margin-top: clamp(2rem, 5vw, 4rem);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.contact-stage__image,
.contact-stage__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}
.contact-stage__image img {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
}
.contact-mail {
  --mail-x: 0px; --mail-y: 0px;
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: start;
  gap: 0.9rem;
  padding: 2.25rem 2.75rem;
  color: var(--slate);
  text-decoration: none;
}
.contact-mail__label,
.contact-mail__inner,
.contact-mail__plus { will-change: transform; }
.contact-mail__label {
  padding: 0.3rem 0.65rem;
  background: var(--limestone);
  font-size: 0.9375rem;
  font-weight: 500;
}
.contact-mail__inner {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  padding: clamp(0.9rem, 1.6vw, 1.4rem) clamp(1.1rem, 2.2vw, 1.8rem);
  background: rgba(236, 238, 233, 0.62);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  transition: background-color 0.3s ease;
}
.contact-mail:hover .contact-mail__inner,
.contact-mail:focus-visible .contact-mail__inner { background: rgba(236, 238, 233, 0.82); }
.contact-mail:focus-visible { outline: none; }
.contact-mail:focus-visible .contact-mail__inner { outline: 2px solid var(--slate); outline-offset: 3px; }
.contact-mail__arrow {
  flex: none;
  width: clamp(1.6rem, 3vw, 2.75rem);
  height: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: square;
}
.contact-mail__text {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.15rem, 0.5rem + 3.8vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.contact-mail__plus { position: absolute; color: var(--paper); }
.contact-mail__plus--tl { left: 0; top: 0; }
.contact-mail__plus--tr { right: 0; top: 0; }
.contact-mail__plus--bl { left: 0; bottom: 0; }
.contact-mail__plus--br { right: 0; bottom: 0; }

@media (max-width: 860px) {
  .contact { display: block; }
  .contact address { margin-top: 2.5rem; }
}
@media (max-width: 479px) {
  .contact-stage { height: 26rem; }
  .contact-mail { padding: 1.75rem 1rem; }
  .contact-mail__inner { padding: 0.8rem 0.9rem; }
}

/* Entrance (main.js adds .is-in): photo rises from below, then label and
   address fade in from blur. */
.motion-on .contact-stage__image { transform: translateY(100%); }
.motion-on .contact-stage.is-in .contact-stage__image {
  transform: none;
  transition: transform 2s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.motion-on .contact-mail__label,
.motion-on .contact-mail__text {
  opacity: 0;
  filter: blur(8px);
}
.motion-on .contact-mail.is-in .contact-mail__label,
.motion-on .contact-mail.is-in .contact-mail__text {
  opacity: 1;
  filter: blur(0);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.motion-on .contact-mail.is-in .contact-mail__text { transition-delay: 0.1s; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 2rem 2.5rem;
  font-size: var(--step--1);
  color: var(--slate-soft);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  padding: 0;
}
.site-footer a,
.site-footer button {
  color: inherit;
  text-underline-offset: 0.2em;
}
.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Consent banner ---------- */

.consent {
  position: fixed;
  right: var(--gutter);
  bottom: var(--gutter);
  z-index: 90;
  width: min(26rem, calc(100% - 2 * var(--gutter)));
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 6px solid var(--isar);
  box-shadow: 0 18px 40px -18px rgba(28, 42, 49, 0.45);
  padding: 1.5rem;
}
.consent[hidden] { display: none; }
.consent h2 {
  font-size: var(--step-1);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.consent p { font-size: 0.95rem; color: var(--slate-soft); }
.consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.consent__actions .button { flex: 1 1 7rem; justify-content: center; min-height: 2.75rem; padding: 0.6rem 1rem; font-size: 0.95rem; white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .consent:not([hidden]) { animation: rise 0.35s ease-out; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
}

/* ---------- Legal pages ---------- */

.legal {
  padding-block: clamp(3rem, 7vw, 6rem) var(--section);
}
.legal h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--step-3);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.legal .meta { color: var(--slate-soft); margin-bottom: 3rem; }
.legal__body { max-width: 42rem; }
.legal h2 {
  font-size: var(--step-2);
  margin: 3rem 0 1rem;
}
.legal h3 {
  font-size: var(--step-1);
  margin: 2rem 0 0.75rem;
}
.legal p + p,
.legal ul + p,
.legal p + ul { margin-top: 1rem; }
.legal ul { padding-left: 1.25rem; }
.legal a { text-underline-offset: 0.2em; }
.legal .placeholder {
  background: #f4e7c2;
  padding: 0 0.25rem;
}

.not-found {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  padding-block: var(--section);
}
.not-found h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: var(--step-4);
  line-height: 1;
  letter-spacing: -0.025em;
  max-width: 12ch;
}
.not-found p { font-size: var(--step-1); color: var(--slate-soft); max-width: 32rem; }

@media print {
  .site-header, .consent, .loader, .media-toggle { display: none !important; }
  body { background: #fff; }
  .section--dark { background: #fff; color: #000; }
  .case__more > *:not(summary) { display: block !important; }
}
.media-toggle[hidden] { display: none; }

/* =========================================================
   Scroll choreography (active only with .motion-on)
   --p is set by scroll.js: 0 → 1 as an element moves through.
   ========================================================= */

/* Who we are: a pinned "sun study". The stone photo becomes a day of light,
   scrubbed by scroll. Outside motion mode it is a normal section. */
.sun-study { padding-block: var(--section) 0; }
.sun-study__sticky { padding-bottom: var(--section); }
.about__image { position: relative; margin: 0; }
.about__still { display: block; width: 100%; height: auto; }
.about__canvas { display: none; }
.motion-on .about__still,
.motion-on .about__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.motion-on .about__still { object-fit: cover; object-position: 50% 60%; }
.motion-on .about__canvas { display: block; opacity: 0; transition: opacity 0.5s ease; }
.motion-on .about__canvas.is-ready { opacity: 1; }
.sun-meter { display: none; }

.mission-wrap { padding-bottom: var(--section); }
.mission-wrap .mission {
  margin-top: 0;
  padding-top: clamp(3rem, 7vw, 5rem);
}

.motion-on .sun-study { padding-top: 0; }
.motion-on .sun-study__track { height: 190vh; }
.motion-on .sun-study__sticky {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  padding-bottom: 0;
  overflow: hidden;
}
.motion-on .sun-study .about { width: 100%; }
.motion-on .about__image {
  max-height: calc(100svh - var(--header-h) - 4rem);
  aspect-ratio: 949 / 1186;
  justify-self: start;
  width: auto;
  height: calc(100svh - var(--header-h) - 4rem);
  max-width: 100%;
}

/* a thin bar that fills as the day passes */
.motion-on .sun-meter {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 2px;
  background: var(--rule);
}
.motion-on .sun-meter span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--ochre);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
}
.motion-on #sun-track .sun-meter span { transform: scaleX(var(--p, 0)); }

/* Who we are text, tied to scroll as it comes into view (before the pin):
   the heading rises, then the paragraph inks in word by word like the
   mission line below it. */
.motion-on .sun-study .about__text h2 {
  opacity: clamp(0, calc(var(--p, 0) * 3.5), 1);
  translate: 0 calc((1 - clamp(0, calc(var(--p, 0) * 2.5), 1)) * 48px);
}
.motion-on .sun-study .about__body .word {
  opacity: clamp(0.14, calc(var(--p, 0) * (var(--n) + 6) - var(--i) - 3), 1);
  transition: opacity 0.12s linear;
}

@media (max-width: 860px) {
  .motion-on .sun-study__track { height: 170vh; }
  .motion-on .sun-study__sticky { align-items: flex-start; padding-top: 1.5rem; }
  .motion-on .sun-study .about { display: flex; flex-direction: column; gap: 1.25rem; }
  .motion-on .about__image { height: 46svh; margin: 0; }
  .motion-on .about__body { font-size: var(--step-0); margin-top: 0.75rem; }
}

/* Mission: words ink in as the line scrolls through */
.motion-on .mission .word {
  opacity: clamp(0.14, calc(var(--p, 0) * (var(--n) + 4) - var(--i) - 1.2), 1);
  transition: opacity 0.12s linear;
}

/* Hero: as the page scrolls away, the landscape eases in and the copy lifts */
.motion-on .hero__video { scale: calc(1 + var(--p, 0) * 0.14); transform-origin: 50% 70%; }
.motion-on .hero__body { translate: 0 calc(var(--p, 0) * -90px); opacity: calc(1 - var(--p, 0) * 1.4); }

/* Photos drift inside their frames */

/* One-shot reveals */
.motion-on [data-reveal] {
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
.motion-on .section-head[data-reveal] > *,
.motion-on .disc__list[data-reveal] > li,
.motion-on .stats[data-reveal] > li {
  opacity: 0;
  translate: 0 28px;
  transition: opacity 0.8s var(--ease), translate 0.8s var(--ease);
}
.motion-on [data-reveal].is-in > *,
.motion-on [data-reveal].is-in > li { opacity: 1; translate: 0 0; }
.motion-on [data-reveal] > :nth-child(2) { transition-delay: 0.1s; }
.motion-on [data-reveal] > :nth-child(3) { transition-delay: 0.2s; }
.motion-on [data-reveal] > :nth-child(4) { transition-delay: 0.3s; }

/* Industries: rules draw in, layers scrub in (driven by main.js) */
.motion-on .ind-grid > .ind-rule,
.motion-on .ind-record > .ind-rule,
.motion-on .ind-card > .ind-rule { transform: scaleX(0); transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1); }
.motion-on .ind-vrule { transform: scaleY(0); transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.15s; }
.motion-on .ind-title h2 { translate: 0 110%; transition: translate 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.1s; }
.motion-on .ind-title { overflow: hidden; }
.motion-on .is-started > .ind-rule,
.motion-on .is-started .ind-card > .ind-rule,
.motion-on .is-started > .ind-vrule { transform: none; }
.motion-on .is-started .ind-title h2 { translate: 0 0; }
.motion-on .ind-card,
.motion-on .ind-layer { will-change: transform, opacity; }

/* Sun study, full-bleed version */
.motion-on .sun-study__sticky { align-items: stretch; }
.motion-on .sun-study .wrap.about {
  max-width: none;
  padding: 0;
  height: 100%;
  align-items: center;
}
.motion-on .sun-study .about__image {
  grid-column: 1 / span 6;
  align-self: stretch;
  height: 100%;
  width: 100%;
  max-height: none;
  aspect-ratio: auto;
}
.motion-on .sun-study .about__text {
  grid-column: 8 / span 4;
  padding-right: var(--gutter);
}
.motion-on .sun-meter { bottom: 0; height: 4px; background: rgba(247, 248, 245, 0.35); z-index: 1; }

@media (max-width: 860px) {
  .motion-on .sun-study__sticky { padding-top: 0; }
  .motion-on .sun-study .wrap.about { display: flex; flex-direction: column; gap: 1.25rem; align-items: stretch; }
  .motion-on .sun-study .about__image { height: 50svh; flex: none; }
  .motion-on .sun-study .about__text { padding: 0 var(--gutter); }
}

/* A breath between the dark pinned scene and Services: a stratum rule, then extra room */
.serve + .section { position: relative; padding-top: calc(var(--section) * 1.35); }
.serve + .section::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 10px;
  background: linear-gradient(to right, var(--isar) 0 33.4%, var(--loam) 33.4% 66.7%, var(--moraine) 66.7%);
}
