/* ==========================================================================
   Cape Cod Hardscapes — styles.css
   Mobile-first. Custom properties. No frameworks.
   ========================================================================== */

:root {
  /* Coastal palette */
  --navy: #16283a;
  --navy-deep: #0e1c2b;
  --sand: #e7dcc7;
  --oyster: #f7f4ee;
  --stone: #cfc6b8;
  --granite: #5c6b77;
  --seaglass: #9dbfb2;
  --ink: #22303c;
  --ink-soft: #4d5b66;
  --white: #ffffff;
  --gold: #c8a464;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 10px;
  --radius-lg: 18px;
  --shadow: 0 2px 8px rgba(14, 28, 43, 0.08), 0 12px 32px rgba(14, 28, 43, 0.10);
  --shadow-soft: 0 1px 4px rgba(14, 28, 43, 0.08);
  --space-section: clamp(4rem, 9vw, 7.5rem);
  --container: 72rem;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--oyster);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 4.5rem; /* room for sticky mobile CTA */
}
@media (min-width: 56em) { body { padding-bottom: 0; } }

img, svg, video { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 5.5vw, 3.75rem); }
h2 { font-size: clamp(1.7rem, 3.8vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.45rem); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--granite); }

ul { padding-left: 1.2em; }

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

@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;
  }
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.container {
  width: min(var(--container), 100% - 2.5rem);
  margin-inline: auto;
}

.section { padding-block: var(--space-section); }
.section--alt { background: var(--white); }
.section--navy { background: var(--navy); color: var(--sand); }
.section--navy h2, .section--navy h3 { color: var(--oyster); }
.section--sand { background: var(--sand); }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--granite);
  margin-bottom: 0.9rem;
}
.section--navy .eyebrow { color: var(--seaglass); }

.section-intro { max-width: 46rem; }
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 200;
  background: var(--navy);
  color: var(--white);
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 var(--radius) var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: 0; color: var(--white); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 600 1rem var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-deep); color: var(--white); }

.btn--gold { background: var(--gold); color: var(--navy-deep); }
.btn--gold:hover { background: #d6b476; color: var(--navy-deep); }

.btn--ghost { border-color: currentColor; color: var(--navy); background: transparent; }
.btn--ghost:hover { background: rgba(22, 40, 58, 0.06); color: var(--navy); }

.btn--ghost-light { border-color: rgba(255, 255, 255, 0.7); color: var(--white); background: transparent; }
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); }

.btn[disabled] { opacity: 0.6; cursor: wait; transform: none; }

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(22, 40, 58, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
  line-height: 1.2;
}
.brand span {
  display: block;
  font-size: 0.68rem;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--granite);
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 12px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav { display: none; }
.site-nav.is-open {
  display: block;
  position: absolute;
  inset: 100% 0 auto;
  background: var(--oyster);
  border-bottom: 1px solid rgba(22, 40, 58, 0.1);
  box-shadow: var(--shadow);
  padding: 0.5rem 1.25rem 1.25rem;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.site-nav a {
  display: block;
  padding: 0.7rem 0.5rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
}
.site-nav a:hover { background: rgba(22, 40, 58, 0.06); }
.site-nav a[aria-current="page"] { color: var(--gold); }
.site-nav .nav-cta { margin-top: 0.5rem; }

@media (min-width: 56em) {
  .nav-toggle { display: none; }
  .site-nav { display: block !important; position: static; box-shadow: none; border: 0; padding: 0; background: none; }
  .site-nav ul { flex-direction: row; align-items: center; gap: 0.4rem; }
  .site-nav a { padding: 0.55rem 0.85rem; }
  .site-nav .nav-cta { margin: 0 0 0 0.6rem; }
  .site-nav .nav-cta a { color: var(--white); padding: 0.6rem 1.3rem; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(92vh, 54rem);
  isolation: isolate;
  overflow: hidden;
  background: var(--navy-deep);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero__media img,
.hero__media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__media video {
  /* video overlays the image, which doubles as its poster/fallback */
  position: absolute;
  inset: 0;
}

.hero::after {
  /* readability overlay */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(14, 28, 43, 0.55) 0%, rgba(14, 28, 43, 0.35) 45%, rgba(14, 28, 43, 0.78) 100%);
}

.hero__content {
  padding-block: clamp(6rem, 14vw, 9rem);
  max-width: 46rem;
  color: var(--oyster);
}
.hero__content h1 { color: var(--white); }
.hero__lede { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--sand); max-width: 40rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.8rem; }
.hero__eyebrow { color: var(--seaglass); }

.hero--page { min-height: 0; }
.hero--page .hero__content { padding-block: clamp(4rem, 9vw, 6.5rem); }

/* Scroll-scrubbed hero video. main.js adds .hero--scrub on desktop once the
   video's metadata loads: the hero becomes a tall runway, .hero__pin sticks
   for one viewport while scroll drives video.currentTime, then the page
   scrolls on normally. Without the class this is all inert. */
.hero--scrub { display: block; height: 250vh; overflow: visible; /* sticky breaks inside overflow:hidden; .hero__pin clips instead */ }
.hero--scrub::after { content: none; }
.hero--scrub .hero__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero--scrub .hero__pin::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(14, 28, 43, 0.55) 0%, rgba(14, 28, 43, 0.35) 45%, rgba(14, 28, 43, 0.78) 100%);
}
/* Pinned video is the movement — turn off the translate parallax here */
.hero--scrub .hero__media,
.sda-fallback .hero--scrub .hero__media {
  inset: 0;
  animation: none;
  transform: none;
}

/* --------------------------------------------------------------------------
   Cards & grids
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  gap: clamp(1.1rem, 2.5vw, 1.75rem);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(13.5rem, 100%), 1fr)); }

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--stone); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.card:hover .card__media img { transform: scale(1.04); }

.card__body { padding: 1.25rem 1.35rem 1.5rem; flex: 1; display: flex; flex-direction: column; gap: 0.35rem; }
.card__body h3 { margin-bottom: 0.2em; }
.card__body p { color: var(--ink-soft); font-size: 0.97rem; flex: 1; }

.card__link {
  font-weight: 600;
  text-decoration: none;
  color: var(--navy);
  margin-top: 0.5rem;
}
.card__link::after { content: " →"; }
.card__link:hover { color: var(--gold); }

/* Card whose whole surface is clickable */
.card--linked { position: relative; }
.card--linked .card__link::before { content: ""; position: absolute; inset: 0; }

/* --------------------------------------------------------------------------
   Project chooser (interactive tabs)
   -------------------------------------------------------------------------- */
.chooser__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.chooser__tab {
  min-height: 44px;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  border: 2px solid rgba(231, 220, 199, 0.45);
  background: transparent;
  color: var(--sand);
  font: 600 0.95rem var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.chooser__tab:hover { border-color: var(--sand); }
.chooser__tab[aria-selected="true"] {
  background: var(--sand);
  border-color: var(--sand);
  color: var(--navy-deep);
}

.chooser__panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(231, 220, 199, 0.2);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  display: grid;
  gap: 1.5rem;
}
.chooser__panel[hidden] { display: none; }
.chooser__panel h3 { color: var(--oyster); }
.chooser__panel ul { margin: 0.35rem 0 0; color: var(--sand); }
.chooser__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--seaglass);
  display: block;
  margin-bottom: 0.35rem;
}

@media (min-width: 48em) {
  .chooser__panel { grid-template-columns: 1.2fr 1fr 1fr; align-items: start; }
  .chooser__panel .chooser__cta { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------------------
   Masonry-style gallery (CSS columns)
   -------------------------------------------------------------------------- */
.masonry {
  columns: 1;
  column-gap: 1.25rem;
}
.masonry > * { break-inside: avoid; margin-bottom: 1.25rem; }

@media (min-width: 40em) { .masonry { columns: 2; } }
@media (min-width: 62em) { .masonry { columns: 3; } }

.project-card {
  text-align: left;
  width: 100%;
  border: 0;
  padding: 0;
  background: var(--white);
  font: inherit;
  cursor: pointer;
}
.project-card .card__body { gap: 0.15rem; }
.project-card .location {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--granite);
}
.project-card .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.6rem; }
.project-card .tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--oyster);
  color: var(--ink-soft);
  border: 1px solid rgba(22, 40, 58, 0.1);
}
.project-card .view-cue { font-weight: 600; color: var(--navy); margin-top: 0.6rem; }
.project-card .view-cue::after { content: " →"; }

/* Portfolio filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}
.filters button {
  min-height: 44px;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  border: 2px solid rgba(22, 40, 58, 0.18);
  background: var(--white);
  color: var(--ink);
  font: 600 0.95rem var(--font-body);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.filters button:hover { border-color: var(--navy); }
.filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* Lightbox — native <dialog> */
.lightbox {
  border: 0;
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: min(60rem, 92vw);
  background: var(--white);
  box-shadow: var(--shadow);
}
.lightbox::backdrop { background: rgba(14, 28, 43, 0.82); }
.lightbox figure { margin: 0; }
.lightbox img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.lightbox figcaption { padding: 1.1rem 1.4rem 1.4rem; }
.lightbox__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
}
.lightbox__bar .btn { min-height: 44px; padding: 0.5rem 1.1rem; }

/* --------------------------------------------------------------------------
   Trust / feature list
   -------------------------------------------------------------------------- */
.feature {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}
.feature__dot {
  flex: none;
  width: 12px;
  height: 12px;
  margin-top: 0.5rem;
  border-radius: 50%;
  background: var(--gold);
}
.feature h3 { font-size: 1.1rem; margin-bottom: 0.25em; }
.feature p { color: var(--ink-soft); font-size: 0.95rem; }
.section--navy .feature p { color: var(--stone); }

/* --------------------------------------------------------------------------
   Process timeline — vertical on mobile, horizontal on desktop
   -------------------------------------------------------------------------- */
.process {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
  counter-reset: step;
}
.process li {
  counter-increment: step;
  position: relative;
  padding-left: 4rem;
}
.process li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.9rem;
  height: 2.9rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sand);
  color: var(--navy);
  font: 700 1rem var(--font-display);
}
.process h3 { margin-bottom: 0.2em; }
.process p { color: var(--ink-soft); font-size: 0.96rem; }

@media (min-width: 62em) {
  .process { grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }
  .process li { padding-left: 0; padding-top: 4rem; }
  .process li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 1.45rem;
    left: 3.4rem;
    right: 0.5rem;
    height: 2px;
    background: linear-gradient(90deg, var(--stone), rgba(207, 198, 184, 0.25));
  }
}

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */
.testimonial {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 0;
}
.testimonial blockquote { margin: 0; font-size: 1.02rem; color: var(--ink); }
.testimonial blockquote::before {
  content: "\201C";
  font: 700 2.5rem var(--font-display);
  color: var(--gold);
  display: block;
  line-height: 0.6;
  margin-bottom: 0.6rem;
}
.testimonial figcaption { font-weight: 700; color: var(--granite); }

/* --------------------------------------------------------------------------
   FAQ accordion (native details/summary)
   -------------------------------------------------------------------------- */
.faq { display: grid; gap: 0.8rem; max-width: 50rem; }
.faq details {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid rgba(22, 40, 58, 0.1);
  overflow: hidden;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 1.05rem 3rem 1.05rem 1.3rem;
  font-weight: 600;
  color: var(--navy);
  position: relative;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 1.2rem;
  top: 50%;
  translate: 0 -50%;
  font: 400 1.5rem var(--font-display);
  color: var(--gold);
  transition: rotate 0.25s var(--ease);
}
.faq details[open] summary::after { rotate: 45deg; }
.faq details > div { padding: 0 1.3rem 1.2rem; color: var(--ink-soft); }

/* --------------------------------------------------------------------------
   Stats / counters
   -------------------------------------------------------------------------- */
.stats {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  text-align: center;
}
.stats .num { font: 700 clamp(2.2rem, 5vw, 3rem) var(--font-display); color: var(--gold); display: block; }
.stats .label { font-size: 0.88rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--sand); }

/* --------------------------------------------------------------------------
   Split layout
   -------------------------------------------------------------------------- */
.split { display: grid; gap: clamp(1.75rem, 4vw, 3.5rem); align-items: center; }
.split__media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.split__media img { width: 100%; object-fit: cover; }
@media (min-width: 56em) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--rev .split__media { order: 2; }
}

/* --------------------------------------------------------------------------
   Comparison table
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
}
.compare caption { text-align: left; font-weight: 600; padding-bottom: 0.8rem; color: var(--ink-soft); }
.compare th, .compare td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid rgba(22, 40, 58, 0.08); }
.compare thead th { background: var(--navy); color: var(--oyster); font-weight: 600; }
.compare tbody th { font-weight: 700; color: var(--navy); white-space: nowrap; }
.compare tbody tr:nth-child(even) { background: rgba(231, 220, 199, 0.18); }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--sand);
  text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band .hero__actions { justify-content: center; }
.cta-band p { max-width: 38rem; margin-inline: auto; }

/* --------------------------------------------------------------------------
   Breadcrumbs (used on dark page heroes)
   -------------------------------------------------------------------------- */
.breadcrumbs { font-size: 0.88rem; margin-bottom: 1rem; }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.breadcrumbs li + li::before { content: "/"; margin-right: 0.4rem; color: var(--seaglass); }
.breadcrumbs a { color: var(--seaglass); text-decoration: none; }
.breadcrumbs a:hover { color: var(--white); text-decoration: underline; }
.breadcrumbs [aria-current="page"] { color: var(--sand); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-grid { display: grid; gap: 1.2rem; }
@media (min-width: 40em) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .form-field--full { grid-column: 1 / -1; }
}

.form-field { display: flex; flex-direction: column; gap: 0.35rem; }
.form-field label { font-weight: 600; font-size: 0.95rem; color: var(--navy); }
.form-field .hint { font-size: 0.83rem; color: var(--ink-soft); }

.form-field input,
.form-field select,
.form-field textarea {
  font: inherit;
  color: var(--ink);
  padding: 0.75rem 0.9rem;
  border: 2px solid rgba(22, 40, 58, 0.18);
  border-radius: var(--radius);
  background: var(--white);
  min-height: 48px;
  width: 100%;
}
.form-field textarea { min-height: 9rem; resize: vertical; }
.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible { outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--navy); }

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea { border-color: #b3261e; }

.field-error { color: #b3261e; font-size: 0.88rem; font-weight: 600; }
.field-error:empty { display: none; }

.form-consent { display: flex; gap: 0.7rem; align-items: flex-start; }
.form-consent input { width: 1.35rem; height: 1.35rem; min-height: 0; margin-top: 0.2rem; flex: none; }
.form-consent label { font-weight: 400; font-size: 0.93rem; color: var(--ink-soft); }

.form-status { border-radius: var(--radius); padding: 1rem 1.2rem; font-weight: 600; margin-top: 1.2rem; }
.form-status[hidden] { display: none; }
.form-status--success { background: #e5f2e9; color: #1d5c33; border: 1px solid #9dc7ab; }
.form-status--error { background: #fbeae9; color: #8f1d16; border: 1px solid #e2a8a3; }

/* Honeypot — hidden from humans, tempting to bots */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --------------------------------------------------------------------------
   Contact page layout
   -------------------------------------------------------------------------- */
.contact-layout { display: grid; gap: 2.5rem; }
@media (min-width: 62em) { .contact-layout { grid-template-columns: 1.5fr 1fr; align-items: start; } }

.contact-aside {
  background: var(--navy);
  color: var(--sand);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.25rem);
}
.contact-aside h2 { color: var(--oyster); font-size: 1.4rem; }
.contact-aside ul { columns: 2; column-gap: 1.5rem; padding-left: 1.1em; font-size: 0.95rem; }
.contact-aside a { color: var(--sand); }
.contact-aside .phone {
  font: 700 1.4rem var(--font-display);
  color: var(--white);
  text-decoration: none;
  display: inline-block;
  margin-block: 0.3rem 1rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--navy-deep);
  color: var(--stone);
  padding-block: 3.5rem 2rem;
  font-size: 0.95rem;
}
.site-footer h2 { color: var(--oyster); font-size: 1.05rem; letter-spacing: 0.04em; }
.site-footer a { color: var(--sand); text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2.5rem; }
@media (min-width: 48em) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.4fr; } }
.footer-bottom {
  border-top: 1px solid rgba(231, 220, 199, 0.15);
  padding-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--granite);
}

/* --------------------------------------------------------------------------
   Sticky mobile CTA
   -------------------------------------------------------------------------- */
.sticky-cta {
  position: fixed;
  inset: auto 0 0;
  z-index: 90;
  display: flex;
  background: var(--navy-deep);
  box-shadow: 0 -4px 16px rgba(14, 28, 43, 0.3);
  padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
  gap: 0.6rem;
}
.sticky-cta .btn { flex: 1; min-height: 48px; padding-inline: 0.75rem; font-size: 0.95rem; }
@media (min-width: 56em) { .sticky-cta { display: none; } }

/* --------------------------------------------------------------------------
   Scroll reveal — progressive enhancement, content readable without JS
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .reveal-stagger > * {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  }
  .js .reveal-stagger.is-visible > * { opacity: 1; transform: none; }
  .js .reveal-stagger.is-visible > :nth-child(2) { transition-delay: 90ms; }
  .js .reveal-stagger.is-visible > :nth-child(3) { transition-delay: 180ms; }
  .js .reveal-stagger.is-visible > :nth-child(4) { transition-delay: 270ms; }
  .js .reveal-stagger.is-visible > :nth-child(n + 5) { transition-delay: 340ms; }
}

/* --------------------------------------------------------------------------
   Scroll-driven motion — native CSS scroll timelines where supported;
   browsers without animation-timeline (Firefox) get the .sda-fallback
   block below, driven by scroll vars from main.js.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    /* Hero image/video drifts slower than the page (parallax).
       Extra top bleed so the translate never exposes a gap. */
    .hero__media {
      inset: -22% 0 0;
      animation: hero-parallax linear both;
      animation-timeline: scroll();
      animation-range: 0 100vh;
    }
    @keyframes hero-parallax {
      to { transform: translateY(18%); }
    }

    /* Home hero text lifts and fades as scrolling begins */
    .hero:not(.hero--page) .hero__content {
      animation: hero-exit linear both;
      animation-timeline: scroll();
      animation-range: 0 85vh;
    }
    @keyframes hero-exit {
      to { transform: translateY(-3.5rem); opacity: 0; }
    }

    /* Reading progress bar along the bottom of the sticky header */
    .site-header::after {
      content: "";
      position: absolute;
      inset: auto 0 0;
      height: 3px;
      background: var(--gold);
      transform-origin: left;
      transform: scaleX(0);
      animation: scroll-progress linear both;
      animation-timeline: scroll();
    }
    @keyframes scroll-progress {
      to { transform: scaleX(1); }
    }

    /* Header picks up a shadow once the page starts moving */
    .site-header {
      animation: header-settle linear both;
      animation-timeline: scroll();
      animation-range: 0 120px;
    }
    @keyframes header-settle {
      to {
        background: rgba(247, 244, 238, 0.98);
        box-shadow: 0 4px 18px rgba(14, 28, 43, 0.14);
      }
    }
  }

  /* JS fallback — main.js adds .sda-fallback and updates --hero-p (0–1 over
     first viewport), --exit-p (0–1 over 85vh) and --page-p (whole page). */
  .sda-fallback .hero__media {
    inset: -22% 0 0;
    transform: translateY(calc(var(--hero-p, 0) * 18%));
    will-change: transform;
  }
  .sda-fallback .hero:not(.hero--page) .hero__content {
    transform: translateY(calc(var(--exit-p, 0) * -3.5rem));
    opacity: calc(1 - var(--exit-p, 0));
  }
  .sda-fallback .site-header::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 3px;
    background: var(--gold);
    transform-origin: left;
    transform: scaleX(var(--page-p, 0));
  }
  .sda-fallback .site-header {
    transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  }
  .sda-fallback.is-scrolled .site-header {
    background: rgba(247, 244, 238, 0.98);
    box-shadow: 0 4px 18px rgba(14, 28, 43, 0.14);
  }
}

@media print {
  .site-header, .sticky-cta, .site-footer, .hero__actions { display: none; }
}
