/* ===== CSS Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background: #f8fafc;
  transition: background 0.4s ease, color 0.4s ease;
  min-height: 100vh;
}

/* ===== Dark Mode Variables ===== */
:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-glass: rgba(255,255,255,0.6);
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --accent: #e94560;
  --accent-hover: #d63850;
  --accent-light: rgba(233,69,96,0.12);
  --border: #e5e7eb;
  --shadow: 0 8px 32px rgba(0,0,0,0.08);
  --shadow-hover: 0 16px 48px rgba(0,0,0,0.12);
  --nav-bg: rgba(255,255,255,0.85);
  --footer-bg: #1a1a2e;
  --footer-text: #cbd5e1;
  --section-alt: #f1f5f9;
}

body.dark-mode {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-glass: rgba(30,41,59,0.6);
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent: #f43f5e;
  --accent-hover: #e11d48;
  --accent-light: rgba(244,63,94,0.15);
  --border: #334155;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-hover: 0 16px 48px rgba(0,0,0,0.5);
  --nav-bg: rgba(15,23,42,0.85);
  --footer-bg: #020617;
  --footer-text: #94a3b8;
  --section-alt: #1e293b;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.4rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); margin-bottom: 0.75rem; }

p { margin-bottom: 1rem; color: var(--text-secondary); }
a { color: var(--accent); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent-hover); }

ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
li { margin-bottom: 0.5rem; }

img, svg { max-width: 100%; height: auto; display: block; }

/* ===== Layout ===== */
section {
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* ===== Header & Navigation ===== */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.4s, border-color 0.4s;
}

#site-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  gap: 1rem;
}

.logo-link {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  padding: 0;
  margin: 0;
}

.nav-list li a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.3s, color 0.3s;
}

.nav-list li a:hover,
.nav-list li a:focus-visible {
  background: var(--accent-light);
  color: var(--accent);
}

#dark-mode-toggle,
#mobile-nav-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
  flex-shrink: 0;
}

#dark-mode-toggle:hover,
#mobile-nav-toggle:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

#mobile-nav-toggle {
  display: none;
}

/* ===== Hero Section ===== */
.hero-section {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 70%, #1a1a2e 100%);
  margin-top: 0;
  max-width: 100%;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(233,69,96,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(99,102,241,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-banner-slider {
  position: relative;
  z-index: 1;
  max-width: 800px;
  width: 100%;
}

.slide {
  display: none;
  animation: fadeSlide 0.6s ease;
}

.slide.active {
  display: block;
}

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

.slide h1,
.slide h2 {
  color: #ffffff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  margin-bottom: 1rem;
}

.slide p {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cta-button {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  background: var(--accent);
  color: #fff !important;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
  box-shadow: 0 4px 20px rgba(233,69,96,0.35);
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(233,69,96,0.5);
  background: var(--accent-hover);
}

.slider-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 2;
  pointer-events: none;
}

.slider-prev,
.slider-next {
  pointer-events: auto;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, transform 0.3s;
}

.slider-prev:hover,
.slider-next:hover {
  background: rgba(255,255,255,0.3);
  transform: scale(1.1);
}

.slider-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  z-index: 2;
}

.slider-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.6);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
  padding: 0;
}

.slider-dots button[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.2);
}

.slider-dots button:hover {
  border-color: #fff;
}

/* ===== About Section ===== */
#about {
  scroll-margin-top: 80px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.about-grid article {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}

.about-grid article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.team-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.team-list li {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}

.team-list li:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ===== Products, Services, Solutions ===== */
.products-grid,
.services-grid,
.solutions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.products-grid article,
.services-grid article,
.solutions-grid article {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.products-grid article:hover,
.services-grid article:hover,
.solutions-grid article:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
  border-color: var(--accent);
}

.products-grid ul,
.services-grid ul {
  list-style: none;
  padding: 0;
}

.products-grid ul li,
.services-grid ul li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.products-grid ul li:last-child,
.services-grid ul li:last-child {
  border-bottom: none;
}

/* ===== Features ===== */
.features-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.features-list li {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.features-list li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.features-list li::before {
  content: '✓';
  color: var(--accent);
  font-weight: bold;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* ===== Testimonials ===== */
#testimonials blockquote {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

#testimonials blockquote:hover {
  transform: translateX(4px);
}

#testimonials blockquote p {
  font-style: italic;
  margin-bottom: 0;
  color: var(--text-primary);
}

/* ===== Case Studies ===== */
#case-studies article {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}

#case-studies article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

/* ===== Insights, Knowledge ===== */
#insights article,
#knowledge-center article {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 1.5rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.3s, box-shadow 0.3s;
}

#insights article:hover,
#knowledge-center article:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

#insights time {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ===== FAQ ===== */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.faq-item:hover {
  box-shadow: var(--shadow);
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s, color 0.3s;
}

.faq-question:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  transition: transform 0.3s;
  color: var(--text-muted);
}

.faq-question[aria-expanded="true"]::after {
  transform: rotate(45deg);
  color: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 1.5rem;
}

.faq-answer[aria-hidden="false"] {
  max-height: 300px;
  padding: 0 1.5rem 1.25rem;
}

.faq-answer p {
  margin-bottom: 0;
}

/* ===== How To ===== */
.howto-steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.howto-steps li {
  counter-increment: step;
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  padding-left: 3.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
}

.howto-steps li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.howto-steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1.25rem;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

/* ===== Contact ===== */
#contact address {
  font-style: normal;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  max-width: 500px;
}

#contact address p {
  margin-bottom: 0.5rem;
}

/* ===== Footer ===== */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 2.5rem 1.5rem;
  text-align: center;
  transition: background 0.4s;
}

.footer-nav {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-bottom: 1.5rem;
}

.footer-nav li a {
  color: var(--footer-text);
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-nav li a:hover {
  color: var(--accent);
}

footer p {
  margin-bottom: 0;
  font-size: 0.85rem;
  color: var(--footer-text);
}

/* ===== Scroll Animation ===== */
section {
  opacity: 0;
  transform: translateY(30px);
  animation: sectionFadeIn 0.8s ease forwards;
}

section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }
section:nth-child(4) { animation-delay: 0.3s; }
section:nth-child(5) { animation-delay: 0.4s; }
section:nth-child(6) { animation-delay: 0.5s; }
section:nth-child(7) { animation-delay: 0.6s; }
section:nth-child(8) { animation-delay: 0.7s; }
section:nth-child(9) { animation-delay: 0.8s; }

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

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border);
    gap: 0;
  }

  .nav-list.open {
    display: flex;
  }

  .nav-list li a {
    padding: 0.75rem 0.5rem;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
  }

  .nav-list li:last-child a {
    border-bottom: none;
  }

  #mobile-nav-toggle {
    display: flex;
  }

  .hero-section {
    min-height: 60vh;
    padding: 5rem 1rem 3rem;
  }

  .slide h1 { font-size: 1.8rem; }
  .slide h2 { font-size: 1.5rem; }
  .slide p { font-size: 0.95rem; }

  .slider-controls {
    padding: 0 0.5rem;
  }

  .slider-prev,
  .slider-next {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  section {
    padding: 2.5rem 1rem;
  }

  .about-grid,
  .products-grid,
  .services-grid,
  .solutions-grid {
    grid-template-columns: 1fr;
  }

  .team-list {
    grid-template-columns: 1fr;
  }

  .features-list {
    grid-template-columns: 1fr;
  }

  .howto-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-section {
    min-height: 50vh;
    padding: 4rem 0.75rem 2rem;
  }

  .slide h1 { font-size: 1.5rem; }
  .slide h2 { font-size: 1.3rem; }
  .slide p { font-size: 0.9rem; }

  .cta-button {
    padding: 0.7rem 2rem;
    font-size: 0.9rem;
  }

  .slider-dots {
    bottom: 1rem;
  }

  .slider-dots button {
    width: 10px;
    height: 10px;
  }
}

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

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

/* ===== Utility ===== */
.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;
}