/* ============================================
   GUANMU Global Website - Main Stylesheet
   ============================================ */

/* Import Design System */
@import url('variables.css');
@import url('components.css');

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&family=Outfit:wght@400;500;600;700&display=swap');

/* ============================================
   Hero Section
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 5rem;
    /* Account for fixed header */
    overflow: hidden;
}

.hero__background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-negative);
}

/* Subtle Grid Background for Light Theme */
.hero__grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(30, 64, 175, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(30, 64, 175, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

/* Soft Gradient Orbs for Light Theme */
.hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
    animation: float 25s ease-in-out infinite;
}

.hero__orb--1 {
    width: 600px;
    height: 600px;
    background: var(--color-primary);
    top: -200px;
    right: -100px;
}

.hero__orb--2 {
    width: 500px;
    height: 500px;
    background: var(--color-secondary);
    bottom: -150px;
    left: -80px;
    animation-delay: -10s;
}

.hero__orb--3 {
    width: 300px;
    height: 300px;
    background: var(--color-accent);
    top: 40%;
    left: 15%;
    animation-delay: -5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

.hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    padding: var(--space-4);
}

.hero__eyebrow {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--radius-full);
    color: var(--color-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    letter-spacing: var(--tracking-wide);
    margin-bottom: var(--space-4);
}

.hero__title {
    font-family: var(--font-display);
    font-size: var(--text-7xl);
    font-weight: var(--font-bold);
    line-height: 1.1;
    letter-spacing: var(--tracking-tight);
    margin-bottom: var(--space-4);
}

.hero__title-line {
    display: block;
}

.hero__subtitle {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto var(--space-6);
    line-height: var(--leading-relaxed);
}

.hero__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.hero__scroll {
    position: absolute;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    color: var(--text-muted);
    font-size: var(--text-sm);
    animation: bounce 2s ease-in-out infinite;
}

.hero__scroll-icon {
    width: 1.5rem;
    height: 1.5rem;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* ============================================
   Stats Section
   ============================================ */

.stats-section {
    position: relative;
    padding: var(--space-10) 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

/* ============================================
   Solutions Section
   ============================================ */

.solutions-section {
    padding: var(--space-12) 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-8);
}

.section-header__eyebrow {
    color: var(--color-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-widest);
    margin-bottom: var(--space-2);
}

.section-header__title {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-3);
}

.section-header__description {
    color: var(--text-secondary);
    font-size: var(--text-lg);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
}

/* ============================================
   Products Section
   ============================================ */

.products-section {
    padding: var(--space-12) 0;
    background: var(--bg-tertiary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

/* ============================================
   CTA Banner
   ============================================ */

.cta-banner {
    padding: var(--space-10) 0;
}

/* ============================================
   Page Header (for inner pages)
   ============================================ */

.page-header {
    position: relative;
    padding-top: calc(5rem + var(--space-12));
    padding-bottom: var(--space-10);
    text-align: center;
    background-color: var(--color-primary-dark, #1a365d);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

/* Dark overlay for better text readability */
.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(26, 54, 93, 0.55) 0%,
            rgba(30, 64, 100, 0.45) 50%,
            rgba(24, 90, 60, 0.4) 100%);
    z-index: 1;
}

/* Ensure content is above overlay */
.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header__title {
    font-size: var(--text-5xl);
    margin-bottom: var(--space-3);
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.page-header__description {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-lg);
    max-width: 600px;
    margin: 0 auto;
}

/* Page-specific backgrounds - replace with real images when available */
.page-header--solutions {
    background-image: url('/images/headers/solutions.jpg');
}

.page-header--products {
    background-image: url('/images/headers/products.jpg');
}

.page-header--technology {
    background-image: url('/images/headers/technology.jpg');
}

.page-header--about {
    background-image: url('/images/headers/about.jpg');
}

.page-header--contact {
    background-image: url('/images/headers/contact.jpg');
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    margin-bottom: var(--space-4);
}

.breadcrumb__link {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb__link:hover {
    color: #ffffff;
}

.breadcrumb__separator {
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb__current {
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-sm);
}

/* ============================================
   Utilities
   ============================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* ============================================
   About Section
   ============================================ */

.about-section {
    background: var(--bg-primary);
    overflow: hidden;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-8);
    align-items: center;
}

.about-text {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.about-features {
    display: grid;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.feature-item {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
}

.feature-item__icon {
    width: 2rem;
    height: 2rem;
    color: var(--color-primary);
    flex-shrink: 0;
}

.feature-item__text {
    color: var(--text-secondary);
    font-size: var(--text-base);
}

.feature-item__text strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.about-visual {
    position: relative;
}

.image-wrapper {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    border: 1px solid var(--border-subtle);
}

.about-image {
    width: 100%;
    transform: scale(1.01);
    transition: transform var(--transition-slow);
}

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

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-4);
    background: linear-gradient(to top, rgba(10, 14, 26, 0.8), transparent);
}

.overlay-stat {
    display: inline-flex;
    flex-direction: column;
    background: var(--bg-card);
    /* Changed from var(--glass) to fix potential missing variable */
    backdrop-filter: blur(10px);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.overlay-stat__num {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--color-primary);
}

.overlay-stat__label {
    font-size: var(--text-xs);
    text-transform: uppercase;
}

.cert-logos {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
    flex-wrap: wrap;
}

.cert-placeholder {
    padding: 0.5rem 1rem;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1279px) {
    .hero__title {
        font-size: var(--text-5xl);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1023px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .hero {
        min-height: auto;
        padding-top: calc(5rem + var(--space-4));
        /* Reduced from space-8 */
        padding-bottom: var(--space-8);
    }

    .hero__title {
        font-size: var(--text-3xl);
        line-height: 1.2;
    }

    .hero__subtitle {
        font-size: var(--text-base);
        /* Reduced from lg for better readability */
    }

    .hero__actions {
        flex-direction: column;
        gap: var(--space-2);
    }

    .hero__actions .btn {
        width: 100%;
        padding: 0.875rem 1rem;
        /* Ensure touch target is large enough */
    }

    .hero__scroll {
        display: none;
    }

    .stats-grid,
    .solutions-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
        /* Increased gap for visual separation */
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .page-header {
        padding-top: calc(5rem + var(--space-4));
        /* Reduced from space-8 */
        padding-bottom: var(--space-6);
    }

    .page-header__title {
        font-size: var(--text-3xl);
    }

    /* About Section - Stack vertically on mobile */
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .about-visual {
        order: -1;
        /* Image first on mobile */
    }

    .about-text {
        font-size: var(--text-base);
    }

    /* Make floating contact button smaller on mobile */
    .floating-contact {
        bottom: var(--space-3);
        right: var(--space-3);
    }

    /* Footer - More compact on mobile */
    .site-footer {
        padding-top: var(--space-6);
        padding-bottom: var(--space-4);
    }

    .footer-brand__desc {
        font-size: var(--text-sm);
        margin-bottom: var(--space-2);
    }

    .footer-nav__title {
        font-size: var(--text-sm);
        margin-bottom: var(--space-2);
    }

    .footer-nav__link {
        font-size: var(--text-xs);
    }

    .footer-bottom {
        padding-top: var(--space-3);
    }

    .footer-copyright {
        font-size: var(--text-xs);
    }
}