/* TERRAMAR POOLS — water & stone. Dark cinematic home; light text-forward inner pages. */

:root {
  /* six-token set — dark (PLAN §2) */
  --depth:   #071417;  /* page ground — pool at night */
  --basin:   #0d2126;  /* raised panel — deep water */
  --mineral: #eaf1ec;  /* primary text — mineral white */
  --stone:   #8fa5a0;  /* secondary text — wet stone */
  --caustic: #5fd3c4;  /* accent — underwater light (sparingly) */
  --sand:    #cbb492;  /* fine detail — travertine numerals/hairlines/prices */

  /* light variant — inner-page bodies (limestone paper) */
  --limestone:   #f2f0ea;
  --ink:         #101d20;
  --panel-light: #e7e3d8;
  --ink-soft:    #4f6165;  /* secondary text on light */
  --caustic-ink: #1f7a6b;  /* link/accent text with contrast on light */
  --line-light:  rgba(16, 29, 32, .14);

  --display: "Fraunces", Georgia, serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, sans-serif;

  --e-lux: cubic-bezier(0.6, 0, 0.05, 1);

  --pad-section: clamp(4.5rem, 11vh, 9rem);
  --pad-x: clamp(1.5rem, 6vw, 6rem);

  /* layered, color-tinted shadows (tint = depth) */
  --shadow-raised: 0 1px 0 rgba(234, 241, 236, .04), 0 18px 40px -24px rgba(7, 20, 23, .9);
  --shadow-float:  0 2px 0 rgba(234, 241, 236, .05), 0 40px 80px -40px rgba(7, 20, 23, .95);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--depth);
  color: var(--mineral);
  font-family: var(--body);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

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

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

::selection { background: rgba(95, 211, 196, .28); color: var(--mineral); }

/* ============================================================
   SHARED TYPE
   ============================================================ */

.eyebrow {
  font-family: var(--body);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--caustic);
  margin-bottom: 1.35rem;
}

.display {
  font-family: var(--display);
  font-weight: 300;
  font-optical-sizing: auto;
  font-size: clamp(2.2rem, 5vw, 3.9rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.display--sm {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
}

.lede {
  max-width: 40ch;
  margin-top: 1.5rem;
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--stone);
}

.lede em, .pull em { font-family: var(--display); }

.text-link {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mineral);
  border-bottom: 1px solid var(--caustic);
  padding-bottom: .4rem;
  transition: color .4s var(--e-lux), border-color .4s var(--e-lux);
}
.text-link:hover { color: var(--caustic); }
.text-link:active { color: var(--sand); }
.panel-light .lede { color: var(--ink-soft); }
.panel-light .text-link { color: var(--ink); border-bottom-color: var(--caustic-ink); }
.panel-light .text-link:hover { color: var(--caustic-ink); }

/* ============================================================
   REVEAL + GRAIN + WATERLINE DIVIDER
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--e-lux), transform 1s var(--e-lux);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .12s; }
.reveal.d2 { transition-delay: .24s; }
.reveal.d3 { transition-delay: .36s; }

.grain {
  position: fixed;
  inset: -100px;
  z-index: 60;
  pointer-events: none;
  opacity: .06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 900ms steps(3) infinite;
}
@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-40px, 25px); }
  66%  { transform: translate(30px, -35px); }
  100% { transform: translate(0, 0); }
}

/* the recurring 1px caustic waterline — section divider motif */
.waterline-rule {
  position: relative;
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg,
    transparent,
    rgba(95, 211, 196, .1) 15%,
    rgba(95, 211, 196, .55) 50%,
    rgba(95, 211, 196, .1) 85%,
    transparent);
  background-size: 220% 100%;
  animation: waterline-shimmer 9s linear infinite;
}
@keyframes waterline-shimmer {
  0%   { background-position: 0% 0; }
  100% { background-position: 220% 0; }
}
.panel-light .waterline-rule {
  background: linear-gradient(90deg,
    transparent,
    rgba(31, 122, 107, .12) 15%,
    rgba(31, 122, 107, .5) 50%,
    rgba(31, 122, 107, .12) 85%,
    transparent);
  background-size: 220% 100%;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-head {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.35rem var(--pad-x);
  background: linear-gradient(rgba(7, 20, 23, .72), transparent);
  transition: background .5s var(--e-lux);
}
.site-head::after {
  content: "";
  position: absolute;
  left: var(--pad-x); right: var(--pad-x); bottom: 0;
  height: 1px;
  background: rgba(234, 241, 236, .08);
  opacity: 0;
  transition: opacity .5s var(--e-lux);
}
.site-head.is-stuck::after { opacity: 1; }

.wordmark {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: .34em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mineral);
  white-space: nowrap;
}

.site-nav { display: flex; align-items: center; gap: clamp(1.1rem, 2.6vw, 2.4rem); }

.site-nav a {
  font-family: var(--body);
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--stone);
  transition: color .35s var(--e-lux);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--mineral); }
.site-nav a:active { color: var(--caustic); }

.nav-cta {
  font-family: var(--body);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mineral);
  border: 1px solid rgba(95, 211, 196, .5);
  border-radius: 999px;
  padding: .62rem 1.25rem;
  transition: background .4s var(--e-lux), color .4s var(--e-lux), border-color .4s var(--e-lux);
}
.nav-cta:hover { background: var(--caustic); color: var(--depth); border-color: var(--caustic); }
.nav-cta:active { background: var(--sand); border-color: var(--sand); }

/* header recolor over light sections */
.site-head.header--on-light {
  background: linear-gradient(rgba(242, 240, 234, .85), transparent);
}
.header--on-light .wordmark { color: var(--ink); }
.header--on-light .site-nav a { color: var(--ink-soft); }
.header--on-light .site-nav a:hover,
.header--on-light .site-nav a[aria-current="page"] { color: var(--ink); }
.header--on-light .nav-cta { color: var(--ink); border-color: rgba(31, 122, 107, .55); }
.header--on-light .nav-cta:hover { background: var(--caustic-ink); color: var(--limestone); border-color: var(--caustic-ink); }
.header--on-light::after { background: rgba(16, 29, 32, .12); }

/* ============================================================
   HERO — scroll-scrubbed underwater ascent + waterline wordmark
   ============================================================ */

.hero-track { height: 225vh; position: relative; background: var(--depth); }

.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.hero-poster,
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-poster { z-index: 0; }
.hero-video { z-index: 1; opacity: 0; transition: opacity .8s ease; }
body[data-scrub="ready"] .hero-video,
body[data-scrub="playing"] .hero-video { opacity: 1; }

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    radial-gradient(ellipse at 50% 42%, transparent 34%, rgba(7, 20, 23, .55) 100%),
    linear-gradient(rgba(7, 20, 23, .5), transparent 26%, transparent 60%, var(--depth) 99%);
}

.hero-copy {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.25rem;
  will-change: opacity;
}

.hero-eyebrow {
  font-family: var(--body);
  font-size: clamp(.66rem, 1.1vw, .78rem);
  font-weight: 600;
  letter-spacing: .42em;
  text-transform: uppercase;
  color: var(--caustic);
  margin-bottom: clamp(1.4rem, 3vh, 2.4rem);
  opacity: 0;
  transition: opacity 1.6s ease .3s;
  text-shadow: 0 2px 20px rgba(7, 20, 23, .8);
}
.hero-mark.is-in ~ .hero-eyebrow,
.hero-eyebrow.is-in { opacity: 1; }

/* --- signature: half-submerged TERRAMAR wordmark --- */
.hero-mark {
  position: relative;
  display: inline-block;
  line-height: .92;
}
.wm {
  display: block;
  font-family: var(--display);
  font-weight: 300;
  font-optical-sizing: auto;
  font-size: clamp(2.6rem, 12vw, 10rem);
  letter-spacing: .34em;
  text-indent: .34em; /* balance trailing track */
  text-transform: uppercase;
  white-space: nowrap;
}
.wm-base {
  color: var(--mineral);
  opacity: 0;
  transition: letter-spacing 2.4s var(--e-lux), text-indent 2.4s var(--e-lux), opacity 1.8s ease;
  text-shadow: 0 4px 40px rgba(7, 20, 23, .7);
}
.hero-mark.is-in .wm-base {
  letter-spacing: .12em;
  text-indent: .12em;
  opacity: 1;
}
/* submerged duplicate: clipped to lower portion, caustic-tinted, refracted */
.wm-sub {
  position: absolute;
  inset: 0;
  color: var(--caustic);
  opacity: 0;
  mix-blend-mode: screen;
  clip-path: inset(52% 0 -8% 0);
  filter: url(#refract) brightness(1.05);
  transition: letter-spacing 2.4s var(--e-lux), text-indent 2.4s var(--e-lux), opacity 1.8s ease .2s;
}
.hero-mark.is-in .wm-sub {
  letter-spacing: .12em;
  text-indent: .12em;
  opacity: .55;
}
/* the 1px caustic waterline running through the wordmark */
.wm-line {
  position: absolute;
  left: -6%; right: -6%;
  top: 52%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent, rgba(95, 211, 196, .15) 12%,
    rgba(95, 211, 196, .85) 50%,
    rgba(95, 211, 196, .15) 88%, transparent);
  box-shadow: 0 0 14px rgba(95, 211, 196, .5);
  opacity: 0;
  transform: scaleX(.6);
  transform-origin: center;
  transition: opacity 1.6s ease .6s, transform 2s var(--e-lux) .6s;
}
.hero-mark.is-in .wm-line { opacity: 1; transform: scaleX(1); }

.hero-h1 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.05rem, 2.1vw, 1.55rem);
  line-height: 1.4;
  letter-spacing: .01em;
  color: var(--mineral);
  margin-top: clamp(1.6rem, 3.6vh, 2.8rem);
  opacity: 0;
  transition: opacity 1.6s ease .8s;
  text-shadow: 0 2px 20px rgba(7, 20, 23, .85);
}
.hero-mark.is-in ~ .hero-h1 { opacity: 1; }

.hero-cta {
  margin-top: clamp(1.6rem, 3.4vh, 2.4rem);
  opacity: 0;
  transition: opacity 1.6s ease 1s;
}
.hero-mark.is-in ~ .hero-cta { opacity: 1; }

.hero-cue {
  position: absolute;
  z-index: 3;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  color: var(--stone);
  font-family: var(--body);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .4em;
  text-transform: uppercase;
}
.hero-cue i {
  width: 1px;
  height: 46px;
  background: linear-gradient(var(--caustic), transparent);
  animation: cue-drop 2.6s ease-in-out infinite;
}
@keyframes cue-drop {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-block;
  font-family: var(--body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  padding: .95rem 1.9rem;
  border-radius: 999px;
  border: 1px solid var(--caustic);
  background: var(--caustic);
  color: var(--depth);
  transition: background .4s var(--e-lux), color .4s var(--e-lux), transform .4s var(--e-lux), border-color .4s var(--e-lux);
}
.btn:hover { background: transparent; color: var(--caustic); transform: translateY(-2px); }
.btn:active { transform: translateY(0); color: var(--sand); border-color: var(--sand); }

.btn--ghost {
  background: transparent;
  color: var(--mineral);
  border-color: rgba(234, 241, 236, .35);
}
.btn--ghost:hover { border-color: var(--caustic); color: var(--caustic); background: transparent; }

.panel-light .btn { color: var(--limestone); background: var(--caustic-ink); border-color: var(--caustic-ink); }
.panel-light .btn:hover { background: transparent; color: var(--caustic-ink); }
.panel-light .btn--ghost { color: var(--ink); border-color: var(--line-light); background: transparent; }
.panel-light .btn--ghost:hover { border-color: var(--caustic-ink); color: var(--caustic-ink); }

/* ============================================================
   HOME — STATEMENT
   ============================================================ */

.statement {
  position: relative;
  z-index: 2;
  background: var(--depth);
  padding: var(--pad-section) var(--pad-x);
}
.statement-inner {
  max-width: 72rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: center;
}
.statement-lead {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.7rem, 3.4vw, 2.9rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
}
.statement-lead .accent { color: var(--caustic); font-style: italic; }
.statement-body { color: var(--stone); margin-top: 1.75rem; }
.statement-body p + p { margin-top: 1.2rem; }
.statement-figure {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: var(--shadow-float);
}
.statement-figure img { width: 100%; height: 100%; object-fit: cover; }
.statement-figure::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7, 20, 23, .55), transparent 55%);
}

/* ============================================================
   HOME — FILM SECTION (dusk swim)
   ============================================================ */

.film-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--depth);
}
.film-media {
  position: absolute;
  inset: -12% 0;
  z-index: 0;
  will-change: transform;
}
.film-media video,
.film-media img { width: 100%; height: 100%; object-fit: cover; }
.film-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, rgba(7, 20, 23, .86) 18%, rgba(7, 20, 23, .3) 62%, rgba(7, 20, 23, .55)),
    linear-gradient(var(--depth), transparent 14%, transparent 84%, var(--depth));
}
.film-copy {
  position: relative;
  z-index: 2;
  padding: clamp(6rem, 14vh, 10rem) var(--pad-x);
  max-width: 44rem;
}

/* ============================================================
   HOME — SERVICES TRIPTYCH
   ============================================================ */

.section {
  position: relative;
  z-index: 2;
  background: var(--depth);
  padding: var(--pad-section) var(--pad-x);
}
.section-head { max-width: 60rem; margin: 0 auto 3.5rem; }
.section-head.center { text-align: center; }
.section-head.center .lede { margin-left: auto; margin-right: auto; }

.triptych {
  max-width: 76rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(234, 241, 236, .09);
  border: 1px solid rgba(234, 241, 236, .09);
}
.service-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 22rem;
  padding: clamp(1.75rem, 3vw, 2.6rem);
  background: var(--basin);
  text-decoration: none;
  color: var(--mineral);
  overflow: hidden;
  transition: background .5s var(--e-lux);
}
.service-panel::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: var(--caustic);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .6s var(--e-lux);
}
.service-panel:hover { background: #103038; }
.service-panel:hover::before,
.service-panel:focus-visible::before { transform: scaleY(1); }
.service-index {
  font-family: var(--display);
  font-size: .9rem;
  color: var(--sand);
  letter-spacing: .1em;
}
.service-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1.12;
  margin-top: auto;
}
.service-desc { color: var(--stone); margin-top: 1rem; font-size: 1rem; }
.service-more {
  margin-top: 1.5rem;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--caustic);
}

/* ============================================================
   HOME — PROCESS (five acts)
   ============================================================ */

.process { max-width: 72rem; margin: 0 auto; }
.act {
  display: grid;
  grid-template-columns: minmax(0, 5rem) 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding: clamp(1.75rem, 4vh, 2.75rem) 0;
  border-top: 1px solid rgba(234, 241, 236, .1);
  align-items: baseline;
}
.act:last-child { border-bottom: 1px solid rgba(234, 241, 236, .1); }
.act-num {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: var(--sand);
  font-variant-numeric: oldstyle-nums;
}
.act-body h3 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.35rem, 2.4vw, 1.9rem);
  line-height: 1.1;
}
.act-body p { color: var(--stone); margin-top: .7rem; max-width: 48ch; }

/* ============================================================
   PROJECT CARDS (home featured + projects index)
   ============================================================ */

.card-grid {
  max-width: 78rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.project-card {
  display: block;
  text-decoration: none;
  color: var(--mineral);
  background: var(--basin);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--shadow-raised);
  transition: transform .5s var(--e-lux), box-shadow .5s var(--e-lux);
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-float); }
.project-figure {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
}
.project-figure img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--e-lux);
}
.project-card:hover .project-figure img { transform: scale(1.05); }
.project-figure::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7, 20, 23, .5), transparent 50%);
}
.project-info { padding: 1.4rem 1.5rem 1.7rem; }
.project-loc {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--caustic);
}
.project-name {
  font-family: var(--display);
  font-weight: 300;
  font-size: 1.5rem;
  line-height: 1.1;
  margin-top: .6rem;
}
.project-specs {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.1rem;
  font-size: .82rem;
  color: var(--stone);
}
.project-specs span { position: relative; }
.project-specs span + span::before {
  content: "·";
  color: var(--sand);
  margin-right: 1.1rem;
}

/* ============================================================
   HOME — REVIEWS
   ============================================================ */

.reviews-score {
  margin-top: 1.2rem;
  font-family: var(--body);
  font-size: .95rem;
  color: var(--stone);
}
.reviews-score b { color: var(--mineral); font-weight: 500; }
.review-stars {
  color: var(--sand);
  font-size: .78rem;
  letter-spacing: .32em;
}
.review-stars--lg { font-size: .92rem; margin-right: .5rem; }
.reviews-grid {
  max-width: 74rem;
  margin: 3.5rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.review-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
  background: var(--basin);
  border: 1px solid rgba(234, 241, 236, .08);
  border-radius: 3px;
  padding: 1.9rem 1.8rem 1.7rem;
  box-shadow: var(--shadow-raised);
}
.review-card blockquote {
  flex: 1;
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: 1.14rem;
  line-height: 1.45;
}
.review-card cite {
  display: block;
  font-family: var(--body);
  font-style: normal;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sand);
}
.review-date {
  display: block;
  margin-top: .45rem;
  font-weight: 400;
  letter-spacing: .12em;
  color: var(--stone);
}
@media (max-width: 980px) {
  .reviews-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .reviews-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   HOME — COST BAND
   ============================================================ */

.cost-band {
  position: relative;
  z-index: 2;
  background: var(--basin);
  padding: var(--pad-section) var(--pad-x);
  border-top: 1px solid rgba(234, 241, 236, .08);
  border-bottom: 1px solid rgba(234, 241, 236, .08);
}
.cost-inner {
  max-width: 60rem;
  margin: 0 auto;
  text-align: center;
}
.cost-range {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  line-height: 1.3;
  margin-top: 1.5rem;
}
.cost-range b { color: var(--sand); font-weight: 400; }

/* ============================================================
   FORMS (consultation / contact)
   ============================================================ */

.form-section {
  position: relative;
  z-index: 2;
  background: var(--depth);
  padding: var(--pad-section) var(--pad-x);
}
.form-wrap {
  max-width: 44rem;
  margin: 2.5rem auto 0;
  background: var(--basin);
  border: 1px solid rgba(95, 211, 196, .16);
  border-radius: 3px;
  padding: clamp(1.75rem, 4vw, 3rem);
  box-shadow: var(--shadow-raised);
}
.field { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1.6rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.field label {
  font-family: var(--body);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--stone);
}
.field input,
.field select,
.field textarea {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(234, 241, 236, .22);
  border-radius: 0;
  color: var(--mineral);
  font-family: var(--body);
  font-size: 1.02rem;
  padding: .55rem 0;
  transition: border-color .4s var(--e-lux);
}
.field textarea { resize: vertical; min-height: 3.5rem; }
.field select option { background: var(--basin); color: var(--mineral); }
.field input::placeholder,
.field textarea::placeholder { color: rgba(143, 165, 160, .6); }
.field input:focus,
.field select:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--caustic); }

.form-hint {
  margin-top: 1.2rem;
  font-size: .92rem;
  color: var(--stone);
  text-align: center;
}
.form-confirm .eyebrow { text-align: left; }
.form-confirm .display { margin-top: .4rem; }

/* light form variant */
.panel-light .form-wrap {
  background: var(--panel-light);
  border-color: var(--line-light);
  box-shadow: 0 30px 60px -40px rgba(16, 29, 32, .3);
}
.panel-light .field label { color: var(--ink-soft); }
.panel-light .field input,
.panel-light .field select,
.panel-light .field textarea {
  color: var(--ink);
  border-bottom-color: rgba(16, 29, 32, .22);
}
.panel-light .field select option { background: var(--panel-light); color: var(--ink); }
.panel-light .field input:focus,
.panel-light .field select:focus,
.panel-light .field textarea:focus { border-bottom-color: var(--caustic-ink); }
.panel-light .form-hint { color: var(--ink-soft); }

/* ============================================================
   FOOTER
   ============================================================ */

.site-foot {
  position: relative;
  z-index: 2;
  background: var(--depth);
  padding: clamp(3.5rem, 8vh, 6rem) var(--pad-x) 2.5rem;
  border-top: 1px solid rgba(234, 241, 236, .08);
}
.foot-top {
  max-width: 78rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.foot-wordmark {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: .95;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.foot-tag { color: var(--stone); font-style: italic; font-family: var(--display); margin-top: .8rem; }
.foot-col h4 {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--caustic);
  margin-bottom: 1.1rem;
}
.foot-col a, .foot-col p {
  display: block;
  text-decoration: none;
  color: var(--stone);
  font-size: .96rem;
  padding: .28rem 0;
  transition: color .35s var(--e-lux);
}
.foot-col a:hover { color: var(--mineral); }
.foot-nap { font-style: normal; }
.foot-nap a:hover { color: var(--caustic); }
.foot-bottom {
  max-width: 78rem;
  margin: 3rem auto 0;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(234, 241, 236, .08);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: .82rem;
  color: var(--stone);
}
.foot-bottom a { color: var(--stone); text-decoration: none; }
.foot-bottom a:hover { color: var(--mineral); }

/* ============================================================
   INNER PAGE TEMPLATE
   ============================================================ */

.page-hero {
  position: relative;
  min-height: clamp(60vh, 68vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--depth);
}
.page-hero-media { position: absolute; inset: 0; z-index: 0; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.page-hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(15deg, rgba(7, 20, 23, .9) 20%, rgba(7, 20, 23, .4) 70%),
    linear-gradient(rgba(7, 20, 23, .55), transparent 30%, transparent 55%, var(--depth));
}
.page-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 78rem;
  margin: 0 auto;
  padding: clamp(6rem, 12vh, 8rem) var(--pad-x) clamp(3rem, 7vh, 5rem);
}
.page-hero h1 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  max-width: 20ch;
}
.page-hero .lede { color: var(--mineral); opacity: .82; max-width: 46ch; }
.breadcrumb {
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 1.4rem;
}
.breadcrumb a { text-decoration: none; color: var(--stone); transition: color .35s var(--e-lux); }
.breadcrumb a:hover { color: var(--caustic); }
.breadcrumb span[aria-hidden] { color: var(--sand); margin: 0 .5rem; }

/* light body */
.panel-light {
  background: var(--limestone);
  color: var(--ink);
}
.prose-section {
  padding: var(--pad-section) var(--pad-x);
}
.prose {
  max-width: 42rem;
  margin: 0 auto;
}
.prose.wide { max-width: 60rem; }
.prose .eyebrow { color: var(--caustic-ink); }
.prose h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 1.1rem;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  margin: 2rem 0 .6rem;
}
.prose p { color: var(--ink); margin-bottom: 1.15rem; }
.prose p.muted { color: var(--ink-soft); }
.prose a:not(.btn):not(.text-link) {
  color: var(--caustic-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.prose ul { list-style: none; margin: 0 0 1.4rem; }
.prose li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: .6rem;
  color: var(--ink);
}
.prose li::before {
  content: "";
  position: absolute;
  left: 0; top: .68em;
  width: .5rem; height: 1px;
  background: var(--caustic-ink);
}
.prose .lede { color: var(--ink-soft); }
.prose blockquote.pull {
  font-family: var(--display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  line-height: 1.3;
  color: var(--ink);
  margin: 2.5rem 0;
  padding-left: 1.5rem;
  border-left: 2px solid var(--caustic-ink);
}

/* spec table (case studies + cost) */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
  font-size: .98rem;
}
.spec-table th,
.spec-table td {
  text-align: left;
  padding: .95rem 1rem;
  border-bottom: 1px solid var(--line-light);
  vertical-align: top;
}
.spec-table th {
  font-family: var(--body);
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  width: 34%;
}
.spec-table td { color: var(--ink); }
.spec-table .price { color: var(--caustic-ink); font-variant-numeric: oldstyle-nums; }

/* FAQ */
.faq { margin-top: 1rem; }
.faq details {
  border-bottom: 1px solid var(--line-light);
  padding: 1.2rem 0;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  transition: color .3s var(--e-lux);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--body);
  font-weight: 400;
  color: var(--caustic-ink);
  font-size: 1.4rem;
  transition: transform .4s var(--e-lux);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--caustic-ink); }
.faq details p { margin: .9rem 0 0; color: var(--ink-soft); }

/* content figures on light pages */
.content-figure {
  margin: 2rem 0;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 30px 60px -40px rgba(16, 29, 32, .4);
}
.content-figure img { width: 100%; height: auto; }
.content-figure figcaption {
  font-family: var(--display);
  font-style: italic;
  font-size: .92rem;
  color: var(--ink-soft);
  padding: .8rem 0 0;
}
.figure-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}
.figure-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 2px; }

/* CTA band (inner pages) */
.cta-band {
  position: relative;
  z-index: 2;
  background: var(--depth);
  color: var(--mineral);
  padding: var(--pad-section) var(--pad-x);
  text-align: center;
}
.cta-band h2 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.08;
  max-width: 20ch;
  margin: 1.2rem auto 0;
}
.cta-band .btn { margin-top: 2rem; }

/* projects index intro */
.index-intro {
  max-width: 60rem;
  margin: 0 auto var(--pad-section);
  text-align: center;
}

/* service-area list (contact) */
.area-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .4rem 2rem;
  margin: 1rem 0 0;
  list-style: none;
}
.area-list li { padding-left: 1.4rem; }
.contact-grid {
  max-width: 68rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.contact-info .nap-block {
  font-style: normal;
  line-height: 2;
  color: var(--ink);
  margin-top: 1.5rem;
}
.contact-info .nap-block a { color: var(--caustic-ink); text-decoration: none; }
.contact-info .nap-block a:hover { text-decoration: underline; }
.hours-list { margin-top: 1.75rem; }
.hours-list div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 24rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line-light);
}
.hours-list dt { color: var(--ink-soft); }
.hours-list dd { font-family: var(--display); }

/* 404 */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem var(--pad-x);
  background: var(--depth);
}
.error-page .big {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3rem, 12vw, 8rem);
  line-height: 1;
  color: var(--sand);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .statement-inner { grid-template-columns: 1fr; }
  .statement-figure { max-width: 22rem; aspect-ratio: 4/3; }
  .triptych { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .quotes { grid-template-columns: 1fr; gap: 3rem; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .figure-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .site-nav a:not(.nav-cta) { display: none; }
  .hero-track { height: 180vh; }
  .wm { letter-spacing: .18em; text-indent: .18em; }
  .hero-mark.is-in .wm-base,
  .hero-mark.is-in .wm-sub { letter-spacing: .06em; text-indent: .06em; }
  .card-grid { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .area-list { grid-template-columns: 1fr; }
  .act { grid-template-columns: 3rem 1fr; gap: 1.25rem; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain,
  .hero-cue i,
  .waterline-rule,
  .wm-line { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-eyebrow,
  .hero-h1,
  .hero-cta,
  .wm-base,
  .wm-sub,
  .wm-line { opacity: 1; transition: none; }
  .wm-base { letter-spacing: .12em; text-indent: .12em; }
  .wm-sub { letter-spacing: .12em; text-indent: .12em; opacity: .5; }
  .wm-line { transform: none; }
  .film-media { inset: 0; }
  .project-card:hover { transform: none; }
}

/* ============================================================
   DEV HOOKS — ?static / ?static&only=  (added via body classes by JS)
   ============================================================ */

body.dev-static .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
body.dev-static .grain { display: none; }
body.dev-static .hero-track { height: 820px !important; }
body.dev-static .hero-stage { position: relative; height: 820px; }
body.dev-static .film-section { min-height: 720px !important; }
body.dev-static .page-hero { min-height: 620px !important; }
body.dev-static .hero-eyebrow,
body.dev-static .hero-h1,
body.dev-static .hero-cta,
body.dev-static .wm-base,
body.dev-static .wm-sub,
body.dev-static .wm-line { opacity: 1 !important; transition: none !important; }
body.dev-static .wm-base { letter-spacing: .12em !important; text-indent: .12em !important; }
body.dev-static .wm-sub { letter-spacing: .12em !important; text-indent: .12em !important; opacity: .5 !important; }
body.dev-static .wm-line { transform: none !important; }
[data-dev-hidden] { display: none !important; }
[data-dev-solo] { min-height: 0 !important; }

/* ============================================================
   MOBILE MENU (elements injected by main.js)
   ============================================================ */

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.menu-line {
  width: 22px;
  height: 1.5px;
  background: var(--mineral);
  transition: transform .5s var(--e-lux), background-color .35s var(--e-lux);
}
.header--on-light .menu-line { background: var(--ink); }
body.menu-open .menu-line { background: var(--mineral); }
body.menu-open .menu-line:first-child { transform: translateY(4.25px) rotate(45deg); }
body.menu-open .menu-line:last-child { transform: translateY(-4.25px) rotate(-45deg); }
.menu-btn:focus-visible { outline: 1px solid var(--caustic); outline-offset: 3px; }
.menu-btn:active .menu-line { background: var(--caustic); }

.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 40; /* below the fixed header (50): wordmark + button stay usable */
  display: none;
  flex-direction: column;
  justify-content: center;
  padding: 6.5rem var(--pad-x) 3rem;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(13, 33, 38, .92), transparent 60%),
    var(--depth);
  opacity: 0;
  visibility: hidden;
  transition: opacity .55s var(--e-lux), visibility 0s .55s;
}
body.menu-open .menu-overlay {
  opacity: 1;
  visibility: visible;
  transition: opacity .55s var(--e-lux);
}
body.menu-open { overflow: hidden; }
/* the header must read dark while the overlay is up, whatever section is behind it */
body.menu-open .site-head { background: none; }
body.menu-open .site-head .wordmark { color: var(--mineral); }
body.menu-open .site-head .nav-cta { color: var(--mineral); border-color: rgba(95, 211, 196, .45); }
body.menu-open .site-head::after { opacity: 0; }

.menu-links { display: flex; flex-direction: column; }
.menu-links a {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.1rem, 9.5vw, 3rem);
  line-height: 1.5;
  text-decoration: none;
  color: var(--mineral);
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s var(--e-lux), transform .7s var(--e-lux), color .35s var(--e-lux);
}
.menu-links a:hover, .menu-links a[aria-current="page"] { color: var(--caustic); }
.menu-links a:active { color: var(--sand); }
.menu-links a:focus-visible { outline: 1px solid var(--caustic); outline-offset: 4px; }
body.menu-open .menu-links a { opacity: 1; transform: none; }
body.menu-open .menu-links a:nth-child(1) { transition-delay: .08s; }
body.menu-open .menu-links a:nth-child(2) { transition-delay: .16s; }
body.menu-open .menu-links a:nth-child(3) { transition-delay: .24s; }
body.menu-open .menu-links a:nth-child(4) { transition-delay: .32s; }

.menu-waterline {
  height: 1px;
  margin: 2rem 0;
  background: linear-gradient(90deg,
    rgba(95, 211, 196, .85), rgba(95, 211, 196, .15) 70%, transparent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.1s var(--e-lux) .35s;
}
body.menu-open .menu-waterline { transform: scaleX(1); }

.menu-cta { align-self: flex-start; opacity: 0; transition: opacity .7s var(--e-lux) .4s; }
body.menu-open .menu-cta { opacity: 1; }

.menu-nap {
  margin-top: 2.2rem;
  font-size: .82rem;
  color: var(--stone);
  opacity: 0;
  transition: opacity .7s var(--e-lux) .48s;
}
.menu-nap a { color: var(--stone); }
.menu-nap a:hover { color: var(--caustic); }
body.menu-open .menu-nap { opacity: 1; }

@media (max-width: 680px) {
  .menu-btn { display: flex; }
  .menu-overlay { display: flex; }
  .site-head { gap: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .menu-line, .menu-overlay, .menu-links a, .menu-waterline, .menu-cta, .menu-nap {
    transition: none;
  }
  .menu-links a { transform: none; }
  .menu-waterline { transform: none; }
}

/* dev: ?menu capture — skip entry staggering so scroll-0 shots show the settled state */
body.dev-static .menu-links a,
body.dev-static .menu-waterline,
body.dev-static .menu-cta,
body.dev-static .menu-nap,
body.dev-static .menu-overlay { transition: none !important; }

/* ============================================================
   CONSULTATION MODAL (JS-injected; every "Book a consultation"
   CTA opens this instead of navigating to /contact/)
   ============================================================ */

.consult-modal {
  position: fixed;
  inset: 0;
  z-index: 60; /* above header (50) and menu overlay (40) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  background: rgba(7, 20, 23, .72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .55s var(--e-lux), visibility 0s linear .55s;
}
body.modal-open .consult-modal {
  opacity: 1;
  visibility: visible;
  transition: opacity .55s var(--e-lux);
}
body.modal-open { overflow: hidden; }

.consult-modal-panel {
  position: relative;
  width: min(34rem, 100%);
  max-height: min(92vh, 100%);
  overflow-y: auto;
  background: var(--basin);
  border: 1px solid rgba(95, 211, 196, .16);
  border-radius: 3px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: var(--shadow-raised), 0 40px 90px -30px rgba(0, 0, 0, .8);
  transform: translateY(26px) scale(.985);
  transition: transform .55s var(--e-lux);
}
body.modal-open .consult-modal-panel { transform: none; }

/* caustic waterline across the panel's top edge */
.consult-modal-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(95, 211, 196, .75) 30%, rgba(95, 211, 196, .75) 70%, transparent);
  box-shadow: 0 0 14px rgba(95, 211, 196, .45);
}

.cm-close {
  position: absolute;
  top: .9rem;
  right: .9rem;
  width: 2.4rem;
  height: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--stone);
  font-family: var(--body);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: color .35s var(--e-lux), transform .35s var(--e-lux);
}
.cm-close:hover { color: var(--caustic); transform: rotate(90deg); }
.cm-close:active { transform: rotate(90deg) scale(.92); }
.cm-close:focus-visible { outline: 2px solid var(--caustic); outline-offset: 2px; }

.consult-modal .eyebrow { text-align: left; }
.cm-title { margin-top: .5rem; }
.cm-lede {
  margin: .9rem 0 1.7rem;
  font-size: .95rem;
  line-height: 1.65;
  color: var(--stone);
}
.consult-modal .field { margin-bottom: 1.25rem; }
.consult-modal .form-hint { margin-top: 1rem; font-size: .85rem; }
.cm-confirm .display { margin-top: .5rem; }

@media (max-width: 640px) {
  .consult-modal { align-items: flex-end; padding: 0; }
  .consult-modal-panel {
    width: 100%;
    max-height: 88vh;
    border-radius: 3px 3px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }
  .consult-modal .field-row { grid-template-columns: 1fr; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .consult-modal, .consult-modal-panel, .cm-close { transition: none; }
  .consult-modal-panel { transform: none; }
}

/* dev: ?modal capture — settled state at scroll 0 */
body.dev-static .consult-modal,
body.dev-static .consult-modal-panel { transition: none !important; }
