/* ==========================================================================
   1. CORE LIGHT TOKEN THEME ARCHITECTURE & EXACT MAPPINGS
   ========================================================================== */
:root {
    --bg-main: #fcfdfe;
    --bg-section: #ffffff;
    --bg-card: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-light: rgba(0, 0, 0, 0.06);
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* DEFAULT THEME MAP: Page 1 - Industrial Blue & Slate Grey */
    --theme-primary: #004b87;
    --theme-primary-grad: #2c6fa7;
    --theme-accent: #708090;
    --theme-glow: rgba(0, 75, 135, 0.07);
}

/* Theme 2 Mapping: Page 2 - Electric Lab Blue */
body.theme-2 {
    --theme-primary: #0052ff;
    --theme-primary-grad: #4d88ff;
    --theme-accent: #0036a3;
    --theme-glow: rgba(0, 82, 255, 0.07);
}

/* Theme 3 Mapping: Page 3 - Bio Chemical Green */
body.theme-3 {
    --theme-primary: #46c600;
    --theme-primary-grad: #66e01a;
    --theme-accent: #2e8500;
    --theme-glow: rgba(70, 198, 0, 0.08);
}

/* Theme 4 Mapping: Page 4 - Tech Orange & Deep Navy */
body.theme-4 {
    --theme-primary: #e57a00;
    --theme-primary-grad: #ff9d26;
    --theme-accent: #101e42;
    --theme-glow: rgba(229, 122, 0, 0.07);
}

/* Theme 5 Mapping: Page 5 - Premium Royal Purple */
body.theme-5 {
    --theme-primary: #6a2a85;
    --theme-primary-grad: #914ba0;
    --theme-accent: #431556;
    --theme-glow: rgba(106, 42, 133, 0.07);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.65;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: #0f172a;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Utility UI Assets */
.text-gradient {
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-grad));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: var(--transition-smooth);
}

.badge {
    background: var(--theme-glow);
    border: 1px solid rgba(0, 0, 0, 0.02);
    color: var(--theme-primary);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-block;
    transition: var(--transition-smooth);
}

.sub-title {
    display: inline-block;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    color: var(--theme-primary);
    transition: var(--transition-smooth);
}

.section-header { margin-bottom: 50px; }
.text-center { text-align: center; }

.header-line {
    width: 50px;
    height: 4px;
    background: var(--theme-primary);
    margin-top: 12px;
    border-radius: 2px;
    transition: var(--transition-smooth);
}
.header-line.center { margin: 12px auto 0; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-grad));
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--theme-glow);
}

.btn-secondary {
    background: #ffffff;
    color: var(--text-main);
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-left: 16px;
}
.btn-secondary:hover {
    background: #f8fafc;
    border-color: rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   2. FIXED BLURRED HEADER & IDENTITY SELECTOR PANEL
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 110px;
}

.logo img {
    height: 90px;
    width: 230px;
    object-fit: contain;
    display: block;
    transition: var(--transition-smooth);
}

.brand-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.04);
}
.brand-selector-wrapper label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}
.premium-select {
    border: none;
    background: transparent;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    outline: none;
    font-size: 0.85rem;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    align-items: center;
}
.nav-menu ul li { margin-left: 28px; }
.nav-menu ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-smooth);
    font-size: 0.95rem;
}
.nav-menu ul li a:hover, .nav-menu ul li a.active {
    color: var(--theme-primary);
}
.nav-menu ul li a.btn-nav {
    border: 1px solid var(--theme-primary);
    color: var(--theme-primary);
    padding: 8px 18px;
    border-radius: 6px;
}
.nav-menu ul li a.btn-nav:hover {
    background: var(--theme-primary);
    color: #ffffff !important;
}

.mobile-nav-toggle { display: none; }

/* ==========================================================================
   3. CHEMICAL Industry EFFECTS: HERO COMPOUND PARTICLES
   ========================================================================== */
.hero-section {
    position: relative;
    padding: 240px 0 160px;
    background: radial-gradient(circle at 85% 30%, var(--theme-glow) 0%, transparent 60%);
    transition: var(--transition-smooth);
}

.chem-particle-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

/* Floating Compound Solution Atom FX */
.bubble {
    position: absolute;
    border-radius: 50%;
    background: var(--theme-glow);
    border: 1.5px solid var(--theme-primary);
    opacity: 0.25;
    animation: floatUp 12s infinite linear;
    transition: background 0.5s ease, border-color 0.5s ease;
}

.bubble-1 { width: 40px; height: 40px; left: 15%; animation-duration: 14s; animation-delay: 1s; }
.bubble-2 { width: 25px; height: 25px; left: 45%; animation-duration: 18s; animation-delay: 0s; }
.bubble-3 { width: 60px; height: 60px; left: 75%; animation-duration: 22s; animation-delay: 3s; }
.bubble-4 { width: 30px; height: 30px; left: 85%; animation-duration: 12s; animation-delay: 5s; }

@keyframes floatUp {
    0% { transform: translateY(105vh) scale(0.8) rotate(0deg); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-15vh) scale(1.2) rotate(360deg); opacity: 0; }
}

.hero-content { position: relative; z-index: 5; max-width: 820px; }
.hero-content h1 {
    font-size: 3.6rem;
    line-height: 1.15;
    margin-top: 16px;
    margin-bottom: 24px;
    letter-spacing: -1px;
}
.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 680px;
}

.hero-waves {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}
.hero-waves svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}
.hero-waves .shape-fill { fill: #f8fafc; }

/* ==========================================================================
   4. ABOUT PROFILE LAYOUT
   ========================================================================== */
.about-section {
    padding: 100px 0;
    background-color: #f8fafc;
}

.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 { font-size: 1.7rem; margin-bottom: 16px; }
.about-text p { color: var(--text-muted); margin-bottom: 20px; }

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 36px;
}
.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.01);
}
.stat-card h4 { font-size: 2.6rem; color: var(--theme-primary); transition: var(--transition-smooth); }
.stat-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0; }

.about-features { display: flex; flex-direction: column; gap: 20px; }
.feature-box {
    display: flex;
    gap: 20px;
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
}
.feature-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
    border-color: var(--theme-primary);
}
.feature-box .icon-wrap { font-size: 1.8rem; }
.feature-box h4 { font-size: 1.15rem; margin-bottom: 4px; }
.feature-box p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0; }

/* ==========================================================================
   5. CHEMICAL FX: MOLECULAR SCHEMATIC PLOTTER & LIQUID CARDS
   ========================================================================== */
.industries-section { 
    position: relative;
    padding: 120px 0; 
    background: #ffffff; 
}

/* Blueprint Laboratory Dot Mesh Overlay */
.molecular-grid-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(var(--border-light) 1.5px, transparent 1.5px);
    background-size: 32px 32px;
    opacity: 0.6;
    pointer-events: none;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 5;
}

.premium-card {
    position: relative;
    background: var(--bg-card);
    padding: 44px 32px;
    border-radius: 16px;
    border: 1px solid var(--border-light);
    transition: var(--transition-smooth);
    overflow: hidden;
}

/* Dynamic Fluid-Filling Action */
.liquid-fill-effect {
    position: absolute;
    bottom: -100%; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, var(--theme-glow), transparent);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
    pointer-events: none;
}

.premium-card:hover .liquid-fill-effect {
    bottom: 0;
}

.premium-card:hover {
    transform: translateY(-6px);
    border-color: var(--theme-primary);
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.04);
}

.card-icon, .premium-card h3, .premium-card p { position: relative; z-index: 3; }
.card-icon { font-size: 2.2rem; margin-bottom: 20px; }
.premium-card h3 { font-size: 1.4rem; margin-bottom: 12px; }
.premium-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ==========================================================================
   6. CONTACT PANEL ARCHITECTURE
   ========================================================================== */
.contact-section { padding: 100px 0; background: #f8fafc; }
.contact-box {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.03);
    border: 1px solid var(--border-light);
}
.contact-info {
    padding: 60px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}
.contact-info h2 { color: #ffffff; font-size: 2.2rem; margin-bottom: 20px; }
.contact-info p { color: #94a3b8; margin-bottom: 36px; }

/* ==========================================================================
   CONTACT ALIGNMENT MATRIX RECONCILIATION
   ========================================================================== */
.info-links {
    display: flex;
    flex-direction: column;
    gap: 28px; /* Room between data lines */
    margin-top: 32px;
}

.info-item {
    display: flex;
    align-items: flex-start; /* Aligns the icon wrapper cleanly with multi-line addresses */
    gap: 20px;
    color: #ffffff;
}

.info-item .icon-circle {
    background: rgba(255, 255, 255, 0.07);
    width: 44px;
    height: 44px;
    min-width: 44px; /* Prevents compression on smaller responsive viewports */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 2px; /* Precision vertical micro-offset */
}

.info-text {
    display: flex;
    flex-direction: column;
    gap: 4px; /* Tight binding between labels and core content data */
}

.info-text strong {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--theme-primary-grad); /* Maps dynamic variant branding accent to text */
}

.info-text p {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 !important; /* Forces layout tracking reset from global rules */
}

.info-text a {
    color: #ffffff;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.info-text a:hover {
    color: var(--theme-primary-grad);
}

.contact-form-container { padding: 60px; }
.premium-form .form-group { margin-bottom: 20px; }
.premium-form label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
}
.premium-form input, .premium-form select, .premium-form textarea {
    width: 100%;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 6px;
    color: var(--text-main);
    font-family: inherit;
    transition: var(--transition-smooth);
}
.premium-form input:focus, .premium-form select:focus, .premium-form textarea:focus {
    outline: none;
    border-color: var(--theme-primary);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--theme-glow);
}
.btn-block { width: 100%; text-align: center; }

/* ==========================================================================
   7. FOOTER STRUCTURE
   ========================================================================== */
.main-footer { background: #0f172a; color: #ffffff; padding: 80px 0 0; }
.main-footer h3, .main-footer h4 { color: #ffffff; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand p { color: #94a3b8; max-width: 300px; margin-top: 12px; }
.footer-links h4, .footer-legal h4 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.5px; }
.footer-links ul, .footer-legal ul { list-style: none; }
.footer-links ul li, .footer-legal ul li { margin-bottom: 10px; }
.footer-links ul li a, .footer-legal ul li a { color: #94a3b8; text-decoration: none; transition: var(--transition-smooth); }
.footer-links ul li a:hover, .footer-legal ul li a:hover { color: #ffffff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); padding: 24px 0; font-size: 0.85rem; color: #64748b; }
.bottom-flex { display: flex; justify-content: space-between; }

/* ==========================================================================
   8. MEDIA QUERIES & RESPONSIVE VIEWPORT STACKING
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-content h1 { font-size: 3rem; }
    .contact-box { grid-template-columns: 1fr; }
    .contact-info { padding: 40px; }
}

@media (max-width: 768px) {
    /* 1. Header & Safe Area Adjustments */
    .header-container { height: 90px; }
    .logo img { height: 64px; width: 163px; }
    
    .brand-selector-wrapper { padding: 4px 8px; gap: 4px; }
    .brand-selector-wrapper label { display: none; }
    
    /* 2. Global Section Spacing Restructure */
    .hero-section {
        padding: 160px 0 100px; /* Reduces excessive top gap shown in image_79205d.png while saving breathable room */
        background-position: center;
    }
    
    .about-section {
        padding: 80px 0; /* Expanded room for text blocks */
    }

    .industries-section {
        padding: 80px 0; /* Balanced padding for grid section */
    }

    .contact-section {
        padding: 80px 0; /* Comfortable room for form layouts */
    }

    /* 3. Mobile Navigation Architecture */
    .mobile-nav-toggle {
        display: flex; flex-direction: column; justify-content: space-between;
        width: 26px; height: 18px; background: transparent; border: none; cursor: pointer; z-index: 1005;
    }
    .mobile-nav-toggle span { width: 100%; height: 2.5px; background-color: var(--text-main); border-radius: 2px; transition: 0.3s; }
    
    .mobile-nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .mobile-nav-toggle.active span:nth-child(2) { opacity: 0; }
    .mobile-nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    .nav-menu {
        position: fixed; top: 90px; left: -100%; width: 100%; height: calc(100vh - 90px);
        background: #ffffff; transition: var(--transition-smooth); border-top: 1px solid var(--border-light); z-index: 1000;
    }
    .nav-menu.active { left: 0; }
    .nav-menu ul { flex-direction: column; padding-top: 40px; }
    .nav-menu ul li { margin: 14px 0; width: 80%; text-align: center; }
    .nav-menu ul li a.btn-nav { display: block; }

    /* 4. Grid Stack Fixes */
    .about-grid { grid-template-columns: 1fr; gap: 48px; } /* Increased gap between text profile and feature cards */
    .card-grid { gap: 32px; } /* Adds deep breathing room between industrial sector blocks */
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .bottom-flex { flex-direction: column; gap: 10px; text-align: center; }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    .container { padding: 0 20px; } /* Consistent global side gutters */
    
    .header-container { padding: 0 16px; }
    .logo img { height: 50px; width: 127px; }
    
    /* Hero Breathing Room Updates */
    .hero-section {
        padding: 140px 0 80px; /* Balances fixed header offset perfectly on small screens */
    }
    .hero-content h1 { 
        font-size: 2.4rem; 
        line-height: 1.2;
        margin-bottom: 20px;
    }
    .hero-content p {
        margin-bottom: 32px;
    }
    
    /* Layout Stack Controls */
    .hero-actions { 
        display: flex; 
        flex-direction: column; 
        gap: 16px; /* Added tracking spacing between primary/secondary actions */
    }
    .btn {
        width: 100%;
        text-align: center;
    }
    .btn-secondary { 
        margin-left: 0; 
    }
    
    .stats-grid { grid-template-columns: 1fr; gap: 16px; }
    .contact-form-container { padding: 32px 20px; } /* Loosened compact padding around structural fields */
}