/* Modern Enhanced Design System for Origami EV Connect */

/* Advanced CSS Variables */
:root {
    /* Enhanced Color Palette - Green Energy Theme */
    --primary-color: #087CA7;
    --primary-dark: #065a7a;
    --primary-light: #2b9bc4;
    --secondary-color: #297373;
    --accent-color: #10B981; /* Green energy accent */
    --accent-orange: #F59E0B; /* Energy glow */
    --success-green: #059669;
    --eco-green: #34D399;
    --text-primary: #1E1E1E;
    --text-secondary: #666666;
    --text-light: #999999;
    --background-primary: #ffffff;
    --background-secondary: #f8f9fa;
    --background-dark: #0F172A;
    --background-darker: #020617;
    --border-color: #e0e0e0;

    /* Advanced Gradients */
    --gradient-primary: linear-gradient(135deg, #087CA7 0%, #297373 50%, #10B981 100%);
    --gradient-eco: linear-gradient(135deg, #10B981 0%, #34D399 50%, #6EE7B7 100%);
    --gradient-dark: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    --gradient-glow: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(8, 124, 167, 0.2) 100%);

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 30px rgba(16, 185, 129, 0.3);
    --shadow-glow-blue: 0 0 30px rgba(8, 124, 167, 0.3);

    /* Glass Morphism */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-blur: blur(20px);

    /* Typography */
    --font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Navigation with Glassmorphism */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-base);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 0;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px 0;
}

.nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Enhanced Logo */
.logo-svg {
    display: block;
    transition: var(--transition-base);
}

/* Logo maintains its appearance on scroll - no filter needed
   The logo's gradient background provides sufficient contrast */

.logo-text {
    display: flex;
    align-items: center;
    gap: 0;
    font-weight: 800;
    font-size: 24px;
    line-height: 1;
    position: relative;
}

.brand-origami,
.brand-connect {
    color: white;
}

.header.scrolled .brand-origami,
.header.scrolled .brand-connect {
    color: var(--text-primary);
}

.brand-ev {
    position: relative;
    background: var(--gradient-eco);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0 4px;
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.4)); }
    50% { filter: drop-shadow(0 0 16px rgba(16, 185, 129, 0.6)); }
}

/* Modern Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    color: white;
    font-weight: 500;
    font-size: 15px;
    position: relative;
    transition: var(--transition-fast);
    padding: 8px 0;
}

.header.scrolled .nav-link {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-eco);
    transition: width 0.3s ease;
}

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

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

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Parallax Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--background-darker);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-dark);
    opacity: 0.95;
    z-index: 1;
}

/* Animated Background Grid */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(16, 185, 129, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: grid-move 20s linear infinite;
    z-index: 0;
}

@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Floating Particles */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 50%;
    opacity: 0.6;
    animation: float-particle 15s infinite ease-in-out;
}

@keyframes float-particle {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0; }
    10% { opacity: 0.6; }
    50% { transform: translate(var(--tx), var(--ty)) scale(1.5); opacity: 0.8; }
    90% { opacity: 0.6; }
}

/* Hero Content */
.hero .container {
    position: relative;
    z-index: 10;
    max-width: 1400px;
    margin: 0 auto;
    padding: 120px 40px 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-content {
    color: white;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(16, 185, 129, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--eco-green);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    animation: fade-slide-down 0.8s ease-out;
}

@keyframes fade-slide-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: fade-slide-up 0.8s ease-out 0.2s both;
    color: white;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

@keyframes fade-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title .highlight {
    background: var(--gradient-eco);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-size: 20px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    animation: fade-slide-up 0.8s ease-out 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
    animation: fade-slide-up 0.8s ease-out 0.6s both;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
    animation: fade-slide-up 0.8s ease-out 0.8s both;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-base);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    background: var(--gradient-eco);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* Hero Visual with 3D Effect */
.hero-visual {
    position: relative;
    animation: fade-slide-left 0.8s ease-out 0.4s both;
}

@keyframes fade-slide-left {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl), var(--shadow-glow);
    transition: var(--transition-slow);
}

.hero-image-wrapper:hover {
    transform: scale(1.02) rotateY(5deg);
    box-shadow: var(--shadow-2xl), 0 0 60px rgba(16, 185, 129, 0.5);
}

.hero-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition-slow);
}

.hero-image-wrapper:hover img {
    transform: scale(1.05);
}

/* Floating Info Cards */
.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px 24px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 16px;
    animation: float-up-down 3s ease-in-out infinite;
}

@keyframes float-up-down {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.floating-card.card-1 {
    top: 10%;
    right: -10%;
    animation-delay: 0s;
}

.floating-card.card-2 {
    bottom: 15%;
    left: -5%;
    animation-delay: 1s;
}

.floating-card-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-eco);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.floating-card-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.floating-card-content p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* Energy Flow Animation */
.energy-flow {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.energy-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.5;
    animation: flow-energy 3s linear infinite;
}

@keyframes flow-energy {
    from { transform: translateX(-100%); opacity: 0; }
    20% { opacity: 0.5; }
    80% { opacity: 0.5; }
    to { transform: translateX(100%); opacity: 0; }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 60px;
        padding: 100px 32px 60px;
    }

    .hero-title {
        font-size: 48px;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .floating-card {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav {
        padding: 0 20px;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px 20px;
        gap: 4px;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        max-height: calc(100vh - 72px);
        overflow-y: auto;
        z-index: 9999;
    }

    .nav-links.mobile-menu-open {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .nav-link {
        color: #ffffff !important;
        padding: 16px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        text-align: left;
        font-size: 16px;
        font-weight: 500;
        opacity: 1 !important;
    }

    .nav-link:last-of-type {
        border-bottom: none;
    }

    .nav-links .btn {
        margin-top: 12px;
        width: 100%;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding: 100px 0 60px;
    }

    .hero .container {
        padding: 0 20px;
    }

    .hero-title {
        font-size: 32px;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 16px;
        line-height: 1.6;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 40px;
    }

    .stat-item {
        padding: 16px;
    }

    .stat-number {
        font-size: 32px;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 28px;
    height: 3px;
    background: white;
    transition: var(--transition-fast);
    border-radius: 2px;
    display: block;
}

.header.scrolled .mobile-menu-btn span {
    background: var(--accent-color);
}

/* Ensure hamburger is visible on both dark and light backgrounds */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex !important;
    }
}

.mobile-menu-btn.menu-open span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

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

.mobile-menu-btn.menu-open span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ========================================
   Brand Marquee Carousel - Mobile First
   ======================================== */

/* Brands Section */
.brands-section {
    padding: 60px 0;
    background: #0F172A;
    overflow: hidden;
}

@media (min-width: 768px) {
    .brands-section {
        padding: 100px 0;
    }
}

.brands-section .section-header {
    margin-bottom: 40px;
}

@media (min-width: 768px) {
    .brands-section .section-header {
        margin-bottom: 60px;
    }
}

.brands-section .section-title {
    color: #ffffff;
}

.brands-section .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

/* Bottom text area */
.brands-section .container:last-child p {
    color: rgba(255, 255, 255, 0.7) !important;
}

.brands-section .container:last-child strong {
    color: #ffffff;
}

/* Marquee Wrapper */
.brand-marquee-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 16px 0;
}

@media (min-width: 768px) {
    .brand-marquee-wrapper {
        padding: 20px 0;
    }
}

/* Fade edges - using solid color instead of variable */
.brand-marquee-wrapper::before,
.brand-marquee-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 2;
    pointer-events: none;
}

@media (min-width: 768px) {
    .brand-marquee-wrapper::before,
    .brand-marquee-wrapper::after {
        width: 100px;
    }
}

.brand-marquee-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #0F172A 0%, transparent 100%);
}

.brand-marquee-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #0F172A 0%, transparent 100%);
}

/* Marquee Container */
.brand-marquee {
    display: flex;
    width: max-content;
    animation: marquee 30s linear infinite;
}

.brand-marquee-reverse {
    animation: marquee-reverse 30s linear infinite;
}

/* Pause on hover */
.brand-marquee-wrapper:hover .brand-marquee {
    animation-play-state: paused;
}

/* Marquee Content */
.brand-marquee-content {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .brand-marquee-content {
        gap: 64px;
        padding: 0 32px;
    }
}

/* Brand Item */
.brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-name {
    font-size: 20px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

@media (min-width: 768px) {
    .brand-name {
        font-size: 28px;
        font-weight: 700;
    }
}

.brand-item:hover .brand-name {
    color: #10B981;
}

/* Keyframe Animations */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes marquee-reverse {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .brand-marquee {
        animation: none;
    }

    .brand-marquee-reverse {
        animation: none;
    }
}
