/* pjvapourblasting.com - Main stylesheet */

/* MARK: CSS Variables */
/* Core design tokens */
:root {
    --primary-color: #2c5282;
    --primary-deep: #1e3a5f;
    --primary-light: #4a90b8;
    --text-dark: #2a3441;
    --text-muted: #5a6573;
    --text-light: #ffffff;
    --background-light: #eef2f6;
    --background-soft: #f7f9fb;
    --border-radius: 10px;
    --border-radius-large: 14px;
    --section-space: 5rem;
    --section-space-mobile: 3.5rem;
    --header-pad: 0.85rem;
    --header-pad-scrolled: 0.45rem;
    --logo-height: 128px;
    --logo-height-scrolled: 84px;
    --logo-slot: 3rem;
    --logo-nudge: 38px;
    --nav-duration: 0.35s;
    --transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    --shadow-small: 0 2px 10px rgba(30, 58, 95, 0.08);
    --shadow-medium: 0 8px 24px rgba(30, 58, 95, 0.12);
    --shadow-large: 0 16px 40px rgba(30, 58, 95, 0.18);
    --blue-gradient: linear-gradient(135deg, #2c5282 0%, #4a90b8 100%);
    --font-body: 'Barlow', 'Segoe UI', sans-serif;
    --font-display: 'Barlow Condensed', 'Barlow', sans-serif;
}

/* MARK: Reset & Base */
/* Foundation styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: calc(var(--logo-height-scrolled) + var(--header-pad-scrolled) * 2 + 24px);
    scroll-behavior: auto;
}

body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-dark);
    background: var(--background-soft);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
}

/* MARK: Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* MARK: Reveal */
.reveal-section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-section.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* MARK: Section Headings */
.section-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 3px;
    background: var(--primary-light);
    border-radius: 2px;
}

.section-heading-left {
    justify-content: flex-start;
    text-align: left;
}

.section-heading-left::after {
    left: 0;
    transform: none;
}

.section-heading-light {
    color: var(--text-light);
}

.section-heading-light::after {
    background: rgba(255, 255, 255, 0.85);
}

.section-heading-icon {
    flex-shrink: 0;
    color: #1877F2;
}

/* MARK: Header */
header {
    background: linear-gradient(
        to bottom,
        rgba(30, 58, 95, 0.96) 0%,
        rgba(30, 58, 95, 0.92) 72%,
        rgba(30, 58, 95, 0.48) 100%
    );
    color: var(--text-light);
    padding: var(--header-pad) 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    overflow: visible;
    box-shadow: var(--shadow-small);
    transition:
        padding var(--nav-duration) ease,
        box-shadow var(--nav-duration) ease;
    backdrop-filter: blur(12px);
}

header.scrolled {
    padding: var(--header-pad-scrolled) 0;
    box-shadow: var(--shadow-medium);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: visible;
}

/* MARK: Logo */
/* Visual size can exceed the bar; soft navy halo blends overflow into the nav */
.logo {
    position: relative;
    z-index: 1002;
    display: flex;
    align-items: center;
    height: var(--logo-slot);
    flex-shrink: 0;
    text-decoration: none;
    color: var(--text-light);
    overflow: visible;
}

.logo::before {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(50% + var(--logo-nudge));
    z-index: -1;
    width: calc(var(--logo-height) * 1.5);
    height: calc(var(--logo-height) * 1.5);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(
        circle at center,
        rgba(30, 58, 95, 0.92) 0%,
        rgba(30, 58, 95, 0.7) 40%,
        rgba(30, 58, 95, 0.28) 66%,
        transparent 78%
    );
    filter: blur(12px);
    pointer-events: none;
    transition:
        width var(--nav-duration) ease,
        height var(--nav-duration) ease,
        top var(--nav-duration) ease,
        opacity var(--nav-duration) ease;
}

header.scrolled .logo::before {
    width: calc(var(--logo-height-scrolled) * 1.5);
    height: calc(var(--logo-height-scrolled) * 1.5);
}

.logo img {
    position: relative;
    z-index: 1;
    height: var(--logo-height);
    width: auto;
    margin-top: calc((var(--logo-slot) - var(--logo-height)) / 2 + var(--logo-nudge));
    margin-bottom: calc((var(--logo-slot) - var(--logo-height)) / 2 - var(--logo-nudge));
    filter: brightness(1.15) contrast(1.1) drop-shadow(0 0 14px rgba(14, 28, 46, 0.4));
    transition:
        height var(--nav-duration) ease,
        margin var(--nav-duration) ease,
        transform var(--nav-duration) ease,
        filter var(--nav-duration) ease;
    border-radius: var(--border-radius);
    padding: 0;
    background: transparent;
}

header.scrolled .logo img {
    height: var(--logo-height-scrolled);
    margin-top: calc((var(--logo-slot) - var(--logo-height-scrolled)) / 2 + var(--logo-nudge));
    margin-bottom: calc((var(--logo-slot) - var(--logo-height-scrolled)) / 2 - var(--logo-nudge));
}

.logo:hover img {
    transform: scale(1.04);
    filter: brightness(1.2) contrast(1.12) drop-shadow(0 0 18px rgba(14, 28, 46, 0.45));
}

/* MARK: Desktop Nav */
nav ul {
    display: flex;
    list-style: none;
    gap: 0.35rem;
    position: relative;
    --underline-left: 0px;
    --underline-width: 0px;
}

nav ul::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: var(--underline-left);
    width: var(--underline-width);
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--text-light) 18%, var(--text-light) 82%, transparent 100%);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
    transition: left 0.3s ease, width 0.3s ease, opacity 0.3s ease;
    border-radius: 2px;
    opacity: 0;
}

nav ul.has-active::after {
    opacity: 1;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    padding: 0.7rem 1.15rem;
    border-radius: var(--border-radius);
    transition:
        background-color var(--nav-duration) ease,
        color var(--nav-duration) ease,
        font-size var(--nav-duration) ease,
        padding var(--nav-duration) ease;
    font-size: 1.22rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

nav a:hover {
    background: rgba(255, 255, 255, 0.12);
}

header.scrolled nav a {
    font-size: 1.05rem;
    font-weight: 500;
    padding: 0.55rem 1rem;
}

/* MARK: Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    cursor: pointer;
    padding: 11px 10px;
    z-index: 1002;
    border-radius: 10px;
    transition: var(--transition);
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.14);
}

.hamburger:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.85);
    outline-offset: 2px;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-light);
    transition: transform var(--nav-duration) ease, opacity var(--nav-duration) ease;
    border-radius: 2px;
    transform-origin: center;
}

.hamburger.active {
    background: rgba(255, 255, 255, 0.16);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0.4);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* MARK: Nav Overlay */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14, 28, 46, 0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--nav-duration) ease, visibility var(--nav-duration) ease;
    z-index: 1000;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* MARK: Hero */
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: var(--text-light);
    text-align: center;
    padding: 7.5rem 0 4.5rem;
}

.hero::before {
    content: '';
    position: absolute;
    inset: -12px;
    z-index: -2;
    background: url('../images/headers-before-and-after.png') center / cover no-repeat;
    filter: blur(3px);
    transform: scale(1.02);
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(160deg, rgba(30, 58, 95, 0.78) 0%, rgba(44, 82, 130, 0.62) 48%, rgba(30, 58, 95, 0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.hero-brand {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.5vw, 2.35rem);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
    opacity: 0;
    animation: heroFadeUp 0.9s ease-out 0.15s forwards;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6vw, 4.25rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.05;
    margin-bottom: 1rem;
    text-shadow: 0 3px 22px rgba(0, 0, 0, 0.4);
    opacity: 0;
    animation: heroFadeUp 0.95s ease-out 0.35s forwards;
}

.hero-lead {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    font-weight: 400;
    max-width: 34rem;
    margin: 0 auto 2rem;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
    opacity: 0;
    animation: heroFadeUp 1s ease-out 0.55s forwards;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: center;
    opacity: 0;
    animation: heroFadeUp 1s ease-out 0.7s forwards;
}

@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* MARK: Services */
.services {
    padding: var(--section-space) 0;
    background:
        linear-gradient(180deg, var(--text-light) 0%, var(--background-soft) 100%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.service-card {
    background: var(--text-light);
    border: 1px solid rgba(44, 82, 130, 0.08);
    border-radius: var(--border-radius-large);
    overflow: hidden;
    text-align: left;
    transition: var(--transition);
    box-shadow: var(--shadow-small);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
    border-color: rgba(74, 144, 184, 0.35);
}

.service-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--background-light);
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.service-card:hover .service-image img {
    transform: scale(1.04);
}

.service-card h3,
.service-card p {
    padding-left: 1.35rem;
    padding-right: 1.35rem;
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 1.15rem 0 0.65rem;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.98rem;
    padding-bottom: 1.5rem;
}

/* MARK: About */
.about {
    padding: var(--section-space) 0;
    background:
        linear-gradient(135deg, rgba(74, 144, 184, 0.08) 0%, transparent 42%),
        var(--background-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    font-size: 1.08rem;
    margin-bottom: 1.25rem;
    color: var(--text-muted);
}

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

.about-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--border-radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(44, 82, 130, 0.1);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

/* MARK: Contact */
.contact {
    padding: var(--section-space) 0;
    background:
        radial-gradient(ellipse at top, rgba(74, 144, 184, 0.28) 0%, transparent 55%),
        var(--primary-color);
    color: var(--text-light);
    text-align: center;
}

.contact-lead {
    font-size: 1.15rem;
    max-width: 36rem;
    margin: -0.5rem auto 2.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin: 0 auto 2.5rem;
    max-width: 1000px;
}

.contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.75rem 1.25rem;
    border-radius: var(--border-radius-large);
    border: 1px solid rgba(255, 255, 255, 0.18);
    text-decoration: none;
    color: var(--text-light);
    transition: var(--transition);
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-3px);
    box-shadow: var(--shadow-large);
}

.contact-item-static {
    cursor: default;
}

.contact-item-static:hover {
    transform: none;
}

.contact-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    margin-bottom: 0.35rem;
}

.contact-item h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.contact-item p {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
    word-break: break-word;
}

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

/* MARK: Social */
.social {
    padding: var(--section-space) 0;
    background: var(--text-light);
    text-align: center;
}

.facebook-embed {
    max-width: 500px;
    margin: 0 auto;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    border: 1px solid rgba(44, 82, 130, 0.1);
}

.facebook-frame {
    display: block;
    width: 100%;
    max-width: 500px;
    height: 500px;
    border: 0;
    overflow: hidden;
}

/* MARK: Footer */
footer {
    background: var(--primary-deep);
    color: var(--text-light);
    padding: 1.5rem 0;
}

.footer-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.45rem;
}

.footer-content p:last-child {
    margin-bottom: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
}

/* MARK: Buttons */
.button {
    background: var(--blue-gradient);
    color: var(--text-light);
    padding: 0.9rem 1.6rem;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.28);
    border: 2px solid transparent;
    letter-spacing: 0.02em;
}

.button .icon {
    flex-shrink: 0;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(30, 58, 95, 0.35);
}

.button-ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.7);
    color: var(--text-light);
    box-shadow: none;
}

.button-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--text-light);
    color: var(--text-light);
}

.facebook-button {
    background: #1877F2;
    border-color: #1877F2;
    color: var(--text-light);
    box-shadow: 0 4px 16px rgba(24, 119, 242, 0.3);
}

.facebook-button:hover {
    background: #166FE5;
    border-color: #166FE5;
    color: var(--text-light);
    box-shadow: 0 8px 22px rgba(24, 119, 242, 0.38);
}

.facebook-button svg {
    flex-shrink: 0;
}

/* MARK: Responsive */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

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

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 88vw);
        height: 100vh;
        padding: 5.75rem 1.15rem 1.75rem;
        z-index: 1001;
        background:
            linear-gradient(
                165deg,
                rgba(30, 58, 95, 0.94) 0%,
                rgba(44, 82, 130, 0.88) 48%,
                rgba(30, 58, 95, 0.92) 100%
            );
        backdrop-filter: blur(18px);
        border-left: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: -16px 0 40px rgba(10, 20, 34, 0.35);
        transform: translateX(104%);
        transition: transform var(--nav-duration) ease;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 120px;
        background: linear-gradient(to bottom, rgba(30, 58, 95, 0.55), transparent);
        pointer-events: none;
    }

    nav ul {
        flex-direction: column;
        gap: 0.45rem;
        align-items: stretch;
        padding: 0;
        position: relative;
        z-index: 1;
    }

    nav ul::after {
        display: none;
    }

    nav a,
    header.scrolled nav a {
        display: block;
        font-size: 1.12rem;
        font-weight: 600;
        padding: 0.95rem 1.1rem;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        background: rgba(255, 255, 255, 0.06);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }

    nav a:hover,
    nav a.is-active {
        background: rgba(255, 255, 255, 0.14);
        border-color: rgba(255, 255, 255, 0.22);
    }

    nav a.is-active {
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.1),
            0 0 0 1px rgba(255, 255, 255, 0.08);
    }

    .about-content,
    .services-grid,
    .contact-info {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 6.5rem 0 3.5rem;
    }

    .services,
    .about,
    .contact,
    .social {
        padding: var(--section-space-mobile) 0;
    }
}

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

    .button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-brand,
    .hero h1,
    .hero-lead,
    .hero-actions,
    .reveal-section {
        animation: none;
        opacity: 1;
        transform: none;
        transition: none;
    }

    header,
    .logo img {
        transition: none;
    }
}

/* MARK: Not Found */
.not-found-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background:
        radial-gradient(ellipse at top, rgba(74, 144, 184, 0.25) 0%, transparent 50%),
        var(--blue-gradient);
    color: var(--text-light);
}

.not-found-content {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.not-found-logo {
    display: block;
    width: min(100%, 180px);
    height: auto;
    margin: 0 auto 24px;
}

.not-found-content h1 {
    margin: 0 0 12px;
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
}

.not-found-content p {
    margin: 0 0 28px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}
