/*
Theme Name: KPISE
Theme URI: https://kpinspectionservices.com
Author: Antigravity
Author URI: https://github.com/Antigravity
Description: A custom WordPress theme for KPISE, converted from HTML.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kpise
*/

/* --- KPISE BRAND TOKENS --- */
:root {
    --blue: #60c7f7;
    --blue-dark: #004d82;
    --blue-deeper: #003560;
    --blue-deep: #002744;
    --blue-navy: #001a2e;
    --blue-lt: rgba(0, 114, 188, 0.1);
    --blue-lt2: rgba(0, 114, 188, 0.06);
    --red: #60c7f7;
    --red-hover: #0086de;
    --red-lt: rgba(0, 114, 188, 0.08);
    --teal: #2bb5a0;
    --white: #ffffff;
    --off: #f4f7fa;
    --surface: #ffffff;
    --text: #1a1d23;
    --text-secondary: #4a5568;
    --text-muted: #7b8794;
    --border-light: rgba(0, 0, 0, 0.06);
    --border-dark: rgba(255, 255, 255, 0.1);
    --glass-light: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.12);
    --shadow-blue: 0 8px 32px rgba(0, 114, 188, 0.25);
    --shadow-red: 0 6px 20px rgba(0, 114, 188, 0.2);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', -apple-system, system-ui, sans-serif;
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* --- RESET & BASE --- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    background: var(--off);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.7;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--blue-deep);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s var(--ease);
}

img {
    max-width: 100%;
    display: block;
}

::selection {
    background: var(--blue);
    color: var(--white);
}

/* --- NAVBAR --- */
.navbar-main {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    padding: 1.2rem 0;
    transition: all 0.4s var(--ease);
    background: transparent;
}

.navbar-main.scrolled {
    background: rgba(0, 39, 68, 0.94);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border-dark);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-brand-kpise {
    color: var(--red);
    font-weight: 900;
    letter-spacing: 0.04em;
}

.nav-brand-sub {
    display: none;
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

@media (min-width: 768px) {
    .nav-brand-sub {
        display: block;
    }
}

/* --- ROTATING GLOBE --- */
.globe-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.globe {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: url('https://upload.wikimedia.org/wikipedia/commons/thumb/8/83/Equirectangular_projection_SW.jpg/800px-Equirectangular_projection_SW.jpg') repeat-x center / auto 100%;
    animation: earth-scroll 20s linear infinite;
    box-shadow:
        inset -8px -4px 12px rgba(0, 0, 0, 0.45),
        inset 4px 2px 8px rgba(96, 199, 247, 0.15),
        0 0 10px rgba(96, 199, 247, 0.2),
        0 0 3px rgba(0, 114, 188, 0.4);
    position: relative;
    overflow: hidden;
}

/* vertical meridian */
.globe::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(96, 199, 247, 0.3);
    transform: rotateY(60deg);
}

/* second meridian */
.globe::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(96, 199, 247, 0.22);
    transform: rotateY(-60deg);
}

@keyframes earth-scroll {
    from {
        background-position: 0 center;
    }

    to {
        background-position: -800px center;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-links .nav-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65) !important;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.5rem 1rem !important;
    position: relative;
}

.nav-links .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    height: 2px;
    background: var(--blue);
    transition: all 0.3s var(--ease-out);
}

.nav-links .nav-link:hover,
.nav-links .nav-link.active {
    color: var(--white) !important;
}

.nav-links .nav-link:hover::after,
.nav-links .nav-link.active::after {
    left: 20%;
    right: 20%;
}

.btn-nav-cta {
    background: var(--red);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    border: none;
    transition: all 0.3s var(--ease);
}

.btn-nav-cta:hover {
    background: var(--red-hover);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-red);
}

/* --- HERO --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--blue-deep);
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: brightness(0.35) contrast(1.05);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(135deg, rgba(0, 39, 68, 0.88) 0%, rgba(0, 114, 188, 0.2) 50%, rgba(0, 39, 68, 0.75) 100%),
        linear-gradient(to bottom, transparent 60%, var(--blue-navy) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding-top: 6rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--glass-light);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 2rem;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    background: var(--teal);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 5.5vw, 4.8rem);
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    font-weight: 800;
}

.hero-title .highlight {
    color: var(--blue);
}

.hero-desc {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 2.5rem;
    max-width: 580px;
    line-height: 1.8;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary-cta {
    background: var(--blue);
    color: var(--white);
    padding: 0.9rem 2.2rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border: none;
    transition: all 0.35s var(--ease);
}

.btn-primary-cta:hover {
    background: #0086de;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-blue);
}

.btn-outline-hero {
    background: transparent;
    color: var(--white);
    padding: 0.85rem 2.2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.35s var(--ease);
}

.btn-outline-hero:hover {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.06);
}

/* --- HERO STATS BAR --- */
.hero-stats {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
}

.hero-stats-inner {
    background: rgba(0, 39, 68, 0.75);
    backdrop-filter: blur(24px);
    border-top: 1px solid var(--border-dark);
}

.stat-cell {
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
}

.stat-cell+.stat-cell::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    bottom: 25%;
    width: 1px;
    background: var(--border-dark);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--blue);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.4);
}

/* --- SECTION COMMON --- */
.section {
    padding: 3rem 0;
}

.section-sm {
    padding: 3rem 0;
}

.section-eyebrow {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-eyebrow::before {
    content: '';
    width: 28px;
    height: 2px;
    background: var(--blue);
    display: inline-block;
}

.section-eyebrow.centered {
    justify-content: center;
}

.section-heading {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    margin-bottom: 1rem;
}

.section-sub {
    color: var(--text-secondary);
    max-width: 600px;
    font-size: 1rem;
    line-height: 1.8;
}

.section-sub.centered {
    margin: 0 auto;
}

/* --- ABOUT SECTION --- */
.about-img-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.about-img-wrap img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    transition: transform 0.6s var(--ease);
}

.about-img-wrap:hover img {
    transform: scale(1.03);
}

.about-float-badge {
    position: absolute;
    bottom: 24px;
    right: 24px;
    background: var(--blue);
    color: var(--white);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.about-float-badge .badge-num {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.about-float-badge .badge-text {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.7;
    margin-top: 0.3rem;
}

.hallmark-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.92rem;
    color: var(--text-secondary);
    padding: 0.45rem 0;
}

.hallmark-item i {
    color: var(--blue);
    font-size: 1rem;
}

.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--blue-lt);
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--blue-dark);
}

.trust-badge i {
    color: var(--blue);
}

/* --- ABOUT DETAILED TEXT --- */
.about-detailed {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 2.5rem;
}

.about-detailed p {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-detailed p:last-child {
    margin-bottom: 0;
}

/* --- SERVICE CARDS --- */
.service-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 2.2rem;
    height: 100%;
    transition: all 0.4s var(--ease);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), var(--teal));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon-box {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-lt2);
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--blue);
    transition: all 0.3s var(--ease);
}

.service-card:hover .service-icon-box {
    background: var(--blue);
    color: var(--white);
}

.service-card h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: var(--blue-deep);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.7;
}

/* --- EXPERTISE / DARK --- */
.dark-section {
    background: linear-gradient(135deg, var(--blue-deep) 0%, var(--blue-navy) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.dark-section::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 114, 188, 0.1), transparent 70%);
    top: -200px;
    right: -200px;
    pointer-events: none;
}

.dark-section .section-heading {
    color: var(--white);
}

.dark-section .section-eyebrow {
    color: var(--blue);
}

.dark-section .section-eyebrow::before {
    background: var(--blue);
}

.cert-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border-dark);
}

.cert-item:last-child {
    border-bottom: none;
}

.cert-item i {
    color: var(--blue);
    font-size: 1.1rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.cert-item span {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
}

.client-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.client-chip {
    background: var(--glass-light);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-sm);
    padding: 0.65rem 0.9rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s var(--ease);
    text-align: center;
}

.client-chip:hover {
    background: rgba(0, 114, 188, 0.15);
    border-color: rgba(0, 114, 188, 0.3);
    color: var(--blue);
}

/* --- CTA BANNER --- */
.cta-banner {
    background: var(--blue);
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 77, 130, 0.5), rgba(0, 114, 188, 0.3));
}

.cta-banner .section-heading {
    color: var(--white);
}

.btn-cta-white {
    background: var(--white);
    color: var(--blue);
    padding: 0.9rem 2.2rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border: none;
    transition: all 0.35s var(--ease);
}

.btn-cta-white:hover {
    background: var(--off);
    color: var(--blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* --- CONTACT --- */
.contact-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.office-card {
    display: flex;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--off);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: all 0.3s var(--ease);
}

.office-card:hover {
    border-color: rgba(0, 114, 188, 0.3);
    box-shadow: var(--shadow-sm);
}

.office-flag {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.form-input {
    background: var(--off);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1.2rem;
    font-size: 0.9rem;
    transition: all 0.3s var(--ease);
    font-family: var(--font-body);
}

.form-input:focus {
    background: var(--white);
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-lt);
    outline: none;
}

.btn-submit {
    background: var(--blue);
    color: var(--white);
    padding: 0.95rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
    border: none;
    transition: all 0.3s var(--ease);
    width: 100%;
}

.btn-submit:hover {
    background: var(--blue-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-blue);
}

/* --- FOOTER --- */
.site-footer {
    background: var(--blue-navy);
    color: rgba(255, 255, 255, 0.5);
    padding: 5rem 0 2.5rem;
    font-size: 0.9rem;
}

.footer-brand {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.3rem;
    display: block;
}

.footer-brand .red {
    color: var(--red);
}

.footer-tagline {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 1.5rem;
    display: block;
}

.footer-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--white);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.7rem;
}

.footer-links a:hover {
    color: var(--blue);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 4rem;
    padding-top: 2rem;
    font-size: 0.82rem;
}

/* --- ANIMATIONS --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

@keyframes float-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content>* {
    animation: float-in 0.8s var(--ease-out) both;
}

.hero-content>*:nth-child(1) {
    animation-delay: 0.2s;
}

.hero-content>*:nth-child(2) {
    animation-delay: 0.4s;
}

.hero-content>*:nth-child(3) {
    animation-delay: 0.6s;
}

.hero-content>*:nth-child(4) {
    animation-delay: 0.8s;
}

/* --- RESPONSIVE --- */
@media (max-width: 991px) {
    .section {
        padding: 5rem 0;
    }

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

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .stat-cell+.stat-cell::before {
        display: none;
    }

    .stat-cell {
        border-bottom: 1px solid var(--border-dark);
    }

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

    .section-eyebrow {
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .client-grid {
        grid-template-columns: 1fr;
    }
}