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

/* ===== CSS Variables ===== */
:root {
  --bg: #0f0f23;
  --bg-card: rgba(255, 255, 255, 0.06);
  --bg-glass: rgba(255, 255, 255, 0.08);
  --text: #e8eaf6;
  --text-secondary: #b0b8d1;
  --primary: #6c63ff;
  --primary-dark: #5a52d5;
  --accent: #ff6584;
  --accent2: #00d2ff;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --radius: 20px;
  --radius-sm: 12px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body.dark-mode {
  --bg: #0a0a1a;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-glass: rgba(255, 255, 255, 0.06);
  --text: #e0e0f0;
  --text-secondary: #9ea8c5;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* ===== Body & Typography ===== */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background var(--transition), color var(--transition);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1rem; color: var(--text-secondary); }

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

/* ===== Layout ===== */
.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
}

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

/* ===== Logo ===== */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}
.logo:hover { transform: scale(1.03); }
.logo-text { background: linear-gradient(135deg, var(--primary), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ===== Navigation ===== */
.nav-links {
  display: flex;
  list-style: none;
  gap: 1.8rem;
  align-items: center;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.3rem 0;
  position: relative;
  transition: color var(--transition);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width var(--transition);
  border-radius: 2px;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* ===== Buttons ===== */
.dark-mode-toggle,
.mobile-menu-btn {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text);
  padding: 0.5rem 0.8rem;
  border-radius: 50px;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
}
.dark-mode-toggle:hover,
.mobile-menu-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}
.mobile-menu-btn { display: none; }

/* ===== Hero ===== */
#hero {
  position: relative;
  padding: 5rem 1.5rem 3rem;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a3e 0%, #0f0f23 40%, #1a1a3e 70%, #0d0d1a 100%);
  border-bottom: 1px solid var(--border);
}
#hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(108, 99, 255, 0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(255, 101, 132, 0.06) 0%, transparent 50%);
  animation: heroGlow 12s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes heroGlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(2%, 2%) rotate(3deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
  animation: fadeUp 0.8s ease-out;
}
.hero-content h1 {
  background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.2rem;
}
.hero-content p {
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 0.9rem 2.8rem;
  border-radius: 60px;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
  position: relative;
  overflow: hidden;
}
.cta-button::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.6s;
}
.cta-button:hover::before { left: 100%; }
.cta-button:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.45);
}

.hero-slider {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin: 2.5rem 0 0;
  position: relative;
  z-index: 1;
}
.slide {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  padding: 1rem 2.2rem;
  border-radius: 60px;
  font-weight: 600;
  font-size: 1.1rem;
  border: 1px solid var(--border);
  opacity: 0.6;
  transition: all 0.6s ease;
  cursor: default;
}
.slide.active {
  opacity: 1;
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.2), rgba(255, 101, 132, 0.1));
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(108, 99, 255, 0.15);
}

/* ===== Section Common ===== */
main { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateY(30px);
  animation: sectionFadeIn 0.7s ease forwards;
}
section:nth-child(1) { animation-delay: 0.1s; }
section:nth-child(2) { animation-delay: 0.2s; }
section:nth-child(3) { animation-delay: 0.3s; }
section:nth-child(4) { animation-delay: 0.4s; }
section:nth-child(5) { animation-delay: 0.5s; }
section:nth-child(6) { animation-delay: 0.6s; }
section:nth-child(7) { animation-delay: 0.7s; }
section:nth-child(8) { animation-delay: 0.8s; }
section:nth-child(9) { animation-delay: 0.9s; }
section:nth-child(10) { animation-delay: 1.0s; }
section:nth-child(11) { animation-delay: 1.1s; }
section:nth-child(12) { animation-delay: 1.2s; }

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

section h2 {
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  display: inline-block;
  width: 100%;
}
section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  margin: 0.8rem auto 0;
  border-radius: 4px;
}

/* ===== Cards Grid ===== */
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}
.card:hover::before { transform: scaleX(1); }
.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: rgba(108, 99, 255, 0.3);
}
.card h3 { margin-bottom: 0.8rem; }
.card p { font-size: 0.95rem; }
.card a {
  display: inline-block;
  margin-top: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  transition: all 0.3s;
}
.card a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

/* ===== About Grid ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.about-grid article {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition);
}
.about-grid article:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

/* ===== Features Grid ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.feature-item {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.feature-item:hover {
  transform: translateX(6px);
  border-left-color: var(--accent);
  box-shadow: var(--shadow);
}
.feature-item h4 { margin-bottom: 0.5rem; }
.feature-item p { font-size: 0.9rem; margin-bottom: 0; }

/* ===== Services List ===== */
.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}
.services-list li {
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-weight: 500;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.services-list li::before {
  content: '✦';
  color: var(--primary);
  font-size: 1.1rem;
}
.services-list li:hover {
  background: rgba(108, 99, 255, 0.1);
  transform: translateY(-3px);
  border-color: var(--primary);
}

/* ===== Advantages ===== */
#advantages ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
#advantages ul li {
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
  padding-left: 2.8rem;
}
#advantages ul li::before {
  content: '✓';
  position: absolute;
  left: 1rem;
  color: var(--accent2);
  font-weight: 700;
}
#advantages ul li:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent2);
}

/* ===== Case Studies ===== */
#case-studies article {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: all var(--transition);
}
#case-studies article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

/* ===== Testimonials ===== */
blockquote {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 1.5rem 0;
  position: relative;
  transition: all var(--transition);
  border-left: 4px solid var(--primary);
}
blockquote:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
blockquote p { font-style: italic; font-size: 1.05rem; margin-bottom: 0.5rem; }
cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  color: var(--primary);
  font-weight: 600;
}

/* ===== FAQ Accordion ===== */
.faq-accordion details {
  margin-bottom: 0.8rem;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--transition);
}
.faq-accordion details:hover {
  border-color: rgba(108, 99, 255, 0.3);
}
.faq-accordion details[open] {
  border-color: var(--primary);
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.1);
}
.faq-accordion summary {
  cursor: pointer;
  font-weight: 600;
  padding: 1rem 1.5rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color var(--transition);
}
.faq-accordion summary::-webkit-details-marker { display: none; }
.faq-accordion summary::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  transition: transform 0.3s, color 0.3s;
  color: var(--primary);
}
.faq-accordion details[open] summary::after {
  content: '−';
  transform: rotate(180deg);
}
.faq-accordion details[open] summary {
  color: var(--primary);
}
.faq-accordion p {
  padding: 0 1.5rem 1.2rem;
  margin: 0;
  font-size: 0.95rem;
}

/* ===== HowTo ===== */
#howto ol {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
}
#howto ol li {
  counter-increment: step;
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem 1rem 3.5rem;
  position: relative;
  transition: all var(--transition);
}
#howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
#howto ol li:hover {
  transform: translateX(6px);
  border-color: var(--primary);
}

/* ===== Contact ===== */
address {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  font-style: normal;
  display: grid;
  gap: 0.8rem;
  transition: all var(--transition);
}
address:hover {
  box-shadow: var(--shadow);
}
address p { margin-bottom: 0; }

/* ===== Footer ===== */
footer {
  background: #0a0a1a;
  color: #b0b8d1;
  padding: 3rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
}
.footer-content { max-width: 1280px; margin: 0 auto; }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.footer-links a {
  color: #9ea8c5;
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}
.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--primary);
  transition: width var(--transition);
}
.footer-links a:hover { color: white; }
.footer-links a:hover::after { width: 100%; }
.legal { font-size: 0.9rem; }
.legal a { color: #7a84a8; margin: 0 0.5rem; }
.legal a:hover { color: white; }

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  border-radius: 50%;
  width: 52px;
  height: 52px;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
  z-index: 99;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
}
.back-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 30px rgba(108, 99, 255, 0.5);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ===== Selection ===== */
::selection { background: rgba(108, 99, 255, 0.3); color: white; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    padding: 1.2rem;
    border-bottom: 1px solid var(--border);
    gap: 0.8rem;
    box-shadow: var(--shadow);
  }
  .nav-links.active { display: flex; }
  .mobile-menu-btn { display: block; }
  
  #hero { padding: 3rem 1rem; }
  .hero-slider { gap: 0.8rem; }
  .slide { padding: 0.7rem 1.5rem; font-size: 0.95rem; }
  
  .cards-container { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .services-list { grid-template-columns: 1fr; }
  #advantages ul { grid-template-columns: 1fr; }
  
  section { padding: 2.5rem 0; }
  .footer-links { gap: 1.5rem; }
}

@media (max-width: 480px) {
  .nav-container { padding: 0.6rem 1rem; }
  .logo { font-size: 1.1rem; }
  .cta-button { padding: 0.8rem 2rem; font-size: 0.95rem; }
  .back-to-top { width: 44px; height: 44px; font-size: 1.2rem; bottom: 1.5rem; right: 1.5rem; }
}

/* ===== Extra Polish ===== */
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
img, svg { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; }
address a { color: var(--primary); }
address a:hover { color: var(--accent); }

/* ===== Smooth Scroll ===== */
html { scroll-behavior: smooth; }

/* ===== Glassmorphism Helper ===== */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
}