:root {
  --cps-charcoal: #1a1a1a;
  --cps-warm-white: #faf9f6;
  --cps-primary: #00bf63;
  --cps-accent: #7ed957;
  /* Darker, text-safe variant of --cps-primary: the brand green fails WCAG AA
     (~2.4:1) as text or a link color on white/cream. Buttons keep --cps-primary
     as a fill (charcoal-on-green in .btn-accent passes at ~7:1); this variant
     is for anywhere the green itself is the foreground color. */
  --cps-primary-text: #0a7a3e;
}

body { overflow-x: hidden; }

.font-display {
  font-family: "Fraunces", ui-serif, Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.bg-cps-warm-white { background-color: var(--cps-warm-white); }
.bg-cps-dark { background-color: var(--cps-charcoal); }
.text-cps-cream { color: var(--cps-warm-white); }
.text-cps-cream-70 { color: rgba(250, 249, 246, 0.7); }
.text-cps-cream-80 { color: rgba(250, 249, 246, 0.8); }
.border-cps-white-10 { border-color: rgba(255, 255, 255, 0.1); }
.site-header-bg { background-color: rgba(250, 249, 246, 0.95); }

/* Override the generated .text-cps-primary utility (green text fails contrast
   on white/cream at normal size) with the darker text-safe variant. Loads
   after the Next-generated stylesheet, so this wins at equal specificity. */
.text-cps-primary,
.hover\:text-cps-primary:hover {
  color: var(--cps-primary-text);
}

/* Current-page indicator for primary nav (desktop + mobile). */
header nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Buttons */
.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 0.375rem;
  background-color: var(--cps-primary);
  color: var(--cps-charcoal);
  font-weight: 600;
  transition: background-color 0.15s ease;
}
.btn-accent:hover { background-color: #03d670; }
.btn-accent--sm { min-height: 2.75rem; padding: 0.5rem 0.75rem; font-size: 0.875rem; }
.btn-accent--lg { min-height: 2.75rem; padding: 0.75rem 1.5rem; font-size: 1rem; }
@media (min-width: 640px) {
  .btn-accent--sm { padding: 0.5rem 1.25rem; }
}

.btn-outline-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(250, 249, 246, 0.4);
  color: var(--cps-warm-white);
  font-weight: 600;
  font-size: 1rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.btn-outline-light:hover { border-color: var(--cps-primary); color: var(--cps-primary); }

/* Hero */
.hero-fullbleed {
  position: relative;
  min-height: 32rem;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.hero-fullbleed img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero-fullbleed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 26, 26, .5) 0%, rgba(26, 26, 26, .35) 40%, rgba(26, 26, 26, .88) 100%);
  z-index: -1;
}
.hero-content {
  position: relative;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 4rem 1rem 3rem;
}
@media (min-width: 640px) { .hero-content { padding: 4.5rem 1.5rem 3.5rem; } }
.hero-title {
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  max-width: 38rem;
}
.hero-sub {
  margin-top: 1.25rem;
  max-width: 34rem;
  font-size: 1.125rem;
  color: rgba(250, 249, 246, 0.85);
}
.hero-ctas { margin-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Secondary hero link: a single, unambiguous primary CTA (.btn-accent--lg)
   plus a lighter-weight text link, instead of two co-equal buttons. */
.hero-secondary-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(250, 249, 246, 0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hero-secondary-link:hover { color: var(--cps-warm-white); }

.trust-strip { background-color: var(--cps-charcoal); border-top: 1px solid rgba(255, 255, 255, .08); }
.trust-strip p {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(250, 249, 246, 0.7);
}
@media (min-width: 640px) { .trust-strip p { padding: 0.75rem 1.5rem; } }

/* Service cards */
.service-card {
  display: flex;
  flex-direction: column;
  border-radius: 0.75rem;
  background: #fff;
  padding: 2rem 1.75rem;
  box-shadow: 0 1px 2px rgba(26, 26, 26, .04), 0 10px 30px -16px rgba(26, 26, 26, .2);
}
.service-icon { color: var(--cps-charcoal); }

/* Feature band ("why choose us") */
.feature-band { position: relative; overflow: hidden; }
.feature-band img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.feature-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26, 26, 26, .86), rgba(26, 26, 26, .8));
  z-index: -1;
}
.feature-band-content { position: relative; max-width: 72rem; margin: 0 auto; padding: 3.5rem 1rem; }
@media (min-width: 640px) { .feature-band-content { padding: 4rem 1.5rem; } }
.feature-band-grid { margin-top: 2.5rem; display: grid; gap: 2.25rem; }
@media (min-width: 640px) { .feature-band-grid { grid-template-columns: repeat(3, 1fr); } }
.feature-item { text-align: center; padding: 0 0.5rem; }
@media (min-width: 640px) {
  .feature-item:not(:first-child) { border-left: 1px solid rgba(255, 255, 255, .15); }
}
.feature-item h3 { font-size: 1rem; font-weight: 600; color: var(--cps-warm-white); }
.feature-item p { margin-top: 0.5rem; font-size: 0.875rem; color: rgba(250, 249, 246, .7); }

/* Testimonial quote bands */
.quote-band {
  position: relative;
  overflow: hidden;
  min-height: 20rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3.5rem 1.5rem;
}
.quote-band img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.quote-band::after { content: ""; position: absolute; inset: 0; background: rgba(26, 26, 26, .74); z-index: -1; }
.quote-band-text {
  max-width: 44rem;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  font-style: italic;
  font-weight: 500;
  line-height: 1.45;
  color: var(--cps-warm-white);
}
.quote-band-caption { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.15rem; }
.quote-band-name { font-weight: 600; color: var(--cps-warm-white); }
.quote-band-role { font-size: 0.875rem; color: rgba(250, 249, 246, .78); }

/* Recent work overlap composition (signature device) */
.work-overlap { margin-top: 2.5rem; margin-bottom: 2.5rem; display: grid; gap: 3.5rem; }
@media (min-width: 768px) { .work-overlap { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.work-cluster { position: relative; }
/* Fixed-ratio positioning context for the two photos, independent of
   .work-cluster's own auto height. Needed wherever a caption follows the
   photos: without it, the caption's height feeds back into .work-cluster's
   auto height, which .work-cluster-overlap's bottom:-14% also resolves
   against, growing on every layout pass. */
.work-cluster-photos { position: relative; aspect-ratio: 4 / 3; }
.work-cluster-main { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0.5rem; display: block; }
.work-cluster-overlap {
  position: absolute;
  width: 55%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 4px solid var(--cps-warm-white);
  box-shadow: 0 14px 30px -10px rgba(26, 26, 26, .4);
}
.work-cluster--a .work-cluster-overlap { right: -5%; bottom: -14%; }
.work-cluster--b .work-cluster-overlap { left: -5%; bottom: -14%; }
.work-cluster-caption {
  /* .work-cluster-overlap overshoots .work-cluster-photos' bottom edge by
     10.5% of width (14% of the 4:3 wrapper's own height); this clears it
     with room to spare, scaling the same way since % margin resolves
     against the containing block's width. */
  margin-top: 14%;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cps-charcoal);
}

/* Short hero variant (About) */
.hero-fullbleed--short { min-height: 22rem; align-items: center; }
.hero-fullbleed--short::after { background: rgba(26, 26, 26, .62); }

/* Team bios (About) */
.team-member { text-align: center; padding: 0 1rem; }
@media (min-width: 640px) {
  .team-member:first-child { border-right: 1px solid rgba(26, 26, 26, .08); }
}
.team-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: #fff;
  padding: 0.6rem;
  box-shadow: 0 1px 2px rgba(26, 26, 26, .06);
}
.team-mark img { width: 100%; height: 100%; object-fit: contain; }
.team-name { margin-top: 1.25rem; font-size: 1.25rem; color: var(--cps-charcoal); }
.team-role { margin-top: 0.25rem; font-size: 0.8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--cps-primary-text); }
.team-bio { margin-top: 0.75rem; font-size: 0.9rem; color: rgba(26, 26, 26, .7); }

/* Services split panels */
.service-split { position: relative; display: grid; }
@media (min-width: 1024px) { .service-split { grid-template-columns: 1fr 1fr; align-items: stretch; } }
.service-split-media { position: relative; min-height: 16rem; }
.service-split-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.service-split-text { display: flex; flex-direction: column; justify-content: center; background: #fff; padding: 3rem 1.5rem; }
@media (min-width: 640px) { .service-split-text { padding: 3.5rem 2.5rem; } }
.service-split--dark .service-split-text { background: var(--cps-charcoal); }
.service-split--dark .service-split-text h2 { color: var(--cps-warm-white); }
.service-split--dark .service-split-text p { color: rgba(250, 249, 246, .75); }
.service-split--dark .service-split-text li { color: rgba(250, 249, 246, .85); }
.service-split--dark .service-icon { color: var(--cps-warm-white); }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
}

/* Portfolio lightbox */
.work-cluster-main, .work-cluster-overlap { cursor: zoom-in; }
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 26, 26, 0.92);
  padding: 2rem 1rem;
}
.lightbox-figure { position: relative; max-width: 90vw; max-height: 85vh; }
.lightbox-figure img {
  display: block;
  max-width: 90vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
  margin-top: 0.75rem;
  text-align: center;
  color: var(--cps-warm-white);
  font-size: 0.875rem;
}
.lightbox-close, .lightbox-nav {
  position: fixed;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: rgba(250, 249, 246, 0.1);
  color: var(--cps-warm-white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(250, 249, 246, 0.2); }
.lightbox-close { top: 1.25rem; right: 1.25rem; }
.lightbox-nav--prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lightbox-nav--next { right: 1.25rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox-nav--prev { left: 0.5rem; }
  .lightbox-nav--next { right: 0.5rem; }
}

/* Contact form UX */
.field-error { margin-top: 0.375rem; font-size: 0.8rem; color: #c0362c; }
.input-invalid { border-color: #c0362c !important; }
.input-invalid:focus { box-shadow: 0 0 0 2px rgba(192, 54, 44, 0.25) !important; }
button.is-loading { opacity: 0.75; cursor: progress; }

/* Honeypot: invisible to sighted users, off the tab order, but still present
   in the DOM for bots that fill every field indiscriminately. */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Visually-hidden but still focusable/keyboard-operable file input; the
   <label for="photos"> (.btn-file) is the visible control. */
.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.file-input-hidden:focus-visible + .btn-file {
  outline: 2px solid var(--cps-primary-text);
  outline-offset: 2px;
}

.btn-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.25rem;
  border-radius: 0.375rem;
  border: 1px solid rgba(26, 26, 26, 0.15);
  color: var(--cps-charcoal);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.btn-file:hover { background-color: rgba(26, 26, 26, 0.03); border-color: rgba(26, 26, 26, 0.3); }
