:root {
    /* Dark Theme (Default) */
    --bg-color: #020617;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-blue: #3b82f6;
    --accent-red: #ef4444;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --header-bg: rgba(2, 6, 23, 0.8);
    --card-shadow: rgba(0, 0, 0, 0.5);

    --font-main: 'Outfit', sans-serif;
    --container-width: 1200px;
    --transition-speed: 0.3s;
}

body.light-mode {
    --bg-color: #f1f5f9;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --accent-blue: #2563eb;
    --accent-red: #dc2626;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --header-bg: rgba(241, 245, 249, 0.8);
    --card-shadow: rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Nav */
header {
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    transition: background var(--transition-speed) ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.logo-text {
    text-decoration: none;
    color: inherit;
}

.logo img {
    height: 40px;
    width: auto;
}

/* Nav Right */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--bg-color);
    height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.mobile-menu.active {
    height: 300px;
    border-bottom: 1px solid var(--glass-border);
}

.mobile-link {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--accent-red);
}

.mobile-tools {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.btn-icon {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 44px;
    /* Larger for touch */
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.lang-switcher,
.lang-switcher-mobile {
    display: flex;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 4px;
    border-radius: 50px;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: var(--accent-blue);
    color: white;
}

/* Buttons */
.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-secondary {
    background: transparent;
    color: var(--accent-red);
    border: 2px solid var(--accent-red);
}

.btn-secondary:hover {
    background: var(--accent-red);
    color: white;
}

/* Hero Section Refined */
.hero {
    padding: 160px 0 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 3.5rem;
}

.hero-content {
    max-width: 900px;
    width: 100%;
}

.loss-heading {
    font-size: clamp(2rem, 8vw, 3.5rem);
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 2rem;
    letter-spacing: -2px;
    text-wrap: balance;
}

.loss-heading span {
    color: var(--accent-red);
}

.hero-desc {
    font-size: clamp(1rem, 4vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

.hero-ctas {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.cta-note {
    font-size: 0.95rem;
    color: var(--accent-red);
    font-weight: 700;
    width: 100%;
    margin-top: 0.5rem;
}

.hero-image {
    width: 100%;
    max-width: 1000px;
    perspective: 2000px;
}

.glass-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px;
    border-radius: 20px;
    box-shadow: 0 40px 80px var(--card-shadow);
    transform: rotateX(5deg);
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#app-preview {
    width: 100%;
    display: block;
    cursor: zoom-in;
    border-radius: 12px;
}

/* Sections */
.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 4rem;
    letter-spacing: -1px;
}

.section-title span {
    color: var(--accent-red);
}

/* Loss Grid */
.loss-grid {
    padding: 100px 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    padding: 3rem 2rem;
    border-radius: 24px;
    text-align: center;
}

.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.card .icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
}

.card h3 {
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

/* Detailed Features Section */
.detailed-features {
    padding: 100px 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.feat-item {
    padding: 2.5rem 2rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.feat-item:hover {
    transform: translateY(-8px);
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

.feat-item h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feat-item p {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* CTA Final */
.cta-final {
    padding: 100px 0 150px;
    text-align: center;
}

.cta-final .container {
    padding: 5rem 2rem;
    border-radius: 32px;
}

footer {
    padding: 60px 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-secondary);
}

footer a {
    color: var(--accent-blue);
    text-decoration: none;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 1100px;
    border-radius: 12px;
    animation: zoom 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes zoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
}

/* Responsive Overrides */
@media (max-width: 992px) {

    .nav-cta-btn,
    .lang-switcher {
        display: none;
    }

    .hamburger {
        display: flex;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 120px 0 40px;
    }

    .loss-grid,
    .detailed-features,
    .cta-final {
        padding: 60px 0;
    }

    .cards,
    .feature-grid {
        grid-template-columns: 1fr;
    }

    .cta-final .container {
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-ctas .btn {
        width: 100%;
    }

    .btn-large {
        padding: 1rem 1.5rem;
    }
}