/* index.css - Mengya Brand Showcase Page Style System */

:root {
    /* Color Palette */
    --color-primary: #011604;
    --color-primary-light: #1e6822;
    --color-secondary: #20a040;
    /* Blue button color in screenshot */
    --color-secondary-hover: #1e6822;
    --color-accent-blue: #3b82f6;
    --color-accent-blue-rgb: 59, 130, 246;
    --color-accent-green: #10b981;
    --color-accent-green-rgb: 16, 185, 129;
    --color-accent-green-light: #e6fcf5;
    --color-accent-blue-light: #eef2ff;

    /* Brand Green Gradient (from logo) */
    --color-logo-green-start: #8ae33b;
    --color-logo-green-end: #20a040;
    --color-logo-green: #3da600;
    --color-logo-green-rgb: 61, 166, 0;
    --color-logo-green-light: #f0fdf4;

    /* Premium Red Palette (for Card 2) */
    --color-accent-red: #ef4444;
    --color-accent-red-hover: #dc2626;
    --color-accent-red-rgb: 239, 68, 68;
    --color-accent-red-light: #fef2f2;

    /* Text Colors */
    --text-title: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --text-white: #ffffff;

    /* System Colors */
    --bg-light: #f8fafc;
    --card-border: rgba(226, 232, 240, 0.8);
    --card-shadow: 0 10px 30px -10px rgba(2, 12, 27, 0.05);
    --card-shadow-hover: 0 20px 40px -15px rgba(2, 12, 27, 0.12);

    /* Font Stacks */
    --font-primary: 'Inter', 'Noto Sans SC', sans-serif;
    --font-heading: 'Outfit', 'Noto Sans SC', sans-serif;

    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.2s ease;
}

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

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-light);
    color: var(--text-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Design: Grid & Glow Effects */
.grid-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center center;
    mask-image: radial-gradient(ellipse at 50% 30%, black 60%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 60%, transparent 100%);
}

.ambient-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
    animation: pulseGlow 10s infinite alternate ease-in-out;
}

.glow-1 {
    top: -10%;
    left: 10%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(var(--color-accent-blue-rgb), 0.15) 0%, transparent 70%);
}

.glow-2 {
    bottom: -10%;
    right: 10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(var(--color-accent-green-rgb), 0.1) 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes pulseGlow {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.1) translate(30px, 30px);
    }
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(255, 255, 255, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    transition: var(--transition-smooth);
}

.header.scrolled {
    /* padding: 0.5rem 0; */
    background-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 0.75rem;
}

.brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: -0.5px;
}


.quick-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    background-color: var(--color-secondary);
    color: var(--text-white);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.quick-link-btn:hover {
    background-color: var(--color-secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 52, 138, 0.2);
}

.mobile-only-action {
    display: none !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 2rem 3rem 2rem;
    gap: 1rem;
    text-align: center;
    overflow: hidden;
}

.hero-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    /* background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px; */
    /* padding: 1rem 2.5rem 1rem 2.5rem; */
    /* box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.01),
        0 30px 60px -15px rgba(2, 12, 27, 0.06); */
}

/* Background transition layers */
.hero-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 5s ease-out;
    pointer-events: none;
}

/* Semi-transparent overlay to merge images into the page background */
.hero-bg-layer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 50%);
    pointer-events: none;
}

.hero-bg-layer.active {
    opacity: 0.85;
    transform: scale(1);
}

/* Slide Specific Heading Gradients */
.carousel-slide[data-bg="0"] .hero-title {
    background-image: linear-gradient(135deg, #ffffff 30%, #a7f3d0 100%);
}

.carousel-slide[data-bg="1"] .hero-title {
    background-image: linear-gradient(135deg, #ffffff 30%, #93c5fd 100%);
}

/* Carousel Inner Track and Slides */
.carousel-track {
    position: relative;
    width: 100%;
    min-height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.carousel-slide.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dots Navigation */
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    position: relative;
    z-index: 20;
}

.carousel-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(15, 23, 42, 0.12);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.carousel-dots .dot:hover {
    background-color: rgba(15, 23, 42, 0.25);
    transform: scale(1.2);
}

/* Custom Active Dot Styles per Slide Theme */
.carousel-dots .dot.active[data-index="0"] {
    width: 24px;
    border-radius: 4px;
    background-color: var(--color-logo-green);
    box-shadow: 0 0 10px rgba(61, 166, 0, 0.3);
}

.carousel-dots .dot.active[data-index="1"] {
    width: 24px;
    border-radius: 4px;
    background-color: var(--color-accent-blue);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.carousel-dots .dot.active[data-index="2"] {
    width: 24px;
    border-radius: 4px;
    background-color: var(--color-accent-red);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* Badge Styling */
.badge-wrapper {
    display: inline-flex;
    margin-bottom: 2rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12) 0%, rgba(217, 119, 6, 0.06) 100%);
    border: 1px solid rgba(180, 83, 9, 0.25);
    color: #b45309;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    letter-spacing: 1px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 4px rgba(180, 83, 9, 0.04);
}

.badge-icon {
    width: 14px;
    height: 14px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.75rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    letter-spacing: -1px;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    display: inline-block;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.45));
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-white);
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.9;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

/* Products Section */
.products-section {
    padding: 2rem 2rem 6rem 2rem;
}

.products-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Card Design Styling */
.product-card {
    background-color: var(--text-white);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
    border-color: rgba(226, 232, 240, 1);
}

/* Subtle glow effect behind cards on hover */
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-logo-green:hover .card-glow {
    opacity: 1;
    background: radial-gradient(circle 250px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(var(--color-logo-green-rgb), 0.08) 0%, transparent 80%);
}

.card-red:hover .card-glow {
    opacity: 1;
    background: radial-gradient(circle 250px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(var(--color-accent-red-rgb), 0.08) 0%, transparent 80%);
}

.card-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.icon-box {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.icon-box svg {
    width: 32px;
    height: 32px;
}

.icon-logo-green {
    background-color: var(--color-logo-green-light);
    color: var(--color-logo-green);
    border: 1px solid rgba(var(--color-logo-green-rgb), 0.1);
}

.icon-red {
    background-color: var(--color-accent-red-light);
    color: var(--color-accent-red);
    border: 1px solid rgba(var(--color-accent-red-rgb), 0.1);
}

.product-card:hover .icon-box {
    transform: scale(1.1) rotate(2deg);
}

.title-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-title);
    letter-spacing: -0.5px;
}

/* Tag/Badge inside cards */
.tag {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.tag-logo-green {
    background-color: var(--color-logo-green-light);
    color: var(--color-logo-green);
}

.tag-red {
    background-color: var(--color-accent-red-light);
    color: var(--color-accent-red);
}

.card-desc {
    font-size: 1.02rem;
    color: var(--text-body);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

/* Feature highlight box */
.feature-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    margin-bottom: 0.65rem;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}

.box-logo-green {
    background-color: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.box-logo-green:hover {
    border-color: rgba(var(--color-logo-green-rgb), 0.2);
    background-color: rgba(var(--color-logo-green-rgb), 0.02);
}

.box-red {
    background-color: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.box-red:hover {
    border-color: rgba(var(--color-accent-red-rgb), 0.2);
    background-color: rgba(var(--color-accent-red-rgb), 0.02);
}

.feature-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 16px;
    height: 16px;
}

.bg-green {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-accent-green);
}

.bg-logo-green {
    background-color: var(--color-logo-green-light);
    color: var(--color-logo-green);
}

.text-green-accent {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-accent-green);
}

.text-red-accent {
    background-color: var(--color-accent-red-light);
    color: var(--color-accent-red);
}

.feature-text {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-title);
}

/* Card CTA Buttons */
.card-btn {
    width: 100%;
    padding: 1.1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
    border: 2px solid transparent;
}

.btn-logo-green-filled {
    background: linear-gradient(135deg, var(--color-logo-green-start) 0%, var(--color-logo-green-end) 100%);
    color: var(--text-white);
    border: 0;
}

.btn-logo-green-filled:hover {
    background: linear-gradient(135deg, var(--color-logo-green-start) 0%, var(--color-logo-green-end) 100%);
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(61, 166, 0, 0.2);
}

.btn-red-outline {
    background-color: transparent;
    border-color: var(--color-accent-red);
    color: var(--color-accent-red);
}

.btn-red-outline:hover {
    background-color: var(--color-accent-red-light);
    border-color: var(--color-accent-red-hover);
    color: var(--color-accent-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.08);
}

/* Button micro-animations */
.btn-arrow,
.btn-arrow-external {
    width: 18px;
    height: 18px;
    transition: var(--transition-smooth);
}

.card-btn:hover .btn-arrow {
    transform: translateX(5px);
}

.card-btn:hover .btn-arrow-external {
    transform: translate(3px, -3px);
}



/* Footer Section */
.footer {
    background-color: var(--color-primary);
    color: #94a3b8;
    padding: 0rem 2rem 2rem 2rem;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand {
    max-width: 320px;
}

.footer-brand .logo-area {
    margin-bottom: 1.5rem;
}

.footer-brand .brand-name {
    color: var(--text-white);
}

.brand-desc-footer {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links {
    display: flex;
    gap: 5rem;
}

.link-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.link-group h4 {
    color: var(--text-white);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.link-group a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.link-group a:hover {
    color: var(--text-white);
}

.wechat-tag {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    background-color: var(--color-primary-light);
    color: var(--text-white);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 0.8rem;
}

.footer-bottom a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-bottom a:hover {
    color: var(--text-white);
    text-decoration: underline;
}

/* Stagger Animation Base Classes */
.animate-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-item.appear {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Rules */
@media (max-width: 1024px) {
    .products-grid {
        gap: 2rem;
    }

    .product-card {
        padding: 2.5rem;
    }

    .hero-title {
        font-size: 2.75rem;
    }
}

@media (max-width: 900px) {
    .footer-container {
        flex-direction: column;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .header-actions {
        display: none;
        /* Hide header actions button on mobile to prevent layout issues */
    }

    .mobile-only-action {
        display: inline-flex !important;
        margin-top: 1rem;
        width: 100%;
        max-width: 250px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        max-width: 550px;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .carousel-track {
        min-height: 240px;
    }

    .product-card {
        padding: 2rem;
    }
}