/* styles.css */

/* -------------------------------------------------------------------------- */
/*                                 THEME VARIABLES                            */
/* -------------------------------------------------------------------------- */

:root {
  /* Header height for layout calculations */
  --header-height: 60px;
  --measured-header-height: 0px; /* Set by JavaScript based on actual measurements */

  /* Brand accents for gradients */
  --brand-a: 253 94% 61%; /* violet */
  --brand-b: 199 89% 48%; /* cyan */
  --brand-c: 281 89% 64%; /* purple */
  --brand-d: 152 76% 46%; /* teal */

  /* Let the UA know both color schemes are supported */
  color-scheme: dark light;

  /* --- DEFAULT THEME (DARK) - Monochrome --- */
  --background-hsl: 240 10% 3.9%;    /* Almost Black */
  --foreground-hsl: 0 0% 98%;        /* Almost White */

  --card-hsl: 240 6% 10%;          /* Slightly lighter dark gray for cards */
  --card-foreground-hsl: 0 0% 98%;

  --popover-hsl: 240 10% 3.9%;
  --popover-foreground-hsl: 0 0% 98%;

  /* Primary becomes near-white in dark mode */
  --primary-hsl: 0 0% 98%;
  --primary-foreground-hsl: 240 10% 3.9%; /* Text on primary button (dark) */

  --secondary-hsl: 240 5% 18%;      /* Dark Gray for secondary elements */
  --secondary-foreground-hsl: 0 0% 98%; /* Light text on secondary */

  --muted-hsl: 240 5% 18%;          /* Muted backgrounds */
  --muted-foreground-hsl: 240 4% 65%; /* Softer Gray for muted text */

  --accent-hsl: 240 5% 18%;
  --accent-foreground-hsl: 0 0% 98%;

  /* Destructive can remain a muted red for semantics */
  --destructive-hsl: 0 72% 51%; /* More desaturated red */
  --destructive-foreground-hsl: 0 0% 98%;

  --border-hsl: 240 4% 20%;         /* Border for cards, inputs etc. */
  --input-hsl: 240 4% 20%;          /* Input background */
  --ring-hsl: 0 0% 98%;              /* Focus ring (using primary) */

  /* Shadows for Dark Theme - subtle dark shadows */
  --shadow-color-hsl: 0 0% 0%; /* Pure black for shadow base */
  --shadow-opacity: 0.2;
  --shadow-sm: 0 1px 2px 0 hsl(var(--shadow-color-hsl) / var(--shadow-opacity));
  --shadow: 0 2px 4px 0 hsl(var(--shadow-color-hsl) / var(--shadow-opacity));
  --shadow-md: 0 3px 6px 0 hsl(var(--shadow-color-hsl) / var(--shadow-opacity));
  --shadow-lg: 0 8px 16px 0 hsl(var(--shadow-color-hsl) / var(--shadow-opacity));

  /* Motion */
  --reveal-distance: 24px;
  --reveal-duration: 700ms;
  --reveal-ease: cubic-bezier(.21,.62,.31,1);
}

html[data-theme="light"] {
  /* --- LIGHT THEME OVERRIDES - Monochrome --- */
  --background-hsl: 0 0% 100%;         /* White */
  --foreground-hsl: 240 10% 3.9%;     /* Almost Black text */

  --card-hsl: 0 0% 100%;
  --card-foreground-hsl: 240 10% 3.9%;

  --popover-hsl: 0 0% 100%;
  --popover-foreground-hsl: 240 10% 3.9%;

  /* Primary becomes near-black in light mode */
  --primary-hsl: 240 10% 3.9%;
  --primary-foreground-hsl: 0 0% 98%; /* Text on primary button (light) */

  --secondary-hsl: 240 5% 96%;       /* Light gray */
  --secondary-foreground-hsl: 240 10% 3.9%; /* Dark text on secondary */

  --muted-hsl: 240 5% 96%;
  --muted-foreground-hsl: 240 4% 46%;

  --accent-hsl: 240 5% 96%;
  --accent-foreground-hsl: 240 10% 3.9%;

  --destructive-hsl: 0 84% 60%;
  --destructive-foreground-hsl: 0 0% 98%;

  --border-hsl: 240 6% 90%;           /* Light gray border */
  --input-hsl: 240 6% 90%;
  --ring-hsl: 240 10% 3.9%;           /* Focus ring (using primary) */

  /* Shadows for Light Theme */
  --shadow-color-hsl: 220 3% 15%;
  --shadow-opacity: 0.1;
  --shadow-sm: 0 1px 2px hsl(var(--shadow-color-hsl) / calc(var(--shadow-opacity) - 0.04));
  --shadow: 0 3px 6px hsl(var(--shadow-color-hsl) / var(--shadow-opacity));
  --shadow-md: 0 4px 8px hsl(var(--shadow-color-hsl) / var(--shadow-opacity));
  --shadow-lg: 0 10px 20px hsl(var(--shadow-color-hsl) / var(--shadow-opacity));
}

/* --- COMMON DERIVED VARIABLES (Applied Globally) --- */
:root {
  --radius: 0.5rem;

  --background: hsl(var(--background-hsl));
  --foreground: hsl(var(--foreground-hsl));
  --card: hsl(var(--card-hsl));
  --card-foreground: hsl(var(--card-foreground-hsl));
  --popover: hsl(var(--popover-hsl));
  --popover-foreground: hsl(var(--popover-foreground-hsl));
  --primary: hsl(var(--primary-hsl));
  --primary-foreground: hsl(var(--primary-foreground-hsl));
  /* Hover for primary: make it slightly transparent/dimmed */
  --primary-hover: hsl(var(--primary-hsl) / 0.9);
  --secondary: hsl(var(--secondary-hsl));
  --secondary-foreground: hsl(var(--secondary-foreground-hsl));
  --secondary-hover: hsl(var(--secondary-hsl) / 0.85); /* Adjust if needed for better effect on grays */
  --muted: hsl(var(--muted-hsl));
  --muted-foreground: hsl(var(--muted-foreground-hsl));
  --accent: hsl(var(--accent-hsl));
  --accent-foreground: hsl(var(--accent-foreground-hsl));
  --destructive: hsl(var(--destructive-hsl));
  --destructive-foreground: hsl(var(--destructive-foreground-hsl));
  --border: hsl(var(--border-hsl));
  --input: hsl(var(--input-hsl));
  --ring: hsl(var(--ring-hsl));

  /* Section edge fade size */
  --section-edge-fade: clamp(100px, 12vh, 180px);
}


/* Global reset & smooth scroll */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(max(var(--header-height, 60px), var(--measured-header-height, 0px)) + 10px);
}

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100vw;
  background: linear-gradient(90deg, hsl(var(--brand-b)), hsl(var(--brand-c)));
  transform-origin: 0 0;
  transform: scaleX(0);
  z-index: 1200;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  color: var(--foreground);
  line-height: 1.65;
  background-color: var(--background);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern' 1;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}
/* Specific logo handling might be needed if logo.png isn't suitable for both themes */
/* e.g., .logo-container img { filter: invert(1); } // In dark mode */
/* html[data-theme="light"] .logo-container img { filter: none; } */


a {
  text-decoration: none;
  color: var(--foreground); /* Links are standard foreground color */
  transition: color 0.2s ease-in-out;
}
a:not(.btn):hover {
  color: var(--primary); /* Hover to primary (white/black) */
}

ul {
  list-style: none;
}

/* Utility classes */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0;
  scroll-margin-top: 90px; /* Offset for fixed header */
  position: relative;
  isolation: isolate; /* contain fades and glows */
  z-index: 0;
  background: var(--background);
}

/* Removed section edge fades */

.section-alt {
  background-color: var(--muted);
}

/* Section background glows (Linear-inspired) */
.bg-glow,
.bg-glow-strong {
  position: relative;
  background: var(--background);
  overflow: hidden;
}

/* Removed glow backgrounds */

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-top: 0.5rem;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--foreground);
  font-weight: 700;
  line-height: 1.3;
  text-rendering: optimizeLegibility;
}

h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-align: center;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.btn svg {
  flex-shrink: 0;
  width: 1em;
  height: 1em;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--primary-foreground);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
  border-color: var(--border); /* Using standard border */
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-outline {
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.btn-outline::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, hsl(var(--primary-hsl) / 0.1), transparent);
  transition: left 0.5s ease;
}

.btn-outline:hover::before {
  left: 100%;
}

.btn-outline:hover {
  background-color: hsl(var(--primary-hsl) / 0.05);
  border-color: hsl(var(--primary-hsl) / 0.3);
  color: var(--foreground);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Focus states for keyboard navigation */
:where(a, button, .btn):focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* Service card focus states */
.service-card:focus-visible {
  outline: 2px solid hsl(var(--brand-b));
  outline-offset: 3px;
}

.service-cta:focus-visible {
  outline: 2px solid hsl(var(--brand-c));
  outline-offset: 2px;
}

nav a:focus-visible {
  color: var(--foreground);
  text-decoration: underline;
}


/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: hsl(var(--background-hsl) / 0.6);
  border-bottom: 1px solid hsl(var(--border-hsl) / 0.6);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.site-header.is-scrolled {
  background-color: hsl(var(--background-hsl) / 0.8);
  border-bottom-color: hsl(var(--border-hsl) / 0.9);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  min-height: 60px;
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-container a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--foreground);
  text-decoration: none;
}

.logo-container a:hover {
  color: var(--muted-foreground);
}

/* Logo wrapper for better theme handling */
.logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px;
  transition: all 0.3s ease;
}

.logo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* For dark theme, we'll invert the logo colors since it has dark text on light bg */
  filter: none;
  transition: filter 0.3s ease;
}

/* Dark theme adjustments */
:root:not([data-theme="light"]) .logo-wrapper {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.2);
}

:root:not([data-theme="light"]) .logo-wrapper img {
  /* Keep original colors in dark theme since logo has its own light background */
  filter: none;
}

/* Light theme adjustments */
html[data-theme="light"] .logo-wrapper {
  background: var(--background);
  border-color: var(--border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

html[data-theme="light"] .logo-wrapper img {
  /* In light theme, logo displays normally */
  filter: none;
}

/* Hover effects */
.logo-container a:hover .logo-wrapper {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Company name styling */
.company-name {
  white-space: nowrap;
}

nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  position: relative;
}

nav ul {
  display: flex;
  gap: 2rem;
}

nav a {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--muted-foreground);
  position: relative;
  padding: 0.5rem 0; /* Improved tap target */
}

nav a:not(.btn):hover {
  color: var(--foreground);
}
nav a.active { color: var(--foreground); }

/* Animated nav underline */
.nav-underline {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, hsl(var(--brand-b)), hsl(var(--brand-c)));
  border-radius: 2px;
  transition: transform 300ms ease, width 300ms ease, opacity .2s ease;
  transform: translateX(0);
  width: 0;
  opacity: 0.7;
}
.nav-link {
  position: relative;
}

/* Header CTA button */
.header-cta {
  margin-left: 1rem;
}


/* Hero section */

.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: calc(max(var(--header-height, 60px), var(--measured-header-height, 0px)) + 40px);
  background: var(--background);
  scroll-margin-top: var(--header-height);
  overflow: hidden;
  isolation: isolate;
}

.backdrop-grid {
  display: none; /* Removed gradient background */
}

/* Fallback for browsers without max() support */
@supports not (height: max(1px, 2px)) {
  .hero {
    /* Use measured value if available, otherwise CSS value */
    padding-top: calc(var(--measured-header-height, var(--header-height, 60px)) + 40px);
  }
}

/* Removed hero fade */

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-copy {
  text-align: left;
  max-width: 720px;
}
.hero-copy .hero-description { margin-left: 0; margin-right: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .375rem .75rem;
  border-radius: 999px;
  background: hsl(var(--muted-hsl) / .6);
  border: 1px solid hsl(var(--border-hsl));
  color: var(--muted-foreground);
  font-size: .8125rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.gradient-text {
  background: linear-gradient(120deg,
    hsl(var(--brand-b)) 10%,
    hsl(var(--brand-c)) 50%,
    hsl(var(--brand-a)) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 1rem;
}
.hero-title .sub {
  display: block;
  font-weight: 700;
  color: var(--foreground);
  background: none;
  -webkit-text-fill-color: initial;
}

/* Large hero logo */
.hero-logo {
  height: 280px;
  width: auto;
  margin: 0 auto 2rem;
  display: block;
  animation: fadeInScale 0.8s ease-out;
}

/* Hero descriptor */
.hero-descriptor {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

/* Hero tagline (was h1) */
.hero-tagline {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  color: var(--foreground);
  letter-spacing: -0.02em;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

/* Service badges */
.hero-services {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.service-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: all 0.2s ease;
}

.service-badge:hover {
  background-color: var(--secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.service-badge svg {
  width: 20px;
  height: 20px;
  opacity: 0.8;
}

/* Animation for logo */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-description {
  font-size: 1.25rem;
  color: var(--muted-foreground);
  margin-bottom: 2.5rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: flex-start;
}

/* Hero visual stack */
.hero-visual {
  position: relative;
  min-height: 420px;
}

.glow {
  display: none; /* Removed glow effects */
}
.glow-1 {
  display: none;
}
.glow-2 {
  display: none;
}

.visual-stack {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.visual-card {
  position: relative;
  background: hsl(var(--card-hsl) / 0.95);
  border: 1px solid hsl(var(--border-hsl) / 0.8);
  border-radius: 16px;
  box-shadow: 0 8px 24px hsl(var(--shadow-color-hsl) / 0.2);
  padding: 1.25rem 1.25rem 1.25rem 1.1rem;
  display: flex;
  gap: 1rem;
  align-items: start;
  transform: rotate(-1.2deg) translateY(0);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(8px);
  cursor: default;
  /* Parallax variables */
  --parallax-x: 0;
  --parallax-y: 0;
  --depth: 0.03;
  --rotation: -1.2deg;
}

.visual-card.offset {
  margin: 1.25rem 0 0 3rem;
  --rotation: 1.2deg;
  --depth: 0.06;
  transform: rotate(1.2deg);
}
.visual-card.last {
  margin: 1.25rem 0 0 1rem;
  --rotation: -0.6deg;
  --depth: 0.09;
  transform: rotate(-0.6deg);
}

.vc-icon {
  color: hsl(var(--brand-b));
  background: hsl(var(--muted-hsl));
  border: 1px solid hsl(var(--border-hsl));
  border-radius: 12px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 48px;
}
.vc-body h3 { margin: 0 0 .25rem; font-size: 1rem; color: var(--foreground); }
.vc-body p { margin: 0; font-size: .95rem; }

/* Reveal on scroll */
/* Reveal defaults visible; JS adds .motion to enable animations */
.reveal { opacity: 1; transform: none; }
.motion .reveal { opacity: 0; transform: translateY(var(--reveal-distance)); will-change: transform, opacity; }
.motion .reveal.in-view { opacity: 1; transform: translateY(0); transition: opacity var(--reveal-duration) var(--reveal-ease) calc(var(--reveal-delay, 0ms)), transform var(--reveal-duration) var(--reveal-ease) calc(var(--reveal-delay, 0ms)); }

/* Parallax */
.parallax-layer {
  transform-style: preserve-3d;
}

/* Parallax transforms applied via CSS variables */
@media (hover: hover) and (pointer: fine) {
  .visual-card.parallax-active {
    transform:
      translate3d(
        calc(var(--parallax-x) * 8px * var(--depth)),
        calc(var(--parallax-y) * 8px * var(--depth)),
        0
      )
      rotate(var(--rotation));
  }
}

/* Accessibility - disable parallax for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .visual-card {
    transition: none !important;
  }
  .visual-card.parallax-active {
    transform: rotate(var(--rotation)) !important;
  }
}


/* Services section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: hsl(var(--card-hsl) / 0.98);
  border: 1px solid hsl(var(--border-hsl) / 0.6);
  border-radius: calc(var(--radius) * 1.5);
  padding: 2.5rem;
  box-shadow: 0 1px 3px hsl(var(--shadow-color-hsl) / 0.08);
  transition: background-color 200ms cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, hsl(var(--brand-b)), hsl(var(--brand-c)));
  transform-origin: left;
  transform: scaleX(0);
  opacity: 0;
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 150ms ease;
}

.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 8px 20px hsl(var(--shadow-color-hsl) / 0.15);
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
  z-index: -1;
}

.service-card:is(:hover, :focus-visible, :has(:focus-visible)) {
  background: hsl(var(--card-hsl));
}

.service-card:is(:hover, :focus-visible, :has(:focus-visible))::before {
  transform: scaleX(1);
  opacity: 1;
}

.service-card:is(:hover, :focus-visible, :has(:focus-visible))::after {
  opacity: 1;
}

.service-card:active {
  transform: translateY(-1px);
}

.service-icon {
  color: var(--primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.service-icon svg {
  width: 2.5rem;
  height: 2.5rem;
}

.service-content h3 {
  font-size: 1.375rem;
  margin-bottom: 1rem;
  color: var(--card-foreground);
  font-weight: 600;
}

.service-content p {
  color: var(--muted-foreground);
  font-size: 0.95rem;
  line-height: 1.6;
  flex-grow: 1;
}

.service-cta {
  margin-top: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  opacity: 0.9;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none;
  position: relative;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 200ms cubic-bezier(0.16, 1, 0.3, 1),
              opacity 150ms ease;
}

.service-cta .arrow {
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:is(:hover, :focus-visible, :has(:focus-visible)) .service-cta {
  opacity: 1;
  background-size: 100% 1px;
}

.service-card:is(:hover, :focus-visible, :has(:focus-visible)) .service-cta .arrow {
  transform: translateX(2px);
}

/* Tilt targets */
.tilt {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  will-change: transform;
  transform-style: preserve-3d;
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(0);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.tilt:is(:hover, :focus-visible, :has(:focus-visible)) {
  transform: rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(-3px);
}


/* About section */
.about-content {
  max-width: 1000px;
  margin: 0 auto;
}

.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}

.about-panel {
  position: relative;
  padding: 2rem;
  border-radius: calc(var(--radius) * 1.5);
  border: 1px solid hsl(var(--border-hsl) / 0.5);
  background: hsl(var(--card-hsl) / 0.6);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px hsl(var(--shadow-color-hsl) / 0.15);
  overflow: hidden;
  transition: outline 200ms ease, outline-offset 200ms ease;
}

.about-panel:focus-within {
  outline: 2px solid hsl(var(--brand-b) / 0.5);
  outline-offset: 4px;
}

.about-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.about-glow {
  display: none; /* Removed about glow effects */
}
.about-glow-1 {
  display: none;
}
.about-glow-2 {
  display: none;
}

.about-panel .about-grid { position: relative; z-index: 1; }

.about-text {
  text-align: left;
}

.about-text .lead {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.about-text p {
  margin-bottom: 1.25rem;
  color: var(--muted-foreground);
  line-height: 1.7;
  font-size: 1rem;
}

.about-text p:last-of-type {
  margin-bottom: 0;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(var(--card), var(--card)) padding-box,
              linear-gradient(135deg, hsl(var(--brand-c)), hsl(var(--brand-b))) border-box;
  border: 1px solid transparent;
  border-radius: calc(var(--radius) * 1.25);
  transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1),
              background-color 200ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px hsl(var(--shadow-color-hsl) / 0.08);
  position: relative;
  cursor: default;
}

.stat-number {
  font-size: 2.75rem;
  font-weight: 800;
  background: linear-gradient(120deg, hsl(var(--brand-b)) 20%, hsl(var(--brand-c)) 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 8px 20px hsl(var(--shadow-color-hsl) / 0.15);
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
  z-index: -1;
}

.stat-item:is(:hover, :focus-visible) {
  transform: translateY(-3px);
}

.stat-item:is(:hover, :focus-visible)::after {
  opacity: 1;
}

.stat-item:active {
  transform: translateY(-1px);
}

.stat-item:focus-visible {
  outline: 2px solid hsl(var(--brand-b));
  outline-offset: 3px;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .5rem;
  margin-top: 1rem;
}
.about-tags li {
  padding: .35rem .65rem;
  border-radius: 999px;
  font-size: .8rem;
  border: 1px solid hsl(var(--border-hsl));
  background: hsl(var(--muted-hsl));
  color: var(--muted-foreground);
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1),
              background-color 160ms ease,
              border-color 160ms ease;
  cursor: default;
  display: inline-block;
}

.about-tags li:hover {
  transform: scale(1.02);
  background: hsl(var(--muted-hsl) / 0.8);
  border-color: hsl(var(--border-hsl) / 0.8);
}

.about-tags li:focus-visible {
  outline: 2px solid hsl(var(--brand-c));
  outline-offset: 2px;
}


/* Customers Section */
.customer-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 3rem 4rem;
  align-items: center;
  justify-items: center;
  margin-top: 3rem;
  padding: 3rem 2rem;
  background-color: var(--card);
  border-radius: calc(var(--radius) * 1.5);
  border: 1px solid var(--border);
}

.customer-logos img {
  height: 44px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  opacity: 0.9;
  transition: all 0.3s ease;
  filter: none;
}

/* Light theme adjustments */
html[data-theme="light"] .customer-logos img {
  filter: none;
  opacity: 0.9;
}

.customer-logos img:hover {
  opacity: 1;
  transform: scale(1.05);
  filter: none;
}

/* Per-logo utility classes for specific treatments */
.customer-logos img.logo--light-chip {
  background: #fff;
  border: 1px solid hsl(var(--border-hsl) / 0.6);
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: 0 1px 2px hsl(var(--shadow-color-hsl) / 0.15);
  opacity: 1;
  filter: none;
  height: 56px; /* Compensate for padding: 44px + 12px = 56px */
}

/* Larger size for detailed wordmarks */
.customer-logos img.logo--fine-detail {
  height: 56px; /* up from 44px */
  max-width: 220px;
}

/* Optional: constrain very wide logos */
.customer-logos img.logo--wide {
  max-width: 200px;
}


/* Logos marquee */
.logos-marquee {
  overflow: hidden;
  position: relative;
  border-radius: calc(var(--radius) * 1.5);
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.25rem 0;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.logos-marquee .track {
  display: flex;
  gap: 4rem;
  align-items: center;
  width: max-content;
  padding: 0 2rem;
  animation: marquee 28s linear infinite;
}
.logos-marquee .track.reverse { animation-direction: reverse; animation-duration: 34s; }
.logos-marquee:hover .track { animation-play-state: paused; }

@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.logos-marquee img {
  height: 44px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
  transition: transform .2s ease, opacity .2s ease;
}
.logos-marquee img:hover { transform: scale(1.05); opacity: 1; }

/* Contact section */
.contact-content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.cta-panel {
  position: relative;
  padding: 2.5rem 2rem;
  border-radius: calc(var(--radius) * 1.5);
  border: 1px solid hsl(var(--border-hsl) / 0.5);
  background: hsl(var(--card-hsl) / 0.7);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px hsl(var(--shadow-color-hsl) / 0.15);
}

.btn-primary.shine { position: relative; overflow: hidden; }
.btn-primary.shine::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 40%, hsl(var(--brand-b) / .15) 50%, transparent 60%);
  transform: translateX(-100%);
  transition: transform 700ms ease;
}
.btn-primary.shine:hover::after { transform: translateX(100%); }

.contact-header {
  margin-bottom: 3rem;
}

.contact-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.contact-description {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.contact-info {
  text-align: center;
}

.contact-email {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.contact-note {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
}


/* Footer */
footer {
  position: relative;
  text-align: center;
  padding: 2.5rem 0;
  background: var(--background);
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 0.875rem;
}
/* Removed footer fade */
footer p {
    color: var(--muted-foreground);
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: var(--radius);
  z-index: 1001;
  outline: 2px solid var(--ring);
  text-decoration: none;
}


/* Responsive CSS */
@media (max-width: 992px) {
  .hero-title {
    font-size: 2.75rem;
  }
  .hero p {
    font-size: 1.05rem;
  }
  h2 {
    font-size: 2rem;
  }
}

@media (max-width: 968px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-buttons { justify-content: center; }
  .hero-copy { text-align: center; margin: 0 auto; }
  .hero-description { margin-left: auto; margin-right: auto; }
  .logos-marquee { padding: 1rem 0; }
  .logos-marquee .track { gap: 2rem; }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .about-stats {
    flex-direction: row;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
  .section { --section-edge-fade: clamp(32px, 7vh, 84px); }
  /* Reduce visual noise on small screens */
  .backdrop-grid,
  .glow {
    display: none;
  }
  .header-container {
    padding: 0.75rem 1.5rem;
    height: auto;
  }
  nav ul {
    gap: 1.25rem;
  }
  .hero-title { font-size: 2rem; }
  .hero-description {
    font-size: 1.125rem;
  }
  .hero-services {
    gap: 0.75rem;
  }
  .service-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }
  .service-card {
    padding: 2rem;
  }
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .about-stats {
    flex-direction: column;
  }
  .contact-actions {
    gap: 1.5rem;
  }
}

@media (max-width: 600px) {
  :root {
    --header-height: 170px; /* Accounts for stacked header layout */
  }

  body {
    line-height: 1.55;
  }
  .header-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  .logo-container a {
    font-size: 1.1rem;
  }
  nav {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  nav ul {
    gap: 0.75rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .header-cta {
    margin-left: 0;
    width: auto;
  }

  .hero {
    padding-top: calc(var(--header-height) + 10px);
    min-height: 70vh;
  }
  .hero-title { font-size: 2.25rem; line-height: 1.2; }
  .hero-description {
    font-size: 1rem;
  }
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .btn {
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  h2 {
    font-size: 1.875rem;
    margin-bottom: 1.5rem;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .service-card {
    padding: 1.5rem;
  }
  
  .about-text .lead {
    font-size: 1.125rem;
  }
  
  .contact-header h2 {
    font-size: 2rem;
  }
  
  .contact-description {
    font-size: 1rem;
  }
  
  .customer-logos {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    padding: 2rem 1.5rem;
  }
  
  .customer-logos img {
    height: 36px;
    max-width: 120px;
  }
  
  .customer-logos img.logo--fine-detail {
    height: 42px; /* scale down a bit on small screens */
    max-width: 180px;
  }
  
  .stat-number {
    font-size: 2rem;
  }
}

/* Safe area inset support for notched devices */
@supports (padding: max(0px)) {
  .hero {
    /* Always respect the larger of the static guess and the measured height */
    padding-top: calc(
      max(var(--header-height, 60px), var(--measured-header-height, 0px))
      + 40px
      + env(safe-area-inset-top, 0px)
    );
  }

  @media (max-width: 600px) {
    .hero {
      /* Same idea for mobile */
      padding-top: calc(
        max(var(--header-height, 170px), var(--measured-header-height, 0px))
        + 10px
        + env(safe-area-inset-top, 0px)
      );
    }
  }

  .site-header {
    padding-top: env(safe-area-inset-top, 0px);
  }
}

/* Touch device support - replace hover with active states */
@media (hover: none) {
  .service-card:hover {
    transform: none;
  }

  .service-card:active {
    transform: translateY(-2px);
  }

  .service-card::before {
    opacity: 0.7;
    transform: scaleX(1);
  }

  .service-cta {
    background-size: 0% 1px;
  }

  .service-card:active .service-cta {
    background-size: 100% 1px;
  }

  .service-card:active .service-cta .arrow {
    transform: translateX(2px);
  }

  /* About section touch support */
  .stat-item:hover {
    transform: none;
  }

  .stat-item:active {
    transform: translateY(-2px);
  }

  .about-tags li:hover {
    transform: none;
    background: hsl(var(--muted-hsl));
    border-color: hsl(var(--border-hsl));
  }

  .about-tags li:active {
    transform: scale(0.98);
  }
}

/* Reduced motion preferences for accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }

  /* Service cards - maintain visual feedback without motion */
  .service-card {
    transform: none !important;
  }

  .service-card::before {
    transform: scaleX(1) !important;
    opacity: 0 !important;
  }

  .service-card:is(:hover, :focus-visible, :has(:focus-visible))::before {
    opacity: 1 !important;
  }

  .service-cta {
    background-size: 100% 1px !important;
  }

  .service-cta .arrow {
    transform: none !important;
  }

  /* About section - maintain visual feedback without motion */
  .stat-item {
    transform: none !important;
  }

  .stat-item:is(:hover, :focus-visible)::after {
    opacity: 1 !important;
  }

  .about-tags li {
    transform: none !important;
  }

  .about-tags li:hover {
    background: hsl(var(--muted-hsl) / 0.8) !important;
    border-color: hsl(var(--border-hsl) / 0.8) !important;
  }
}

/* High contrast preference: remove decorative backgrounds */
@media (prefers-contrast: more) {
  .backdrop-grid,
  .bg-glow::before,
  .bg-glow-strong::before,
  .about-glow,
  footer::before {
    background: none !important;
    mask: none !important;
    -webkit-mask: none !important;
  }
}
