/* ==========================================================================
   Kiwi Custom Construction — kiwicustomconstruction.com
   Design system: white luxury. Warm ivory, alabaster, espresso ink, bronze.
   Type: Cormorant Garamond (display) + Archivo (body)
   ========================================================================== */

:root {
  /* Color tokens */
  --bg: #FBFAF6;             /* page base, warm ivory */
  --bg-2: #F4F0E6;           /* alabaster raised sections */
  --surface: #FFFFFF;        /* cards */
  --ink: #23211B;            /* headings, near-black espresso */
  --ink-soft: #57544A;       /* body text */
  --ink-faint: #7C786B;      /* tertiary / captions */
  --bronze: #9C8145;         /* accent, large elements and lines */
  --bronze-text: #85703B;    /* accent for small text (AA on ivory) */
  --hairline: rgba(35, 33, 27, 0.14);
  --hairline-strong: rgba(35, 33, 27, 0.32);
  --brass-line: rgba(156, 129, 69, 0.4);
  --footer-bg: #201D17;      /* the one dark anchor */
  --footer-ivory: #F3EEE3;
  --danger: #A63A2B;

  /* Type */
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Archivo", -apple-system, "Segoe UI", sans-serif;

  /* Spacing scale (airy) */
  --s-1: 0.5rem;
  --s-2: 1rem;
  --s-3: 1.5rem;
  --s-4: 2rem;
  --s-5: 3rem;
  --s-6: 4.5rem;
  --s-7: 7rem;
  --s-8: 10rem;

  --radius: 3px;
  --container: 1240px;
  --header-h: 96px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul[class],
ol[class],
.nav-mobile ul,
.footer-col ul {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--bronze-text);
  outline-offset: 4px;
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s-2);
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: var(--bg);
  font-weight: 500;
  letter-spacing: 0.08em;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 0;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: 0.005em;
  color: var(--ink);
}

h1 em,
h2 em,
h3 em {
  font-style: italic;
  font-weight: 400;
  color: var(--bronze);
}

h1 {
  font-size: clamp(3rem, 7vw, 5.75rem);
}

h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
}

h3 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  line-height: 1.15;
}

p {
  max-width: 60ch;
}

.lede {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  font-weight: 300;
  line-height: 1.8;
  color: var(--ink-soft);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  max-width: none;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--bronze-text);
  margin-bottom: var(--s-3);
}

.eyebrow::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--brass-line);
}

.muted {
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.section {
  padding-block: clamp(5rem, 11vw, 9.5rem);
  position: relative;
}

.section--sand {
  background: var(--bg-2);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.section--foam {
  background: var(--bg-2);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head--center .eyebrow {
  justify-content: center;
}

.section-head p {
  margin-top: var(--s-3);
}

.split {
  display: grid;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
  .split--wide-media {
    grid-template-columns: 1.15fr 1fr;
  }
  .split > .order-first {
    order: -1;
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.15rem 2.4rem;
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease);
  white-space: nowrap;
}

.btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.btn--solid,
.btn--light {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.btn--solid:hover,
.btn--light:hover {
  background: var(--bronze-text);
  border-color: var(--bronze-text);
  color: #FFFFFF;
}

.btn--ghost,
.btn--ghost-light {
  border-color: var(--hairline-strong);
  color: var(--ink);
  background: transparent;
}

.btn--ghost:hover,
.btn--ghost-light:hover {
  border-color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--bronze-text);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--brass-line);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), gap 0.3s var(--ease);
}

.text-link:hover {
  color: var(--ink);
  border-color: var(--ink);
  gap: 1rem;
}

.text-link svg {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background-color 0.4s var(--ease), height 0.4s var(--ease),
    border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  height: 72px;
  background: rgba(251, 250, 246, 0.97);
  border-bottom-color: var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  width: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  flex: none;
}

/* KCC logo: dark variant on light backgrounds, light variant over the home
   scroll hero and in the footer */
.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  flex: none;
}

.brand-logo--light {
  display: none;
}

/* Over the home hero (header not yet scrolled, mobile menu closed):
   white logo, white nav links, white menu icon */
html:not(.nav-open) body:has(.scrolly) .site-header:not(.scrolled) .brand-logo--dark {
  display: none;
}

html:not(.nav-open) body:has(.scrolly) .site-header:not(.scrolled) .brand-logo--light {
  display: block;
}

html:not(.nav-open) body:has(.scrolly) .site-header:not(.scrolled) .nav-desktop a:not(.btn) {
  color: rgba(243, 238, 227, 0.92);
}

html:not(.nav-open) body:has(.scrolly) .site-header:not(.scrolled) .nav-desktop a:not(.btn):hover {
  color: #FFFFFF;
}

html:not(.nav-open) body:has(.scrolly) .site-header:not(.scrolled) .nav-toggle span {
  background: var(--footer-ivory);
}

.nav-desktop {
  display: none;
}

@media (min-width: 1060px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: 2.4rem;
  }
}

.nav-desktop a:not(.btn) {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--ink-soft);
  padding: 0.5rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.nav-desktop a:not(.btn):hover {
  color: var(--ink);
}

.nav-desktop a:not(.btn)[aria-current="page"] {
  color: var(--bronze-text);
  border-bottom-color: var(--brass-line);
}

.nav-desktop .btn {
  padding: 0.85rem 1.7rem;
  font-size: 0.7rem;
}

/* Mobile nav */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 48px;
  height: 48px;
  align-items: center;
}

@media (min-width: 1060px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 6vw, 3rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
}

.nav-open .nav-mobile {
  opacity: 1;
  visibility: visible;
}

.nav-open {
  overflow: hidden;
}

.nav-mobile ul {
  display: flex;
  flex-direction: column;
}

.nav-mobile a:not(.btn) {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 7.5vw, 2.9rem);
  font-weight: 500;
  padding: 0.65rem 0;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
}

.nav-mobile a:not(.btn)[aria-current="page"] {
  color: var(--bronze-text);
}

.nav-mobile .btn {
  margin-top: var(--s-4);
  align-self: flex-start;
}

.nav-mobile .nav-contact {
  margin-top: var(--s-4);
  color: var(--ink-faint);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

/* Trust strip under hero */
.trust-strip {
  background: var(--bg);
  color: var(--ink);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.trust-strip .container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 760px) {
  .trust-strip .container {
    grid-template-columns: repeat(4, 1fr);
  }
}

.trust-item {
  padding: 2.4rem 1.25rem;
  text-align: center;
  border-left: 1px solid var(--hairline);
}

.trust-item:first-child {
  border-left: 0;
}

@media (max-width: 759px) {
  .trust-item:nth-child(3) {
    border-left: 0;
  }
  .trust-item:nth-child(n + 3) {
    border-top: 1px solid var(--hairline);
  }
}

.trust-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.9rem);
  font-weight: 500;
  line-height: 1.05;
  color: var(--bronze);
}

.trust-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 0.6rem;
}

/* --------------------------------------------------------------------------
   Page hero (interior pages)
   -------------------------------------------------------------------------- */
.page-hero {
  padding-block: calc(var(--header-h) + clamp(3.5rem, 8vw, 6.5rem)) clamp(3.5rem, 7vw, 6rem);
  background:
    radial-gradient(80% 120% at 85% -20%, rgba(214, 228, 222, 0.5) 0%, rgba(214, 228, 222, 0) 60%),
    var(--bg);
  border-bottom: 1px solid var(--hairline);
}

.page-hero h1 {
  max-width: 16ch;
}

.page-hero .lede {
  margin-top: var(--s-4);
  max-width: 56ch;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--s-4);
}

.breadcrumb a:hover {
  color: var(--bronze-text);
}

.breadcrumb svg {
  width: 10px;
  height: 10px;
  opacity: 0.5;
}

/* --------------------------------------------------------------------------
   Media placeholders (photo slots)
   -------------------------------------------------------------------------- */
.media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(100% 90% at 25% 12%, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(165deg, #EFECE2 0%, #E2E7E1 55%, #CFDAD6 100%);
  isolation: isolate;
}

.media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='64' viewBox='0 0 260 64'%3E%3Cpath d='M0 32q32-15 65 0t65 0 65 0 65 0' fill='none' stroke='%239C8145' stroke-opacity='0.16' stroke-width='1'/%3E%3C/svg%3E");
  background-size: 260px 64px;
  z-index: 0;
}

/* thin inset frame, the gallery touch */
.media::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(156, 129, 69, 0.35);
  pointer-events: none;
  z-index: 1;
}

.media.loaded::after {
  border-color: rgba(251, 250, 246, 0.55);
}

.media > img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--wide { aspect-ratio: 16 / 10; }
.media--cinema { aspect-ratio: 21 / 9; }
.media--tall { aspect-ratio: 3 / 4; }
.media--square { aspect-ratio: 1 / 1; }
.media--land { aspect-ratio: 4 / 3; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

@media (min-width: 760px) {
  .card-grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .card-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.4s var(--ease), transform 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

.service-card:hover {
  border-color: var(--brass-line);
  transform: translateY(-4px);
  box-shadow: 0 32px 56px -40px rgba(35, 33, 27, 0.35);
}

.service-card .media {
  border-radius: 0;
}

.service-card .media::after {
  inset: 12px;
}

.service-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--s-3);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}

.service-card-body p {
  color: var(--ink-faint);
  font-size: 0.95rem;
  flex: 1;
}

.service-card .text-link {
  margin-top: auto;
  align-self: flex-start;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
}

.chip {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--brass-line);
}

/* Feature list */
.feature-list {
  display: grid;
  gap: 1.6rem;
}

.feature-list li {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--hairline);
}

.feature-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.feature-list svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 0.3rem;
  color: var(--bronze);
}

.feature-list strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.feature-list span {
  color: var(--ink-faint);
  font-size: 0.93rem;
  font-weight: 300;
}

/* --------------------------------------------------------------------------
   Process steps
   -------------------------------------------------------------------------- */
.process-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  counter-reset: step;
}

@media (min-width: 760px) {
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1060px) {
  .process-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.process-step {
  counter-increment: step;
  padding-top: var(--s-3);
  border-top: 1px solid var(--hairline-strong);
  transition: border-color 0.4s var(--ease);
}

.process-step:hover {
  border-top-color: var(--bronze);
}

.process-step::before {
  content: "0" counter(step);
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--bronze-text);
  margin-bottom: var(--s-3);
}

.process-step h3 {
  font-size: 1.45rem;
  margin-bottom: 0.7rem;
}

.process-step p {
  color: var(--ink-faint);
  font-size: 0.93rem;
  font-weight: 300;
}

/* --------------------------------------------------------------------------
   Projects gallery
   -------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2.2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 1.2rem;
}

.filter-btn {
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0.4rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.filter-btn:hover {
  color: var(--ink);
}

.filter-btn[aria-pressed="true"] {
  color: var(--bronze-text);
  border-bottom-color: var(--bronze);
}

.project-grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

@media (min-width: 680px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1060px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-tile {
  display: block;
}

.project-tile.is-hidden {
  display: none;
}

.project-tile .media {
  margin-bottom: var(--s-3);
}

.project-tile h3 {
  font-size: 1.4rem;
}

.project-tile .project-meta {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bronze-text);
  margin-top: 0.45rem;
}

/* --------------------------------------------------------------------------
   Bands (why / CTA) — alabaster panels with hairline framing
   -------------------------------------------------------------------------- */
.band {
  background: var(--bg-2);
  color: var(--ink);
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.band h2,
.band h3 {
  color: var(--ink);
}

.band .lede,
.band p {
  color: var(--ink-soft);
}

.band-ripples {
  position: absolute;
  right: -10%;
  top: -40%;
  width: 660px;
  color: var(--bronze);
  opacity: 0.14;
  pointer-events: none;
}

.cta-band .container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-4);
}

@media (min-width: 900px) {
  .cta-band .container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cta-band h2 {
  max-width: 18ch;
}

.cta-band .cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  flex: none;
}

.cta-phone {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--ink-faint);
  margin-top: 1rem;
}

.cta-phone a {
  color: var(--bronze-text);
  font-weight: 500;
  border-bottom: 1px solid var(--brass-line);
}

.cta-phone a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-grid {
  display: grid;
  gap: var(--s-4);
}

@media (min-width: 680px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid .form-field--full {
    grid-column: 1 / -1;
  }
}

.form-field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.7rem;
}

.form-field label .req {
  color: var(--danger);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 1rem 1.1rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  appearance: none;
}

.form-field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2357544A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.75rem;
}

.form-field textarea {
  min-height: 160px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--bronze);
  box-shadow: 0 0 0 4px rgba(156, 129, 69, 0.14);
}

.form-field .field-error {
  display: none;
  margin-top: 0.5rem;
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--danger);
}

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea {
  border-color: var(--danger);
}

.form-field.has-error .field-error {
  display: block;
}

.form-note {
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--ink-faint);
}

.form-status {
  display: none;
  padding: 1rem 1.25rem;
  border: 1px solid var(--brass-line);
  border-radius: var(--radius);
  font-weight: 400;
  background: rgba(156, 129, 69, 0.07);
  color: var(--ink);
}

.form-status.visible {
  display: block;
}

.form-status.error {
  border-color: var(--danger);
  background: rgba(166, 58, 43, 0.06);
  color: var(--danger);
}

/* --------------------------------------------------------------------------
   Contact page extras
   -------------------------------------------------------------------------- */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.5rem);
}

.contact-rows {
  display: grid;
  gap: var(--s-4);
}

.contact-row {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
}

.contact-row svg {
  width: 20px;
  height: 20px;
  flex: none;
  margin-top: 0.25rem;
  color: var(--bronze);
}

.contact-row strong {
  display: block;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}

.contact-row a {
  font-weight: 400;
  color: var(--ink);
}

.contact-row a:hover {
  color: var(--bronze-text);
}

/* --------------------------------------------------------------------------
   Footer — the one dark anchor on the page
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--footer-bg);
  color: rgba(243, 238, 227, 0.66);
  padding-block: clamp(4rem, 8vw, 6.5rem) var(--s-4);
}

.site-footer .brand-logo--dark {
  display: none;
}

.site-footer .brand-logo--light {
  display: block;
  height: 52px;
}

.footer-grid {
  display: grid;
  gap: var(--s-5);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid rgba(243, 238, 227, 0.14);
}

@media (min-width: 900px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: var(--s-4);
  }
}

.footer-brand p {
  margin-top: var(--s-3);
  font-size: 0.92rem;
  font-weight: 300;
  max-width: 34ch;
}

.footer-col h4 {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #C9A96E;
  margin-bottom: var(--s-3);
}

.footer-col ul {
  display: grid;
  gap: 0.8rem;
}

.footer-col a {
  font-size: 0.94rem;
  font-weight: 300;
  transition: color 0.3s var(--ease);
}

.footer-col a:hover {
  color: var(--footer-ivory);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: var(--s-4);
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(243, 238, 227, 0.18);
  color: rgba(243, 238, 227, 0.8);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}

.footer-social a:hover {
  border-color: #C9A96E;
  color: #C9A96E;
}

.footer-social svg {
  width: 17px;
  height: 17px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  justify-content: space-between;
  padding-top: var(--s-4);
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(243, 238, 227, 0.42);
}

.footer-bottom a {
  color: rgba(243, 238, 227, 0.65);
}

.footer-bottom a:hover {
  color: #C9A96E;
}

/* --------------------------------------------------------------------------
   Scroll experience (home hero) — pinned, scroll-scrubbed build sequence
   -------------------------------------------------------------------------- */
.scrolly {
  position: relative;
}

.scrolly-stage {
  position: relative;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  background: #E7EAE2;
  /* flexbox centres the intro; no transforms for GSAP to bake stale */
  display: flex;
  align-items: center;
}

.scrolly-video,
.scrolly-still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scrolly-still {
  display: none;
}

.scrolly-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom, rgba(24, 22, 17, 0.38) 0%, rgba(24, 22, 17, 0) 150px),
    linear-gradient(to right, rgba(24, 22, 17, 0.5) 0%, rgba(24, 22, 17, 0) 55%),
    linear-gradient(to top, rgba(24, 22, 17, 0.55) 0%, rgba(24, 22, 17, 0) 45%);
  pointer-events: none;
}

/* Intro: flex-centred top-to-bottom (true middle); pinned to the left edge of
   the page, left-aligned on both desktop and phones */
.scrolly-intro {
  position: relative;
  width: 100%;
  max-width: none;
  margin-top: 0;
  z-index: 3;
  text-align: left;
  text-shadow: 0 1px 28px rgba(24, 22, 17, 0.35);
}

.scrolly-intro .eyebrow {
  justify-content: flex-start;
}

.scrolly-intro .hero-title,
.scrolly-intro .hero-sub {
  margin-left: 0;
  margin-right: auto;
}

.scrolly-intro .hero-actions {
  justify-content: flex-start;
}

/* Keep the hero left-aligned on phones even though body text is centred */
@media (max-width: 700px) {
  .scrolly-intro {
    text-align: left;
  }
  .scrolly-intro .eyebrow {
    justify-content: flex-start;
  }
  .scrolly-intro .hero-title,
  .scrolly-intro .hero-sub {
    margin-left: 0;
    margin-right: auto;
  }
  .scrolly-intro .hero-actions {
    justify-content: flex-start;
  }
}

.scrolly-intro .eyebrow {
  color: #D9BF8C;
}

.scrolly-intro .eyebrow::before {
  background: rgba(243, 238, 227, 0.5);
}

.scrolly-intro .hero-title {
  max-width: none;
  font-size: clamp(2.4rem, 5.5vw, 5.25rem);
  color: var(--footer-ivory);
}

.scrolly-intro .hero-title em {
  color: #D9BF8C;
}

.scrolly-intro .hero-sub {
  margin-top: var(--s-3);
  max-width: 46ch;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  font-weight: 300;
  line-height: 1.85;
  color: rgba(243, 238, 227, 0.88);
}

/* Short viewports: keep the intro clear of the header */
@media (max-height: 820px) {
  .scrolly-intro .hero-title {
    font-size: clamp(2.2rem, 4.8vw, 4.5rem);
  }
  .scrolly-intro .hero-actions {
    margin-top: var(--s-4);
  }
}

.scrolly-intro .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-5);
}

.btn--ghost-ivory {
  border-color: rgba(243, 238, 227, 0.55);
  color: var(--footer-ivory);
}

.btn--ghost-ivory:hover {
  border-color: var(--footer-ivory);
}

/* Stage cards: hidden until the scrub timeline drives them.
   Floating text, no panel — all four share one spot, bottom-centre. */
.stage-card {
  display: none;
  position: absolute;
  z-index: 4;
  left: 50%;
  transform: translateX(-50%);
  bottom: clamp(3.5rem, 9vh, 6rem);
  width: min(92vw, 620px);
  text-align: center;
  text-shadow: 0 1px 26px rgba(24, 22, 17, 0.5);
  opacity: 0;
}

html.scrolly-active .stage-card {
  display: block;
}

.stage-num {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: #D9BF8C;
  line-height: 1;
}

.stage-num::after {
  content: "";
  display: block;
  width: 44px;
  height: 1px;
  margin: 0.85rem auto 0;
  background: rgba(217, 191, 140, 0.55);
}

.stage-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.6vw, 3rem);
  font-weight: 500;
  color: var(--footer-ivory);
  line-height: 1.08;
  margin-top: 0.75rem;
}

.stage-text {
  margin-top: 0.6rem;
  font-size: clamp(0.95rem, 1.2vw, 1.05rem);
  font-weight: 300;
  letter-spacing: 0.01em;
  color: rgba(243, 238, 227, 0.88);
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  color: rgba(243, 238, 227, 0.85);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  pointer-events: none;
}

.scroll-cue i {
  display: block;
  width: 1px;
  height: 34px;
  background: linear-gradient(to bottom, rgba(243, 238, 227, 0.9), rgba(243, 238, 227, 0));
  animation: cue-drop 2.2s var(--ease) infinite;
  transform-origin: top;
}

@keyframes cue-drop {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

/* Reduced motion / no GSAP: the completed backyard as a static hero */
html.scrolly-static .scrolly-video,
html.scrolly-static .scroll-cue,
html.scrolly-static .stage-card {
  display: none;
}

html.scrolly-static .scrolly-still {
  display: block;
}

/* Phones get the static hero (the 16:9 video crops too hard in portrait);
   keep the framing on the pool side of the finished-backyard frame */
@media (max-width: 700px) {
  .scrolly-still {
    object-position: 62% 50%;
  }
  .scrolly-stage {
    min-height: 560px;
  }
  /* the intro stack is tall on phones, so the shade has to reach higher */
  .scrolly-vignette {
    background: linear-gradient(to top,
      rgba(24, 22, 17, 0.72) 0%,
      rgba(24, 22, 17, 0.3) 55%,
      rgba(24, 22, 17, 0) 85%);
  }
}

/* --------------------------------------------------------------------------
   Reveal animations
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.mt-1 { margin-top: var(--s-1); }
.mt-2 { margin-top: var(--s-2); }
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }

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

/* --------------------------------------------------------------------------
   Mobile: centre-align page text (forms stay left for usability)
   -------------------------------------------------------------------------- */
@media (max-width: 700px) {
  main,
  .site-footer {
    text-align: center;
  }

  .eyebrow {
    justify-content: center;
  }

  .eyebrow::before {
    display: none;
  }

  .section-head,
  main p {
    margin-inline: auto;
  }

  .breadcrumb,
  .filter-bar,
  .chip-list,
  .footer-social,
  .footer-bottom {
    justify-content: center;
  }

  .feature-list li,
  .contact-row {
    flex-direction: column;
    align-items: center;
  }

  .feature-list svg,
  .contact-row svg {
    margin-top: 0;
  }

  .service-card .text-link {
    align-self: center;
  }

  /* forms read better left-aligned */
  .form-grid,
  .form-field {
    text-align: left;
  }
  .form-field .field-error,
  .form-note {
    margin-inline: 0;
  }
}
