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

:root {
    --primary: #00d4aa;
    --primary-dark: #00b894;
    --primary-light: #55efc4;
    --bg: #0f0f23;
    --bg-card: rgba(255, 255, 255, 0.06);
    --bg-glass: rgba(255, 255, 255, 0.08);
    --text: #e0e0e0;
    --text-light: #b0b0b0;
    --text-heading: #ffffff;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

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

/* Dark mode default (already dark) */
@media (prefers-color-scheme: light) {
    :root {
        --bg: #0f0f23;
        --bg-card: rgba(255, 255, 255, 0.06);
        --bg-glass: rgba(255, 255, 255, 0.08);
        --text: #e0e0e0;
        --text-light: #b0b0b0;
        --text-heading: #ffffff;
        --border: rgba(255, 255, 255, 0.1);
    }
}

/* Scroll Animation Base */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

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

header:hover {
    background: rgba(15, 15, 35, 0.95);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

nav > div:first-child a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 1px;
    transition: var(--transition);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav > div:first-child a:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
    align-items: center;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

nav ul li a:hover {
    color: var(--text-heading);
    background: rgba(0, 212, 170, 0.1);
}

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

/* Main */
main {
    padding-top: 70px;
}

section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s 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; }

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

/* Hero Section - Gradient Banner */
#hero {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 30%, #0d2137 60%, #0f0f23 100%);
    border-radius: 0 0 40px 40px;
    padding: 120px 24px 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
    max-width: 100%;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(0, 212, 170, 0.15) 0%, transparent 60%),
                radial-gradient(circle at 70% 80%, rgba(0, 180, 150, 0.1) 0%, transparent 50%);
    animation: heroGlow 8s 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 h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), #81ecec, var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.5px;
}

#hero p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 8px;
    position: relative;
    z-index: 1;
    line-height: 1.8;
}

#hero p:last-of-type {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 500;
    margin-top: 12px;
}

/* Headings */
h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 28px;
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 4px;
}

/* Card Style Sections */
#about, #company, #story, #products, #services, #solutions, #industries, #advantages,
#testimonials, #case-studies, #insights, #faq, #howto, #contact {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 32px;
    padding: 48px 32px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

#about:hover, #company:hover, #story:hover, #products:hover, #services:hover,
#solutions:hover, #industries:hover, #advantages:hover, #testimonials:hover,
#case-studies:hover, #insights:hover, #faq:hover, #howto:hover, #contact:hover {
    border-color: rgba(0, 212, 170, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 212, 170, 0.1);
}

/* Lists inside cards */
section ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 16px;
}

section ul li {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: var(--transition);
}

section ul li:hover {
    background: rgba(0, 212, 170, 0.08);
    border-color: var(--primary);
    transform: translateY(-2px);
}

section ul li h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 8px;
}

/* Blockquote */
blockquote {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 24px 28px;
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--primary);
    margin-bottom: 16px;
    transition: var(--transition);
}

blockquote:hover {
    background: rgba(0, 212, 170, 0.06);
    transform: translateX(4px);
}

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

/* Articles / Insights */
#insights article {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 24px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 16px;
    transition: var(--transition);
}

#insights article:hover {
    background: rgba(0, 212, 170, 0.06);
    border-color: var(--primary);
    transform: translateY(-3px);
}

#insights article h3 {
    color: var(--text-heading);
    font-size: 1.15rem;
    margin-bottom: 8px;
}

#insights article p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

#insights article a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#insights article a::after {
    content: '→';
    transition: var(--transition);
}

#insights article a:hover {
    color: var(--primary-light);
}

#insights article a:hover::after {
    transform: translateX(4px);
}

/* FAQ */
details {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

details:hover {
    border-color: rgba(0, 212, 170, 0.3);
}

details[open] {
    background: rgba(0, 212, 170, 0.04);
    border-color: var(--primary);
}

summary {
    padding: 16px 24px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-heading);
    font-size: 1.05rem;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

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

summary::after {
    content: '+';
    font-size: 1.4rem;
    color: var(--primary);
    transition: var(--transition);
    font-weight: 300;
}

details[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}

details p {
    padding: 0 24px 16px;
    color: var(--text-light);
    line-height: 1.8;
}

/* HowTo */
#howto ol {
    list-style: none;
    counter-reset: step;
    margin-top: 16px;
}

#howto ol li {
    counter-increment: step;
    padding: 14px 20px 14px 56px;
    position: relative;
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    transition: var(--transition);
}

#howto ol li::before {
    content: counter(step);
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: #0f0f23;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

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

/* Contact */
#contact p {
    margin-bottom: 8px;
    color: var(--text-light);
}

#contact p strong {
    color: var(--text-heading);
}

/* Footer */
footer {
    background: rgba(15, 15, 35, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 48px 24px 32px;
    margin-top: 60px;
}

footer nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    list-style: none;
    margin-bottom: 24px;
}

footer nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    padding: 4px 8px;
    border-radius: 6px;
}

footer nav ul li a:hover {
    color: var(--primary);
    background: rgba(0, 212, 170, 0.08);
}

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

footer p:last-child {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
}

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

    nav ul {
        gap: 4px;
    }

    nav ul li a {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    nav > div:first-child a {
        font-size: 1.2rem;
    }

    section {
        padding: 48px 16px;
    }

    #hero {
        padding: 100px 16px 80px;
        border-radius: 0 0 24px 24px;
    }

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

    section ul {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    h2 {
        font-size: 1.6rem;
    }

    blockquote {
        padding: 16px 20px;
    }

    #insights article {
        padding: 18px;
    }

    details summary {
        padding: 14px 18px;
        font-size: 0.95rem;
    }

    details p {
        padding: 0 18px 14px;
    }

    #howto ol li {
        padding: 12px 16px 12px 48px;
    }

    #howto ol li::before {
        width: 26px;
        height: 26px;
        font-size: 0.8rem;
        left: 12px;
    }

    footer {
        padding: 32px 16px 24px;
    }

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

@media (max-width: 480px) {
    nav ul li a {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    nav > div:first-child a {
        font-size: 1rem;
    }

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

    #hero p {
        font-size: 0.95rem;
    }

    section {
        padding: 32px 12px;
    }

    h2 {
        font-size: 1.4rem;
    }
}

/* Smooth scroll offset for fixed header */
#about, #company, #story, #products, #services, #solutions, #industries, #advantages,
#testimonials, #case-studies, #insights, #faq, #howto, #contact {
    scroll-margin-top: 80px;
}

/* Glass morphism extras */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Selection */
::selection {
    background: var(--primary);
    color: #0f0f23;
}

/* Focus visible for accessibility */
a:focus-visible, button:focus-visible, details summary:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
    border-radius: 4px;
}