/* ==========================================================================
   HARBOR POINT CUSTOM HOMES
   Design system — built to the 2026 Brand Guidelines
   Palette, typography and rule motifs taken directly from the style guide.
   ========================================================================== */

/* ---------- 1. Tokens ---------------------------------------------------- */
:root {
  /* Brand palette — exact values from the guidelines, p.06 */
  --navy:        #0A1628;
  --harbor:      #0E4D6E;
  --teal:        #1A8FA8;
  --seafoam:     #99C7CD;
  --gold:        #C9AA72;
  --shell:       #EFECE6;
  --white:       #FFFFFF;

  /* Derived tints — for surfaces, borders and washes only */
  --navy-90:     rgba(10, 22, 40, 0.90);
  --navy-70:     rgba(10, 22, 40, 0.70);
  --navy-40:     rgba(10, 22, 40, 0.40);
  --navy-08:     rgba(10, 22, 40, 0.08);
  --shell-70:    rgba(239, 236, 230, 0.70);
  --shell-45:    rgba(239, 236, 230, 0.45);
  --shell-14:    rgba(239, 236, 230, 0.14);
  --gold-40:     rgba(201, 170, 114, 0.40);
  --gold-18:     rgba(201, 170, 114, 0.18);
  --harbor-06:   rgba(14, 77, 110, 0.06);

  /* Accent ink for small labels, numerals and eyebrows.
     Gold reads beautifully on navy but only hits 1.9:1 on the shell ground,
     so on light surfaces the accent resolves to Harbor blue instead. Both are
     brand colours — the switch is contrast, not a new palette. */
  --accent-ink:  var(--harbor);

  /* Type — brand fonts first, licensed web fallbacks second */
  --font-display: "Goldenbook", "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-body:    "Brooklyn", "Jost", "Poppins", "Century Gothic", "Helvetica Neue", Arial, sans-serif;

  /* Fluid type scale */
  --fs-hero:    clamp(3.1rem, 1.6rem + 6.4vw, 8rem);
  --fs-h1:      clamp(2.6rem, 1.5rem + 4.4vw, 5.6rem);
  --fs-h2:      clamp(2.1rem, 1.35rem + 2.9vw, 3.9rem);
  --fs-h3:      clamp(1.5rem, 1.15rem + 1.3vw, 2.1rem);
  --fs-h4:      clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  --fs-lead:    clamp(1.06rem, 0.97rem + 0.42vw, 1.32rem);
  --fs-body:    clamp(0.98rem, 0.94rem + 0.16vw, 1.06rem);
  --fs-small:   0.86rem;
  --fs-eyebrow: 0.72rem;

  /* Rhythm */
  --gutter:     clamp(1.5rem, 1rem + 2.6vw, 4.5rem);
  --section:    clamp(5rem, 3rem + 8vw, 11rem);
  --measure:    68ch;
  --maxw:       1560px;
  --maxw-text:  1180px;

  /* Motion */
  --ease:       cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h:      92px;
}

@media (max-width: 900px) { :root { --nav-h: 72px; } }

/* ---------- 2. Reset ----------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 1.75;
  color: var(--navy);
  background: var(--shell);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

::selection { background: var(--gold); color: var(--navy); }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--navy); color: var(--shell);
  padding: 0.9rem 1.4rem; font-size: var(--fs-small);
  letter-spacing: 0.12em; text-transform: uppercase;
}
.skip-link:focus { left: 0; }

/* ---------- 3. Typography ------------------------------------------------ */
h1, h2, h3, h4, .display {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; font-weight: 500; }
h4 { font-size: var(--fs-h4); line-height: 1.3; font-weight: 500; }

/* Editorial italic accent inside display type. Colour follows the
   accent-ink system: gold on dark grounds, Harbor blue on light. */
h1 em, h2 em, h3 em, .display em, .quote__text em {
  font-style: italic;
  font-weight: inherit;
  color: var(--accent-ink);
}

p { text-wrap: pretty; }
p + p { margin-top: 1.15em; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.72;
  font-weight: 300;
  color: var(--navy-70);
  max-width: 62ch;
}
.on-dark .lead, .dark .lead, .cta-band .lead { color: var(--shell-70); }

.measure { max-width: var(--measure); }

/* Eyebrow — the letterspaced label from the guideline page headers */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 400;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 1.6rem;
}
.eyebrow--navy { color: var(--harbor); }

/* Hairline rule + label, lifted from the brand book page furniture */
.rule-head {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  margin-bottom: clamp(2.4rem, 4vw, 4rem);
}
.rule-head__label {
  flex: none;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.rule-head__line {
  flex: 1 1 auto;
  height: 1px;
  background: var(--gold-40);
}
.rule-head__num {
  flex: none;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.24em;
  color: var(--accent-ink);
  opacity: 0.75;
}
.on-dark .rule-head__line { background: var(--shell-14); }

/* Gold flourish under a heading */
.flourish {
  width: 62px; height: 1px;
  background: var(--gold);
  margin: 2rem 0 0;
}
.flourish--center { margin-inline: auto; }

/* ---------- 4. Layout ---------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--text { max-width: var(--maxw-text); }

.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(3.5rem, 2rem + 5vw, 7rem); }

.bg-shell { background: var(--shell); }
.bg-white { background: var(--white); }
.bg-navy  { background: var(--navy); color: var(--shell); }
.bg-harbor{ background: var(--harbor); color: var(--shell); }

.bg-navy h1, .bg-navy h2, .bg-navy h3, .bg-navy h4,
.bg-harbor h1, .bg-harbor h2, .bg-harbor h3, .bg-harbor h4 { color: var(--shell); }

/* On any dark ground the accent returns to gold. */
.bg-navy, .bg-harbor, .on-dark, .hero, .cta-band, .site-header, .site-footer,
.pagehead {
  --accent-ink: var(--gold);
}

.center { text-align: center; }
.center .lead, .center .measure { margin-inline: auto; }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.75rem); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1000px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* Editorial split — image one side, copy the other */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(2.5rem, 5vw, 6.5rem);
}
.split--wide-media { grid-template-columns: 1.15fr 1fr; }
.split--wide-copy  { grid-template-columns: 1fr 1.15fr; }
.split__copy { max-width: 56ch; }
/* Headings sit in a narrower column here, so ease the display size down a
   step to keep the intended manual line breaks from wrapping twice. */
.split__copy h2 { font-size: clamp(2rem, 1.3rem + 2.25vw, 3.15rem); }
@media (max-width: 900px) {
  .split, .split--wide-media, .split--wide-copy { grid-template-columns: minmax(0, 1fr); }
  .split--flip > * { order: 0 !important; }
}
.split--flip .split__media { order: 2; }
.split--flip .split__copy  { order: 1; }

/* ---------- 5. Buttons --------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.85em;
  padding: 1.12em 2.35em;
  font-size: var(--fs-small);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.45s var(--ease), background-color 0.45s var(--ease),
              border-color 0.45s var(--ease);
  white-space: nowrap;
}
.btn::after {
  content: "";
  position: absolute; inset: 0;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.5s var(--ease-out);
  z-index: 0;
  opacity: 0.001;
}
.btn > * { position: relative; z-index: 1; }
.btn .btn__arrow {
  display: inline-block;
  transition: transform 0.45s var(--ease-out);
}
.btn:hover .btn__arrow { transform: translateX(5px); }

.btn--gold { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn--gold:hover { background: var(--navy); color: var(--shell); border-color: var(--navy); }

.btn--navy { background: var(--navy); color: var(--shell); border-color: var(--navy); }
.btn--navy:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }

.btn--outline { border-color: var(--navy-40); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: var(--shell); border-color: var(--navy); }

.btn--ghost { border-color: var(--shell-45); color: var(--shell); }
.btn--ghost:hover { background: var(--shell); color: var(--navy); border-color: var(--shell); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  margin-top: 2.6rem;
}
.btn-row--center { justify-content: center; }

/* Text link with animated underline */
.link {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  font-size: var(--fs-small);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--harbor);
  padding-bottom: 0.4em;
  position: relative;
}
.on-dark .link, .bg-navy .link, .bg-harbor .link { color: var(--gold); }
.link::before {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  opacity: 0.35;
}
.link::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--ease-out);
}
.link:hover::after { transform: scaleX(1); }
.link span:last-child { transition: transform 0.45s var(--ease-out); }
.link:hover span:last-child { transform: translateX(4px); }

/* ---------- 6. Header / navigation --------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background-color 0.5s var(--ease), height 0.5s var(--ease),
              box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header--transparent { background: linear-gradient(to bottom, rgba(10,22,40,0.55), rgba(10,22,40,0)); }
.site-header--solid {
  background: var(--navy);
  border-bottom-color: var(--shell-14);
  box-shadow: 0 12px 40px -24px rgba(0,0,0,0.9);
}
body:not(.has-hero) .site-header { background: var(--navy); border-bottom-color: var(--shell-14); }

.nav {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand { display: flex; align-items: center; flex: none; }
.brand__logo {
  width: clamp(168px, 17vw, 234px);
  height: auto;
  /* never let the lockup outgrow the bar it sits in */
  max-height: calc(var(--nav-h) - 30px);
  color: var(--shell);
  transition: width 0.5s var(--ease), max-height 0.5s var(--ease);
}
.site-header--solid .brand__logo { width: clamp(158px, 15vw, 206px); }

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2.4vw, 2.6rem);
  list-style: none;
  padding: 0;
}
.nav__link {
  position: relative;
  display: block;
  padding: 0.5rem 0;
  font-size: 0.76rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--shell);
  opacity: 0.82;
  transition: opacity 0.35s var(--ease), color 0.35s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.45s var(--ease-out);
}
.nav__link:hover { opacity: 1; }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { opacity: 1; color: var(--gold); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.nav__cta { flex: none; }
.nav__cta .btn { padding: 0.95em 1.9em; font-size: 0.74rem; }

@media (max-width: 1120px) { .nav__cta { display: none; } }

/* Mobile menu */
.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 46px; height: 46px;
  border: 1px solid var(--shell-45);
  background: none;
  cursor: pointer;
  flex: none;
}
.nav__toggle span {
  display: block;
  width: 20px; height: 1px;
  margin-inline: auto;
  background: var(--shell);
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
}
body.nav-open .nav__toggle span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
body.nav-open .nav__toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav__toggle span:nth-child(3) { transform: translateY(-3.5px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav__toggle { display: flex; }
  .nav__panel {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: var(--navy);
    padding: clamp(2rem, 6vw, 4rem) var(--gutter) 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    transform: translateY(-101%);
    transition: transform 0.6s var(--ease-out), visibility 0.6s;
    overflow-y: auto;
    /* When closed the panel still occupies a fixed box over the header, so it
       must not swallow taps on the toggle — or be reachable by a screen reader. */
    visibility: hidden;
    pointer-events: none;
  }
  body.nav-open .nav__panel {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
  }
  body.nav-open { overflow: hidden; }
  .nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }
  .nav__list li { width: 100%; border-bottom: 1px solid var(--shell-14); }
  .nav__link {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 7vw, 2.4rem);
    letter-spacing: 0.02em;
    text-transform: none;
    padding: 0.75em 0;
  }
  .nav__link::after { display: none; }
  .nav__cta { display: block; }
  .nav__cta .btn { width: 100%; justify-content: center; font-size: var(--fs-small); }
}
@media (min-width: 941px) {
  .nav__panel { display: contents; }
}

/* ---------- 7. Hero ------------------------------------------------------ */
.hero {
  position: relative;
  min-height: clamp(560px, 92vh, 1000px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--navy);
  isolation: isolate;
}
.hero--short { min-height: clamp(440px, 66vh, 700px); }

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.06);
  animation: heroDrift 22s var(--ease-out) forwards;
}
@keyframes heroDrift { to { transform: scale(1); } }

.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(10,22,40,0.94) 0%, rgba(10,22,40,0.62) 34%, rgba(10,22,40,0.20) 62%, rgba(10,22,40,0.42) 100%);
}

.hero__inner {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding: var(--nav-h) var(--gutter) clamp(4rem, 9vh, 8rem);
  color: var(--shell);
  position: relative;
}
.hero__title {
  font-size: var(--fs-hero);
  color: var(--shell);
  max-width: 17ch;
}
.hero--short .hero__title { font-size: var(--fs-h1); max-width: 20ch; }
.hero__lead {
  margin-top: 1.9rem;
  max-width: 54ch;
  font-size: var(--fs-lead);
  color: var(--shell-70);
}

/* Entrance choreography — the hero content rises in sequence on load. */
.hero__inner > * {
  animation: heroRise 1.15s var(--ease-out) both;
}
.hero__inner > *:nth-child(1) { animation-delay: 0.10s; }
.hero__inner > *:nth-child(2) { animation-delay: 0.24s; }
.hero__inner > *:nth-child(3) { animation-delay: 0.40s; }
.hero__inner > *:nth-child(4) { animation-delay: 0.56s; }
@keyframes heroRise {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: none; }
}

/* Scroll cue */
.hero__cue {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(4rem, 9vh, 8rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--shell-45);
}
.hero__cue i {
  display: block;
  width: 1px; height: 62px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: cueSlide 2.6s var(--ease) infinite;
  transform-origin: top center;
}
@keyframes cueSlide {
  0%   { transform: scaleY(0);   opacity: 0; }
  35%  { transform: scaleY(1);   opacity: 1; }
  100% { transform: scaleY(1);   opacity: 0; transform-origin: bottom center; }
}
@media (max-width: 900px) { .hero__cue { display: none; } }

/* Page header for interior pages without full hero */
.pagehead {
  background: var(--navy);
  color: var(--shell);
  padding-top: calc(var(--nav-h) + clamp(3.5rem, 8vw, 7rem));
  padding-bottom: clamp(3.5rem, 8vw, 7rem);
}
.pagehead .lead { color: var(--shell-70); }
.pagehead h1 { color: var(--shell); }

/* ---------- 8. Media & figures ------------------------------------------- */
.media {
  position: relative;
  overflow: hidden;
  background: var(--navy-08);
}
.media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out);
}
.media--4x3  { aspect-ratio: 4 / 3; }
.media--3x4  { aspect-ratio: 3 / 4; }
.media--1x1  { aspect-ratio: 1 / 1; }
.media--16x9 { aspect-ratio: 16 / 9; }
.media--21x9 { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 5 / 7; }

/* Gold corner accent used on feature images */
.media--framed { outline: 1px solid var(--gold-40); outline-offset: 14px; }
@media (max-width: 640px) { .media--framed { outline-offset: 8px; } }

/* Reveal-from-behind-a-curtain treatment for feature images */
.media--curtain::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--shell);
  transform: scaleY(1);
  transform-origin: top center;
  transition: transform 1.1s var(--ease-out) 0.15s;
  z-index: 1;
}
.bg-navy .media--curtain::before, .on-dark .media--curtain::before { background: var(--navy); }
.reveal.is-in .media--curtain::before,
.is-in .media--curtain::before { transform: scaleY(0); transform-origin: bottom center; }
@media (prefers-reduced-motion: reduce) { .media--curtain::before { display: none; } }

.figure__caption {
  margin-top: 1.1rem;
  font-size: var(--fs-small);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-40);
}
.on-dark .figure__caption { color: var(--shell-45); }

/* Stacked/offset image pair */
.media-stack { position: relative; }
.media-stack__b {
  position: absolute;
  right: -8%;
  bottom: -12%;
  width: 46%;
  border: 8px solid var(--shell);
  box-shadow: 0 30px 70px -40px rgba(10,22,40,0.7);
}
.bg-white .media-stack__b { border-color: var(--white); }
@media (max-width: 900px) { .media-stack__b { display: none; } }

/* ---------- 9. Cards ----------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  height: 100%;
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}
.bg-white .card, .bg-shell .card { box-shadow: 0 1px 0 var(--navy-08); }
.card:hover { transform: translateY(-6px); box-shadow: 0 40px 70px -50px rgba(10,22,40,0.65); }
.card:hover .media img { transform: scale(1.05); }
.card__body { padding: clamp(1.6rem, 2.4vw, 2.5rem); flex: 1; display: flex; flex-direction: column; }
.card__title { margin-bottom: 0.9rem; }
.card__text { color: var(--navy-70); font-size: var(--fs-body); }
.card__foot { margin-top: auto; padding-top: 1.7rem; }

/* Numbered service/value card, no image */
.tile {
  padding: clamp(2rem, 3vw, 3rem);
  border: 1px solid var(--navy-08);
  background: var(--white);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: border-color 0.5s var(--ease), transform 0.6s var(--ease-out);
}
.tile:hover { border-color: var(--gold); transform: translateY(-4px); }
.on-dark .tile { background: transparent; border-color: var(--shell-14); }
.on-dark .tile:hover { border-color: var(--gold); }
.tile__num {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.24em;
  color: var(--accent-ink);
  margin-bottom: 1.6rem;
}
.tile__title { margin-bottom: 0.85rem; }
.tile__text { color: var(--navy-70); }
.on-dark .tile__text { color: var(--shell-70); }

/* ---------- 10. Portfolio grid ------------------------------------------- */
.folio { display: grid; gap: clamp(1.5rem, 2.6vw, 2.75rem); grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 760px) { .folio { grid-template-columns: minmax(0,1fr); } }
.folio__item--wide { grid-column: span 2; }
@media (max-width: 760px) { .folio__item--wide { grid-column: span 1; } }

.folio__link { display: block; position: relative; overflow: hidden; background: var(--navy); }
.folio__link .media img { transition: transform 1.2s var(--ease-out), opacity 0.6s var(--ease); }
.folio__link:hover .media img { transform: scale(1.06); opacity: 0.82; }

/* Hover affordance — a gold ring with an arrow surfaces in the top corner. */
.folio__link::after {
  content: "\2192";
  position: absolute;
  top: clamp(1.1rem, 2vw, 1.8rem);
  right: clamp(1.1rem, 2vw, 1.8rem);
  width: 52px; height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.1rem;
  background: rgba(10, 22, 40, 0.35);
  backdrop-filter: blur(3px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease-out);
}
.folio__link:hover::after,
.folio__link:focus-visible::after { opacity: 1; transform: none; }
@media (hover: none) { .folio__link::after { opacity: 1; transform: none; } }

.folio__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: clamp(1.5rem, 3vw, 2.6rem);
  background: linear-gradient(to top, rgba(10,22,40,0.92), rgba(10,22,40,0.55) 45%, rgba(10,22,40,0));
  color: var(--shell);
}
.folio__meta {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}
.folio__name { font-family: var(--font-display); font-size: var(--fs-h3); color: var(--shell); }
.folio__specs {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  font-size: var(--fs-small);
  color: var(--shell-70);
  letter-spacing: 0.06em;
}

/* Filter bar */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--navy-08);
  padding-bottom: 1.4rem;
}
.filterbar__btn {
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  padding: 0.72em 1.5em;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--navy-70);
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease),
              background-color 0.4s var(--ease);
}
.filterbar__btn:hover { color: var(--navy); border-color: var(--gold-40); }
.filterbar__btn.is-active {
  color: var(--navy);
  border-color: var(--gold);
  background: var(--gold-18);
}

/* Communities marquee — a slow drift of the places we build. */
.marquee {
  overflow: hidden;
  background: var(--navy);
  border-top: 1px solid var(--shell-14);
  padding-block: 1.55rem;
  --accent-ink: var(--gold);
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  width: max-content;
  animation: marqueeDrift 46s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  display: flex;
  align-items: center;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--shell-45);
  white-space: nowrap;
}
.marquee__sep {
  width: 5px; height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
  flex: none;
  opacity: 0.7;
}
@keyframes marqueeDrift { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ---------- 11. Stats ---------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1px;
  background: var(--shell-14);
  border-block: 1px solid var(--shell-14);
}
@media (max-width: 820px) { .stats { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.stat {
  background: var(--navy);
  padding: clamp(2.2rem, 4vw, 3.6rem) clamp(1.2rem, 2.5vw, 2.4rem);
  text-align: center;
}
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 1.4rem + 3.4vw, 4.4rem);
  line-height: 1;
  color: var(--gold);
}
.stat__label {
  margin-top: 1rem;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--shell-70);
}

/* ---------- 12. Process timeline ----------------------------------------- */
.steps { display: grid; gap: 0; }
.step {
  display: grid;
  grid-template-columns: minmax(120px, 0.6fr) minmax(0, 1.6fr) minmax(0, 1.4fr);
  gap: clamp(1.5rem, 4vw, 4.5rem);
  align-items: start;
  padding-block: clamp(2.6rem, 5vw, 4.6rem);
  border-top: 1px solid var(--navy-08);
}
.on-dark .step { border-top-color: var(--shell-14); }
.step:last-child { border-bottom: 1px solid var(--navy-08); }
.on-dark .step:last-child { border-bottom-color: var(--shell-14); }
.step__num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1.4rem + 2.4vw, 3.6rem);
  line-height: 1;
  color: var(--accent-ink);
}
.step__title { margin-bottom: 0.4rem; }
.step__kicker {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--navy-40);
  margin-bottom: 1rem;
}
.on-dark .step__kicker { color: var(--shell-45); }
.step__text { color: var(--navy-70); }
.on-dark .step__text { color: var(--shell-70); }
.step__list { margin: 1.4rem 0 0; padding: 0; list-style: none; }
.step__list li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: 0.55rem;
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  color: var(--navy-70);
}
.on-dark .step__list li { color: var(--shell-70); }
.step__list li::before {
  content: "";
  position: absolute; left: 0; top: 0.75em;
  width: 8px; height: 1px;
  background: var(--gold);
}
@media (max-width: 880px) {
  .step { grid-template-columns: minmax(0,1fr); gap: 1rem; }
  .step__num { margin-bottom: 0.4rem; }
}

/* ---------- 13. Quote / testimonial -------------------------------------- */
.quote { max-width: 46ch; margin-inline: auto; text-align: center; }
.quote__mark {
  font-family: var(--font-display);
  font-size: 4.5rem;
  line-height: 0.6;
  color: var(--accent-ink);
  display: block;
  margin-bottom: 1.6rem;
}
.quote__text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.35rem);
  line-height: 1.42;
  color: var(--shell);
}
.quote__cite {
  display: block;
  margin-top: 2.2rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(239, 236, 230, 0.72);
}
.bg-shell .quote__text, .bg-white .quote__text { color: var(--navy); }
.bg-shell .quote__cite, .bg-white .quote__cite { color: var(--navy-40); }

/* ---------- 14. CTA band ------------------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--shell);
  isolation: isolate;
}
.cta-band__media { position: absolute; inset: 0; z-index: -2; }
.cta-band__media img { width: 100%; height: 100%; object-fit: cover; }
.cta-band__scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to right, rgba(10,22,40,0.95) 0%, rgba(10,22,40,0.82) 45%, rgba(10,22,40,0.55) 100%);
}
.cta-band__inner {
  padding-block: clamp(4.5rem, 8vw, 9rem);
  max-width: 60ch;
}
.cta-band h2 { color: var(--shell); }

/* ---------- 15. Forms ---------------------------------------------------- */
.form { display: grid; gap: 1.6rem 1.75rem; grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 700px) { .form { grid-template-columns: minmax(0,1fr); } }
.field { display: flex; flex-direction: column; gap: 0.6rem; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--navy-70);
}
.on-dark .field label { color: var(--shell-70); }
.field .req { color: var(--accent-ink); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.95rem 0;
  border: none;
  border-bottom: 1px solid var(--navy-40);
  background: transparent;
  font-size: var(--fs-body);
  font-weight: 300;
  color: var(--navy);
  border-radius: 0;
  transition: border-color 0.4s var(--ease);
  appearance: none;
}
.on-dark .field input,
.on-dark .field select,
.on-dark .field textarea { color: var(--shell); border-bottom-color: var(--shell-45); }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 12px) calc(50% + 2px), calc(100% - 6px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2rem;
}
.field select option { color: var(--navy); background: var(--white); }
.field textarea { resize: vertical; min-height: 128px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-bottom-color: var(--gold);
}
.field input::placeholder, .field textarea::placeholder { color: var(--navy-40); }
.on-dark .field input::placeholder, .on-dark .field textarea::placeholder { color: var(--shell-45); }

.form__note {
  grid-column: 1 / -1;
  font-size: var(--fs-small);
  color: var(--navy-40);
  line-height: 1.6;
}
.on-dark .form__note { color: var(--shell-45); }
.form__actions { grid-column: 1 / -1; }

/* ---------- 16. Contact details ------------------------------------------ */
.contact-list { list-style: none; padding: 0; display: grid; gap: 2.4rem; }
.contact-list dt, .contact-list__label {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 0.7rem;
}
.contact-list__value { font-size: var(--fs-lead); line-height: 1.6; }
.contact-list__value a { transition: color 0.35s var(--ease); }
.contact-list__value a:hover { color: var(--gold); }

/* ---------- 17. Footer --------------------------------------------------- */
.site-footer { background: var(--navy); color: var(--shell-70); }
.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(2.5rem, 4vw, 4rem);
  padding-block: clamp(4rem, 7vw, 7rem);
}
@media (max-width: 1000px) { .footer__top { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 600px) { .footer__top { grid-template-columns: minmax(0,1fr); } }

.footer__logo { width: 232px; color: var(--shell); margin-bottom: 2rem; }
.footer__blurb { max-width: 38ch; font-size: var(--fs-small); line-height: 1.85; color: var(--shell-70); }
.footer__title {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.7rem;
}
.footer__list { list-style: none; padding: 0; display: grid; gap: 0.85rem; }
.footer__list a, .footer__list span {
  font-size: var(--fs-small);
  color: var(--shell-70);
  transition: color 0.35s var(--ease);
}
.footer__list a:hover { color: var(--shell); }

.footer__bottom {
  border-top: 1px solid var(--shell-14);
  padding-block: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--shell-45);
}
.footer__bottom a:hover { color: var(--shell); }
.footer__legal { display: flex; flex-wrap: wrap; gap: 1.5rem; }

/* ---------- 18. Scroll reveal -------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.11s; }
.reveal[data-delay="2"] { transition-delay: 0.22s; }
.reveal[data-delay="3"] { transition-delay: 0.33s; }
.reveal[data-delay="4"] { transition-delay: 0.44s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 19. Utilities ------------------------------------------------ */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: clamp(2.5rem, 5vw, 4.5rem); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
