/* Base reset and modern design tokens */
* { box-sizing: border-box; }
html:focus-within { scroll-behavior: smooth; }
body {
  --bg: #f7f8fb;
  --elevated: #ffffff;
  --text: #1a1d29;
  --muted: #6b7280;
  --primary: #4f46e5; /* indigo-600 */
  --primary-2: #7c3aed; /* violet-600 for gradients */
  --accent: #22d3ee; /* cyan-400 */
  --accent-2: #10b981; /* emerald */
  --border-soft: rgba(2,6,23,0.08);
  --shadow-soft: 0 6px 20px rgba(2, 6, 23, 0.08);
  --shadow-strong: 0 20px 45px rgba(2, 6, 23, 0.15);
  /* Light theme header: nearly solid white */
  --nav-bg: #ffffff;
  --nav-ink: #0b1026;
  --nav-border: rgba(2,6,23,0.08);
  --nav-border-scrolled: rgba(2,6,23,0.12);
  --nav-ink: #0b1026; /* header text color */
  --nav-blur: saturate(180%) blur(12px);
  --card-shadow: 0 10px 30px rgba(2, 6, 23, 0.07);
    /* Avoid backdrop blur to keep header text ultra crisp on Windows */
    --nav-blur: none;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --space: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --container: 1200px;
  --container-narrow: 980px;
  letter-spacing: 0.1px;
  --hero-grad: radial-gradient(1200px 600px at 10% -10%, rgba(124,58,237,0.35), transparent 55%),
               radial-gradient(900px 500px at 90% 10%, rgba(34,211,238,0.25), transparent 60%),
               linear-gradient(135deg, #0f172a 0%, #1d2443 50%, #0b1026 100%);
  font-family: 'Poppins', Arial, sans-serif;
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(1200px 600px at 0% 0%, rgba(79,70,229,0.06), transparent 60%),
              radial-gradient(900px 500px at 100% 20%, rgba(34,211,238,0.05), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

/* Dark theme */
html[data-theme="dark"] body {
  /* Lighten overall darkness a bit */
  --bg: #121a33;
  --elevated: #16203e;
  --text: #e5e7eb;
  --muted: #9aa3b2;
  --primary: #8b5cf6;
  --primary-2: #22d3ee;
  --accent: #34d399;
  --accent-2: #60a5fa;
  --border-soft: rgba(255,255,255,0.08);
  --shadow-soft: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-strong: 0 20px 45px rgba(0,0,0,0.45);
  /* Softer header tint on dark theme (slightly lighter) */
  --nav-bg: rgba(255, 255, 255, 0.14);
  --nav-border: rgba(255,255,255,0.08);
  --nav-border-scrolled: rgba(255,255,255,0.12);
  --nav-ink: #e5e7eb;
  --card-shadow: 0 12px 40px rgba(0,0,0,0.35);
  --ring: 2px solid rgba(139, 92, 246, 0.35);
  --hero-grad: radial-gradient(1200px 600px at 10% -10%, rgba(139,92,246,0.28), transparent 55%),
               radial-gradient(900px 500px at 90% 10%, rgba(34,211,238,0.2), transparent 60%),
               linear-gradient(135deg, #121a33 0%, #182046 50%, #0e142b 100%);
}

header {
  position: sticky;
  top: 0;
  z-index: 1000;
  color: var(--nav-ink);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1.25rem;
  min-height: 80px;
  max-width: var(--container);
  margin: 0 auto;
  position: relative;
  background: var(--nav-bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  border: 1px solid var(--nav-border);
  border-radius: var(--radius);
    /* Remove transforms to avoid text softening on some GPUs */
    transform: none;
  box-shadow: var(--shadow-strong);
}
header.is-scrolled .navbar { border-color: var(--nav-border-scrolled); }

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.3rem;
  font-weight: 700;
}
.logo-img { height: 64px; width: auto; border-radius: 12px; object-fit: contain; }
.logo-brand { letter-spacing: 0.3px; }
.logo-highlight { color: var(--accent); }

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  color: var(--nav-ink);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  position: relative;
  transition: color 0.2s ease;
}
.nav-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 10px; right: 10px; bottom: 4px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  opacity: 0;
  transform: scaleX(0.6);
  transition: opacity .25s, transform .25s;
  border-radius: 2px;
}

.nav-links a.active,
.nav-links a:hover,
.nav-links a:focus {
  color: var(--nav-ink);
}
.nav-links a:hover::after,
.nav-links a:focus::after,
.nav-links a.active::after { opacity: 1; transform: scaleX(1); }

/* Modern dropdown styles */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 2.5rem;
  left: 0;
  background: var(--elevated);
  color: var(--text);
  min-width: 200px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
  border-radius: var(--radius);
  z-index: 100;
  padding: 0.75rem 0;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
.dropdown-menu li a {
  color: var(--text);
  padding: 0.5rem 1rem;
  display: block;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, color 0.2s ease;
}
.dropdown-menu li a:hover {
  background: var(--primary);
  color: #fff;
}

.dropdown-menu li a {
  color: var(--text);
  padding: 0.5rem 1rem;
  display: block;
  border-radius: 0;
  background: none;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--nav-ink);
  font-size: 2rem;
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  background: var(--hero-grad);
  color: #fff;
  padding: 5rem 2rem 3rem 2rem;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0.35) 0%, rgba(15,23,42,0.55) 40%, rgba(15,23,42,0.75) 100%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute; inset: -20% -10% auto -10%;
  height: 80%;
  background: radial-gradient(600px 300px at 50% 0%, rgba(255,255,255,0.08), transparent 60%);
  pointer-events: none;
  animation: floatGlow 12s ease-in-out infinite alternate;
}
@keyframes floatGlow {
  from { transform: translateY(0) rotate(0deg); filter: hue-rotate(0deg); }
  to   { transform: translateY(10px) rotate(2deg); filter: hue-rotate(20deg); }
}

.hero-inner { max-width: var(--container); margin: 0 auto; position: relative; z-index: 2; }
.hero-content { max-width: 900px; margin: 0 auto 1rem; }
.eyebrow { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 999px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18); font-size: .85rem; letter-spacing: .2px; }
.hero-content h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
  margin: 1rem auto 0.75rem;
  line-height: 1.1;
  text-wrap: balance;
}

.hero-content p {
  font-size: clamp(1rem, 1.2vw + .75rem, 1.3rem);
  margin: 0 auto 2rem;
  color: #e5e7eb;
  max-width: 800px;
}

.cta-btn, .btn-primary {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent), var(--primary));
  color: #0b1026;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 1rem;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  cursor: pointer;
}

.cta-btn:hover, .btn-primary:hover,
.cta-btn:focus, .btn-primary:focus {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(79,70,229,0.25);
  filter: saturate(1.1);
}
.cta-btn:focus-visible, .btn-primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero-slider {
  position: relative;
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 16/6;
  margin: 2rem auto 0 auto;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
  min-height: 350px; 
}

.hero-slider img {
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s, transform 0.3s;
  border-radius: var(--radius-lg);
  z-index: 0;
  min-width: 100%;
  min-height: 100%;
  max-width: none;
  max-height: none;
}

.hero-slider img.active {
  opacity: 1;
  z-index: 1;
  animation: fadeIn 1s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hero-slider img:hover {
  transform: scale(1.05);
}

@supports not (aspect-ratio: 16/7) {
  .hero-slider {
    height: 300px;
  }
}

/* Hero caption overlay */
.hero-caption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.85);
  color: #0b1026;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  z-index: 2;
}
html[data-theme="dark"] .hero-caption {
  background: rgba(15,23,42,0.7);
  color: #e5e7eb;
}

.section {
  padding: 3rem 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}
.container.narrow {
  max-width: var(--container-narrow);
}

/* Consistent section headings */
.section h2 {
  font-size: clamp(1.5rem, 1.2vw + 1rem, 2rem);
  line-height: 1.2;
  margin: 0 0 1rem 0;
  text-wrap: balance;
}

.services h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.service-cards {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.service-card {
  position: relative;
  background: var(--elevated);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.5rem;
  flex: 1 1 250px;
  max-width: 320px;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
  border: 1px solid var(--border-soft);
}
.service-card::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: calc(var(--radius) + 2px);
  padding: 1px;
  background: linear-gradient(135deg, rgba(34,211,238,0.5), rgba(124,58,237,0.5));
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-strong); }

.service-card img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 1rem;
  background: #e3e6f3;
  border: 1px solid var(--border-soft);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  transition: transform 0.2s;
}

.service-card img:hover {
  transform: scale(1.04);
}

.service-card h3 {
  margin: 0.5rem 0 0.5rem 0;
  font-size: 1.1rem;
}
.service-card h3 a { color: var(--text); text-decoration: none; }
.service-card h3 a:hover { text-decoration: underline; }

footer {
  background: linear-gradient(180deg, rgba(15,23,42,1) 0%, rgba(15,23,42,0.9) 100%);
  color: #fff;
  text-align: center;
  padding: 2.5rem 0 1rem 0;
}

.footer-top {
  margin-bottom: 1rem;
  padding: 0 1.5rem;
}

.footer-links h2 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links ul li {
  margin-bottom: 0.35rem;
}

.footer-links ul li a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s;
}

/* Labeled lists: side heading + content (About Us) */
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.feature-list li {
  background: var(--elevated);
  border: 1px solid var(--nav-border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.kv-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.kv-list li {
  display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: 0.75rem; align-items: start;
  background: var(--elevated);
  border: 1px solid var(--nav-border);
  border-radius: 12px; padding: 0.85rem 1rem;
}
.kv-list .label { font-weight: 700; color: var(--primary); white-space: nowrap; }
.kv-list .content { color: var(--text); }

/* Optional colorful label text */
.label-gradient { background: linear-gradient(90deg, var(--accent), var(--primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.footer-links ul li a:hover {
  color: var(--accent);
}

.copyright {
  font-size: 0.95rem;
  margin-top: 1rem;
  opacity: 0.9;
}

.copyright a {
  color: var(--accent);
  text-decoration: none;
}

/* Responsive Styles */
@media (max-width: 900px) {
  .service-cards {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
  }
  .hero-slider {
    max-width: 100%;
    aspect-ratio: 16/8;
    min-height: 220px;
  }
  .contact-flex {
    flex-direction: column;
    gap: 2rem;
    align-items: stretch;
  }
}

@media (max-width: 768px) {
  .logo-img { height: 48px; }
  .navbar {
    flex-wrap: wrap;
    padding: 1rem;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    background: var(--elevated);
    position: absolute;
    top: 60px;
    right: 0;
    width: min(80vw, 260px);
    box-shadow: var(--shadow-soft);
    z-index: 10;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    padding: 0.25rem;
  }
  .nav-links.active {
    display: flex;
  }
  .hamburger {
    display: block;
  }
  .dropdown-menu {
    position: static;
    min-width: 100%;
    box-shadow: none;
    border-radius: 0;
    background: var(--elevated);
    color: var(--nav-ink);
    padding: 0.5rem 0;
  }
  .dropdown-menu li a {
    color: var(--nav-ink);
    padding-left: 2rem;
  }
}

@media (max-width: 600px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }
  .section {
    padding: 2rem 1rem;
  }
  .service-card {
    padding: 1rem;
  }
  .container {
    padding: 0 0.5rem;
  }
  .hero-slider {
    aspect-ratio: 16/12;
    min-height: 140px;
  }
  .hero-caption {
    font-size: 0.8rem;
  }
}

/* Contact Page Styles */
.contact-flex {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  margin-top: 2rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 400px;
  min-width: 260px;
  background: #fff;
  /* Ensure strong contrast on light form card even in dark theme */
  color: #0b1026;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.contact-form label {
  font-weight: 500;
  color: #0b1026;
}

.contact-form input,
.contact-form textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  color: #0b1026;
  background: #fff;
}

/* Improve placeholder readability without being too bright */
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #6b7280; }

.contact-form input:focus,
.contact-form textarea:focus {
  outline: var(--ring);
  border-color: var(--primary);
}

#form-status {
  margin-top: 1rem;
  color: #1a237e;
  font-weight: 600;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-width: 260px;
}

.contact-card {
  background: #f5f5f5;
  border-radius: 10px;
  padding: 1.2rem 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  /* Dark text on light card to avoid washed-out look in dark mode */
  color: #0b1026;
}

.contact-card h3 {
  margin-top: 0;
  color: #1a237e;
  font-size: 1.1rem;
}

.contact-card a {
  color: #1a237e;
  text-decoration: underline;
}

/* Accessibility: focus style for nav links and buttons */
.nav-links a:focus,
.cta-btn:focus {
  outline: var(--ring);
  outline-offset: 2px;
}

/* Dropdown open class for mobile JS toggle */
.dropdown-menu {
  display: none;
}
.dropdown.open .dropdown-menu {
  display: block !important;
}

/* End mobile dropdown helpers */

/* Floating theme toggle */
.theme-toggle {
  position: fixed;
  right: 18px;
  bottom: 138px;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--elevated);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  color: var(--text);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
  z-index: 1100;
}
.theme-toggle:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(2,6,23,0.15); }
.theme-toggle svg { width: 22px; height: 22px; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.reveal-visible { opacity: 1; transform: translateY(0); }

/* Status/Success card (e.g., mail-success) */
.status-card {
  background: var(--elevated);
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 2rem;
  max-width: 560px;
  margin: 2rem auto;
  text-align: center;
}
.status-card h1 { margin-top: 0; }
.status-card .btn-primary { margin-top: 1rem; }

/* Scroll progress bar */
.scroll-progress { position: fixed; left: 0; top: 0; width: 100%; height: 3px; background: rgba(255,255,255,0.06); z-index: 1200; }
.scroll-progress span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--primary)); box-shadow: 0 2px 8px rgba(79,70,229,0.35); }

/* Back to top */
.back-to-top {
  position: fixed; right: 18px; bottom: 78px; width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--elevated); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; box-shadow: var(--card-shadow);
  color: var(--text); cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, opacity .2s; z-index: 1100;
  opacity: 0; pointer-events: none;
}
.back-to-top.show { opacity: 1; pointer-events: auto; }
.back-to-top:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(2,6,23,0.15); }
.back-to-top svg { width: 22px; height: 22px; }