:root {
    --bg: #0B1220;
    --surface: #111827;
    --border: #22304a;
    --text: #E5E7EB;
    --muted: #94A3B8;
    --accent: #22C55E;
    --accent-hover: #16A34A;
    --accent-fg: #052e16;
    
    /* Animation variables */
    --timing-fast: 240ms;
    --timing-medium: 320ms;
    --timing-slow: 480ms;
    --easing-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --easing-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #F8FAFC;
        --surface: #FFFFFF;
        --border: #E2E8F0;
        --text: #1F2937;
        --muted: #6B7280;
        --accent: #22C55E;
        --accent-hover: #16A34A;
        --accent-fg: #FFFFFF;
    }
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    background-image: radial-gradient(circle at 20% 50%, rgba(34, 197, 94, 0.1) 0%, transparent 50%), radial-gradient(circle at 80% 20%, rgba(34, 197, 94, 0.05) 0%, transparent 50%);
    min-height: 100vh;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--surface);
    color: var(--text);
    padding: 8px;
    text-decoration: none;
    z-index: 1000;
    border: 1px solid var(--border);
}

.skip-link:focus {
    top: 6px;
}

*:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Header with sticky show/hide */
header {
    padding: 20px 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: transform var(--timing-medium) var(--easing-ease);
}

header.header--hidden {
    transform: translateY(-100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform var(--timing-fast) var(--easing-ease);
}

.logo:hover {
    transform: scale(1.02);
}

.logo img {
    width: 32px;
    height: 32px;
}

/* Navigation */
.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color var(--timing-fast) var(--easing-ease);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--timing-medium) var(--easing-ease);
}

.nav-link:hover {
    color: var(--accent);
}

.nav-link:hover::after {
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all var(--timing-fast) var(--easing-ease);
    cursor: pointer;
    border: none;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--accent);
    color: var(--accent-fg);
}

.btn-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    padding: 8px 12px;
    border: 1px solid var(--border);
    transition: all var(--timing-fast) var(--easing-ease);
}

/* Hero section */
.hero {
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.parallax {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    transition: transform var(--timing-fast) linear;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 24px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
}

.hero p {
    font-size: 1.2rem;
    color: var(--muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Animation: Hero items initial state */
[data-animate="hero-item"] {
    opacity: 0;
    transform: translateY(12px);
    transition: all var(--timing-medium) var(--easing-ease);
}

[data-animate="hero-item"].is-loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Animation: Scroll reveal */
[data-animate="reveal"] {
    opacity: 0;
    transform: translateY(12px);
    transition: all var(--timing-medium) var(--easing-ease);
}

[data-animate="reveal"].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Cards with hover tilt */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    position: relative;
    transition: all var(--timing-fast) var(--easing-ease);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card:hover {
    transform: perspective(1000px) rotateX(2deg) rotateY(2deg) translateZ(4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

/* Stats section */
.stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    margin: 60px 0;
}

.stat {
    text-align: center;
}

.count {
    font-size: 3rem;
    font-weight: bold;
    color: var(--accent);
    display: block;
}

/* FAQ Accordion */
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.faq-button {
    width: 100%;
    padding: 24px;
    background: none;
    border: none;
    text-align: left;
    color: var(--text);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color var(--timing-fast) var(--easing-ease);
}

.faq-button:hover {
    background: var(--bg);
}

.faq-button::after {
    content: '+';
    font-size: 24px;
    color: var(--accent);
    transition: transform var(--timing-fast) var(--easing-ease);
}

.faq-button[aria-expanded="true"]::after {
    transform: rotate(45deg);
}

.faq-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all var(--timing-medium) var(--easing-ease);
}

.faq-content.open {
    max-height: 200px;
    opacity: 1;
    padding: 0 24px 24px;
}

/* Logo Marquee */
.marquee {
    overflow: hidden;
    padding: 40px 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.marquee-content {
    display: flex;
    animation: scroll-left 20s linear infinite;
    gap: 60px;
    align-items: center;
}

.marquee:hover .marquee-content {
    animation-play-state: paused;
}

.marquee-item {
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

@keyframes scroll-left {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color var(--timing-fast) var(--easing-ease);
}

.mobile-menu-toggle:hover {
    background-color: var(--border);
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: currentColor;
    margin: 5px 0;
    transition: 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Responsive - Tablet (max-width: 768px) */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    header {
        padding: 16px 0;
    }
    
    .nav {
        flex-direction: column;
        gap: 16px;
        position: relative;
    }
    
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        top: 0;
        right: 0;
    }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 16px;
        padding: 20px 0;
        border-top: 1px solid var(--border);
        margin-top: 16px;
    }
    
    .nav-links.mobile-open {
        display: flex;
    }
    
    .nav-link {
        padding: 12px 16px;
        text-align: center;
        border-radius: 8px;
        transition: all var(--timing-fast) var(--easing-ease);
    }
    
    .nav-link:hover {
        background-color: var(--border);
    }
    
    .nav-link::after {
        display: none;
    }
    
    .hero {
        padding: 60px 0;
        text-align: center;
    }
    
    .hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
        margin-bottom: 20px;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 32px;
        padding: 0 16px;
    }
    
    .stats {
        flex-direction: column;
        gap: 32px;
        padding: 0 16px;
    }
    
    .card {
        padding: 24px;
        margin-bottom: 20px;
    }
    
    .card:hover {
        transform: scale(1.01);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    }
    
    .btn {
        min-height: 44px;
        padding: 14px 20px;
        font-size: 16px;
    }
    
    .faq-button {
        padding: 20px;
        font-size: 16px;
        min-height: 44px;
    }
    
    .faq-content.open {
        max-height: 300px;
        padding: 0 20px 20px;
    }
    
    .marquee {
        padding: 32px 0;
    }
    
    .marquee-content {
        gap: 40px;
    }
}

/* Responsive - Mobile (max-width: 480px) */
@media (max-width: 480px) {
    body {
        overflow-x: hidden;
    }
    
    .container {
        padding: 0 12px;
        max-width: 100%;
        margin: 0 auto;
    }
    
    header {
        padding: 12px 0;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .logo img {
        width: 24px;
        height: 24px;
    }
    
    /* Fix navigation tabs for mobile */
    .nav-links {
        gap: 4px;
        padding: 12px 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 14px;
        min-height: 40px;
        white-space: nowrap;
        flex: 0 1 auto;
        margin: 2px;
        border-radius: 20px;
        background-color: var(--surface);
        border: 1px solid var(--border);
    }
    
    .nav-link:hover,
    .nav-link:focus {
        background-color: var(--primary);
        color: white;
        border-color: var(--primary);
    }
    
    .hero {
        padding: 40px 0;
        max-width: 100%;
        overflow: hidden;
    }
    
    .hero h1 {
        font-size: clamp(1.75rem, 10vw, 2.5rem);
        margin-bottom: 16px;
        line-height: 1.2;
        word-wrap: break-word;
        hyphens: auto;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 28px;
        padding: 0;
        line-height: 1.5;
        word-wrap: break-word;
    }
    
    .stats {
        gap: 24px;
        margin: 40px 0;
    }
    
    .stat {
        padding: 0 12px;
    }
    
    .count {
        font-size: 2.25rem;
    }
    
    .card {
        padding: 16px;
        border-radius: 8px;
        margin-bottom: 16px;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .card h2,
    .card h3 {
        font-size: 1.25rem;
        margin-bottom: 12px;
        word-wrap: break-word;
    }
    
    .btn {
        min-height: 48px;
        padding: 16px 24px;
        font-size: 16px;
        border-radius: 8px;
    }
    
    .btn-ghost {
        padding: 12px 16px;
        min-height: 44px;
    }
    
    .faq-button {
        padding: 16px;
        font-size: 16px;
        min-height: 48px;
    }
    
    .faq-button::after {
        font-size: 20px;
    }
    
    .faq-content.open {
        padding: 0 16px 16px;
    }
    
    .marquee {
        padding: 24px 0;
    }
    
    .marquee-content {
        gap: 32px;
    }
    
    .marquee-item {
        font-size: 14px;
    }
    
    /* Touch-friendly form elements */
    input,
    textarea,
    select,
    button {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Improved text readability on small screens */
    body {
        font-size: 16px;
        line-height: 1.5;
    }
    
    /* Better spacing for mobile */
    .nav-links {
        gap: 8px;
        padding: 16px 0;
    }
    
    .nav-link {
        padding: 16px;
        font-size: 16px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile-specific utilities */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    .mobile-center {
        text-align: center !important;
    }
    
    .mobile-full-width {
        width: 100% !important;
    }
    
    .mobile-no-margin {
        margin: 0 !important;
    }
    
    .mobile-stack {
        flex-direction: column !important;
        gap: 16px !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .parallax {
        transform: none !important;
    }
    
    header.header--hidden {
        transform: none;
    }
    
    .card:hover {
        transform: scale(1.01);
    }
    
    .marquee-content {
        animation: none;
        justify-content: center;
    }
    
    [data-animate="hero-item"],
    [data-animate="reveal"] {
        opacity: 1;
        transform: none;
    }
}
