/* 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, sans-serif; line-height: 1.6; color: #1e1e2f; background: #f5f7fa; transition: background 0.3s, color 0.3s; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.2; }
section { padding: 4rem 1.5rem; max-width: 1200px; margin: 0 auto; }

/* Dark Mode Variables */
body.dark { background: #0d0d1a; color: #e0e0f0; }
body.dark header, body.dark footer { background: rgba(13,13,26,0.95); }
body.dark section { background: transparent; }
body.dark .card, body.dark article, body.dark details, body.dark blockquote { background: rgba(255,255,255,0.05); backdrop-filter: blur(12px); border-color: rgba(255,255,255,0.1); color: #e0e0f0; }
body.dark nav a { color: #b0b0d0; }
body.dark nav a:hover { color: #7aa2ff; }
body.dark button { background: rgba(255,255,255,0.1); color: #e0e0f0; }

/* Header & Nav */
header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.85); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(0,0,0,0.05); transition: background 0.3s; }
body.dark header { background: rgba(13,13,26,0.9); border-bottom: 1px solid rgba(255,255,255,0.05); }
nav { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: 0.75rem 1.5rem; flex-wrap: wrap; }
nav > a { font-weight: 700; font-size: 1.4rem; background: linear-gradient(135deg, #4a6cf7, #6c63ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
nav ul { display: flex; gap: 1.5rem; }
nav ul li a { font-weight: 500; transition: color 0.2s; position: relative; }
nav ul li a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px; background: #4a6cf7; transition: width 0.3s; }
nav ul li a:hover::after { width: 100%; }
nav button { background: none; border: none; font-size: 1.3rem; cursor: pointer; padding: 0.25rem; border-radius: 8px; transition: background 0.2s; }
nav button:hover { background: rgba(74,108,247,0.1); }
#mobileMenuToggle { display: none; }

/* Hero Section */
#hero { position: relative; min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; background: linear-gradient(135deg, #0f0c29, #302b63, #24243e); color: #fff; overflow: hidden; padding: 6rem 1.5rem; }
#hero::before { content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%; background: radial-gradient(circle at 30% 50%, rgba(74,108,247,0.2) 0%, transparent 50%), radial-gradient(circle at 70% 80%, rgba(108,99,255,0.15) 0%, transparent 50%); animation: heroGlow 8s ease-in-out infinite alternate; }
@keyframes heroGlow { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(-10%,10%) scale(1.1); } }
#hero div { position: relative; z-index: 1; max-width: 800px; }
#hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; background: linear-gradient(to right, #f0f0ff, #c0d0ff); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
#hero p { font-size: 1.1rem; margin-bottom: 2rem; opacity: 0.9; }
#hero a { display: inline-block; padding: 0.8rem 2.5rem; background: linear-gradient(135deg, #4a6cf7, #6c63ff); color: #fff; border-radius: 40px; font-weight: 600; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 20px rgba(74,108,247,0.4); }
#hero a:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(74,108,247,0.6); }

/* Section Titles */
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: 1.5rem; position: relative; display: inline-block; }
h2::after { content: ''; display: block; width: 60px; height: 4px; background: linear-gradient(90deg, #4a6cf7, #6c63ff); border-radius: 4px; margin-top: 0.5rem; }

/* Cards & Articles */
article, blockquote, details { background: rgba(255,255,255,0.7); backdrop-filter: blur(12px); border-radius: 20px; padding: 1.8rem; border: 1px solid rgba(0,0,0,0.04); box-shadow: 0 8px 32px rgba(0,0,0,0.04); transition: transform 0.3s, box-shadow 0.3s; }
article:hover, blockquote:hover, details:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,0.08); }
#products div { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; margin-top: 2rem; }
#products article { text-align: center; }
#products article h3 { margin-bottom: 0.75rem; color: #4a6cf7; }
#insights { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
#insights article { padding: 1.5rem; }
#insights article h4 { margin-bottom: 0.5rem; }
#insights article h4 a { color: #4a6cf7; transition: color 0.2s; }
#insights article h4 a:hover { color: #6c63ff; }

/* Lists & Details */
#services ul, #advantages ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-top: 1rem; }
#services li, #advantages li { background: rgba(255,255,255,0.5); backdrop-filter: blur(8px); padding: 1.2rem 1.5rem; border-radius: 16px; border: 1px solid rgba(0,0,0,0.03); transition: background 0.2s; }
#services li:hover, #advantages li:hover { background: rgba(74,108,247,0.08); }
details { margin-bottom: 1rem; cursor: pointer; }
details summary { font-weight: 600; outline: none; }
details p { margin-top: 0.75rem; color: #555; }
body.dark details p { color: #b0b0d0; }

/* HowTo */
#howto ol { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 1rem; }
#howto ol li { counter-increment: step; padding: 1rem 1.5rem 1rem 3rem; background: rgba(255,255,255,0.5); backdrop-filter: blur(8px); border-radius: 16px; position: relative; border: 1px solid rgba(0,0,0,0.03); }
#howto ol li::before { content: counter(step); position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 1.8rem; height: 1.8rem; background: linear-gradient(135deg, #4a6cf7, #6c63ff); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; }

/* Testimonials */
blockquote { font-style: italic; margin: 1.5rem 0; border-left: 4px solid #4a6cf7; padding-left: 1.5rem; }
blockquote p { margin: 0; }

/* Contact */
#contact address { font-style: normal; background: rgba(255,255,255,0.5); backdrop-filter: blur(8px); padding: 2rem; border-radius: 20px; border: 1px solid rgba(0,0,0,0.03); }
#contact address p { margin-bottom: 0.5rem; }
#contact a { color: #4a6cf7; font-weight: 500; }

/* Footer */
footer { background: rgba(255,255,255,0.85); backdrop-filter: blur(16px); border-top: 1px solid rgba(0,0,0,0.05); padding: 2rem 1.5rem; text-align: center; }
footer nav ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; }
footer nav ul li a { font-size: 0.9rem; opacity: 0.7; transition: opacity 0.2s; }
footer nav ul li a:hover { opacity: 1; }
footer p { font-size: 0.85rem; opacity: 0.6; }

/* Scroll Animation */
@media (prefers-reduced-motion: no-preference) {
    section { opacity: 0; transform: translateY(30px); animation: fadeUp 0.6s ease forwards; }
    @keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
    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; }
    section:nth-child(10) { animation-delay: 0.9s; }
    section:nth-child(11) { animation-delay: 1.0s; }
    section:nth-child(12) { animation-delay: 1.1s; }
    section:nth-child(13) { animation-delay: 1.2s; }
    section:nth-child(14) { animation-delay: 1.3s; }
}

/* Responsive */
@media (max-width: 768px) {
    nav ul { display: none; flex-direction: column; width: 100%; margin-top: 1rem; gap: 0.75rem; }
    nav ul.open { display: flex; }
    #mobileMenuToggle { display: block; }
    #hero { min-height: 60vh; padding: 4rem 1.5rem; }
    section { padding: 3rem 1rem; }
    #products div { grid-template-columns: 1fr; }
    #insights { grid-template-columns: 1fr; }
    #services ul, #advantages ul { grid-template-columns: 1fr; }
    footer nav ul { gap: 1rem; }
}