/* Tectonic Pools — boutique/architectural rebuild
   Deep navy + warm cream, Big Shoulders for marks, Inter Tight for body.
   OMAI-style: image-dominant, almost no chrome, slow reveals. */

:root {
  /* warmer dark navy palette */
  --bg: #0c1422;          /* deep navy, slightly warmer than before */
  --bg-soft: #131e30;
  --ink: #f0e9dc;         /* warm cream */
  --ink-mute: rgba(240, 233, 220, 0.62);
  --ink-faint: rgba(240, 233, 220, 0.38);
  --ink-trace: rgba(240, 233, 220, 0.14);
  --line: rgba(240, 233, 220, 0.12);
  --line-strong: rgba(240, 233, 220, 0.28);
  --cyan: #7fd3d4;        /* unchanged accent, slightly muted */
  --cyan-soft: rgba(127, 211, 212, 0.45);

  --display: "Big Shoulders Display", "Inter Tight", sans-serif;
  --sans: "Inter Tight", "Söhne", "Neue Haas Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(20px, 4vw, 56px);
  --maxw: 1640px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 350;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

::selection { background: var(--cyan); color: var(--bg); }

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

/* ── Type ──────────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.eyebrow .dot {
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--cyan);
  margin: 0 10px 2px 0;
  vertical-align: middle;
}
.wordmark {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.h-display {
  font-family: var(--sans);
  font-weight: 200;
  letter-spacing: -0.02em;
  line-height: 0.96;
}
.serif-numeral {
  font-family: var(--display);
  font-weight: 300;
  letter-spacing: 0.02em;
}
.caption {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* ── Buttons / links ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  cursor: pointer;
  background: transparent;
  transition: background .35s ease, border-color .35s ease, color .35s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* Nav CTA — brand-complementary hover: cyan→indigo gradient fill, dark navy text */
.nav-cta {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color .35s ease, border-color .35s ease, box-shadow .35s ease, transform .35s ease;
}
.nav-cta::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(110deg, #7fd3d4 0%, #6478ff 70%);
  transform: translateX(-101%);
  transition: transform .45s cubic-bezier(.6,.05,.2,1);
  z-index: -1;
}
.nav-cta:hover,
.nav-cta:focus-visible {
  background: transparent;
  color: var(--bg);
  border-color: transparent;
  box-shadow: 0 6px 24px -10px rgba(100, 120, 255, 0.6),
              0 0 0 1px rgba(127, 211, 212, 0.4);
}
.nav-cta:hover::before,
.nav-cta:focus-visible::before {
  transform: translateX(0);
}
.nav-cta:hover .arrow svg,
.nav-cta:focus-visible .arrow svg {
  stroke: var(--bg);
}
.btn .arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 10px;
  flex-shrink: 0;
}
.btn .arrow svg {
  width: 18px;
  height: 10px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.25;
}

.link-quiet {
  position: relative;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line);
  transition: border-color .3s ease;
}
.link-quiet:hover { border-color: var(--ink); }

/* ── Navigation ────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: padding .4s ease, background .4s ease, border-color .4s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 14px 0;
  background: rgba(12, 20, 34, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
}
.logo {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none;
}
.logo-img {
  display: block;
  height: clamp(64px, 6vw, 88px);
  width: auto;
}
@media (max-width: 720px) {
  .logo-img { height: 52px; }
}
.logo-mark {
  position: relative;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: transparent;
  border: 0;
}
/* Two L-brackets nearly the full size of the box, offset diagonally by a small
   amount so the only visible breaks are short diagonal gaps near the
   top-right and bottom-left corners. */
.logo-mark::before,
.logo-mark::after {
  content: "";
  position: absolute;
  width: 34px;
  height: 34px;
  border: 0 solid #6478ff;
  pointer-events: none;
}
.logo-mark::before {
  /* top + left edges — anchored upper-left */
  top: 0; left: 0;
  border-top-width: 1.5px;
  border-left-width: 1.5px;
}
.logo-mark::after {
  /* bottom + right edges — anchored lower-right, 6px offset */
  bottom: 0; right: 0;
  border-bottom-width: 1.5px;
  border-right-width: 1.5px;
}
.nav.scrolled .logo-mark::before,
.nav.scrolled .logo-mark::after {
  border-color: #7a8aff;
}
.logo-mark .tp {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #5ee0e6 0%, #6478ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo-text {
  display: flex; flex-direction: column; line-height: 1.05; gap: 4px;
}
.logo-text .name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo-text .tag {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--cyan);
  white-space: nowrap;
}
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-link {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
  position: relative;
  padding: 6px 0;
  transition: color .25s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--cyan), #6478ff);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s cubic-bezier(.6,.05,.2,1);
}
.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left center;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); }
.nav-link[aria-current="page"]::before {
  content: ""; position: absolute; left: -12px; top: 50%; width: 4px; height: 4px;
  background: var(--cyan); transform: translateY(-50%);
}
.nav-burger {
  display: none;
  background: transparent; border: 1px solid var(--line-strong);
  width: 44px; height: 44px; cursor: pointer; position: relative; padding: 0; color: var(--ink);
}
.nav-burger span {
  position: absolute; left: 12px; right: 12px;
  height: 1px; background: currentColor;
  transition: transform .3s ease, top .3s ease, bottom .3s ease;
}
.nav-burger span:first-child { top: 16px; }
.nav-burger span:last-child { bottom: 16px; }
.nav.open .nav-burger span:first-child { top: 21px; transform: rotate(45deg); }
.nav.open .nav-burger span:last-child { bottom: 21px; transform: rotate(-45deg); }
/* The drawer carries its own dedicated close button (.nav-close); hide the burger when open
   so the two don't fight for the same spot. */
.nav.open .nav-burger { display: none !important; }

/* Dedicated close button inside the drawer — visible against the dark backdrop. */
.nav-close {
  position: absolute;
  top: 22px;
  right: var(--gutter);
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  transition: border-color .25s ease, background .25s ease;
}
.nav-close:hover,
.nav-close:focus-visible {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.nav-drawer {
  position: fixed; inset: 0; height: 100dvh;
  background: rgba(12, 20, 34, 0.97);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  z-index: 99;
  padding: 120px var(--gutter) 60px;
  display: flex; flex-direction: column; gap: 4px;
  opacity: 0; pointer-events: none; transform: translateY(-12px);
  transition: opacity .35s ease, transform .35s ease;
}
.nav.open .nav-drawer { opacity: 1; pointer-events: auto; transform: translateY(0); }
.nav-drawer a {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 22px 0; border-bottom: 1px solid var(--line);
  font-family: var(--display); font-weight: 400; font-size: 32px;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.nav-drawer a .num {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.28em; color: var(--cyan);
}

@media (max-width: 980px) {
  .nav-links, .nav-cta { display: none !important; }
  .nav-burger { display: block; }
}
@media (min-width: 981px) {
  .nav-drawer { display: none !important; }
}
/* Phones: tighten the drawer so all six links + the Enquire button fit without scrolling. */
@media (max-width: 720px) {
  .nav-drawer { padding: 84px var(--gutter) 28px; }
  .nav-drawer a {
    padding: 14px 0;
    font-size: clamp(22px, 5.6vw, 28px);
  }
  .nav-drawer a.btn { margin-top: 18px !important; padding-top: 14px; padding-bottom: 14px; }
}

/* ── Hero (image/video) ─────────────────────────────────────────── */
.hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 100vh;
  height: 100svh; /* avoid mobile URL-bar gap */
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: var(--bg);
}
.hero-media {
  position: absolute; inset: -40px;
  z-index: 1;
}
/* Hero poster — shows instantly behind the video iframe while it loads */
.hero .hero-media .hero-poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  transform: none;
}
.hero .hero-media .hero-video {
  /* Let .hero-media iframe rules drive sizing & centering (cover). */
  z-index: 1;
}

.hero-media iframe,
.hero-media video,
.hero-media img {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: max(100%, calc(100vh * 16 / 9));
  height: max(100%, calc(100vw * 9 / 16));
  min-width: 100%;
  min-height: 100%;
  object-fit: cover;
  border: 0;
  pointer-events: none;
}
.hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  /* Tuned a few points brighter — video now shows through more clearly while keeping
     enough contrast at the bottom for the headline. */
  background-color: rgba(0, 0, 0, 0.12);
  background-image:
    linear-gradient(180deg, rgba(12,20,34,0.28) 0%, rgba(12,20,34,0.38) 55%, rgba(12,20,34,0.78) 100%);
}
.hero-content {
  position: relative; z-index: 3;
  height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding-top: 120px; padding-bottom: 56px;
}
.hero-top {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
}
.hero-bottom {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  flex-wrap: wrap;
}
.hero-bottom .lockup {
  max-width: 520px;
}
.hero-bottom .lockup .name {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 18px;
}
.hero-bottom .lockup .line {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.5;
  color: var(--ink-mute);
  max-width: 36ch;
  margin: 0;
}
.hero-bottom .meta {
  text-align: right;
  display: flex; flex-direction: column; gap: 6px; align-items: flex-end;
}

/* small page heroes (interior pages) */
.page-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
}
.page-hero .hero-media { position: absolute; inset: 0; width: 100%; height: 100%; }
.page-hero .hero-media img { width: 100%; height: 100%; object-fit: cover; transform: none; position: absolute; top: 0; left: 0; }
.page-hero .hero-overlay {
  background-color: rgba(0, 0, 0, 0.18);
  background-image: linear-gradient(180deg, rgba(12,20,34,0.4) 0%, rgba(12,20,34,0.55) 60%, rgba(12,20,34,0.85) 100%);
}
.page-hero .hero-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding-top: 140px; padding-bottom: 72px;
}
.page-hero h1 {
  font-family: var(--sans);
  font-weight: 200;
  font-size: clamp(48px, 7vw, 104px);
  letter-spacing: -0.02em;
  line-height: 0.98;
  margin: 0;
  text-transform: none;
}
.page-hero .meta-row {
  display: flex; gap: 36px; flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.page-hero .meta-row > div { display: flex; flex-direction: column; gap: 6px; }
.page-hero .meta-row .label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.26em;
  text-transform: uppercase; color: var(--ink-faint);
}
.page-hero .meta-row .value {
  font-family: var(--sans); font-size: 14px; color: var(--ink);
}

/* ── Sections ─────────────────────────────────────────────────── */
.section {
  padding: clamp(80px, 10vw, 160px) 0;
}
.section-tight { padding: clamp(60px, 7vw, 100px) 0; }

.section-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 32px;
  margin-bottom: clamp(40px, 5vw, 72px);
  flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--sans);
  font-weight: 200;
  font-size: clamp(36px, 5vw, 72px);
  letter-spacing: -0.015em;
  line-height: 1;
  margin: 0;
  max-width: 18ch;
}

/* ── Project grid (used on home + projects index) ─────────────── */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 80px) clamp(24px, 4vw, 64px);
}
.project-card {
  display: block;
  position: relative;
}
.project-card .frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--bg-soft);
}
.project-card .frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.4s cubic-bezier(.2,.7,.2,1);
}
.project-card:hover .frame img { transform: scale(1.04); }
.project-card .meta {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-top: 18px;
}
.project-card .meta .title {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 18px;
  letter-spacing: -0.005em;
}
.project-card .meta .num {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.26em;
  color: var(--ink-faint); text-transform: uppercase;
}
.project-card .sub {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 6px;
}
.project-grid.staggered .project-card:nth-child(odd)  { margin-top: clamp(0px, 6vw, 80px); }

@media (max-width: 720px) {
  .project-grid, .project-grid.staggered { grid-template-columns: 1fr; gap: 56px; }
  .project-grid.staggered .project-card:nth-child(odd) { margin-top: 0; }
}

/* ── Project detail (image stack) ─────────────────────────────── */
.detail-image {
  position: relative;
  margin: 0 auto clamp(48px, 6vw, 96px);
  max-width: var(--maxw);
  padding: 0 var(--gutter);
}
.detail-image .frame {
  position: relative;
  overflow: hidden;
  background: var(--bg-soft);
}
.detail-image .frame img {
  width: 100%;
  height: auto;
  display: block;
}
.detail-image .caption {
  display: flex; justify-content: space-between; gap: 24px;
  padding-top: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.detail-image.bleed { padding: 0; max-width: 100%; }
.detail-image.bleed .caption { padding-left: var(--gutter); padding-right: var(--gutter); }

/* ── Footer ───────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: 80px 0 40px;
  margin-top: 80px;
}
.footer .top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px;
}
.footer h3 {
  font-family: var(--sans);
  font-weight: 200;
  font-size: clamp(36px, 4vw, 56px);
  letter-spacing: -0.015em;
  line-height: 1;
  margin: 0 0 24px;
  max-width: 14ch;
}
.footer .col-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 14px;
}
.footer .col a, .footer .col p {
  display: block;
  font-size: 14px;
  color: var(--ink-mute);
  margin: 0 0 8px;
  line-height: 1.6;
  transition: color .25s ease;
}
.footer .col a:hover { color: var(--ink); }
.footer .bottom {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-faint);
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .footer .top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
  .footer .top { grid-template-columns: 1fr; gap: 36px; }
}

/* ── Reveal animations (slow, quiet) ──────────────────────────── */
.reveal {
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(.2,.7,.2,1);
}
.reveal.in { opacity: 1; }
.reveal-d1.in { transition-delay: .12s; }
.reveal-d2.in { transition-delay: .24s; }
.reveal-d3.in { transition-delay: .36s; }

.image-reveal {
  position: relative;
  overflow: hidden;
}
/* Slow opacity fade-in on scroll — consistent across all images.
   No curtain, no scale (those caused a hairline edge artifact). */
.image-reveal > img,
.image-reveal > video,
.image-reveal > iframe,
.image-reveal > picture {
  opacity: 0;
  transition: opacity 1.4s cubic-bezier(.4,0,.2,1);
}
.image-reveal.in > img,
.image-reveal.in > video,
.image-reveal.in > iframe,
.image-reveal.in > picture {
  opacity: 1;
}

/* ── Hero headline mask — give descenders room and avoid the JS-driven
   padding entirely so it's robust regardless of script timing. */
.hero-headline h1 > span {
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .image-reveal > img, .image-reveal > video, .image-reveal > iframe { transition: none !important; }
  .reveal { opacity: 1; }
  .image-reveal > img, .image-reveal > video, .image-reveal > iframe { opacity: 1 !important; }
}

/* ────────────────────────────────────────────────────────────────
   RESPONSIVE LAYER
   Breakpoints: 1280 (compact desktop) · 1024 (tablet landscape)
                 768  (tablet portrait) · 480 (phone)
   ──────────────────────────────────────────────────────────────── */

/* Guard against horizontal scroll caused by 100vw heroes.
   NOTE: cannot use overflow:clip / overflow:hidden on html or body — that
   breaks IntersectionObserver root-rect geometry and ScrollTrigger scrub
   measurements (animations fail to fire for already-in-viewport elements).
   Instead: wrap full-bleed sections individually. The .full-bleed helper
   below uses width:100% with negative margins keyed to body width, not
   100vw — so it cannot exceed the viewport in the first place. */
.full-bleed {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}
/* Belt-and-suspenders: any direct child of <body> that opted into the
   100vw trick stays clipped at body edges. */
body { overflow-x: clip; }

/* ── Compact desktop (≤1280) ─────────────────────────────────── */
@media (max-width: 1280px) {
  :root { --gutter: clamp(20px, 3.5vw, 44px); }
  .section { padding: clamp(72px, 9vw, 140px) 0; }
}

/* ── Tablet landscape (≤1024) ────────────────────────────────── */
@media (max-width: 1024px) {
  .section-head { grid-template-columns: 1fr !important; gap: 32px !important; align-items: start !important; }
  .hero-content-lg .hero-headline h1,
  .hero h1 { font-size: clamp(44px, 8vw, 84px) !important; }

  /* Inline 2-col grids — generic catch-all for any wrap with a 2-col template */
  .wrap[style*="grid-template-columns: 1fr 1.4fr"],
  .wrap[style*="grid-template-columns: 1fr 1.6fr"],
  .wrap[style*="grid-template-columns: 1fr 1.8fr"],
  .wrap[style*="grid-template-columns: 1.2fr 1fr"],
  .wrap[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: clamp(28px, 5vw, 56px) !important;
    align-items: start !important;
  }
  /* And inner divs that use the same pattern */
  div[style*="grid-template-columns: 1fr 1.4fr"],
  div[style*="grid-template-columns: 1fr 1.6fr"],
  div[style*="grid-template-columns: 1fr 1.8fr"],
  div[style*="grid-template-columns: 1.2fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: clamp(28px, 5vw, 56px) !important;
    align-items: start !important;
  }
}

/* ── Tablet portrait (≤768) ──────────────────────────────────── */
@media (max-width: 768px) {
  :root { --gutter: 22px; }

  /* Hero — never let it crowd */
  .hero { min-height: 0; }
  .hero-content-lg .hero-headline h1,
  .hero h1 { font-size: clamp(40px, 11vw, 64px) !important; line-height: 1.02 !important; }
  .hero-cta { flex-direction: column !important; align-items: flex-start !important; gap: 12px !important; }
  /* Hide the loud gradient "Explore projects" CTA on phones — the nav menu already has Projects.
     Keep the outlined "Begin your project" but compact, not full-bleed. */
  .hero-cta .btn-primary { display: none !important; }
  .hero-cta .btn { width: auto; justify-content: flex-start; gap: 14px; }

  /* Page hero — shorter, but still full-width */
  .page-hero { height: 80vh; min-height: 520px; }
  .page-hero h1 { font-size: clamp(40px, 10vw, 72px) !important; }
  /* With .hero-top hidden on mobile, only the heading+subheading remain — anchor them to the bottom
     of the hero (justify-content: space-between only pulls content to the bottom when there are two
     flex children). */
  .page-hero .hero-content { padding-top: 100px !important; padding-bottom: 48px !important; justify-content: flex-end !important; }
  /* Hide the small "Section — label" eyebrow captions at the top of each page hero on phones —
     they read as busy on small screens. Desktop unchanged. */
  .hero-top { display: none !important; }

  /* Sections */
  .section { padding: clamp(56px, 12vw, 96px) 0; }
  .section-head h2 { font-size: clamp(36px, 8vw, 54px) !important; }

  /* Two-col inline grids — collapse all */
  div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }

  /* Recognition/about meta rows that use flex with big gaps */
  div[style*="display:flex"][style*="gap:48px"] { gap: 24px !important; flex-wrap: wrap !important; }

  /* Buttons */
  .btn { font-size: 13px; padding: 14px 22px; }
}

/* ── Site CTA (above footer) ──────────────────────────────────── */
.tp-cta {
  position: relative;
  min-height: clamp(440px, 64vh, 720px);
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  color: var(--ink);
  background: var(--bg);
}
.tp-cta-bg {
  position: absolute; inset: 0; z-index: -1;
}
.tp-cta-bg img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.04);
}
.tp-cta-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(12,20,34,0.66) 0%, rgba(12,20,34,0.42) 50%, rgba(12,20,34,0.74) 100%);
}
.tp-cta-inner {
  position: relative;
  text-align: center;
  padding: clamp(80px, 12vw, 160px) clamp(24px, 5vw, 80px);
  max-width: 1100px;
  margin: 0 auto;
}
.tp-cta-eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(240, 233, 220, 0.78);
  margin-bottom: clamp(20px, 2.4vw, 32px);
}
.tp-cta-headline {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(32px, 4.2vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.018em;
  color: var(--ink);
  margin: 0 auto;
  max-width: 22ch;
  text-wrap: balance;
}
.tp-cta-link {
  display: inline-flex; align-items: center; gap: 14px;
  margin-top: clamp(40px, 5vw, 64px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 10px;
  position: relative;
}
.tp-cta-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: rgba(240, 233, 220, 0.55);
  transition: background .35s ease;
}
.tp-cta-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 1px rgba(240,233,220,0.4), 0 0 0 5px rgba(240,233,220,0.08);
  transition: transform .35s ease;
}
.tp-cta-link:hover::after { background: var(--ink); }
.tp-cta-link:hover .tp-cta-dot { transform: scale(1.2); }

/* ── Site footer (brand: deep navy + warm cream) ──────────────── */
.tp-foot {
  background: var(--bg);
  color: var(--ink);
  display: block;
  padding: 0;
  border-top: 1px solid var(--ink-trace);
}
.tp-foot-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(56px, 7vw, 96px) clamp(24px, 5vw, 80px) clamp(28px, 3vw, 40px);
}
.tp-foot-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: clamp(24px, 5vw, 64px);
  flex-wrap: wrap;
}
.tp-foot-mark {
  display: inline-flex; align-items: center;
  line-height: 0;
}
.tp-foot-mark img {
  display: block;
  height: clamp(72px, 8vw, 112px);
  width: auto;
  object-fit: contain;
}
.tp-foot-title {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(36px, 4.6vw, 64px);
  letter-spacing: -0.022em;
  line-height: 1;
  margin: 0;
  color: var(--ink);
  text-align: right;
}
.tp-foot-rule {
  height: 1px;
  background: var(--ink-trace);
  margin: clamp(32px, 4vw, 56px) 0 clamp(40px, 5vw, 72px);
}
.tp-foot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
.tp-foot-col {
  display: flex; flex-direction: column; gap: 14px;
}
.tp-foot-col h4 {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 6px;
  color: var(--ink-faint);
}
.tp-foot-col a {
  display: inline-block;
  width: max-content;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 15px;
  letter-spacing: -0.005em;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--ink-trace);
  padding-bottom: 3px;
  transition: color .3s ease, border-color .3s ease;
}
.tp-foot-col a:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.tp-foot-primary a {
  font-weight: 400;
  font-size: 17px;
  border-bottom: none;
  color: var(--ink);
  padding-bottom: 0;
  letter-spacing: -0.01em;
}
.tp-foot-primary a:hover { color: var(--ink-mute); }
.tp-foot-contact {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: clamp(18px, 2.5vw, 28px);
  text-align: right;
  grid-column: 4;
}
.tp-foot-email {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(15px, 1.2vw, 18px);
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
  transition: border-color .3s ease;
}
.tp-foot-email:hover { border-color: var(--ink); }
.tp-foot-social {
  display: flex; gap: 14px;
}
.tp-foot-social a {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-mute);
  width: 30px; height: 30px;
  transition: color .3s ease;
}
.tp-foot-social a svg { width: 100%; height: 100%; display: block; }
.tp-foot-social a:hover { color: var(--ink); }

/* ── Accreditation strip ─────────────────────────────────────── */
.tp-foot-accred {
  margin-top: clamp(40px, 4.5vw, 64px);
  padding-top: clamp(22px, 2.4vw, 32px);
  border-top: 1px solid var(--ink-trace);
  display: flex;
  align-items: center;
  gap: clamp(28px, 4.5vw, 64px);
  flex-wrap: wrap;
}
.tp-foot-accred-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  line-height: 1.7;
  flex: 0 0 auto;
}
.tp-foot-accred-logos {
  display: flex;
  align-items: center;
  gap: clamp(32px, 4.5vw, 60px);
  flex-wrap: wrap;
}
.tp-foot-accred-logos .accred-logo {
  height: 68px;
  width: 150px;
  display: block;
  /* Tint via mask so all three logos share #f0e9dc, regardless of source color */
  background-color: #f0e9dc;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
  opacity: 0.85;
  transition: opacity .3s ease;
}
.tp-foot-accred-logos .accred-logo:hover { opacity: 1; }
.tp-foot-accred-logos .a-spasa {
  -webkit-mask-image: url("assets/accred/spasa-member-mask.png");
          mask-image: url("assets/accred/spasa-member-mask.png");
}
.tp-foot-accred-logos .a-mba {
  -webkit-mask-image: url("assets/accred/mba-member-mask.png");
          mask-image: url("assets/accred/mba-member-mask.png");
}
.tp-foot-accred-logos .a-mpb {
  -webkit-mask-image: url("assets/accred/master-pool-builders-mask.png");
          mask-image: url("assets/accred/master-pool-builders-mask.png");
}
@media (max-width: 560px) {
  .tp-foot-accred { gap: 24px; }
  .tp-foot-accred-logos { gap: 28px; }
  .tp-foot-accred-logos .accred-logo { height: 52px; width: 120px; }
}
.tp-foot-base {
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: clamp(20px, 2vw, 28px);
  border-top: 1px solid var(--ink-trace);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* Subtle "Site by Studio Pisani" credit beneath the base row. */
.tp-foot-credit {
  margin-top: clamp(18px, 2vw, 28px);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
  opacity: 0.72;
  transition: opacity .3s ease;
}
.tp-foot-credit:hover,
.tp-foot-credit:focus-visible { opacity: 1; outline: none; }
.tp-foot-credit img {
  height: 20px;
  width: auto;
  display: block;
}

@media (max-width: 960px) {
  .tp-foot-grid { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
  .tp-foot-contact { align-items: flex-start; text-align: left; grid-column: 1 / -1; }
  .tp-foot-title { text-align: left; }
}
@media (max-width: 560px) {
  .tp-foot-grid { grid-template-columns: 1fr; }
  .tp-cta-headline { max-width: none; }
}

/* ── Phone (≤480) ────────────────────────────────────────────── */
@media (max-width: 480px) {
  :root { --gutter: 18px; }
  .hero h1, .page-hero h1 { font-size: clamp(36px, 12vw, 56px) !important; }
  .section-head h2 { font-size: clamp(32px, 10vw, 44px) !important; }
  .eyebrow, .caption { font-size: 10px !important; letter-spacing: 0.22em !important; }

  /* Force any 4-col stat strip to 2-col on phone */
  div[style*="display:flex"][style*="gap:48px"],
  div[style*="display:flex"][style*="gap: 48px"] {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
  }
}
