/*
Theme Name: BWS Theme
Theme URI: https://bilalwebstudio.co.uk/
Author: BWS Development
Author URI: https://bilalwebstudio.co.uk/
Description: A high-end, professional construction and development theme modeled after CPD Limited aesthetics.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bws-theme
*/

:root {
    /* Color Palette - Midnight Executive */
    --clr-bg-dark: #0f172a;        /* Deep Midnight */
    --clr-bg-light: #f8fafc;       /* Ghost White */
    --clr-surface: #1e293b;        /* Slate Navy */
    --clr-primary: #38bdf8;        /* Electric Azure */
    --clr-primary-dark: #0284c7;   /* Deep Blue */
    --clr-text-white: #ffffff;
    --clr-text-dark: #0f172a;
    --clr-text-muted: #64748b;     /* Slate Grey */
    --clr-glass: rgba(255, 255, 255, 0.05);
    --clr-border: rgba(15, 23, 42, 0.1);
    --clr-border-dark: rgba(255, 255, 255, 0.1);

    /* Typography */
    --ff-heading: 'Outfit', sans-serif;
    --ff-body: 'Inter', sans-serif;

    /* Spacing */
    --section-pad: 120px;
    --container-width: 1300px;
    
    /* Transitions */
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body {
    font-family: var(--ff-body);
    color: var(--clr-text-dark);
    line-height: 1.6;
    background-color: var(--clr-bg-light);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--ff-heading);
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--clr-text-muted);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

.section-padding {
    padding: var(--section-pad) 0;
}

.alternate-bg {
    background-color: #f2f2f3;
}

.dark-bg {
    background-color: var(--clr-bg-dark);
    color: var(--clr-text-white);
}

.dark-bg p {
    color: rgba(255, 255, 255, 0.7);
}

.accent {
    color: var(--clr-primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 18px 40px;
    font-family: var(--ff-heading);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.btn-sm {
    padding: 12px 28px;
    font-size: 0.85rem;
}

.btn-primary {
    background-color: var(--clr-primary);
    color: var(--clr-text-white);
}

.btn-primary:hover {
    background-color: var(--clr-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(179, 144, 100, 0.2);
}

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

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

.dark-bg .btn-outline {
    border-color: var(--clr-text-white);
    color: var(--clr-text-white);
}

/* Navigation */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 30px 0;
    transition: var(--transition-smooth);
}

#main-nav.scrolled {
    padding: 15px 0;
    background-color: rgba(10, 10, 11, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo-text {
    font-family: var(--ff-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--clr-text-white);
}

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

.nav-links a {
    font-family: var(--ff-heading);
    font-weight: 400;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
}

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle .bar {
    width: 25px;
    height: 2px;
    background-color: var(--clr-text-white);
    transition: var(--transition-smooth);
}

/* Hero Section */
.hero {
    height: 100vh;
    min-height: 700px;
    position: relative;
    display: flex;
    align-items: center;
    background-color: var(--clr-bg-dark);
    background-image: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=2070&auto=format&fit=crop'); 
    background-size: cover;
    background-position: center;
    color: var(--clr-text-white);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 400;
    line-height: 1;
    margin-bottom: 2rem;
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

/* Section Header */
.section-header {
    margin-bottom: 60px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
}

.section-title {
    font-size: 3rem;
    max-width: 600px;
    margin-bottom: 0;
}

.section-header p {
    flex-basis: 100%;
    font-size: 1.1rem;
    margin-top: 15px;
}

/* Intro Section */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.intro-text p {
    font-size: 1.1rem;
}

.text-link {
    font-family: var(--ff-heading);
    font-weight: 500;
    color: var(--clr-primary);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.text-link .arrow {
    transition: var(--transition-smooth);
}

.text-link:hover .arrow {
    transform: translateX(10px);
}

.rounded {
    border-radius: 12px;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background-color: var(--clr-text-white);
    padding: 60px 40px;
    border-radius: 8px;
    border: 1px solid var(--clr-border);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.6s ease;
}

.service-card:hover {
    border-color: var(--clr-primary);
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-family: var(--ff-heading);
    font-size: 1.2rem;
    color: var(--clr-primary);
    margin-bottom: 30px;
    font-weight: 600;
}

.service-card h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.project-image {
    aspect-ratio: 4/5;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.project-meta {
    padding: 25px 0;
}

.project-meta h3 {
    margin-bottom: 5px;
    font-size: 1.5rem;
}

.project-meta p {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clr-primary);
}

/* CTA Section */
.cta-section h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 3rem;
}

/* Footer */
.footer {
    padding: 100px 0 50px;
    background-color: #050505;
    color: var(--clr-text-white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 100px;
    margin-bottom: 80px;
}

.footer-info .logo-text {
    display: block;
    margin-bottom: 30px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.newsletter-form input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 15px 20px;
    border-radius: 4px;
}

.newsletter-form button {
    background: var(--clr-primary);
    color: white;
    border: none;
    padding: 0 30px;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--ff-heading);
    font-weight: 500;
}

.footer h4 {
    margin-bottom: 30px;
    font-size: 1.2rem;
    color: var(--clr-primary);
}

.footer ul li {
    margin-bottom: 15px;
}

.footer ul li a {
    color: rgba(255,255,255,0.6);
}

.footer ul li a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Responsive */
@media (max-width: 1024px) {
    .services-grid, .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }
    .footer-info {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    :root {
        --section-pad: 80px;
    }
    .nav-links {
        display: none;
    }
    .mobile-menu-toggle {
        display: flex;
    }
    #main-nav {
        padding: 20px 0;
        background-color: var(--clr-bg-dark);
    }
    .intro-grid {
        grid-template-columns: 1fr;
    }
    .services-grid, .projects-grid {
        grid-template-columns: 1fr;
    }
    .section-title, .cta-section h2 {
        font-size: 2.5rem;
    }
    .hero h1 {
        font-size: 3rem;
    }
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.hero h1 {
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* No-JS Fallback & Accessibility */
.no-js .reveal {
    opacity: 1 !important;
    transform: none !important;
}

/* Ensure visibility if JS fails to add active class quickly */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
