/* ==========================================================================
   Treasure Island Construction
   Structure & motion system matched to bloom3d.studio's measured build.
   Values below (palette, type, gaps, containers, carousel geometry, easing)
   were read from the live stylesheet, its inline <style> blocks and
   getBoundingClientRect() probes against the running page — not eyeballed.
   See REFERENCE.md for what was measured where.
   ========================================================================== */

/* --------------------------------------------------------------- 1. TOKENS */
:root {
  --black:      #121212;
  --pure:       #000000;
  --white:      #ffffff;
  /* #f7f7f7 is the reference's page colour, but the reference leaves almost
     every section transparent so the whole page is that one tone. This build
     had several sections set to #fff and the rest to #f7f7f7, which banded —
     most visibly across the "View all projects" strip. --page is now the single
     light surface for every section; --off survives only as an accent (the
     accordion number chip and its hairline track), where it has to read AGAINST
     white rather than alongside it. Don't use --off as a section background. */
  --page:       #ffffff;
  --off:        #f7f7f7;
  --ink:        #2e2e2e;
  --grey-1:     #595959;
  --grey-2:     #767676;
  --grey-3:     #222222;
  --grey-4:     #898989;
  --line:       #efefef;
  --line-2:     #e7e7e7;
  --panel:      #2a2a2a;

  --gutter:     0.25rem;
  --pad-x:      5rem;          /* .u-container inset — reference value */
  --sec-pad:    8rem;

  /* the signature curve: CustomEase "M0,0 C0.3,0 0.09,1 1,1" */
  --ease-hero:  cubic-bezier(0.3, 0, 0.09, 1);
  --ease:       cubic-bezier(0.23, 1, 0.32, 1);
  --dur:        0.4s;

  --mobile-100vh: calc(var(--vh, 1vh) * 100);
}

/* 1921px+ bumps the root — Bloom scales the whole page up on large displays */
@media screen and (min-width: 1921px) { html { font-size: 22px; } }

/* ----------------------------------------------------------- 2. FOUNDATION */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Helvetica Now Display", "Helvetica Now", "Inter Tight",
               "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 140%;
  letter-spacing: 0.009375rem;
  color: var(--ink);
  background-color: var(--page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding-left: 0; list-style: none; }
p  { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, h4 {
  margin: 0; font-weight: 400; line-height: 120%;
  letter-spacing: -0.012em; color: var(--black);
}

/* ScrollSmoother rig. Deliberately NO horizontal padding here — every section
   runs edge to edge so its background is seamless; the inset comes from the
   container each section wraps its content in. */
#smooth-content { width: 100%; overflow-x: clip; }

/* --------------------------------------------------------- 2b. CONTAINERS */
/* Measured live at 1500px: .u-container-wide renders 1500 wide with 4px of
   padding either side and a 1920px cap; the portfolio grid inside it is
   1492px. The site is essentially full-bleed with a .25rem seam. */
.u-container-wide {
  width: 100%; max-width: 120rem; margin-left: auto; margin-right: auto;
  padding-left: var(--gutter); padding-right: var(--gutter);
}
.u-container {
  width: 100%; max-width: 120rem; margin-left: auto; margin-right: auto;
  padding-left: var(--pad-x); padding-right: var(--pad-x);
}
/* legacy helper still used by the hero, which breaks out to 100vw */
.u-pad { padding-left: var(--pad-x); padding-right: var(--pad-x); }

/* ---------------------------------------------------------- 3. TYPE SCALE */
.u-display { font-size: clamp(2.75rem, 6.2vw, 6rem); line-height: 105%; letter-spacing: -0.025em; }
.u-h1      { font-size: 4rem;   line-height: 110%; letter-spacing: -0.09375rem; }
.u-h2      { font-size: 3rem;   line-height: 120%; letter-spacing: -0.03125rem; }
.u-h3      { font-size: 2rem;   line-height: 120%; letter-spacing: -0.015em; }
.u-h4      { font-size: 1.5rem; line-height: 120%; }
.u-h5      { font-size: 1.25rem; line-height: 120%; font-weight: 400; letter-spacing: 0.009375em; }

.u-sub-xl, .u-subheading-xl { font-size: 1.25rem;  line-height: 140%; letter-spacing: 0.009375rem; }
.u-sub-l,  .u-subheading-l  { font-size: 1.125rem; line-height: 140%; letter-spacing: 0.009375rem; }
.u-sub-m,  .u-subheading-m  { font-size: 1rem;     line-height: 140%; letter-spacing: 0.009375rem; }
.u-sub                      { font-size: 0.875rem; line-height: 140%; letter-spacing: 0.015625em; font-weight: 500; }

.u-eyebrow {
  font-size: 0.875rem; font-weight: 500; line-height: 140%;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey-2);
}
.u-medium { font-weight: 500; }

/* the growing hairline under nav / footer links */
.u-underline {
  position: absolute; inset: auto auto 0 0;
  width: 0%; height: 1px; background-color: var(--grey-3);
  transition: width 0.5s var(--ease);
}
.u-underline.white { background-color: var(--white); }
.u-underline.black { background-color: var(--pure); }
li:hover > .u-underline,
.navbar_nav_item:hover > .u-underline,
a:hover + .u-underline,
a:hover > .u-underline { width: 100%; }

/* ------------------------------------------------------------ 4. PRELOADER */
/* Home: a zero-width slit down the middle that GSAP opens in two steps.
   Every other page ships `.is-plain` — no clip-path, no lockup, just the
   fade in / fade out that masks a real navigation. */
.u-preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--white);
  clip-path: polygon(
    0% 0%, 0% 100%,
    calc(50% - 0.01px) 100%, calc(50% - 0.01px) calc(50% - 0.01px),
    calc(50% + 0.01px) calc(50% - 0.01px), calc(50% + 0.01px) calc(50% + 0.01px),
    calc(50% - 0.01px) calc(50% + 0.01px), calc(50% - 0.01px) 100%,
    100% 100%, 100% 0%
  );
}
.u-preloader.is-plain { clip-path: none; }
.preloader_logo {
  position: absolute; top: 50%; left: 50%; z-index: 1;
  width: 40rem; max-width: 80vw; opacity: 0; transform: translate(-50%, -50%);
}
.preloader_content {
  position: relative; z-index: 2;
  display: flex; flex-flow: column; align-items: center; justify-content: center;
  gap: 1rem; opacity: 0;
}
.preloader_content_logo { width: 13rem; }
.preloader_content_text { color: var(--grey-1); font-weight: 500; }
.preloader_num {
  position: absolute; top: calc(50% + 4.5rem); left: 50%; z-index: 3;
  opacity: 0; transform: translateX(-50%);
  font-weight: 500; font-variant-numeric: tabular-nums; color: var(--grey-1);
}

/* --------------------------------------------------------------- 5. NAVBAR */
.navbar { position: fixed; inset: 1rem 2rem auto; z-index: 777; pointer-events: none; }
.navbar_container {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; pointer-events: none;
}
.navbar_logo_wrapper {
  position: relative; z-index: 2;
  display: flex; align-items: center; overflow: hidden;
  color: var(--grey-3); pointer-events: auto;
  transition: color var(--dur) var(--ease);
}
.navbar.on_hero .navbar_logo_wrapper { color: var(--white); }
.navbar.active  .navbar_logo_wrapper { color: var(--grey-3); }
.navbar_logo_text {
  display: flex; font-size: 0.9375rem; font-weight: 500;
  letter-spacing: 0.02em; white-space: nowrap; overflow: hidden;
}
.navbar_logo_letter { display: inline-block; white-space: pre; }

/* bare icon button — no pill, no label */
.navbar_menu_btn {
  z-index: 2; display: flex; align-items: center; justify-content: center;
  padding: 1rem; color: var(--grey-3); pointer-events: auto;
  transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.navbar.on_hero .navbar_menu_btn { color: var(--white); }
.navbar.active  .navbar_menu_btn { color: var(--grey-3); }
.navbar_menu_btn:hover { opacity: 0.5; }
.navbar_menu_btn_icon {
  display: flex; flex-flow: column; align-items: center; justify-content: center;
  gap: 0.375rem; width: 1.5rem; height: 1.5rem;
}
.navbar_menu_btn_icon span {
  display: block; width: 100%; height: 1.5px; background-color: currentColor;
  transition: transform var(--dur) var(--ease);
}
.navbar.active .navbar_menu_btn_icon span:nth-child(1) { transform: translateY(3.75px) rotate(45deg); }
.navbar.active .navbar_menu_btn_icon span:nth-child(2) { transform: translateY(-3.75px) rotate(-45deg); }

.navbar_overlay {
  position: fixed; inset: 0; z-index: -1;
  background-color: var(--pure); opacity: 0; visibility: hidden; cursor: pointer;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.navbar.active .navbar_overlay { opacity: 0.4; visibility: visible; pointer-events: auto; }

/* right-hand drawer */
.navbar_nav_wrapper {
  position: fixed; inset: 0 0 0 auto; z-index: 1;
  height: 100dvh; text-align: left; pointer-events: auto;
  transform: translateX(101%);
  transition: transform 0.8s var(--ease-hero);
}
.navbar.active .navbar_nav_wrapper { transform: translateX(0); }
.navbar_nav_inner {
  display: flex; flex-flow: column; align-items: flex-start; justify-content: space-between;
  gap: 2rem; min-width: 30rem; height: 100dvh; padding: 3rem;
  background-color: var(--white); overflow: auto;
}
.navbar_nav { display: flex; flex-flow: column; width: 100%; }
.navbar_nav_item { position: relative; transition: opacity var(--dur) var(--ease); }
.navbar_nav_link {
  position: relative; display: inline-block; cursor: pointer;
  color: var(--ink); font-size: 2rem; line-height: 120%; letter-spacing: 0;
  text-decoration: none; transition: opacity var(--dur) var(--ease);
}
.navbar_nav_link:hover { opacity: 0.55; }
.navbar_nav_link.w--current { font-weight: 500; }

/* Services dropdown */
.navbar_nav_dd { position: relative; max-width: 100%; }
.navbar_nav_dd_btn {
  display: flex; align-items: center; justify-content: flex-start; gap: 0.5rem;
  padding: 0; color: var(--ink);
  font-size: 2rem; line-height: 120%; letter-spacing: 0;
  transition: opacity var(--dur) var(--ease);
}
.navbar_nav_dd.is-current .navbar_nav_dd_btn { font-weight: 500; }
.navbar_nav_dd_btn:hover { opacity: 0.55; }
.navbar_nav_dd_icon { width: 2rem; height: 2rem; flex: none; transition: transform var(--dur) var(--ease); }
.navbar_nav_dd.is-open .navbar_nav_dd_icon { transform: rotate(180deg); }
.navbar_nav_dd_list {
  position: absolute; z-index: 5; display: none;
  flex-flow: column; align-items: flex-start; justify-content: flex-start;
  padding: 1rem 1.25rem; background-color: var(--white);
  box-shadow: 0.25rem 0.5rem 4rem #0000001a, 0 1rem 1rem -0.5rem #00000005;
}
.navbar_nav_dd.is-open .navbar_nav_dd_list { display: flex; }
.navbar_nav_dd_link {
  position: relative; padding: 0.25rem 0;
  color: var(--ink); font-size: 1.25rem; line-height: 120%;
  letter-spacing: 0.009375rem; white-space: nowrap; text-decoration: none;
  transition: opacity var(--dur) var(--ease);
}
.navbar_nav_dd_link:hover { opacity: 0.55; }

/* drawer CTA block */
.navbar_cta { display: flex; flex-flow: column; gap: 2rem; }
.navbar_cta_title { color: var(--ink); font-size: 1.5rem; line-height: 120%; letter-spacing: 0; }
.navbar_nav_btns { display: flex; align-items: center; justify-content: flex-start; gap: var(--gutter); }

/* ----------------------------------------------------------------- 6. HERO */
/* The hero is 200svh tall but pulls the NEXT section up by 100svh, so Featured
   Projects overlaps its second half. Hero sits at z-index 1 and the portfolio
   at z-index 2, so the portfolio paints OVER the pinned hero as it rises.
   Remove either the negative margin or the z-index order and the sections just
   butt together instead of overlapping. */
.section_hero {
  position: relative; z-index: 1;
  width: 100%; height: 200svh; margin-bottom: -100svh;
}
.hero_media {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100svh; overflow: hidden;
  will-change: transform;   /* the preloader scales this wrapper, not the frames */
}
/* Every frame of the loop is stacked in the same box; only .is-active is
   visible. Opacity is animated by GSAP, so the base state has to be 0 —
   otherwise all ten stack up before the JS runs. No will-change here: ten
   promoted layers costs far more than it saves. */
.hero_img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
}
.hero_img.is-active { opacity: 1; }
/* Two scrims, not one. The bottom gradient is the reference's. The left-hand
   one was added when the hero became a ten-frame loop: measured over the
   heading box, white-on-photo contrast swung from 17.5:1 (meridian-1, dark
   water) down to 2.24:1 (hilltop-1, pale sky) — under the 3:1 WCAG AA floor
   for large text. A single photo can be picked to suit the copy; ten cannot,
   so the copy column needs its own floor. It fades out by 60% so the right of
   the frame stays untouched. */
.hero_video_overlay {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100svh;
  background-image:
    linear-gradient(90deg, #0000008c 0%, #00000059 30%, #0000 60%),
    linear-gradient(#0000, #0000 33%, #00000080);
}
.hero_wrapper {
  position: relative; z-index: 3;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem;
  width: 100%; height: 100svh; padding-top: 5rem; padding-bottom: 5rem;
}
.hero_content { display: flex; flex-flow: column; gap: 2rem; width: 28rem; color: var(--white); }
.hero_heading { color: var(--white); }
.hero_heading .line { overflow: hidden; }
.hero_lede { color: #ffffffcc; }
.hero_subheading { color: #ffffffe6; text-shadow: 0.25rem 0.25rem 1rem #0000001a; font-weight: 500; }
.hero_btns { display: flex; gap: var(--gutter); align-items: center; justify-content: flex-end; flex: none; }

/* --------------------------------------------------------------- 7. BUTTON */
/* Two stacked faces: the back sits directly below the front (top:100%) and both
   slide up one full height on hover, swapping the face. Square corners, 700
   weight, 1rem/1.25rem padding — as measured. */
.u-btn {
  position: relative; display: flex; flex: none;
  align-items: center; justify-content: center;
  overflow: hidden; cursor: pointer; text-decoration: none;
  padding: 0; border: 0; background: none;
}
.u-btn-front, .u-btn-back {
  z-index: 1; display: flex; align-items: center; justify-content: center; gap: 0.25rem;
  width: 100%; height: 100%; padding: 1rem 1.25rem;
  color: var(--grey-3); background-color: var(--white);
  transition: transform 0.55s var(--ease-hero);
}
.u-btn-back { position: absolute; inset: 100% 0 0; }
.u-btn:hover .u-btn-front, .u-btn:hover .u-btn-back { transform: translateY(-100%); }

.u-btn-text {
  position: relative; z-index: 2;
  font-size: 1rem; font-weight: 700; line-height: 140%;
  letter-spacing: 0.009375rem; white-space: nowrap;
}

/* Frosted secondary. The variant class goes on the FACES ONLY — never on the
   <a class="u-btn"> itself. Putting it on the anchor too stacks a second
   #ffffff26 tint + blur behind the front face (~28% white instead of 15%),
   which kills the clear glass and reads as flat milky frosting. */
.u-btn-glass.u-btn-front  { color: var(--white); background-color: #ffffff26; backdrop-filter: blur(1rem); -webkit-backdrop-filter: blur(1rem); }
.u-btn-glass.u-btn-back   { color: var(--grey-3); background-color: var(--white); }
.u-btn-black.u-btn-front  { color: var(--white); background-color: var(--grey-3); }
.u-btn-black.u-btn-back   { color: var(--grey-3); background-color: var(--white); }
.u-btn-white.u-btn-front  { color: var(--grey-3); background-color: var(--white); }
.u-btn-white.u-btn-back   { color: var(--white); background-color: var(--panel); }

/* text link with a rule that grows on hover */
.services_btn, .project_nav_btn, .service_nav_btn {
  position: relative; z-index: 4; flex: none; overflow: hidden;
  font-size: 1.125rem; line-height: 140%; letter-spacing: 0.009375rem;
}
.services_btn_underline, .project_nav_btn_underline, .project_btn_underline {
  position: absolute; inset: auto auto 0 0;
  width: 0%; height: 2px; background-color: var(--white);
  transition: width 0.5s var(--ease);
}
.services_card:hover .services_btn_underline,
.project_nav_card:hover .project_nav_btn_underline,
.service_nav_card:hover .services_btn_underline,
.portfolio_project:hover .project_btn_underline { width: 100%; }

/* -------------------------------------------------- 8. TABS (u-tab) ------ */
/* .u-tab-text is white with mix-blend-mode:difference, so it reads black over
   the white pill and white once the black .u-tab-bg has slid up behind it. */
.u-tab {
  position: relative; display: flex; align-items: center; justify-content: center;
  gap: var(--gutter); overflow: hidden; cursor: pointer;
  padding: 0.75rem 1rem; background-color: var(--white);
  font-size: 0.875rem; font-weight: 400; line-height: 140%; letter-spacing: 0.015625em;
  transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.u-tab-text { position: relative; z-index: 2; color: var(--white); mix-blend-mode: difference; }
.u-tab-bg {
  position: absolute; inset: 100% 0 0; z-index: 1;
  width: 100%; height: 100%; background-color: var(--pure);
  transition: inset 0.4s var(--ease);
}
.u-tab:hover .u-tab-bg { inset: 0 0 0; }
.u-tab.active { background-color: var(--pure); }
.u-tab.active .u-tab-bg { inset: 0 0 0; }

/* ------------------------------------------------------------ 9. PORTFOLIO */
.section_portfolio { position: relative; z-index: 2; background-color: var(--page); }
.portfolio_wrapper {
  display: flex; flex-flow: column; align-items: center; gap: 8rem;
  padding-top: var(--sec-pad); padding-bottom: var(--gutter);
}
.portfolio_heading_wrap { text-align: center; max-width: 36rem; }
.portfolio_heading_wrap .u-eyebrow { margin-bottom: 1rem; }
.portfolio_heading { text-align: center; }

/* portfolio index page */
.section_portfolio.is-index { background-color: var(--page); }
.portfolio_inner {
  display: flex; flex-flow: column; align-items: center;
  padding-top: var(--sec-pad); padding-bottom: var(--gutter);
}
.portfolio_intro { max-width: 44rem; margin-top: 1.5rem; text-align: center; color: var(--grey-1); }
.portfolio_tabs { display: flex; align-items: center; justify-content: center; gap: var(--gutter); margin-top: 5rem; margin-bottom: 2rem; }
.portfolio_tab_pane { width: 100%; }
.portfolio_view_all { align-self: center; }

/* service page's project strip */
.portfolio_service_wrapper {
  display: flex; flex-flow: column; align-items: center; gap: 5rem;
  padding-top: 5rem; padding-bottom: var(--gutter);
}
.portfolio_service_heading { max-width: 32rem; text-align: center; }

/* --- the grid ------------------------------------------------------------
   12-column track, .25rem gutter, and the reference's repeating row rhythm
   read off its per-item #w-node grid-area rules:
       6+6 / 4+4+4 / 6+6 / 4+4+4 …   (a 10-tile cycle)
   Aspect ratios are chosen so EVERY row resolves to the same height (one third
   of the grid width): a half-width tile at 3:2 and a third-width tile at 1:1
   are both W/3 tall. Mismatched ratios inside a row leave dead space under the
   shorter tiles. Keep tile counts on a row boundary — 2, 5, 7, 10, 12 … */
.portfolio_grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gutter); width: 100%; }
.portfolio_project { position: relative; overflow: hidden; color: var(--white); }

.portfolio_project:nth-child(10n + 1),
.portfolio_project:nth-child(10n + 2),
.portfolio_project:nth-child(10n + 6),
.portfolio_project:nth-child(10n + 7) { grid-column: span 6; aspect-ratio: 3 / 2; }

.portfolio_project:nth-child(10n + 3),
.portfolio_project:nth-child(10n + 4),
.portfolio_project:nth-child(10n + 5),
.portfolio_project:nth-child(10n + 8),
.portfolio_project:nth-child(10n + 9),
.portfolio_project:nth-child(10n)     { grid-column: span 4; aspect-ratio: 1 / 1; }

.portfolio_project_img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.portfolio_project:hover .portfolio_project_img { transform: scale(1.06); }
.portfolio_project_gradient { position: absolute; inset: 0; z-index: 2; background-image: linear-gradient(180deg, #0000 55%, #00000073); }
.portfolio_project_overlay { position: absolute; inset: 0; z-index: 3; background-color: var(--pure); opacity: 0; pointer-events: none; transition: opacity var(--dur) var(--ease); }
.portfolio_project:hover .portfolio_project_overlay { opacity: 0.25; }
.portfolio_project_info {
  position: absolute; inset: auto 1rem 1rem; z-index: 4;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  overflow: hidden; font-size: 1.125rem; line-height: 140%; letter-spacing: 0.009375rem;
}
.project_btn { position: relative; z-index: 4; flex: none; overflow: hidden; }
.portfolio_project_title { font-size: 1.125rem; font-weight: 500; line-height: 140%; color: inherit; }
.portfolio_project_text  { font-size: 1.125rem; color: #ffffffcc; }

/* =============================================== 10. SERVICES 3D CAROUSEL */
/* Geometry is Bloom's exact trig: a ring of --total cards, each rotated by
   360/total and pushed out by radius = (item-width / sin(inner-angle)). */
.section_services { position: relative; z-index: 2; background-color: var(--page); }
.services_scale_rectangle {
  position: absolute; inset: 0 0 auto; z-index: 1; height: 600px;
  background-color: var(--white); transform-origin: 50% 0; pointer-events: none;
}
.services_wrapper {
  padding-left: var(--pad-x); padding-right: var(--pad-x);
  position: relative; z-index: 2;
  display: flex; flex-flow: column; align-items: center;
  padding-top: var(--sec-pad);
}
.services_heading { width: 42rem; max-width: 100%; margin-bottom: 8rem; text-align: center; }

.carousel_wrapper { position: relative; width: 100%; transform-origin: 50%; perspective-origin: 50%; }
.carousel_container { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; perspective: 5000px; }
.carousel { position: relative; margin: 0; }
.carousel_card {
  position: absolute; inset: 0;
  width: 29.6875rem; height: 29.6875rem; aspect-ratio: 1;
  backface-visibility: hidden; overflow: hidden;
}
.carousel_card_img {
  position: absolute; z-index: 1; inset: -100px 0 0 -100px;
  width: calc(100% + 200px); height: calc(100% + 200px);
  max-width: none; object-fit: cover;
}
.carousel_mask {
  position: absolute; inset: 0; z-index: 2; display: none;
  margin-left: -0.25rem; margin-right: -0.25rem; pointer-events: none;
  background-image: linear-gradient(90deg, #fff, #fff0 10%, #fff0 90%, #fff);
}
.services_card {
  position: absolute; inset: 0; z-index: 3;
  display: flex; flex-flow: row; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; width: 100%; height: 100%; padding: 1.5rem; color: var(--white);
}
.services_card_title { position: relative; z-index: 4; width: 100%; color: var(--white); }
.services_card_gradient { position: absolute; inset: 0; z-index: 2; background-image: linear-gradient(#0000 66%, #00000054); }
.services_card_overlay  { position: absolute; inset: 0; z-index: 3; opacity: 0; background-image: linear-gradient(#00000040, #00000040); transition: opacity var(--dur) var(--ease); }
.services_card:hover .services_card_overlay { opacity: 1; }

@media screen and (min-width: 768px) {
  [index="1"]{--index:1;} [index="2"]{--index:2;} [index="3"]{--index:3;}
  [index="4"]{--index:4;} [index="5"]{--index:5;} [index="6"]{--index:6;}
  [index="7"]{--index:7;} [index="8"]{--index:8;} [index="9"]{--index:9;}
  [index="10"]{--index:10;} [index="11"]{--index:11;} [index="12"]{--index:12;}
  [index="13"]{--index:13;} [index="14"]{--index:14;}

  :root {
    --total: 14;
    --inner-angle: calc((360 / var(--total)) * 1deg);
    --item-width: 29.6875rem;
    --radius: calc((var(--item-width) / sin(var(--inner-angle))) * -1);
  }
  .carousel {
    transform-style: preserve-3d;
    transform: translate3d(0, 0, var(--radius)) rotateY(-102deg);
    width: var(--item-width); height: var(--item-width);
  }
  .carousel_card {
    backface-visibility: hidden;
    transform: rotateY(calc(var(--inner-angle) * var(--index)))
               translate3d(0, 0, calc(var(--radius) * -1));
  }
}

/* ---------------------------------------------------------------- 11. ABOUT */
.section_about { position: relative; z-index: 2; background-color: var(--page); padding: var(--sec-pad) 0; }
.about_wrapper { display: flex; flex-flow: column; gap: 5rem; }
.about_lede { max-width: 46rem; }
.about_lede .u-h2 { margin-top: 1rem; }
.about_lede p { margin-top: 1.5rem; color: var(--grey-1); }
.about_nums { display: flex; gap: 2rem; width: 100%; }
.about_num { display: flex; flex-flow: column; flex: 1; gap: 0.5rem; }
.about_num_title { font-weight: 400; font-size: clamp(2.5rem, 4.5vw, 4rem); line-height: 110%; color: var(--black); }
.about_num_title_inner { display: inline-block; }
.about_num_text { color: var(--grey-1); }
.about_nums_divider { width: 1px; background-color: var(--line-2); flex: none; }

/* -------------------------------------- 12. ADVANTAGES (pinned accordion) */
.section_advantages { position: relative; z-index: 2; background-color: var(--page); }
.advantages_wrapper {
  padding-left: var(--gutter); padding-right: var(--gutter);
  display: flex; gap: var(--gutter); width: 100%;
  height: 100vh; height: 100svh;
  padding-top: var(--gutter); padding-bottom: var(--gutter);
}
.advantageg_img_wrapper { position: relative; flex: none; width: calc(50% - 0.125rem); overflow: hidden; }
.advantage_img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.advantages { width: 50%; }
.advantages_content { display: flex; flex-flow: column; justify-content: space-between; width: 100%; height: 100%; padding: 4rem 4rem 2.5rem; background-color: var(--white); }
.advantages_heading .u-h2 { margin-top: 1rem; }
.advantages_list_wrapper { display: flex; align-items: flex-end; justify-content: flex-start; height: 100%; overflow: hidden; }
.advantages_list { position: relative; display: flex; flex-flow: column; width: 100%; }

.advantage {
  position: relative; display: flex; flex-flow: column; gap: 1rem;
  padding-top: 1rem; cursor: pointer;
  background-color: var(--white); border-top: 1px solid var(--off);
}
.advantage_divider { position: absolute; inset: -1px auto auto 0; width: 0%; height: 1px; background-color: var(--grey-3); }
.advantage_header { display: flex; align-items: center; justify-content: flex-start; gap: 1.5rem; }
.advantage_num { position: relative; padding: 0.875rem; border: 1px solid var(--line); }
.advantage_num_bg { position: absolute; inset: 0; z-index: 1; background-color: var(--off); }
.advantage_num_title { position: relative; z-index: 2; }
.advantage_heading { flex: 1; font-weight: 400; }
.advantage_body { overflow: hidden; padding-left: 4.5rem; color: var(--grey-1); font-size: 1rem; line-height: 140%; letter-spacing: 0.009375rem; }
.advantage_body_text { margin-bottom: 0; padding-bottom: 1rem; }

/* ------------------------------------------------------------------ 13. CTA */
/* Full-bleed photograph with the copy stacked over its left third — the
   reference's .section_cta, not a flat black panel. */
.section_cta { position: relative; z-index: 2; width: 100%; overflow: hidden; background-color: var(--black); }
.cta_bg { position: absolute; inset: -2.5% 0; z-index: 1; width: 100%; height: 105%; object-fit: cover; }
.cta_image_overlay { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; background-image: linear-gradient(#00000059, #00000026 40%, #000000a6); }
.cta_container { position: relative; z-index: 3; }
.cta_wrapper {
  display: flex; flex-flow: column; align-items: flex-start; justify-content: flex-end;
  gap: 2rem; width: 34rem; max-width: 100%;
  padding-top: 12rem; padding-bottom: 5rem;
}
.cta_eyebrow { color: #ffffff8c; }
.cta_heading { color: var(--white); }
.cta_text { color: #ffffffcc; max-width: 34rem; }
.cta_btns { display: flex; gap: var(--gutter); align-items: center; justify-content: flex-start; flex-wrap: wrap; }

/* ---------------------------------------------------------- 14. TESTIMONIAL */
.section_testimonial { position: relative; z-index: 2; background-color: var(--page); padding: var(--sec-pad) 0; }
.testimonial_wrapper { display: flex; flex-flow: column; gap: 2rem; max-width: 60rem; margin: 0 auto; text-align: center; align-items: center; }
.testimonial_quote { margin: 0; color: var(--black); font-weight: 400; }
.testimonial_author_name { font-weight: 500; color: var(--black); }
.testimonial_author_role { color: var(--grey-1); }

/* ------------------------------------------------------------------ 15. FAQ */
.section_faq { position: relative; z-index: 2; background-color: var(--page); padding: var(--sec-pad) 0; }
.faq_wrapper { display: flex; flex-flow: column; gap: 4rem; }
.faq_heading_wrap { text-align: center; }
.faq_heading_wrap .u-h2 { margin-top: 1rem; }
.faq { display: flex; flex-flow: column; border-top: 1px solid var(--line-2); }
.faq_item { border-bottom: 1px solid var(--line-2); }
.faq_item_header {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  width: 100%; padding: 2rem 0; text-align: left; color: var(--black);
  transition: color var(--dur) var(--ease);
}
.faq_item_header:hover { color: var(--grey-1); }
.faq_item_header_icon { position: relative; flex: none; width: 1rem; height: 1rem; transition: rotate var(--dur) var(--ease); }
.faq_item_header_icon::before, .faq_item_header_icon::after {
  content: ""; position: absolute; inset: 50% 0 auto 0; height: 1.5px; background-color: currentColor;
}
.faq_item_header_icon::after { transform: rotate(90deg); }
.faq_item_body { overflow: hidden; height: 0; }
.faq_item_body_inner { padding-bottom: 2rem; color: var(--grey-1); max-width: 68ch; }

/* ===================================================== 16. PROJECT DETAIL */
/* The hero is NOT pinned — it is absolutely positioned at the top of a wrapper
   carrying padding-top:100svh, so the content scrolls over a static image. */
.section_project { position: relative; z-index: 2; background-color: var(--page); }
.project_wrapper { position: relative; display: flex; flex-flow: column; gap: var(--gutter); padding-top: 100svh; }
/* breaks out of the container's .25rem seam to a true 100vw, as the reference
   does — #smooth-content's overflow-x:clip absorbs the overhang */
.project_hero {
  position: absolute; inset: 0 auto auto 50%; z-index: 1;
  width: 100vw; height: 100svh; transform: translateX(-50%);
  overflow: hidden; display: block;
}
.project_hero_img { width: 100%; height: 100svh; object-fit: cover; }
.project_overview_container {
  display: flex; align-items: flex-start; justify-content: center;
  width: 100%; max-width: 120rem; height: 100%;
  margin-left: auto; margin-right: auto;
  padding-left: var(--pad-x); padding-right: var(--pad-x);
}
.project_overview { display: flex; flex-flow: column; gap: 2rem; width: 100%; max-width: 53rem; margin-top: 5rem; margin-bottom: 4rem; }
.project_heading { color: var(--black); }
.project_info {
  display: flex; align-items: center; justify-content: flex-start;
  flex-wrap: wrap; gap: 2rem; width: 100%;
  font-size: 1.125rem; font-weight: 500; line-height: 140%; letter-spacing: 0.009375rem;
  color: var(--black);
}
.project_info_value { color: var(--grey-1); font-weight: 400; }
.project_text { color: var(--grey-1); font-size: 1.125rem; line-height: 140%; letter-spacing: 0.009375rem; display: flex; flex-flow: column; gap: 1.25rem; }
.project_text strong { color: var(--black); font-weight: 500; }
.project_highlights { display: flex; flex-flow: column; gap: 0.5rem; }
.project_highlights li { position: relative; padding-left: 1.25rem; }
.project_highlights li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 0.5rem; height: 1px; background-color: var(--grey-2); }
.project_meta { color: var(--grey-2); font-size: 1rem; }

.project_gallery { display: flex; flex-flow: column; gap: var(--gutter); margin-bottom: 1.75rem; }
.project_gallery a { display: block; cursor: zoom-in; }
.project_img { width: 100%; min-height: 200px; position: relative; }

.section_project_nav { position: relative; z-index: 2; background-color: var(--page); height: 100svh; }
.project_nav { display: flex; gap: var(--gutter); height: 100%; padding-top: var(--gutter); padding-bottom: var(--gutter); }
.project_nav_card,
.service_nav_card {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: space-between;
  width: 100%; height: 100%; padding: 3rem; color: var(--white); text-decoration: none;
}
.project_nav_card_title, .services_nav_card_title { position: relative; z-index: 4; width: 100%; font-weight: 400; color: var(--white); }
.project_nav_card_img, .service_nav_card_img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.project_nav_card:hover .project_nav_card_img,
.service_nav_card:hover .service_nav_card_img { transform: scale(1.05); }
.project_nav_card_gradient, .service_nav_card_gradient { position: absolute; inset: 0; z-index: 2; background-image: linear-gradient(#0000 66%, #00000054); }
.project_nav_overlay, .service_nav_overlay { position: absolute; inset: 0; z-index: 2; opacity: 0; background-color: var(--pure); transition: opacity var(--dur) var(--ease); }
.project_nav_card:hover .project_nav_overlay,
.service_nav_card:hover .service_nav_overlay { opacity: 0.25; }
.project_nav_btn_text, .service_nav_btn_text { white-space: nowrap; }
.service_nav_content { position: relative; z-index: 4; display: flex; flex-flow: column; gap: 1rem; }
.service_nav_content .u-subheading-m { color: #ffffff8c; }

/* ===================================================== 17. SERVICE DETAIL */
.section_service_hero {
  position: relative; z-index: 1;
  width: 100%; height: 200svh; margin-bottom: -100svh;
}
.service_hero_image { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100svh; object-fit: cover; }
.service_hero_image_overlay { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100svh; pointer-events: none; background-image: linear-gradient(#00000040, #0000 45%, #00000073); }
.service_hero_container { position: relative; z-index: 3; display: flex; align-items: flex-end; justify-content: center; height: 100svh; }
.service_hero_heading { width: 46.25rem; max-width: 100%; margin-bottom: 5rem; color: var(--white); text-align: center; }
.service_hero_heading .line { overflow: hidden; }

.section_service_info { position: relative; z-index: 2; background-color: var(--page); }
.service_info_wrapper { display: flex; flex-flow: column; align-items: center; gap: 5rem; padding-top: var(--sec-pad); padding-bottom: var(--sec-pad); }
.service_info_heading { width: 36rem; max-width: 100%; text-align: center; }
.service_info_cards { display: flex; gap: 3rem; width: 100%; }
.service_info_card { display: flex; flex-flow: column; gap: 1.5rem; width: 100%; }
.service_info_card_title { font-size: 2rem; font-weight: 400; }
.service_info_card_text { color: var(--grey-1); font-size: 1rem; line-height: 140%; letter-spacing: 0.009375rem; }
.service_info_body { max-width: 53rem; color: var(--grey-1); text-align: center; }
.service_info_also { display: flex; flex-flow: column; align-items: center; gap: 1rem; }
.service_info_also_list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 2rem; color: var(--black); font-size: 1.125rem; }

.section_service_nav { position: relative; z-index: 2; background-color: var(--page); height: 100svh; }
.service_nav { display: flex; gap: var(--gutter); height: 100%; padding-top: var(--gutter); padding-bottom: var(--gutter); }

/* ============================================================ 18. CONTACT */
.section_contacts { position: relative; z-index: 2; background-color: var(--page); }
.contacts_container.u-container-wide { padding-left: 0; padding-right: 0; }
.contacts_wrapper { display: flex; align-items: flex-start; justify-content: flex-start; gap: var(--gutter); padding-bottom: var(--gutter); }
.contacts_col_left { display: flex; flex-flow: column; gap: 5rem; padding: 14rem var(--pad-x) 5rem; width: 50%; }
.contacts_col_right { flex: none; width: 50%; }
.contacts_col_right_inner { display: flex; flex-flow: column; gap: var(--gutter); }
.contacts_img_wrapper { overflow: hidden; }
.contacts_img { width: 100%; height: auto; object-fit: cover; }

.contacts_header { display: flex; flex-flow: column; align-items: flex-start; gap: 2rem; }
.contacts_header .u-subheading-l { color: var(--grey-2); }
.contacts_title { color: var(--black); }
.contacts_quote { display: flex; gap: 2rem; }
.contacts_quote_img { flex: none; width: 8rem; height: 8rem; object-fit: cover; }
.contacts_quote_inner { display: flex; flex-flow: column; gap: 1rem; }
.contacts_quote_text { margin-bottom: 0; color: var(--ink); }
.contacts_quote_title { font-size: 1rem; line-height: 160%; letter-spacing: 0.03125rem; color: var(--grey-1); }
.contacts_cols { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 2rem; }
/* min-width:0 stops the long email address from claiming the whole row and
   squeezing the address column down to one word per line */
.contacts_col { flex: 1 1 10rem; min-width: 0; }
.contacts_col_list_item_link { overflow-wrap: anywhere; }
.contacts_col_title { margin-bottom: 1.5rem; color: #717171; font-size: 0.875rem; line-height: 140%; letter-spacing: 0.009375rem; }
.contacts_col_list, .contacts_col_list_socials { display: flex; gap: var(--gutter); }
.contacts_col_list { flex-flow: column; }
.contacts_col_list_socials { flex-flow: row; }
.contacts_col_list_item, .contacts_col_list_item_socials { position: relative; }
.contacts_col_list_item_link { display: flex; align-items: center; gap: var(--gutter); padding: 0.25rem 0; color: var(--panel); font-size: 1rem; line-height: 140%; letter-spacing: 0.009375rem; }
.contacts_col_list_item_link_social { display: flex; align-items: center; justify-content: center; padding: 0.875rem 1rem; color: var(--panel); background-color: var(--white); font-size: 0.875rem; transition: background-color var(--dur) var(--ease); }
.contacts_col_list_item_link_social:hover { background-color: var(--line); }

.contact_form_content { display: flex; flex-flow: column; align-items: flex-start; gap: 2rem; max-width: 21.5rem; }
.contact_form { margin-bottom: 0; }
.input_title { display: block; font-weight: 500; color: var(--black); }
.u-input-wrapper { position: relative; margin-bottom: 2rem; }
.u-input, .u-select {
  width: 100%; height: 3.375rem; margin-bottom: 0; padding: 1rem 0;
  background-color: transparent; border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; color: var(--black);
  font: inherit; font-size: 1rem; line-height: 140%; letter-spacing: 0.009375rem;
  transition: border-color 0.2s cubic-bezier(0.86, 0, 0.07, 1);
}
textarea.u-input { height: auto; resize: vertical; }
.u-input:focus, .u-select:focus { outline: none; border-bottom-color: var(--black); }
.u-input::placeholder { color: var(--grey-2); }
.u-select { cursor: pointer; }
.contacts_form_btn { align-self: flex-start; }
.form_policy { margin-top: 2rem; max-width: 22rem; font-size: 0.75rem; line-height: 140%; letter-spacing: 0.025rem; color: var(--grey-2); }
.u-form-success { padding: 0; background-color: transparent; text-align: left; }

/* ------------------------------------------------------------- 19. FOOTER */
/* The dark panel is an INSET card, not a full-bleed band: .u-container-wide
   gives .25rem either side and .section_footer .25rem underneath, so a hairline
   of page background frames it — the same seam used between every other tile.
   NOTE: do not reintroduce a `padding` shorthand on .footer_wrapper. The
   previous build set padding-left/right and then followed it with
   `padding: 6rem 0 2rem`, which reset both to 0 and left the footer content
   running edge to edge. */
.section_footer { position: relative; z-index: 2; background-color: var(--page); padding-bottom: var(--gutter); }
.footer_wrapper { background-color: var(--grey-3); color: var(--white); padding: 4.75rem 4.75rem 0; }
.footer_cols { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--gutter); margin-bottom: 3rem; }
.footer_cta { display: flex; flex-flow: column; align-items: flex-start; justify-content: flex-start; flex: none; gap: 2rem; padding-right: 1.75rem; }
.footer_heading { color: var(--white); }
.footer_cols_wrapper { grid-column: span 2; display: flex; gap: 2rem; }
.footer_col { flex: 1; }
.footer_col_title { margin-bottom: 1.5rem; color: var(--grey-4); font-size: 0.875rem; line-height: 140%; letter-spacing: 0.009375rem; }
.footer_col_list { display: flex; flex-flow: column; align-items: flex-start; gap: var(--gutter); }
.footer_col_list_socials { display: flex; flex-flow: row; gap: var(--gutter); }
.footer_col_list_item, .footer_col_list_item_socials { position: relative; transition: opacity var(--dur) var(--ease); }
.footer_col_list_item_link {
  display: flex; align-items: center; gap: var(--gutter); padding: 0.25rem 0;
  color: var(--white); font-size: 1rem; line-height: 140%; letter-spacing: 0.009375rem;
}
.footer_col_list_item_link.w--current { font-weight: 500; }
.footer_col_list_item_link_address { display: block; padding: 0.25rem 0; color: var(--white); font-size: 1rem; line-height: 140%; letter-spacing: 0.009375rem; }
.footer_col_list_item_link_social {
  display: flex; align-items: center; justify-content: center; padding: 0.875rem;
  color: #dfdfdf; background-color: var(--panel);
  transition: background-color var(--dur) var(--ease);
}
.footer_col_list_item_link_social:hover { color: var(--white); background-color: #323232; }
.footer_col_list_item_link_social_icon { width: 1.25rem; height: 1.25rem; }

.footer_bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 2rem; padding-bottom: 2rem; border-top: 1px solid var(--panel);
}
.footer_bottom_left { flex: 1; }
.footer_bottom_right { flex: 1; display: flex; align-items: center; justify-content: flex-end; }
.footer_copyright, .footer_bottom_link { color: #dfdfdf; font-size: 0.75rem; line-height: 140%; letter-spacing: 0.025rem; }
.footer_bottom_link { position: relative; display: block; cursor: pointer; }
.footer_bottom_link:hover { color: var(--white); }

/* -------------------------------------------------------- 20. FADE-UP REVEAL */
.reveal { opacity: 0; transform: translateY(1.5rem); transition: opacity 0.9s var(--ease-hero), transform 0.9s var(--ease-hero); }
.reveal.is-revealed { opacity: 1; transform: none; }

/* ==========================================================================
   21. RESPONSIVE — the reference's breakpoints are 991 / 767 / 479.
   ========================================================================== */

@media (max-width: 1200px) {
  :root { --sec-pad: 6rem; }
  .portfolio_wrapper { gap: 6rem; padding-top: 6rem; }
  .service_hero_heading { width: 36rem; }
}

@media (max-width: 991px) {
  :root { --pad-x: 2rem; }
  .u-h1 { font-size: 3rem; }
  .u-h2 { font-size: 2.5rem; }
  .navbar { inset: 1rem 1.25rem auto; }
  .u-underline { display: none; }

  /* caption drops below the tile instead of sitting over it, and the
     hover overlay goes away — there is no hover on touch */
  .portfolio_project_info { position: relative; inset: auto; width: calc(100% - 2rem); margin-top: -1.5rem; }
  .portfolio_project_overlay, .portfolio_project_gradient { display: none; }
  .portfolio_project_title, .portfolio_project_text { color: var(--black); }
  .portfolio_project_text { color: var(--grey-1); }
  .portfolio_grid { width: 100%; }

  .advantages_wrapper { flex-flow: column; height: auto; }
  .advantageg_img_wrapper { display: none; }
  .advantages { width: 100%; }
  .advantages_content { padding: 3rem 2rem 2rem; }
  .navbar_nav_inner { min-width: 24rem; }
  .hero_content { width: 24rem; }
  .hero_wrapper { padding-top: 3rem; padding-bottom: 3rem; }

  .project_overview_container { display: block; max-width: 61.9375rem; }
  .project_overview { max-width: none; margin-top: 6rem; margin-bottom: 5rem; }
  .project_nav_card, .service_nav_card { flex-flow: column; align-items: flex-start; justify-content: flex-end; gap: 1rem; padding: 1.75rem; }
  .project_nav_overlay, .service_nav_overlay { display: none; }

  .service_info_wrapper { gap: 4rem; padding-top: 6rem; padding-bottom: 6rem; }
  .service_info_card_title { font-size: 1.5rem; }
  .service_hero_heading { margin-bottom: 2rem; }

  .contacts_col_left { gap: 3rem; padding: 12rem 2rem 2rem; }
  .contacts_quote { gap: 1rem; }
  .contacts_quote_img { width: 4rem; height: 4rem; }
  .contacts_cols { flex-flow: column; }
  .contacts_col { flex: 0 auto; }
  .contacts_col_title { margin-bottom: 1rem; }

  /* footer collapses to a stacked card */
  .footer_wrapper { padding: 1.75rem 1.75rem 0; }
  .footer_cols { display: flex; flex-flow: column; gap: 4rem; margin-bottom: 2rem; }
  .footer_cta { width: 50%; padding-right: 0; }
  .footer_cols_wrapper { grid-column: span 1; flex-wrap: wrap; }
  .footer_col { flex: 0 auto; width: calc(50% - 1rem); }
}

/* Under 768px the ring is dropped and the portfolio becomes a 2-column grid —
   NOT a single stack. The reference only stacks below 480. */
@media (max-width: 767px) {
  :root { --sec-pad: 4rem; --pad-x: 1rem; }
  .u-h1, .u-h2 { font-size: 2.25rem; letter-spacing: -0.02em; }
  .u-h3 { font-size: 1.75rem; }
  .navbar { inset: 0.75rem 0.75rem auto; }

  .section_hero { height: calc(var(--vh, 1vh) * 200); margin-bottom: calc(var(--vh, 1vh) * -100); }
  .hero_media, .hero_video_overlay { height: var(--mobile-100vh); }
  .hero_wrapper {
    height: var(--mobile-100vh);
    flex-flow: column; align-items: flex-start; justify-content: flex-end;
    gap: 1.5rem; padding-top: 1rem; padding-bottom: 2rem;
  }
  .hero_content { width: auto; gap: 1rem; }
  .hero_btns { width: 100%; justify-content: flex-start; }
  .hero_btns .u-btn { flex: 1; }

  .portfolio_wrapper { gap: 4rem; padding-top: 4rem; }
  .portfolio_service_wrapper { gap: 3rem; padding-top: 4rem; }
  .portfolio_grid { grid-template-columns: 1fr 1fr; }
  /* two-up rhythm on the same 10-tile cycle: the wide tiles go full width,
     the third-width tiles pair up, and the last of each triplet fills the row */
  .portfolio_project:nth-child(10n + 1),
  .portfolio_project:nth-child(10n + 2),
  .portfolio_project:nth-child(10n + 5),
  .portfolio_project:nth-child(10n + 6),
  .portfolio_project:nth-child(10n + 7),
  .portfolio_project:nth-child(10n)     { grid-column: span 2; aspect-ratio: 4 / 3; }
  .portfolio_project:nth-child(10n + 3),
  .portfolio_project:nth-child(10n + 4),
  .portfolio_project:nth-child(10n + 8),
  .portfolio_project:nth-child(10n + 9) { grid-column: span 1; aspect-ratio: 1 / 1; }
  .portfolio_tabs { margin-top: 3rem; width: 100%; }
  .portfolio_tab { flex: 1; justify-content: center; padding-left: 0.75rem; padding-right: 0.75rem; }

  .services_heading { margin-bottom: 4rem; }
  .carousel_container { perspective: none; }
  .carousel { display: flex; flex-flow: column; gap: var(--gutter); width: 100%; height: auto; transform: none !important; }
  .carousel_card { position: static; width: auto; height: auto; transform: none !important; }
  .carousel_card_img { position: relative; inset: 0; width: 100%; height: 100%; }
  .carousel_mask { display: none; }
  [data-service-empty] { display: none; }  /* photo-only cards drop on mobile */
  .services_card { position: relative; flex-flow: column; align-items: flex-start; justify-content: flex-end; gap: 0.5rem; }

  .about_nums { flex-flow: wrap; gap: 1rem; }
  .about_num { flex: 0 auto; width: calc(50% - 0.5rem); }
  .about_nums_divider { display: none; }
  .advantage_body { padding-left: 0; }

  .cta_wrapper { width: 100%; padding-top: 8rem; padding-bottom: 3rem; gap: 1.5rem; }

  .project_info { flex-flow: column; align-items: flex-start; gap: 0.25rem; }
  .project_wrapper { gap: 0.5rem; }
  .service_info_wrapper { gap: 2rem; padding-top: 4rem; padding-bottom: 4rem; }
  .service_info_cards { flex-flow: column; gap: 2rem; }
  .service_info_card { gap: 1rem; }
  .service_info_heading { width: auto; text-align: left; }

  .contacts_col_left { gap: 2rem; padding: 7rem 1rem 1rem; }
  .contacts_quote { flex-flow: column; }
  .contacts_cols { gap: 1rem; }
  .contact_form_content { max-width: 100%; }

  .navbar_nav_wrapper { width: 100%; left: 0; }
  .navbar_nav_inner { width: 100%; min-width: auto; padding: 4rem 1rem 1rem; gap: 3rem; }
  .navbar_nav_link, .navbar_nav_dd_btn { font-size: 1.75rem; padding-top: 0.25rem; padding-bottom: 0.25rem; }
  .navbar_nav_dd_list { position: static; box-shadow: none; padding: 0.5rem 0 0.5rem 0.5rem; }
  .navbar_nav_btns { flex-flow: column; align-items: stretch; width: 100%; }

  .footer_cta { width: 100%; }
  .footer_col { width: auto; }
  .footer_col_title { margin-bottom: 0.5rem; }
  .footer_col_list { gap: 0; }
  .preloader_logo { width: 20rem; }
}

@media (max-width: 479px) {
  .u-h1, .u-h2 { font-size: 1.75rem; letter-spacing: 0; }
  .u-h3 { font-size: 1.5rem; }
  .u-subheading-l, .u-sub-l { font-size: 1rem; }

  /* only here does the portfolio become a single stack */
  .portfolio_grid { display: flex; flex-flow: column; }
  .portfolio_project:nth-child(n) { aspect-ratio: 4 / 3; }
  .u-tab-text { font-size: 0.75rem; }

  .hero_btns { flex-flow: column; align-items: stretch; }
  .cta_btns { flex-flow: column; align-items: stretch; width: 100%; }
  .cta_btns .u-btn { width: 100%; }

  .project_nav, .service_nav { flex-flow: column; }
  .section_project_nav, .section_service_nav { height: auto; }
  .project_nav_card, .service_nav_card { min-height: 60svh; }

  .contacts_wrapper { flex-flow: column; align-items: stretch; }
  .contacts_col_left, .contacts_col_right { width: 100%; max-width: none; }
  .contacts_quote { flex-flow: row; }
  .contacts_quote_img { width: 6rem; height: 6rem; }
  .contacts_quote_text.u-subheading-xl { font-size: 1rem; }
  .contacts_quote_title { font-size: 0.875rem; }

  .service_info_cards { gap: 1.5rem; }
  .service_info_card { gap: 0.5rem; }
  .service_info_card_title { font-size: 1.25rem; }

  .footer_cols_wrapper { flex-flow: column; gap: 1rem; }
  .footer_bottom { flex-flow: column; align-items: flex-start; gap: 1rem; }
  .footer_bottom_right { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  .u-preloader { display: none !important; }
}
