/*
  THE CAP GROUP — Global Stylesheet
  Design: Minimal / Architectural / Premium
  Variance: 7 | Motion: 6 | Density: 3
*/

/* === FONTS === */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/outfit-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === RESET === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { border: none; background: none; cursor: pointer; font: inherit; }
input, textarea, select { font: inherit; }

/* === DESIGN TOKENS === */
:root {
  --white:        #ffffff;
  --off-white:    #f8f7f4;
  --grey-50:      #f2f1ed;
  --grey-100:     #e8e6e0;
  --grey-200:     #d4d2cc;
  --grey-400:     #9b9891;
  --grey-600:     #6a6862;
  --grey-700:     #504e49;
  --grey-800:     #3a3935;
  --grey-900:     #1a1917;

  --accent:       #00245d;
  --accent-hover: #1C3697;
  --accent-pale:  #e8ecf2;

  --font: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

  --nav-h:    80px;
  --max-w:    1400px;
  --gutter:   clamp(1.5rem, 5vw, 4rem);

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.65, 0, 0.35, 1);
}

/* === BASE === */
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--grey-800);
  background: var(--off-white);
  overflow-x: hidden;
}

/* === LAYOUT === */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* === TYPOGRAPHY === */
.display {
  font-size: clamp(3.5rem, 7.5vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.9;
  color: var(--grey-900);
}
.heading-xl {
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.95;
  color: var(--grey-900);
}
.heading-lg {
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--grey-900);
}
.heading-md {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--grey-900);
}
.label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--grey-400);
}
.body-lg {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--grey-600);
}
.body-sm {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--grey-600);
}

/* === LINE ACCENT === */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.75rem;
}
.eyebrow::before {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 32px;
  height: 1.5px;
  background: var(--accent);
}
.eyebrow.light::before { background: rgba(255,255,255,0.4); }
.eyebrow.light .label  { color: rgba(255,255,255,0.45); }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.9rem 2rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.3s var(--ease-spring);
  cursor: pointer;
  border: none;
  line-height: 1;
}
.btn:active { transform: scale(0.98); }

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

.btn-outline {
  background: transparent;
  color: var(--grey-900);
  border: 1.5px solid var(--grey-200);
}
.btn-outline:hover {
  border-color: var(--grey-800);
}

.btn-outline-white {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.35);
}
.btn-outline-white:hover {
  border-color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--grey-600);
  padding-inline: 0;
  gap: 0.5rem;
}
.btn-ghost:hover { color: var(--grey-900); }
.btn-ghost .arrow { transition: transform 0.3s var(--ease-spring); }
.btn-ghost:hover .arrow { transform: translateX(5px); }

/* === NAVIGATION === */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background 0.4s var(--ease-smooth), box-shadow 0.4s var(--ease-smooth);
}
.nav.scrolled {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--grey-100);
}
.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.nav-logo img {
  height: 38px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--grey-600);
  position: relative;
  transition: color 0.2s;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0; right: 0;
  height: 1.5px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-spring);
}
.nav-links a:hover,
.nav-links a.active { color: var(--grey-900); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }

/* Hero-overlay nav (homepage only, before scroll) */
.nav-on-hero:not(.scrolled) .nav-links a { color: rgba(255,255,255,0.75); }
.nav-on-hero:not(.scrolled) .nav-links a:hover,
.nav-on-hero:not(.scrolled) .nav-links a.active { color: var(--white); }
.nav-on-hero:not(.scrolled) .nav-links a::after { background: rgba(255,255,255,0.6); }
.nav-on-hero:not(.scrolled) .nav-toggle span { background: rgba(255,255,255,0.9); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: var(--accent);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.3s var(--ease-spring);
}
.nav-cta:hover {
  background: var(--accent-hover);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  padding: 4px 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--grey-900);
  transition: all 0.3s var(--ease-spring);
  transform-origin: center;
}

/* Mobile overlay nav */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 99;
  flex-direction: column;
  justify-content: flex-start;
  padding: var(--nav-h) var(--gutter) var(--gutter);
  gap: 0.5rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--grey-900);
  padding: 0.4rem 0;
  display: block;
  transition: color 0.2s, transform 0.3s var(--ease-spring);
  border-bottom: 1px solid var(--grey-100);
}
.nav-mobile a:hover {
  color: var(--accent);
  transform: translateX(8px);
}

/* === HERO (HOME) === */
.hero {
  height: 100dvh;
  position: relative;
  overflow: hidden;
}
.hero-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: calc(var(--nav-h) + 5rem) var(--gutter) 5rem;
}
.hero-headline {
  font-size: clamp(3.75rem, 7vw, 8rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.9;
  color: var(--white);
  margin-bottom: 2.25rem;
}
.hero-sub {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: rgba(255,255,255,0.75);
  max-width: 420px;
  margin-bottom: 3rem;
  padding-left: 0.5rem;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-left: 0.5rem;
}
.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}
.hero-scroll-line {
  display: block;
  width: 2px;
  height: 32px;
  background: rgba(255,255,255,0.18);
  position: relative;
  clip-path: inset(0);
}
.hero-scroll-line::after {
  content: '';
  position: absolute;
  left: 0;
  width: 2px;
  top: 0;
  height: 14px;
  background: linear-gradient(to bottom, transparent, #fff, transparent);
  animation: scrollLine 1.8s linear infinite;
}
@keyframes scrollLine {
  0%   { transform: translateY(-14px); }
  100% { transform: translateY(32px); }
}


.hero-image {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--grey-900);
}
.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(15,14,12,0.82) 0%, rgba(15,14,12,0.55) 40%, rgba(15,14,12,0.20) 70%, rgba(15,14,12,0.05) 100%);
  z-index: 1;
  pointer-events: none;
}
.hero-image-badge {
  position: absolute;
  bottom: 5rem;
  right: var(--gutter);
  z-index: 2;
}
.hero-image-badge img {
  height: 72px;
  width: auto;
  display: block;
  mix-blend-mode: screen;
}

/* === SERVICES HOME === */
.services-home {
  padding: 7rem 0 0;
  background: var(--off-white);
}
.services-home-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4rem;
  margin-bottom: 4.5rem;
}
.services-home-meta {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-bottom: 0.25rem;
}
.services-home-meta .btn { margin-top: 2rem; }
.services-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 3rem;
}
.service-card {
  padding: 2.5rem 0;
  border-top: 1px solid var(--grey-100);
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  color: inherit;
}
.service-card:nth-child(n+4) {
  border-bottom: 1px solid var(--grey-100);
}
.service-card-num {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.service-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--grey-900);
  transition: color 0.2s;
}
.service-card:hover .service-card-title { color: var(--accent); }
.service-card-desc {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--grey-600);
  flex: 1;
}
.service-card-arrow {
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.2s, transform 0.25s var(--ease-spring);
}
.service-card:hover .service-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* === PORTFOLIO PREVIEW === */
.portfolio-preview {
  padding: 10rem 0;
  background: var(--white);
}
.portfolio-preview-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 4rem;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 320px 320px;
  gap: 0.625rem;
}
.portfolio-item-main { grid-row: span 2; }

.portfolio-item {
  position: relative;
  overflow: hidden;
  background: var(--grey-100);
}
.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.75s var(--ease-spring);
}
.portfolio-item:hover img { transform: scale(1.05); }

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,25,23,0.75) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  align-items: flex-end;
  padding: 1.75rem;
}
.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-overlay span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.04em;
}

/* === TESTIMONIALS === */
.testimonials {
  background: var(--off-white);
  padding: 6rem 0;
}
.testimonials-header { margin-bottom: 3rem; }
.testimonials-header .heading-xl { color: var(--grey-900); margin-top: 0.5rem; }

.testimonials-carousel {
  position: relative;
  overflow: hidden;
}
.testimonials-track {
  display: flex;
  transition: transform 0.5s var(--ease-smooth);
}
.testimonial-card {
  flex: 0 0 100%;
  background: var(--white);
  padding: 2.25rem 2.5rem;
  border: 1px solid var(--grey-100);
}
.testimonials-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}
.tc-btn {
  color: var(--grey-400);
  font-size: 1.25rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--grey-200);
  transition: color 0.2s, border-color 0.2s;
}
.tc-btn:hover {
  color: var(--grey-900);
  border-color: var(--grey-800);
}
.tc-dots {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--grey-200);
  cursor: pointer;
  transition: background 0.25s, width 0.25s, border-radius 0.25s;
}
.tc-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 3px;
}

.quote-mark {
  font-size: 3rem;
  line-height: 1;
  font-weight: 800;
  color: var(--grey-200);
  display: block;
  font-family: Georgia, 'Times New Roman', serif;
  margin-bottom: 0.5rem;
}
.testimonial-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--grey-600);
  font-style: italic;
  margin-bottom: 2rem;
}
.testimonial-author {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--grey-400);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* === PRESS STRIP === */
.press {
  background: var(--white);
  padding: 5.5rem 0;
  border-bottom: 1px solid var(--grey-100);
}
.press-inner-new {
  text-align: center;
}
.press-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--grey-400);
  margin: 0 auto 3rem;
  max-width: 540px;
  line-height: 1.7;
}
.press-logos-new {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5rem;
  flex-wrap: wrap;
}
.press-logo-link {
  display: inline-block;
  transition: transform 0.3s var(--ease-spring);
}
.press-logo-link img {
  height: 40px;
  width: auto;
  opacity: 0.85;
  transition: opacity 0.3s;
}
.press-logo-link:hover {
  transform: translateY(-3px);
}
.press-logo-link:hover img {
  opacity: 1;
}

.press--homepage {
  background: var(--off-white);
  border-bottom: none;
  border-top: 1px solid var(--grey-100);
}

/* === CTA BANNER === */
.cta-banner {
  position: relative;
  padding: 8rem 0;
  background: var(--grey-900);
  overflow: hidden;
}
.cta-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../assets/dark-sketch01.webp');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  mask-image: radial-gradient(ellipse 55% 70% at 85% 50%, rgba(0,0,0,0.45) 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 55% 70% at 85% 50%, rgba(0,0,0,0.45) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.cta-banner .container {
  position: relative;
  z-index: 1;
}
.cta-banner-inner {
  max-width: 680px;
}
.cta-banner .display { color: var(--white); }
.cta-banner-title {
  font-size: clamp(2.75rem, 5.5vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 0.9;
  color: var(--white);
}
.cta-banner-sub {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.5);
  margin-top: 1.5rem;
  max-width: 420px;
  line-height: 1.7;
}
.cta-banner-actions {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 2.5rem;
}

/* === FOOTER === */
footer {
  background: var(--grey-900);
  padding: 6rem 0 3rem;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 4rem;
  margin-bottom: 5rem;
}
.footer-logo {
  height: 34px;
  width: auto;
  display: block;
  margin-bottom: 1.5rem;
}
.footer-tagline {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.4);
  max-width: 260px;
  margin-bottom: 1.5rem;
}
.footer-bbb-link {
  display: inline-block;
  margin-top: 1.25rem;
}
.footer-bbb-img {
  width: 180px;
  height: 69px;
  display: block;
  opacity: 0.6;
  transition: opacity 0.3s;
  object-fit: contain;
}
.footer-bbb-link:hover .footer-bbb-img { opacity: 1; }
.footer-social {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.4);
  transition: color 0.2s, border-color 0.2s;
}
.footer-social-link:hover {
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}
.footer-col-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  margin-bottom: 1.5rem;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.footer-links a {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--white); }

.footer-contact-list { display: flex; flex-direction: column; gap: 1rem; }
.footer-contact-item { display: flex; flex-direction: column; gap: 0.125rem; }
.footer-contact-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
}
.footer-contact-value {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  transition: color 0.2s;
}
.footer-contact-value a {
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.footer-contact-value a:hover { color: var(--white); }

.footer-bottom {
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.25);
}
.footer-credit-link {
  color: inherit;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
}
.footer-credit-link:hover {
  opacity: 1;
  color: rgba(255,255,255,0.7);
}
/* === PAGE HERO (INNER PAGES) === */
.page-hero {
  padding: calc(var(--nav-h) + 5rem) 0 5rem;
  background: var(--off-white);
  border-bottom: 1px solid var(--grey-100);
}
.page-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 4rem;
}
.page-hero-right {
  text-align: right;
}
.page-hero-num {
  font-size: clamp(5rem, 12vw, 12rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--grey-100);
  display: block;
  user-select: none;
}

/* === SERVICES PAGE === */
.service-section {
  padding: 8rem 0;
  background: var(--off-white);
  border-bottom: 1px solid var(--grey-100);
}
.service-section:nth-child(even) { background: var(--white); }
.service-section:last-of-type { border-bottom: none; }
.service-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.service-big-num {
  font-size: 7rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.8;
  color: var(--grey-100);
  display: block;
  margin-bottom: -1.5rem;
  user-select: none;
}
.service-section-title {
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--grey-900);
  margin-bottom: 1.5rem;
}
.service-section-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--grey-600);
  margin-bottom: 2.5rem;
}
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 2.5rem;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  font-size: 1.0625rem;
  color: var(--grey-600);
  line-height: 1.8;
}
.feature-dot {
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: .875em;
}
.service-section-image {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--grey-200);
}
.service-section-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-spring);
}
.service-section-image:hover img { transform: scale(1.04); }
.service-section-grid--alt { direction: rtl; }
.service-section-grid--alt > * { direction: ltr; }

/* === PORTFOLIO PAGE === */
.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: 0.625rem;
  padding: 0 var(--gutter);
  max-width: var(--max-w);
  margin-inline: auto;
}
.masonry-item {
  position: relative;
  overflow: hidden;
  background: var(--grey-100);
}
.masonry-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.75s var(--ease-spring);
}
.masonry-item:hover img { transform: scale(1.06); }
.masonry-item .portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,25,23,0.72) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  align-items: flex-end;
  padding: 1.75rem;
}
.masonry-item:hover .portfolio-overlay { opacity: 1; }
.masonry-item .portfolio-overlay span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.04em;
}
/* Span classes — height determined by grid-auto-rows */
.masonry-tall  { grid-row: span 2; }
.masonry-wide  { grid-column: span 2; }
/* masonry-square and masonry-landscape are normal 1×1 cells */

.gallery-page { background: var(--grey-900); }
.gallery-page .nav,
.gallery-page .nav.scrolled {
  background: rgba(26,25,23,0.97) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.07) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.gallery-page .nav-links a { color: rgba(255,255,255,0.55); }
.gallery-page .nav-links a:hover,
.gallery-page .nav-links a.active { color: var(--white); }
.gallery-page .nav-links a::after { background: rgba(255,255,255,0.5); }
.gallery-page .nav-toggle span { background: rgba(255,255,255,0.7); }
.gallery-page .page-hero {
  background: var(--grey-900);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.gallery-page .page-hero .eyebrow .label { color: rgba(255,255,255,0.35); }
.gallery-page .page-hero .eyebrow::before { background: rgba(255,255,255,0.3); }
.gallery-page .page-hero .heading-xl { color: var(--white); }
.gallery-page .page-hero .body-lg { color: rgba(255,255,255,0.55); }
.gallery-page .page-hero-num { color: rgba(255,255,255,0.06); }
.gallery-wrap {
  background: var(--grey-900);
  padding: 3rem 0 6rem;
}
.gallery-page .masonry-item .portfolio-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
}
.gallery-cta {
  background: var(--off-white);
  padding: 8rem 0;
}
.gallery-cta-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 3rem;
}
.gallery-cta-inner .heading-xl { color: var(--grey-900); }

/* === ABOUT PAGE === */
.about-story {
  padding: 9rem 0;
  background: var(--white);
}
.about-story-grid {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 8rem;
  align-items: start;
}
.about-story-text { padding-top: 1rem; }
.about-lead {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.75;
  color: var(--grey-700);
  margin-bottom: 2rem;
}
.about-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--grey-600);
  margin-bottom: 1.5rem;
}
.about-image {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--grey-100);
}
.about-image img { width: 100%; height: 100%; object-fit: cover; }

.about-values {
  padding: 8rem 0;
  background: var(--off-white);
}
.values-list { display: grid; grid-template-columns: 1fr 1fr; }
.value-item {
  padding: 3rem 0;
  border-top: 1px solid var(--grey-200);
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 2.5rem;
  align-items: start;
}
.value-item:last-child { border-bottom: 1px solid var(--grey-200); }
.value-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  padding-top: 0.35rem;
}
.value-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--grey-900);
  margin-bottom: 0.75rem;
}
.value-body {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--grey-600);
}

.about-coverage {
  padding: 8rem 0;
  background: var(--white);
}
.coverage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
}
.county-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.county-item {
  padding: 1.5rem 0;
  border-top: 1px solid var(--grey-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  font-weight: 500;
  color: var(--grey-800);
}
.county-item:last-child { border-bottom: 1px solid var(--grey-100); }
.county-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-pale);
  padding: 0.25rem 0.75rem;
}

/* === CONTACT PAGE === */
.contact-page-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 80dvh;
}
.contact-form-col {
  padding: 4rem 0 4rem 3rem;
  background: var(--off-white);
}
.contact-info-col {
  background: var(--white);
  padding: 4rem 3rem 4rem var(--gutter);
  margin-left: calc(-1 * var(--gutter));
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--grey-100);
}
.contact-info-col .eyebrow::before { background: var(--accent); }
.contact-info-col .eyebrow .label { color: var(--grey-400); }
.contact-info-col .contact-info-label { color: var(--grey-400); }
.contact-info-col .contact-info-value {
  color: var(--grey-700);
  margin-bottom: 1.25rem;
}
.contact-info-col .contact-info-value a { color: var(--grey-700); }
.contact-info-col .contact-info-value a:hover { color: var(--accent); }
.contact-info-col .contact-info-divider {
  background: var(--grey-200);
  margin: 1.25rem 0;
}
.contact-info-col h2.heading-md { margin-bottom: 1.5rem; }
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey-600);
}
.form-input {
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1.5px solid var(--grey-200);
  font-size: 0.9375rem;
  color: var(--grey-900);
  width: 100%;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 0;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-pale);
}
.form-input::placeholder { color: var(--grey-400); }
textarea.form-input {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}
select.form-input { cursor: pointer; }

.form-submit-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.form-note {
  font-size: 0.8rem;
  color: var(--grey-400);
}
.form-success {
  display: none;
  padding: 1.25rem 1.5rem;
  background: var(--accent-pale);
  border-left: 3px solid var(--accent);
  font-size: 0.9375rem;
  color: var(--accent);
  margin-top: 1.5rem;
}
.form-success.show { display: block; }

.contact-info-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.contact-info-value {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2.5rem;
}
.contact-info-value a {
  transition: color 0.2s;
}
.contact-info-divider {
  width: 40px;
  height: 1.5px;
  margin: 2.5rem 0;
}
.contact-map {
  flex: 1;
  min-height: 220px;
  margin-top: 1.5rem;
  overflow: hidden;
}
.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 220px;
  border: none;
  filter: grayscale(1) contrast(1.1) brightness(0.85);
  transition: filter 0.5s;
}
.contact-map:hover iframe { filter: grayscale(0.2) contrast(1) brightness(1); }

/* === ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-spring), transform 0.9s var(--ease-spring);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.9s var(--ease-spring), transform 0.9s var(--ease-spring);
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.9s var(--ease-spring), transform 0.9s var(--ease-spring);
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }

.stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-spring), transform 0.7s var(--ease-spring);
}
.stagger.visible > * { opacity: 1; transform: translateY(0); }
.stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger.visible > *:nth-child(2) { transition-delay: 80ms; }
.stagger.visible > *:nth-child(3) { transition-delay: 160ms; }
.stagger.visible > *:nth-child(4) { transition-delay: 240ms; }
.stagger.visible > *:nth-child(5) { transition-delay: 320ms; }
.stagger.visible > *:nth-child(6) { transition-delay: 400ms; }
.stagger.visible > *:nth-child(7) { transition-delay: 480ms; }
.stagger.visible > *:nth-child(8) { transition-delay: 560ms; }

/* === RESPONSIVE === */
@media (max-width: 1100px) {
  .hero-content {
    padding-bottom: 5rem;
  }
  .services-home-header { flex-direction: column; align-items: flex-start; gap: 2rem; }
  .services-home-meta { max-width: 100%; }
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .portfolio-item-main { grid-column: span 2; grid-row: span 1; aspect-ratio: 16/9; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .cta-banner-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-page-split { grid-template-columns: 1fr; min-height: auto; }
  .contact-info-col { padding: 3rem 0; margin-left: calc(-1 * var(--gutter)); padding-left: var(--gutter); }
  .contact-form-col { padding: 3rem 0; }
  .service-section-grid { grid-template-columns: 1fr; gap: 3rem; }
  .service-section-grid > :nth-child(1) { order: 2; }
  .service-section-grid > :nth-child(2) { order: 1; }
  .about-story-grid { grid-template-columns: 1fr; gap: 4rem; }
  .about-image { position: static; }
  .coverage-grid { grid-template-columns: 1fr; gap: 3rem; }
  .page-hero-inner { grid-template-columns: 1fr; }
  .page-hero-right { display: none; }
}

@media (max-width: 768px) {
  .gallery-cta-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero-scroll { display: none; }
  .hero-image-badge { bottom: 1.5rem; right: 50%; transform: translateX(50%); }
  .hero-image-badge img { height: 54px; }
  .hero-content { padding-bottom: 7rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .services-cards { grid-template-columns: repeat(2, 1fr); column-gap: 2rem; }
  .service-card:nth-child(n+5) { border-bottom: 1px solid var(--grey-100); }
  .service-card:nth-child(3) { border-bottom: none; }
  .gallery-masonry { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 240px; }
  .masonry-wide { grid-column: span 1; }
  .masonry-tall { grid-row: span 1; }
  .values-list { grid-template-columns: 1fr; }
  .value-item { grid-template-columns: 1fr; gap: 0.5rem; }
  .value-num { padding-top: 0; }
  .form-row { grid-template-columns: 1fr; }
  .testimonial-card { padding: 2rem 1.5rem; }
  .portfolio-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .portfolio-item-main { grid-column: span 1; aspect-ratio: 4/3; }
}

@media (max-width: 480px) {
  .services-cards { grid-template-columns: 1fr; }
  .service-card:nth-child(n+4) { border-bottom: none; }
  .service-card:last-child { border-bottom: 1px solid var(--grey-100); }
  .gallery-masonry { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .masonry-wide { grid-column: span 1; }
  .masonry-tall { grid-row: span 1; }
}
