:root {
  --shadow-sm: 0 1px 2px rgba(17, 24, 21, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(17, 24, 21, 0.08), 0 2px 4px -2px rgba(17, 24, 21, 0.04);
  --shadow-lg: 0 14px 28px -6px rgba(17, 24, 21, 0.12), 0 6px 12px -4px rgba(17, 24, 21, 0.06);
  --shadow-xl: 0 24px 48px -12px rgba(17, 24, 21, 0.22);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-background);
  color: var(--color-foreground);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  text-wrap: balance;
}

/* Unified Section Heading & Subtitle System */
.section-heading {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 800;
  color: var(--color-primary);
}

@media (min-width: 640px) {
  .section-heading {
    font-size: 1.875rem;
    line-height: 1.25;
  }
}

@media (min-width: 1024px) {
  .section-heading {
    font-size: 2.125rem;
    line-height: 1.25;
  }
}

.dark-surface .section-heading {
  color: #FFFFFF;
}

.section-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-foreground);
}

.dark-surface .section-subtitle {
  color: rgba(255, 255, 255, 0.9);
}

/* Unified Section Vertical Rhythm */
.section-space {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.section-space-framed {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 640px) {
  .section-space {
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  .section-space-framed {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

/* Accessible 3px focus ring */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.dark-surface :focus-visible {
  outline: 3px solid #4ADE80;
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--color-primary);
  color: var(--color-on-primary);
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 600;
}

.skip-link:focus {
  left: 16px;
}

/* Hero Full-bleed Scrim */
.hero-scrim {
  background: linear-gradient(
    90deg,
    rgba(11, 24, 17, 0.90) 0%,
    rgba(11, 24, 17, 0.74) 52%,
    rgba(11, 24, 17, 0.36) 100%
  );
}

@media (max-width: 767px) {
  .hero-scrim {
    background: linear-gradient(
      180deg,
      rgba(11, 24, 17, 0.78) 0%,
      rgba(11, 24, 17, 0.88) 100%
    );
  }
}

.hero-slide {
  transition: opacity 450ms ease;
}

.v2-frame-scrim {
  background: linear-gradient(
    115deg,
    rgba(11, 28, 19, 0.90) 0%,
    rgba(17, 42, 29, 0.78) 55%,
    rgba(11, 28, 19, 0.72) 100%
  );
}

.services-bg-scrim {
  background: linear-gradient(
    135deg,
    rgba(14, 57, 34, 0.93) 0%,
    rgba(21, 82, 49, 0.88) 55%,
    rgba(10, 38, 23, 0.94) 100%
  );
}

/* Sticky header elevation */
.site-header.is-scrolled {
  box-shadow: var(--shadow-md);
}

/* Hide scrollbars cleanly */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Touch target minimum 44x44px */
.touch-target {
  min-width: 44px;
  min-height: 44px;
}

/* Process 4-step staggered wave flow */
.process-icon-frame {
  position: relative;
  width: 112px;
  height: 112px;
  padding: 10px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid rgba(212, 229, 219, 0.85);
  box-shadow: 0 14px 32px -10px rgba(17, 24, 21, 0.12), 0 4px 10px -4px rgba(17, 24, 21, 0.05);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 280ms ease, border-color 280ms ease;
}

.process-icon-inner {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: var(--color-surface-mint);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 260ms ease, color 260ms ease;
}

.process-step-badge {
  position: absolute;
  top: 14px;
  right: -13px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--color-accent);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.875rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid #FFFFFF;
  box-shadow: 0 8px 18px -4px rgba(201, 42, 42, 0.45);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), background-color 260ms ease;
}

.process-step:hover .process-icon-frame {
  transform: translateY(-6px);
  border-color: rgba(28, 120, 71, 0.32);
  box-shadow: 0 22px 42px -12px rgba(28, 120, 71, 0.2), 0 6px 14px -6px rgba(17, 24, 21, 0.06);
}

.process-step:hover .process-icon-inner {
  background: var(--color-primary);
  color: #FFFFFF;
}

.process-step:hover .process-step-badge {
  transform: scale(1.08);
}

/* Partner 2-row opposite-direction marquee */
.partner-marquee-shell {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 6px 0;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 7%, #000 93%, transparent 100%);
}

@media (min-width: 640px) {
  .partner-marquee-shell {
    gap: 20px;
  }
}

.partner-marquee-row {
  overflow: hidden;
  width: 100%;
}

.partner-marquee-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: partner-marquee-left 32s linear infinite;
}

.partner-marquee-row--reverse .partner-marquee-track {
  animation-name: partner-marquee-right;
  animation-duration: 36s;
}

.partner-marquee-row:hover .partner-marquee-track,
.partner-marquee-shell.is-offscreen .partner-marquee-track {
  animation-play-state: paused;
}

.partner-marquee-group {
  display: flex;
  flex-shrink: 0;
  gap: 14px;
  padding-right: 14px;
}

@media (min-width: 640px) {
  .partner-marquee-group {
    gap: 20px;
    padding-right: 20px;
  }
}

.partner-logo-card {
  width: 172px;
  height: 84px;
  padding: 14px 20px;
  border-radius: 16px;
  background: #FFFFFF;
  border: 1px solid rgba(212, 229, 219, 0.8);
  box-shadow: 0 6px 20px -6px rgba(17, 24, 21, 0.07), 0 2px 6px -2px rgba(17, 24, 21, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), border-color 240ms ease, box-shadow 240ms ease;
}

@media (min-width: 640px) {
  .partner-logo-card {
    width: 220px;
    height: 96px;
    padding: 16px 24px;
  }
}

.partner-logo-card:hover {
  transform: translateY(-3px);
  border-color: rgba(28, 120, 71, 0.3);
  box-shadow: 0 12px 26px -8px rgba(28, 120, 71, 0.14), 0 4px 10px -4px rgba(17, 24, 21, 0.05);
}

.partner-logo-card img {
  max-height: 44px;
  max-width: 132px;
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (min-width: 640px) {
  .partner-logo-card img {
    max-height: 50px;
    max-width: 160px;
  }
}

@keyframes partner-marquee-left {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@keyframes partner-marquee-right {
  0% {
    transform: translate3d(-50%, 0, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* News horizontal slider */
.news-viewport {
  overflow: hidden;
  padding: 4px 0 8px;
}

.news-track {
  display: flex;
  gap: 24px;
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.news-slide {
  flex: 0 0 100%;
  min-width: 0;
}

@media (min-width: 640px) {
  .news-slide {
    flex: 0 0 calc((100% - 24px) / 2);
  }
}

@media (min-width: 1024px) {
  .news-slide {
    flex: 0 0 calc((100% - 48px) / 3);
  }
}

/* Consultation CTA Showcase Banner Scrim */
.cta-banner-scrim {
  background: linear-gradient(112deg, rgba(10, 48, 28, 0.96) 0%, rgba(28, 120, 71, 0.9) 55%, rgba(12, 54, 32, 0.84) 100%);
}

/* Modern Contact Split Panel & Inputs */
.contact-concierge-panel {
  background: linear-gradient(155deg, #0D3D24 0%, #1C7847 58%, #135431 100%);
}

.contact-input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  background-color: #F7FAF8;
  color: var(--color-foreground);
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.contact-input:hover {
  border-color: rgba(28, 120, 71, 0.4);
}

.contact-input:focus {
  background-color: #FFFFFF;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(28, 120, 71, 0.12);
  outline: none;
}

.contact-input.border-destructive {
  border-color: var(--color-destructive);
}

/* Static logo grid & zero motion under reduced-motion */
@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;
  }

  .partner-marquee-shell {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .partner-marquee-row--reverse,
  .partner-marquee-group[aria-hidden="true"] {
    display: none;
  }

  .partner-marquee-track {
    animation: none;
    transform: none !important;
    width: 100%;
  }

  .news-track {
    transition: none;
  }

  .partner-marquee-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    padding-right: 0;
  }

  .partner-logo-card {
    width: 100%;
  }

  @media (min-width: 640px) {
    .partner-marquee-group {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
  }

  @media (min-width: 1024px) {
    .partner-marquee-group {
      grid-template-columns: repeat(6, minmax(0, 1fr));
    }
  }
}
