:root {
  /* Enhanced color palette for better comfort */
  --bg: #f8fafc; /* softer off-white */
  --surface: #ffffff; /* cards, header */
  --text: #1e293b; /* softer dark text */
  --muted: #64748b; /* better contrast muted text */
  --ring: rgba(109, 172, 79, 0.4); /* enhanced focus ring */
  --border: #e2e8f0; /* softer borders */
  --brand: #6DAC4F; /* primary green */
  --brand-600: #5a9a46; /* darker green */
  --brand-50: #f0f9f0; /* very light green */
  --brand-100: #dcfce7; /* light green */
  --accent-red: #ef4444; /* softer red */
  
  /* Enhanced spacing system */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  
  /* Enhanced typography scale */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  
  /* Enhanced border radius */
  --radius-sm: 0.375rem;  /* 6px */
  --radius-md: 0.5rem;    /* 8px */
  --radius-lg: 0.75rem;   /* 12px */
  --radius-xl: 1rem;      /* 16px */
  --radius-2xl: 1.5rem;   /* 24px */
  
  /* Performance optimizations */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.15);
  
  /* Mobile-first responsive breakpoints */
  --mobile: 480px;
  --tablet: 768px;
  --desktop: 1024px;
  --large: 1200px;
  --xl: 1440px;
  
  /* Touch-friendly sizing */
  --touch-target: 44px;
  --touch-target-large: 48px;
}

/* Enhanced dark theme for better comfort */
[data-theme="dark"] {
  --bg: #0f172a; /* softer dark background */
  --surface: #1e293b; /* better contrast surface */
  --text: #f1f5f9; /* softer light text */
  --muted: #94a3b8; /* better contrast muted */
  --ring: rgba(109, 172, 79, 0.6); /* enhanced focus ring */
  --border: #334155; /* softer borders */
  --brand: #6DAC4F; /* primary green */
  --brand-600: #5a9a46; /* darker green */
  --brand-50: #0f1b0f; /* very dark green */
  --brand-100: #1a2e1a; /* dark green */
  --accent-red: #f87171; /* softer red */
}

/* Dark theme visual adjustments */
[data-theme="dark"] body {
  /* Swap to a softer, lighter pattern for dark backgrounds */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160' fill='none' stroke='%23a3b2c2' stroke-width='1.1' stroke-linecap='round' stroke-linejoin='round'><g opacity='0.16'><path d='M22 38l28-10 28 10-28 10-28-10z'/><path d='M50 48v13m12-8v10M38 43v10'/></g><g opacity='0.15'><rect x='18' y='98' width='34' height='22' rx='3'/><path d='M24 106h20M24 112h14'/></g><g opacity='0.14'><rect x='102' y='20' width='24' height='20' rx='3'/><path d='M106 26h16M106 32h10'/></g><g opacity='0.15'><circle cx='122' cy='116' r='10'/><path d='M114 130c4-4 16-4 20 0'/></g></svg>");
}

[data-theme="dark"] .nav a:hover,
[data-theme="dark"] .nav a.active {
  background: rgba(109, 172, 79, 0.12);
  color: var(--text);
}

[data-theme="dark"] .button:hover {
  background: #111823;
  border-color: #2b3645;
}

[data-theme="dark"] .card:hover {
  border-color: #2a3543;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

[data-theme="dark"] .footer-aurora {
  background: linear-gradient(90deg, #2a3440, #1a242e, #2a3440);
  filter: blur(4px);
  opacity: .45;
}

[data-theme="dark"] .hero::after {
  opacity: .18;
}

* { 
  box-sizing: border-box; 
  -webkit-tap-highlight-color: transparent;
}

html { 
  height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-touch-callout: none;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  /* Subtle, comfortable background pattern */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200' fill='none' stroke='%23cbd5e1' stroke-width='0.8' stroke-linecap='round' stroke-linejoin='round'><g opacity='0.15'><path d='M25 45l35-12 35 12-35 12-35-12z'/><path d='M60 60v16m15-10v12M45 55v12'/></g><g opacity='0.12'><rect x='20' y='120' width='42' height='28' rx='4'/><path d='M28 130h25M28 140h18'/></g><g opacity='0.10'><rect x='125' y='25' width='30' height='25' rx='4'/><path d='M130 32h20M130 40h12'/></g><g opacity='0.12'><circle cx='150' cy='145' r='12'/><path d='M140 160c5-5 20-5 25 0'/></g></svg>");
  background-size: 200px 200px;
  background-repeat: repeat;
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', 'Ubuntu', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  font-size: var(--text-base);
  line-height: 1.7; /* Better line height for readability */
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  /* Better mobile performance */
  -webkit-overflow-scrolling: touch;
  /* Prevent zoom on input focus */
  font-size: 16px;
}

/* Disable background canvas effects */
#bg-galaxy { display:none !important; }

.container { 
  width: 100%; 
  max-width: 1200px; 
  padding: 0 var(--space-lg); 
  margin: 0 auto; 
  /* Better mobile padding */
  padding-left: max(var(--space-lg), env(safe-area-inset-left));
  padding-right: max(var(--space-lg), env(safe-area-inset-right));
}

/* Mobile-first container adjustments */
@media (max-width: 480px) {
  .container {
    padding-left: max(var(--space-md), env(safe-area-inset-left));
    padding-right: max(var(--space-md), env(safe-area-inset-right));
  }
}

.site-header { 
  position: sticky; 
  top: 0; 
  z-index: 50; 
  background: var(--surface); 
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.nav-container { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  height: 72px; /* Increased height for better touch targets */
  padding: 0 var(--space-md);
}

.brand { 
  display: inline-flex; 
  align-items: center; 
  gap: var(--space-sm); 
  color: var(--text); 
  text-decoration: none;
  transition: var(--transition-fast);
}

.brand:hover {
  opacity: 0.8;
}

.brand-logo { 
  border: 0; 
  background: transparent; 
  padding: var(--space-xs); 
  display: inline-flex; 
  align-items: center; 
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  min-width: var(--touch-target);
  min-height: var(--touch-target);
}

.brand-logo:hover {
  background: var(--brand-50);
}

.brand-logo:active img { 
  transform: scale(1.05); 
}

.brand img { 
  width: 32px; 
  height: 32px; 
  transition: transform var(--transition-fast); 
}

.brand-name { 
  color: var(--text); 
  text-decoration: none; 
  font-weight: 600; 
  font-size: var(--text-lg); 
  letter-spacing: -0.025em; /* Tighter letter spacing for modern look */
}

/* Modal styles (logo preview) */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,0.6); display: none; align-items: center; justify-content: center; z-index: 1000; }
.modal-overlay[data-open="true"] { display: flex; }
.modal-content { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 16px; max-width: 90vw; max-height: 90vh; box-shadow: 0 10px 30px rgba(15,23,42,0.15); display:flex; align-items:center; justify-content:center; }
.modal-content img { width: 300px; height: auto; display:block; }
.nav ul { 
  display: flex; 
  gap: var(--space-sm); 
  align-items: center; 
  list-style: none; 
  margin: 0; 
  padding: 0; 
}

.nav a { 
  text-decoration: none; 
  color: var(--text); 
  opacity: 0.9; 
  padding: var(--space-sm) var(--space-md); 
  border-radius: var(--radius-md); 
  letter-spacing: -0.025em; 
  font-weight: 500; 
  font-size: var(--text-sm);
  transition: var(--transition-fast);
  min-height: var(--touch-target);
  display: flex;
  align-items: center;
}

.nav a:hover, .nav a.active { 
  background: var(--brand-50); 
  color: var(--brand-600); 
  opacity: 1;
  transform: translateY(-1px);
}
/* Dropdown menu styles */
.nav .caret { font-size:.8rem; opacity:.8; margin-left:4px; }
.has-submenu { position: relative; }
.has-submenu > a { white-space: nowrap; }
.submenu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; max-width: 360px; padding:8px; border:1px solid var(--border); border-radius:10px; background: var(--surface); box-shadow: 0 10px 24px rgba(0,0,0,0.12); display:none !important; z-index: 60; }
.submenu li { list-style: none; }
.submenu a { display:block; padding:8px 10px; border-radius:8px; color: var(--text); text-decoration:none; }
.submenu a:hover { background: #eef2f7; }
.submenu .divider { height:1px; margin:6px 0; background: var(--border); }
@media (hover:hover) and (pointer:fine){
  .has-submenu:hover > .submenu { display:block !important; }
}
.has-submenu:focus-within > .submenu { display:block !important; }
/* Prevent default purple visited color across the site */
a { color: var(--text); }
a:visited { color: var(--text); }
.nav a:visited { color: var(--text); }
.footer-grid a:visited { color: var(--text); }
.badge:visited { color: var(--text); }
.card a:visited { color: var(--text); }
.button, a.button, button.button, input[type="submit"].button { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  gap: var(--space-sm);
  border: 1px solid var(--border); 
  background: var(--surface); 
  color: var(--text); 
  padding: var(--space-sm) var(--space-lg); 
  border-radius: var(--radius-lg); 
  text-decoration: none; 
  transition: all var(--transition-fast); 
  min-height: var(--touch-target);
  min-width: var(--touch-target);
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: -0.025em;
  box-shadow: var(--shadow-sm);
  /* Better mobile performance */
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}
/* Only apply hover effects on devices that support hover */
@media (hover: hover) and (pointer: fine) {
  .button:hover { 
    transform: translateY(-2px); 
    background: var(--brand-50); 
    border-color: var(--brand);
    box-shadow: var(--shadow-md);
  }
}

/* Touch feedback for mobile */
@media (hover: none) and (pointer: coarse) {
  .button:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
  }
}
.button, .input, .card, .nav a { -webkit-tap-highlight-color: transparent; }
.button:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.button-primary, a.button-primary, button.button-primary, input[type="submit"].button-primary { background: var(--brand) !important; border-color: var(--brand) !important; color: #ffffff !important; font-weight:700; }
.button-primary:hover, a.button-primary:hover, button.button-primary:hover, input[type="submit"].button-primary:hover { background: var(--brand-600) !important; border-color: var(--brand-600) !important; }
.nav-toggle { display:none; background:transparent; border:0; gap:4px; }
.nav-toggle span { display:block; width:22px; height:2px; background: var(--text); }
@media (max-width:760px){ .nav-toggle{display:inline-flex; flex-direction:column;} .nav{ position:absolute; top:64px; right:0; background: var(--surface); border:1px solid var(--border); border-right:0; border-top-left-radius:10px; border-bottom-left-radius:10px; padding:10px; } .nav ul{flex-direction:column; align-items:stretch;} .nav[data-active="false"]{ display:none; } }

.site-main { min-height: calc(100vh - 64px - 200px); position: relative; z-index: 1; }
.tech-strip { display:none; }
.tech-strip .tech-icon { opacity:.9; filter: drop-shadow(0 0 6px rgba(0, 184, 255, 0.25)); transition: transform 200ms ease, opacity 200ms ease; }
.tech-strip .tech-icon:hover { transform: translateY(-1px) scale(1.03); opacity: 1; }
.tech-strip .rocket { animation: rocket-float 6s ease-in-out infinite; }
.tech-strip .satellite { animation: satellite-orbit 8s linear infinite; transform-origin: 50% 50%; }
.tech-strip .robot { animation: robot-walk 2s ease-in-out infinite; }
.tech-strip .tower { animation: tower-ping 1.8s ease-in-out infinite; }
.tech-strip .mobile .feed { animation: phone-scroll 4s linear infinite; }
.tech-strip .tower .waves .w1 { animation: wave-pulse 1.4s ease-in-out infinite; }
.tech-strip .tower .waves .w2 { animation: wave-pulse 1.8s ease-in-out infinite; animation-delay: .2s; }

@keyframes rocket-float {
  0%,100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-4px) rotate(2deg); }
}
@keyframes satellite-orbit {
  0% { transform: rotate(0deg) translateX(0); opacity: .9; }
  25% { transform: rotate(15deg); }
  50% { transform: rotate(0deg) translateX(2px); opacity: 1; }
  75% { transform: rotate(-15deg); }
  100% { transform: rotate(0deg) translateX(0); opacity: .9; }
}
@keyframes robot-walk {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(1.5px); }
  50% { transform: translateX(0); }
  75% { transform: translateX(-1.5px); }
}
@keyframes tower-ping {
  0%,100% { filter: drop-shadow(0 0 6px rgba(0, 184, 255, 0.25)); }
  50% { filter: drop-shadow(0 0 12px rgba(0, 255, 159, 0.5)); }
}
@keyframes phone-scroll {
  0% { transform: translateY(0); }
  45% { transform: translateY(-6px); }
  50% { transform: translateY(-6px); }
  95% { transform: translateY(0); }
  100% { transform: translateY(0); }
}
@keyframes wave-pulse {
  0%,100% { opacity: 0.25; }
  50% { opacity: 0.9; }
}
.hero { 
  padding: var(--space-3xl) 0 var(--space-2xl); 
  position: relative; 
  min-height: 60vh;
  display: flex;
  align-items: center;
}
.hero::after {
  content: '';
  position: absolute;
  right: 0;
  top: 10px;
  width: 320px;
  height: 320px;
  background: no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320' fill='none' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='80' cy='60' r='16'/><path d='M80 76 L80 120 M80 92 L60 114 M80 92 L100 114'/><rect x='60' y='114' width='40' height='26' rx='4'/><path d='M62 124 L98 124 M62 131 L98 131'/><rect x='180' y='140' width='84' height='54' rx='6'/><path d='M174 196 L270 196'/><path d='M220 122 l24 8 -24 8 -24 -8 24 -8 Z M220 122 v16'/></svg>");
  opacity: .28;
  pointer-events: none;
  display: none;
}
/* .hero::after disabled to prevent overlap */
.hero .title { 
  font-size: clamp(2rem, 6vw, 3rem); 
  line-height: 1.1; 
  margin: 0 0 var(--space-md); 
  font-weight: 800; 
  color: var(--text);
  letter-spacing: -0.025em;
}

.hero .subtitle { 
  color: var(--muted); 
  max-width: 720px; 
  font-size: var(--text-lg); 
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.hero-cta { 
  display: flex; 
  gap: var(--space-md); 
  margin-top: var(--space-xl);
  flex-wrap: wrap;
}
.hero-bg { display:none; }

.grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:16px; contain: layout; }
@media (max-width:980px){ .grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width:640px){ .grid{ grid-template-columns: 1fr; } }

.card { 
  background: var(--surface); 
  border: 1px solid var(--border); 
  border-radius: var(--radius-xl); 
  padding: var(--space-xl); 
  transform: translateZ(0); 
  transition: all var(--transition-normal); 
  will-change: transform;
  contain: layout style;
  box-shadow: var(--shadow-sm);
  /* Better mobile performance */
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* Only apply hover effects on devices that support hover */
@media (hover: hover) and (pointer: fine) {
  .card:hover { 
    transform: translateY(-4px); 
    border-color: var(--brand); 
    box-shadow: var(--shadow-xl); 
  }
}

/* Touch feedback for mobile */
@media (hover: none) and (pointer: coarse) {
  .card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
}

.card h3 { 
  margin: 0 0 var(--space-sm); 
  font-size: var(--text-lg); 
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.card p { 
  margin: 0; 
  color: var(--muted); 
  font-size: var(--text-sm);
  line-height: 1.6;
}

.section { padding: 28px 0 72px; }
.section h2 { margin:0 0 16px; font-size:1.5rem; }

.site-footer { border-top:1px solid var(--border); margin-top:48px; background: var(--surface); }
.footer-grid { display:grid; grid-template-columns:1.5fr 1fr 1fr; gap:16px; padding:28px 0; }
.footer-grid h4 { margin:0 0 10px; }
.footer-grid ul { list-style:none; padding:0; margin:0; display:grid; gap:8px; }
.footer-bottom { padding: 12px 0 24px; color: var(--muted); }

/* Footer visual glow */
.footer-aurora { position: relative; height: 6px; background: linear-gradient(90deg, #f8d7da, #e8f3e3, #f8d7da); filter: blur(4px); opacity: .4; }
.footer-grid { position: relative; }
.footer-social a { color: var(--text); opacity:.85; }
.footer-social a:hover { color: var(--brand); }
.newsletter { display:flex; gap:8px; margin-top:6px; }

/* Forms */
label { display:block; margin: 8px 0 6px; }
.input { 
  width: 100%; 
  padding: var(--space-md) var(--space-lg); 
  border-radius: var(--radius-lg); 
  border: 2px solid var(--border); 
  background: var(--surface); 
  color: var(--text); 
  transition: all var(--transition-fast); 
  font-size: var(--text-base); /* Prevents zoom on mobile */
  font-family: inherit;
  line-height: 1.5;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  /* Better touch targets */
  min-height: var(--touch-target);
  /* Better mobile performance */
  -webkit-tap-highlight-color: transparent;
}
.input:focus-visible { 
  outline: none; 
  border-color: var(--brand); 
  background: var(--surface); 
  box-shadow: 0 0 0 3px var(--ring);
}
.input::placeholder { color: color-mix(in oklab, var(--muted) 80%, transparent); }
textarea.input { min-height: 140px; resize: vertical; }
.form { display: grid; gap: 12px; }
.form .button { justify-self: start; margin-top: 4px; }

[data-reveal] { 
  opacity: 0; 
  transform: translateY(14px) scale(0.99); 
  transition: opacity var(--transition-slow), transform var(--transition-slow); 
  will-change: opacity, transform;
}
.reveal-in { 
  opacity: 1 !important; 
  transform: translateY(0) scale(1) !important; 
}

.badge { display:inline-flex; align-items:center; gap:8px; font-size:.82rem; padding:6px 10px; border:1px solid var(--border); border-radius:999px; background: var(--surface); }
.badge .dot { width:8px; height:8px; border-radius:50%; background: var(--brand); box-shadow: none; }

/* details/summary topic card */
.topic-card summary { list-style:none; }
.topic-card summary::-webkit-details-marker { display:none; }

/* subtle page fade */
@keyframes fadeIn { from { opacity:0; transform: translateY(6px); } to { opacity:1; transform: translateY(0); } }
.site-main, .site-header, .site-footer { animation: fadeIn .3s ease both; }

/* ===== ANDROID & MOBILE OPTIMIZATIONS ===== */

/* Viewport and touch optimizations */
html { 
  -webkit-text-size-adjust: 100%; 
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

body { 
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Android-specific input fixes */
input, textarea, select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 10px;
}

/* Better touch targets for mobile */
.button, .nav a, .brand-logo {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Enhanced mobile navigation */
@media (max-width: 760px) {
  .nav-container {
    padding: 0 16px;
  }
  
  .nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
  }
  
  .nav[data-active="true"] {
    transform: translateY(0);
  }
  
  .nav ul {
    flex-direction: column;
    gap: 8px;
  }
  
  .nav a {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 1rem;
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  
  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
  }
  
  .nav-toggle span {
    width: 24px;
    height: 3px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  
  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
}

/* Mobile-first container adjustments */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }
  
  .hero {
    padding: 40px 0 20px;
  }
  
  .hero .title {
    font-size: 1.75rem;
    line-height: 1.2;
  }
  
  .hero .subtitle {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  
  .hero-cta {
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
  }
  
  .hero-cta .button {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 1rem;
  }
}

/* Card optimizations for mobile */
@media (max-width: 640px) {
  .card {
    padding: 16px;
    margin-bottom: 12px;
  }
  
  .card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }
  
  .card p {
    font-size: 0.9rem;
    line-height: 1.5;
  }
}

/* Form optimizations for mobile */
@media (max-width: 640px) {
  .form {
    gap: 16px;
  }
  
  .input {
    padding: 14px 16px;
    font-size: 16px; /* Prevents zoom on iOS */
    border-radius: 12px;
  }
  
  .form .button {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    margin-top: 8px;
  }
}

/* Footer mobile optimization */
@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 0;
  }
  
  .footer-grid h4 {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }
  
  .footer-grid ul {
    gap: 10px;
  }
  
  .footer-grid a {
    padding: 8px 0;
    font-size: 0.95rem;
  }
}

/* Modal mobile optimization */
@media (max-width: 640px) {
  .modal-content {
    margin: 20px;
    padding: 20px;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
  }
  
  .modal-content img {
    width: 100%;
    max-width: 280px;
    height: auto;
  }
}

/* Android Chrome specific fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .button, .input {
    -webkit-appearance: none;
    border-radius: 10px;
  }
  
  .input:focus {
    -webkit-appearance: none;
    outline: none;
  }
}

/* Smooth scrolling for better mobile experience */
html {
  scroll-behavior: smooth;
}

/* Prevent horizontal scroll on mobile */
body {
  overflow-x: hidden;
  width: 100%;
}

/* Better text selection for mobile */
p, span, div, h1, h2, h3, h4, h5, h6 {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Loading states for better perceived performance */
.button:active {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* Enhanced focus states for accessibility */
.button:focus-visible,
.input:focus-visible,
.nav a:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

/* ===== COMFORT ENHANCEMENTS ===== */

/* Better mobile navigation */
@media (max-width: 768px) {
  .nav-container {
    padding: 0 var(--space-md);
  }
  
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-xl);
    transform: translateY(-100%);
    transition: transform var(--transition-normal);
    will-change: transform;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Better mobile performance */
    -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
  }
  
  .nav[data-active="true"] {
    transform: translateY(0);
  }
  
  .nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
  }
  
  .nav a {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    min-height: var(--touch-target-large);
    display: flex;
    align-items: center;
    transition: all var(--transition-fast);
    /* Better touch targets */
    -webkit-tap-highlight-color: transparent;
  }
  
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    min-width: var(--touch-target);
    min-height: var(--touch-target);
  }
  
  .nav-toggle:hover {
    background: var(--brand-50);
  }
  
  .nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--text);
    border-radius: 2px;
    transition: all var(--transition-normal);
    transform-origin: center;
  }
  
  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
}

/* Better mobile forms */
@media (max-width: 640px) {
  .form {
    gap: var(--space-lg);
  }
  
  .form .button {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-base);
    margin-top: var(--space-sm);
  }
  
  .input {
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-base);
    border-radius: var(--radius-lg);
  }
  
  textarea.input {
    min-height: 120px;
    resize: vertical;
  }
}

/* Better mobile cards */
@media (max-width: 640px) {
  .card {
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    border-radius: var(--radius-xl);
  }
  
  .card h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-sm);
  }
  
  .card p {
    font-size: var(--text-sm);
    line-height: 1.6;
  }
}

/* Better mobile hero */
@media (max-width: 640px) {
  .hero {
    padding: var(--space-2xl) 0 var(--space-xl);
    min-height: 50vh;
  }
  
  .hero .title {
    font-size: var(--text-3xl);
    line-height: 1.2;
    margin-bottom: var(--space-md);
  }
  
  .hero .subtitle {
    font-size: var(--text-base);
    line-height: 1.6;
    margin-bottom: var(--space-lg);
  }
  
  .hero-cta {
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-xl);
  }
  
  .hero-cta .button {
    width: 100%;
    justify-content: center;
    padding: var(--space-md) var(--space-lg);
    font-size: var(--text-base);
  }
}

/* Better mobile grid */
@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* Better mobile footer */
@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    padding: var(--space-xl) 0;
  }
  
  .footer-grid h4 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-md);
  }
  
  .footer-grid ul {
    gap: var(--space-sm);
  }
}

/* ===== DESKTOP ENHANCEMENTS ===== */

/* Better desktop spacing */
@media (min-width: 1024px) {
  .container {
    max-width: 1200px;
    padding: 0 var(--space-2xl);
  }
  
  .hero {
    padding: var(--space-3xl) 0 var(--space-2xl);
  }
  
  .section {
    padding: var(--space-3xl) 0;
  }
  
  .card {
    padding: var(--space-2xl);
  }
}

/* Better desktop typography */
@media (min-width: 1024px) {
  .hero .title {
    font-size: var(--text-4xl);
  }
  
  .hero .subtitle {
    font-size: var(--text-xl);
  }
  
  .section h2 {
    font-size: var(--text-3xl);
  }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */

/* Better focus indicators */
*:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Better contrast for better readability */
@media (prefers-contrast: high) {
  :root {
    --border: #000000;
    --text: #000000;
    --muted: #333333;
  }
  
  [data-theme="dark"] {
    --border: #ffffff;
    --text: #ffffff;
    --muted: #cccccc;
  }
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Better spacing for mobile content */
@media (max-width: 640px) {
  .section {
    padding: 24px 0 48px;
  }
  
  .section h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
  }
}

/* ===== HELP PAGE MOBILE OPTIMIZATIONS ===== */

/* Help page specific styles */
.help-title {
  font-size: 1.8rem !important;
  text-align: center;
  margin-bottom: 32px;
  color: var(--text);
}

.help-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

/* Mobile-first: Stack vertically on small screens */
@media (max-width: 768px) {
  .help-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Help form section */
.help-form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.help-form-section h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--text);
  font-weight: 600;
}

.help-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 500;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.form-group .input {
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 16px; /* Prevents zoom on mobile */
  transition: all 0.2s ease;
  background: #ffffff;
}

.form-group .input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(109, 172, 79, 0.1);
  outline: none;
}

.form-group textarea.input {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

.help-submit {
  width: 100%;
  padding: 16px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  margin-top: 8px;
  transition: all 0.2s ease;
}

.help-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(109, 172, 79, 0.3);
}

/* Success and error messages */
.success-message {
  background: #f0f9ff;
  border: 1px solid #0ea5e9;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.success-message p {
  color: #0369a1;
  margin: 0;
  font-weight: 500;
}

.error-message {
  background: #fef2f2;
  border: 1px solid #ef4444;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.error-message p {
  color: #dc2626;
  margin: 0;
  font-weight: 500;
}

/* FAQ Section */
.help-faq-section h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--text);
  font-weight: 600;
}

.faq-item {
  margin-bottom: 12px;
}

.faq-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-card:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(109, 172, 79, 0.1);
}

.faq-card summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s ease;
  min-height: 56px; /* Better touch target */
}

.faq-card summary:hover {
  background: #f8fafc;
}

.faq-card summary::-webkit-details-marker {
  display: none;
}

.faq-question {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.4;
}

.faq-icon {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--brand);
  transition: transform 0.2s ease;
  margin-left: 12px;
  min-width: 20px;
  text-align: center;
}

.faq-card[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 20px 20px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.faq-answer p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

/* Mobile optimizations for help page */
@media (max-width: 640px) {
  .help-title {
    font-size: 1.5rem !important;
    margin-bottom: 24px;
  }
  
  .help-form-section {
    padding: 20px;
    border-radius: 12px;
  }
  
  .help-form-section h2 {
    font-size: 1.2rem;
    margin-bottom: 16px;
  }
  
  .help-form {
    gap: 16px;
  }
  
  .form-group .input {
    padding: 12px 14px;
    font-size: 16px;
  }
  
  .form-group textarea.input {
    min-height: 100px;
  }
  
  .help-submit {
    padding: 14px 20px;
    font-size: 0.95rem;
  }
  
  .faq-card summary {
    padding: 14px 16px;
    min-height: 52px;
  }
  
  .faq-question {
    font-size: 0.9rem;
  }
  
  .faq-answer {
    padding: 0 16px 16px;
  }
  
  .faq-answer p {
    font-size: 0.85rem;
    margin-top: 12px;
  }
  
  .success-message,
  .error-message {
    padding: 12px;
    margin-bottom: 16px;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .help-content {
    gap: 20px;
  }
  
  .help-form-section {
    padding: 16px;
  }
  
  .help-form {
    gap: 14px;
  }
  
  .form-group .input {
    padding: 12px;
  }
  
  .help-submit {
    padding: 12px 16px;
  }
}

/* ===== FOOTER MOBILE OPTIMIZATIONS ===== */

/* Enhanced footer styles */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 48px;
  position: relative;
}

.footer-aurora {
  position: relative;
  height: 6px;
  background: linear-gradient(90deg, #f8d7da, #e8f3e3, #f8d7da);
  filter: blur(4px);
  opacity: 0.4;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 32px;
  padding: 40px 0 32px;
  align-items: start;
}

/* Brand section */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-brand .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
}

.footer-brand .brand img {
  transition: transform 0.2s ease;
}

.footer-brand .brand:hover img {
  transform: scale(1.05);
}

.footer-description {
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.95rem;
  margin: 0;
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.footer-social a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
}

.footer-social a:hover {
  color: var(--brand);
  border-color: var(--brand);
  background: rgba(109, 172, 79, 0.05);
}

/* Footer sections */
.footer-section h4 {
  margin: 0 0 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.footer-section h5 {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-section ul li a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color 0.2s ease;
  display: block;
}

.footer-section ul li a:hover {
  color: var(--brand);
}

/* Contact section */
.footer-contact {
  margin-bottom: 20px;
}

.footer-contact p {
  margin: 0 0 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-contact strong {
  color: var(--text);
  font-weight: 600;
}

.footer-contact a {
  color: var(--brand);
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

/* Newsletter section */
.newsletter-section {
  margin-top: 20px;
}

.newsletter {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

.newsletter-input {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #ffffff;
  transition: all 0.2s ease;
}

.newsletter-input:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 2px rgba(109, 172, 79, 0.1);
}

.newsletter-btn {
  padding: 12px 16px;
  font-size: 0.9rem;
  border-radius: 8px;
  font-weight: 600;
}

.newsletter-disclaimer {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

/* Footer bottom */
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom-content small {
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
  color: var(--brand);
}

/* Mobile optimizations for footer */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 32px 0 24px;
  }
  
  .footer-brand {
    text-align: center;
    order: 1;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  .footer-section {
    text-align: center;
  }
  
  .footer-section ul {
    align-items: center;
  }
  
  .footer-contact {
    text-align: center;
  }
  
  .newsletter {
    max-width: 300px;
    margin: 0 auto;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  
  .footer-bottom-links {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    gap: 20px;
    padding: 24px 0 20px;
  }
  
  .footer-brand .brand {
    font-size: 1rem;
  }
  
  .footer-description {
    font-size: 0.9rem;
  }
  
  .footer-social {
    gap: 12px;
  }
  
  .footer-social a {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
  
  .footer-section h4 {
    font-size: 0.95rem;
    margin-bottom: 12px;
  }
  
  .footer-section ul li a {
    font-size: 0.85rem;
  }
  
  .footer-contact p {
    font-size: 0.85rem;
  }
  
  .newsletter-input {
    padding: 10px 12px;
    font-size: 16px; /* Prevents zoom on mobile */
  }
  
  .newsletter-btn {
    padding: 10px 14px;
    font-size: 0.85rem;
  }
  
  .newsletter-disclaimer {
    font-size: 0.75rem;
  }
  
  .footer-bottom-content small {
    font-size: 0.8rem;
  }
  
  .footer-bottom-links a {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    gap: 16px;
    padding: 20px 0 16px;
  }
  
  .footer-social {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .footer-social a {
    padding: 5px 8px;
    font-size: 0.8rem;
  }
  
  .newsletter {
    max-width: 100%;
  }
  
  .footer-bottom-links {
    gap: 16px;
  }
}

