/* ========== CSS Variables & Reset ========== */
:root {
  --primary: #1a1a2e;
  --primary-light: #16213e;
  --accent: #e94560;
  --accent-hover: #ff6b81;
  --gold: #f5a623;
  --bg: #0f0f1a;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(255, 255, 255, 0.08);
  --text: #eaeaea;
  --text-muted: #a0a0b0;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --max-width: 1200px;
  --header-h: 64px;
  --hero-gradient: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 40%, #16213e 70%, #0f3460 100%);
}

/* Light mode overrides */
@media (prefers-color-scheme: light) {
  :root {
    --primary: #ffffff;
    --primary-light: #f5f7fa;
    --bg: #f0f2f5;
    --bg-card: rgba(0, 0, 0, 0.04);
    --bg-glass: rgba(255, 255, 255, 0.7);
    --text: #1a1a2e;
    --text-muted: #555;
    --border: rgba(0, 0, 0, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --hero-gradient: linear-gradient(135deg, #e8ecf1 0%, #d4dae3 40%, #c5cdd9 70%, #b8c2d0 100%);
  }
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

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

ul, ol {
  list-style: none;
}

/* ========== Scroll Animations (Intersection Observer fallback) ========== */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========== Header & Navigation ========== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  transition: background var(--transition), backdrop-filter var(--transition);
}

header nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header nav > a {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

header nav > a:hover {
  opacity: 0.85;
}

header nav ul {
  display: flex;
  gap: 8px;
  align-items: center;
}

header nav ul li a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
  position: relative;
}

header nav ul li a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: transform var(--transition);
}

header nav ul li a:hover {
  color: var(--text);
  background: var(--bg-card);
}

header nav ul li a:hover::after {
  transform: translateX(-50%) scaleX(1);
}

/* Mobile menu toggle (hamburger) */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 2px;
  transition: all var(--transition);
}

/* ========== Main Content Sections ========== */
main {
  padding-top: var(--header-h);
}

section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
}

section h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--text);
  position: relative;
  display: inline-block;
}

section h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 3px;
  margin-top: 8px;
}

section h3 {
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  color: var(--text);
}

section p {
  color: var(--text-muted);
  max-width: 720px;
  margin-bottom: 1rem;
}

/* ========== Hero Section ========== */
#hero {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--hero-gradient);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  border-radius: 0 0 40px 40px;
  margin-bottom: -40px;
  position: relative;
  overflow: hidden;
}

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

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(233, 69, 96, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(245, 166, 35, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

#hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, var(--gold) 60%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

#hero p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

#hero a {
  display: inline-block;
  padding: 14px 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 20px rgba(233, 69, 96, 0.4);
  transition: all var(--transition);
  position: relative;
  z-index: 1;
}

#hero a:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(233, 69, 96, 0.5);
  background: var(--accent-hover);
}

/* ========== About / Company ========== */
#about, #company {
  background: var(--bg-card);
  border-radius: var(--radius);
  margin: 0 24px 40px;
  padding: 60px 40px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ========== Cards (Products, Services, etc.) ========== */
#products, #services, #solutions, #industries, #advantages, #testimonials, #case-studies, #insights, #faq, #howto, #contact {
  background: var(--bg-card);
  border-radius: var(--radius);
  margin: 0 24px 40px;
  padding: 60px 40px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

#products article,
#case-studies article,
#insights article {
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  padding: 28px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  transition: all var(--transition);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#products article:hover,
#case-studies article:hover,
#insights article:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  border-color: var(--accent);
}

#products article a,
#insights article a {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  color: var(--accent);
  transition: color var(--transition);
}

#products article a:hover,
#insights article a:hover {
  color: var(--accent-hover);
}

/* ========== Services & Advantages Lists ========== */
#services ul,
#advantages ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

#services ul li,
#advantages ul li {
  background: var(--bg-glass);
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-align: center;
  font-weight: 500;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#services ul li:hover,
#advantages ul li:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border-color: var(--gold);
  background: var(--bg-card);
}

/* ========== Testimonials (Blockquote) ========== */
#testimonials blockquote {
  background: var(--bg-glass);
  border-left: 4px solid var(--accent);
  padding: 20px 28px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 16px;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#testimonials blockquote:hover {
  transform: translateX(6px);
  border-left-color: var(--gold);
}

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

/* ========== Insights (Knowledge Center) ========== */
#insights article time {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

#insights article a {
  margin-top: 12px;
  display: inline-block;
}

/* ========== FAQ (Details/Summary) ========== */
#faq details {
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

#faq details:hover {
  border-color: var(--accent);
}

#faq summary {
  padding: 16px 24px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  list-style: none;
  transition: background var(--transition);
}

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

#faq summary::after {
  content: '+';
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--accent);
  transition: transform var(--transition);
}

#faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

#faq details[open] summary {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

#faq details p {
  padding: 16px 24px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ========== HowTo ========== */
#howto ol {
  counter-reset: step;
  padding-left: 0;
}

#howto ol li {
  counter-increment: step;
  padding: 12px 16px 12px 48px;
  position: relative;
  background: var(--bg-glass);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}

#howto ol li:hover {
  transform: translateX(6px);
  border-color: var(--accent);
}

/* ========== Contact & Address ========== */
#contact address p {
  margin-bottom: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

/* ========== Footer ========== */
footer {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  padding: 40px 24px 24px;
  text-align: center;
}

footer nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  margin-bottom: 24px;
}

footer nav ul li a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

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

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

footer time {
  color: var(--text-muted);
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
  header nav {
    padding: 0 16px;
  }

  header nav ul {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    width: 100%;
    flex-direction: column;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    gap: 4px;
  }

  header nav ul.open {
    display: flex;
  }

  header nav ul li a {
    padding: 12px 24px;
    width: 100%;
    text-align: center;
    border-radius: 0;
  }

  .menu-toggle {
    display: flex;
  }

  section {
    padding: 48px 16px;
  }

  #about, #company, #products, #services, #solutions, #industries, #advantages, #testimonials, #case-studies, #insights, #faq, #howto, #contact {
    margin: 0 12px 24px;
    padding: 32px 20px;
  }

  #hero {
    min-height: 70vh;
    border-radius: 0 0 24px 24px;
    margin-bottom: -24px;
  }

  #hero h1 {
    font-size: clamp(1.6rem, 8vw, 2.5rem);
  }

  #hero p {
    font-size: 1rem;
    padding: 0 16px;
  }

  #services ul,
  #advantages ul {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  #services ul li,
  #advantages ul li {
    padding: 16px;
    font-size: 0.9rem;
  }

  footer nav ul {
    gap: 8px 16px;
  }
}

@media (max-width: 480px) {
  #services ul,
  #advantages ul {
    grid-template-columns: 1fr;
  }

  #hero h1 {
    font-size: 1.5rem;
  }

  #hero a {
    padding: 12px 28px;
    font-size: 0.9rem;
  }

  section h2 {
    font-size: 1.5rem;
  }
}

/* ========== Utility & Dark Mode Toggle (future) ========== */
.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;
}

/* ========== Smooth scrollbar ========== */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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