@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800;900&display=swap');

/* ===================================
   CSS VARIABLES / DESIGN TOKENS
   =================================== */
:root {
    --primary: #0F172A;
    --accent: #007a33;
    --accent-dark: #005c26;
    --accent-soft: #f1f8f4;
    --surface: #ffffff;
    --surface-alt: #f8fafc;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --nav-height: 7rem; /* Increased for larger logo */
    --container-max: 1280px;
    --radius-card: 2rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

/* Homepage: no longer starts behind transparent nav as nav is now white */
.no-nav-offset {
    padding-top: var(--nav-height) !important;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--surface);
    overflow-x: hidden;
    line-height: 1.65;
    font-size: 1rem;
    /* Reserve space for fixed navbar so content doesn't hide under it */
    padding-top: var(--nav-height);
}

/* ===================================
   TYPOGRAPHY
   =================================== */
h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

/* White text overrides for dark sections */
.text-white,
.text-white h1, 
.text-white h2, 
.text-white h3, 
.text-white h4 {
    color: #ffffff !important;
}

.text-white/90 { color: rgba(255, 255, 255, 0.9) !important; }
.text-white/70 { color: rgba(255, 255, 255, 0.7) !important; }
.text-white/60 { color: rgba(255, 255, 255, 0.6) !important; }
.text-white/30 { color: rgba(255, 255, 255, 0.3) !important; }

h1 { font-size: clamp(2.2rem, 5vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.1rem; letter-spacing: 0.1em; }

p {
    line-height: 1.75;
    color: var(--text-muted);
}

.text-subheading {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 700;
    color: var(--accent);
}

/* ===================================
   SECTION SPACING
   =================================== */
.section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

/* Patch Slider Utility */
#patchSlider {
    will-change: transform;
    user-select: none;
}

.page-hero {
    padding-top: 3rem;
    padding-bottom: 3rem;
    position: relative;
}

@media (min-width: 768px) {
    .page-hero {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }
}

/* ===================================
   NAVBAR — FLOATING THREE-PART LAYOUT
   =================================== */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    display: flex;
    align-items: center;
    /* Default is now white background */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

/* Scrolled state */
.glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    height: 6rem;
}

/* The pill container for links */
.glass-pill {
    background: rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 100px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    padding: 0.35rem;
    gap: 0.15rem;
    transition: var(--transition);
}

/* Nav links are always primary colored now since bg is white */
.nav-link {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--primary);
    padding: 0.55rem 1.1rem;
    border-radius: 50px;
    transition: var(--transition);
    letter-spacing: 0.01em;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}

.nav-link:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* Products dropdown button */
.nav-link.dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

/* FREE QUOTE button */
.nav-cta {
    background: var(--accent);
    color: #ffffff !important;
    padding: 0.65rem 1.5rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(0, 122, 51, 0.35);
    display: inline-block;
}

.nav-cta:hover {
    background: var(--accent-dark);
    box-shadow: 0 6px 20px rgba(0, 122, 51, 0.45);
    transform: translateY(-1px);
}

/* Mobile hamburger — default: dark (visible on solid/white nav) */
.nav-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--surface-alt);
    border: 1px solid rgba(0, 0, 0, 0.08);
    cursor: pointer;
    color: var(--primary);
    transition: var(--transition);
}

/* On transparent nav (homepage) — hamburger goes white/glass */
.glass-nav:not(.scrolled):not(.glass-nav--solid) .nav-hamburger {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* On scrolled or solid nav — hamburger stays dark/themed */
.glass-nav.scrolled .nav-hamburger,
.glass-nav--solid .nav-hamburger {
    background: var(--surface-alt);
    border-color: rgba(0,0,0,0.08);
    color: var(--primary);
}

.nav-hamburger:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

/* ===================================
   MOBILE MENU DRAWER
   =================================== */
#mobileMenu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    flex-direction: column;
}

#mobileMenu.open {
    display: flex;
}

.mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100%;
    background: #ffffff;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    box-shadow: -8px 0 40px rgba(0,0,0,0.15);
}

.mobile-menu-close {
    align-self: flex-end;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--primary);
    background: var(--surface-alt);
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.mobile-menu-close:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.mobile-nav-link {
    display: block;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid transparent;
}

.mobile-nav-link:hover {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: rgba(0, 122, 51, 0.1);
}

.mobile-nav-cta {
    display: block;
    margin-top: 0.5rem;
    padding: 1rem;
    background: var(--accent);
    color: #ffffff !important;
    text-align: center;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: var(--transition);
}

.mobile-nav-cta:hover {
    background: var(--accent-dark);
}

.mobile-menu-divider {
    height: 1px;
    background: rgba(0,0,0,0.06);
    margin: 0.5rem 0;
}

/* ===================================
   HERO SECTIONS
   =================================== */
/* Full-height hero (index.php) — no pt needed, navbar is transparent */
.hero-full {
    min-height: 100svh;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 6rem;
}

/* Page hero (inner pages) — compact hero with proper spacing */
.page-hero {
    padding-top: 6rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .page-hero {
        padding-top: 8rem;
        padding-bottom: 5rem;
    }
}

/* ===================================
   CARDS & COMPONENTS
   =================================== */
.premium-shadow {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0,0,0,0.04);
}

.card-hover {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(0, 122, 51, 0.1);
}

.btn-premium {
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.btn-premium::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-premium:hover::after {
    left: 100%;
}

/* ===================================
   FOOTER
   =================================== */
footer h4 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

footer ul li a,
footer ul li span {
    font-size: 0.925rem;
    line-height: 1.6;
}

/* ===================================
   SCROLLBAR
   =================================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-dark); }

/* ===================================
   GSAP REVEAL CLASSES
   =================================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-28px);
}

.reveal-right {
    opacity: 0;
    transform: translateX(28px);
}

/* ===================================
   UTILITIES
   =================================== */
.outline-text {
    -webkit-text-stroke: 1px var(--accent);
    color: transparent;
}

/* Back to Top */
#backToTop {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    transition: var(--transition);
}

#backToTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

/* ===================================
   RESPONSIVE CONTAINERS
   =================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media (min-width: 640px) {
    .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 1024px) {
    .container { padding-left: 2.5rem; padding-right: 2.5rem; }
}

/* ===================================
   MOBILE RESPONSIVE OVERRIDES
   =================================== */
@media (max-width: 767px) {
    body {
        padding-top: 4.5rem;
    }

    :root {
        --nav-height: 4.5rem;
    }

    .glass-nav {
        height: 4.5rem;
    }

    .glass-nav.scrolled {
        height: 4rem;
    }

    h1 { font-size: clamp(1.8rem, 8vw, 2.8rem); }
    h2 { font-size: clamp(1.5rem, 6vw, 2.2rem); }

    .section-padding {
        padding-top: 3.5rem;
        padding-bottom: 3.5rem;
    }

    .page-hero {
        padding-top: 4.5rem;
        padding-bottom: 3rem;
    }
}
