/* ==========================================================================
   BrewkSpace — Home page
   "Editorial Earth-Modernism": limestone paper, basalt ink, laterite accent.

   00. Tokens
   01. Reset & base
   02. Layout & type utilities
   03. Buttons & links
   04. Preloader
   05. Header, nav & mega-menu
   06. Mobile menu overlay
   07. Hero
   08. Manifesto & stats
   09. Journey (Land → Built)
   10. Marquee
   11. Services index
   12. Typologies gallery
   13. Workspace spotlight
   14. Who we serve
   15. Principles
   16. Contact & form
   17. Footer
   18. WhatsApp button
   19. Custom cursor
   20. Lenis
   21. Reduced motion
   ========================================================================== */

/* 00. Tokens ------------------------------------------------------------- */
:root {
  /* Palette (brief §3) */
  --limestone: #F1ECE3;
  --bone: #E7E0D3;
  --basalt: #121815;
  --basalt-2: #1C2420;
  --laterite: #B8492A;
  --laterite-ink: #9C3B1F;   /* small laterite text on light (5.8:1) */
  --laterite-light: #D97452; /* small laterite text on basalt (5.6:1) */
  --moss: #5B6B4E;
  --stone: #645E55;          /* darkened from #8C857A so muted text passes AA on limestone + bone */
  --mist: #A9B0AA;
  --on-laterite: #FFF8F1;    /* text on laterite buttons (4.9:1) */

  /* Derived lines & veils */
  --line-light: color-mix(in srgb, var(--basalt) 14%, transparent);
  --line-light-strong: color-mix(in srgb, var(--basalt) 28%, transparent);
  --line-dark: color-mix(in srgb, var(--limestone) 14%, transparent);
  --line-dark-strong: color-mix(in srgb, var(--limestone) 30%, transparent);
  --veil-dark: color-mix(in srgb, var(--basalt) 55%, transparent);
  --dim-on-dark: color-mix(in srgb, var(--limestone) 42%, transparent);

  /* Type */
  --f-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --f-text: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Montserrat", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --fw-display: 500;        /* Cormorant hairlines need 500+ at display sizes */
  --fw-display-sm: 600;     /* smaller serif titles */

  --fs-hero: clamp(3.7rem, 11vw, 14.5rem);
  --fs-h2: clamp(2.6rem, 5.6vw, 6.2rem);
  --fs-statement: clamp(2.05rem, 4.3vw, 4.75rem);
  --fs-body: clamp(1rem, 0.97rem + 0.12vw, 1.0625rem);
  --fs-small: 0.875rem;
  --fs-label: 0.72rem;      /* Montserrat labels: 500-600, uppercase, 0.16-0.2em */
  --ls-label: 0.18em;

  /* Motion: one easing family (expo) */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.87, 0, 0.13, 1);
  --dur-ui: 0.45s;
  --dur-big: 1.1s;

  /* Space */
  --gutter: clamp(16px, 4.2vw, 72px);
  --col-gap: clamp(16px, 2vw, 32px);
  --section-y: clamp(96px, 12vw, 192px);
  --header-h: 72px;
  --max: 1760px;
}

@media (min-width: 1024px) {
  :root { --header-h: 84px; }
}

/* 01. Reset & base -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--limestone); }
@media (prefers-reduced-motion: no-preference) {
  html:not(.lenis) { scroll-behavior: smooth; }
}
body {
  background: var(--limestone);
  color: var(--basalt);
  font-family: var(--f-text);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.7;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* Paper grain — static, composited once, never animated */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
em { font-style: italic; }
::selection { background: var(--laterite); color: var(--on-laterite); }

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 12px 18px;
  background: var(--basalt);
  color: var(--limestone);
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform var(--dur-ui) var(--ease);
}
.skip-link:focus { transform: translateY(0); }

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

/* 02. Layout & type utilities --------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.night { background: var(--basalt); color: var(--limestone); }

.mono {
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--stone);
  margin-bottom: clamp(18px, 2vw, 28px);
}
.eyebrow__mark {
  width: 9px; height: 9px;
  background: var(--laterite);
  flex: none;
}
.eyebrow--light { color: var(--mist); }

.h2 {
  font-family: var(--f-display);
  font-weight: var(--fw-display);
  font-size: var(--fs-h2);
  line-height: 0.98;
  letter-spacing: -0.01em;
  max-width: 16ch;
}
.h2 em, .contact__title em, .manifesto__statement em { color: var(--laterite); }
.night .h2 em { color: var(--laterite-light); }

.tags {
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--moss);
}
.night .tags { color: var(--laterite-light); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(48px, 6vw, 96px);
}

/* Word-split masks (created by JS for [data-split]) */
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.14em 0.08em 0.22em;
  margin: -0.14em -0.08em -0.22em;
}
.w__i { display: inline-block; will-change: transform; }

/* 03. Buttons & links ---------------------------------------------------- */
.btn {
  --btn-bg: var(--laterite);
  --btn-fg: var(--on-laterite);
  --btn-bd: var(--laterite);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid var(--btn-bd);
  border-radius: 2px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--f-text);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: background-color var(--dur-ui) var(--ease), border-color var(--dur-ui) var(--ease), color var(--dur-ui) var(--ease);
}
/* fill wipe on hover */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-hover, var(--laterite-ink));
  transform: translateY(101%);
  transition: transform 0.6s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:active { transform: scale(0.98); }
/* rolling label: the text-shadow copy sits one line below and rolls up on hover */
.btn__label {
  position: relative;
  display: inline-block;
  overflow: hidden;
  line-height: 1.3;
  height: 1.3em;
}
.btn__label-i { display: inline-block; text-shadow: 0 1.3em 0 currentColor; transition: transform 0.6s var(--ease); }
@media (hover: hover) {
  .btn:hover .btn__label-i, .btn:focus-visible .btn__label-i { transform: translateY(-1.3em); }
}
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 0.7rem; }
.btn--lg { min-height: 58px; padding: 0 32px; font-size: 0.8rem; }
.btn--ghost-light {
  --btn-bg: transparent;
  --btn-fg: var(--limestone);
  --btn-bd: var(--line-dark-strong);
  --btn-hover: var(--limestone);
}
.btn--ghost-light:hover, .btn--ghost-light:focus-visible { color: var(--basalt); border-color: var(--limestone); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  padding-bottom: 3px;
  transition: background-size 0.6s var(--ease), color var(--dur-ui) var(--ease);
}
.link-arrow span { display: inline-block; transition: transform 0.6s var(--ease); }
.link-arrow:hover, .link-arrow:focus-visible { background-size: 100% 1px; }
.link-arrow:hover span, .link-arrow:focus-visible span { transform: translateX(6px); }
.link-arrow--ink { color: var(--laterite-ink); }
.night .link-arrow--ink { color: var(--laterite-light); }
.link-arrow--lg { font-size: 1.05rem; }

/* 04. Preloader ---------------------------------------------------------- */
.preloader { display: none; }
.motion:not(.no-preload) .preloader {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--basalt);
  color: var(--limestone);
  clip-path: inset(0 0 0 0);
}
.preloader__contours {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(92vw, 980px);
  transform: translate(-50%, -50%);
  overflow: visible;
}
.preloader__contours path { fill: none; stroke: var(--mist); stroke-width: 1; opacity: 0.35; }
.preloader__contours path:first-child { stroke: var(--laterite); opacity: 1; stroke-width: 1.4; }
.preloader__mark {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  font-weight: 600;
  font-size: clamp(1.4rem, 3.4vw, 2.6rem);
  letter-spacing: 0.08em;
}
.preloader__mark .logo__glyph { width: 0.95em; height: 0.95em; }
.preloader__word { display: inline-flex; overflow: hidden; padding-block: 0.08em; }
.preloader__word span { display: inline-block; }
.preloader__foot {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(20px, 4vh, 40px);
  display: flex;
  justify-content: space-between;
  color: var(--mist);
}
.preloader__count { font-variant-numeric: tabular-nums; color: var(--limestone); }
.preloader__count [data-preload-count] { display: inline-block; min-width: 3ch; text-align: right; }
html.is-loading, html.is-loading body { overflow: hidden; }

/* 05. Header, nav & mega-menu ---------------------------------------------- */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--f-text);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.08em;
  line-height: 1;
}
.logo__glyph { width: 20px; height: 20px; flex: none; }
.glyph-cell { fill: var(--laterite); }
.logo__word { padding-top: 1px; }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  color: var(--basalt);
  background: var(--limestone);
  border-bottom: 1px solid var(--line-light);
  transition:
    transform 0.7s var(--ease),
    background-color 0.5s var(--ease),
    color 0.5s var(--ease),
    border-color 0.5s var(--ease);
}
/* With JS: transparent over hero until scrolled past */
.js .site-header { background: transparent; color: var(--limestone); border-bottom-color: transparent; }
.js .site-header.is-solid,
.js .site-header.mega-open {
  background: color-mix(in srgb, var(--limestone) 93%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: var(--basalt);
  border-bottom-color: var(--line-light);
}
.js .site-header.mega-open { background: var(--limestone); }
.site-header.is-hidden { transform: translateY(-101%); }

.site-header__bar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: clamp(0.7rem, 1.55vw, 2.1rem); }
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
  font-size: 0.84rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.55s var(--ease);
}
.nav__link:hover::after, .nav__link:focus-visible::after, .nav__trigger[aria-expanded="true"]::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav__chev { width: 11px; height: 11px; transition: transform var(--dur-ui) var(--ease); }
.nav__trigger[aria-expanded="true"] .nav__chev { transform: rotate(180deg); }

.site-header__actions { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 24px); }
.header-phone { display: none; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.header-phone:hover { text-decoration: underline; text-underline-offset: 4px; }
.header-cta { display: none; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 4px;
  font-family: var(--f-mono);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
}
.menu-btn__icon { display: grid; gap: 5px; width: 22px; }
.menu-btn__icon span { display: block; height: 1.5px; background: currentColor; transition: transform 0.5s var(--ease); }
.menu-btn__icon span:last-child { width: 60%; justify-self: end; }
.menu-btn:hover .menu-btn__icon span:last-child { transform: scaleX(1.66); transform-origin: right; }

@media (min-width: 1024px) {
  .nav { display: block; }
  .header-cta { display: inline-flex; }
  .menu-btn { display: none; }
}
@media (min-width: 1280px) {
  .header-phone { display: inline; }
}

/* Mega-menu */
.mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--limestone);
  color: var(--basalt);
  border-bottom: 1px solid var(--line-light);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.75s var(--ease), visibility 0s linear 0.75s;
}
.mega.is-open {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.85s var(--ease), visibility 0s;
}
.mega__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.15fr;
  gap: clamp(24px, 3vw, 56px);
  padding-block: clamp(36px, 4vw, 56px) clamp(40px, 4.5vw, 64px);
}
.mega__col, .mega__card {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.4s var(--ease), transform 0.6s var(--ease);
}
.mega.is-open .mega__col, .mega.is-open .mega__card {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(0.12s + var(--i) * 0.07s);
}
.mega__idx { color: var(--stone); margin-bottom: 18px; }
.mega__title { font-family: var(--f-display); font-weight: var(--fw-display-sm); font-size: 2.2rem; line-height: 1.02; }
.mega__blurb { color: var(--stone); font-size: 0.9rem; margin: 8px 0 22px; max-width: 30ch; }
.mega__links { border-top: 1px solid var(--line-light); }
.mega__links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-light);
  font-size: 0.9rem;
  transition: color 0.3s var(--ease), padding 0.5s var(--ease);
}
.mega__links a::after { content: "→"; opacity: 0; transform: translateX(-8px); transition: opacity 0.3s, transform 0.5s var(--ease); color: var(--laterite-ink); }
.mega__links a:hover, .mega__links a:focus-visible { color: var(--laterite-ink); padding-left: 6px; }
.mega__links a:hover::after, .mega__links a:focus-visible::after { opacity: 1; transform: none; }
.mega__card { display: flex; flex-direction: column; gap: 16px; }
.mega__card-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bone); }
.mega__card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.mega__card:hover .mega__card-media img { transform: scale(1.05); }
.mega__card-meta { display: grid; gap: 6px; }
.mega__card-meta .mono { color: var(--stone); }
.mega__card-title { font-family: var(--f-display); font-weight: var(--fw-display-sm); font-size: 1.75rem; line-height: 1.05; }
.mega__card-title em { color: var(--laterite); }
.mega__card .link-arrow { color: var(--laterite-ink); justify-self: start; }

.mega-scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--veil-dark);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0s linear 0.6s;
}
.mega-scrim.is-visible { opacity: 1; visibility: visible; transition: opacity 0.6s var(--ease), visibility 0s; }

/* 06. Mobile menu overlay ------------------------------------------------- */
.mnav {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  background: var(--basalt);
  color: var(--limestone);
  overflow-y: auto;
  overscroll-behavior: contain;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.8s var(--ease-in-out), visibility 0s linear 0.8s;
}
.mnav.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path 0.9s var(--ease-in-out), visibility 0s; }
.mnav__top { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-h); flex: none; }
.mnav__close {
  display: inline-flex; align-items: center; gap: 12px; min-height: 44px;
  font-family: var(--f-mono); font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--ls-label); text-transform: uppercase;
}
.mnav__x { position: relative; width: 18px; height: 18px; }
.mnav__x::before, .mnav__x::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: currentColor; transform: rotate(45deg); }
.mnav__x::after { transform: rotate(-45deg); }
.mnav__body { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding-top: 3vh; padding-bottom: 32px; }
.mnav__item { border-bottom: 1px solid var(--line-dark); }
.mnav__mask { display: block; overflow: hidden; }
.mnav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 0;
  font-family: var(--f-display);
  font-weight: var(--fw-display);
  font-size: clamp(2.4rem, 10vw, 4rem);
  line-height: 1.08;
  text-align: left;
  transform: translateY(105%);
  transition: transform 0.6s var(--ease);
}
.mnav.is-open .mnav__link { transform: none; transition: transform 1s var(--ease); }
.mnav.is-open .mnav__item:nth-child(1) .mnav__link { transition-delay: 0.32s; }
.mnav.is-open .mnav__item:nth-child(2) .mnav__link { transition-delay: 0.37s; }
.mnav.is-open .mnav__item:nth-child(3) .mnav__link { transition-delay: 0.42s; }
.mnav.is-open .mnav__item:nth-child(4) .mnav__link { transition-delay: 0.47s; }
.mnav.is-open .mnav__item:nth-child(5) .mnav__link { transition-delay: 0.52s; }
.mnav.is-open .mnav__item:nth-child(6) .mnav__link { transition-delay: 0.57s; }
.mnav.is-open .mnav__item:nth-child(7) .mnav__link { transition-delay: 0.62s; }
.mnav__plus { position: relative; width: 18px; height: 18px; flex: none; }
.mnav__plus::before, .mnav__plus::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: var(--laterite); transition: transform 0.5s var(--ease); }
.mnav__plus::after { transform: rotate(90deg); }
.mnav__acc[aria-expanded="true"] .mnav__plus::after { transform: rotate(0deg); }
.mnav__sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.7s var(--ease); }
.mnav__sub.is-open { grid-template-rows: 1fr; }
.mnav__sub-inner { min-height: 0; overflow: hidden; }
.mnav__sub:not(.is-open) .mnav__sub-inner { visibility: hidden; transition: visibility 0s linear 0.7s; }
.mnav__sub-h { color: var(--laterite-light); margin: 18px 0 8px; }
.mnav__sub ul { display: grid; gap: 2px; }
.mnav__sub a { display: block; padding: 7px 0; color: var(--mist); font-size: 1rem; }
.mnav__sub a:hover { color: var(--limestone); }
.mnav__sub-inner > :last-child { margin-bottom: 18px; }
.mnav__foot { display: grid; gap: 22px; grid-template-columns: 1fr; color: var(--mist); font-size: 0.95rem; opacity: 0; transition: opacity 0.4s; }
.mnav.is-open .mnav__foot { opacity: 1; transition: opacity 0.8s var(--ease) 0.7s; }
.mnav__foot a { color: var(--limestone); }
.mnav__label { color: var(--mist); margin-bottom: 8px; }
@media (min-width: 600px) { .mnav__foot { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .mnav { display: none; } }

/* 07. Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  isolation: isolate;
  background: var(--basalt);
  color: var(--limestone);
}
.hero__media { position: absolute; inset: 0; z-index: -3; overflow: hidden; }
.hero__media-inner { position: absolute; inset: -3%; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--basalt) 62%, transparent) 0%,
      color-mix(in srgb, var(--basalt) 0%, transparent) 26%,
      color-mix(in srgb, var(--basalt) 18%, transparent) 50%,
      color-mix(in srgb, var(--basalt) 86%, transparent) 100%),
    linear-gradient(90deg,
      color-mix(in srgb, var(--basalt) 45%, transparent) 0%,
      color-mix(in srgb, var(--basalt) 0%, transparent) 60%);
}
.hero__contours { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__contours svg { width: 100%; height: 100%; overflow: visible; }
.hero__contours path { fill: none; stroke: var(--limestone); stroke-width: 1; opacity: 0.22; }
.hero__contours path.is-index { stroke: var(--laterite); opacity: 0.75; stroke-width: 1.4; }

.hero__content {
  position: absolute;
  left: 0; right: 0;
  bottom: clamp(84px, 13vh, 150px);
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  margin-inline: auto;
}
.hero__eyebrow { margin-bottom: clamp(14px, 2.6vh, 32px); max-width: 32ch; color: color-mix(in srgb, var(--limestone) 88%, transparent); }
.hero__title {
  font-family: var(--f-display);
  font-weight: var(--fw-display);
  font-size: var(--fs-hero);
  line-height: 0.92;
  letter-spacing: -0.015em;
}
.hero__title .line { display: block; overflow: hidden; padding: 0.08em 0.08em 0.16em 0; margin: -0.08em -0.08em -0.16em 0; }
.hero__title .line__i { display: inline-block; }
.hero__title .line--indent { padding-left: 0.55em; }
.hero__aside { margin-top: clamp(20px, 3.4vh, 36px); max-width: 30rem; }
.hero__sub { font-size: clamp(0.98rem, 0.9rem + 0.3vw, 1.15rem); line-height: 1.55; color: color-mix(in srgb, var(--limestone) 90%, transparent); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(20px, 3vh, 32px); }

.hero__meta {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: clamp(52px, 7vh, 72px);
  color: color-mix(in srgb, var(--limestone) 82%, transparent);
}
.hero__rule {
  position: absolute;
  top: 0;
  left: var(--gutter);
  right: var(--gutter);
  height: 1px;
  background: var(--line-dark-strong);
  transform-origin: left;
}
.hero__plot { display: none; }
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; }
.scroll-cue__line { position: relative; width: 1px; height: 26px; overflow: hidden; background: var(--line-dark); }
.scroll-cue__line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--laterite);
  transform: translateY(-100%);
}
.motion .scroll-cue__line::after { animation: cue 2.2s var(--ease-in-out) infinite; }
@keyframes cue {
  0% { transform: translateY(-100%); }
  50% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

@media (min-width: 768px) {
  .hero__plot { display: block; }
}
@media (min-width: 1024px) {
  .hero__content {
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--col-gap);
  }
  .hero__eyebrow { grid-column: 1 / -1; max-width: none; }
  .hero__title { grid-column: 1 / span 8; }
  .hero__title .line--indent { padding-left: 0.9em; }
  .hero__aside { grid-column: 9 / -1; margin-top: 0; padding-bottom: 0.6em; }
}

/* Intro-hidden states (only when motion is on and JS will reveal them) */
.motion .hero__content,
.motion .hero__meta,
.motion .site-header { visibility: hidden; }

/* 08. Manifesto & stats ---------------------------------------------------- */
.manifesto { padding-bottom: clamp(64px, 8vw, 128px); }
.manifesto__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px var(--col-gap);
}
.manifesto__coord { color: var(--stone); display: none; }
.manifesto__statement {
  font-family: var(--f-display);
  font-weight: var(--fw-display);
  font-size: var(--fs-statement);
  line-height: 1.04;
  letter-spacing: -0.008em;
  text-wrap: pretty;
}
.manifesto__statement .sw { transition: none; }
.manifesto__body { display: grid; gap: 24px; justify-items: start; margin-top: clamp(24px, 4vw, 64px); max-width: 40rem; color: color-mix(in srgb, var(--basalt) 86%, transparent); }

@media (min-width: 1024px) {
  .manifesto__grid { grid-template-columns: repeat(12, 1fr); }
  .manifesto__side { grid-column: 1 / span 3; display: grid; align-content: start; gap: 8px; padding-top: 0.9em; }
  .manifesto__coord { display: block; }
  .manifesto__statement { grid-column: 4 / -1; }
  .manifesto__body { grid-column: 7 / span 5; }
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: clamp(80px, 11vw, 176px);
  border-top: 1px solid var(--basalt);
}
.stat {
  position: relative;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 22px clamp(12px, 2vw, 32px) 28px;
  border-left: 1px solid var(--line-light);
}
.stat:nth-child(odd) { border-left: 0; padding-left: 0; }
.stat:nth-child(n+3) { border-top: 1px solid var(--line-light); }
.stat__tag { color: var(--stone); }
.stat__num {
  font-family: var(--f-display);
  font-weight: var(--fw-display);
  font-size: clamp(4.6rem, 9.9vw, 9.9rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums lining-nums;
}
.stat__plus { color: var(--laterite); }
.stat__label { font-size: var(--fs-small); color: var(--stone); max-width: 26ch; line-height: 1.5; }
@media (min-width: 900px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stat { border-left: 1px solid var(--line-light); padding-left: clamp(16px, 2vw, 32px); }
  .stat:nth-child(odd) { border-left: 1px solid var(--line-light); padding-left: clamp(16px, 2vw, 32px); }
  .stat:first-child { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 0; }
}

/* 09. Journey (Land → Built) ---------------------------------------------- */
.journey { padding-top: var(--section-y); position: relative; }
.journey__intro { margin-bottom: clamp(48px, 7vw, 112px); }
.journey__title { max-width: 14ch; }

/* Default (no JS, mobile, reduced motion): stacked stage cards */
.journey__stage { position: relative; padding-bottom: var(--section-y); }
.journey__counter, .journey__rail { display: none; }
.journey__list { display: grid; gap: clamp(72px, 10vw, 160px); }
.stage { display: grid; grid-template-columns: 1fr; gap: 28px; }
.stage__media { margin: 0; }
.stage__frame { display: block; position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--basalt-2); }
.stage__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.stage[data-stage="0"] .stage__frame img { object-position: 50% 70%; }
.stage__cap { margin-top: 12px; color: var(--mist); }
.stage__text { display: grid; gap: 16px; align-content: end; }
.stage__num { color: var(--laterite-light); }
.stage__title { font-family: var(--f-display); font-weight: var(--fw-display); font-size: clamp(3.3rem, 7.1vw, 6.6rem); line-height: 0.95; letter-spacing: -0.012em; }
.stage__lead { font-family: var(--f-display); font-weight: var(--fw-display); font-style: italic; font-size: clamp(1.6rem, 2.45vw, 2.45rem); line-height: 1.12; color: var(--limestone); max-width: 22ch; }
.stage__copy { color: var(--mist); max-width: 40ch; }
.mk { display: block; overflow: hidden; padding: 0.1em 0.06em 0.18em 0; margin: -0.1em -0.06em -0.18em 0; }
.mk__i { display: block; }

@media (min-width: 768px) {
  .stage { grid-template-columns: repeat(12, 1fr); gap: var(--col-gap); align-items: end; }
  .stage__media { grid-column: 1 / span 6; }
  .stage__text { grid-column: 8 / -1; }
  .stage:nth-child(even) .stage__media { grid-column: 7 / -1; order: 2; }
  .stage:nth-child(even) .stage__text { grid-column: 1 / span 5; }
}

/* Pinned mode (desktop + motion; class set by JS) */
.journey--pinned .journey__stage {
  /* inner edge that matches .wrap at any width */
  --edge: max(var(--gutter), calc((100% - var(--max)) / 2 + var(--gutter)));
  height: 100vh; padding: 0; overflow: hidden;
}
.journey--pinned .journey__list { display: block; position: static; }
.journey--pinned .stage { display: block; }
.journey--pinned .stage__media {
  position: absolute;
  top: 9vh;
  bottom: 17vh;
  right: var(--edge);
  width: min(46vw, 820px);
}
.journey--pinned .stage__frame { height: 100%; aspect-ratio: auto; }
.journey--pinned .stage__cap {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  margin: 0;
  padding: 40px 18px 14px;
  color: var(--limestone);
  background: linear-gradient(0deg, color-mix(in srgb, var(--basalt) 70%, transparent), transparent);
}
.journey--pinned .stage:nth-child(1) .stage__media { z-index: 1; }
.journey--pinned .stage:nth-child(2) .stage__media { z-index: 2; }
.journey--pinned .stage:nth-child(3) .stage__media { z-index: 3; }
.journey--pinned .stage:nth-child(4) .stage__media { z-index: 4; }
.journey--pinned .stage:nth-child(5) .stage__media { z-index: 5; }
.journey--pinned .stage__text {
  position: absolute;
  left: var(--edge);
  top: calc(9vh + min(14vw, 25vh) * 0.86 + 5vh);
  width: min(38vw, 600px);
  pointer-events: none;
}
.journey--pinned .stage.is-active .stage__text { pointer-events: auto; }
.journey--pinned .stage__num { display: none; }
/* Stage text swap: waiting below → active → exited above (direction-aware via .is-past) */
.journey--pinned .mk__i {
  transform: translateY(115%);
  transition: transform 0.55s cubic-bezier(0.7, 0, 0.84, 0);
  will-change: transform;
}
.journey--pinned .stage.is-past .mk__i { transform: translateY(-115%); }
.journey--pinned .stage.is-active .mk__i {
  transform: translateY(0);
  transition: transform 1.15s var(--ease) 0.3s;
}
.journey--pinned .stage.is-active .stage__lead .mk__i { transition-delay: 0.37s; }
.journey--pinned .stage.is-active .stage__copy .mk__i { transition-delay: 0.44s; }
.journey--pinned .stage.is-active .tags .mk__i { transition-delay: 0.51s; }
.journey--pinned .stage__title { font-size: clamp(3.3rem, 5.5vw, 6rem); }
.journey--pinned .journey__counter {
  position: absolute;
  left: var(--edge);
  top: 9vh;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-family: var(--f-display);
  font-weight: var(--fw-display);
  font-size: min(14vw, 25vh);
  line-height: 0.82;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--limestone);
}
.journey__total { padding-top: 0.6em; color: var(--mist); letter-spacing: var(--ls-label); font-size: var(--fs-label); }
.roll { display: inline-block; height: 1em; overflow: hidden; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.roll__col { display: flex; flex-direction: column; transition: transform 1s var(--ease); will-change: transform; }
.roll__col > span { display: block; height: 1em; line-height: 1; }
.journey--pinned .roll { height: 0.84em; }
.journey--pinned .roll__col > span { height: 0.84em; line-height: 0.84; }

.journey--pinned .journey__rail {
  display: block;
  position: absolute;
  left: 0; right: 0;
  bottom: 7vh;
}
.rail { position: relative; height: 1px; }
.rail__track { position: absolute; inset: 0; background: var(--line-dark-strong); }
.rail__fill { position: absolute; inset: 0; background: var(--laterite); transform: scaleX(0); transform-origin: left; }
.rail__tick { position: absolute; top: 0; left: calc(var(--p) * 100%); }
.rail__tick i {
  position: absolute;
  left: -4px; top: -4px;
  width: 9px; height: 9px;
  background: var(--basalt);
  border: 1px solid var(--line-dark-strong);
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease);
}
.rail__tick b {
  position: absolute;
  top: 16px;
  left: 0;
  white-space: nowrap;
  font-weight: 500;
  color: var(--mist);
  transition: color 0.5s var(--ease);
}
.rail__tick b { transform: translateX(-50%); }
.rail__tick:nth-child(3) b { transform: none; }
.rail__tick:last-child b { left: auto; right: 0; transform: none; }
.rail__tick.is-on i { background: var(--laterite); border-color: var(--laterite); }
.rail__tick.is-on b { color: var(--limestone); }

/* 10. Marquee ------------------------------------------------------------ */
.marquee {
  overflow: hidden;
  padding-block: clamp(36px, 5vw, 80px);
  border-bottom: 1px solid var(--line-light);
  background: var(--limestone);
  user-select: none;
}
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__set { display: flex; align-items: center; flex: none; }
.marquee__word {
  font-family: var(--f-display);
  font-weight: var(--fw-display);
  font-size: clamp(4.8rem, 13.6vw, 15.4rem);
  line-height: 1;
  letter-spacing: -0.01em;
  padding-inline: 0.22em;
  white-space: nowrap;
}
.marquee__word--outline { color: transparent; -webkit-text-stroke: 1px var(--basalt); }
.marquee__word em { color: var(--laterite); }
.marquee__dot { width: clamp(10px, 1.1vw, 18px); height: clamp(10px, 1.1vw, 18px); border-radius: 50%; background: var(--laterite); flex: none; }

/* 11. Services index ---------------------------------------------------- */
.services { position: relative; }
.services__head .h2 { max-width: 13ch; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-light-strong);
  border-radius: 2px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  color: var(--basalt);
  transition: background-color var(--dur-ui) var(--ease), color var(--dur-ui) var(--ease), border-color var(--dur-ui) var(--ease);
}
.chip:hover { border-color: var(--basalt); }
.chip.is-active { background: var(--basalt); color: var(--limestone); border-color: var(--basalt); }
.chip__n { font-size: 0.64rem; font-weight: 600; letter-spacing: 0.08em; opacity: 0.75; font-variant-numeric: tabular-nums; }

.svc-list { border-top: 1px solid var(--basalt); }
.svc {
  display: grid;
  grid-template-rows: 1fr;
  border-bottom: 1px solid var(--line-light);
  transition: grid-template-rows 0.8s var(--ease), opacity 0.5s var(--ease), border-color 0.5s var(--ease);
  transition-delay: var(--d, 0s);
}
.svc.is-filtered { grid-template-rows: 0fr; opacity: 0; border-bottom-color: transparent; }
.svc__inner { min-height: 0; overflow: hidden; }
.svc__h { font: inherit; }
.svc__head {
  position: relative;
  display: grid;
  grid-template-columns: 2.6rem 1fr 28px;
  align-items: center;
  gap: 4px 14px;
  width: 100%;
  padding: clamp(20px, 2.3vw, 34px) 0;
  text-align: left;
}
.svc__num { color: var(--stone); transition: color 0.4s var(--ease); align-self: start; padding-top: 0.6em; }
.svc__name {
  font-family: var(--f-display);
  font-weight: var(--fw-display);
  font-size: clamp(1.75rem, 3.4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.005em;
  transition: transform 0.7s var(--ease), color 0.4s var(--ease);
}
.svc__pillar { grid-column: 2; grid-row: 2; color: var(--stone); font-size: 0.64rem; font-weight: 600; }
.svc__icon { grid-column: 3; grid-row: 1 / span 2; position: relative; width: 22px; height: 22px; justify-self: end; }
.svc__icon::before, .svc__icon::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.6s var(--ease), background-color 0.4s;
}
.svc__icon::after { transform: rotate(90deg); }
.svc.is-open .svc__icon::after { transform: rotate(0deg); }
.svc.is-open .svc__icon::before, .svc.is-open .svc__icon::after { background: var(--laterite); }
.svc.is-open .svc__num { color: var(--laterite-ink); }
@media (hover: hover) {
  .svc__head:hover .svc__name { transform: translateX(clamp(10px, 1.4vw, 22px)); color: var(--laterite-ink); }
  .svc__head:hover .svc__num { color: var(--laterite-ink); }
}

.svc__panel { display: grid; grid-template-rows: 1fr; }
.js .svc__panel { grid-template-rows: 0fr; transition: grid-template-rows 0.85s var(--ease); }
.js .svc.is-open .svc__panel { grid-template-rows: 1fr; }
.svc__panel-inner { min-height: 0; overflow: hidden; }
.js .svc:not(.is-open) .svc__panel-inner { visibility: hidden; transition: visibility 0s linear 0.85s; }
.svc__panel-inner > * { padding-left: calc(2.6rem + 14px); }
.js .svc__panel-inner > * { opacity: 0; transform: translateY(14px); transition: opacity 0.35s var(--ease), transform 0.5s var(--ease); }
.js .svc.is-open .svc__panel-inner > * { opacity: 1; transform: none; transition: opacity 0.8s var(--ease) 0.15s, transform 0.9s var(--ease) 0.15s; }
.svc__cols { display: grid; gap: 20px; max-width: 64rem; }
.svc__cols p:not(.svc__label) { color: color-mix(in srgb, var(--basalt) 84%, transparent); }
.svc__label { color: var(--laterite-ink); margin-bottom: 8px; }
.svc__panel-inner .link-arrow { margin: 24px 0 clamp(28px, 3vw, 40px); }

@media (min-width: 768px) {
  .svc__head { grid-template-columns: 4.5rem 1fr minmax(9rem, auto) 28px; gap: 24px; }
  .svc__num { padding-top: 0; align-self: center; }
  .svc__pillar { grid-column: 3; grid-row: 1; font-size: 0.66rem; text-align: right; white-space: nowrap; }
  .svc__icon { grid-column: 4; grid-row: 1; }
  .svc__panel-inner > * { padding-left: calc(4.5rem + 24px); }
  .svc__cols { grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 72px); }
}

/* Cursor-follow preview */
.svc-preview {
  position: fixed;
  top: 0; left: 0;
  z-index: 60;
  width: clamp(240px, 22vw, 380px);
  aspect-ratio: 4 / 3;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}
.svc-preview__inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--bone);
  clip-path: inset(50% 50% 50% 50%);
  transition: clip-path 0.7s var(--ease);
}
.svc-preview.is-on .svc-preview__inner { clip-path: inset(0 0 0 0); }
.svc-preview img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  clip-path: inset(100% 0 0 0);
  transform: scale(1.15);
  transition: clip-path 0.7s var(--ease), transform 1.1s var(--ease);
}
.svc-preview img.is-active { clip-path: inset(0 0 0 0); transform: scale(1); z-index: 2; }
.svc-preview img.was-active { z-index: 1; clip-path: inset(0 0 0 0); transform: scale(1); }
.svc-preview__tag {
  position: absolute;
  left: 0; top: calc(100% + 10px);
  color: var(--basalt);
  background: var(--limestone);
  padding: 4px 8px;
}

/* 12. Typologies gallery ----------------------------------------------- */
.gallery { position: relative; padding-top: var(--section-y); background: var(--limestone); }
.gallery__pin { position: relative; }
.gallery__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(32px, 4.5vw, 64px); }
.gallery__head .h2 { max-width: 14ch; }
.gallery__counter { display: inline-flex; align-items: center; gap: 0.6em; font-size: 0.8rem; font-weight: 600; color: var(--stone); }
.gallery__counter .roll { color: var(--basalt); }
.gallery__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  padding-bottom: var(--section-y);
  -webkit-overflow-scrolling: touch;
}
.gallery__viewport::-webkit-scrollbar { display: none; }
.gallery__viewport:focus-visible { outline-offset: -3px; }
.gallery__track {
  display: flex;
  align-items: flex-start;
  gap: clamp(20px, 3.4vw, 64px);
  width: max-content;
  padding-inline: var(--gutter);
  position: relative;
}
.gpanel { flex: none; scroll-snap-align: start; scroll-margin-left: var(--gutter); }
.gpanel__link { display: inline-flex; flex-direction: column; gap: 16px; }
.gpanel__frame {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--bone);
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.9s var(--ease);
}
.gpanel__frame img { position: absolute; top: 0; left: -8%; width: 116%; height: 100%; max-width: none; object-fit: cover; }
.gpanel__link:hover .gpanel__frame, .gpanel__link:focus-visible .gpanel__frame { clip-path: inset(2.5% 2.5% 2.5% 2.5%); }
.gpanel__meta { display: grid; gap: 6px; min-width: 100%; width: 0; }
.gpanel__title { font-family: var(--f-display); font-weight: var(--fw-display-sm); font-size: clamp(1.85rem, 2.6vw, 2.75rem); line-height: 1.02; }
.gpanel__cap { font-size: var(--fs-small); color: var(--stone); line-height: 1.5; }
/* Mobile sizes */
.gpanel--portrait .gpanel__frame { width: 72vw; aspect-ratio: 3 / 4; }
.gpanel--landscape .gpanel__frame, .gpanel--wide .gpanel__frame { width: 84vw; aspect-ratio: 4 / 3; }
.gpanel--square .gpanel__frame { width: 78vw; aspect-ratio: 1; }
.gpanel--end { align-self: stretch; }
.gpanel__endcard {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  width: 72vw;
  aspect-ratio: 3 / 4;
  padding: clamp(20px, 2.4vw, 36px);
  background: var(--bone);
  overflow: hidden;
}
.gpanel__contours { position: absolute; inset: 0; width: 100%; height: 100%; }
.gpanel__contours path { fill: none; stroke: var(--laterite); stroke-width: 1; opacity: 0.35; }
.gpanel__endcard > :not(svg) { position: relative; }
.gpanel__endcard .mono { color: var(--stone); }
.gpanel__end-title { font-family: var(--f-display); font-weight: var(--fw-display-sm); font-size: clamp(2.2rem, 3.3vw, 3.5rem); line-height: 1; }
.gpanel__end-title em { color: var(--laterite-ink); }

@media (min-width: 768px) {
  .gpanel--portrait .gpanel__frame { width: 44vw; }
  .gpanel--landscape .gpanel__frame, .gpanel--wide .gpanel__frame { width: 62vw; aspect-ratio: 16 / 10; }
  .gpanel--square .gpanel__frame { width: 50vw; }
  .gpanel__endcard { width: 44vw; }
}
@media (min-width: 1024px) {
  .gallery { --gh: min(50vh, 37vw); }
  .gallery__head .h2 { max-width: none; }
  .gpanel--portrait .gpanel__frame { width: calc(var(--gh) * 0.75); height: var(--gh); aspect-ratio: auto; }
  .gpanel--landscape .gpanel__frame { height: calc(var(--gh) * 0.7); width: calc(var(--gh) * 0.7 * 1.6); aspect-ratio: auto; }
  .gpanel--wide .gpanel__frame { height: calc(var(--gh) * 0.84); width: calc(var(--gh) * 0.84 * 1.5); aspect-ratio: auto; }
  .gpanel--square .gpanel__frame { height: calc(var(--gh) * 0.86); width: calc(var(--gh) * 0.86); aspect-ratio: auto; }
  .gpanel--low { margin-top: calc(var(--gh) * 0.24); }
  .gpanel--mid { margin-top: calc(var(--gh) * 0.1); }
  .gpanel__endcard { width: calc(var(--gh) * 0.8); height: var(--gh); aspect-ratio: auto; }
  .gpanel--end { padding-right: 6vw; }
}
/* Pinned desktop mode */
.gallery--pinned { padding-top: 0; }
.gallery--pinned .gallery__pin {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--header-h) * 0.5);
}
.gallery--pinned .gallery__head { margin-bottom: clamp(24px, 4vh, 48px); }
.gallery--pinned .gallery__viewport { overflow: hidden; padding-bottom: 0; scroll-snap-type: none; }
.gallery--pinned .gallery__track { will-change: transform; }

/* 13. Workspace spotlight ----------------------------------------------- */
.workspace { background: var(--bone); overflow: hidden; }
.workspace__grid { display: grid; grid-template-columns: 1fr; gap: 56px var(--col-gap); align-items: center; }
.workspace__media { position: relative; padding-bottom: 18%; margin-right: 10%; }
.workspace__main, .workspace__second { margin: 0; }
.workspace__frame { display: block; position: relative; overflow: hidden; background: var(--limestone); }
.workspace__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.workspace__main .workspace__frame { aspect-ratio: 5 / 4; }
.workspace__second { position: absolute; right: -14%; bottom: 0; width: 44%; }
.workspace__second .workspace__frame { aspect-ratio: 4 / 5; border: clamp(6px, 0.8vw, 12px) solid var(--bone); }
.workspace__second figcaption { margin-top: 12px; color: var(--stone); font-size: 0.62rem; }
.workspace__text { display: grid; gap: 0; justify-items: start; }
.workspace__title { max-width: 13ch; margin-bottom: 28px; }
.workspace__copy { color: color-mix(in srgb, var(--basalt) 86%, transparent); max-width: 38rem; }
.benefits { width: 100%; margin: 36px 0 40px; border-top: 1px solid var(--line-light-strong); }
.benefit { display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: start; padding: 18px 0; border-bottom: 1px solid var(--line-light); }
.benefit__icon { width: 32px; height: 32px; color: var(--laterite-ink); }
.benefit__title { font-size: 0.95rem; font-weight: 600; line-height: 1.4; }
.benefit p { font-size: 0.925rem; color: var(--stone); }
@media (min-width: 1024px) {
  .workspace__grid { grid-template-columns: repeat(12, 1fr); }
  .workspace__media { grid-column: 1 / span 7; margin-right: 0; padding-bottom: 16%; }
  .workspace__text { grid-column: 9 / -1; }
  .workspace__second { right: -9%; width: 40%; }
}

/* 14. Who we serve ------------------------------------------------------- */
.audience .section-head { display: block; }
.audience .h2 { max-width: 15ch; }
.aud { position: relative; }
.aud__list { border-top: 1px solid var(--line-dark-strong); }
.aud__item { border-bottom: 1px solid var(--line-dark); }
.aud__h { font: inherit; }
.aud__btn {
  display: flex;
  align-items: baseline;
  gap: 18px;
  width: 100%;
  padding: clamp(14px, 1.5vw, 22px) 0;
  text-align: left;
  font-family: var(--f-display);
  font-weight: var(--fw-display);
  font-size: clamp(1.65rem, 2.75vw, 2.75rem);
  line-height: 1.08;
  color: var(--limestone);
  transition: color 0.5s var(--ease);
}
.aud__n { color: var(--mist); flex: none; min-width: 2.4em; transition: color 0.5s var(--ease); }
.aud__name { transition: transform 0.7s var(--ease); }
.aud__arrow { margin-left: auto; font-family: var(--f-text); font-size: 1.1rem; color: var(--laterite-light); opacity: 0; transform: translateX(-12px); transition: opacity 0.4s var(--ease), transform 0.6s var(--ease); }
.aud__item.is-active .aud__n { color: var(--laterite-light); }
.aud__item.is-active .aud__arrow { opacity: 1; transform: none; }
.aud__panel-inner { display: grid; gap: 14px; justify-items: start; padding-bottom: 24px; }
.aud__meta { color: var(--laterite-light); }
.aud__need { font-family: var(--f-display); font-weight: var(--fw-display); font-size: clamp(1.65rem, 3.3vw, 3.5rem); line-height: 1.06; max-width: 20ch; }
.aud__label { color: var(--mist); margin-top: 12px; }
.aud__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.aud__tags li {
  padding: 7px 12px;
  border: 1px solid var(--line-dark-strong);
  font-family: var(--f-mono);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--limestone);
}
.aud__stage { display: none; }

/* JS: accordion on small screens */
.js .aud__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.8s var(--ease); }
.js .aud__item.is-active .aud__panel { grid-template-rows: 1fr; }
.js .aud__panel-inner { min-height: 0; overflow: hidden; }
.js .aud__item:not(.is-active) .aud__panel-inner { visibility: hidden; transition: visibility 0s linear 0.5s; }
.js .aud__panel-inner > * { opacity: 0; transform: translateY(16px); transition: opacity 0.35s var(--ease), transform 0.5s var(--ease); }
.js .aud__item.is-active .aud__panel-inner > * { opacity: 1; transform: none; transition: opacity 0.8s var(--ease), transform 1s var(--ease); }
.js .aud__item.is-active .aud__panel-inner > :nth-child(2) { transition-delay: 0.06s; }
.js .aud__item.is-active .aud__panel-inner > :nth-child(3) { transition-delay: 0.12s; }
.js .aud__item.is-active .aud__panel-inner > :nth-child(4) { transition-delay: 0.16s; }

/* JS + desktop: list left, panel right (panels overlap in the right column) */
@media (min-width: 1024px) {
  .js .aud { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--col-gap); min-height: clamp(520px, 62vh, 680px); }
  .js .aud__list { grid-column: 1 / span 6; align-self: start; }
  .js .aud__btn { color: var(--dim-on-dark); }
  .js .aud__item.is-active .aud__btn, .js .aud__btn:hover, .js .aud__btn:focus-visible { color: var(--limestone); }
  .js .aud__item.is-active .aud__name { transform: translateX(14px); }
  .js .aud__stage { display: block; grid-column: 8 / -1; position: relative; overflow: hidden; border-left: 1px solid var(--line-dark); }
  .aud__contours { position: absolute; inset: 0; width: 100%; height: 100%; }
  .aud__contours path { fill: none; stroke: var(--limestone); opacity: 0.08; stroke-width: 1; }
  .aud__contours path.is-index { stroke: var(--laterite); opacity: 0.45; }
  .js .aud__panel {
    position: absolute;
    top: 0; bottom: 0;
    right: 0;
    width: calc((100% - 11 * var(--col-gap)) / 12 * 5 + 4 * var(--col-gap));
    display: flex;
    align-items: center;
    padding-left: clamp(28px, 3.4vw, 64px);
    pointer-events: none;
    z-index: 1;
  }
  .js .aud__item.is-active .aud__panel { pointer-events: auto; }
  .js .aud__panel-inner { overflow: visible; gap: 18px; padding-bottom: 0; }
}

/* 15. Principles --------------------------------------------------------- */
.why__head .h2 { max-width: 15ch; }
.principles { display: grid; grid-template-columns: 1fr; gap: 0 var(--col-gap); counter-reset: p; }
.principle { position: relative; padding: 28px 0 40px; }
.principle__rule { position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--basalt); transform-origin: left; transition: background-color 0.5s var(--ease); }
.principle__rule::after { content: ""; position: absolute; left: 0; top: -4px; width: 9px; height: 9px; background: var(--laterite); transform: scale(0); transition: transform 0.6s var(--ease); }
.principle:hover .principle__rule::after { transform: scale(1); }
.principle__n { color: var(--laterite-ink); }
.principle__title { font-family: var(--f-display); font-weight: var(--fw-display-sm); font-size: clamp(2.2rem, 3.1vw, 3.2rem); line-height: 1; margin: clamp(20px, 5vw, 64px) 0 14px; }
.principle p:last-child { color: var(--stone); max-width: 30ch; }
@media (min-width: 640px) { .principles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .principles { grid-template-columns: repeat(4, 1fr); } }

/* 16. Contact & form ----------------------------------------------------- */
.contact { position: relative; overflow: hidden; padding-block: var(--section-y); isolation: isolate; }
.contact__contours { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.contact__contours svg { width: 100%; height: 100%; }
.contact__contours path { fill: none; stroke: var(--laterite); stroke-width: 1; opacity: 0.28; }
.contact__contours path.is-index { opacity: 0.7; stroke-width: 1.4; }
.contact__title {
  font-family: var(--f-display);
  font-weight: var(--fw-display);
  font-size: clamp(2.75rem, 6.9vw, 7.9rem);
  line-height: 0.96;
  letter-spacing: -0.012em;
  max-width: 17ch;
}
.night .contact__title em { color: var(--laterite-light); }
.contact__grid { display: grid; grid-template-columns: 1fr; gap: 56px; margin-top: clamp(56px, 7vw, 112px); }
.contact__details { border-top: 1px solid var(--line-dark-strong); align-self: start; }
.cd { display: grid; grid-template-columns: 6.5rem 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-dark); }
.cd dt { color: var(--mist); padding-top: 0.25em; }
.cd dd { font-size: 0.95rem; line-height: 1.6; }
.cd a { background-image: linear-gradient(var(--laterite-light), var(--laterite-light)); background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size 0.6s var(--ease), color 0.3s; }
.cd a:hover, .cd a:focus-visible { background-size: 100% 1px; color: var(--limestone); }
@media (min-width: 1024px) {
  .contact__grid { grid-template-columns: repeat(12, 1fr); gap: var(--col-gap); }
  .contact__details { grid-column: 1 / span 4; }
  .contact__form-wrap { grid-column: 6 / -1; }
}

.contact__form-wrap { position: relative; }
.form {
  display: grid;
  gap: 8px;
  padding: clamp(24px, 3vw, 48px);
  background: color-mix(in srgb, var(--basalt-2) 92%, transparent);
  border: 1px solid var(--line-dark);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease), visibility 0s;
}
.form__h { color: var(--mist); margin-bottom: 8px; }
.form__row { display: grid; grid-template-columns: 1fr; gap: 8px var(--col-gap); }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { position: relative; padding-top: 22px; }
.field__input {
  display: block;
  width: 100%;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line-dark-strong);
  border-radius: 0;
  background: transparent;
  color: var(--limestone);
  font-size: 1.08rem;
  line-height: 1.4;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.field__input:focus-visible { outline: none; }
.field--area .field__input { resize: vertical; min-height: 116px; }
.field__label {
  position: absolute;
  left: 0;
  top: 33px;
  color: var(--mist);
  font-size: 1rem;
  transform-origin: left top;
  pointer-events: none;
  transition: transform 0.55s var(--ease), color 0.3s var(--ease);
}
.field__input:focus + .field__label,
.field__input:not(:placeholder-shown) + .field__label,
.field.has-value .field__label {
  transform: translateY(-27px) scale(0.78);
}
.field__input:focus + .field__label { color: var(--laterite-light); }
.field__line {
  display: block;
  height: 1px;
  margin-top: -1px;
  background: var(--laterite-light);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease);
}
.field__input:focus ~ .field__line { transform: scaleX(1); }
.field.is-invalid .field__line { transform: scaleX(1); }
.field.is-invalid .field__label { color: var(--laterite-light); }
.field__err { min-height: 1.4em; margin-top: 6px; font-size: 0.8rem; color: var(--laterite-light); }
.field--select select { cursor: pointer; padding-right: 28px; }
.field--select option { color: var(--basalt); background: var(--limestone); }
.field__chev { position: absolute; right: 2px; top: 38px; width: 12px; height: 12px; color: var(--mist); pointer-events: none; }
.field--area { margin-bottom: 8px; }
.field__input:-webkit-autofill { -webkit-text-fill-color: var(--limestone); box-shadow: 0 0 0 100px var(--basalt-2) inset; caret-color: var(--limestone); }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 16px; }
.form__note { font-size: var(--fs-small); color: var(--mist); }
.form__note a { color: var(--limestone); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--laterite-light); }

.form-success {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  padding: clamp(24px, 3vw, 48px);
  border: 1px solid var(--line-dark);
  background: var(--basalt-2);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.6s var(--ease), visibility 0s linear 0.6s;
}
.form-success:focus { outline: none; }
.form-success__mark { width: 96px; height: 96px; }
.form-success__mark circle, .form-success__mark path { fill: none; stroke-dasharray: 1; stroke-dashoffset: 1; }
.form-success__mark circle:nth-child(1) { stroke: var(--line-dark-strong); stroke-width: 1; }
.form-success__mark circle:nth-child(2) { stroke: var(--laterite); stroke-width: 1; }
.form-success__mark path { stroke: var(--limestone); stroke-width: 2; }
.form-success__title { font-family: var(--f-display); font-weight: var(--fw-display); font-size: clamp(2rem, 3.3vw, 3.1rem); line-height: 1.04; max-width: 18ch; }
.form-success__again { color: var(--laterite-light); }
.contact__form-wrap.is-sent .form { opacity: 0; transform: translateY(-14px); visibility: hidden; transition: opacity 0.5s var(--ease), transform 0.7s var(--ease), visibility 0s linear 0.5s; }
.contact__form-wrap.is-sent .form-success { visibility: visible; opacity: 1; transition: opacity 0.8s var(--ease) 0.25s, visibility 0s; }
.contact__form-wrap.is-sent .form-success__mark circle,
.contact__form-wrap.is-sent .form-success__mark path { stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s var(--ease); }
.contact__form-wrap.is-sent .form-success__mark circle:nth-child(1) { transition-delay: 0.3s; }
.contact__form-wrap.is-sent .form-success__mark circle:nth-child(2) { transition-delay: 0.45s; }
.contact__form-wrap.is-sent .form-success__mark path { transition-delay: 0.75s; transition-duration: 0.9s; }

/* 17. Footer -------------------------------------------------------------- */
.footer { position: relative; padding-top: clamp(72px, 9vw, 140px); border-top: 1px solid var(--line-dark); overflow: hidden; }
.footer__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px var(--col-gap); }
.footer__intro { grid-column: 1 / -1; }
.footer__tagline { font-family: var(--f-display); font-weight: var(--fw-display-sm); font-size: clamp(2.2rem, 3.7vw, 3.7rem); line-height: 1; }
.footer__tagline em { color: var(--laterite-light); }
.footer__small { color: var(--mist); font-size: var(--fs-small); margin-top: 12px; }
.footer__label { color: var(--mist); margin-bottom: 16px; }
.footer__col ul { display: grid; gap: 8px; }
.footer__col a { position: relative; color: var(--limestone); font-size: 0.95rem; transition: color 0.3s; }
.footer__col a:hover, .footer__col a:focus-visible { color: var(--laterite-light); }
.footer__addr { color: var(--mist); font-size: 0.9rem; max-width: 26ch; line-height: 1.5; }
@media (min-width: 900px) {
  .footer__cols { grid-template-columns: 2.2fr 1fr 1fr 1.4fr 1fr; }
  .footer__intro { grid-column: auto; }
}
.footer__mark { overflow: hidden; padding-top: clamp(56px, 8vw, 128px); }
.fw {
  display: flex;
  justify-content: space-between;
  padding-inline: var(--gutter);
  max-width: var(--max);
  margin-inline: auto;
  font-family: var(--f-text);
  font-weight: 600;
  font-size: clamp(2.3rem, 11.4vw, 14.4rem);
  line-height: 0.8;
  letter-spacing: -0.01em;
  color: var(--limestone);
  overflow: hidden;
  padding-top: 0.04em;
}
.fw span { display: inline-block; }
.fw span:nth-child(5) { color: var(--laterite); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  margin-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid var(--line-dark);
  font-size: 0.82rem;
  color: var(--mist);
}
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer__legal a:hover, .footer__legal a:focus-visible { color: var(--limestone); }
.to-top { color: var(--limestone); }

/* 18. WhatsApp button --------------------------------------------------- */
.wa-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 75;
  display: inline-flex;
  align-items: center;
  gap: 0;
  height: 56px;
  min-width: 56px;
  padding: 0 16px;
  border-radius: 28px;
  background: var(--basalt);
  color: var(--limestone);
  border: 1px solid var(--line-dark-strong);
  box-shadow: 0 10px 30px -12px color-mix(in srgb, var(--basalt) 60%, transparent);
  transition: opacity 0.6s var(--ease), transform 0.8s var(--ease), visibility 0s, background-color 0.4s var(--ease), gap 0.6s var(--ease);
}
.wa-fab svg { width: 24px; height: 24px; flex: none; }
.wa-fab__label { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width 0.6s var(--ease); }
.wa-fab:hover, .wa-fab:focus-visible { background: var(--laterite); gap: 10px; }
.wa-fab:hover .wa-fab__label, .wa-fab:focus-visible .wa-fab__label { max-width: 8rem; }
.js .wa-fab:not(.is-visible) { opacity: 0; transform: translateY(20px) scale(0.92); visibility: hidden; transition: opacity 0.4s var(--ease), transform 0.6s var(--ease), visibility 0s linear 0.6s; }

/* 19. Custom cursor (fine pointer only; class set by JS) ---------------- */
.cursor { display: none; }
.has-cursor .cursor { display: block; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor [data-cursor] { cursor: none; }
.has-cursor input, .has-cursor textarea, .has-cursor select { cursor: auto; }
.cursor__dot, .cursor__ring {
  position: fixed;
  top: 0; left: 0;
  z-index: 700;
  pointer-events: none;
  will-change: transform;
}
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--laterite); transition: opacity 0.3s; }
.cursor__ring { width: 40px; height: 40px; margin: -20px 0 0 -20px; display: grid; place-items: center; }
.cursor__ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--laterite);
  transition: transform 0.6s var(--ease), background-color 0.4s var(--ease), border-color 0.4s var(--ease), opacity 0.3s;
}
.cursor__label { position: relative; color: var(--on-laterite); font-size: 0.6rem; opacity: 0; transform: scale(0.6); transition: opacity 0.3s var(--ease), transform 0.5s var(--ease); }
.cursor.is-link .cursor__ring::before { transform: scale(1.6); background: color-mix(in srgb, var(--laterite) 14%, transparent); }
.cursor.is-view .cursor__ring::before { transform: scale(2.2); background: var(--laterite); border-color: var(--laterite); }
.cursor.is-view .cursor__label { opacity: 1; transform: scale(1); }
.cursor.is-view .cursor__dot { opacity: 0; }
.cursor.is-hidden .cursor__ring::before, .cursor.is-hidden .cursor__dot { opacity: 0; }

/* 20. Lenis ----------------------------------------------------------- */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* 21. Reduced motion ------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.2s !important;
    transition-delay: 0s !important;
  }
  .btn:hover .btn__label-i { transform: none !important; }
  .gpanel__frame img { left: 0; width: 100%; }
}
