/* ================================
   Conversion System - Design System Styles
   Modern, Clean, Accessible
   Light Mode Only
   ================================ */

/* ================================
   CSS Variables & Custom Properties
   ================================ */
:root {
  /* ===================
     LIGHT MODE (Default)
     Design Philosophy: Minimal contrast fatigue, accessibility-first, WCAG-friendly
     =================== */
  
  /* Brand Identity Colors */
  --brand-ghost: #F8F9FA;     /* Ghost White Background */
  --brand-orange: #E05E0F;    /* Primary Accent - Orange (used sparingly) */
  --brand-teal: #4D9A88;      /* Secondary Accent - Teal */
  --brand-blue: #172B42;      /* Deep Blue - Primary Text */
  
  /* Light Mode Text Colors (WCAG-friendly contrast) */
  --text-primary: #0F172A;       /* Near-black / charcoal - approx slate-900 */
  --text-secondary: #6B7280;     /* Muted gray - approx gray-500 */
  --text-muted: #9CA3AF;         /* Subtle gray - approx gray-400 */
  
  /* Light Mode Background Colors */
  --bg-primary: #FFFFFF;         /* Pure white */
  --bg-secondary: #F9FAFB;       /* Off-white - approx gray-50 */
  --bg-ghost: #F8F9FA;           /* Ghost white */
  --bg-surface: #FFFFFF;         /* Card/surface background */
  --bg-surface-hover: #F3F4F6;   /* Hover state - approx gray-100 */
  
  /* Link/Accent Colors - Light Mode */
  --accent-primary: #E05E0F;     /* Brand orange */
  --accent-secondary: #4D9A88;   /* Brand teal */
  --accent-hover: #C2410C;       /* Darker orange on hover */
  
  /* Border Colors - Light Mode */
  --border-primary: #E5E7EB;     /* Light gray border - approx gray-200 */
  --border-secondary: #D1D5DB;   /* Slightly darker border - approx gray-300 */
  
  /* Extended Orange Palette */
  --orange-50: #FFF7ED;
  --orange-100: #FFEDD5;
  --orange-200: #FED7AA;
  --orange-300: #FDBA74;
  --orange-400: #FB923C;
  --orange-500: #E05E0F;
  --orange-600: #C2410C;
  --orange-700: #9A3412;
  
  /* Extended Teal Palette */
  --teal-50: #F0FDFA;
  --teal-100: #CCFBF1;
  --teal-200: #99F6E4;
  --teal-300: #5EEAD4;
  --teal-400: #4D9A88;
  --teal-500: #14B8A6;
  --teal-600: #0D9488;
  
  /* Semantic Colors */
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* Typography - Clean Sans-Serif System Stack
     Resolves to Inter, SF Pro, or Segoe UI depending on device
     Feel: modern, neutral, readable - calm narrator, not shouting headline */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  
  /* Spacing */
  --section-padding: 6rem;
  --container-padding: 1rem;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
  
  /* Shadows - Light Mode */
  --shadow-orange: 0 0 40px rgba(224, 94, 15, 0.3);
  --shadow-teal: 0 0 40px rgba(77, 154, 136, 0.3);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}



/* ================================
   Base Styles
   ================================ */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-ghost);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Remove outline on focus for mouse users, keep for keyboard */
:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Selection colors */
::selection {
  background-color: var(--accent-primary);
  color: white;
}

/* ================================
   Typography System - Unified Across All Pages
   ================================ */

/* Base heading styles */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* ===================
   H1 - Page Titles (Hero Headings)
   Desktop: 3.75rem (60px) | Tablet: 3rem (48px) | Mobile: 2.25rem (36px)
   =================== */
.heading-h1,
h1 {
  font-size: 2.25rem; /* Mobile default: 36px */
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .heading-h1,
  h1 {
    font-size: 3rem; /* Tablet: 48px */
  }
}

@media (min-width: 1024px) {
  .heading-h1,
  h1 {
    font-size: 3.75rem; /* Desktop: 60px */
  }
}

/* ===================
   H2 - Section Titles
   Desktop: 2.25rem (36px) | Tablet: 1.875rem (30px) | Mobile: 1.5rem (24px)
   =================== */
.heading-h2,
h2 {
  font-size: 1.5rem; /* Mobile default: 24px */
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .heading-h2,
  h2 {
    font-size: 1.875rem; /* Tablet: 30px */
  }
}

@media (min-width: 1024px) {
  .heading-h2,
  h2 {
    font-size: 2.25rem; /* Desktop: 36px */
  }
}

/* ===================
   H3 - Subsection Titles / Card Titles
   Desktop: 1.5rem (24px) | Tablet: 1.25rem (20px) | Mobile: 1.125rem (18px)
   =================== */
.heading-h3,
h3 {
  font-size: 1.125rem; /* Mobile default: 18px */
  line-height: 1.3;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
  .heading-h3,
  h3 {
    font-size: 1.25rem; /* Tablet: 20px */
  }
}

@media (min-width: 1024px) {
  .heading-h3,
  h3 {
    font-size: 1.5rem; /* Desktop: 24px */
  }
}

/* ===================
   H4 - Minor Headings / Labels
   Desktop: 1.125rem (18px) | Tablet: 1rem (16px) | Mobile: 0.9375rem (15px)
   =================== */
.heading-h4,
h4 {
  font-size: 0.9375rem; /* Mobile default: 15px */
  line-height: 1.4;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
  .heading-h4,
  h4 {
    font-size: 1rem; /* Tablet: 16px */
  }
}

@media (min-width: 1024px) {
  .heading-h4,
  h4 {
    font-size: 1.125rem; /* Desktop: 18px */
  }
}

/* ===================
   Body Text - Standard Paragraphs
   Desktop: 1.125rem (18px) | Tablet: 1rem (16px) | Mobile: 1rem (16px)
   =================== */
.body-text,
p {
  font-size: 1rem; /* Mobile default: 16px */
  line-height: 1.7;
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

@media (min-width: 640px) {
  .body-text,
  p {
    font-size: 1rem; /* Tablet: 16px */
  }
}

@media (min-width: 1024px) {
  .body-text,
  p {
    font-size: 1.125rem; /* Desktop: 18px */
    line-height: 1.75;
  }
}

/* ===================
   Lead Text - Hero Subtitles / Intro Paragraphs
   Desktop: 1.25rem (20px) | Tablet: 1.125rem (18px) | Mobile: 1rem (16px)
   =================== */
.lead-text {
  font-size: 1rem; /* Mobile default: 16px */
  line-height: 1.6;
  font-weight: 400;
  color: var(--text-secondary);
}

@media (min-width: 640px) {
  .lead-text {
    font-size: 1.125rem; /* Tablet: 18px */
  }
}

@media (min-width: 1024px) {
  .lead-text {
    font-size: 1.25rem; /* Desktop: 20px */
    line-height: 1.7;
  }
}

/* ===================
   Small Text - Captions / Meta Info
   Desktop: 0.875rem (14px) | Tablet: 0.875rem (14px) | Mobile: 0.875rem (14px)
   =================== */
.small-text {
  font-size: 0.875rem; /* 14px - consistent across all */
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-muted);
}

/* ===================
   White Text Variants (for dark backgrounds)
   =================== */
.heading-h1-white { color: white; }
.heading-h2-white { color: white; }
.heading-h3-white { color: white; }
.body-text-white { color: rgba(255, 255, 255, 0.9); }
.lead-text-white { color: rgba(255, 255, 255, 0.8); }

/* ================================
   Navigation
   ================================ */
#navbar {
  background: rgba(248, 249, 250, 0.8);
  backdrop-filter: blur(20px);
  transition: all var(--transition-normal);
}



#navbar.scrolled {
  background: rgba(248, 249, 250, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-primary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}



/* ================================
   Buttons & Interactive Elements
   ================================ */
button,
a {
  cursor: pointer;
  transition: all var(--transition-fast);
}

/* Primary Button - Orange */
.btn-primary {
  background: var(--accent-primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  border: none;
  position: relative;
  overflow: hidden;
}

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

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-orange);
  background: var(--accent-hover);
}

/* Secondary Button - Teal */
.btn-secondary {
  background: var(--accent-secondary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  border: none;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-teal);
  background: var(--teal-600);
}

/* ================================
   Cards
   ================================ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-primary);
  border-radius: 1rem;
  padding: 2rem;
  transition: all var(--transition-normal);
}

.card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ================================
   Gradient Text
   ================================ */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animated Gradient Text */
.gradient-text-animated {
  background: linear-gradient(
    90deg,
    var(--accent-primary),
    var(--accent-secondary),
    var(--accent-primary)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 3s ease infinite;
}

@keyframes gradientFlow {
  0% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
  100% {
    background-position: 0% center;
  }
}

/* ================================
   Animations
   ================================ */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse-glow {
  0%, 100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Scroll-triggered animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation delays */
.animate-delay-100 { animation-delay: 100ms; }
.animate-delay-200 { animation-delay: 200ms; }
.animate-delay-300 { animation-delay: 300ms; }
.animate-delay-400 { animation-delay: 400ms; }
.animate-delay-500 { animation-delay: 500ms; }

/* ================================
   Form Styles
   ================================ */
input,
textarea {
  font-family: inherit;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
}

input:focus,
textarea:focus {
  box-shadow: 0 0 0 4px rgba(224, 94, 15, 0.2);
  border-color: var(--accent-primary);
  outline: none;
}

/* Custom placeholder styles */
::placeholder {
  color: var(--text-muted);
}

/* ================================
   Scrollbar Styles
   ================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-secondary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-secondary) var(--bg-secondary);
}

/* ================================
   Background Effects
   ================================ */
.bg-grid {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23172B42' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}



/* ================================
   Utility Classes
   ================================ */
.text-balance {
  text-wrap: balance;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Glass morphism effect - Light version */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-primary);
}



/* Glow effects */
.glow-orange {
  box-shadow: var(--shadow-orange);
}

.glow-teal {
  box-shadow: var(--shadow-teal);
}



/* ================================
   RESPONSIVE DESIGN - Mobile First
   ================================ */

/* Extra Small devices (phones, 320px and up) */
@media (min-width: 320px) {
  :root {
    --section-padding: 2rem;
    --container-padding: 1rem;
  }
  
  html {
    font-size: 14px;
  }
  
  h1 {
    font-size: 1.75rem;
    line-height: 1.2;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.25rem;
  }
  
  /* Mobile touch targets - minimum 44px */
  button,
  a,
  input[type="submit"],
  input[type="button"] {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Mobile navigation */
  .mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-surface);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 40;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Hide desktop nav on mobile */
  .desktop-nav {
    display: none !important;
  }
  
  /* Show mobile menu button */
  .mobile-menu-btn {
    display: flex !important;
  }
  
  /* Stack hero content */
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  
  /* Full width buttons on mobile */
  .btn-mobile-full {
    width: 100%;
    justify-content: center;
  }
  
  /* Smaller padding on mobile */
  .section-mobile-padding {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Small devices (landscape phones, 480px and up) */
@media (min-width: 480px) {
  :root {
    --section-padding: 2.5rem;
  }
  
  html {
    font-size: 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
}

/* Medium devices (tablets, 640px and up) */
@media (min-width: 640px) {
  :root {
    --section-padding: 3rem;
    --container-padding: 1.5rem;
  }
  
  html {
    font-size: 15px;
  }
  
  h1 {
    font-size: 2.25rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  /* Two column grids on tablet */
  .grid-tablet-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Medium-Large devices (tablets landscape, 768px and up) */
@media (min-width: 768px) {
  :root {
    --section-padding: 4rem;
  }
  
  html {
    font-size: 16px;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2.25rem;
  }
  
  /* Show desktop nav */
  .desktop-nav {
    display: flex !important;
  }
  
  /* Hide mobile menu button */
  .mobile-menu-btn {
    display: none !important;
  }
  
  /* Two column hero */
  .hero-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 3rem !important;
  }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
  :root {
    --section-padding: 5rem;
  }
  
  h1 {
    font-size: 3rem;
  }
  
  h2 {
    font-size: 2.5rem;
  }
  
  /* Three/four column grids */
  .grid-desktop-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-desktop-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Extra large devices (large desktops, 1280px and up) */
@media (min-width: 1280px) {
  :root {
    --section-padding: 6rem;
  }
  
  h1 {
    font-size: 3.5rem;
  }
  
  h2 {
    font-size: 2.75rem;
  }
}

/* 2K+ displays (1440px and up) */
@media (min-width: 1440px) {
  html {
    font-size: 17px;
  }
  
  .container-2k {
    max-width: 1400px;
  }
}

/* 4K displays (2560px and up) */
@media (min-width: 2560px) {
  html {
    font-size: 18px;
  }
  
  .container-4k {
    max-width: 1800px;
  }
}

/* ================================
   TABLET-SPECIFIC OPTIMIZATIONS
   ================================ */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Tablet portrait */
  .tablet-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Adjust card sizes for tablet */
  .card {
    padding: 1.5rem;
  }
  
  /* Navigation dropdown adjustments */
  .nav-dropdown {
    min-width: 200px;
  }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  /* Tablet landscape / small desktop */
  .tablet-landscape-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ================================
   ORIENTATION-SPECIFIC STYLES
   ================================ */
@media (orientation: portrait) {
  .hero-section {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 60px;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  /* Short landscape screens (phones rotated) */
  .hero-section {
    min-height: auto;
    padding-top: 80px;
    padding-bottom: 40px;
  }
  
  /* Reduce vertical spacing */
  :root {
    --section-padding: 2rem;
  }
}

/* ================================
   CROSS-BROWSER COMPATIBILITY
   ================================ */

/* Webkit browsers (Chrome, Safari, Edge) */
@supports (-webkit-appearance: none) {
  /* Smooth scrolling fix */
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix for Safari flexbox bugs */
  .flex-container {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
  }
  
  /* Safari backdrop-filter support */
  .glass,
  .nav-blur {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

/* Firefox specific */
@-moz-document url-prefix() {
  /* Firefox scrollbar */
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-secondary) var(--bg-secondary);
  }
  
  /* Firefox focus ring */
  :focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
  }
}

/* IE11 and Legacy Edge fallbacks */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
  /* Flexbox fallbacks */
  .flex-container {
    display: -ms-flexbox;
    display: flex;
  }
  
  /* Grid fallbacks */
  .grid-container {
    display: -ms-grid;
    display: grid;
  }
  
  /* CSS variables fallback */
  .btn-primary {
    background: #E05E0F;
  }
  
  .btn-secondary {
    background: #4D9A88;
  }
}

/* ================================
   VENDOR PREFIXES FOR ANIMATIONS
   ================================ */
@-webkit-keyframes float {
  0%, 100% { -webkit-transform: translateY(0); transform: translateY(0); }
  50% { -webkit-transform: translateY(-20px); transform: translateY(-20px); }
}

@-webkit-keyframes pulse-glow {
  0%, 100% { opacity: 0.5; -webkit-transform: scale(1); transform: scale(1); }
  50% { opacity: 0.8; -webkit-transform: scale(1.1); transform: scale(1.1); }
}

@-webkit-keyframes fadeInUp {
  from { opacity: 0; -webkit-transform: translateY(30px); transform: translateY(30px); }
  to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
}

@-webkit-keyframes spin {
  to { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

/* ================================
   TOUCH DEVICE OPTIMIZATIONS
   ================================ */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .card:hover {
    transform: none;
    box-shadow: var(--shadow-card);
  }
  
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
  }
  
  /* Active states for touch */
  .btn-primary:active {
    transform: scale(0.98);
    background: var(--accent-hover);
  }
  
  .btn-secondary:active {
    transform: scale(0.98);
    background: var(--teal-600);
  }
  
  .card:active {
    transform: scale(0.99);
  }
  
  /* Larger touch targets */
  button,
  a,
  input,
  select,
  textarea {
    min-height: 44px;
  }
  
  /* Disable hover dropdown on touch */
  .nav-dropdown-trigger:hover .nav-dropdown {
    display: none;
  }
  
  /* Use click/tap instead */
  .nav-dropdown-trigger.active .nav-dropdown {
    display: block;
  }
}

/* Fine pointer (mouse) - restore hover effects */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }
  
  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-orange);
  }
  
  .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-teal);
  }
}

/* ================================
   SAFE AREA INSETS (Notch phones)
   ================================ */
@supports (padding: max(0px)) {
  body {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
  }
  
  header {
    padding-top: max(0px, env(safe-area-inset-top));
  }
  
  footer {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  
  /* Fixed navigation with safe areas */
  .fixed-nav {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
  }
}

/* ================================
   RETINA/HIGH DPI DISPLAYS
   ================================ */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi),
       (min-resolution: 2dppx) {
  /* Sharper borders on retina */
  .card {
    border-width: 0.5px;
  }
  
  /* Use higher res assets */
  .logo-img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ================================
   Print Styles
   ================================ */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .no-print {
    display: none !important;
  }
  
  a {
    text-decoration: underline;
  }
  
  a[href]::after {
    content: ' (' attr(href) ')';
  }
}

/* ================================
   Reduced Motion
   ================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}

/* ================================
   High Contrast Mode
   ================================ */
@media (prefers-contrast: high) {
  :root {
    --accent-primary: #D14B00;
    --accent-secondary: #3D8474;
  }
  
  .card {
    border-width: 2px;
  }
}



/* ================================
   Hero Section Specific
   ================================ */
.hero-gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  animation: pulse-glow 6s ease-in-out infinite;
}

.hero-gradient-orb-1 {
  width: 400px;
  height: 400px;
  background: rgba(224, 94, 15, 0.2);
  top: 20%;
  left: 10%;
}



.hero-gradient-orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(77, 154, 136, 0.2);
  bottom: 20%;
  right: 10%;
  animation-delay: 3s;
}



/* ================================
   Service Cards Hover Effects
   ================================ */
.service-card {
  position: relative;
  overflow: hidden;
  background: var(--bg-surface);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.service-card:hover::before {
  transform: translateX(0);
}

/* ================================
   Stats Counter Animation
   ================================ */
.stat-number {
  display: inline-block;
}

.stat-number.counting {
  animation: countUp 0.5s ease-out forwards;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================
   Testimonial Card
   ================================ */
.testimonial-card {
  position: relative;
  background: var(--bg-surface);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 6rem;
  font-family: Georgia, serif;
  color: rgba(224, 94, 15, 0.2);
  line-height: 1;
}



/* ================================
   Industry Cards
   ================================ */
.industry-card {
  position: relative;
  transition: all 0.3s ease;
  background: var(--bg-surface);
}

.industry-card:hover {
  transform: translateX(10px);
}

/* ================================
   CTA Section
   ================================ */
.cta-glow {
  position: relative;
}

.cta-glow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(224, 94, 15, 0.1) 0%, transparent 70%);
  pointer-events: none;
}



/* ================================
   Loading States
   ================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 25%,
    var(--bg-primary) 50%,
    var(--bg-secondary) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Button loading state */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================================
   Toast Notifications
   ================================ */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-left: 4px solid var(--accent-secondary);
}

.toast.error {
  border-left: 4px solid var(--error);
}

/* ================================
   Accessibility Enhancements
   ================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Focus visible styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent-primary);
  color: white;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

/* ================================
   Dark Section Overrides
   ================================ */
section.bg-brand-blue h2,
section.bg-brand-blue h3,
section.bg-brand-blue h4 {
  color: white;
}

section.bg-brand-blue p {
  color: rgba(255, 255, 255, 0.7);
}

/* ================================
   MOBILE NAVIGATION ENHANCEMENTS
   ================================ */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(23, 43, 66, 0.5);
  opacity: 0;
  visibility: hidden;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  z-index: 45;
}



.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 320px;
  height: 100%;
  background: var(--bg-ghost);
  -webkit-transition: right 0.3s ease;
  transition: right 0.3s ease;
  z-index: 50;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 80px 20px 40px;
}

.mobile-nav-panel.active {
  right: 0;
}

.mobile-nav-link {
  display: block;
  padding: 16px 20px;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-primary);
  border-radius: 12px;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
  background: rgba(224, 94, 15, 0.1);
  color: var(--accent-primary);
}

/* Hamburger menu animation */
.hamburger {
  width: 24px;
  height: 20px;
  position: relative;
  -webkit-transform: rotate(0deg);
  transform: rotate(0deg);
  -webkit-transition: 0.3s ease;
  transition: 0.3s ease;
  cursor: pointer;
}

.hamburger span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  background: var(--text-primary);
  border-radius: 2px;
  opacity: 1;
  left: 0;
  -webkit-transform: rotate(0deg);
  transform: rotate(0deg);
  -webkit-transition: 0.25s ease-in-out;
  transition: 0.25s ease-in-out;
}

.hamburger span:nth-child(1) { top: 0px; }
.hamburger span:nth-child(2),
.hamburger span:nth-child(3) { top: 8px; }
.hamburger span:nth-child(4) { top: 16px; }

.hamburger.open span:nth-child(1) {
  top: 8px;
  width: 0%;
  left: 50%;
}

.hamburger.open span:nth-child(2) {
  -webkit-transform: rotate(45deg);
  transform: rotate(45deg);
}

.hamburger.open span:nth-child(3) {
  -webkit-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

.hamburger.open span:nth-child(4) {
  top: 8px;
  width: 0%;
  left: 50%;
}

/* ================================
   FORM RESPONSIVE STYLES
   ================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-primary);
  border-radius: 0.75rem;
  -webkit-transition: all 0.2s ease;
  transition: all 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  -webkit-box-shadow: 0 0 0 4px rgba(224, 94, 15, 0.15);
  box-shadow: 0 0 0 4px rgba(224, 94, 15, 0.15);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Mobile form adjustments */
@media (max-width: 640px) {
  .form-input,
  .form-textarea,
  .form-select {
    font-size: 16px; /* Prevents iOS zoom on focus */
    padding: 1rem;
  }
}

/* ================================
   RESPONSIVE IMAGES
   ================================ */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.img-responsive {
  width: 100%;
  height: auto;
  -o-object-fit: cover;
  object-fit: cover;
}

/* Lazy loading placeholder */
.img-placeholder {
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 25%,
    var(--bg-primary) 50%,
    var(--bg-secondary) 75%
  );
  background-size: 200% 100%;
  -webkit-animation: shimmer 1.5s infinite;
  animation: shimmer 1.5s infinite;
}

@-webkit-keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

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

/* ================================
   RESPONSIVE TABLES
   ================================ */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
  .table-stack {
    display: block;
  }
  
  .table-stack thead {
    display: none;
  }
  
  .table-stack tbody,
  .table-stack tr,
  .table-stack td {
    display: block;
    width: 100%;
  }
  
  .table-stack tr {
    margin-bottom: 1rem;
    border: 1px solid var(--border-primary);
    border-radius: 0.75rem;
    padding: 1rem;
    background: var(--bg-surface);
  }
  
  .table-stack td {
    padding: 0.5rem 0;
    border: none;
    text-align: left;
  }
  
  .table-stack td::before {
    content: attr(data-label);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
  }
}

/* ================================
   MODAL/DIALOG RESPONSIVE
   ================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(23, 43, 66, 0.6);
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  align-items: center;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
}



.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-surface);
  border-radius: 1.5rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-transform: scale(0.9) translateY(20px);
  transform: scale(0.9) translateY(20px);
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
  -webkit-transform: scale(1) translateY(0);
  transform: scale(1) translateY(0);
}

@media (max-width: 640px) {
  .modal-content {
    border-radius: 1rem 1rem 0 0;
    max-height: 85vh;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    -webkit-transform: translateY(100%);
    transform: translateY(100%);
  }
  
  .modal-overlay.active .modal-content {
    -webkit-transform: translateY(0);
    transform: translateY(0);
  }
}

/* ================================
   RESPONSIVE UTILITIES
   ================================ */
/* Hide on specific breakpoints */
.hide-mobile { display: block; }
.hide-tablet { display: block; }
.hide-desktop { display: none; }
.show-mobile { display: none; }
.show-tablet { display: none; }
.show-desktop { display: block; }

@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: block !important; }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hide-tablet { display: none !important; }
  .show-tablet { display: block !important; }
}

@media (min-width: 1024px) {
  .hide-desktop { display: none !important; }
  .show-desktop { display: block !important; }
}

/* Text alignment responsive */
.text-center-mobile { text-align: left; }
@media (max-width: 640px) {
  .text-center-mobile { text-align: center; }
}

/* Spacing responsive */
.gap-responsive {
  gap: 1rem;
}

@media (min-width: 768px) {
  .gap-responsive { gap: 1.5rem; }
}

@media (min-width: 1024px) {
  .gap-responsive { gap: 2rem; }
}

/* ================================
   SCROLL BEHAVIOR FIXES
   ================================ */
/* Prevent scroll when modal is open */
body.modal-open,
body.nav-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* iOS momentum scroll fix */
.scroll-container {
  -webkit-overflow-scrolling: touch;
  overflow-y: auto;
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* ================================
   PERFORMANCE OPTIMIZATIONS
   ================================ */
/* GPU acceleration for animations */
.gpu-accelerate {
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000px;
  perspective: 1000px;
}

/* Content visibility for performance */
.content-visibility-auto {
  content-visibility: auto;
  contain-intrinsic-size: 0 500px;
}

/* Will-change for known animations */
.will-animate {
  will-change: transform, opacity;
}

/* Remove will-change after animation */
.animation-complete {
  will-change: auto;
}

/* ================================
   MOBILE-FIRST RESPONSIVE FIXES
   ================================ */

/* Base mobile styles */
@media (max-width: 767px) {
  /* ===================
     UNIFIED TYPOGRAPHY - Mobile (<768px)
     All headings and text follow the same scale
     =================== */
  
  /* H1 - Page Titles: 2.25rem (36px) on mobile */
  h1,
  .heading-h1,
  .text-4xl.sm\:text-5xl.lg\:text-6xl {
    font-size: 2.25rem !important;
    line-height: 1.15 !important;
  }
  
  /* H2 - Section Titles: 1.5rem (24px) on mobile */
  h2,
  .heading-h2,
  .text-2xl.sm\:text-3xl,
  .text-3xl.sm\:text-4xl {
    font-size: 1.5rem !important;
    line-height: 1.25 !important;
  }
  
  /* H3 - Subsection/Card Titles: 1.125rem (18px) on mobile */
  h3,
  .heading-h3,
  .text-xl,
  .text-2xl {
    font-size: 1.125rem !important;
    line-height: 1.3 !important;
  }
  
  /* H4 - Minor Headings: 0.9375rem (15px) on mobile */
  h4,
  .heading-h4 {
    font-size: 0.9375rem !important;
    line-height: 1.4 !important;
  }
  
  /* Body text - 1rem (16px) */
  body {
    font-size: 1rem !important;
    line-height: 1.7 !important;
  }
  
  p {
    font-size: 1rem !important;
    line-height: 1.7 !important;
  }
  
  /* Lead text (hero subtitles) - 1rem (16px) on mobile */
  .lead-text,
  .text-lg.sm\:text-xl,
  .text-xl.text-brand-blue\/70 {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }
  
  /* Standard text sizes */
  .text-lg {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }
  
  .text-base {
    font-size: 1rem !important;
    line-height: 1.7 !important;
  }
  
  .text-sm {
    font-size: 0.9375rem !important;
    line-height: 1.5 !important;
  }
  
  .text-xs {
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
  }
  
  /* Override large Tailwind text classes for H1 */
  .text-4xl,
  .text-5xl,
  .text-6xl,
  .text-7xl {
    font-size: 2.25rem !important;
    line-height: 1.15 !important;
  }
  
  .text-3xl {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
  }
  
  /* Section padding */
  section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  /* Container padding */
  .max-w-7xl,
  .max-w-6xl,
  .max-w-5xl,
  .max-w-4xl {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }
  
  /* Hero section fixes - padding to clear fixed header */
  .pt-32 {
    padding-top: 7rem !important;
  }
  
  .pt-24 {
    padding-top: 6rem !important;
  }
  
  .pb-20 {
    padding-bottom: 3rem !important;
  }
  
  /* Grid fixes - force single column on mobile */
  .grid.md\:grid-cols-2,
  .grid.md\:grid-cols-3,
  .grid.md\:grid-cols-4,
  .grid.md\:grid-cols-5 {
    grid-template-columns: 1fr !important;
  }
  
  /* Footer grid stacking */
  footer .grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  
  footer .md\:col-span-2 {
    grid-column: span 1 !important;
  }
  
  /* Footer text centering on mobile */
  footer nav,
  footer address,
  footer p {
    text-align: center;
  }
  
  footer .flex.items-center.gap-4 {
    justify-content: center;
  }
  
  footer ul {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  /* Card padding adjustments */
  .p-8 {
    padding: 1.5rem !important;
  }
  
  .p-6 {
    padding: 1.25rem !important;
  }
  
  /* Flex wrap fixes */
  .flex-wrap {
    gap: 0.75rem !important;
  }
  
  /* Button sizing */
  .px-8 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }
  
  .py-4 {
    padding-top: 0.875rem !important;
    padding-bottom: 0.875rem !important;
  }
  
  /* Stats section */
  .grid.grid-cols-2.md\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
  
  /* Gap adjustments */
  .gap-8 {
    gap: 1.5rem !important;
  }
  
  .gap-6 {
    gap: 1rem !important;
  }
  
  /* Margin adjustments */
  .mb-12 {
    margin-bottom: 2rem !important;
  }
  
  .mb-8 {
    margin-bottom: 1.5rem !important;
  }
  
  .mb-6 {
    margin-bottom: 1rem !important;
  }
  
  /* Space between items */
  .space-x-8 > * + * {
    margin-left: 1rem !important;
  }
  
  /* Icon sizes */
  .w-16.h-16 {
    width: 3rem !important;
    height: 3rem !important;
  }
  
  .w-14.h-14 {
    width: 2.5rem !important;
    height: 2.5rem !important;
  }
  
  .text-3xl.fa,
  .text-3xl.fas,
  .text-3xl.fab {
    font-size: 1.5rem !important;
  }
  
  /* CTA section */
  .py-24 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  /* Decorative elements - hide or reduce on mobile */
  .w-96.h-96,
  .w-\[600px\].h-\[600px\] {
    width: 150px !important;
    height: 150px !important;
  }
  
  .blur-3xl {
    filter: blur(40px) !important;
  }
}

/* Small mobile (320px-480px) */
@media (max-width: 480px) {
  /* Still readable headings on small screens */
  h1 {
    font-size: 1.875rem !important;
    line-height: 1.2 !important;
  }
  
  h2 {
    font-size: 1.5rem !important;
    line-height: 1.25 !important;
  }
  
  h3 {
    font-size: 1.25rem !important;
  }
  
  .text-4xl,
  .text-5xl,
  .text-6xl {
    font-size: 1.75rem !important;
    line-height: 1.15 !important;
  }
  
  .text-3xl {
    font-size: 1.5rem !important;
  }
  
  .text-2xl {
    font-size: 1.375rem !important;
  }
  
  /* Body text still readable */
  p, li, span, a {
    font-size: 0.9375rem !important;
    line-height: 1.6 !important;
  }
  
  .text-lg {
    font-size: 1rem !important;
  }
  
  /* Stack stats vertically on very small screens */
  .grid.grid-cols-2.md\:grid-cols-4 {
    grid-template-columns: 1fr !important;
  }
  
  /* Reduce padding further */
  .p-8 {
    padding: 1.25rem !important;
  }
  
  .p-6 {
    padding: 1rem !important;
  }
  
  .max-w-7xl,
  .max-w-6xl,
  .max-w-5xl,
  .max-w-4xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* More hero padding on small screens */
  .pt-32 {
    padding-top: 7.5rem !important;
  }
  
  .pt-24 {
    padding-top: 6.5rem !important;
  }
}

/* Tablet (768px-1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  /* 2-column grids on tablet */
  .grid.md\:grid-cols-3 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* Footer on tablet - 2 columns */
  footer .grid.md\:grid-cols-5 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  footer .md\:col-span-2 {
    grid-column: span 2 !important;
  }
}

/* Mobile menu improvements */
@media (max-width: 767px) {
  #mobile-menu {
    max-height: calc(100vh - 5rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  #mobile-menu a {
    padding: 0.875rem 0;
    font-size: 1.125rem;
    border-bottom: 1px solid var(--border-primary);
    color: var(--text-primary);
  }
  
  #mobile-menu a:last-child {
    border-bottom: none;
  }
  
  /* Fixed header height consistency */
  header nav {
    height: auto;
    min-height: 4rem;
  }
  
  header .h-20 {
    height: 4rem !important;
  }
}

/* Touch-friendly tap targets */
@media (hover: none) and (pointer: coarse) {
  a, button {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Increase tap target size for small buttons */
  .text-sm a,
  footer a {
    padding: 0.5rem;
    margin: -0.5rem;
  }
}

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Fix for iOS Safari address bar */
@supports (-webkit-touch-callout: none) {
  .min-h-screen {
    min-height: -webkit-fill-available;
  }
}

/* Smooth scrolling with reduced motion preference */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .text-brand-blue\/60,
  .text-brand-blue\/70,
  .text-brand-blue\/80 {
    color: var(--text-primary) !important;
    opacity: 1 !important;
  }
}

/* ================================
   ENHANCED MOBILE EXPERIENCE
   ================================ */

/* Sticky CTA Bar visibility */
#sticky-cta {
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
  background-color: var(--bg-surface);
}

#sticky-cta.visible {
  transform: translateY(0);
}

/* Safe area insets for notched devices (iPhone X+, etc.) */
.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

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

.safe-area-left {
  padding-left: env(safe-area-inset-left, 0);
}

.safe-area-right {
  padding-right: env(safe-area-inset-right, 0);
}

/* Mobile menu animations */
#mobile-menu {
  animation: slideDown 0.25s ease-out;
  transform-origin: top;
  background-color: var(--bg-surface);
}

#mobile-menu.hidden {
  animation: none;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px) scaleY(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

/* Mobile menu backdrop */
#mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}



#mobile-menu-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Improved touch targets for mobile */
@media (max-width: 767px) {
  /* Ensure all interactive elements are touch-friendly */
  a, button, input, select, textarea, [role="button"] {
    min-height: 44px;
    -webkit-tap-highlight-color: rgba(224, 94, 15, 0.1);
  }
  
  /* Mobile form inputs */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="url"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px !important; /* Prevents iOS zoom on focus */
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid var(--border-primary);
    background: var(--bg-surface);
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    color: var(--text-primary);
  }
  
  input:focus,
  textarea:focus,
  select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(224, 94, 15, 0.15);
    outline: none;
  }
  
  /* Mobile button sizing */
  .btn, 
  button[type="submit"],
  input[type="submit"] {
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    border-radius: 12px;
  }
  
  /* Mobile card adjustments */
  .card, 
  [class*="rounded-2xl"],
  [class*="rounded-3xl"] {
    border-radius: 16px;
  }
  
  /* Mobile spacing adjustments */
  .py-24 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  
  .py-20 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  
  .py-16 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  
  .mb-12 {
    margin-bottom: 2rem;
  }
  
  .mb-16 {
    margin-bottom: 2.5rem;
  }
  
  /* Mobile grid adjustments */
  .grid {
    gap: 1rem;
  }
  
  /* Mobile header height */
  header nav {
    height: 64px;
  }
  
  /* Mobile hero section */
  section[aria-labelledby="hero-heading"] {
    padding-top: 80px;
    min-height: auto;
  }
  
  /* Mobile footer adjustments */
  footer {
    text-align: center;
  }
  
  footer .grid {
    gap: 2rem;
  }
  
  /* Mobile scroll snap for carousels */
  .scroll-snap-x {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .scroll-snap-x::-webkit-scrollbar {
    display: none;
  }
  
  .scroll-snap-x > * {
    scroll-snap-align: start;
    flex-shrink: 0;
  }
}

/* Disable hover effects on touch devices */
@media (hover: none) {
  .hover\:scale-105:hover {
    transform: none;
  }
  
  .hover\:shadow-xl:hover {
    box-shadow: inherit;
  }
  
  /* Active state instead of hover for touch */
  .hover\:bg-brand-orange:active,
  .hover\:bg-orange-600:active {
    background-color: var(--accent-hover);
  }
  
  .hover\:text-brand-orange:active {
    color: var(--accent-primary);
  }
}

/* Improved scroll performance */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

/* GPU acceleration for animations */
#mobile-menu,
#sticky-cta,
.animate-slide-up,
.animate-fade-in {
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Mobile landscape mode */
@media (max-width: 767px) and (orientation: landscape) {
  /* Reduce heights in landscape */
  section[aria-labelledby="hero-heading"] {
    padding-top: 60px;
    padding-bottom: 30px;
    min-height: auto;
  }
  
  header nav {
    height: 56px;
  }
  
  /* Horizontal scroll for stats */
  .grid-cols-2.md\:grid-cols-4 {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
  }
  
  .grid-cols-2.md\:grid-cols-4 > * {
    flex: 0 0 auto;
    min-width: 120px;
  }
}

/* Pull-to-refresh visual indicator */
.pull-to-refresh-indicator {
  position: fixed;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  background: var(--accent-primary);
  color: white;
  border-radius: 20px;
  font-size: 14px;
  transition: top 0.3s ease;
  z-index: 1000;
}

.pull-to-refresh-indicator.visible {
  top: 100px;
}

/* Mobile-specific utility classes */
@media (max-width: 767px) {
  .mobile-full-width {
    width: 100%;
    max-width: 100%;
  }
  
  .mobile-center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  
  .mobile-stack {
    flex-direction: column;
  }
  
  .mobile-hide {
    display: none !important;
  }
  
  .mobile-show {
    display: block !important;
  }
  
  /* Better text readability on mobile */
  p, li {
    line-height: 1.7;
    font-size: 1rem;
  }
  
  /* Mobile-optimized line lengths */
  .max-w-prose {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Swipe gesture support styles */
.swipe-container {
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
}

/* Loading states for mobile */
.skeleton-loading {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-surface) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Mobile bottom navigation safety (for sticky elements) */
@media (max-width: 767px) {
  main {
    padding-bottom: 80px; /* Space for sticky CTA */
  }
  
  /* Extra padding for pages with forms */
  form {
    padding-bottom: 20px;
  }
}

/* Prevent content jump when keyboard appears on mobile */
@media (max-width: 767px) {
  html {
    height: 100%;
    overflow: hidden;
  }
  
  body {
    height: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}
