/* =========================================================================
   TRIPLE SMOOTH COLLECTIVE
   Three disciplines. One standard.
   Aesthetic: drenched midnight field, ivory linework, sparse warm-metal
   accents. Engraved, not printed. Premium, restrained, rugged.
   ========================================================================= */

/* ----- Tokens ----------------------------------------------------------- */
:root {
  /* Palette (locked brand hexes) */
  --ink:        #0D0D0D;   /* Midnight Black   — the field           */
  --ink-2:      #131210;   /* slightly raised surface                */
  --ink-3:      #181613;   /* raised panel                           */
  --ivory:      #F1EEE7;   /* Warm Ivory       — the mark, the text  */
  --copper:     #8C5B3F;   /* Weathered Copper — Built (the 5%)      */
  --ridge-deep: #223127;   /* Ridge Green deep — fields only          */
  --forest:     #4A6A50;   /* Forest Green     — Ridge highlight      */
  --stone:      #76706A;   /* Stone Grey       — Apex highlight        */
  --bronze:     #5E4736;   /* Aged Bronze      — debossed finish       */

  /* Ivory transparencies for hierarchy on the dark field */
  --ivory-90: rgba(241,238,231,.90);
  --ivory-72: rgba(241,238,231,.72);
  --ivory-52: rgba(241,238,231,.52);
  --ivory-36: rgba(241,238,231,.36);
  --ivory-16: rgba(241,238,231,.16);
  --ivory-08: rgba(241,238,231,.08);
  --hairline: rgba(241,238,231,.14);

  /* Type */
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body:    "Outfit", system-ui, sans-serif;
  --font-mono:    "Space Mono", ui-monospace, monospace;

  /* Spacing rhythm */
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --section-y: clamp(5.5rem, 12vw, 11rem);
  --maxw: 1320px;

  /* Motion */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-out-quart: cubic-bezier(.165, .84, .44, 1);

  /* Z-scale (semantic) */
  --z-canvas: 0;
  --z-base: 1;
  --z-nav: 60;
  --z-menu: 70;
}

/* ----- Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--ink);
  color: var(--ivory);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  letter-spacing: .005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul { list-style: none; padding: 0; }

::selection { background: var(--copper); color: var(--ivory); }
:focus-visible { outline: 1px solid var(--ivory-52); outline-offset: 3px; }

/* =========================================================================
   TYPE SYSTEM
   ========================================================================= */
.display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  font-size: clamp(2.2rem, 6vw, 5.2rem);
  text-wrap: balance;
}
.display--sm { font-size: clamp(1.8rem, 4.2vw, 3.3rem); }
h2.display { letter-spacing: 0.012em; }

/* All headings carry the uppercase brand voice */
.svc-row__body h3,
.value h3,
.work-item__title,
.division__name,
.division-card__name { text-transform: uppercase; }

.lede {
  font-size: clamp(1.06rem, 1.7vw, 1.32rem);
  font-weight: 300;
  color: var(--ivory-90);
  line-height: 1.55;
  max-width: 38ch;
  text-wrap: pretty;
}

p { max-width: 64ch; text-wrap: pretty; }
.measure { max-width: 56ch; }

.spec {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 400;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ivory-52);
}
.spec--copper { color: var(--copper); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--ivory-52);
  display: inline-flex;
  align-items: center;
  gap: .8rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: var(--ivory-36);
}

/* =========================================================================
   LAYOUT
   ========================================================================= */
.shell { width: min(100% - var(--gutter) * 2, var(--maxw)); margin-inline: auto; }
.section { padding-block: var(--section-y); position: relative; z-index: var(--z-base); }
.section--tight { padding-block: clamp(4rem, 8vw, 7rem); }
.section--field { background: var(--ink-2); }

/* Topographic canvas sits behind everything */
#topo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-canvas);
  pointer-events: none;
}
/* CSS fallback field if WebGL is unavailable */
.topo-fallback {
  position: fixed; inset: 0; z-index: var(--z-canvas); pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(241,238,231,.05), transparent 60%),
    repeating-linear-gradient(0deg, transparent 0 38px, rgba(241,238,231,.02) 38px 39px);
}

/* =========================================================================
   BRAND MARK (inline SVG, locked geometry)
   ========================================================================= */
.mark { width: 100%; height: auto; overflow: visible; }
.mark .neutral { fill: var(--ivory); }
.mark .accent  { fill: var(--ivory); }     /* JS draws accent on entry */

/* =========================================================================
   NAV
   ========================================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav);
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem var(--gutter);
  transition: padding .4s var(--ease-out), background .4s, backdrop-filter .4s;
}
.nav.scrolled {
  padding-block: .9rem;
  background: rgba(13,13,13,.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
/* When the mobile menu is open, the nav must NOT carry backdrop-filter:
   a filtered ancestor becomes the containing block for its position:fixed
   child (the full-screen menu), which would otherwise clip the overlay to
   the nav bar once the page is scrolled. Neutralise it while open. */
body.menu-open .nav,
body.menu-open .nav.scrolled {
  background: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-bottom-color: transparent;
}
.nav__brand { display: flex; align-items: center; gap: .75rem; z-index: var(--z-menu); }
.nav__brand .mark { width: 26px; }
.nav__brand .wm {
  font-family: var(--font-display); font-weight: 500;
  font-size: .76rem; letter-spacing: .3em; text-transform: uppercase;
  color: var(--ivory); padding-left: .3em;
}
.nav__links { display: flex; align-items: center; gap: 2.1rem; }
.nav__links a {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ivory-72);
  transition: color .3s; position: relative; padding-block: .3rem;
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--ivory); }
.nav__links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--copper);
}
.nav__cta {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink) !important;
  background: var(--ivory); padding: .7rem 1.4rem; border-radius: 100px;
  transition: transform .3s var(--ease-out), background .3s;
}
.nav__cta:hover { transform: translateY(-2px); }

.nav__toggle { display: none; width: 30px; height: 30px; position: relative; z-index: var(--z-menu); }
.nav__toggle span { position: absolute; left: 6px; right: 6px; height: 1.5px; background: var(--ivory); transition: transform .4s var(--ease-out), opacity .3s; }
.nav__toggle span:nth-child(1) { top: 12px; }
.nav__toggle span:nth-child(2) { bottom: 12px; }
body.menu-open .nav__toggle span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
body.menu-open .nav__toggle span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 0; z-index: var(--z-menu);
    flex-direction: column; justify-content: center; gap: 1.8rem;
    background: rgba(13,13,13,.97);
    backdrop-filter: blur(8px);
    opacity: 0; visibility: hidden; transition: opacity .45s var(--ease-out), visibility .45s;
  }
  .nav__links a { font-size: 1rem; }
  .nav__links .nav__cta { padding: .9rem 1.8rem; }
  body.menu-open .nav__links { opacity: 1; visibility: visible; }
}

/* =========================================================================
   HERO  (home + interior page heroes)
   ========================================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 9rem var(--gutter) 5rem;
  z-index: var(--z-base);
}
.hero--page { min-height: 78svh; }
.hero__inner { display: grid; justify-items: center; gap: clamp(1.3rem, 3vw, 2.2rem); max-width: 62rem; }
.hero__mark { width: clamp(72px, 10vw, 120px); }
.hero__wordmark {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(.7rem, 1.4vw, .9rem);
  letter-spacing: .42em; text-transform: uppercase;
  color: var(--ivory-72); padding-left: .42em;
}
.hero__meta { display: flex; flex-wrap: wrap; gap: .6rem 1.6rem; justify-content: center; margin-top: .3rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: .6rem; }

.scroll-cue { position: absolute; left: 50%; bottom: 1.8rem; transform: translateX(-50%); display: grid; justify-items: center; gap: .7rem; }
.scroll-cue .cue-mark { width: 20px; opacity: .5; }
.scroll-cue .cue-mark path { fill: var(--ivory); }
.scroll-cue .line { width: 1px; height: 40px; background: linear-gradient(var(--ivory-52), transparent); }

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  padding: 1rem 2.1rem; border-radius: 100px;
  transition: transform .3s var(--ease-out), background .3s, color .3s, border-color .3s;
}
.btn--solid { background: var(--ivory); color: var(--ink); }
.btn--ghost { color: var(--ivory); border: 1px solid var(--ivory-36); }
.btn--ghost:hover { border-color: var(--ivory); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .arrow { transition: transform .3s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* =========================================================================
   EDITORIAL ROW  (philosophy / services / story)
   ========================================================================= */
.editorial { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.editorial--rev { grid-template-columns: 1fr 1.05fr; }
.editorial--rev .editorial__media { order: 2; }
.editorial__copy { display: grid; gap: 1.4rem; align-content: center; }
.editorial__copy h2 { margin-top: .3rem; }
.editorial__copy p { color: var(--ivory-72); }

@media (max-width: 860px) {
  .editorial, .editorial--rev { grid-template-columns: 1fr; gap: 2.4rem; }
  .editorial--rev .editorial__media { order: 0; }
}

/* Media plate — placeholder for real photography, on-brand texture */
.plate {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background:
    radial-gradient(130% 90% at 30% 0%, rgba(241,238,231,.06), transparent 55%),
    repeating-linear-gradient(115deg, transparent 0 26px, rgba(241,238,231,.025) 26px 27px),
    var(--ink-2);
  border: 1px solid var(--hairline);
  display: grid; place-items: center;
}
.plate--wide { aspect-ratio: 16 / 11; }
.plate--tall { aspect-ratio: 3 / 4; }
.plate__mark { width: 46px; opacity: .22; }
.plate__mark path { fill: var(--ivory); }
.plate__label {
  position: absolute; left: 1rem; bottom: 1rem;
  font-family: var(--font-mono); font-size: .62rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--ivory-36);
}
.plate__tag {
  position: absolute; right: 1rem; top: 1rem;
  font-family: var(--font-mono); font-size: .58rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ivory-36);
}

/* =========================================================================
   SECTION HEADERS
   ========================================================================= */
.section-head { display: grid; gap: 1.2rem; max-width: 50rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--center { justify-items: center; text-align: center; margin-inline: auto; }
.section-head p { color: var(--ivory-72); }

/* =========================================================================
   FEATURED SERVICES  (editorial list, not identical cards)
   ========================================================================= */
.svc-list { display: grid; gap: 0; border-top: 1px solid var(--hairline); }
.svc-row {
  display: grid; grid-template-columns: 4rem 1fr auto; gap: clamp(1rem,3vw,2.4rem);
  align-items: baseline; padding-block: clamp(1.8rem, 3.5vw, 2.8rem);
  border-bottom: 1px solid var(--hairline);
  transition: background .4s var(--ease-out);
}
.svc-row:hover { background: var(--ivory-08); }
.svc-row__no { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; color: var(--ivory-36); }
.svc-row__body { display: grid; gap: .6rem; }
.svc-row__body h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.01em; }
.svc-row__body p { color: var(--ivory-52); max-width: 52ch; }
.svc-row__link { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ivory-72); white-space: nowrap; transition: color .3s; }
.svc-row:hover .svc-row__link { color: var(--ivory); }
@media (max-width: 720px) {
  .svc-row { grid-template-columns: 2.6rem 1fr; }
  .svc-row__link { grid-column: 2; }
}

/* =========================================================================
   THE COLLECTIVE  (division cards, expand on hover)
   ========================================================================= */
.collective-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.division-card {
  --accent: var(--ivory);
  position: relative; overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--ink-2);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  min-height: clamp(20rem, 34vw, 28rem);
  display: grid; align-content: space-between; gap: 2rem;
  transition: border-color .5s var(--ease-out), background .5s var(--ease-out), transform .5s var(--ease-out);
}
.division-card[data-div="ridge"] { --accent: var(--forest); }
.division-card[data-div="apex"]  { --accent: var(--stone); }
.division-card[data-div="built"] { --accent: var(--copper); }
.division-card:hover { transform: translateY(-4px); border-color: color-mix(in oklab, var(--accent) 60%, var(--hairline)); background: var(--ink-3); }
.division-card__mark { width: 52px; }
.division-card__head { display: grid; gap: .5rem; }
.division-card__name { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.6rem,3vw,2.2rem); letter-spacing: .02em; }
.division-card__tag { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.division-card__body {
  display: grid; gap: 1rem;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .55s var(--ease-out), opacity .45s var(--ease-out);
}
.division-card__body p { color: var(--ivory-72); font-size: .95rem; }
.division-card__list { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .1em; color: var(--ivory-52); line-height: 1.9; text-transform: uppercase; }
.division-card:hover .division-card__body, .division-card:focus-within .division-card__body { max-height: 22rem; opacity: 1; }
.division-card__edge { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .55s var(--ease-out); }
.division-card:hover .division-card__edge { transform: scaleX(1); }
@media (max-width: 860px) {
  .collective-grid { grid-template-columns: 1fr; }
  .division-card { min-height: auto; }
  .division-card__body { max-height: 22rem; opacity: 1; }
}

/* =========================================================================
   DIVISION PANELS  (full sections on the Collective page)
   ========================================================================= */
.division { --accent: var(--ivory); position: relative; padding-block: clamp(4.5rem, 9vw, 8rem); border-top: 1px solid var(--hairline); }
.division[data-div="ridge"] { --accent: var(--forest); background: linear-gradient(180deg, rgba(34,49,39,.30), transparent 70%); }
.division[data-div="apex"]  { --accent: var(--stone); }
.division[data-div="built"] { --accent: var(--copper); }
.division__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,6vw,5rem); align-items: center; }
.division[data-div="apex"] .division__grid { direction: rtl; }
.division[data-div="apex"] .division__grid > * { direction: ltr; }
.division__copy { display: grid; gap: 1.3rem; }
.division__name { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.4rem,5vw,4rem); letter-spacing: .01em; }
.division__sub { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.division__copy p { color: var(--ivory-72); }
.division__serves { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ivory-52); line-height: 2; }
.division__mark { width: clamp(70px, 12vw, 120px); }

/* =========================================================================
   WORK GRID
   ========================================================================= */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.work-item { display: grid; gap: .9rem; }
.work-item__caption { display: flex; justify-content: space-between; gap: 1rem; }
.work-item__title { font-family: var(--font-display); font-weight: 500; font-size: 1.02rem; letter-spacing: .01em; }
.work-item__div { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ivory-36); align-self: center; }
@media (max-width: 860px) { .work-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .work-grid { grid-template-columns: 1fr; } }

/* =========================================================================
   VALUES (about)
   ========================================================================= */
.values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
.value { background: var(--ink); padding: clamp(1.8rem, 4vw, 3rem); display: grid; gap: .8rem; }
.value__no { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .2em; color: var(--copper); }
.value h3 { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem,2.6vw,1.9rem); letter-spacing: -.01em; }
.value p { color: var(--ivory-52); font-size: .95rem; }
@media (max-width: 680px) { .values { grid-template-columns: 1fr; } }

/* =========================================================================
   DARK FEATURE  (What Triple Smooth means — copper accents)
   ========================================================================= */
.feature {
  position: relative; padding-block: clamp(5rem, 11vw, 9rem);
  background:
    radial-gradient(90% 60% at 80% 30%, rgba(140,91,63,.14), transparent 60%),
    var(--ink-2);
  border-block: 1px solid var(--hairline);
}
.feature__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,6vw,5rem); align-items: center; }
.feature__copy { display: grid; gap: 1.4rem; }
.feature__copy p { color: var(--ivory-72); }
.feature__rule { width: 2.4rem; height: 2px; background: var(--copper); }
@media (max-width: 860px) { .feature__grid { grid-template-columns: 1fr; } }

/* =========================================================================
   CLOSING
   ========================================================================= */
.closing { text-align: center; padding-block: clamp(6rem, 13vw, 11rem); }
.closing__inner { display: grid; justify-items: center; gap: 1.8rem; max-width: 46rem; margin-inline: auto; }

/* =========================================================================
   CONTACT FORM
   ========================================================================= */
.contact__grid { display: grid; grid-template-columns: 1.3fr .8fr; gap: clamp(2.5rem, 6vw, 5rem); }
.form { display: grid; gap: 1.4rem; }
.field { display: grid; gap: .5rem; }
.field label { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ivory-52); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ivory);
  background: transparent; border: none; border-bottom: 1px solid var(--ivory-36);
  padding: .7rem 0; transition: border-color .3s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ivory); }
.field textarea { resize: vertical; min-height: 6rem; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ivory-52) 50%), linear-gradient(135deg, var(--ivory-52) 50%, transparent 50%); background-position: right .1rem top 1.2rem, right .55rem top 1.2rem; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.field select option { background: var(--ink); color: var(--ivory); }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.form__note { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; color: var(--ivory-36); }
.form__error { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .06em; line-height: 1.6; color: var(--copper); }
.form__error a { color: var(--ivory-90); text-decoration: underline; }
.form__error[hidden] { display: none; }
.hp { position: absolute; left: -9999px; opacity: 0; }

/* Enquiry success popup ------------------------------------------------ */
.form-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 1.5rem; }
.form-modal[hidden] { display: none; }
.form-modal__backdrop { position: absolute; inset: 0; background: rgba(5,4,3,.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.form-modal__card {
  position: relative; z-index: 1; width: min(34rem, 100%);
  display: grid; justify-items: center; gap: 1rem; text-align: center;
  padding: clamp(2.2rem, 5vw, 3.4rem);
  background: var(--ink-3); border: 1px solid var(--ivory-16); border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.form-modal__mark { width: 52px; height: auto; }
.form-modal__mark path { fill: var(--ivory); }
.form-modal__eyebrow { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ivory-52); }
.form-modal__body { color: var(--ivory-72); max-width: 42ch; }
.form-modal__card .btn { margin-top: .6rem; }
.form-modal { animation: fm-fade .3s var(--ease-out); }
.form-modal__card { animation: fm-rise .4s var(--ease-out); }
@keyframes fm-fade { from { opacity: 0; } }
@keyframes fm-rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  .form-modal, .form-modal__card { animation: none; }
}

.contact__aside { display: grid; gap: 2rem; align-content: start; }
.contact__block { display: grid; gap: .5rem; }
.contact__block h4 { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ivory-52); font-weight: 400; }
.contact__block a, .contact__block p { color: var(--ivory-90); font-size: 1.05rem; }

@media (max-width: 880px) {
  .contact__grid { grid-template-columns: 1fr; }
  .field--row { grid-template-columns: 1fr; }
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer { padding-block: clamp(3.5rem, 7vw, 5.5rem) 2.5rem; position: relative; z-index: var(--z-base); background: var(--ink); border-top: 1px solid var(--hairline); }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); padding-bottom: 3rem; border-bottom: 1px solid var(--hairline); }
.footer__brand { display: grid; gap: 1.1rem; align-content: start; }
.footer__brand .mark { width: 38px; }
.footer__brand p { color: var(--ivory-52); font-size: .95rem; max-width: 34ch; }
.footer__col h4 { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ivory-52); margin-bottom: 1.1rem; font-weight: 400; }
.footer__col a { display: block; padding-block: .4rem; color: var(--ivory-72); transition: color .3s; font-size: .98rem; }
.footer__col a:hover { color: var(--ivory); }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; padding-top: 2rem; }
.footer__bottom .spec { color: var(--ivory-36); }
@media (max-width: 860px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

/* =========================================================================
   REVEAL MOTION
   Content is visible by default. JS adds .reveal-ready (motion allowed)
   to set the hidden start state, then ScrollTrigger plays it in.
   ========================================================================= */
[data-reveal] { will-change: transform, opacity; }
.reveal-ready [data-reveal] { opacity: 0; transform: translateY(22px); }
.reveal-ready [data-reveal].is-in { opacity: 1; transform: none; transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }

@media (prefers-reduced-motion: reduce) {
  .reveal-ready [data-reveal] { opacity: 1 !important; transform: none !important; }
  .scroll-cue { display: none; }
  .btn:hover, .nav__cta:hover, .division-card:hover { transform: none; }
}

/* =========================================================================
   ACCENT TOKEN — any element tagged with a division carries its accent
   ========================================================================= */
[data-div="ridge"] { --accent: var(--forest); }
[data-div="apex"]  { --accent: var(--stone); }
[data-div="built"] { --accent: var(--copper); }
/* division hero / accent marks colour in even without JS */
.hero__mark .accent,
.division__mark .accent { fill: var(--accent, var(--ivory)); }

/* =========================================================================
   NAV DROPDOWN — The Collective
   ========================================================================= */
.nav__dropdown { position: relative; display: flex; align-items: center; }
.nav__droplink {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ivory-72); padding-block: .3rem;
  transition: color .3s; position: relative;
}
.nav__dropdown:hover .nav__droplink,
.nav__dropdown:focus-within .nav__droplink,
.nav__droplink[aria-current="page"] { color: var(--ivory); }
.nav__droplink .caret { width: 7px; height: 7px; border-right: 1.4px solid currentColor; border-bottom: 1.4px solid currentColor; transform: rotate(45deg) translate(-1px,-1px); transition: transform .3s var(--ease-out); }
.nav__dropdown:hover .nav__droplink .caret,
.nav__dropdown:focus-within .nav__droplink .caret { transform: rotate(-135deg) translate(-1px,-1px); }

.nav__panel {
  position: absolute; top: calc(100% + .4rem); left: 50%;
  transform: translateX(-50%) translateY(8px);
  display: grid; min-width: 13.5rem;
  background: rgba(13,13,13,.96); backdrop-filter: blur(12px);
  border: 1px solid var(--hairline); border-radius: 4px; padding: .45rem;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-out), visibility .3s;
  transition-delay: .2s;
}
.nav__panel::before {
  content: ""; position: absolute; left: -.5rem; right: -.5rem; top: -.9rem; height: .9rem;
}
.nav__dropdown:hover .nav__panel,
.nav__dropdown:focus-within .nav__panel {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}
.nav__panel a {
  display: flex; align-items: center; gap: .7rem;
  padding: .65rem .8rem; border-radius: 3px;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ivory-72);
  transition: color .25s, background .25s;
}
.nav__panel a:hover, .nav__panel a[aria-current="page"] { color: var(--ivory); background: var(--ivory-08); }
.nav__panel .dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent, var(--ivory-36)); flex: none; }
.nav__panel .pad { color: var(--ivory-52); }

@media (max-width: 860px) {
  .nav__dropdown { flex-direction: column; align-items: center; gap: .9rem; }
  .nav__droplink { font-size: 1rem; }
  .nav__droplink .caret { display: none; }
  .nav__panel {
    position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto;
    background: transparent; backdrop-filter: none; border: none; padding: 0;
    justify-items: center; gap: .2rem; min-width: 0;
  }
  .nav__panel a { font-size: .82rem; color: var(--ivory-52); justify-content: center; }
  .nav__panel::before { display: none; }
}

/* =========================================================================
   CLIENT MARQUEE — looping banner of trusted clients
   ========================================================================= */
.marquee {
  position: relative; overflow: hidden;
  padding-block: clamp(1.4rem, 3vw, 2rem);
  border-bottom: 1px solid var(--hairline);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.marquee__head { text-align: center; margin-bottom: 1.1rem; }
.marquee__track {
  display: flex; align-items: center; gap: clamp(2.4rem, 5vw, 4.5rem);
  width: max-content; animation: marquee-x 36s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(.92rem, 1.7vw, 1.18rem); letter-spacing: .14em;
  text-transform: uppercase; color: var(--ivory-52); white-space: nowrap;
  display: inline-flex; align-items: center; gap: .8rem;
}
.marquee__item::before { content: ""; width: 5px; height: 5px; background: var(--accent, var(--ivory-36)); border-radius: 50%; flex: none; }
@keyframes marquee-x { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
}

/* =========================================================================
   FULL-BLEED MEDIA — image bleeds to the edge, gradient scrim lifts text
   Swap a real photo in by setting --img on .bleed__media:
     style="--img:url('assets/img/ridge-hero.jpg')"
   Until then, an on-brand placeholder texture shows.
   ========================================================================= */
.bleed { position: relative; isolation: isolate; overflow: hidden; }
.bleed__media {
  position: absolute; inset: 0; z-index: -2;
  background-color: var(--ink-2);
  background-image:
    var(--img, none),
    radial-gradient(130% 100% at 50% 0%, rgba(241,238,231,.05), transparent 55%),
    repeating-linear-gradient(118deg, transparent 0 30px, rgba(241,238,231,.022) 30px 31px);
  background-size: cover, cover, auto;
  background-position: center, center, center;
  background-repeat: no-repeat, no-repeat, repeat;
}
/* hero scrim: darken overall + vignette so centred ivory text pops */
.bleed__scrim { position: absolute; inset: 0; z-index: -1; }
.bleed--hero .bleed__scrim {
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--accent, transparent) 24%, transparent), transparent 26%),
    radial-gradient(120% 90% at 50% 42%, rgba(13,13,13,.30), rgba(13,13,13,.74) 100%),
    linear-gradient(180deg, rgba(13,13,13,.5), rgba(13,13,13,.2) 38%, rgba(13,13,13,.92));
}
/* band scrim: text sits left, gradient pulls from the left edge */
.bleed--band .bleed__scrim {
  background:
    linear-gradient(90deg, rgba(13,13,13,.9) 0%, rgba(13,13,13,.6) 42%, rgba(13,13,13,.15) 100%),
    linear-gradient(180deg, transparent 55%, rgba(13,13,13,.55));
}
/* on narrow screens text spans full width, so darken uniformly top-to-bottom
   instead of pulling from the left edge — keeps overlaid copy crisp anywhere */
@media (max-width: 760px) {
  .bleed--band .bleed__scrim {
    background:
      linear-gradient(180deg, rgba(13,13,13,.74), rgba(13,13,13,.6) 45%, rgba(13,13,13,.9));
  }
  /* Why Triple Smooth: taller, near-portrait band so more of the photo shows up
     top, with the copy resting in the darkened lower half (desktop unchanged).
     .band.band--why raises specificity so it beats the base .band min-height. */
  .band.band--why { min-height: 90svh; align-items: end; }
  .band--why .band__inner { padding-bottom: .4rem; }
  .band--why .bleed__scrim {
    background: linear-gradient(180deg,
      rgba(13,13,13,.10) 0%,
      rgba(13,13,13,.12) 30%,
      rgba(13,13,13,.62) 52%,
      rgba(13,13,13,.94) 74%);
  }
}
.bleed--hero { min-height: 100svh; }
.hero.bleed--hero { padding-bottom: 5rem; }

/* full-bleed statement band on the division pages */
.band { position: relative; min-height: clamp(24rem, 52vw, 40rem); display: grid; align-items: center; }
.band__inner { display: grid; gap: 1.4rem; max-width: 44rem; }
.band__inner p { color: var(--ivory-90); }
/* buttons in bands are content-width (left-aligned under the copy), not stretched */
.band__inner .btn { justify-self: start; }

/* =========================================================================
   PHOTO PLATE — real photography inside a contained plate, with a soft
   gradient scrim so the engraved mono tag stays legible (on-brand: photos
   bleed under a gradient opacity overlay rather than sitting in a frame).
   ========================================================================= */
.plate--photo { display: block; }
.plate__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
  transform: scale(1.001); /* avoid hairline edge gap */
}
.plate__photoscrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(13,13,13,.20), transparent 34%),
    linear-gradient(0deg, rgba(13,13,13,.66), rgba(13,13,13,.10) 46%, transparent 70%);
}
.plate--photo .plate__tag { z-index: 2; color: var(--ivory-72); }

/* =========================================================================
   WORK TILE — clean client logo on the ink field at rest; the project photo
   reveals cleanly on hover. Tiles without a logo yet show the client name as
   a wordmark; tiles without a photo (placeholder) simply hold their logo/name.
   ========================================================================= */
.work-tile {
  --accent: var(--ivory);
  position: relative; display: block; aspect-ratio: 16 / 11; overflow: hidden;
  border: 1px solid var(--hairline);
  background:
    radial-gradient(120% 90% at 30% 0%, rgba(241,238,231,.05), transparent 55%),
    repeating-linear-gradient(115deg, transparent 0 26px, rgba(241,238,231,.022) 26px 27px),
    var(--ink-2);
  isolation: isolate;
}
/* PHOTO — hidden at rest, fades + settles in on hover */
.work-tile__photo {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .10; transform: scale(1.04);
  transition: opacity .6s var(--ease-out), transform .9s var(--ease-out);
}
.work-tile__photoscrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0;
  background: linear-gradient(0deg, rgba(13,13,13,.62), rgba(13,13,13,.08) 52%, transparent 72%);
  transition: opacity .6s var(--ease-out);
}
/* REST — the logo (or name) sits centred on the clean field */
.work-tile__rest {
  position: absolute; inset: 0; z-index: 2; display: grid; place-items: center;
  padding: 11% 12%; opacity: 1;
  transition: opacity .5s var(--ease-out);
}
.work-tile__rest img {
  max-width: 100%; max-height: 5.1rem; width: auto; height: auto; object-fit: contain;
}
.work-tile__name {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: .12em;
  text-transform: uppercase; color: var(--ivory-72); text-align: center; line-height: 1.25;
}
/* REVEAL LABEL — client + division, appears over the photo on hover */
.work-tile__label {
  position: absolute; left: 1rem; right: 1rem; bottom: .9rem; z-index: 3;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  opacity: 0; transform: translateY(.4rem);
  transition: opacity .5s var(--ease-out) .05s, transform .5s var(--ease-out) .05s;
}
.work-tile__title { font-family: var(--font-display); font-weight: 500; font-size: 1rem; letter-spacing: .01em; color: var(--ivory); }
.work-tile__div   { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
/* division accent hairline draws along the base on hover */
.work-tile::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 4;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform .55s var(--ease-out);
}

/* hover / focus — only tiles that actually have a photo flip to it */
.work-tile--has-photo:hover .work-tile__photo,
.work-item:focus-within .work-tile--has-photo .work-tile__photo,
.work-tile--has-photo:focus-within .work-tile__photo { opacity: 1; transform: scale(1); }
.work-tile--has-photo:hover .work-tile__photoscrim,
.work-tile--has-photo:focus-within .work-tile__photoscrim { opacity: 1; }
.work-tile--has-photo:hover .work-tile__rest,
.work-tile--has-photo:focus-within .work-tile__rest { opacity: 0; }
.work-tile--has-photo:hover .work-tile__label,
.work-tile--has-photo:focus-within .work-tile__label { opacity: 1; transform: translateY(0); }
.work-tile:hover::after, .work-tile:focus-within::after { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  .work-tile__photo { transition: opacity .2s linear; transform: none; }
  .work-tile--has-photo:hover .work-tile__photo { transform: none; }
}
@media (hover: none) {
  /* touch: no hover, so reveal the photo behind a permanent soft scrim and
     keep the logo pinned top-left so each tile still shows both */
  .work-tile--has-photo .work-tile__photo { opacity: 1; transform: none; }
  .work-tile--has-photo .work-tile__photoscrim { opacity: 1; }
  .work-tile--has-photo .work-tile__rest { inset: auto auto auto 0; place-items: start;
    padding: .9rem 1rem; }
  .work-tile--has-photo .work-tile__rest img { max-height: 3rem; }
  .work-tile--has-photo .work-tile__label { opacity: 1; transform: none; }
}

/* =========================================================================
   SERVICE GRAPHICS
   Bespoke survey / instrument illustrations, one per service. No card:
   each graphic sits in the editorial media column on the dark field and
   slides in from the side on scroll. The static drawing is the default;
   line-draw + looping motion are enhancements gated behind .is-in so the
   section is never blank without JS and is calm under reduced-motion.
   ========================================================================= */
.svc-graphic { position: relative; width: 100%; aspect-ratio: 22 / 23; display: block; }
.svc-graphic > svg { width: 100%; height: 100%; overflow: visible; }

.svc-graphic .ln        { fill: none; stroke: var(--ivory); stroke-width: 1.4; stroke-linecap: square; stroke-linejoin: miter; }
.svc-graphic .ln--soft  { opacity: .42; }
.svc-graphic .ln--hair  { opacity: .16; stroke-width: 1; }
.svc-graphic .fill-soft { fill: var(--ivory); opacity: .55; stroke: none; }
.svc-graphic .fill-key  { fill: var(--ivory); stroke: none; }
.svc-graphic .lbl       { fill: var(--ivory); opacity: .5; font-family: var(--font-mono); font-size: 13px; letter-spacing: .16em; }
.svc-graphic .lbl--dim  { opacity: .3; }

/* slide-in from the side (mirrors the site's reveal pipeline) */
.reveal-ready .svc-graphic[data-svc-in]          { opacity: 0; }
.reveal-ready .svc-graphic[data-svc-in="left"]   { transform: translateX(-44px); }
.reveal-ready .svc-graphic[data-svc-in="right"]  { transform: translateX(44px); }
.reveal-ready .svc-graphic.is-in {
  opacity: 1; transform: none;
  transition: opacity 1s var(--ease-out), transform 1.15s var(--ease-out);
}

/* one-shot line draw — paths carry pathLength="1" so timing is uniform.
   The hidden start-state is gated behind .reveal-ready so that without JS
   (or before reveal) the full drawing is visible. */
.reveal-ready .svc-graphic .draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.svc-graphic.is-in .draw { animation: svc-draw 1.05s var(--ease-out) forwards; }
.svc-graphic.is-in .d1 { animation-delay: .05s; } .svc-graphic.is-in .d2 { animation-delay: .18s; }
.svc-graphic.is-in .d3 { animation-delay: .32s; } .svc-graphic.is-in .d4 { animation-delay: .46s; }
.svc-graphic.is-in .d5 { animation-delay: .60s; } .svc-graphic.is-in .d6 { animation-delay: .74s; }
@keyframes svc-draw { to { stroke-dashoffset: 0; } }

/* looping life — declared but paused until the graphic is in view */
.svc-graphic .lp-scan, .svc-graphic .lp-head, .svc-graphic .lp-rot,
.svc-graphic .lp-drift, .svc-graphic .lp-wave, .svc-graphic .lp-blink,
.svc-graphic .lp-breathe { animation-play-state: paused; }
.svc-graphic.is-in .lp-scan    { animation: svc-scan 5.5s var(--ease-in-out, ease-in-out) infinite; }
.svc-graphic.is-in .lp-head    { animation: svc-head 4.2s linear infinite; }
.svc-graphic.is-in .lp-rot     { animation: svc-rot 36s linear infinite; transform-box: fill-box; transform-origin: center; }
.svc-graphic.is-in .lp-drift   { animation: svc-drift 7s ease-in-out infinite; }
.svc-graphic.is-in .lp-wave    { animation: svc-wave 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.svc-graphic.is-in .lp-blink   { animation: svc-blink 2.4s ease-in-out infinite; }
.svc-graphic.is-in .lp-breathe { animation: svc-breathe 4.5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes svc-scan   { 0%,100% { transform: translateY(2px); } 50% { transform: translateY(298px); } }
@keyframes svc-head   { 0% { transform: translateX(0); } 100% { transform: translateX(312px); } }
@keyframes svc-rot    { to { transform: rotate(360deg); } }
@keyframes svc-drift  { 0%,100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@keyframes svc-wave   { 0%,100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }
@keyframes svc-blink  { 0%,100% { opacity: .16; } 50% { opacity: .85; } }
@keyframes svc-breathe{ 0%,100% { transform: scale(1); } 50% { transform: scale(.93); } }

@media (max-width: 860px) {
  .reveal-ready .svc-graphic[data-svc-in="left"]  { transform: translateX(-22px); }
  .reveal-ready .svc-graphic[data-svc-in="right"] { transform: translateX(22px); }
  .svc-graphic { max-width: 380px; margin-inline: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-ready .svc-graphic[data-svc-in] { opacity: 1 !important; transform: none !important; }
  .svc-graphic .draw { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
  .svc-graphic * { animation: none !important; }
}
