/* =========================================================================
   K HOLDINGS — experience layer
   Motion, page transitions, sticky header, full-screen menu, domain theming,
   stats, project portfolio. Everything animated is gated by html.motion
   (set by boot.js only when the visitor has not asked for reduced motion).
   ========================================================================= */

/* ------------------------------------------------------------ theming */
body { --accent: var(--gold); --accent-text: var(--gold-text); --accent-2: #edd28f; }
body.theme-real-estate { --accent: #dd6f52; --accent-text: var(--coral-text); }
body.theme-energy { --accent: #c32353; --accent-text: #b81f4d; }
body.theme-transportation { --accent: #81934f; --accent-text: #5f6f36; }
body.theme-infrastructure { --accent: #5d5d64; --accent-text: #4a4a51; }
body.theme-retail { --accent: #217a8c; --accent-text: #1c6a7a; }
body.theme-travel { --accent: #a9a7ab; --accent-text: #66646a; }

.page-title--accent::after { background: var(--accent); }
.page-title--accent .page-title__text { color: var(--accent-text); }
.band--accent .band__title, .split__h--accent { color: var(--accent-text); }
.re-hero--domain .re-hero__badge--wide { width: 462px; }

/* cinematic domain heroes: full height, ribbon + paper drawn in the SVG (no CSS clip) */
.re-hero--domain { aspect-ratio: auto; height: min(74vh, 820px); min-height: 460px; }
.re-hero--domain .re-hero__photo { clip-path: none; }
.re-hero--domain .re-hero__photo img { object-position: 60% 50%; }
.re-hero--domain .re-hero__badge { margin-left: 12%; }

/* text setting on the new pages: centred, no justification gaps, balanced headings */
body:is(.theme-energy, .theme-transportation, .theme-infrastructure, .theme-retail, .theme-travel) .split__body p,
.project__body p { text-align: center; text-align-last: auto; text-wrap: pretty; }
.project__body p { text-align: start; }
:is(.split__h, .section-head__title, .section-head__lead, .cinema__title, .project__name, .band__title, .stat__label) { text-wrap: balance; }
.stat__label { max-width: 190px; }

/* rhythm */
.features + .split { margin-top: 30px; }
.feature__idx { letter-spacing: .06em; }

/* building-friendly crops for the tall renders */
#p-hayarkon-92 .slide:first-child img { object-position: 50% 30%; }
#p-sde-dov .project__media img, .project-card[href$="p-sde-dov"] img { object-position: 50% 18%; }
#p-hilazon-tuval .project__media img, .project-card[href$="p-hilazon-tuval"] img { object-position: 50% 12%; }
.project-card[href$="p-hayarkon-92"] img { object-position: 50% 35%; }

/* dots-only gallery bars on the new pages float over the photo instead of a dark strip */
:is(body.theme-energy, body.theme-transportation, body.theme-infrastructure, body.theme-retail, body.theme-travel, .project) .gallery-bar:not(:has(.gallery-bar__caption)) {
  background: linear-gradient(to top, rgba(10, 12, 16, .55), rgba(10, 12, 16, 0));
  height: 80px; align-items: flex-end; padding-bottom: 14px;
}
.project:nth-of-type(odd) .project__text { background: #fff; }

/* menu opened from the sticky header: a filter/transform would trap the fixed overlay inside the header */
html.menu-open .site-header.is-fixed { -webkit-backdrop-filter: none; backdrop-filter: none; transform: none; background-color: #eee; }

/* anchors clear the sticky header */
.split, .project, section[id], [id^="p-"] { scroll-margin-top: 84px; }

/* steady numbers while counting */
.numbers__num, .stat__num { font-variant-numeric: tabular-nums; }

/* phones: cards in swipe rows fade in with their row, no vertical rise */
@media (max-width: 899.98px) {
  html.motion :is(.project-grid .project-card, .features .feature):not(.is-in) { opacity: 1; transform: none; }
}

/* motion switched off at runtime / reduced motion */
html.a11y-no-motion .px, html:not(.motion) .px { transform: none !important; }
@media (prefers-reduced-motion: reduce) {
  .member img, .tile__img, .feature img, .project-card img { transition: none !important; }
}

/* seamless: no white gaps between full-bleed sections (all breakpoints) */
.intro, .tiles, .split--first, .contact, .site-footer, .leader + .leader, .team-grid,
.band + .split, .numbers, .features, .features + .split, .cinema, .project, .finance,
.hero + .intro, .intro + section, .split + .numbers, .team-grid + .finance { margin-top: 0; }
.site-footer { margin-top: 0; }
.re-hero + .band, .re-hero--domain + .band { margin-top: 0; }

/* ================= polish round (design critique) ================= */
/* body copy: centred, no justification gaps (exact InDesign lines stay justified ≥1600px via .ln) */
.intro__body p, .split__body p { text-align: center; text-align-last: auto; text-wrap: pretty; }
.split__text { padding-inline: clamp(40px, 5vw, 110px); }

/* send button follows the page accent, with a real arrow */
.btn-send { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: linear-gradient(90deg, var(--btn-a, #dd6f52) 0%, var(--btn-a, #dd6f52) 38%, var(--btn-b, #c43a24) 100%); }
.btn-send__arrow { width: 13px; height: 16px; fill: currentColor; transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.btn-send:hover .btn-send__arrow { transform: translateX(-5px); }
body.theme-energy { --btn-a: #c32353; --btn-b: #8f1236; }
body.theme-transportation { --btn-a: #6d7f3c; --btn-b: #4f5f28; }
body.theme-infrastructure { --btn-a: #4f5056; --btn-b: #2c2e33; }
body.theme-retail { --btn-a: #217a8c; --btn-b: #135563; }
body.theme-travel { --btn-a: #8a6a43; --btn-b: #5f4628; --accent-text: #7c5f3b; --kicker: #7c5f3b; }

/* travel hero: lose the window-frame bar at the top of the photo */
.theme-travel .re-hero__photo img { object-position: 50% 72%; }

/* footer: one closed dark block */
.site-footer__legal { background: #262a30; color: rgba(255,255,255,.62); border-top: 1px solid rgba(255,255,255,.08); padding: 12px 20px 16px; font-size: 14px; align-items: center; gap: 4px 26px; }
.site-footer__legal a { padding-block: 4px; color: rgba(255,255,255,.75); }
.site-footer__legal a:hover { color: #fff; }

/* project rows: one calm surface, no alternating hairlines */
.project + .project { border-top: 0; }
.project .project__text, .project:nth-of-type(odd) .project__text { background: var(--paper); }
.project:nth-of-type(even) .project__text { background: #fff; }

/* kickers: smaller, more refined */
.section-head__kicker, .numbers__title, .cinema__kicker { font-size: 13px; letter-spacing: .34em; }
.feature__idx { font-size: 15px; }

/* project tags: outlined, quieter */
.project-card__tag { background: rgba(14,16,20,.35); border: 1px solid rgba(255,255,255,.7); letter-spacing: .02em; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* intro → tiles: a touch more air before the dark tiles */
.intro:not(.intro--page) { padding-bottom: 96px; }

/* ================= mobile / touch round ================= */
html { scroll-padding-top: 76px; }
.field, .contact { scroll-margin-top: 90px; }
[data-carousel] { touch-action: pan-y; overscroll-behavior-x: contain; }
html.menu-open .a11y-toggle, html.menu-open .a11y-panel { opacity: 0; pointer-events: none; }

/* touch devices: no sticky hover zooms; give press feedback instead */
@media (hover: none) {
  .tile:hover .tile__img, .project-card:hover img, .feature:hover img, .member:hover img { transform: none; }
  .tile:hover .tile__caption { transform: translateY(101%); }
  .btn-send:hover::after { transform: translateX(110%) skewX(-18deg); }
  .dot:hover::before { background: transparent; }
  .dot[aria-current="true"]:hover::before { background: #fff; }
  .tile:active .tile__img, .project-card:active img, .feature:active img { transform: scale(.98); transition-duration: .2s; }
}

/* dynamic-viewport heights (no jump when the mobile toolbar collapses) */
@supports (height: 1svh) {
  @media (max-width: 899.98px) {
    .hero { height: min(78svh, 560px); }
    .re-hero--domain { height: 62svh; }
    .cinema { height: 62svh; }
  }
  @media (max-height: 500px) and (orientation: landscape) {
    .hero { height: calc(100svh - 64px); }
  }
}

/* full-screen menu in landscape phones: start at top, two columns */
@media (max-width: 1279.98px) {
  .site-nav__list { justify-content: flex-start; height: 100%; padding-top: max(84px, env(safe-area-inset-top)); overscroll-behavior: contain; }
  .site-nav__list > li:first-child { margin-top: auto; }
  .site-nav__list > li:last-child { margin-bottom: auto; }
}
@media (max-height: 500px) and (orientation: landscape) and (max-width: 1279.98px) {
  .site-nav__list { display: grid !important; grid-template-columns: 1fr 1fr; column-gap: 40px; align-content: center; padding-top: 70px; }
  .site-nav__list > li:first-child, .site-nav__list > li:last-child { margin: 0; }
  .site-nav__link { font-size: 22px; padding: 10px 0; }
}

@media (max-width: 899.98px) {
  /* tap targets ≥ 44px */
  .dot { width: 44px; height: 44px; }
  .dot::before { left: 11.3px; top: 11.3px; }
  .carousel-pause { width: 44px; height: 44px; }
  .a11y-toggle { width: 48px; height: 48px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .more-link { min-height: 44px; }
  .site-footer__legal a, .site-footer__bar a { padding-block: 10px; display: inline-block; }
  .project-grid > li, .features > li { scroll-snap-stop: always; }

  /* first screen: Hebrew page title sits over the hero photo */
  .page-title:has(+ .re-hero) { position: relative; z-index: 5; margin: 0 0 -66px; height: 66px; padding-inline: 20px; }
  .page-title:has(+ .re-hero) .page-title__text { color: #fff; font-size: calc(30px * var(--text-scale)); text-shadow: 0 2px 14px rgba(0,0,0,.55); }
  .page-title:has(+ .re-hero)::after { background: rgba(255,255,255,.55); }
  .re-hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 120px; z-index: 3; background: linear-gradient(rgba(8,12,18,.55), rgba(8,12,18,0)); pointer-events: none; }
  .re-hero .art { display: none; }
  .re-hero__photo { clip-path: none; }
}
@media (min-width: 600px) and (max-width: 1023.98px) {
  .intro__body, .split__body, .finance__body, .section-head__lead { max-width: 36em; margin-inline: auto; }
}
@media (max-width: 420px) {
  .intro__body p, .split__body p { text-align: start; }
}
@media (max-width: 360px) {
  .tile .badge__label { font-size: 13.5px; }
  .tile__title { font-size: 16px; }
}

/* ================= a11y round ================= */
/* anything that receives keyboard focus is shown immediately (no invisible focus during reveals) */
html.motion :is(.rv, .split__more, .intro__more, .tile, .contact__inner, .feature, .project-card, .project__text > *, .video-link, .member, .stat):is(:focus-visible, :focus-within) {
  opacity: 1 !important; transform: none !important; transition: none !important;
}
.project-card__body { display: flex; flex-direction: column; align-items: flex-start; }
.project-card__tag { order: -1; margin-bottom: 12px; }
.project-card__name { margin-top: 0; }
/* strong two-colour focus ring on photo cards */
.feature:focus-visible, .project-card:focus-visible { outline: none; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px var(--focus); }

/* ================= robustness round ================= */
.video-link { text-decoration: none; color: var(--ink); }

/* print: never print hidden reveal states */
@media print {
  html.motion * { opacity: 1 !important; transform: none !important; transition: none !important; }
  html.motion :is(.art, .hero__quote-text p) { clip-path: none !important; }
}

/* no JavaScript: the menu is a plain list, no dead buttons */
html:not(.js) .nav-toggle, html:not(.js) .a11y-toggle { display: none; }
@media (max-width: 1279.98px) {
  html:not(.js) .site-header { height: auto; flex-wrap: wrap; padding-block: 12px; }
  html:not(.js) .site-nav { position: static; display: block; width: 100%; }
  html:not(.js) .site-nav__list { display: flex !important; position: static; flex-direction: row; flex-wrap: wrap; gap: 4px 18px; padding: 10px 0 0; background: none; }
  html:not(.js) .site-nav__link { color: var(--ink); font-size: 18px; border: 0; padding: 6px 0; }
}

/* Windows high contrast */
@media (forced-colors: active) {
  .dot[aria-current="true"]::before { background: CanvasText; }
  .filter[aria-pressed="true"], .a11y-panel button[aria-pressed="true"] { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .a11y-toggle { border: 2px solid ButtonText; }
}

/* long words / enlarged text never break the layout */
:is(h1, h2, h3, .badge__label, .tile__title, .numbers__num, .stat__label, .page-title__text) { overflow-wrap: anywhere; }
@media (max-width: 899.98px) { .page-title__text { white-space: normal; } }

/* broken images keep readable alt text */
.project__media, .split__media, .tile, .cinema__media { color: #ddd; }

/* older browsers without container units keep the design badge size */
.tile .badge { width: 174px; width: min(174px, 56.8cqw); }
.tile .badge--wide { width: 224.8px; width: min(224.8px, 73.4cqw); }

/* ================= pinned header ================= */
/* always visible at the top; same height while scrolling (no layout jump) */
.site-header { position: sticky; top: 0; z-index: 120; }
.site-header.is-scrolled {
  background-color: rgba(236, 236, 236, .88);
  background-image: none;
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  box-shadow: 0 1px 0 rgba(20, 24, 30, .06), 0 10px 30px rgba(20, 24, 30, .10);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header.is-scrolled { background-color: #ededed; }
}
.header-spacer { display: none !important; }
/* the full-screen menu lives inside the header: no filter while it is open */
html.menu-open .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; transform: none; }
html { scroll-padding-top: 100px; }
.split, .project, section[id], [id^="p-"], .field, .contact { scroll-margin-top: 100px; }
@media (max-width: 1279.98px) { html { scroll-padding-top: 86px; } .split, .project, section[id], [id^="p-"], .field, .contact { scroll-margin-top: 86px; } }
@media (max-width: 899.98px) { html { scroll-padding-top: 74px; } .split, .project, section[id], [id^="p-"], .field, .contact { scroll-margin-top: 74px; } }

/* tile hover caption: grows to fit its text in shorter tiles (related rows, tablets) */
.tile__caption { height: auto; min-height: 30.63%; padding-bottom: 26px; }

/* ================= premium details ================= */
::selection { background: rgba(188, 148, 86, .32); color: inherit; }
@supports (scrollbar-color: auto) { html { scrollbar-color: #b59a6c #ececec; scrollbar-width: thin; } }
html::-webkit-scrollbar { width: 9px; }
html::-webkit-scrollbar-track { background: #ececec; }
html::-webkit-scrollbar-thumb { background: #b59a6c; border-radius: 9px; border: 2px solid #ececec; }

/* headlines rise out of a mask */
html.motion :is(.section-head__title, .split__h, .band__title, .project__name, .cinema__title, .numbers__heading, .finance__title):not(.is-in) {
  clip-path: inset(0 0 100% 0);
}
html.motion :is(.section-head__title, .split__h, .band__title, .project__name, .cinema__title, .numbers__heading, .finance__title) {
  transition: opacity 1.05s cubic-bezier(.22,1,.36,1), transform 1.3s cubic-bezier(.22,1,.36,1), clip-path 1.3s cubic-bezier(.65,0,.35,1);
  transition-delay: var(--d, 0s);
}

/* magnetic buttons settle back smoothly */
.magnetic { transition: transform .5s cubic-bezier(.22,1,.36,1); }

/* back to top with progress ring (bottom right; the accessibility button lives on the left) */
.to-top {
  position: fixed; z-index: 880; right: 22px; bottom: 22px;
  width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--ink); cursor: pointer;
  box-shadow: 0 8px 26px rgba(20, 24, 30, .16);
  opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none;
  transition: opacity .5s, transform .6s cubic-bezier(.22,1,.36,1);
}
.to-top.is-shown { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.to-top svg path { transform: rotate(90deg); transform-origin: 24px 24px; }
.to-top__track { fill: none; stroke: rgba(49,53,60,.12); stroke-width: 1.6; }
.to-top__bar { fill: none; stroke: var(--accent, #bc9456); stroke-width: 2; stroke-linecap: round; transition: stroke-dashoffset .15s linear; }
html.menu-open .to-top, html.lightbox-open .to-top { opacity: 0; pointer-events: none; }
@media (max-width: 899.98px) { .to-top { right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 48px; height: 48px; } }

/* photo viewer */
.lb-open {
  position: absolute; z-index: 4; top: 16px; left: 16px;
  width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 50%;
  background: rgba(14, 16, 20, .45); color: #fff; cursor: zoom-in;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .35s, background-color .3s;
}
.lb-open svg { width: 100%; height: 100%; }
:is(.split__media, .project__media):hover .lb-open, .lb-open:focus-visible { opacity: 1; }
.lb-open:hover { background: rgba(14, 16, 20, .7); }
@media (hover: none) { .lb-open { opacity: .9; } }
:is(.split__media, .project__media) .slide img { cursor: zoom-in; }
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12, 14, 18, .96); color: #fff; }
.lightbox::backdrop { background: rgba(12, 14, 18, .9); }
.lightbox[open] { display: grid; place-items: center; animation: lb-in .5s cubic-bezier(.22,1,.36,1); }
@keyframes lb-in { from { opacity: 0; } }
.lightbox__fig { margin: 0; display: grid; justify-items: center; gap: 14px; padding: 70px 90px 60px; max-width: 100%; max-height: 100%; }
.lightbox__img { max-width: min(1600px, calc(100vw - 180px)); max-height: calc(100vh - 170px); object-fit: contain; opacity: 0; transform: scale(.985); transition: opacity .6s, transform .8s cubic-bezier(.22,1,.36,1); }
.lightbox__img.is-loaded { opacity: 1; transform: none; }
.lightbox__cap { font-size: 18px; color: rgba(255,255,255,.75); text-align: center; max-width: 900px; }
.lightbox__btn { position: absolute; width: 52px; height: 52px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: transparent; color: #fff; font-size: 30px; line-height: 1; cursor: pointer; transition: background-color .3s, border-color .3s; }
.lightbox__btn:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.lightbox__close { top: 20px; left: 20px; }
.lightbox__prev { top: 50%; right: 22px; transform: translateY(-50%); }
.lightbox__next { top: 50%; left: 22px; transform: translateY(-50%); }
.lightbox.is-single .lightbox__prev, .lightbox.is-single .lightbox__next { display: none; }
.lightbox__count { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); margin: 0; font-size: 15px; letter-spacing: .1em; color: rgba(255,255,255,.7); direction: ltr; }
@media (max-width: 899.98px) {
  .lightbox__fig { padding: 70px 10px 70px; }
  .lightbox__img { max-width: calc(100vw - 20px); max-height: calc(100vh - 190px); }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 14px; transform: none; }
  .lightbox__count { bottom: 30px; }
}
html.lightbox-open, html.lightbox-open body { overflow: hidden; }

/* slow brand strip (home) */
.marquee { overflow: hidden; padding: 34px 0; background: #fff; border-block: 1px solid #ececec; direction: ltr; }
.marquee__track { display: flex; width: max-content; gap: 0; }
.marquee__group { display: flex; flex: none; align-items: center; gap: 46px; padding-inline-end: 46px; font-family: var(--font-display); font-size: clamp(26px, 3.2vw, 54px); letter-spacing: .14em; color: transparent; -webkit-text-stroke: 1px #b9a581; white-space: nowrap; }
.marquee__group i { width: 9px; height: 9px; flex: none; transform: rotate(45deg); border: 1px solid #c9b48f; }
html.motion .marquee__track { animation: marquee 60s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (forced-colors: active) { .marquee__group { color: CanvasText; -webkit-text-stroke: 0; } }

/* numbers heading */
.numbers__heading { margin-top: 8px; font-size: calc(40px * var(--text-scale)); font-weight: 300; line-height: 1.2; }

/* ------------------------------------------------- page transitions */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
.a11y-toggle { view-transition-name: a11y-toggle; }
/* soft crossfade: the old page stays until the new one is painted, so there is no empty frame */
::view-transition-old(root) { animation: vt-out .5s cubic-bezier(.4,0,.2,1) both; }
::view-transition-new(root) { animation: vt-in .6s cubic-bezier(.22,1,.36,1) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ------------------------------------------------------ brand intro */
.intro-curtain {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; place-items: center;
  background: #f4f4f4 url("../img/texture-wave-1490.webp") center / cover;
  pointer-events: none;
  animation: curtain-out .7s cubic-bezier(.65,0,.35,1) .6s forwards;
}
.intro-curtain img { width: 150px; height: auto; opacity: 0; transform: translateY(14px); animation: mark-in .6s cubic-bezier(.2,.7,.2,1) .05s forwards; }
@keyframes mark-in { to { opacity: 1; transform: none; } }
@keyframes curtain-out { to { transform: translateY(-100%); visibility: hidden; } }
html:not(.motion) .intro-curtain { display: none; }

/* ---------------------------------------------------- sticky header */
.header-spacer { display: none; height: 90px; }
.site-header { transition: box-shadow .3s, background-color .3s; }
.site-header.is-fixed {
  position: fixed; z-index: 120; top: 0; left: 0; right: 0;
  margin: 0;
  height: 72px;
  padding-inline: 48px 30px;
  background-color: rgba(238, 238, 238, .86);
  background-size: cover;
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 10px 30px rgba(20, 24, 30, .10);
  transform: translateY(-105%);
}
html.motion .site-header.is-fixed { transition: transform .45s cubic-bezier(.2,.7,.2,1), box-shadow .3s; }
.site-header.is-fixed.is-shown { transform: none; }
.site-header.is-fixed .site-header__logo img { width: 150px; height: 50px; }
.site-header.is-fixed + .header-spacer { display: block; }
.site-header.is-fixed .site-nav__link { font-size: clamp(19px, 1.3vw, 24px); }

/* scroll progress line */
.progress { position: fixed; z-index: 130; top: 0; left: 0; right: 0; height: 2px; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2, var(--accent))); transform-origin: 100% 50%; transform: scaleX(0); }

/* ------------------------------------------------------ reveal system */
html.motion :is(.rv, .split__heading, .split__h, .split__body > p, .split__more, .intro__title, .intro__body > p, .intro__more,
  .page-title, .band__title, .stat, .leader__text, .member, .tile, .contact__inner, .feature, .project-card,
  .project__text > *, .section-head > *, .numbers__item, .cinema__text, .donut-figure, .video-link):not(.is-in) {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
}
html.motion :is(.rv, .split__heading, .split__h, .split__body > p, .split__more, .intro__title, .intro__body > p, .intro__more,
  .page-title, .band__title, .stat, .leader__text, .member, .tile, .contact__inner, .feature, .project-card,
  .project__text > *, .section-head > *, .numbers__item, .cinema__text, .donut-figure, .video-link) {
  transition: opacity 1.05s cubic-bezier(.22,1,.36,1), transform 1.2s cubic-bezier(.22,1,.36,1);
  transition-delay: var(--d, 0s);
}
html.motion .leader__text:not(.is-in) { transform: translate3d(0, calc(-50% + 24px), 0); }
html.motion .leader__text.is-in { transform: translate3d(0, -50%, 0); }

/* image wipes */
html.motion :is(.split__media, .project__media, .leader__photo, .cinema__media) { --wipe: inset(0 0 0 0); }
/* photo frames never change size: the photo itself fades and settles inside a fixed frame */
html.motion :is(.split__media, .project__media, .cinema__media) { background-color: var(--paper); }
html.motion :is(.split__media, .project__media, .cinema__media):not(.is-in) img { opacity: 0; transform: scale(1.06); }
html.motion :is(.split__media, .project__media, .cinema__media) img { transition: opacity 1.4s cubic-bezier(.22,1,.36,1), transform 2.2s cubic-bezier(.2,.7,.2,1); }

/* parallax target (JS sets --py) */
/* (parallax removed) */
html.motion .split__media.is-in .px, html.motion .project__media.is-in .px, html.motion .cinema__media.is-in .px { transition: none; }

/* ribbons unfurl from their tip */
html.motion .art { clip-path: inset(0 100% 0 0); transition: clip-path 3s cubic-bezier(.7,0,.2,1) .3s; }
html.motion .leader--photo-left .art { clip-path: inset(0 0 0 100%); }
html.motion .is-in > .art, html.motion .is-in.art { clip-path: inset(0 0 0 0) !important; }

/* hero ken-burns + quote lines */
html.motion .hero .slide img, html.motion .re-hero__photo img { transform: scale(1.1); transition: transform 14s cubic-bezier(.2,.6,.2,1); }
html.motion .hero .slide.is-active img, html.motion .re-hero.is-in .re-hero__photo img { transform: scale(1); }
html.motion .hero__quote-text p { clip-path: inset(0 0 100% 0); transform: translateY(24px); transition: clip-path 2s cubic-bezier(.65,0,.35,1) .8s, transform 2.2s cubic-bezier(.22,1,.36,1) .8s; }
html.motion .hero.is-in .hero__quote-text p { clip-path: inset(0 0 -10% 0); transform: none; }
html.motion .hero__quote-text { border-inline-start-color: transparent; transition: border-color 1s 1.6s; }
html.motion .hero.is-in .hero__quote-text { border-inline-start-color: var(--coral); }
html.motion .hero__quote-mark { opacity: 0; transform: scale(.6); transition: opacity 1.3s 1.3s, transform 1.6s cubic-bezier(.2,.9,.2,1.3) 1.3s; }
html.motion .hero.is-in .hero__quote-mark { opacity: 1; transform: none; }
html.motion .re-hero__badge { opacity: 0; transform: scale(.86); transition: opacity 1.5s .9s, transform 2s cubic-bezier(.2,.7,.2,1) .9s; }
html.motion .re-hero.is-in .re-hero__badge { opacity: 1; transform: none; }

/* badge ornament draws in */
html.motion .badge > svg { transform: scaleX(0); transition: transform 1.15s cubic-bezier(.65,0,.35,1) calc(var(--d, 0s) + .2s); }
html.motion .is-in .badge > svg, html.motion .badge.is-in > svg, html.motion .tile.is-in .badge > svg { transform: none; }

/* ------------------------------------------------------- micro-interactions */
.btn-send { position: relative; overflow: hidden; }
.btn-send::after {
  content: ""; position: absolute; inset: 0; transform: translateX(110%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.btn-send:hover::after { transform: translateX(-110%) skewX(-18deg); }
.member img { transition: transform 1.2s cubic-bezier(.2,.7,.2,1), filter .6s; }
.member:hover img { transform: scale(1.05); }

/* ------------------------------------------------------- section heads */
.section-head { margin: 70px var(--gutter) 34px; text-align: center; }
.section-head__kicker { font-family: var(--font-display); font-size: 18px; letter-spacing: .22em; color: var(--kicker, #7a5a2b); }
body.theme-real-estate { --kicker: #a3401f; }
body:is(.theme-energy, .theme-transportation, .theme-infrastructure, .theme-retail, .theme-travel) { --kicker: var(--accent-text); }
.section-head__title { margin-top: 10px; font-size: calc(44px * var(--text-scale)); font-weight: 300; line-height: 1.15; color: var(--ink); }
.section-head__lead { max-width: 760px; margin: 16px auto 0; font-size: calc(22px * var(--text-scale)); line-height: 1.6; color: #4a4f57; }

/* ------------------------------------------------------------- stats */
.stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 56px;
  margin-top: 46px;
}
.stat {
  position: relative;
  display: grid; justify-items: center; align-content: center;
  min-width: 170px; padding: 8px 34px;
  text-align: center;
}
.stat::before, .stat::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 18px;
  background: no-repeat center / 100% 100%;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 90' preserveAspectRatio='none'%3E%3Cpath d='M17 1L2 45l15 44' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 90' preserveAspectRatio='none'%3E%3Cpath d='M17 1L2 45l15 44' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
  background-color: var(--accent);
}
.stat::before { right: 0; transform: scaleX(-1); }
.stat::after { left: 0; }
.stat__num { font-size: calc(44px * var(--text-scale)); font-weight: 700; line-height: 1.1; color: var(--ink); }
.stat__num small { font-size: .55em; font-weight: 400; }
.stat__label { margin-top: 4px; font-size: calc(19px * var(--text-scale)); line-height: 1.3; color: #4a4f57; max-width: 220px; }
.split__text .stats { margin-top: 40px; }

/* --------------------------------------------------- numbers strip */
.numbers {
  position: relative;
  margin: 30px var(--gutter) 0;
  padding: 70px 30px 76px;
  background: var(--dark) url("../img/texture-wave-1490.webp") center / cover;
  background-blend-mode: multiply;
  color: #fff;
  text-align: center;
  overflow: hidden;
}
.numbers::before { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(49,53,60,.92), rgba(49,53,60,.78)); }
.numbers > * { position: relative; }
.numbers__title { font-family: var(--font-display); font-size: 22px; letter-spacing: .24em; color: #e4c98f; }
.numbers__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 40px; }
.numbers__item { padding: 6px 20px; border-inline-start: 1px solid rgba(255,255,255,.18); }
.numbers__item:first-child { border-inline-start: 0; }
.numbers__num { display: block; font-size: calc(68px * var(--text-scale)); font-weight: 300; line-height: 1; }
.numbers__label { display: block; margin-top: 12px; font-size: calc(21px * var(--text-scale)); color: rgba(255,255,255,.82); }

/* ------------------------------------------------------- feature cards */
.features { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 6px; margin: 9px var(--gutter) 0; }
.feature {
  position: relative; display: block; min-height: 300px; overflow: hidden;
  color: #fff; text-decoration: none; background: var(--dark); isolation: isolate;
}
.feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s cubic-bezier(.2,.7,.2,1); z-index: -1; }
.feature::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(18,20,24,.88), rgba(18,20,24,.15) 70%); }
.feature__body { position: absolute; inset-inline: 0; bottom: 0; padding: 28px 30px 30px; }
.feature__idx { font-family: var(--font-display); font-size: 16px; letter-spacing: .2em; color: var(--accent-2, #e8cf96); }
.feature__title { display: block; margin-top: 6px; font-size: calc(28px * var(--text-scale)); font-weight: 400; line-height: 1.2; }
.feature__more { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: calc(18px * var(--text-scale)); opacity: .85; }
.feature__more::after { content: ""; width: 26px; height: 1px; background: currentColor; transition: width .4s; }
.feature:hover img, .feature:focus-visible img { transform: scale(1.06); }
.feature:hover .feature__more::after { width: 44px; }
.feature:focus-visible { outline-offset: -6px; }

/* -------------------------------------------------- cinematic band */
.cinema { position: relative; margin: 30px var(--gutter) 0; height: min(78vh, 760px); min-height: 420px; overflow: hidden; color: #fff; display: grid; align-items: end; }
.cinema__media { position: absolute; inset: 0; }
.cinema__media img { width: 100%; height: 100%; object-fit: cover; }
.cinema::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,12,16,.78), rgba(10,12,16,0) 60%); }
.cinema__text { position: relative; z-index: 1; padding: 0 7% 64px; max-width: 1100px; }
.cinema__kicker { font-family: var(--font-display); font-size: 18px; letter-spacing: .24em; opacity: .85; }
.cinema__title { margin-top: 12px; font-size: calc(48px * var(--text-scale)); font-weight: 300; line-height: 1.2; }

/* --------------------------------------------------------- projects */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 var(--gutter) 30px; }
.filter {
  min-height: 44px; padding: 8px 22px;
  border: 1px solid #b9b9be; border-radius: 40px; background: #fff;
  font-size: calc(19px * var(--text-scale)); font-weight: 400; color: var(--ink); cursor: pointer;
  transition: background-color .25s, color .25s, border-color .25s;
}
.filter[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: #fff; }
.filter:hover { border-color: var(--dark); }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 var(--gutter); }
.project-card {
  position: relative; display: block; aspect-ratio: 4 / 4.6; overflow: hidden;
  color: #fff; text-decoration: none; background: var(--dark); isolation: isolate;
}
.project-card[hidden] { display: none; }
.project-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; transition: transform 1.4s cubic-bezier(.2,.7,.2,1); }
.project-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(14,16,20,.9) 0%, rgba(14,16,20,.35) 42%, rgba(14,16,20,0) 70%); transition: opacity .5s; }
.project-card__body { position: absolute; inset-inline: 0; bottom: 0; padding: 26px 28px 28px; }
.project-card__tag { display: inline-block; padding: 4px 12px; background: #b4452a; font-size: calc(15px * var(--text-scale)); font-weight: 400; line-height: 1.2; }
.project-card__name { display: block; margin-top: 12px; font-size: calc(30px * var(--text-scale)); font-weight: 400; line-height: 1.15; }
.project-card__type { display: block; margin-top: 4px; font-size: calc(19px * var(--text-scale)); color: rgba(255,255,255,.85); }
.project-card__status { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: calc(16px * var(--text-scale)); color: rgba(255,255,255,.85); }
.project-card__status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #e9c48a; box-shadow: 0 0 0 4px rgba(233,196,138,.22); }
.project-card:hover img, .project-card:focus-visible img { transform: scale(1.07); }
.project-card:focus-visible { outline-offset: -6px; }

/* project detail rows */
.project { display: grid; grid-template-columns: 1fr 1fr; margin: 30px var(--gutter) 0; scroll-margin-top: 90px; background: #fff; }
.project:nth-of-type(even) .project__media { order: 2; }
.project__media { position: relative; min-height: 640px; overflow: hidden; background: #111; }
.project__media > img, .project__media .slides { position: absolute; inset: 0; }
.project__media > img { width: 100%; height: 100%; object-fit: cover; }
.project__text { padding: 70px 8% 72px; display: flex; flex-direction: column; justify-content: center; background: var(--paper); }
.project__kicker { display: inline-block; align-self: flex-start; padding: 4px 12px; background: #b4452a; color: #fff; font-size: calc(15px * var(--text-scale)); font-weight: 400; }
.project__name { margin-top: 16px; font-size: calc(44px * var(--text-scale)); font-weight: 300; line-height: 1.12; }
.project__type { margin-top: 6px; font-size: calc(24px * var(--text-scale)); font-weight: 700; }
.project__body { margin-top: 22px; }
.project__body p { font-size: calc(21px * var(--text-scale)); line-height: 1.6; margin-bottom: 14px; color: #3b4048; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 30px; margin-top: 26px; }
.fact { position: relative; padding-inline-start: 22px; }
.fact::before { content: ""; position: absolute; right: 0; top: 4px; width: 9px; height: 28px; background: var(--coral);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 28'%3E%3Cpath d='M1 1l7 13-7 13' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 28'%3E%3Cpath d='M1 1l7 13-7 13' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat center / contain; }
.fact dt { font-size: calc(17px * var(--text-scale)); font-weight: 700; color: var(--ink); }
.fact dd { margin: 2px 0 0; font-size: calc(19px * var(--text-scale)); color: #4a4f57; }
.project .video-link { align-self: flex-start; margin-top: 30px; flex-direction: row; gap: 14px; padding: 0; }
.project .video-link svg { width: 46px; height: 46px; }

/* -------------------------------------------------- related domains */
.related { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4.75px; margin: 0 var(--gutter); }
.related .tile { aspect-ratio: 306.4 / 520; }
.related > li { list-style: none; }

/* -------------------------------------------------- finance band */
.finance { margin: 30px var(--gutter) 0; padding: 80px 30px; text-align: center; background: var(--paper) url("../img/texture-wave-1490.webp") center / cover; }
.finance__title { font-size: calc(44px * var(--text-scale)); font-weight: 400; color: #93703a; }
.finance__body { max-width: 820px; margin: 22px auto 0; font-size: calc(22px * var(--text-scale)); line-height: 1.7; }

/* ------------------------------------------- full-screen menu (<1280) */
@media (max-width: 1279.98px) {
  .site-nav { position: fixed; inset: 0; z-index: 140; top: 0; display: none; }
  .site-nav.is-open { display: block; }
  .site-nav__list {
    display: flex !important;
    position: absolute; inset: 0;
    flex-direction: column; justify-content: center; align-items: stretch;
    padding: 90px 9vw 60px; gap: 2px;
    background: #23262b url("../img/texture-wave-1490.webp") center / cover;
    background-blend-mode: multiply;
    box-shadow: none; border: 0;
    overflow-y: auto;
  }
  .site-nav__link { color: #fff; font-size: calc(30px * var(--text-scale)); font-weight: 300; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12); background: none !important; }
  .site-nav__link:hover { background: none; color: #e4c98f; }
  .site-nav__link--cta { color: #f1a58f; }
  .site-nav__link[aria-current="page"] { color: #e4c98f; font-weight: 400; }
  .nav-toggle { position: relative; z-index: 150; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before, .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { background: #fff; }
  html.menu-open, html.menu-open body { overflow: hidden; }
  html.motion .site-nav.is-open .site-nav__list { animation: menu-in .55s cubic-bezier(.7,0,.2,1) both; }
  html.motion .site-nav.is-open li { animation: item-in .7s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(.12s + var(--i, 0) * .05s); }
  .site-header.is-fixed { padding-inline: 16px 18px; height: 64px; }
  .site-header.is-fixed .site-header__logo img { width: 130px; height: 43px; }
  .header-spacer { height: 76px; }
}
@keyframes menu-in { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes item-in { from { opacity: 0; transform: translateY(26px); } }

/* ------------------------------------------------------- responsive */
@media (max-width: 1279.98px) {
  .re-hero--domain .re-hero__badge--wide { width: 336px; }
  .numbers__num { font-size: calc(54px * var(--text-scale)); }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
}
@media (max-width: 1023.98px) {
  .project { grid-template-columns: 1fr; }
  .project:nth-of-type(even) .project__media { order: 0; }
  .project__media { min-height: 0; aspect-ratio: 4 / 3; }
  .project__text { padding: 46px 26px 52px; }
  .features { grid-template-columns: 1fr; }
  .feature { min-height: 240px; }
}
@media (max-width: 899.98px) {
  .header-spacer { height: 64px; }
  /* phones: photo full-bleed, ribbon hidden, badge centred over a soft vignette */
  .re-hero--domain { height: 62vh; min-height: 380px; }
  .re-hero--domain .art { display: none; }
  .re-hero--domain .re-hero__badge { margin: 0; }
  .re-hero--domain .re-hero__photo::after { background: radial-gradient(60% 45% at 50% 50%, rgba(8,12,18,.45), rgba(8,12,18,.1)); }
  .related li:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .related li:last-child:nth-child(odd) .tile { aspect-ratio: 16 / 9; }
  .filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding: 0 16px 4px; scrollbar-width: none; }
  .filter { flex: none; }
  .numbers__heading { font-size: calc(28px * var(--text-scale)); }
  .re-hero--domain .re-hero__badge--wide { width: 272px; }
  .section-head { margin: 46px var(--gutter) 24px; }
  .section-head__title { font-size: calc(32px * var(--text-scale)); }
  .section-head__lead { font-size: calc(19px * var(--text-scale)); }
  .numbers { padding: 50px 16px; margin-top: 12px; }
  .numbers__grid { grid-template-columns: 1fr 1fr; gap: 30px 0; margin-top: 30px; }
  .numbers__item:nth-child(3) { border-inline-start: 0; }
  .numbers__num { font-size: calc(44px * var(--text-scale)); }
  .numbers__label { font-size: calc(17px * var(--text-scale)); }
  .stats { gap: 18px 10px; margin-top: 30px; }
  .stat { min-width: 140px; padding: 6px 26px; }
  .stat__num { font-size: calc(34px * var(--text-scale)); }
  .stat__label { font-size: calc(16px * var(--text-scale)); }
  .cinema { height: 62vh; min-height: 360px; margin-top: 12px; }
  .cinema__text { padding: 0 20px 36px; }
  .cinema__title { font-size: calc(30px * var(--text-scale)); }
  /* swipeable, snapping card rows on phones */
  .project-grid, .features {
    display: flex; gap: 10px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: 16px;
    margin-inline: 0; padding: 0 16px 6px;
    scrollbar-width: none;
  }
  .project-grid::-webkit-scrollbar, .features::-webkit-scrollbar { display: none; }
  .project-grid > li, .features > li { flex: 0 0 82%; scroll-snap-align: start; }
  .project-grid > li[hidden] { display: none; }
  .project-card { aspect-ratio: 4 / 4.8; }
  .feature { min-height: 0; aspect-ratio: 4 / 3.4; }
  .swipe-hint { display: block; margin: 10px var(--gutter) 0; font-size: 15px; color: #6b7078; text-align: center; }
  .project { margin-top: 12px; }
  .project__name { font-size: calc(34px * var(--text-scale)); }
  .project__body p { font-size: calc(19px * var(--text-scale)); }
  .facts { grid-template-columns: 1fr 1fr; gap: 14px 16px; }
  .related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related .tile { aspect-ratio: 3 / 4; }
  .finance { padding: 50px 18px; margin-top: 12px; }
  .finance__title { font-size: calc(32px * var(--text-scale)); }
  .finance__body { font-size: calc(19px * var(--text-scale)); }
  .filters { gap: 8px; }
  .filter { padding: 6px 16px; font-size: calc(17px * var(--text-scale)); }
  .site-nav__list { padding: 84px 28px 40px; }
  .site-nav__link { font-size: calc(26px * var(--text-scale)); }
}
@media (max-width: 420px) {
  .facts { grid-template-columns: 1fr; }
}

/* high contrast / readable overrides for new parts */
html.a11y-contrast .numbers::before { background: #000; }
html.a11y-contrast .project-card::after, html.a11y-contrast .feature::after, html.a11y-contrast .cinema::after { background: rgba(0,0,0,.72); }
html.a11y-readable .numbers__title, html.a11y-readable .section-head__kicker, html.a11y-readable .cinema__kicker, html.a11y-readable .feature__idx { font-family: Arial, sans-serif; }

@media print { .intro-curtain, .progress, .filters { display: none !important; } }

/* decorative strip words are drawn by CSS (no text nodes) */
.marquee__group span::before { content: attr(data-w); }

/* first frame after arriving from another page: no transitions (content already in place) */
html.arrived-instant *, html.arrived-instant *::before, html.arrived-instant *::after { transition: none !important; }

/* =================================================================
   Image framing: show the whole picture, don't zoom into it.
   Every photo box keeps a proportion close to the photo itself.
   ================================================================= */

/* side-by-side text + photo only where both columns are wide enough */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .split { grid-template-columns: 1fr; }
  .split__media { aspect-ratio: 16 / 10; order: -1; }
  .split__text, .split__text--top { aspect-ratio: auto; padding: 60px 12% 70px; justify-content: flex-start; }
  .project { grid-template-columns: 1fr; }
  .project:nth-of-type(even) .project__media { order: 0; }
  .project__media { min-height: 0; aspect-ratio: 16 / 10; }
  .project__text { padding: 56px 12% 64px; }
}
@media (min-width: 1280px) {
  .project__media { min-height: clamp(640px, 46vw, 940px); }
}

/* feature cards: a photo proportion, not a 300px strip */
@media (min-width: 1024px) { .feature { min-height: 0; height: clamp(300px, 22vw, 560px); } }
@media (min-width: 900px) and (max-width: 1023.98px) { .feature { min-height: 0; aspect-ratio: 16 / 9; } }

/* domain heroes grow with the screen width on large monitors */
.re-hero--domain { height: min(max(74vh, 36vw), 86vh, 1000px); }

@media (max-width: 899.98px) {
  /* home hero + domain heroes: wide frame instead of a tall close-up */
  .hero { height: auto !important; min-height: 0; aspect-ratio: 16 / 10; }
  .re-hero--domain { height: auto !important; min-height: 0; aspect-ratio: 4 / 3; }
  .re-hero:not(.re-hero--domain) { aspect-ratio: 16 / 9; }
  /* tiles keep the design proportion (tall strip photos) */
  .tile, .related .tile { aspect-ratio: 306.4 / 520; }
  /* related domains: a swipeable row instead of a cropped last tile */
  .related {
    display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: 16px;
    padding: 0 16px 6px; scrollbar-width: none;
  }
  .related::-webkit-scrollbar { display: none; }
  .related > li { flex: 0 0 min(44%, 260px); scroll-snap-align: start; }
  .related li:last-child:nth-child(odd) .tile { aspect-ratio: 306.4 / 520; }
}
@media (max-width: 599.98px) {
  .hero { aspect-ratio: 5 / 4; }
  .re-hero--domain { aspect-ratio: 5 / 4; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .hero { aspect-ratio: auto; height: calc(100svh - 64px) !important; }
}

/* gallery photos that would lose too much to cropping are shown whole,
   over a soft blurred copy of themselves (set by experience.js) */
.slide.is-fit { background: #15171b; }
.slide.is-fit::before {
  content: ""; position: absolute; inset: -40px; z-index: 0;
  background: var(--fit-bg) center / cover no-repeat;
  filter: blur(28px) brightness(.62) saturate(1.1);
}
.slide.is-fit img { position: relative; z-index: 1; object-fit: contain !important; }
