:root {
    /* ========== Backgrounds ========== */
    --bg: #0A0A0F;
    --card: #12121A;
    --border: #1E1E28;

    /* ========== Purple Palette ========== */
    --accent: #BB86FC;
    --accent-glow: #CF9FFF;
    --accent-dark: #7B4FB8;

    /* ========== Text ========== */
    --text: #E8E6F0;
    --text-dim: #787680;

    /* ========== Status Colors ========== */
    --danger: #CF6679;
    --success: #4CAF93;
    --info: #64B5F6;
    --warning: #FFB74D;
}

/* ==================== Reset & Base ==================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ==================== Custom Scrollbar ==================== */
html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-dark) var(--bg);
}

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-dark);
    border-radius: 10px;
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

::-webkit-scrollbar-thumb:active {
    background: var(--accent-glow);
}

::-webkit-scrollbar-corner {
    background: var(--bg);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    width: 100%;
    max-width: 100vw;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-dark) var(--bg);
}

header,
section,
footer,
.nav-inner,
.card-grid,
.services-pricing {
    max-width: 100%;
    overflow-x: clip;
}

/* ==================== Just Adding Selection ==================== */
html::selection {
    background-color: var(--accent);
    color: var(--text);
}

/* ==================== Header / Navigation ==================== */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    gap: 24px;
}

/* ==================== Logo ==================== */
.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 84px;
    width: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.logo-img:hover {
    opacity: 0.85;
}

/* ==================== Language Switcher ==================== */
.lang-switcher {
    position: relative;
    flex-shrink: 0;
}

.lang-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: border-color 0.3s;
}

.lang-btn:hover {
    border-color: var(--accent);
}

.lang-flag {
    width: 32px;
    height: 32px;
    object-fit: cover;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    min-width: 150px;
    z-index: 200;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.lang-dropdown.active {
    display: flex;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.lang-option:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text);
}

.lang-option img {
    width: 20px;
    height: 20px;
}

.active-lang {
    color: var(--accent);
    background: rgba(187,134,252,0.08);
    pointer-events: none;
}

/* ==================== Desktop Navigation ==================== */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.desktop-nav a {
    color: var(--text-dim);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.25s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.desktop-nav a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

.desktop-nav a.active-page {
    color: var(--accent);
    background: rgba(187, 134, 252, 0.08);
}

.nav-cta {
    padding: 8px 18px !important;
    font-size: 0.9rem !important;
}

/* ==================== Hamburger Button ==================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 102;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==================== Mobile Navigation Overlay ==================== */
.mobile-nav {
    display: flex;
    flex-direction: column;
    background: var(--card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    padding: 24px;
    gap: 8px;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 80vw;
    height: 100vh;
    height: 100dvh;
    z-index: 99;
    transform: translateX(110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    padding-top: 80px;
}

.mobile-nav.active {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav a {
    color: var(--text-dim);
    text-decoration: none;
    padding: 14px 16px;
    border-radius: 8px;
    transition: all 0.25s ease;
    font-weight: 500;
    font-size: 1rem;
    text-align: left;
}

.mobile-nav a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-nav a.active-page {
    color: var(--accent);
    background: rgba(187, 134, 252, 0.08);
}

.mobile-cta {
    text-align: center;
    margin-top: auto;
    width: 100%;
    background: var(--accent);
    color: var(--bg);
    padding: 14px 24px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
}

/* ==================== Buttons ==================== */
.btn-accent {
    background: var(--accent);
    color: var(--text);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-accent:hover {
    background: var(--accent-glow);
    box-shadow: 0 0 32px rgba(187, 134, 252, 0.5);
    transform: translateY(-2px);
}

.btn-accent:active {
    transform: scale(0.96);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent-glow);
    box-shadow: 0 0 16px rgba(187, 134, 252, 0.2);
}

/* ==================== Card ==================== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 24px;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 40px rgba(187, 134, 252, 0.08);
    transform: translateY(-4px);
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(187, 134, 252, 0.06),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.card:hover::after {
    opacity: 1;
}

.card > * {
    position: relative;
    z-index: 1;
}

.empty-portfolio {
    text-align: center;
    padding: 48px 24px;
    border-style: dashed;
}

/* ==================== Sections ==================== */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(187, 134, 252, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}

h1 {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 20px;
}

h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 16px;
}

h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.text-accent {
    color: var(--accent);
}

.text-dim {
    color: var(--text-dim);
    max-width: 600px;
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.card-desc {
    color: var(--text-dim);
    font-size: 0.93rem;
}

/* ==================== Hero Section ==================== */
.hero {
    display: flex;
    align-items: center;
    gap: 40px;
    min-height: 70vh;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1 1 400px;
}

.hero-visual {
    flex: 1 1 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-glow {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(187, 134, 252, 0.25) 0%,
        transparent 70%
    );
    position: relative;
    animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

.hero-glow::after {
    content: '✦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: var(--accent-glow);
    filter: drop-shadow(0 0 30px rgba(187, 134, 252, 0.8));
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-14px);
    }
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* ==================== Card Grid ==================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.icon-purple {
     background: rgba(187, 134, 252, 0.15); color: var(--accent);
}
.icon-green { 
    background: rgba(76, 175, 147, 0.15); color: var(--success); 
}
.icon-blue { 
    background: rgba(100, 181, 246, 0.15); color: var(--info); 
}

svg {
    width: 75%;
    height: 75%;
    display: block;
}

/* ==================== Demo Carousel ==================== */
.demo-carousel-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 40px;
}

.demo-carousel-container {
    overflow: hidden;
    border-radius: 16px;
}

.demo-carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.demo-card {
    flex: 0 0 380px;
    margin: 0 12px;
    text-decoration: none;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.35s ease;
    display: flex;
    flex-direction: column;
}

.demo-card:hover {
    border-color: var(--accent);
    box-shadow: 0 8px 40px rgba(187, 134, 252, 0.08);
    transform: translateY(-4px);
}

.demo-card:hover .demo-link {
    color: var(--accent-glow);
}

.demo-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.demo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.demo-card:hover .demo-preview img {
    transform: scale(1.03);
}

.demo-info {
    padding: 20px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.demo-info h3 {
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.demo-info .card-desc {
    font-size: 0.9rem;
    flex: 1;
}

.demo-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

/* Carousel arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    color: var(--text);
    font-size: 1.2rem;
}

.carousel-arrow:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

.demo-arrow-left {
    left: 0;
}

.demo-arrow-right {
    right: 0;
}

/* ==================== About Section ==================== */
.about-content {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.about-text {
    flex: 2 1 400px;
}

.about-highlights {
    flex: 1 1 250px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.highlight-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: border-color 0.3s ease;
}

.highlight-item:hover {
    border-color: var(--accent);
}

.highlight-number {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent);
}

.highlight-label {
    font-size: 0.85rem;
    color: var(--text-dim);
}

/* ==================== Footer ==================== */
footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 32px 20px;
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 80px;
}

footer span {
    color: var(--accent);
    font-weight: 600;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    section {
        text-align: center;
    }

    .section-label {
        margin-left: auto;
        margin-right: auto;
    }

    .text-dim {
        margin-left: auto;
        margin-right: auto;
    }

    .hero {
        min-height: auto;
        flex-direction: column-reverse;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }

    .about-highlights {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .highlight-item {
        flex: 1 1 120px;
    }

    h1 {
         font-size: 2.2rem; 
    }

    h2 { 
        font-size: 1.7rem; 
    }

    .hero-glow {
        width: 180px;
        height: 180px;
    }

    .hero-glow::after {
        font-size: 2.5rem;
    }

    .desktop-nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .logo-img {
        height: 50px;
    }
    .mobile-nav {
        width: 75vw;
        max-width: 300px;
        transform: translateX(110%);
    }

    .mobile-nav.active {
        transform: translateX(0);
    }

    .demo-carousel-wrapper {
        padding: 0 30px;
    }
    
    .demo-card {
        flex: 0 0 300px;
        margin: 0 8px;
    }
}

@media (max-width: 400px) {
    section {
        padding: 40px 16px;
    }

    .card {
        padding: 20px 16px;
    }

    h1 { font-size: 1.8rem; }
    
    .demo-card {
        flex: 0 0 260px;
    }
}