/* --- Brand Palette (60-30-10) --- */
:root {
    /* 60% - Main Background */
    --bg-main: #F6F8FB;
    /* 30% - Secondary Background */
    --bg-secondary: #E9F2FA;
    --bg-card: #FFFFFF;

    /* 10% - Brand Accents */
    --accent-primary: #2F80ED;
    --accent-secondary: #56CCF2;
    --accent-success: #6FCF97;
    --accent-cta: #F2994A;

    /* Text Colors */
    --text-main: #2B2B2B;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --text-on-accent: #FFFFFF;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #2F80ED 0%, #56CCF2 100%);
    --gradient-hero: linear-gradient(135deg, #2F80ED 0%, #56CCF2 100%);

    /* UI Elements */
    --border: rgba(47, 128, 237, 0.1);
    --shadow-soft: 0 10px 30px rgba(47, 128, 237, 0.08);
    --shadow-hover: 0 20px 40px rgba(47, 128, 237, 0.15);
    --border-radius: 24px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', var(--font-main);

    /* Fluidity constants */
    --container-padding: 5vw;
    --section-gap: clamp(80px, 10vh, 160px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-main);
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- Tech Stack --- */
.imperial-stack {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.stack-category {
    padding: 32px;
}

.category-title {
    font-size: 1.25rem;
    color: var(--accent-primary);
    margin-bottom: 24px;
    font-family: var(--font-heading);
}

.tech-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-tag {
    padding: 6px 14px;
    background: var(--bg-secondary);
    color: var(--text-main);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- Dropdown Fix --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-main);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    transition: 0.8s ease;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    font-size: 3rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-main);
    margin-bottom: 24px;
}

.preloader-logo span {
    color: var(--accent-primary);
}

.preloader-bar {
    width: 200px;
    height: 2px;
    background: var(--bg-secondary);
    margin: 0 auto;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.preloader-progress {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-primary);
    animation: progressFill 1.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

@keyframes progressFill {
    from {
        left: -100%;
    }

    to {
        left: 0;
    }
}

/* --- Global Structure --- */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--section-gap) 0;
    position: relative;
}

.section-label {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    background: var(--bg-secondary);
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-family: var(--font-heading);
    color: var(--text-main);
    margin-bottom: 24px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.section-title span {
    color: var(--accent-primary);
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin-bottom: 60px;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Header & Navigation --- */
.header {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1300px, 92%);
    padding: 12px 32px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(246, 248, 251, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 100px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--accent-primary);
}

.nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-primary);
}

/* --- Language Switcher --- */
.lang-switcher {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    padding: 3px;
    border-radius: 12px;
}

.lang-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn:hover {
    color: var(--accent-primary);
}

.lang-btn.active {
    background: white;
    color: var(--accent-primary);
    box-shadow: 0 4px 10px rgba(47, 128, 237, 0.1);
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 4px;
    z-index: 1001;
}

.mobile-nav-toggle .bar {
    width: 24px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 2px;
    transition: 0.3s;
}

/* --- Decorative Blobs --- */
.blob {
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

.blob-1 {
    top: -100px;
    right: -100px;
    background: var(--accent-primary);
    animation: blobMove 20s infinite alternate;
}

.blob-2 {
    bottom: -100px;
    left: -100px;
    background: var(--accent-secondary);
    animation: blobMove 15s infinite alternate-reverse;
}

@keyframes blobMove {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(100px, 50px);
    }
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    gap: 10px;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(47, 128, 237, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(47, 128, 237, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline:hover {
    background: var(--bg-secondary);
}

.btn-cta {
    background: var(--accent-cta);
    color: white;
    box-shadow: 0 4px 15px rgba(242, 153, 74, 0.2);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(242, 153, 74, 0.3);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    padding: 160px 0 100px;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.hero-title {
    color: white;
    font-size: clamp(2.5rem, 7vw, 5rem);
    margin-bottom: 24px;
    font-family: var(--font-heading);
}

.hero-subtitle {
    color: #EAF2FF;
    font-size: 1.25rem;
    margin-bottom: 48px;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.hero .btn-outline {
    background: white;
    border-color: white;
    color: var(--accent-primary);
}

.hero .btn-outline:hover {
    background: #f0f7ff;
    transform: translateY(-2px);
}

/* --- Service Cards & Grids --- */
.grid-2,
.grid-3 {
    display: grid;
    gap: 32px;
}

.grid-3,
.services-grid {
    display: grid;
    gap: 32px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.glass-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 48px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.service-card {
    background: var(--bg-secondary);
    border: 1px solid transparent;
    padding: 40px;
    border-radius: 32px;
}

.service-card:hover {
    background: var(--bg-card);
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 24px;
    color: var(--accent-primary);
}

/* --- Quiz Styles --- */
.quiz-card {
    max-width: 800px;
    margin: 0 auto;
    min-height: 450px;
}

.quiz-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 100px;
    margin-bottom: 48px;
    overflow: hidden;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 25%;
    transition: width 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.quiz-step {
    display: none;
}

.quiz-step.active {
    display: block;
    animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.quiz-option {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: 20px;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.quiz-option:hover {
    background: white;
    border-color: var(--accent-primary);
    transform: scale(1.02);
}

.quiz-option.selected {
    background: white;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-soft);
}

/* --- FAQ Accordion --- */
.faq-accordion {
    max-width: 850px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--bg-secondary);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-question {
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    cursor: pointer;
    font-size: 1.15rem;
}

.faq-answer {
    max-height: 0;
    padding: 0 32px;
    color: var(--text-secondary);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
}

.faq-item.active {
    background: white;
    box-shadow: var(--shadow-soft);
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-bottom: 24px;
    opacity: 1;
    visibility: visible;
}

/* --- Statistics --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.stat-card {
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--accent-primary);
    line-height: 1;
    margin-bottom: 12px;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* --- Contact Form --- */
.form-group {
    margin-bottom: 20px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 16px;
    color: var(--text-main);
    font-size: 1rem;
    font-family: var(--font-main);
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    background: white;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-soft);
}

/* --- Footer --- */
.footer {
    padding: 80px 0 40px;
    background: var(--bg-secondary);
    text-align: center;
}

.footer a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
}

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 32px;
}

/* --- Responsiveness --- */
@media (max-width: 1024px) {
    .nav {
        display: none;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 12px);
        left: 0;
        width: 100%;
        background: var(--bg-card);
        padding: 32px;
        gap: 20px;
        border-radius: 32px;
        border: 1px solid var(--border);
        box-shadow: var(--shadow-hover);
        z-index: 1000;
        text-align: center;
    }

    .nav.active {
        display: flex;
        animation: slideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .hero {
        text-align: center;
    }
}

.mobile-nav-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 768px) {
    :root {
        --container-padding: 6vw;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .hero-btns {
        flex-direction: column;
    }

    .glass-card {
        padding: 32px;
    }
}

/* Reveal Animations */
.tech-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-active {
    opacity: 1;
    transform: translateY(0);
}