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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #e0e0e0;
    background-color: #0d0d1a;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

/* Dark mode support (default dark) */
@media (prefers-color-scheme: light) {
    body {
        background-color: #f5f5fa;
        color: #1a1a2e;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a2e;
}
::-webkit-scrollbar-thumb {
    background: #4a4a7a;
    border-radius: 4px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}
@media (prefers-color-scheme: light) {
    h1, h2, h3, h4, h5, h6 {
        color: #1a1a2e;
    }
}

h1 { font-size: clamp(2rem, 6vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.2rem, 3vw, 1.8rem); }

p { margin-bottom: 1rem; }

a {
    color: #7c7cdd;
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover, a:focus {
    color: #a8a8ff;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(13, 13, 26, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background 0.3s;
}
@media (prefers-color-scheme: light) {
    header {
        background: rgba(245, 245, 250, 0.85);
        border-bottom: 1px solid rgba(0,0,0,0.08);
    }
}

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

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

nav ul li a {
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0.2rem;
    position: relative;
    color: #ccc;
}
nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #7c7cdd, #a8a8ff);
    transition: width 0.3s ease;
}
nav ul li a:hover::after,
nav ul li a:focus::after {
    width: 100%;
}
@media (prefers-color-scheme: light) {
    nav ul li a { color: #333; }
}

/* Hero Section */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1.5rem 3rem;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    overflow: hidden;
}
@media (prefers-color-scheme: light) {
    #hero {
        background: linear-gradient(135deg, #e0e0f0, #c0c0e0, #d0d0f0);
    }
}
#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(124, 124, 221, 0.15) 0%, transparent 60%),
                radial-gradient(circle at 70% 60%, rgba(168, 168, 255, 0.1) 0%, transparent 50%);
    animation: heroGlow 15s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes heroGlow {
    0% { transform: translate(0,0) scale(1); }
    100% { transform: translate(5%,5%) scale(1.1); }
}

#hero h1 {
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #fff, #a8a8ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
}
@media (prefers-color-scheme: light) {
    #hero h1 {
        background: linear-gradient(135deg, #1a1a2e, #4a4a7a);
        -webkit-background-clip: text;
        background-clip: text;
    }
}

#hero p {
    position: relative;
    z-index: 2;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    max-width: 600px;
    margin: 0 auto 2rem;
    color: rgba(255,255,255,0.8);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}
@media (prefers-color-scheme: light) {
    #hero p { color: rgba(0,0,0,0.7); }
}

#hero a[role="button"] {
    position: relative;
    z-index: 2;
    display: inline-block;
    padding: 0.9rem 2.5rem;
    background: linear-gradient(135deg, #7c7cdd, #5a5aaa);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 24px rgba(124, 124, 221, 0.3);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}
#hero a[role="button"]:hover,
#hero a[role="button"]:focus {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 32px rgba(124, 124, 221, 0.5);
}

#hero div[aria-live] {
    position: relative;
    z-index: 2;
    margin-top: 2rem;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    max-width: 800px;
    width: 100%;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}
#hero div[aria-live] img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 24px;
}

/* Sections */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.7s ease-out forwards;
}
section:nth-of-type(1) { animation-delay: 0.1s; }
section:nth-of-type(2) { animation-delay: 0.2s; }
section:nth-of-type(3) { animation-delay: 0.3s; }
section:nth-of-type(4) { animation-delay: 0.4s; }
section:nth-of-type(5) { animation-delay: 0.5s; }
section:nth-of-type(6) { animation-delay: 0.6s; }
section:nth-of-type(7) { animation-delay: 0.7s; }
section:nth-of-type(8) { animation-delay: 0.8s; }
section:nth-of-type(9) { animation-delay: 0.9s; }
section:nth-of-type(10) { animation-delay: 1.0s; }
section:nth-of-type(11) { animation-delay: 1.1s; }
section:nth-of-type(12) { animation-delay: 1.2s; }
section:nth-of-type(13) { animation-delay: 1.3s; }
section:nth-of-type(14) { animation-delay: 1.4s; }
section:nth-of-type(15) { animation-delay: 1.5s; }
section:nth-of-type(16) { animation-delay: 1.6s; }
section:nth-of-type(17) { animation-delay: 1.7s; }

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

/* Card-like sections with glassmorphism */
#about, #company, #products, #services, #solutions, #industries, #features, #benefits, #workflow, #case-studies, #testimonials, #knowledge-center, #faq, #howto, #contact {
    background: rgba(30, 30, 60, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 28px;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
@media (prefers-color-scheme: light) {
    #about, #company, #products, #services, #solutions, #industries, #features, #benefits, #workflow, #case-studies, #testimonials, #knowledge-center, #faq, #howto, #contact {
        background: rgba(255, 255, 255, 0.6);
        border: 1px solid rgba(255,255,255,0.8);
        box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    }
}

#about:hover, #company:hover, #products:hover, #services:hover, #solutions:hover, #industries:hover, #features:hover, #benefits:hover, #workflow:hover, #case-studies:hover, #testimonials:hover, #knowledge-center:hover, #faq:hover, #howto:hover, #contact:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(124, 124, 221, 0.2);
}

/* Articles inside sections */
article {
    background: rgba(20, 20, 40, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s ease, background 0.3s ease;
}
article:hover {
    transform: scale(1.01);
    background: rgba(40, 40, 70, 0.5);
}
@media (prefers-color-scheme: light) {
    article {
        background: rgba(255,255,255,0.5);
        border: 1px solid rgba(0,0,0,0.05);
    }
    article:hover {
        background: rgba(255,255,255,0.8);
    }
}

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

/* Details / FAQ */
details {
    background: rgba(20, 20, 40, 0.3);
    backdrop-filter: blur(6px);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255,255,255,0.05);
    transition: background 0.3s;
    cursor: pointer;
}
details[open] {
    background: rgba(40, 40, 70, 0.4);
}
details summary {
    font-weight: 600;
    font-size: 1.05rem;
    color: #d0d0f0;
    outline: none;
}
details summary::-webkit-details-marker {
    color: #7c7cdd;
}
details p {
    margin-top: 0.75rem;
    color: #c0c0e0;
}
@media (prefers-color-scheme: light) {
    details {
        background: rgba(255,255,255,0.4);
        border: 1px solid rgba(0,0,0,0.05);
    }
    details[open] { background: rgba(255,255,255,0.7); }
    details summary { color: #1a1a2e; }
    details p { color: #333; }
}

/* Blockquote */
blockquote {
    background: rgba(124, 124, 221, 0.1);
    border-left: 4px solid #7c7cdd;
    padding: 1rem 1.5rem;
    border-radius: 0 16px 16px 0;
    margin-bottom: 1rem;
}
blockquote p {
    font-style: italic;
}
blockquote cite {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #aaa;
}
@media (prefers-color-scheme: light) {
    blockquote { background: rgba(124,124,221,0.05); }
    blockquote cite { color: #666; }
}

/* Contact */
address p {
    margin-bottom: 0.5rem;
}
address a {
    font-weight: 500;
}

/* Footer */
footer {
    background: rgba(13, 13, 26, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 2rem 1.5rem;
    text-align: center;
    margin-top: 2rem;
}
@media (prefers-color-scheme: light) {
    footer {
        background: rgba(245, 245, 250, 0.9);
        border-top: 1px solid rgba(0,0,0,0.06);
    }
}
footer nav ul {
    display: flex;
    justify-content: center;
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}
footer nav ul li a {
    font-size: 0.9rem;
}
footer p {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5rem;
}
footer a {
    color: #7c7cdd;
}

/* Back to top */
a[href="#hero"] {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #7c7cdd, #5a5aaa);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 16px rgba(124,124,221,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 999;
    text-decoration: none;
}
a[href="#hero"]:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(124,124,221,0.6);
}
a[href="#hero"]::before {
    content: '↑';
    line-height: 1;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem 1rem;
    }
    nav ul {
        gap: 0.75rem;
        justify-content: center;
    }
    nav ul li a {
        font-size: 0.85rem;
    }
    #hero {
        padding: 5rem 1rem 2rem;
    }
    section {
        padding: 2.5rem 1rem;
    }
    #about, #company, #products, #services, #solutions, #industries, #features, #benefits, #workflow, #case-studies, #testimonials, #knowledge-center, #faq, #howto, #contact {
        padding: 1.5rem 1rem;
        border-radius: 20px;
    }
    article {
        padding: 1rem;
    }
    footer nav ul {
        flex-direction: column;
        gap: 0.75rem;
    }
    a[href="#hero"] {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    nav ul { gap: 0.5rem; }
    nav ul li a { font-size: 0.8rem; }
    #hero h1 { font-size: 1.8rem; }
}

/* Smooth scroll for anchor links */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}