/* ==========================================================================
   Valhalla — Homepage (desktop, fluid ~1000 → 2000+)
   Layout + motion matched to the Framer build.

   Sizes are authored against the 1440px design and scale with the viewport:
   calc(N * var(--px)) === N px at 1440 wide. Display type and spacing are
   clamped so they stay sensible at the extremes; body copy stays fixed.
   ========================================================================== */

:root {
  /* 1px at 1440 wide. Capped at 1px, so — like the Framer build — type and spacing
     stay at their design size on wider screens (only columns stretch), and shrink
     gently below 1440 so narrower laptops don't overflow. */
  --px: min(calc(100vw / 1440), 1px);
  --gutter: 32px;      /* page side padding */
  --gutter-sm: 24px;   /* hero, header, capabilities */

  /* fluid display type */
  --fs-h1: clamp(88px, calc(136 * var(--px)), 184px);
  --fs-h2: clamp(64px, calc(88 * var(--px)), 120px);
  --fs-s1: clamp(48px, calc(72 * var(--px)), 98px);
  --fs-s2: clamp(40px, calc(56 * var(--px)), 76px);
  --fs-s3: clamp(34px, calc(48 * var(--px)), 64px);
  --fs-s6: clamp(20px, calc(24 * var(--px)), 30px);
  --fs-card: clamp(22px, calc(26 * var(--px)), 32px);

  /* fluid section spacing */
  --sp-96: clamp(72px, calc(96 * var(--px)), 128px);
  --sp-104: clamp(80px, calc(104 * var(--px)), 140px);
  --sp-152: clamp(112px, calc(152 * var(--px)), 200px);
}

body { min-width: 900px; }

/* ---------- Shared ---------------------------------------------------- */

/* mobile-only bits (see css/responsive.css) */
.hero__video-label,
.capability__thumb { display: none; }

/* Image slots — drop an <img> (or <video>) inside any .media element. */
.media {
  position: relative;
  overflow: hidden;
  background: var(--color-surface-dark);
}
.media > img,
.media > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* two-column layout: 526 | 24 | 826 at 1440 */
.grid {
  display: grid;
  grid-template-columns: minmax(0, 526fr) minmax(0, 826fr);
  column-gap: var(--space-24);
}

.tag {
  display: inline-block;
  padding: 10px 16px;                       /* Framer chip: 10/16 around a 21px line = 41px tall */
  box-shadow: inset 0 0 0 1px currentColor; /* border drawn inside, so it doesn't add to the size */
  font-size: var(--text-body-2);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body-2);
  white-space: nowrap;
}
.tag--inverse { color: var(--color-white); }

.statement {
  font-size: var(--fs-s3);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-tight);
}

/* Parallax: inner layer is 120% tall and drifts with scroll (main.js) */
.parallax { position: relative; overflow: hidden; }
.parallax__inner {
  position: absolute;
  left: 0;
  right: 0;
  top: -10%;
  height: 120%;
  will-change: transform;
}

/* ---------- Buttons --------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: space-between;
  overflow: hidden;
  font-weight: var(--font-weight-medium);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  white-space: nowrap;
}
.btn__label {
  position: relative;
  text-box: trim-both cap alphabetic;
  transition: transform var(--duration-button) var(--ease-button);
}
/* hover: a small square scales in and pushes the label over */
.btn__label::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  background: currentColor;
  transform: scale(0);
  transition: transform var(--duration-button) var(--ease-button);
}
.btn:hover .btn__label,
.btn:focus-visible .btn__label { transform: translateX(14px); }
.btn:hover .btn__label::before,
.btn:focus-visible .btn__label::before { transform: scale(1); }
/* Arrow — matches the Framer button: two arrows in a clipped box. On hover the
   visible one slides out to the right while the other slides in from the left. */
.btn__arrow {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  overflow: hidden;
}
.btn__arrow svg {
  position: absolute;
  top: 4px;
  width: 12px;
  height: 8px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: left var(--duration-button) var(--ease-button);
}
.btn__arrow-in  { left: -18px; }
.btn__arrow-out { left: 2px; }
.btn:hover .btn__arrow-in,
.btn:focus-visible .btn__arrow-in  { left: 2px; }
.btn:hover .btn__arrow-out,
.btn:focus-visible .btn__arrow-out { left: 22px; }

/* large buttons: 20px box, 15×11 arrow */
.btn--lg .btn__arrow { width: 20px; height: 20px; }
.btn--lg .btn__arrow svg { top: 5px; width: 15px; height: 11px; stroke-width: 1.8; }
.btn--lg .btn__arrow-in  { left: -19px; }
.btn--lg .btn__arrow-out { left: 2px; }
.btn--lg:hover .btn__arrow-in,
.btn--lg:focus-visible .btn__arrow-in  { left: 3px; }
.btn--lg:hover .btn__arrow-out,
.btn--lg:focus-visible .btn__arrow-out { left: 33px; }

/* large light button (CTA "Get in touch") */
.btn--lg.btn--light .btn__arrow-in  { left: -20px; }
.btn--lg.btn--light .btn__arrow-out { left: 3px; }
.btn--lg.btn--light:hover .btn__arrow-in,
.btn--lg.btn--light:focus-visible .btn__arrow-in  { left: 3px; }
.btn--lg.btn--light:hover .btn__arrow-out,
.btn--lg.btn--light:focus-visible .btn__arrow-out { left: 26px; }

.btn--lg {
  width: var(--button-lg-w);
  height: var(--button-lg-h);
  padding: var(--space-16);
  font-size: var(--text-button-1);
}
.btn--sm {
  width: var(--button-sm-w);
  height: var(--button-sm-h);
  padding: var(--space-8);
  font-size: var(--text-button-2);
}
.btn--dark { background: var(--color-black); color: var(--color-white); }
.btn--light { background: var(--color-white); color: var(--color-black); }
.btn--outline {
  padding: calc(var(--space-8) - 1px);
  border: var(--border-hairline);
  color: var(--color-black);
  transition: border-color var(--duration-button) var(--ease-button);
}
.btn--outline:hover { border-color: var(--color-black); }

/* ---------- Header + menu -------------------------------------------- */

.site-header {
  position: absolute;
  inset: var(--gutter-sm) var(--gutter-sm) auto;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
  transition: opacity 900ms ease 400ms;
}
.site-header > * { pointer-events: auto; }
.site-header.is-menu-open { position: fixed; }

.site-header__actions { display: flex; align-items: center; }
.site-header__notch { width: 4px; height: 36px; background: var(--color-white); }

.menu-toggle {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: var(--button-sm-h);
  height: var(--button-sm-h);
  background: var(--color-white);
}

/* Matches the Framer menu button: each row is a 34px clipped track holding a
   visible bar and a spare. On hover the top row swipes left and the bottom row
   swipes right; when open, the rows meet in the middle and rotate into an X. */
.menu-toggle__row {
  position: relative;
  flex: none;
  width: 34px;
  height: 2px;
  overflow: hidden;
  transition: transform var(--duration-button) var(--ease-button);
}
.menu-toggle__bar {
  position: absolute;
  top: 0;
  left: 5px;            /* centred: 50% − 12px */
  width: 24px;
  height: 2px;
  background: var(--color-black);
  transition: left var(--duration-button) var(--ease-button);
}
.menu-toggle__row:first-child .menu-toggle__bar--next { left: 39px; }   /* waits off to the right */
.menu-toggle__row:last-child  .menu-toggle__bar--next { left: -29px; }  /* waits off to the left */

.menu-toggle:hover .menu-toggle__row:first-child .menu-toggle__bar { left: -29px; }
.menu-toggle:hover .menu-toggle__row:first-child .menu-toggle__bar--next { left: 5px; }
.menu-toggle:hover .menu-toggle__row:last-child .menu-toggle__bar { left: 39px; }
.menu-toggle:hover .menu-toggle__row:last-child .menu-toggle__bar--next { left: 5px; }

.menu-toggle[aria-expanded="true"] .menu-toggle__row:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__row:last-child { transform: translateY(-4px) rotate(-45deg); }

.site-menu {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: clamp(400px, calc(450 * var(--px)), 600px);
  padding: clamp(120px, calc(135 * var(--px)), 180px) 0 0 59.6%;
  background: var(--color-black);
  color: var(--color-white);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1000ms var(--ease-button); /* Framer navbar: 1s, ease [.7, 0, .25, 1] */
}
.site-menu.is-open { clip-path: inset(0); }

/* Backdrop behind the open menu — identical to the contact popup's (css/contact.css):
   page dimmed to 60% black with an 8px background blur; 0.7s in, 0.5s out.
   It sits above the page and below the menu panel and header. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 49;
  pointer-events: none;
  background: rgb(0 0 0 / 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  transition: background-color 500ms ease, backdrop-filter 500ms ease, -webkit-backdrop-filter 500ms ease;
}
body:has(.site-menu.is-open)::before {
  pointer-events: auto; /* a click on the dimmed page closes the menu (main.js / pages.js) */
  background: rgb(0 0 0 / 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition-duration: 700ms;
}
.site-menu__list li {
  overflow: hidden;
  /* room for descenders (the j in "Projects") without changing the line spacing */
  padding-bottom: 0.3em;
  margin-bottom: -0.3em;
}
.site-menu__list a {
  display: inline-block;
  font-size: var(--fs-s2);
  line-height: 1.02;
  letter-spacing: var(--tracking-tight);
  transform: translateY(100%);
  transition: transform 1000ms var(--ease-button), opacity var(--duration-fast) ease;
}
.site-menu.is-open .site-menu__list a { transform: none; }
.site-menu.is-open li:nth-child(2) a { transition-delay: 40ms, 0ms; }
.site-menu.is-open li:nth-child(3) a { transition-delay: 80ms, 0ms; }
.site-menu.is-open li:nth-child(4) a { transition-delay: 120ms, 0ms; }
.site-menu.is-open li:nth-child(5) a { transition-delay: 160ms, 0ms; }
.site-menu__list:has(a:hover) a:not(:hover) { opacity: 0.4; }
.site-menu__list a:hover,
.site-menu__list a:focus-visible { opacity: 1; }

/* ---------- Hero ------------------------------------------------------ */

.hero {
  --divider: clamp(300px, calc(380 * var(--px)), 520px);

  position: relative;
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
  background: var(--color-black);
  color: var(--color-white);
}
.hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
/* readability gradient from the Framer build: transparent → black, 40% */
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgb(0 0 0 / 0), rgb(0 0 0));
  opacity: 0.4;
  pointer-events: none;
}
/* photo box from the Framer build (1692×1271 at −126,−150 over 1440×900); main.js drifts it down */
.hero__bg > img {
  inset: auto;
  left: -8.75%;
  top: -16.67%;
  width: 117.5%;
  height: 141.22%;
  will-change: transform;
}
/* entrance from the Framer build: scale 1.3 + rotate 3° → none, fading in; 1.6s, ease [.38, 0, 0, 1], 0.1s delay */
.hero__bg {
  transition: opacity 1600ms cubic-bezier(0.38, 0, 0, 1) 100ms, transform 1600ms cubic-bezier(0.38, 0, 0, 1) 100ms;
}

.hero__title {
  position: absolute;
  left: var(--gutter-sm);
  top: clamp(120px, calc(156 * var(--px)), 210px);
  font-size: var(--fs-h1);
  font-weight: var(--font-weight-regular);
  line-height: 0.963;
  letter-spacing: var(--tracking-tight);
}
/* clip box extends below the line so descenders aren't cut off */
.line-clip { display: block; height: 1.183em; margin-bottom: -0.22em; overflow: hidden; }
.line {
  display: block;
  transition: transform 1100ms var(--ease-out) 150ms;
}
.line-clip + .line-clip .line { transition-delay: 240ms; }

.hero__bottom {
  position: absolute;
  inset: auto 0 0;
  height: clamp(180px, calc(200 * var(--px)), 260px);
  border-top: var(--border-hairline-inverse);
}
.hero__divider {
  position: absolute;
  left: var(--divider);
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-white-20);
}
.hero__tag { position: absolute; left: var(--gutter-sm); top: var(--space-24); }
.hero__intro {
  position: absolute;
  left: calc(var(--divider) + 25px);
  top: var(--space-24);
  width: 15em;
  font-size: var(--fs-s6);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
}
.hero__video {
  position: absolute;
  right: var(--gutter-sm);
  top: var(--space-24);
  display: grid;
  place-items: center;
  width: clamp(160px, calc(179 * var(--px)), 248px);
  aspect-ratio: 179 / 119;
  background: var(--color-surface-video);
}
.play-icon {
  position: relative; /* sit above the thumbnail image */
  z-index: 1;
  border-radius: 50%;
  backdrop-filter: blur(var(--blur-button));
  -webkit-backdrop-filter: blur(var(--blur-button));
  transition: transform var(--duration-base) var(--ease-out);
}
.hero__video:hover .play-icon { transform: scale(1.12); }

[data-intro] { transition: opacity 900ms ease 500ms, transform 900ms var(--ease-out) 500ms; }

/* load state (removed by main.js once fonts are ready) */
.is-loading .hero__bg { opacity: 0; transform: scale(1.3) rotate(3deg); }
/* push past the whole clip box (1.183em), not just the line's own 0.963em height,
   plus room for ascenders that overflow the tight line box */
.is-loading .line { transform: translateY(1.3em); }
.is-loading [data-intro] { opacity: 0; transform: translateY(16px); }
.is-loading .site-header { opacity: 0; }

/* ---------- About ----------------------------------------------------- */

.about { padding: var(--sp-96) var(--gutter) var(--sp-152); }
.about__media { align-items: start; margin-block: var(--sp-96); }
.about__img--sm { aspect-ratio: 526 / 368; }
.about__img--lg { aspect-ratio: 826 / 576; }

/* ---------- Stats ----------------------------------------------------- */

.stats { border-top: var(--border-hairline); }
.stats__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-inline: var(--gutter);
}
.stat {
  display: flex;
  flex-direction: column;
  height: clamp(380px, calc(432 * var(--px)), 560px);
  padding: var(--space-48) var(--space-32) clamp(64px, calc(82 * var(--px)), 110px);
  border-right: var(--border-hairline);
}
.stat:last-child { border-right: 0; }
.stat__value {
  font-size: var(--fs-h2);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-tight);
  white-space: nowrap;
}
.stat__body { margin-top: auto; }
.stat__title {
  font-size: var(--fs-s6);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
}
.stat__text {
  max-width: 248px;
  margin-top: var(--space-24);
  color: var(--color-black-60);
  line-height: normal;
}

/* ---------- Projects (pinned, scroll-driven) -------------------------- */

.projects {
  --card-w: clamp(260px, calc(360 * var(--px)), 500px);

  position: relative;
  --count: 4; /* set from the CMS by main.js */
  height: calc(var(--count) * 100vh); /* one viewport of scroll per project (Framer: 400vh for 4) */
  min-height: calc(var(--count) * 720px);
  background: var(--color-black);
  color: var(--color-white);
}
.projects__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
}

.projects__bgs { position: absolute; inset: 0; z-index: 0; isolation: isolate; } /* keeps the photo layers' z-indexes below the content */
/* Project image layers (background + card) — mask wipe from the provided design frame:
   the old photo stays put; the new one is revealed by a mask that grows across it
   (78 → 166 → 342 → 445px of a 445px card) while the photo itself holds still and
   settles from ~110% to 100% zoom. Card photos open from the top edge downward,
   background photos from the bottom edge upward. Motion: 0.7s mask, 1.5s zoom,
   both on the button easing. */
.projects__bg,
.projects__image {
  position: absolute;
  inset: 0;
  overflow: hidden;
  visibility: hidden;
  transition: clip-path 700ms var(--ease-button), visibility 0s 700ms;
}
.projects__image { clip-path: inset(0 0 100% 0); } /* collapsed to the top edge */
.projects__bg    { clip-path: inset(100% 0 0 0); } /* collapsed to the bottom edge */

.projects__bg.is-active,
.projects__image.is-active,
.projects__bg.is-leaving,
.projects__image.is-leaving {
  visibility: visible;
  clip-path: inset(0);
  transition: clip-path 700ms var(--ease-button), visibility 0s;
}
.projects__bg.is-active,
.projects__image.is-active { z-index: 2; }
.projects__bg.is-leaving,
.projects__image.is-leaving { z-index: 1; }
/* background photos start a beat after the card photos */
.projects__bg.is-active,
.projects__bg.is-leaving { transition: clip-path 700ms var(--ease-button) 150ms, visibility 0s; }
.projects__bg > img { transition: transform 1500ms var(--ease-button) 150ms; }

/* layers that drop out of play collapse instantly (they're covered anyway) */
.projects__bg:not(.is-active):not(.is-leaving),
.projects__image:not(.is-active):not(.is-leaving) { transition: none; }

.projects__bg > img,
.projects__image > img {
  transform: scale(1.1);
  transition: transform 1500ms var(--ease-button);
}
.projects__bg.is-active > img,
.projects__image.is-active > img,
.projects__bg.is-leaving > img,
.projects__image.is-leaving > img { transform: none; }

/* darkening overlay above all background layers */
.projects__bgs::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: var(--color-overlay);
}

/* vertical text tickers (title + index). Item height is read by main.js. */
.ticker { display: block; overflow: hidden; }
.ticker__track {
  display: flex;
  flex-direction: column;
  transition: transform 900ms var(--ease-out);
}

.projects__titles {
  position: absolute;
  z-index: 1;
  left: var(--gutter);
  top: 50%;
  max-width: calc(50% - var(--card-w) / 2 - var(--gutter) * 2);
  height: 1.3em; /* one line + room for descenders */
  margin-top: -0.52em;
  font-size: clamp(36px, calc(56 * var(--px)), 76px);
  line-height: 1.04;
  letter-spacing: var(--tracking-tight);
  white-space: nowrap;
}
.projects__titles li { height: 1.3em; }

.projects__card {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: var(--card-w);
  aspect-ratio: 360 / 450;
  overflow: hidden;
  background: var(--color-surface-dark);
  transform: translate(-50%, -50%);
  cursor: none;
}

/* info column starts 32px right of the card and runs to the gutter */
.projects__info {
  position: absolute;
  z-index: 1;
  left: calc(50% + var(--card-w) / 2 + var(--gutter));
  right: var(--gutter);
  top: calc(50% - 64px);
}
.projects__counter {
  display: flex;
  gap: 10px;
  line-height: 21px;
  font-variant-numeric: tabular-nums;
}
.ticker--num { height: 21px; }
.ticker--num .ticker__track > * { height: 21px; }
.projects__total { color: var(--color-white-40); }

.projects__progress {
  height: 1px;
  margin-top: 15px;
  background: var(--color-white-20);
}
/* scroll-linked fill (main.js sets scaleX from 0 → 1 across the section) */
.projects__progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--color-white);
  transform: scaleX(0);
  transform-origin: left;
}

.projects__details { display: grid; margin-top: var(--space-24); }
.projects__detail {
  grid-area: 1 / 1;
  display: flex;
  flex-wrap: wrap; /* services drop under the description when the column is narrow */
  justify-content: space-between;
  gap: var(--space-16) var(--space-24);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms ease, transform 700ms var(--ease-out);
}
.projects__detail.is-active { opacity: 1; transform: none; transition-delay: 200ms; }
.projects__desc {
  flex: 1 1 180px;
  max-width: 9.1em;
  font-size: var(--fs-s6);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
}
.projects__services { flex: none; width: 173px; color: var(--color-white-60); }

/* "Details" bubble — follows the pointer while over the pinned section */
.projects__cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: -48px 0 0 -48px;
  border-radius: 50%;
  background: var(--color-white-40);
  backdrop-filter: blur(var(--blur-button));
  -webkit-backdrop-filter: blur(var(--blur-button));
  pointer-events: none;
  opacity: 0;
  scale: 0.4;
  transition: opacity 300ms ease, scale 400ms var(--ease-out);
  will-change: transform;
}
.projects__sticky.has-cursor .projects__cursor { opacity: 1; scale: 1; }

/* ---------- Capabilities --------------------------------------------- */

.capabilities {
  --name-col: 41.81%; /* 582 / 1392 */
  padding: var(--sp-104) var(--gutter-sm) var(--sp-152);
}
.statement--cap { max-width: 60%; margin-top: clamp(44px, calc(54 * var(--px)), 72px); }

.capabilities__stage { position: relative; margin-top: var(--sp-104); }
.capability {
  position: relative;
  display: grid;
  grid-template-columns: var(--name-col) 1fr;
  align-items: center;
  height: clamp(104px, calc(124 * var(--px)), 168px);
  border-top: var(--border-hairline);
}
.capability:last-child { border-bottom: var(--border-hairline); }

/* Each row's black fill rises from its bottom edge on hover and drops back down on leave.
   The text uses exclusion blending (as in the Framer build) (white on white → black, white on black → white), so it
   inverts exactly where the fill passes under it, mid-letter. */
.capability::before {
  content: "";
  position: absolute;
  inset: -1px 0 0; /* same width as the divider lines */
  background: var(--color-black);
  clip-path: inset(100% 0 0 0);
  pointer-events: none;
  transition: clip-path 400ms var(--ease-out);
}
.capability.is-active::before { clip-path: inset(0); }

.capability__num,
.capability__name {
  position: relative;
  z-index: 1;
  color: var(--color-white);
  mix-blend-mode: exclusion;
  transition: transform 500ms var(--ease-out);
}
.capability__num {
  align-self: start;
  margin-top: clamp(30px, calc(36 * var(--px)), 48px);
  font-size: 20px;
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body-1);
}
.capability__name {
  grid-column: 2;
  grid-row: 1;
  font-size: var(--fs-s1);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  white-space: nowrap;
}
.capability.is-active .capability__num,
.capability.is-active .capability__name { transform: translateX(24px); }

/* Shared photo frame, centred on the active row (--y is that row's centre). Every hover
   adds a fresh photo layer on top of the stack: it opens from the top edge downward over
   whatever is showing while it settles from 110% to 100% zoom (0.45s mask, 0.9s zoom, button
   easing). Layers beneath are dropped once the wipe has covered them, so interruptions never
   reuse (and never pop) a photo that is mid-transition. */
.capabilities__preview {
  position: absolute;
  left: calc(179 * var(--px));
  top: 0;
  z-index: 2;
  width: clamp(200px, calc(248 * var(--px)), 340px);
  aspect-ratio: 248 / 310;
  pointer-events: none;
  transform: translateY(calc(var(--y, 0px) - 50%));
  transition: transform 400ms var(--ease-button);
}
.capabilities__stack {
  position: absolute;
  inset: 0;
  overflow: hidden;
  transition: clip-path 450ms var(--ease-button);
}
/* pointer left the list: the whole stack wipes out through the bottom edge */
.capabilities__stack.is-closed { clip-path: inset(100% 0 0 0); }
.capabilities__layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 0 100% 0); /* collapsed to the top edge */
}
.capabilities__layer > img {
  transform: scale(1.1);
  transition: transform 900ms var(--ease-button);
}
.capabilities__layer.is-in {
  clip-path: inset(0);
  transition: clip-path 450ms var(--ease-button);
}
.capabilities__layer.is-in > img { transform: none; }

.capabilities__cta { margin: var(--sp-104) 0 0 calc(var(--name-col) - 3px); }

/* ---------- Insights -------------------------------------------------- */

.insights {
  padding: var(--sp-152) var(--gutter);
  background: var(--color-surface-muted);
}
.insights__title {
  font-size: var(--fs-h1);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-tight);
}
.insights__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block: var(--space-80);
  border-block: var(--border-hairline);
}
.insights__grid > li { border-right: var(--border-hairline); }
.insights__grid > li:last-child { border-right: 0; }

.post {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: clamp(560px, calc(630 * var(--px)), 820px);
  padding: var(--space-24) var(--space-24) var(--sp-96);
  transition: background-color 500ms ease;
}
.post:hover { background: var(--color-white); }
.post__frame {
  aspect-ratio: 411 / 272;
  overflow: hidden;
  clip-path: inset(0);
  transition: clip-path 700ms var(--ease-out);
}
.post:hover .post__frame { clip-path: inset(12px); }
.post__image {
  width: 100%;
  height: 100%;
  transition: transform 900ms var(--ease-out);
}
.post:hover .post__image { transform: scale(1.06); }

.post__meta { margin-top: 29px; letter-spacing: var(--tracking-tight); line-height: normal; opacity: 0.6; }
.post__meta > * + * { margin-left: var(--space-8); }
.post__title {
  max-width: 15em;
  margin-top: var(--space-24);
  font-size: var(--fs-card);
  font-weight: var(--font-weight-regular);
  line-height: normal;
  letter-spacing: var(--tracking-tight);
}
.post__title { margin-bottom: var(--space-48); }
.post__link { margin-top: auto; width: 160px; } /* "Read More" is wider than the other small buttons */

/* ---------- CTA ------------------------------------------------------- */

.cta {
  position: relative;
  z-index: 2; /* above the footer, which is revealed from underneath */
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
  color: var(--color-white);
}
.cta__bg { position: absolute; inset: 0; overflow: hidden; }
/* photo box from the Framer build (1540×1139 over a 1440×900 section); main.js moves it −130 → +90px */
.cta__img {
  position: absolute;
  left: -5.56%;
  top: -1.1%;
  width: 106.95%;
  height: 126.56%;
  will-change: transform;
}
.cta__content {
  position: absolute;
  left: 50%;
  right: var(--gutter-sm);
  top: clamp(72px, calc(90 * var(--px)), 120px);
}
.cta__title {
  font-size: var(--fs-h2);
  font-weight: var(--font-weight-regular);
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-tight);
}
.cta__text {
  max-width: 348px;
  margin-top: clamp(56px, calc(68 * var(--px)), 92px);
}
.cta__btn { margin-top: 60px; width: 300px; }

/* ---------- Footer (slides up over the CTA) --------------------------- */

.site-footer {
  position: relative;
  z-index: 1;
  /* starts 250px up, tucked behind the CTA, and slides down to rest as you reach the bottom (main.js) */
  transform: translateY(calc(clamp(200px, calc(250 * var(--px)), 340px) * -1));
  will-change: transform;
  background: var(--color-white);
}

/* 4 equal columns: nav spans 2, then Contact and Social (329px each at 1440) */
.site-footer__top,
.site-footer__bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 20px;
  padding-inline: var(--gutter);
}
.site-footer__top {
  align-items: start;
  min-height: clamp(540px, calc(575 * var(--px)), 720px);
  padding-top: clamp(64px, calc(80 * var(--px)), 110px);
  padding-bottom: var(--space-64);
}
.footer-nav { grid-column: span 2; }

.footer-nav ul {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content; /* hover area = the words, not the whole column */
  gap: var(--space-16);
  margin-top: 40px;
}
/* block-level so the cap-height trim applies: 41px boxes, 57px pitch (Framer) */
.footer-nav a {
  display: block;
  font-size: var(--fs-s2);
  line-height: var(--leading-display);
  letter-spacing: -0.0314em;
  transition: opacity var(--duration-fast) ease;
}
.footer-nav ul:has(a:hover) a:not(:hover) { opacity: 0.3; }
.footer-nav ul a:hover,
.footer-nav ul a:focus-visible { opacity: 1; }

.footer-col .link-list { margin-top: 29px; }

.link-list li { border-top: var(--border-hairline); }
.link-list li:last-child { border-bottom: var(--border-hairline); }
.link-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  column-gap: var(--space-16);
  padding: var(--space-8) 0 7px;
}
.link-list a:has(.link-list__key) { grid-template-columns: 80px minmax(0, 1fr) 16px; }
.link-list a.link-list__tall { padding-bottom: 37px; }
.link-list img {
  margin-top: 2px;
  transition: transform var(--duration-base) var(--ease-out);
}
.link-list a:hover img,
.link-list a:focus-visible img { transform: translateX(4px); }

.site-footer__bar {
  align-items: center;
  padding-block: 33px 39px;
  border-top: var(--border-hairline);
}
.site-footer__bar > :first-child { grid-column: span 2; }
.site-footer__bar > :last-child { justify-self: end; }
.site-footer__legal > * + * { margin-left: 12px; }
.site-footer__bar a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* narrower desktops: give the contact/social columns room for the email address */
@media (max-width: 1279px) {
  .site-footer__top,
  .site-footer__bar { grid-template-columns: minmax(0, 1fr) 0 290px 250px; }
}

/* ---------- Line-by-line text reveal (Framer text effect) -------------
   Each line rises 10px and fades in: 1.6s, ease [.38, 0, 0, 1], 0.06s stagger. */
.reveal-line {
  display: block;
  opacity: 0.001;
  transform: translateY(10px);
  transition: opacity 1600ms cubic-bezier(0.38, 0, 0, 1), transform 1600ms cubic-bezier(0.38, 0, 0, 1);
  transition-delay: calc(0.06s + var(--i, 0) * 0.06s);
}
.is-revealed .reveal-line { opacity: 1; transform: none; }
.js [data-reveal-lines]:not(.is-split) { opacity: 0; }

/* ---------- Scroll reveal -------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out);
}
.js [data-reveal].is-visible { opacity: 1; transform: none; }
