/* ═══════════════════════════════════════════════════
   LS8 Digital — Design System v4.1
   Apple Design Language · Minimalist & Premium
   ═══════════════════════════════════════════════════ */

/* ── 1. CSS Global Design Tokens & Typography ───── */
:root {
  /* Premium Apple Palette */
  --bg-primary:      #ffffff;
  --bg-secondary:    #f5f5f7;
  --bg-tertiary:     #e8e8ed;
  --bg-glass:        rgba(255, 255, 255, 0.72);
  --bg-glass-hover:  rgba(255, 255, 255, 0.85);
  
  --text-primary:    #1d1d1f; /* Deep Black */
  --text-secondary:  #515154; /* Dark Gray */
  --text-muted:      #86868b; /* Apple Gray */
  
  --accent-blue:     #0066cc; /* Apple Signature Blue */
  --accent-dark:     #0044b3;
  --accent-light:    #0088ff;
  
  --border:          rgba(0, 0, 0, 0.08);
  --border-hover:    rgba(0, 0, 0, 0.16);

  /* Fluid Typography Sizing (Mobile Base) */
  --fs-display: clamp(2rem, 4vw + 1rem, 3rem);
  --fs-h2:      clamp(1.75rem, 3vw + 0.6rem, 2.25rem);
  --fs-h3:      clamp(1.15rem, 1.2vw + 0.5rem, 1.4rem);
  --fs-body:    clamp(0.95rem, 0.4vw + 0.8rem, 1.1rem);
  --fs-small:   clamp(0.85rem, 0.3vw + 0.7rem, 0.95rem);
  --fs-caption: 0.75rem;

  /* Spacing (Mobile Base) */
  --space-xs:  0.25rem;
  --space-sm:  0.75rem;
  --space-md:  1.25rem;
  --space-lg:  2rem;
  --space-xl:  3rem;
  --space-2xl: 4rem;
  --space-3xl: 5rem;

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* Signature Easing Transition */
  --apple-ease: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ── Fluid Spacing & Typography Scaling (Media Queries) ── */
@media (min-width: 768px) {
  :root {
    --space-xs:  0.375rem;
    --space-sm:  0.875rem;
    --space-md:  1.375rem;
    --space-lg:  2.25rem;
    --space-xl:  3.5rem;
    --space-2xl: 5rem;
    --space-3xl: 6.5rem;
    
    --fs-display: clamp(2.25rem, 4.5vw + 1rem, 3.75rem);
    --fs-h2:      clamp(1.85rem, 3.2vw + 0.7rem, 2.6rem);
    --fs-h3:      clamp(1.2rem, 1.3vw + 0.55rem, 1.55rem);
  }
}

@media (min-width: 1024px) {
  :root {
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  1.5rem;
    --space-lg:  2.5rem;
    --space-xl:  4rem;
    --space-2xl: 6rem;
    --space-3xl: 8rem;
    
    --fs-display: clamp(2.5rem, 5vw + 1rem, 4.5rem);
    --fs-h2:      clamp(2rem, 3.5vw + 0.8rem, 3rem);
    --fs-h3:      clamp(1.25rem, 1.5vw + 0.6rem, 1.75rem);
  }
}

/* ── Reset & Base ──────────────────────────────── */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0;
}
html { 
  scroll-behavior: smooth; 
  -webkit-font-smoothing: antialiased; 
  -moz-osx-font-smoothing: grayscale; 
  background-color: var(--bg-primary);
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography Nuances ────────────────────────── */
h1, h2, h3, h4, h5, h6, .hero-headline, .diff-content__heading, .svc-heading {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.035em; /* Tight tracking for headers */
}

h1, .hero-headline {
  font-size: var(--fs-display);
  font-weight: 800;
  letter-spacing: -0.04em; /* Extra tight display tracking */
}

h2, .diff-content__heading, .svc-heading {
  font-size: var(--fs-h2);
  letter-spacing: -0.03em;
}

p, .diff-item__desc, .bento-card__desc, .testimonial-card__text, .process-step__desc {
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-secondary);
  letter-spacing: 0em; /* Normal body tracking for legibility */
  margin-bottom: var(--space-sm);
}

a { 
  color: inherit; 
  text-decoration: none; 
  transition: all 0.3s var(--apple-ease);
}

/* ── Focus Rings (Accessibility Polish) ────────── */
:focus-visible {
  outline: 2px solid var(--accent-blue) !important;
  outline-offset: 4px !important;
}

/* ── Buttons & Links ───────────────────────────── */
.btn-primary {
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  gap: 8px;
  background: var(--text-primary); 
  color: #ffffff;
  padding: 14px 28px; 
  border-radius: 999px; /* Solid black pill shape */
  border: none;
  font-family: inherit; 
  font-weight: 500;
  font-size: 15px; 
  transition: transform 0.2s var(--apple-ease), background-color 0.2s var(--apple-ease);
  cursor: pointer;
  text-align: center;
}
.btn-primary:hover {
  background: #000000;
  transform: scale(1.02);
}
.btn-primary:active {
  transform: scale(0.97); /* Tactile haptic feedback */
}

.btn-secondary {
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  background: transparent; 
  color: var(--accent-blue); /* Signature-blue text link */
  font-family: inherit; 
  font-weight: 500;
  font-size: 16px; 
  border: none;
  padding: 8px 0;
  transition: color 0.2s var(--apple-ease);
  cursor: pointer;
  text-decoration: none;
}
.btn-secondary:hover {
  color: var(--accent-dark);
}
.btn-secondary::after {
  content: " \2192"; /* Custom arrow indicator: → */
  display: inline-block;
  margin-left: 2px;
  transition: transform 0.2s var(--apple-ease);
}
.btn-secondary:hover::after {
  transform: translateX(4px); /* Moves slightly right on hover */
}
.btn-secondary:active {
  transform: scale(0.97);
}

/* ── 2. Sticky Header Architecture ──────────────── */
header, #site-header {
  position: fixed; 
  top: 24px; 
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 48px); 
  max-width: 1000px;
  z-index: 100;
  padding: 0;
  height: 64px; 
  display: flex; 
  align-items: center;
  background: rgba(15, 15, 15, 0.75); /* Dark frosted glass */
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1); /* Delicate outer ring */
  border-radius: 999px; /* Pill shape */
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), background 0.4s ease;
}

#site-header.header-hidden {
  transform: translateX(-50%) translateY(-120px); /* Safely translates out of viewport keeping X centered */
}

#site-header.header-scrolled {
  background: rgba(15, 15, 15, 0.9);
}

.nav-container {
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  padding: 0 16px 0 24px;
  width: 100%; 
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0; /* keep logo from collapsing in the space-between nav */
  padding: 8px 12px 8px 0; /* breathing room so "LS8 | DIGITAL" isn't cramped */
}
.nav-logo-img {
  /* White SVG is referenced directly — no filter hacks, stays razor-sharp */
  height: 40px;
  width: auto;
  max-width: none; /* override global img max-width:100% so aspect ratio resolves */
  object-fit: contain;
  display: block;
}

.nav-links { 
  display: flex; 
  align-items: center; 
  gap: 32px;
}

.nav-links a.nav-link {
  color: rgba(255, 255, 255, 0.6); /* Muted light grey */
  font-size: 12px; 
  font-weight: 500;
  transition: color 0.3s var(--apple-ease);
}
.nav-links a.nav-link:hover { 
  color: #ffffff; /* Pure white on hover */
}
.nav-links a.nav-link.active { 
  color: #ffffff; 
  font-weight: 600;
}

.btn-primary.nav-cta { 
  background: #ffffff !important;
  color: #000000 !important;
  border-radius: 999px !important;
  padding: 12px 24px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  transition: transform 0.2s var(--apple-ease), opacity 0.2s var(--apple-ease) !important;
}
.btn-primary.nav-cta:hover {
  transform: scale(0.98) !important;
  opacity: 0.9 !important;
}

.hamburger {
  display: none; 
  background: none;
  border: none;
  color: #ffffff; /* White icon for dark header */
  padding: 8px; 
  cursor: pointer;
}
.hamburger svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
}

/* ── Hero ──────────────────────────────────────── */
.hero {
  min-height: 90vh;
  display: flex; 
  align-items: center;
  justify-content: center;
  position: relative; 
  overflow: hidden;
  padding-top: 140px; /* Adjusted to prevent overlap under floating header */
  background: linear-gradient(90deg, #ffffff 50%, #f5f5f7 100%);
  text-align: center;
}

/* Ambient Aurora Background Container */
.hero-aurora {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.12; /* Subtle backdrop level */
}

.hero-aurora::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 30% 30%, var(--accent-blue) 0%, transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(168, 85, 247, 0.25) 0%, transparent 60%),
    radial-gradient(circle at 45% 75%, rgba(0, 102, 204, 0.2) 0%, transparent 50%);
  filter: blur(100px);
  animation: aurora-shift 25s infinite linear;
}

@keyframes aurora-shift {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.hero-content {
  position: relative; 
  z-index: 2; /* Sits in front of the aurora */
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-headline span {
  display: inline-block;
}

.hero-headline .accent-text {
  color: var(--accent-blue);
}

.hero-sub {
  max-width: 580px;
  margin: 0 auto var(--space-lg);
  font-size: clamp(1.1rem, 0.5vw + 0.95rem, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.6;
}

.hero-actions {
  display: flex; 
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

/* ── Cinematic Background Video Layout ── */
.hero-video-container {
  position: absolute;
  top: 0;
  right: 0;
  width: 58%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.0s var(--apple-ease), transform 0.1s ease-out;
  will-change: transform, opacity;

  /* Feather left and bottom edges of the video container using CSS Masks */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 35%), linear-gradient(to top, transparent 0%, black 15%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, black 35%), linear-gradient(to top, transparent 0%, black 15%);
  mask-composite: intersect;
}

.hero-video-container.fade-in {
  opacity: 0.52; /* Clearly visible, 40-55% range on load */
}

.hero-video-container.fade-settled {
  opacity: 0.38; /* Settles to 35-40% range in background */
}

.hero-mockup-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% 25%; /* Shift focus point higher and central */
}

/* Subtle cobalt brand tint overlay */
.hero-video-tint {
  position: absolute;
  inset: 0;
  background-color: #2B4DE8;
  mix-blend-mode: color;
  opacity: 0.15;
  pointer-events: none;
  z-index: 2;
}

/* Gradient Mask overlay to unify warm-grey video tone with page off-white */
.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #FAF8F5 0%, rgba(250, 248, 245, 0.5) 25%, transparent 65%);
  pointer-events: none;
  z-index: 3;
}

/* Mobile Video adjustments - scaled to cover full hero and feathered top/bottom */
@media (max-width: 768px) {
  .hero-video-container {
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    bottom: auto !important;
    
    /* Feather top and bottom edges of the video container using CSS Masks */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%) !important;
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%) !important;
  }
  .hero-mockup-video {
    object-position: 80% center !important; /* Keep mesh/AI nodes in frame on narrow screen */
    filter: brightness(1.15) contrast(1.12) saturate(1.1) !important; /* Boost blue details to pop on mobile */
  }
  .hero-video-container.fade-in,
  .hero-video-container.fade-settled {
    opacity: 0.45 !important; /* Boost opacity to make mesh clearly visible */
  }
  .hero-video-overlay {
    /* Strong overlay behind text at top, fading to transparent in lower areas */
    background: linear-gradient(to bottom, 
      #ffffff 0%, 
      rgba(255, 255, 255, 0.8) 35%, 
      rgba(255, 255, 255, 0.3) 70%, 
      transparent 100%) !important;
  }
}

/* Desktop Styles */
@media (min-width: 1024px) {
  .hero {
    text-align: left;
    padding-top: 160px;
  }

  .hero-content {
    align-items: flex-start;
    max-width: 620px; /* Leaves right-hand side clear for negative space and subtle background nodes */
    margin: 0;
  }

  .hero-headline {
    align-items: flex-start;
  }

  .hero-sub, .hero-reveal-desc {
    margin-left: 0;
    text-align: left;
  }

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

/* Headline Assembly Animations */
.hero-reveal-eyebrow {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUpReveal 1.2s var(--apple-ease) forwards;
  animation-delay: 0.4s;
  will-change: transform, opacity;
}

.hero-reveal-title-line {
  display: block;
  opacity: 0;
  transform: translateY(30px) rotateX(10deg);
  letter-spacing: -0.04em; /* Static final spacing to prevent reflow layout thrashing */
  transform-origin: bottom center;
  animation: assembleLine 1.4s var(--apple-ease) forwards;
  animation-delay: 0.6s;
  will-change: transform, opacity;
}

.hero-reveal-title-accent {
  display: block;
  opacity: 0;
  transform: translateY(35px) scale(0.97);
  filter: blur(4px);
  animation: assembleAccent 1.6s var(--apple-ease) forwards;
  animation-delay: 0.8s;
  will-change: transform, opacity;
}

.hero-reveal-title-accent.accent-text {
  background: linear-gradient(90deg, #0066cc 0%, #00c3ff 25%, #0066cc 50%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: assembleAccent 1.6s var(--apple-ease) forwards, singleSweep 2.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 0.8s, 2.2s;
  will-change: transform, opacity;
}

.hero-reveal-desc {
  opacity: 0;
  transform: translateY(25px);
  animation: fadeUpReveal 1.2s var(--apple-ease) forwards;
  animation-delay: 1.0s;
  will-change: transform, opacity;
}

@keyframes fadeUpReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes assembleLine {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

@keyframes assembleAccent {
  0% {
    opacity: 0;
    transform: translateY(35px) scale(0.97);
    filter: blur(4px);
    text-shadow: 0 0 0px rgba(0, 102, 204, 0);
  }
  50% {
    text-shadow: 0 0 20px rgba(0, 102, 204, 0.4);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    text-shadow: 0 0 8px rgba(0, 102, 204, 0.1);
  }
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

@keyframes singleSweep {
  0% {
    background-position: 200% center;
  }
  100% {
    background-position: -200% center;
  }
}

/* CTA Draw-in Animations */
.hero-actions .btn-primary {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  animation: drawBtnPrimary 1.2s var(--apple-ease) forwards;
  animation-delay: 1.2s;
}

.hero-actions .btn-secondary {
  opacity: 0;
  clip-path: inset(0 100% 0 0);
  animation: drawBtnSecondary 1.2s var(--apple-ease) forwards;
  animation-delay: 1.4s;
}

@keyframes drawBtnPrimary {
  0% {
    opacity: 0;
    transform: translateY(10px);
    clip-path: inset(0 100% 0 0);
    color: rgba(255, 255, 255, 0);
  }
  60% {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
    color: rgba(255, 255, 255, 0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
    color: rgba(255, 255, 255, 1);
  }
}

@keyframes drawBtnSecondary {
  0% {
    opacity: 0;
    transform: translateY(10px);
    clip-path: inset(0 100% 0 0);
    color: rgba(0, 102, 204, 0);
  }
  60% {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
    color: rgba(0, 102, 204, 0);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
    color: rgba(0, 102, 204, 1);
  }
}

/* Prefers-reduced-motion support */
@media (prefers-reduced-motion: reduce) {
  .hero-reveal-eyebrow,
  .hero-reveal-title-line,
  .hero-reveal-title-accent,
  .hero-reveal-desc,
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary,
  .hero-video-container {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
    letter-spacing: normal !important;
    text-shadow: none !important;
    color: inherit !important;
    clip-path: none !important;
  }
  .hero-reveal-title-accent.accent-text {
    -webkit-text-fill-color: initial !important;
    background: none !important;
    color: var(--accent-blue) !important;
  }
}

/* ── Stats Band ────────────────────────────────── */
.hero-stats-band {
  background: var(--bg-secondary);
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hero-stats {
  display: flex; 
  align-items: center; 
  justify-content: space-around;
  gap: var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.hero-stat {
  display: flex; 
  flex-direction: column; 
  align-items: center;
  text-align: center;
  gap: 8px;
}

.hero-stat__number {
  font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem);
  font-weight: 700; 
  letter-spacing: -0.02em;
  line-height: 1.1; 
  color: var(--text-primary);
}

.hero-stat__label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500; 
  letter-spacing: 0.05em;
  text-transform: uppercase;
  max-width: 24ch;
}

/* ── Marquee ───────────────────────────────────── */
.marquee {
  overflow: hidden; 
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
  padding: 16px 0; 
  background: var(--bg-primary);
}

.marquee__track {
  display: flex; 
  align-items: center;
  animation: marquee-scroll 45s linear infinite;
  width: max-content;
}

.marquee__item {
  font-size: 13px; 
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.1em; 
  color: var(--text-muted);
  padding: 0 32px; 
  display: flex; 
  align-items: center; 
  gap: 32px;
}
.marquee__item::after {
  content: '•'; 
  color: var(--text-muted); 
  opacity: 0.5;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0) }
  100% { transform: translateX(-50%) }
}

/* ── 3. Interactive Typography Roster ──────────────── */
.service-roster {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: var(--space-xl);
}

.service-row {
  display: flex;
  flex-direction: column;
  padding: 30px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  transition: opacity 0.4s var(--apple-ease);
  position: relative;
  text-decoration: none;
  color: inherit;
  gap: 12px;
}

.roster-title {
  font-size: clamp(1.6rem, 3.5vw + 0.5rem, 3rem); /* Fluid massive typography scaled for mobile wrapping */
  letter-spacing: -0.04em;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.4s var(--apple-ease), transform 0.4s var(--apple-ease);
}

.roster-desc {
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-secondary);
  opacity: 0.65;
  margin: 0;
  max-width: 600px;
  transition: color 0.4s var(--apple-ease), opacity 0.4s var(--apple-ease);
}

.roster-arrow {
  display: flex;
  align-items: center;
  color: var(--accent-blue);
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.4s var(--apple-ease), transform 0.4s var(--apple-ease);
  margin-top: 8px;
}

.roster-arrow svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

/* Tablet & Desktop Side-by-Side row layout */
@media (min-width: 768px) {
  .service-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 40px 0;
    gap: var(--space-md);
  }

  .roster-desc {
    max-width: 400px;
    margin-left: auto;
    margin-right: var(--space-xl);
  }

  .roster-arrow {
    margin-top: 0;
  }
}

/* ── "Focus" Group Hover Animation ── */
@media (hover: hover) {
  .service-roster:hover .service-row {
    opacity: 0.3; /* drop other rows to 30% opacity */
  }

  .service-roster .service-row:hover {
    opacity: 1; /* keep hovered row at full opacity */
  }

  .service-row:hover .roster-title {
    transform: translateX(20px); /* translate title slightly right */
    color: var(--accent-blue); /* turn blue */
  }

  .service-row:hover .roster-desc {
    opacity: 0.9;
    color: var(--text-primary);
  }

  .service-row:hover .roster-arrow {
    opacity: 1;
    transform: translateX(0); /* translate right and fade in */
  }
}

/* ── Differentiators ───────────────────────────── */
.diff-section { 
  background: var(--bg-primary); 
}

.diff-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: var(--space-2xl); 
  align-items: center;
}

.diff-content__heading { 
  font-size: var(--fs-h2); 
  margin-bottom: var(--space-md);
}

.diff-item { 
  position: relative; 
  padding-left: var(--space-md); 
  margin-bottom: var(--space-lg);
}
.diff-item::before {
  content: ''; 
  position: absolute; 
  left: 0; 
  top: 4px; 
  bottom: 4px;
  width: 2px; 
  background: var(--text-primary); 
}
.diff-item__title { 
  font-size: var(--fs-body); 
  font-weight: 600; 
  margin-bottom: 4px;
}
.diff-item__desc { 
  font-size: var(--fs-small); 
  color: var(--text-secondary); 
  margin: 0;
}

/* Metrics Card */
.metrics-card {
  background: #ffffff;
  border-radius: var(--radius-lg); 
  padding: var(--space-lg);
  box-shadow: 0 12px 40px rgba(26, 31, 54, 0.05);
  border: 1px solid rgba(26, 31, 54, 0.04);
  border-left: 4px solid var(--accent-blue);
  transition: transform 0.3s var(--apple-ease), box-shadow 0.3s var(--apple-ease);
}
.metrics-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(26, 31, 54, 0.08);
}
.metrics-card__title { 
  font-size: var(--fs-h3); 
  margin-bottom: 4px;
  font-weight: 700;
  color: var(--text-primary);
}
.metrics-card__subtitle {
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
  font-weight: 500;
}
.metric-row { 
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid rgba(26, 31, 54, 0.06);
}
.metric-row:last-child { 
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.metric-row__header { 
  display: flex; 
  align-items: center; 
  margin-bottom: 6px;
}
.metric-row__title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}
.metric-row__icon {
  width: 18px;
  height: 18px;
  color: var(--accent-blue);
  flex-shrink: 0;
}
.metric-row__label { 
  font-size: var(--fs-small); 
  font-weight: 600; 
  color: var(--text-primary);
  line-height: 1;
}
.metric-row__desc {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--text-secondary);
  margin-left: 28px;
  line-height: 1.5;
}

.progress-bar { 
  height: 6px; 
  border-radius: 100px; 
  background: rgba(0,0,0,0.06); 
  overflow: hidden;
}
.progress-bar__fill { 
  height: 100%; 
  background: var(--text-primary); 
  border-radius: 100px; 
  width: 0; 
  transition: width 1.2s var(--apple-ease);
}

/* ── 3. Sticky Scroll layout engine ─────────────── */
/* Mobile Base: Stacked layout with standard scroll flow */
.sticky-scroll-section {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: var(--space-xl) 0;
}

.sticky-scroll-media {
  position: relative;
  top: auto;
  height: auto;
  border-radius: var(--radius-xl); /* 32px border radius */
  overflow: hidden;
  aspect-ratio: 16/10;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04); /* Subtle shadow for mobile */
}

.sticky-scroll-media img {
  width: 100%;
  height: 115%; /* Larger than container for panning room */
  object-fit: cover;
  display: block;
  transform: translateY(0) scale(1.05);
  will-change: transform; /* Hardware acceleration */
}

.sticky-scroll-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sticky-scroll-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.sticky-scroll-step {
  padding: 32px 0; /* Tight vertical padding for mobile stacked flow */
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.sticky-scroll-step:first-child {
  padding-top: 0;
}
.sticky-scroll-step:last-child {
  padding-bottom: 0;
}

/* Desktop Layout: Side-by-side sticky column viewport locking */
@media (min-width: 1024px) {
  .sticky-scroll-section {
    flex-direction: row;
    align-items: flex-start;
    gap: 80px;
    padding: var(--space-3xl) 0;
  }

  .sticky-scroll-media {
    position: sticky;
    top: 120px;
    flex: 1;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.06); /* Premium deep shadow */
  }

  .sticky-scroll-content {
    flex: 1;
  }

  .sticky-scroll-step {
    padding: 120px 0; /* Deep scroll spacing */
  }
  .sticky-scroll-step:first-child {
    padding-top: 40px;
  }
  .sticky-scroll-step:last-child {
    padding-bottom: 80px;
  }
}

/* ── Testimonials ──────────────────────────────── */
.testimonials-grid { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 20px;
}

.testimonial-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg); 
  padding: var(--space-lg);
  display: flex; 
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.4s var(--apple-ease), box-shadow 0.4s var(--apple-ease);
}
.testimonial-card:hover { 
  transform: scale(1.015);
  box-shadow: 0 12px 36px rgba(0,0,0,0.06);
}

.testimonial-card__quote-mark {
  font-size: 3rem; 
  line-height: 1;
  color: var(--accent-blue);
  margin-bottom: var(--space-xs);
  display: block;
}
.testimonial-card__text {
  font-size: var(--fs-small); 
  line-height: 1.6;
  color: var(--text-secondary); 
  margin-bottom: var(--space-lg); 
  flex: 1;
}
.testimonial-card__footer { 
  border-top: 1px solid var(--border); 
  padding-top: var(--space-sm);
}
.testimonial-card__name {
  font-weight: 600;
  font-size: var(--fs-small); 
  color: var(--text-primary); 
  display: block;
}
.testimonial-card__role { 
  font-size: var(--fs-caption); 
  color: var(--text-muted); 
  display: block; 
  margin-bottom: var(--space-xs);
}
.testimonial-card__metric {
  display: inline-flex; 
  align-items: center; 
  background: rgba(0, 102, 204, 0.08); 
  border-radius: 100px; 
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 600; 
  text-transform: uppercase;
  color: var(--accent-blue); 
  margin-top: var(--space-xs);
}

/* ── Charity Section ───────────────────────────── */
.charity-section { 
  background: var(--bg-secondary); 
  padding: var(--space-3xl) 0;
}

.charity-content { 
  text-align: center; 
  max-width: 800px; 
  margin: 0 auto;
}

.charity-stats { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: var(--space-2xl); 
  margin: var(--space-xl) 0;
}
.charity-stat { 
  flex: 1; 
  text-align: center;
}
.charity-stat__number {
  font-size: clamp(2.5rem, 4vw + 1rem, 3.5rem); 
  font-weight: 800; 
  letter-spacing: -0.03em;
  color: var(--text-primary); 
  display: block;
  margin-bottom: 8px;
}
.charity-stat__label { 
  font-size: var(--fs-small); 
  color: var(--text-secondary);
}

/* ── Process Section ───────────────────────────── */
.process-section { 
  background: var(--bg-primary); 
}

.process-grid { 
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 20px; 
  margin-top: var(--space-xl);
}

.process-step {
  position: relative; 
  padding: var(--space-lg);
  border-radius: var(--radius-lg); 
  background: var(--bg-secondary);
  transition: transform 0.4s var(--apple-ease), box-shadow 0.4s var(--apple-ease);
}
.process-step:hover { 
  transform: scale(1.015);
  box-shadow: 0 12px 36px rgba(0,0,0,0.06);
}

.process-step__number {
  font-size: 3rem; 
  font-weight: 700;
  color: var(--text-muted); 
  opacity: 0.15; 
  margin-bottom: var(--space-sm);
  display: block;
}
.process-step__title { 
  font-size: var(--fs-h3); 
  margin-bottom: var(--space-xs);
  font-weight: 600;
}
.process-step__desc { 
  font-size: var(--fs-small); 
  color: var(--text-secondary); 
  margin: 0;
}

/* ── CTA Section ───────────────────────────────── */
.cta-section { 
  text-align: center; 
  background: #000000; 
  color: #ffffff;
  padding: var(--space-3xl) 0;
}

.cta-heading { 
  font-size: var(--fs-h2); 
  margin-bottom: var(--space-md); 
  color: #ffffff;
}

.cta-section p { 
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto var(--space-lg);
}

.cta-actions { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: var(--space-md); 
  margin-bottom: var(--space-xl);
}

.cta-section .btn-primary {
  background: #ffffff;
  color: #000000;
}
.cta-section .btn-primary:hover {
  background: #f5f5f7;
}

.cta-section .btn-secondary {
  color: var(--accent-light);
}
.cta-section .btn-secondary:hover {
  color: #ffffff;
}

.cta-trust { 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  gap: var(--space-lg); 
  flex-wrap: wrap;
}
.cta-trust__item {
  display: flex; 
  align-items: center; 
  gap: 6px;
  font-size: var(--fs-caption); 
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.cta-trust__item svg { 
  width: 14px; 
  height: 14px; 
  color: var(--accent-light);
}

/* ── Footer ────────────────────────────────────── */
.site-footer { 
  border-top: 1px solid var(--border); 
  padding: var(--space-2xl) 0 var(--space-lg); 
  background: var(--bg-secondary);
}

.footer-grid {
  width: 100%; 
  max-width: 1200px;
  margin: 0 auto var(--space-xl) auto;
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 2rem;
  padding: 0 var(--space-md);
}

.footer-brand p { 
  font-size: var(--fs-small); 
  max-width: 260px; 
  color: var(--text-secondary);
}
.footer-brand img {
  /* Black SVG is referenced directly — no filter needed on the light footer */
  display: block;
}

.footer-col h4 {
  font-size: 11px; 
  text-transform: uppercase;
  letter-spacing: 0.08em; 
  color: var(--text-primary); 
  margin-bottom: var(--space-md);
  font-weight: 600;
}
.footer-col ul li { 
  margin-bottom: 10px;
}
.footer-col a, 
.footer-col p { 
  color: var(--text-secondary); 
  font-size: var(--fs-small); 
  margin-bottom: 0; 
  transition: color 0.3s var(--apple-ease);
}
.footer-col a:hover { 
  color: var(--text-primary);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: var(--space-md);
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}
.footer-bottom p { 
  font-size: var(--fs-caption); 
  color: var(--text-muted); 
  margin: 0;
}

/* ── Section Settings & Layouts ────────────────── */
.container {
  width: 100%; 
  max-width: 1200px;
  margin: 0 auto; 
  padding: 0 var(--space-md); 
  position: relative;
}

section { 
  padding: var(--space-3xl) 0; 
  position: relative;
}

.section-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-blue);
  margin-bottom: var(--space-sm);
}

.text-center { text-align: center }
.relative { position: relative }

/* ── Media Masking ─────────────────────────────── */
img, video {
  max-width: 100%;
  height: auto;
}

.portfolio-thumb,
.bento-card img,
.svc-feature-card,
.sticky-scroll-media,
.impact-card,
.metrics-card,
.contact-form-card,
.testimonial-card,
.card,
.apple-image-mask {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* ── Forms ─────────────────────────────────────── */
form { 
  display: flex; 
  flex-direction: column; 
  gap: 12px;
}
form label {
  font-size: var(--fs-small); 
  font-weight: 500;
  color: var(--text-primary); 
  margin-top: 8px; 
  text-align: left;
}
.form-input, 
form input, 
form select, 
form textarea {
  width: 100%; 
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--fs-small);
  transition: all 0.3s var(--apple-ease);
}
.form-input::placeholder, 
form input::placeholder, 
form textarea::placeholder {
  color: var(--text-muted); 
  opacity: 0.6;
}
.form-input:focus, 
form input:focus, 
form select:focus, 
form textarea:focus {
  outline: none;
  border-color: var(--accent-blue);
  background: #ffffff;
  box-shadow: 0 0 0 1px var(--accent-blue);
}

/* ── 5. Kinetic Scrolling Physics ───────────────── */
.reveal-up {
  opacity: 0;
  transform: translateY(40px) scale(0.95); /* Base CSS state with scale-up start */
  transition: opacity 1.2s var(--apple-ease), transform 1.2s var(--apple-ease);
  will-change: transform, opacity;
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0) scale(1); /* Active target state */
}

/* Fallback legacy compatibility mapping */
.reveal, .fade-up {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  transition: opacity 1.2s var(--apple-ease), transform 1.2s var(--apple-ease);
  will-change: transform, opacity;
}
.reveal.revealed, .fade-up.revealed,
.reveal.is-visible, .fade-up.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Grid utilities */
.grid-2 {
  display: grid; 
  grid-template-columns: repeat(2, 1fr); 
  gap: var(--space-lg);
}
.grid-3 {
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: var(--space-lg);
}
.card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg); 
  padding: var(--space-lg);
  transition: transform 0.4s var(--apple-ease), box-shadow 0.4s var(--apple-ease);
}
.card:hover {
  transform: scale(1.015);
  box-shadow: 0 12px 36px rgba(0,0,0,0.06);
}
.st-icon {
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  width: 44px; 
  height: 44px;
  border-radius: 10px;
  background: rgba(0, 102, 204, 0.08);
  color: var(--accent-blue);
  font-size: 18px; 
  margin-bottom: var(--space-md);
}

/* ── Responsive Settings ───────────────────────── */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr) }
}
@media (max-width: 768px) {
  section { padding: var(--space-2xl) 0 }
  
  /* Tighten Floating Pill Container on Mobile */
  #site-header {
    top: 16px;
    width: calc(100% - 32px);
  }

  .nav-container {
    padding: 0 16px;
  }

  /* Hide Desktop Links and CTA */
  .nav-links {
    display: none; /* Hidden by default on mobile */
    position: fixed; 
    top: 90px; /* Floats below the mobile header top (16px) + height (64px) + gap */
    left: 16px; 
    width: calc(100% - 32px); 
    height: auto;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    flex-direction: column; 
    justify-content: flex-start; 
    padding: var(--space-lg) var(--space-md);
    gap: var(--space-md);
    clip-path: inset(0 0 100% 0); 
    transition: clip-path 0.4s var(--apple-ease); 
    z-index: 99;
  }

  .nav-links.active { 
    display: flex; /* Shown when toggled */
    clip-path: inset(0 0 0 0);
  }

  .nav-links a.nav-link { 
    font-size: 18px;
    opacity: 1;
  }

  .nav-cta {
    display: none; /* Hide primary CTA in mobile header */
  }

  /* Reveal & Style the Mobile Menu Toggle */
  #hamburger-btn { 
    display: flex;
    color: #ffffff; /* Explicit white color for dark header */
  }

  #hamburger-btn svg {
    stroke: #ffffff; /* Ensures SVG lines render as white */
  }
  
  .grid-2, .grid-3 { 
    grid-template-columns: 1fr; 
    gap: var(--space-md);
  }

  .sticky-scroll-section {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .sticky-scroll-media {
    position: relative;
    top: 0;
    aspect-ratio: 16/10;
  }
  .sticky-scroll-step {
    padding: 40px 0;
  }

  /* Home Page Mobile Grid & Flex Stacking to Prevent Horizontal Overflow */
  .hero-stats {
    flex-direction: column;
    gap: var(--space-xl);
  }

  .diff-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .charity-stats {
    flex-direction: column;
    gap: var(--space-xl);
  }

  .process-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .cta-actions {
    flex-direction: column;
    gap: var(--space-md);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  /* Mobile Usability & Tap Target Enhancements */
  .service-row {
    min-height: 48px;
    padding: 20px 0;
  }

  .service-row .roster-arrow {
    opacity: 1;
    transform: translateX(0);
  }

  /* Disable roster row-title sliding animation on mobile touch to avoid layout shift glitches */
  .service-row .roster-title {
    transform: none !important;
  }

  .btn-secondary {
    min-height: 48px;
    padding: 12px 0;
    display: inline-flex;
    align-items: center;
  }

  #hamburger-btn {
    padding: 14px; /* Increases touch area from 36px to 48px */
    min-width: 48px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Hero CTA Button Stacking */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    width: 100%;
    min-height: 48px;
    text-align: center;
    justify-content: center;
  }
}

/* ── Strategy Section Image Animation & Glow ── */
.sticky-scroll-media {
  will-change: transform;
}
.sticky-scroll-media.reveal-up {
  opacity: 0;
  transform: scale(0.96) translateY(20px);
  transition: none !important; /* We use CSS animation instead of the default transition */
}
.sticky-scroll-media.reveal-up.revealed {
  animation: strategyReveal 0.9s cubic-bezier(0.25, 1, 0.5, 1) forwards,
             strategyFloat 6s ease-in-out 0.9s infinite;
}

.sticky-scroll-media::before {
  content: "";
  position: absolute;
  top: 15%;
  left: 15%;
  width: 70%;
  height: 70%;
  background: var(--accent-blue);
  filter: blur(60px);
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform, opacity;
}
.sticky-scroll-media.revealed::before {
  animation: glowReveal 0.9s cubic-bezier(0.25, 1, 0.5, 1) forwards,
             glowPulse 6s ease-in-out 0.9s infinite;
}

@keyframes strategyReveal {
  0% {
    opacity: 0;
    transform: scale(0.96) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes strategyFloat {
  0% {
    transform: scale(1) translateY(0);
  }
  25% {
    transform: scale(1) translateY(-8px);
  }
  75% {
    transform: scale(1) translateY(8px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}

@keyframes glowReveal {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }
  100% {
    opacity: 0.12;
    transform: scale(1);
  }
}

@keyframes glowPulse {
  0% {
    opacity: 0.12;
    transform: scale(1);
  }
  50% {
    opacity: 0.22;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.12;
    transform: scale(1);
  }
}

/* Respect prefers-reduced-motion for strategy image */
@media (prefers-reduced-motion: reduce) {
  .sticky-scroll-media.reveal-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .sticky-scroll-media.reveal-up.revealed {
    animation: none !important;
  }
  .sticky-scroll-media::before,
  .sticky-scroll-media.revealed::before {
    display: none !important;
    animation: none !important;
  }
}
