/* --- GLOBAL RESET & SYSTEM VARIABLES ---
 * PERF FIX: font-family moved OFF the universal selector (*) and onto body.
 * The * selector runs on every DOM node; adding font-family there forces the
 * engine to process the property for every element instead of inheriting once.
 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --brand-blue-primary: #0A4B93;
    --brand-text-light: #FFFFFF;
    --slogan-muted-white: #E2E8F0;
    --body-bg-neutral: #F8FAFC;
    --card-surface-white: #FFFFFF;
    --text-dark-charcoal: #1E293B;
    --border-soft-gray: #E2E8F0;
    --accent-whatsapp-green: #25D366;

    /* PERF: Transition duration as a variable — easy to disable site-wide */
    --transition-speed: 0.2s;
}

html { scroll-behavior: smooth; }

body {
    /* Font set here once; all children inherit — no redundant computation */
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background-color: var(--body-bg-neutral);
    color: var(--text-dark-charcoal);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ACCESSIBILITY + PERF: Users who prefer reduced motion get no transitions/animations */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- STRUCTURE REUSABLE CONTAINERS --- */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.section-heading {
    font-size: 2rem;
    color: var(--brand-blue-primary);
    margin-bottom: 30px;
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 14px;
    border-left: 5px solid var(--brand-blue-primary);
}

.section-heading.centered-title {
    text-align: center;
    border-left: none;
    padding-left: 0;
}

.section-subtitle {
    margin-bottom: 40px;
    color: #475569;
    font-size: 1.1rem;
}

/* --- STATUS BANNER (new — for contact.php redirect messages) --- */
.status-banner {
    padding: 14px 24px;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}
.status-success { background-color: #DCFCE7; color: #166534; }
.status-error   { background-color: #FEE2E2; color: #991B1B; }

/* --- HONEYPOT (anti-spam) ---
 * Kept out of an inline style attribute: the page's CSP has no
 * 'unsafe-inline' in style-src, so an inline style="..." is silently
 * dropped, leaving this field visible to real visitors.
 */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    overflow: hidden;
}

/* --- NAVIGATION HEADER --- */
.navbar-header {
    background-color: var(--brand-blue-primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    padding: 12px 0;
}

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

.logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo-img {
    height: 48px;
    width: auto;
    display: block;
    object-fit: contain;
}

.brand-text-wrapper { display: flex; flex-direction: column; }

.brand-title {
    color: var(--brand-text-light);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.brand-slogan {
    color: var(--slogan-muted-white);
    font-size: 0.8rem;
    font-weight: 400;
}

.navigation-menu { display: flex; gap: 20px; }

.navigation-menu a {
    color: var(--brand-text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color var(--transition-speed) ease;
}

.navigation-menu a:hover { background-color: rgba(255, 255, 255, 0.15); }
.navigation-menu i { display: none; }

/* --- HERO SECTION --- */
.hero-section {
    background: linear-gradient(rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0.5)),
                url('hero.png') center/cover no-repeat;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid var(--border-soft-gray);
    padding: 60px 20px;
}

.hero-inner-overlay {
    background: rgba(15, 23, 42, 0.75);
    padding: 40px 45px;
    border-radius: 12px;
    /*
     * PERF: backdrop-filter: blur() forces GPU layer creation (expensive).
     * On low-end Android devices it causes 50-70% FPS drops.
     * Disabled on mobile (see media query below) and for reduced-motion.
     */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 800px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero-headline {
    font-size: 2.8rem;
    color: var(--brand-text-light);
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-subline-slogan {
    font-size: 1.25rem;
    color: #38BDF8;
    font-weight: 600;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

/*
 * PERF: will-change: transform promotes the element to its own GPU layer
 * BEFORE the hover begins, eliminating the mid-animation composite recalc
 * that causes jank on slower devices.
 * Applied only to elements that actually animate (not globally).
 */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--brand-blue-primary);
    color: var(--brand-text-light);
    text-decoration: none;
    padding: 14px 28px;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(10, 75, 147, 0.3);
    transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
    will-change: transform; /* PERF: pre-promote to compositor layer */
}

.cta-button:hover {
    background-color: #083B75;
    transform: translateY(-2px);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.secondary-button {
    background: white;
    color: #0A4B93;
    padding: 14px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: transform var(--transition-speed) ease;
    will-change: transform; /* PERF: pre-promote to compositor layer */
}

.secondary-button:hover { transform: translateY(-2px); }

/* --- ABOUT US LAYOUT --- */
.about-section { background-color: var(--card-surface-white); }

.about-grid-layout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 40px;
}

.paragraph-text {
    font-size: 1.1rem;
    color: #334155;
    text-align: justify;
    line-height: 1.7;
}

/* --- FULL-WIDTH PILLARS LAYOUT --- */
.pillars-container-fullwide {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 35px;
    width: 100%;
}

.pillar-wide-row {
    background-color: var(--body-bg-neutral);
    padding: 26px 32px;
    border-radius: 16px;
    border: 1px solid var(--border-soft-gray);
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.pillar-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.pillar-header h4 { font-size: 1.25rem; color: #0F172A; font-weight: 700; }
.pillar-header i  { font-size: 1.2rem; padding: 8px; border-radius: 6px; }

.icon-story   { background-color: #E0F2FE; color: #0369A1; }
.icon-mission { background-color: #DCFCE7; color: #16A34A; }
.icon-vision  { background-color: #F3E8FF; color: #9333EA; }

.pillar-wide-row p { font-size: 1.02rem; color: #334155; line-height: 1.6; }

/* --- TEAM SHOWCASE IMAGE BLOCK --- */
.team-showcase-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-soft-gray);
}

.team-project-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.image-caption-tag {
    background-color: #0F172A;
    color: var(--brand-text-light);
    font-size: 0.85rem;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* --- SERVICES CARD GRID (2 COLUMNS x 3 ROWS) --- */
.services-section { background-color: var(--body-bg-neutral); }

.services-grid-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 30px;
}

.service-box {
    background-color: var(--card-surface-white);
    padding: 35px 30px;
    border-radius: 16px;
    border: 1px solid var(--border-soft-gray);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.01);
    transition: transform 0.3s ease, box-shadow var(--transition-speed) ease;
    will-change: transform; /* PERF: pre-promote before hover transform fires */
}

.service-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.service-icon { font-size: 2.2rem; color: var(--brand-blue-primary); margin-bottom: 20px; }
.service-box-title { font-size: 1.25rem; font-weight: 700; color: #0F172A; margin-bottom: 12px; }
.service-description { font-size: 0.95rem; color: #475569; line-height: 1.6; }

/* --- WHY WINTECH --- */
.why-wintech { background: #ffffff; padding: 80px 20px; }

.why-grid {
    max-width: 1000px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.why-grid div {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* --- CONTACT PORTAL --- */
.contact-portal-section {
    background-color: var(--brand-blue-primary);
    color: var(--brand-text-light);
    position: relative;
}

.footer-flex-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 20px;
}

.footer-heading { font-size: 2rem; font-weight: 700; margin-bottom: 25px; }

.contact-details-list { list-style: none; margin-bottom: 10px; }

.contact-details-list li {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-size: 1.05rem;
    margin-right: 30px;
    margin-bottom: 15px;
}

.contact-inline-form { display: flex; flex-direction: column; gap: 14px; width: 100%; }

.form-text-input,
.form-textarea-input {
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--brand-text-light);
    font-size: 0.95rem;
    outline: none;
    /* Improves tap targets on mobile */
    min-height: 48px;
}

.form-text-input:focus,
.form-textarea-input:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--brand-text-light);
}

.form-textarea-input { resize: none; min-height: unset; }

.form-submit-btn {
    align-self: flex-start;
    background-color: var(--brand-text-light);
    color: var(--brand-blue-primary);
    border: none;
    padding: 14px 45px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
    width: 100%;
    /* Explicit min tap target for accessibility */
    min-height: 48px;
}

.form-submit-btn:hover { background-color: var(--slogan-muted-white); }

/* --- FLOATING WHATSAPP BUTTON --- */
.floating-whatsapp-shortcut {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--accent-whatsapp-green);
    color: white;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    z-index: 999;
    transition: transform var(--transition-speed) ease, background-color var(--transition-speed) ease;
    will-change: transform; /* PERF: pre-promote */
}

.floating-whatsapp-shortcut:hover {
    transform: scale(1.08);
    background-color: #20BA56;
}

/* --- LEGAL SITE FOOTER --- */
.site-legal-footer {
    background-color: #0B3E7A;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-container p { color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; font-weight: 500; }

/* === RESPONSIVENESS ================================================= */
@media (min-width: 768px) { .form-submit-btn { width: auto; } }

@media (max-width: 820px) {
    .about-grid-layout      { grid-template-columns: 1fr; gap: 35px; }
    .footer-flex-split      { grid-template-columns: 1fr; gap: 35px; margin-bottom: 25px; }
    .pillar-wide-row        { padding: 20px; }
    .services-grid-layout   { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .nav-container {
        flex-direction: column;
        padding: 8px 10px;
        gap: 12px;
    }

    .brand-text-wrapper { align-items: center; }
    .brand-slogan       { font-size: 0.75rem; text-align: center; }

    .navigation-menu {
        width: 100%;
        justify-content: space-around;
        background-color: rgba(0, 0, 0, 0.15);
        padding: 8px;
        border-radius: 8px;
    }

    .navigation-menu a {
        padding: 6px 8px;
        font-size: 0.85rem;
        flex-direction: column;
        gap: 4px;
    }

    .navigation-menu i    { display: block; font-size: 1.1rem; }
    .navigation-menu span { font-size: 0.75rem; }

    .hero-section           { min-height: 460px; padding: 40px 20px; }
    .hero-inner-overlay     { padding: 25px 20px; }
    .hero-headline          { font-size: 1.8rem; }
    .hero-subline-slogan    { font-size: 1rem; margin-bottom: 20px; }
    .paragraph-text         { text-align: left; }

    .contact-details-list li { display: flex; margin-right: 0; margin-bottom: 18px; }
    .contact-inline-form     { margin-bottom: 0px; }
}
