/* ==========================================================================
   POLISH LAYER: loaded LAST on every page.
   Unifies typography, contrast, spacing and motion across the site
   without touching the page-specific stylesheets underneath.
   ========================================================================== */

:root {
    --primary: #0066cc;
    --secondary: #004999;
    --accent: #1a8cff;
    --ink: #0d1b2e;          /* headings */
    --dark: #1f2937;         /* strong text */
    --light: #4b5768;        /* body text: was #666, now passes WCAG AA comfortably */
    --muted: #6b7686;
    --line: rgba(13, 27, 46, 0.08);
    --radius: 16px;
    --shadow-sm: 0 2px 8px rgba(13, 27, 46, 0.06);
    --shadow-md: 0 10px 30px rgba(13, 27, 46, 0.08);
    --shadow-lg: 0 20px 50px rgba(0, 76, 153, 0.16);
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-head: 'Poppins', 'Inter', system-ui, sans-serif;
}

/* ---------- Base typography ---------- */
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-head);
    line-height: 1.25;
    letter-spacing: -0.01em;
    text-wrap: balance;
}
p { text-wrap: pretty; }

::selection { background: rgba(0, 102, 204, 0.18); color: var(--ink); }

/* Keyboard focus: visible, on-brand */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(0, 102, 204, 0.45);
    outline-offset: 3px;
    border-radius: 6px;
}

img { max-width: 100%; }

/* ---------- Readable paragraphs: no more justified "rivers" ---------- */
.inspect-content > p,
.footer-col p,
.welcome-description,
.welcome-content p,
.intro-text,
.vision-solution-content p,
.about-business-content p,
.about-feature-content p,
.vm-card p,
.product-description,
p.product-description[style] {
    text-align: left !important;
    hyphens: manual;
}

/* ---------- Section headers: one consistent scale ---------- */
.section-header { margin-bottom: 56px; }
.section-header h2 {
    font-family: var(--font-head);
    font-size: clamp(28px, 3.1vw, 40px);
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 14px;
}
.section-header p {
    font-size: clamp(15px, 1.25vw, 17.5px);
    color: var(--muted);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}
/* subtle accent bar under centred section titles */
.section-header h2::after {
    content: '';
    display: block;
    width: 56px;
    height: 4px;
    margin: 16px auto 0;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
/* page sections that already draw their own underline */
.cinematic-stats-section .section-header h2::after,
.journey-section .section-header h2::after { display: none; }

/* ---------- Page headers (inner pages) ---------- */
.page-header h1 {
    font-size: clamp(32px, 4.4vw, 52px) !important;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.page-header p {
    font-size: clamp(15px, 1.4vw, 19px);
    opacity: 0.92;
}

/* ---------- Header: elevates when the page scrolls ---------- */
.header {
    transition: box-shadow 0.3s ease, background-color 0.3s ease !important;
}
.header.is-scrolled {
    box-shadow: 0 6px 24px rgba(13, 27, 46, 0.10) !important;
    background: rgba(255, 255, 255, 0.92) !important;
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
}
.header .navbar { transition: padding 0.3s ease !important; }
.header.is-scrolled .navbar { padding: 8px 0 !important; }
.header .nav-brand .logo { transition: height 0.3s ease, transform 0.3s ease !important; }
@media (min-width: 769px) {
    .header.is-scrolled .nav-brand .logo { height: 50px !important; }
    /* animated underline on desktop nav links */
    .nav-menu > li > a:not(.btn-nav) { position: relative; padding: 6px 0; }
    .nav-menu > li > a:not(.btn-nav)::after {
        content: '';
        position: absolute;
        left: 0; right: 0; bottom: -2px;
        height: 2px;
        border-radius: 2px;
        background: var(--primary);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s var(--ease-out);
    }
    .nav-menu > li > a:not(.btn-nav):hover::after,
    .nav-menu > li > a:not(.btn-nav).active::after { transform: scaleX(1); }
}
.btn-nav {
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.25);
}

/* ---------- Buttons: consistent, tactile ---------- */
.btn, .discover-btn, .banner-btn {
    font-family: var(--font-body);
    letter-spacing: 0.01em;
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.25s ease, color 0.25s ease !important;
}
.btn { border-radius: 10px; padding: 13px 30px; }
.btn-primary { box-shadow: 0 8px 20px rgba(0, 102, 204, 0.22); }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(0, 102, 204, 0.32); }
.btn:active, .discover-btn:active, .banner-btn:active { transform: translateY(0) scale(0.98) !important; }

/* ---------- Home: welcome block ---------- */
.welcome-content h2 {
    font-size: clamp(26px, 2.6vw, 34px) !important;
    color: var(--ink) !important;
}
.welcome-content h2 span { font-size: clamp(30px, 3.2vw, 42px) !important; }
.welcome-content p {
    font-family: var(--font-body) !important;
    font-size: 16.5px !important;
    line-height: 1.8 !important;
    color: var(--light) !important;
    margin-top: 6px;
}
.welcome-image {
    box-shadow: 0 24px 60px rgba(13, 27, 46, 0.28) !important;
    border-radius: 18px !important;
}

/* ---------- Home: cinematic banner: readable white headline ---------- */
.banner-section::before {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.35) 45%, rgba(3, 20, 45, 0.82) 100%) !important;
}
.banner-content {
    max-width: 520px !important;
    margin-right: clamp(20px, 6vw, 96px) !important;
    margin-bottom: clamp(32px, 6vw, 72px) !important;
}
.banner-content h1 {
    color: #fff !important;
    font-size: clamp(28px, 3.6vw, 48px) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45) !important;
    margin-bottom: 24px !important;
}
.banner-btn {
    padding: 14px 34px !important;
    font-size: 17px !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 28px rgba(0, 102, 204, 0.45) !important;
}
@media (max-width: 768px) {
    .banner-section::before {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(3, 20, 45, 0.78) 100%) !important;
    }
    .banner-content { margin: 0 auto 32px !important; text-align: center !important; max-width: 90% !important; }
}

/* ---------- Product cards (home + listing) ---------- */
.product-card-new {
    border-radius: 18px !important;
    transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out) !important;
}
.product-card-new:hover {
    transform: translateY(-8px) !important;
    box-shadow: var(--shadow-lg) !important;
}
.product-card-content h3 {
    font-family: var(--font-head) !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em;
}
.product-card-content p { color: var(--light) !important; font-size: 14.5px !important; line-height: 1.65 !important; }
/* scrolling watermark: kept as a subtle motion accent, not a cut-off headline */
.card-watermark { color: rgba(0, 102, 204, 0.10) !important; font-size: 40px !important; }
.discover-btn i { transition: transform 0.3s var(--ease-out); }
.discover-btn:hover i { transform: translateX(4px); }

/* ---------- Home: "Products WE INSPECT": fix dark-on-blue contrast ---------- */
.inspect-products-section {
    background:
        radial-gradient(1200px 400px at 85% -10%, rgba(26, 140, 255, 0.35), transparent 60%),
        linear-gradient(135deg, #062d5c 0%, #0a4f9e 55%, #0b63c4 100%) !important;
}
.inspect-products-section .section-header h2 { color: #fff !important; }
.inspect-products-section .section-header h2 .highlight {
    background: linear-gradient(135deg, #8fd0ff, #d6ecff) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}
.inspect-products-section .section-header h2::after { background: linear-gradient(90deg, #8fd0ff, #fff); }

/* ---------- "Why choose us": on-brand instead of Google colours ---------- */
.features .section-header h2 span { color: var(--primary) !important; }
.feature-card.google-blue,
.feature-card.google-red,
.feature-card.google-yellow,
.feature-card.google-green { color: var(--primary); }
.feature-card {
    border: 1px solid var(--line) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-sm) !important;
}
.feature-card:hover {
    transform: translateY(-8px) !important;
    border-color: rgba(0, 102, 204, 0.35) !important;
    box-shadow: var(--shadow-lg) !important;
}
.feature-card .feature-num {
    opacity: 1 !important;
    font-size: 44px !important;
    background: linear-gradient(135deg, var(--primary), #7fc0ff) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    animation: none !important;
}
.feature-card h3 { font-family: var(--font-head); color: var(--ink) !important; }
.feature-card:hover h3 { color: var(--primary) !important; }
.feature-card p { color: var(--light) !important; }

/* ---------- Vision solutions ---------- */
.vision-solution-content h3 {
    font-family: var(--font-head) !important;
    font-weight: 600 !important;
    color: var(--ink) !important;
    font-size: clamp(22px, 2vw, 28px) !important;
}
.vision-solution-content p {
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: var(--light) !important;
}

/* ---------- About page ---------- */
.about-business-content h2,
.vm-card h3 { font-family: var(--font-head); color: var(--ink); }
.about-business-content p,
.about-feature-content p,
.vm-card p { color: var(--light) !important; font-size: 16px !important; line-height: 1.8 !important; }
.vm-card {
    border: 1px solid var(--line);
    border-radius: var(--radius) !important;
    transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.vm-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg) !important; }

/* ---------- Industry grids (Pharma / Cosmetics / Automobile) ---------- */
.pharma-products-grid,
.cosmetics-products-grid,
.automobile-products-grid {
    max-width: 1240px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 20px;
    gap: 28px !important;
}

/* ---------- Product detail pages ---------- */
.product-title { letter-spacing: -0.02em; }
.watermark-container { margin: 6px 0 4px !important; }
.watermark-scroll {
    font-size: 40px !important;
    color: rgba(0, 102, 204, 0.09) !important;
    animation-duration: 16s !important;
}
.product-description {
    font-size: 16px !important;
    line-height: 1.8 !important;
    color: var(--light) !important;
}
.spec-card, .inspect-mini-item, .related-card {
    transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out), border-color 0.35s ease !important;
}
.inspect-mini-item:hover, .spec-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* ---------- Contact form fields ---------- */
.form-group label { font-weight: 600; color: var(--dark); font-size: 14.5px; }
.form-group input,
.form-group select,
.form-group textarea {
    border-radius: 10px !important;
    border: 1.5px solid #dbe3ee !important;
    background: #fbfcfe;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover { border-color: #b9c7da !important; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary) !important;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.12) !important;
    outline: none;
}

/* ---------- CTA ---------- */
.cta h2 { font-size: clamp(26px, 3vw, 40px) !important; }
.cta .btn-light {
    padding: 15px 36px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

/* ---------- Footer: calmer, more legible ---------- */
.footer { background: linear-gradient(180deg, #0b1424 0%, #070d18 100%) !important; }
.footer-col p { color: #aab4c3 !important; font-size: 14.5px !important; line-height: 1.75 !important; }
.footer-col ul li a, .contact-info li { color: #c3cbd7 !important; font-size: 14.5px; }
.footer-col ul li:hover a { color: #6db8ff !important; }
.footer-col h3, .footer-col h4 { font-family: var(--font-head); font-size: 17px !important; letter-spacing: 0; }
.footer-bottom { color: #8792a3 !important; font-size: 14px; }
.social-links a { transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, background-color 0.3s ease !important; }
.social-links a:hover { transform: translateY(-4px) !important; }

/* ---------- Scroll reveal (class added by js/polish.js, so no-JS stays visible) ---------- */
.pv-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
    transition-delay: var(--pv-delay, 0s);
    will-change: opacity, transform;
}
.pv-reveal.pv-in { opacity: 1; transform: none; }

/* ---------- Mobile refinements ---------- */
@media (max-width: 768px) {
    body { font-size: 15.5px; }
    .section-padding { padding: 60px 0; }
    .section-header { margin-bottom: 36px; }
    .welcome-content { text-align: left; }
    .welcome-content h2 { text-align: left !important; }
    .welcome-content p { font-size: 15.5px !important; }
    .vision-solution-content p,
    .about-business-content p,
    .vm-card p { font-size: 15.5px !important; }
}

/* ---------- Respect reduced-motion users ---------- */
@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;
    }
    .pv-reveal { opacity: 1 !important; transform: none !important; }
}
