/* Upstate Premier Construction — shared styles */
:root {
  --navy: #0f1c2e;
  --navy-mid: #1a2d47;
  --charcoal: #2c333a;
  --steel: #3d6b8e;
  --steel-light: #5a8fb0;
  --accent: #c4783a;
  --accent-hover: #a8632d;
  --cream: #f7f5f2;
  --off-white: #fafaf9;
  --muted: #5c6670;
  --border: #e2e5e9;
  --white: #ffffff;
  --focus: #3d6b8e;
  --radius: 6px;
  --shadow: 0 4px 24px rgba(15, 28, 46, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 28, 46, 0.12);
  --shadow-card: 0 8px 28px rgba(15, 28, 46, 0.1);
  --max: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --ease: 0.25s ease;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-press: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--steel);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}
a:hover { color: var(--accent); }
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2rem, 4.5vw, 2.85rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.55rem, 3vw, 2rem); letter-spacing: -0.015em; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition:
    background-color 0.35s var(--ease-out-soft),
    box-shadow 0.35s var(--ease-out-soft),
    border-color 0.35s var(--ease-out-soft);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 8px 32px rgba(15, 28, 46, 0.11);
  border-bottom-color: transparent;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  min-height: 4.25rem;
  transition: padding 0.35s var(--ease-out-soft);
}
.site-header.is-scrolled .header-inner {
  padding: 0.4rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  flex-shrink: 0;
}
.logo img {
  height: 44px;
  width: auto;
  max-height: 48px;
  display: block;
  object-fit: contain;
}
.logo:hover { opacity: 0.88; }
.logo:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
@media (max-width: 480px) {
  .logo img {
    height: 36px;
  }
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.65rem;
  cursor: pointer;
  color: var(--navy);
}
.nav-toggle:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.nav-toggle-bars {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: currentColor;
  position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--charcoal);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  position: relative;
  transition: color 0.2s var(--ease-out-soft);
}
.nav-list a:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out-expo);
  pointer-events: none;
}
.nav-list a:not(.nav-cta):hover,
.nav-list a:not(.nav-cta)[aria-current="page"] {
  color: var(--navy);
}
.nav-list a:not(.nav-cta):hover::after,
.nav-list a:not(.nav-cta)[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--navy);
  color: var(--white) !important;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.55rem 1rem !important;
  border-radius: var(--radius);
  transition:
    background 0.2s var(--ease-out-soft),
    transform 0.2s var(--ease-press),
    box-shadow 0.2s var(--ease-out-soft) !important;
}
.nav-cta:hover {
  background: var(--steel) !important;
  color: var(--white) !important;
  box-shadow: 0 4px 14px rgba(15, 28, 46, 0.2);
}
.nav-cta:active {
  transform: scale(0.97);
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--ease),
    color var(--ease),
    border-color var(--ease),
    transform 0.2s var(--ease-press),
    box-shadow var(--ease);
}
.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.btn:hover { transform: translateY(-2px); }
.btn:active {
  transform: translateY(1px) scale(0.98);
  transition-duration: 0.08s;
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(196, 120, 58, 0.35);
}
.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  border-color: var(--white);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-top: 1.75rem;
}

/* —— Hero (home) —— */
.hero {
  position: relative;
  color: var(--white);
  padding: clamp(4rem, 10vw, 7rem) 0;
  overflow: hidden;
  background: var(--navy);
  min-height: clamp(22rem, 55vw, 32rem);
  display: flex;
  align-items: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1) translate3d(0, 0, 0);
  transform-origin: 48% 42%;
  backface-visibility: hidden;
}
.hero.is-ready .hero-bg img {
  will-change: transform;
  animation: hero-ken-burns 22s var(--ease-out-soft) forwards;
}
/* Dual-phase slow zoom + subtle drift (GPU transform only) */
@keyframes hero-ken-burns {
  0%   { transform: scale(1) translate3d(0, 0, 0); }
  42%  { transform: scale(1.05) translate3d(-1.1%, -0.5%, 0); }
  100% { transform: scale(1.09) translate3d(1.4%, -1.1%, 0); }
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(105deg, rgba(15, 28, 46, 0.92) 0%, rgba(15, 28, 46, 0.78) 45%, rgba(26, 45, 71, 0.65) 100%),
    linear-gradient(to top, rgba(15, 28, 46, 0.5) 0%, transparent 40%);
  pointer-events: none;
  opacity: 1;
}
.hero.is-ready .hero-overlay {
  animation: hero-overlay-in 1.35s var(--ease-out-soft) both;
}
@keyframes hero-overlay-in {
  from { opacity: 0.42; }
  to { opacity: 1; }
}
.hero .container { position: relative; z-index: 2; }

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-light);
  margin-bottom: 1rem;
}
.hero h1 {
  color: var(--white);
  max-width: 18ch;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}
.hero-lead {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 36rem;
  margin-bottom: 0;
}

.hero-accent-bar {
  width: 3rem;
  height: 3px;
  background: var(--accent);
  margin-bottom: 1.5rem;
  border-radius: 2px;
}

/* —— Sections —— */
.section {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}
.section-alt { background: var(--cream); }
.section-dark {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.9);
}
.section-dark h2 { color: var(--white); }

.section-header {
  max-width: 38rem;
  margin-bottom: 2.5rem;
}
.section-header.centered {
  text-align: center;
  margin-inline: auto;
  max-width: 40rem;
}
.section-header p {
  color: var(--muted);
  font-size: 1.05rem;
}
.section-dark .section-header p { color: rgba(255, 255, 255, 0.7); }

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.65rem;
}

/* —— Cards / grids —— */
.card-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--ease), border-color var(--ease), transform var(--ease);
}
.card:hover {
  box-shadow: var(--shadow-card);
  border-color: #cfd5db;
  transform: translateY(-3px);
}
.card-icon {
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.15rem;
  color: var(--steel);
}
.card h3 { margin-bottom: 0.5rem; }
.card p {
  color: var(--muted);
  font-size: 0.98rem;
  margin: 0;
}

/* Photo service cards */
.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: hidden;
}
.service-card .card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--navy-mid);
}
.service-card .card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.75s var(--ease-out-soft);
  transform: scale(1) translate3d(0, 0, 0);
  will-change: auto;
}
.service-card:hover .card-media img {
  transform: scale(1.065) translate3d(0, 0, 0);
}
.service-card .card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.5rem 1.5rem 1.65rem;
}
.service-card .card-body .card-icon {
  margin-bottom: 0.85rem;
}
.service-card .card-link {
  margin-top: auto;
  padding-top: 1.15rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--steel);
  transition: color 0.15s ease;
}
.service-card .card-link:hover { color: var(--accent); }

/* Process step cards keep padding */
.card.step-card {
  padding: 1.75rem;
  position: relative;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(61, 107, 142, 0.12);
  color: var(--steel);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}


/* —— Trade partners —— */
.partners-section .section-header {
  margin-bottom: 2.75rem;
}
.partners-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: clamp(1.75rem, 4vw, 3.5rem) clamp(2.5rem, 6vw, 4.5rem);
}
.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 10rem;
  min-height: 5.5rem;
  padding: 1.25rem 1.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: border-color var(--ease), box-shadow var(--ease), transform var(--ease);
}
.partner-logo img {
  width: auto;
  max-width: 12.5rem;
  max-height: 4rem;
  object-fit: contain;
  filter: grayscale(1) opacity(0.78);
  transition: filter var(--ease), opacity var(--ease);
}
.partner-logo:hover {
  border-color: var(--steel-light);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.partner-logo:hover img,
.partner-logo:focus-visible img {
  filter: grayscale(0) opacity(1);
}
.partner-logo:focus-visible {
  border-color: var(--steel-light);
  box-shadow: var(--shadow-card);
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .partner-logo:hover { transform: none; }
}

/* —— Gallery strip —— */
.gallery-strip {
  padding: 0 0 clamp(2.5rem, 5vw, 3.5rem);
  overflow: hidden;
}
.gallery-strip .section-header {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.75rem;
  margin-bottom: 0;
}
.gallery-strip .section-header h2 { margin-bottom: 0; }
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}
.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--navy-mid);
}
.gallery-item.gallery-feature {
  grid-column: 1 / -1;
  aspect-ratio: 4 / 3;
}
@media (min-width: 720px) {
  .gallery-grid {
    grid-template-columns: 1.15fr 1fr 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    height: clamp(30rem, 48vw, 38rem);
  }
  .gallery-item,
  .gallery-item.gallery-feature { aspect-ratio: auto; }
  .gallery-item.gallery-feature {
    grid-column: 1;
    grid-row: 1 / span 2;
  }
}
.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo, ease);
}
.gallery-item.gallery-feature img { object-position: center 40%; }
.gallery-item:hover img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
  .gallery-item img { transition: none; }
  .gallery-item:hover img { transform: none; }
}
.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 28, 46, 0.35) 0%, transparent 50%);
  opacity: 0.6;
  transition: opacity var(--ease);
  pointer-events: none;
}
.gallery-item:hover::after { opacity: 0.3; }
.gallery-caption {
  text-align: center;
  padding: 1.25rem 1rem 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* —— Split layout —— */
.split {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 800px) {
  .split { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
}

.split-visual {
  background: var(--navy-mid);
  border-radius: calc(var(--radius) + 4px);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.split-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}
.split-visual:hover img {
  transform: scale(1.04);
}
.split-visual--pattern {
  padding: 2rem;
}
.split-visual--pattern img,
.split-visual--pattern svg {
  width: 70%;
  max-width: 280px;
  height: auto;
  object-fit: contain;
  opacity: 0.9;
}

.stat-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}
.stat-list li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}
.stat-list li:last-child { border-bottom: 1px solid var(--border); }
.stat-mark {
  flex-shrink: 0;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.55rem;
  background: var(--accent);
  border-radius: 50%;
}
.stat-list strong {
  display: block;
  color: var(--navy);
  font-size: 1rem;
  margin-bottom: 0.15rem;
}
.stat-list span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* —— CTA band —— */
.cta-band {
  text-align: center;
  padding: clamp(3rem, 6vw, 4rem) 0;
  position: relative;
  overflow: hidden;
}
.cta-band .container.reveal {
  transform: translateY(1.2rem) scale(0.985);
  transition:
    opacity 0.85s var(--ease-out-soft),
    transform 0.85s var(--ease-out-expo);
}
.cta-band .container.reveal.is-inview {
  transform: none;
}
.cta-band h2 { color: var(--white); margin-bottom: 0.75rem; }
.cta-band p {
  color: rgba(255, 255, 255, 0.75);
  max-width: 32rem;
  margin: 0 auto 1.75rem;
}
.cta-band .phone-link {
  display: inline-block;
  color: var(--white);
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
  transition: color 0.15s ease;
}
.cta-band .phone-link:hover { color: var(--steel-light); }

/* —— Page hero (inner pages) —— */
.page-hero {
  position: relative;
  color: var(--white);
  padding: clamp(3rem, 7vw, 4.5rem) 0;
  overflow: hidden;
  background: var(--navy);
  min-height: 14rem;
  display: flex;
  align-items: center;
}
.page-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.page-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(100deg, rgba(15, 28, 46, 0.9) 0%, rgba(15, 28, 46, 0.72) 55%, rgba(26, 45, 71, 0.6) 100%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 { color: var(--white); margin-bottom: 0.75rem; }
.page-hero p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 36rem;
  margin: 0;
  font-size: 1.1rem;
}
.page-hero .eyebrow { color: var(--steel-light); }

/* —— Services detail (photo + text) —— */
.service-detail {
  display: grid;
  gap: 1.5rem;
}
.service-detail-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1fr;
  transition: box-shadow var(--ease), transform var(--ease);
}
.service-detail-item:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.service-detail-item .detail-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--navy-mid);
}
.service-detail-item .detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.service-detail-item:hover .detail-media img {
  transform: scale(1.04);
}
.service-detail-item .detail-body {
  padding: 1.5rem 1.5rem 1.65rem;
  border-left: 4px solid var(--steel);
}
.service-detail-item h3 { margin-bottom: 0.5rem; }
.service-detail-item p {
  color: var(--muted);
  margin: 0;
}

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

/* —— About —— */
.about-note {
  background: var(--cream);
  border-left: 3px solid var(--steel);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* —— Contact —— */
.contact-grid {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 800px) {
  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
    gap: 3.5rem;
    align-items: start;
  }
}

.contact-info-card {
  background: var(--navy);
  color: var(--white);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.contact-info-card::before {
  content: "";
  position: absolute;
  top: -20%;
  right: -15%;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  background: rgba(61, 107, 142, 0.2);
  pointer-events: none;
}
.contact-info-card h2 {
  color: var(--white);
  font-size: 1.35rem;
  margin-bottom: 1rem;
  position: relative;
}
.contact-info-card p {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.5rem;
  position: relative;
}
.contact-info-card dl { position: relative; }
.contact-detail {
  margin-bottom: 1.5rem;
}
.contact-detail:last-child { margin-bottom: 0; }
.contact-detail dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-light);
  margin-bottom: 0.35rem;
}
.contact-detail dd {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}
.contact-detail a {
  color: var(--white);
  text-decoration: none;
  transition: color 0.15s ease;
}
.contact-detail a:hover { color: var(--steel-light); }

.phone-xl {
  font-size: 1.5rem !important;
  letter-spacing: 0.02em;
}

/* Form */
.contact-form-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.form-group .required {
  color: var(--accent);
  font-weight: 400;
}
.form-group input,
.form-group textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--off-white);
  color: var(--charcoal);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-group input:hover,
.form-group textarea:hover {
  border-color: #c5cad1;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--steel);
  box-shadow: 0 0 0 3px rgba(61, 107, 142, 0.2);
  background: var(--white);
}
.form-group textarea {
  min-height: 140px;
  resize: vertical;
}
.form-actions {
  margin-top: 1.5rem;
}
.form-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.85rem;
}

/* Honeypot — visually hidden from humans, present for bots */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.form-error {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid #e8b4b4;
  background: #fdf2f2;
  color: #8a1f1f;
  font-size: 0.92rem;
}
.form-error[hidden] { display: none; }

.form-success {
  display: none;
  text-align: center;
  padding: 2rem 1rem;
}
.form-success.is-visible { display: block; }
.form-success.is-visible ~ .contact-form { display: none; }
.form-success-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.25rem;
  background: rgba(61, 107, 142, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--steel);
}
.form-success h3 { margin-bottom: 0.5rem; }
.form-success p { color: var(--muted); }

/* —— Footer —— */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.75);
  padding: 3rem 0 1.5rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}
.footer-brand {
  margin-bottom: 0.75rem;
}
.footer-brand a {
  display: inline-block;
  text-decoration: none;
  line-height: 0;
}
.footer-brand img {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
  /* Soften white logo plate on navy footer */
  border-radius: 3px;
  background: var(--white);
  padding: 0.35rem 0.5rem;
}
.footer-brand a:hover { opacity: 0.9; }
.footer-tagline {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel-light);
  margin-top: 0.55rem;
}
.footer-col h4 {
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col li { margin-bottom: 0.5rem; }
.footer-col a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}
.footer-bottom a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}
.footer-bottom a:hover { color: var(--white); }

/* —— Utility —— */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  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(--accent);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius);
}
.skip-link:focus {
  top: 1rem;
}

/* —— Mobile nav —— */
@media (max-width: 799px) {
  .nav-toggle { display: block; }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    padding: 0.75rem 1rem 1.25rem;
    display: none;
  }
  .primary-nav.is-open { display: block; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav-list li { border-bottom: 1px solid var(--border); }
  .nav-list li:last-child { border-bottom: none; padding-top: 0.75rem; }
  .nav-list a {
    display: block;
    padding: 0.85rem 0.25rem;
  }
  .nav-list a:not(.nav-cta)::after {
    display: none;
  }
  .nav-list a[aria-current="page"] {
    color: var(--accent);
  }
  .nav-cta {
    justify-content: center;
    width: 100%;
  }
}


/* —— Motion: reveal on scroll, hero cascade, ken-burns —— */
.reveal {
  opacity: 0;
  transform: translateY(1.15rem);
  transition:
    opacity 0.7s var(--ease-out-expo),
    transform 0.7s var(--ease-out-expo);
  will-change: opacity, transform;
}
.reveal.is-inview {
  opacity: 1;
  transform: none;
}

/* Section headers: soft scale + fade */
.section-header.reveal {
  transform: translateY(0.85rem) scale(0.98);
}
.section-header.reveal.is-inview {
  transform: none;
}

/* Split layouts: slide from sides */
.split > .reveal:first-child {
  transform: translateX(-1.35rem);
}
.split > .reveal:last-child {
  transform: translateX(1.35rem);
}
.split > .reveal.is-inview {
  transform: none;
}

/* Stagger within grids */
.card-grid > .reveal:nth-child(1),
.gallery-grid > .reveal:nth-child(1),
.service-detail > .reveal:nth-child(1),
.partners-grid > .reveal:nth-child(1) { transition-delay: 0ms; }
.card-grid > .reveal:nth-child(2),
.gallery-grid > .reveal:nth-child(2),
.service-detail > .reveal:nth-child(2),
.partners-grid > .reveal:nth-child(2) { transition-delay: 70ms; }
.card-grid > .reveal:nth-child(3),
.gallery-grid > .reveal:nth-child(3),
.service-detail > .reveal:nth-child(3),
.partners-grid > .reveal:nth-child(3) { transition-delay: 140ms; }
.card-grid > .reveal:nth-child(4),
.gallery-grid > .reveal:nth-child(4),
.service-detail > .reveal:nth-child(4),
.partners-grid > .reveal:nth-child(4) { transition-delay: 210ms; }
.card-grid > .reveal:nth-child(5),
.service-detail > .reveal:nth-child(5),
.partners-grid > .reveal:nth-child(5) { transition-delay: 280ms; }
.card-grid > .reveal:nth-child(6),
.service-detail > .reveal:nth-child(6),
.partners-grid > .reveal:nth-child(6) { transition-delay: 350ms; }
.card-grid > .reveal:nth-child(n+7),
.service-detail > .reveal:nth-child(n+7),
.partners-grid > .reveal:nth-child(n+7) { transition-delay: 400ms; }

/* Hero / page-hero entrance cascade (~1s total, softer ease) */
.hero .container > *,
.page-hero .container > * {
  opacity: 0;
  transform: translateY(0.85rem);
  transition:
    opacity 0.7s var(--ease-out-soft),
    transform 0.75s var(--ease-out-expo);
}
.hero.is-ready .container > *,
.page-hero.is-ready .container > * {
  opacity: 1;
  transform: none;
}
.hero.is-ready .container > *:nth-child(1),
.page-hero.is-ready .container > *:nth-child(1) { transition-delay: 0.06s; }
.hero.is-ready .container > *:nth-child(2),
.page-hero.is-ready .container > *:nth-child(2) { transition-delay: 0.14s; }
.hero.is-ready .container > *:nth-child(3),
.page-hero.is-ready .container > *:nth-child(3) { transition-delay: 0.24s; }
.hero.is-ready .container > *:nth-child(4),
.page-hero.is-ready .container > *:nth-child(4) { transition-delay: 0.34s; }
.hero.is-ready .container > *:nth-child(5),
.page-hero.is-ready .container > *:nth-child(5) { transition-delay: 0.44s; }
.hero.is-ready .container > *:nth-child(n+6),
.page-hero.is-ready .container > *:nth-child(n+6) { transition-delay: 0.52s; }

/* Reduce motion — instant show, no ken-burns / lifts */
@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;
  }
  .btn:hover,
  .btn:active,
  .nav-cta:active,
  .card:hover,
  .partner-logo:hover,
  .service-detail-item:hover { transform: none; }
  .service-card:hover .card-media img,
  .service-detail-item:hover .detail-media img,
  .gallery-item:hover img,
  .split-visual:hover img { transform: none; }
  .nav-list a:not(.nav-cta)::after {
    transform: none;
    opacity: 0;
  }
  .nav-list a:not(.nav-cta)[aria-current="page"]::after {
    opacity: 1;
    transform: scaleX(1);
  }
  .reveal,
  .section-header.reveal,
  .split > .reveal:first-child,
  .split > .reveal:last-child {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
  .hero .container > *,
  .page-hero .container > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-bg img,
  .hero.is-ready .hero-bg img {
    animation: none !important;
    transform: none;
    will-change: auto;
  }
  .hero-overlay,
  .hero.is-ready .hero-overlay {
    animation: none !important;
    opacity: 1;
  }
  .cta-band .container.reveal,
  .cta-band .container.reveal.is-inview {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .site-header,
  .header-inner { transition: none; }
}

/* —— Page layout shell —— */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

/* —— Mobile refinements (phones only; desktop unchanged) —— */
@media (max-width: 639px) {
  h1 { font-size: 1.85rem; line-height: 1.15; }
  h2 { font-size: 1.45rem; line-height: 1.2; }
  .section { padding: 2.75rem 0; }
  .section-header { margin-bottom: 1.75rem; }

  /* Hero: fill the screen, tighter type so CTAs sit above the fold */
  .hero {
    min-height: calc(100svh - 64px);
    padding: 2.5rem 0 2.25rem;
    display: flex;
    align-items: flex-end;
  }
  .hero .container { width: calc(100% - 2.5rem); }
  .hero h1 { font-size: 1.9rem; max-width: none; margin-bottom: 0.9rem; }
  .hero-lead { font-size: 1rem; line-height: 1.55; }
  .hero-bg img { object-position: 62% center; }
  .hero .btn-row { margin-top: 1.5rem; }
  .hero .btn-row .btn,
  .cta-band .btn-row .btn { flex: 1 1 100%; justify-content: center; text-align: center; }

  /* Larger tap targets */
  .btn { min-height: 48px; padding-top: 0.8rem; padding-bottom: 0.8rem; }
  .card-link { display: inline-flex; align-items: center; min-height: 44px; }

  /* Home service cards: horizontal swipe carousel */
  .card-grid.cols-2:has(> .service-card) {
    display: grid;
    grid-auto-flow: column;
    grid-template-columns: none;
    grid-auto-columns: 82%;
    gap: 0.85rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    margin-inline: -1rem;
    padding: 0.25rem 1rem 1rem;
    scroll-padding-inline: 1rem;
    scrollbar-width: none;
  }
  .card-grid.cols-2:has(> .service-card)::-webkit-scrollbar { display: none; }
  .card-grid.cols-2 > .service-card { scroll-snap-align: start; }
  .service-card .card-body { padding: 1.1rem 1.15rem 0.6rem; }
  .service-card .card-body p { font-size: 0.95rem; }

  /* Trade partners: tidy 3-up row */
  .partners-section .section-header { margin-bottom: 1.5rem; }
  .partners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
  }
  .partner-logo {
    min-width: 0;
    min-height: 4.5rem;
    height: 100%;
    padding: 0.6rem;
  }
  .partner-logo img { max-width: 100%; max-height: 3.25rem; filter: grayscale(1) opacity(0.85); }
  .partners-section { padding-bottom: 1.5rem; }

  /* Gallery: edge-to-edge with hairline gutters */
  .gallery-strip .section-header { padding-top: 2.75rem; padding-bottom: 1.25rem; }
  .gallery-strip { padding-bottom: 2.75rem; }
  .gallery-grid { width: 100%; gap: 3px; }
  .gallery-item { border-radius: 0; }

  /* Footer: brand full width, nav + contact side by side */
  .site-footer { padding-top: 2.5rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem 1rem; margin-bottom: 1.75rem; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

/* Services list (no photos) */
.service-groups { display: grid; gap: 2.75rem; }
.service-group-title {
  margin: 0 0 1.1rem; font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--steel); padding-bottom: 0.6rem; border-bottom: 2px solid var(--border);
}
.service-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1rem; }
.service-list li {
  display: flex; align-items: flex-start; gap: 1rem;
  background: var(--white); border: 1px solid var(--border); border-left: 3px solid var(--steel);
  border-radius: var(--radius); padding: 1.1rem 1.25rem;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.service-list li:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); border-left-color: var(--steel-light); }
.svc-icon {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; color: var(--steel);
  background: linear-gradient(145deg, #eaf2f8, #dbe8f2);
}
.svc-icon svg { width: 24px; height: 24px; }
.svc-text { display: flex; flex-direction: column; gap: 0.15rem; padding-top: 0.1rem; }
.service-list strong { color: var(--navy); font-size: 1.05rem; }
.service-list .svc-text span { color: var(--muted); font-size: 0.97rem; line-height: 1.5; }
@media (min-width: 720px) { .service-list { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) { .service-list li { transition: none; } .service-list li:hover { transform: none; } }
@media (min-width: 900px) { .service-list--3 { grid-template-columns: repeat(3, 1fr); } }

/* Project gallery — mosaic */
.project-gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 44vw;
  grid-auto-flow: dense; gap: 0.75rem;
}
.project-gallery > li { min-width: 0; }
.project-gallery .g-feature { grid-column: span 2; grid-row: span 2; }
.project-gallery .g-wide { grid-column: span 2; }
.project-gallery .g-tall { grid-row: span 2; }
@media (min-width: 720px) {
  .project-gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(150px, 20vw, 230px); gap: 1.25rem; }
}
.pg-item {
  display: block; position: relative; height: 100%; overflow: hidden; border-radius: 14px;
  background: var(--border); box-shadow: 0 6px 22px rgba(15, 28, 46, 0.12);
  transition: box-shadow 0.4s var(--ease-out-soft), transform 0.4s var(--ease-out-soft);
}
.pg-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s var(--ease-out-soft); }
.pg-item::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(15,28,46,0) 50%, rgba(15,28,46,0.5));
  opacity: 0; transition: opacity 0.4s ease;
}
.pg-zoom {
  position: absolute; right: 0.85rem; bottom: 0.85rem; z-index: 1; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgba(61, 107, 142, 0.85);
  box-shadow: 0 4px 14px rgba(0,0,0,0.25); opacity: 0; transform: translateY(6px) scale(0.9);
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out-soft);
}
.pg-zoom svg { width: 18px; height: 18px; }
.pg-item:hover, .pg-item:focus-visible { box-shadow: 0 14px 36px rgba(15, 28, 46, 0.22); transform: translateY(-2px); }
.pg-item:hover img, .pg-item:focus-visible img { transform: scale(1.04); }
.pg-item:hover::after, .pg-item:focus-visible::after { opacity: 1; }
.pg-item:hover .pg-zoom, .pg-item:focus-visible .pg-zoom { opacity: 1; transform: none; }
.pg-item:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
@media (hover: none) { .pg-zoom { opacity: 0.9; transform: none; width: 34px; height: 34px; } }
.project-gallery.is-animated > li { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s var(--ease-out-soft); }
.project-gallery.is-animated > li.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .project-gallery.is-animated > li { opacity: 1; transform: none; transition: none; }
  .pg-item, .pg-item img, .pg-zoom { transition: none; }
  .pg-item:hover img { transform: none; }
}

.lightbox {
  position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center;
  background: rgba(10, 19, 32, 0.97); padding: 3.5rem 1rem; touch-action: pan-y; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.lightbox.is-open { display: flex; }
.lightbox-img { max-width: min(100%, 1400px); max-height: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); user-select: none; }
.lightbox-btn {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25); background: rgba(61,107,142,0.55); color: #fff; cursor: pointer;
  transition: background var(--ease);
}
.lightbox-btn:hover { background: var(--steel); }
.lightbox-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lightbox-btn svg { width: 22px; height: 22px; }
.lightbox-close { top: 0.75rem; right: 0.75rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-counter { position: absolute; top: 1.1rem; left: 1rem; color: rgba(255,255,255,0.85); font-size: 0.95rem; letter-spacing: 0.05em; }
.lightbox-caption { position: absolute; bottom: 1rem; left: 1rem; right: 1rem; text-align: center; color: rgba(255,255,255,0.8); font-size: 0.92rem; }
@media (max-width: 640px) {
  .lightbox-prev, .lightbox-next { top: auto; bottom: 2.75rem; transform: none; }
  .lightbox { padding-bottom: 6.5rem; }
}
body.lightbox-lock { overflow: hidden; }
.service-list--4 li { align-items: center; }
@media (min-width: 1000px) { .service-list--4 { grid-template-columns: repeat(4, 1fr); } }
.section.section-tight-top { padding-top: 0; }
@media (max-width: 719px) {
  .service-list--4 { gap: 0.6rem; }
  .service-list--4 li { padding: 0.8rem 1rem; }
  .service-list--4 .svc-icon { width: 40px; height: 40px; border-radius: 10px; }
}
