@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* Dark Theme (Default) */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #161616;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent: #d4af37;
    --accent-bright: #ffdf7e;
    --accent-glow: rgba(212, 175, 55, 0.15);
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(15px);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --radius-sm: 10px;
    --radius-md: 20px;
    --radius-lg: 30px;
    --radius-xl: 40px;
    
    --container-width: 1600px;
    --section-padding: 10rem 0;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.4s ease, color 0.4s ease;
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 1rem;
}

.card, .btn, header, footer {
    transition: var(--transition-smooth), background-color 0.4s ease, border-color 0.4s ease;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-family: 'Outfit', sans-serif; font-weight: 900; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 2rem; }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-family: 'Outfit', sans-serif; font-weight: 800; line-height: 1.2; margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); font-family: 'Outfit', sans-serif; font-weight: 800; line-height: 1.3; }

p {
    font-size: clamp(1rem, 1.2vw, 1.375rem);
    max-width: 80ch;
    line-height: 1.75;
    text-wrap: pretty;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

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

.section {
    padding: var(--section-padding);
}

/* Typography Helpers */
.gradient-text {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-bright) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-tag {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, var(--accent), var(--accent-bright));
    z-index: 3000;
}

/* Animations */
@keyframes pulse-soft {
    0% { transform: scale(1); box-shadow: 0 0 0 0 var(--accent-glow); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

@keyframes float-blob {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

.bg-blob {
    position: fixed;
    width: 500px;
    height: 500px;
    background: var(--accent-glow);
    filter: blur(100px);
    border-radius: 50%;
    z-index: -1;
    opacity: 0.3;
    animation: float-blob 20s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
    pointer-events: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    gap: 0.75rem;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
    box-shadow: 0 10px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px var(--accent-glow);
    background: var(--accent-bright);
}

.btn-outline {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: rgba(255,255,255,0.05);
    transform: translateY(-3px);
}

/* Header - Always Dark */
header {
    --header-bg: #0a0a0a;
    --header-text: #ffffff;
    --header-text-secondary: #a0a0a0;
    --header-glass: rgba(255, 255, 255, 0.03);
    --header-border: rgba(255, 255, 255, 0.08);

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000; /* Higher than other elements */
    padding: 1.5rem 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--header-text);
}

header.scrolled {
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--header-border);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
}

.logo img {
    height: 90px;
    width: auto;
    transition: var(--transition-smooth);
}

.logo:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px var(--accent));
}

[data-theme="light"] .logo {
    background: #0a0a0a;
    padding: 0.8rem 1.5rem;
    border-radius: 60px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.btn-icon {
    width: 45px;
    height: 45px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--header-glass);
    border: 1px solid var(--header-border);
    color: var(--header-text);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--header-text);
    font-size: 1.8rem;
    cursor: pointer;
}

/* Mobile Overlay - Hidden by default */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-primary);
    z-index: 3000;
    padding: 2.5rem;
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center; /* Center horizontally */
    justify-content: center; /* Center vertically */
    text-align: center;
}

.mobile-overlay.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.mobile-nav-links li {
    margin-bottom: 3rem; /* Increased for accessibility */
}

.mobile-nav-links a {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: block; /* Larger touch target */
    padding: 0.5rem 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4.5rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--header-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--header-text);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 25px;
}

@media (max-width: 991px) {
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
    background: radial-gradient(circle at 70% 30%, var(--accent-glow) 0%, transparent 50%);
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><path fill="%23d4af37" d="M44.7,-76.4C58.2,-69.2,69.7,-57.4,77.3,-43.8C84.8,-30.2,88.4,-15.1,87.6,-0.5C86.7,14.1,81.4,28.2,73.4,41.1C65.3,53.9,54.6,65.6,41.4,72.3C28.2,79.1,14.1,81,-0.4,81.7C-14.9,82.4,-29.8,81.9,-43.1,75.3C-56.3,68.7,-67.9,56,-75.7,41.6C-83.5,27.2,-87.4,11.1,-87.3,-5.1C-87.1,-21.2,-82.9,-37.4,-73.8,-50.2C-64.7,-63.1,-50.8,-72.6,-36.5,-79.3C-22.1,-86,-7.4,-89.9,7.4,-91.3C22.2,-92.7,31.2,-83.6,44.7,-76.4Z" transform="translate(100 100)" /></svg>') no-repeat;
    background-position: 110% -20%;
    background-size: 60%;
    opacity: 0.05;
    z-index: -1;
}

.hero-content {
    max-width: 1000px;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5.5rem);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
}

/* Cards */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card:hover {
    border-color: var(--accent);
    background: var(--bg-tertiary);
    transform: translateY(-10px);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.section-title {
    margin-bottom: 8rem;
}

/* Footer - Always Dark */
footer {
    --footer-bg: #111111;
    --footer-text: #ffffff;
    --footer-text-secondary: #a0a0a0;
    --footer-muted: #666666;
    --footer-border: rgba(255, 255, 255, 0.08);

    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 8rem 0 3rem;
    border-top: 1px solid var(--footer-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2.5fr 1fr 1fr 1fr;
    gap: 6rem;
    margin-bottom: 6rem;
}

.footer-about p {
    color: var(--footer-text-secondary);
    margin-top: 1.5rem;
    max-width: 300px;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--footer-text);
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--footer-muted);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--footer-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--footer-muted);
    font-size: 0.9rem;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1200px) {
    :root {
        --container-width: 100%;
    }
    .container {
        padding: 0 3rem;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 991px) {
    .section {
        padding: 6rem 0;
    }
    h1 { font-size: 3.5rem !important; }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .nav-links {
        display: none; /* Mobile menu needed */
    }

    /* Force 1 Column on All Grids */
    div[style*="display: grid"], 
    .footer-grid,
    .hero-content {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
        text-align: center;
    }

    .hero {
        padding-top: 120px;
        text-align: center;
    }

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

    .hero-btns {
        justify-content: center;
    }

    .section-title {
        margin-bottom: 4rem;
        text-align: center;
    }

    /* About Page Fixes */
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 3rem !important;
    }

    /* Contact Page Fixes */
    div[style*="grid-template-columns: 1.2fr 0.8fr"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 4rem !important;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .floating-funnel {
        bottom: 1.5rem;
        right: 1.5rem;
        gap: 0.8rem;
    }
    
    .float-btn {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }
}
