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

:root {
    --primary: #3b6cf5;
    --primary-dark: #2b56d3;
    --secondary: #1a1e26;
    --accent: #ffcc00;
    --white: #ffffff;
    --bg-light: #f8fafc;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --glass: rgba(255, 255, 255, 0.7);
    --shadow-sm: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --max-width: 1280px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}


/* --- Utilities --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(59, 108, 245, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(59, 108, 245, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* --- Top Bar --- */
.top-bar {
    background: #fdfdfd;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #eee;
}

.top-bar .content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-info {
    display: flex;
    gap: 2rem;
}

.top-bar-socials {
    display: flex;
    gap: 1rem;
}

.top-bar-socials a {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4ff;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.top-bar-socials a:hover {
    background: var(--primary);
    color: var(--white);
}

/* --- Main Nav --- */
.header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background: var(--glass);
    box-shadow: var(--shadow-sm);
    transition: background 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--secondary);
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 1.05rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    width: 100%;
}

/* --- Mobile Menu --- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--secondary);
    border-radius: 3px;
    transition: var(--transition);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    padding: 8rem 0 6rem;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 30%, rgba(255,255,255,0.1) 70%), url('Images/hero_roofing_modern_building_1773982326169.png') no-repeat center center/cover;
}

.hero-content {
    max-width: 650px;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    font-weight: 800;
}

.hero h1 span {
    color: var(--primary);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

/* --- Bento / Card Overlay --- */
.hero-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: -80px;
    position: relative;
    z-index: 10;
}

.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px -12px rgba(50, 50, 93, 0.25);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: #f0f4ff;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 1.8rem;
    transition: var(--transition);
}

.card:hover .card-icon {
    background: var(--primary);
    color: var(--white);
    transform: rotateY(360deg);
}

.card:nth-child(2) .card-icon { background: #fff5e6; color: #f39c12; }
.card-blue .card-icon { background: #e6f7ff; color: #00a8ff; }

.card h3 {
    margin-bottom: 1rem;
    font-weight: 700;
}

.card p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* --- About Section --- */
.about {
    padding: 10rem 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-images {
    position: relative;
    display: flex;
    gap: 1rem;
}

.image-wrapper {
    width: 50%;
    overflow: hidden;
    border-radius: 100px 100px 0 0;
    box-shadow: var(--shadow-lg);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.image-wrapper:hover img {
    transform: scale(1.1);
}

.image-wrapper.curved {
    border-radius: 0 100px 100px 0;
    margin-top: 4rem;
}

.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.about-content .intro {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.feature-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
}

.feature-item svg {
    color: var(--primary);
}

/* --- Locations Section --- */
.locations {
    background: var(--secondary);
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
}

.locations h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.location-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.location-item h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* --- Footer --- */
.footer {
    padding: 4rem 0 2rem;
    background: var(--bg-light);
    border-top: 1px solid #ddd;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

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

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

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    transition: var(--transition);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- Commitment card style --- */
.commitment .card {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    background: #f8fbff;
}

/* =====================================================
   RESPONSIVE DESIGN — ALL BREAKPOINTS
   ===================================================== */

/* --- Tablet (≤1024px) --- */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

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

    .about {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 6rem 0;
        text-align: center;
    }
    .about-images {
        justify-content: center;
        min-height: 300px;
    }
    .feature-item {
        justify-content: center;
    }

    /* All inline-style grids go 2-col on tablet */
    [style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    [style*="grid-template-columns: repeat(3"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* --- Large Phone / Small Tablet (≤768px) --- */
@media (max-width: 768px) {

    /* Container */
    .container {
        padding: 0 1.25rem;
    }

    /* Top bar */
    .top-bar-info { display: none !important; }
    .top-bar .content { justify-content: flex-end; }

    /* ---- Navbar ---- */
    .header .btn { display: none !important; }
    .hamburger { display: flex; }

    .nav-links {
        position: fixed;
        inset: 0 0 0 -100%;
        top: 52px;           /* matches slim navbar height */
        flex-direction: column;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(16px);
        width: 100%;
        height: calc(100vh - 52px);
        text-align: center;
        transition: left 0.35s cubic-bezier(0.22, 1, 0.36, 1);
        box-shadow: var(--shadow-lg);
        padding: 2.5rem 0;
        gap: 2.5rem;
        overflow-y: auto;
        z-index: 999;
    }
    .nav-links.active { left: 0; }

    .nav-links a {
        font-size: 1.2rem;
    }

    /* ---- Hero ---- */
    .hero {
        padding: 5rem 0 3rem;
        min-height: 100svh;
        background: linear-gradient(180deg, rgba(255,255,255,0.93) 0%, rgba(255,255,255,0.7) 100%),
                    url('Images/hero_roofing_modern_building_1773982326169.png') no-repeat center center / cover;
        align-items: flex-end;
    }
    .hero-content {
        max-width: 100%;
        padding-bottom: 2rem;
    }
    .hero h1 {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    .hero p { font-size: 1rem; }

    .hero-btns {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    .hero-btns .btn {
        width: 100%;
        justify-content: center;
    }

    /* ---- Feature cards (below hero) ---- */
    .hero-cards {
        grid-template-columns: 1fr;
        margin-top: 2rem;
        gap: 1.25rem;
    }

    /* ---- All inline-style grids -> single column ---- */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    /* Kill span-2 in gallery */
    [style*="grid-column: span 2"],
    [style*="grid-column:span 2"] {
        grid-column: span 1 !important;
    }

    /* ---- About section ---- */
    .about {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 4rem 0;
        text-align: center;
    }
    .about-images {
        display: none; /* hide pillar images on mobile, keeps content clean */
    }
    .feature-item { justify-content: flex-start; }

    /* ---- Location grid ---- */
    .location-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* ---- Cards ---- */
    .card {
        padding: 1.75rem;
    }

    /* ---- Sections using inline padding 100px -> 60px ---- */
    section[style*="padding: 100px 0"] {
        padding: 60px 0 !important;
    }

    /* ---- Footer ---- */
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    .footer-col {
        min-width: 100%;
    }

    /* ---- Gallery auto-rows ---- */
    .gallery div[style*="grid-auto-rows"] {
        grid-auto-rows: 200px !important;
    }

    /* ---- Commitment & Safety ---- */
    .commitment div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    .safety .container,
    section.safety div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }
    .safety img { height: 220px !important; }

    /* ---- Sub-page hero ---- */
    .hero-sub {
        padding: 70px 0 !important;
    }
    .hero-sub h1 { font-size: clamp(1.8rem, 7vw, 2.8rem); }

    /* ---- Buttons on form pages ---- */
    form .btn {
        width: 100%;
        justify-content: center;
    }

    /* ---- Headings ---- */
    h2 { font-size: clamp(1.6rem, 6vw, 2.2rem) !important; }
    h3 { font-size: clamp(1.2rem, 5vw, 1.6rem); }
}

/* --- Standard Phone (≤480px) --- */
@media (max-width: 480px) {
    .container { padding: 0 1rem; }

    .logo { font-size: 1.1rem; }
    .logo-icon { width: 28px; height: 28px; }

    .hero {
        padding: 4rem 0 2rem;
    }
    .hero h1 { font-size: clamp(1.7rem, 9vw, 2.4rem); }

    .btn {
        padding: 0.85rem 1.5rem;
        font-size: 0.95rem;
    }

    .card {
        padding: 1.5rem;
        border-radius: 16px;
    }
    .card-icon {
        width: 56px;
        height: 56px;
    }

    .footer { padding: 2.5rem 0 1.5rem; }

    /* Stats numbers slightly smaller */
    .stat-number { font-size: 2rem !important; }

    /* Gallery images shorter */
    .gallery div[style*="grid-auto-rows"] {
        grid-auto-rows: 160px !important;
    }

    /* Testimonial profile pics */
    .testimonials img[style*="width: 80px"] {
        width: 60px !important;
        height: 60px !important;
    }

    /* Partners word-cloud smaller */
    .partners h2 { font-size: 1.1rem !important; }
}

/* --- Small Phone (≤360px) — Samsung Galaxy S series, older iPhones --- */
@media (max-width: 360px) {
    .container { padding: 0 0.85rem; }

    .hero h1 { font-size: 1.6rem; }
    .hero p { font-size: 0.95rem; }

    .btn { padding: 0.75rem 1.25rem; font-size: 0.9rem; }

    .navbar { padding: 0.25rem 0; }

    .nav-links { gap: 2rem; }
    .nav-links a { font-size: 1.1rem; }

    .hero-sub h1 { font-size: 1.5rem !important; }

    h2 { font-size: 1.4rem !important; }

    .card { padding: 1.25rem; border-radius: 14px; }
    .card-icon { width: 48px; height: 48px; border-radius: 12px; }

    .footer-col { min-width: 100%; }
}

/* --- Page Transition --- */
body {
    animation: page-enter 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.page-exit {
    animation: page-exit 0.35s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

@keyframes page-exit {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* --- Hero Sub Page Banner --- */
.hero-sub h1 span {
    color: var(--primary);
}

/* --- Animations / Scroll Reveal --- */
[data-reveal] {
    opacity: 0;
    transform: translateY(45px);
    transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Card 3D tilt — disable default :hover since JS handles it */
.card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Stat number counter highlight */
.stat-number {
    font-size: 2.5rem;
    color: var(--primary);
    font-weight: 800;
    display: block;
}
