/* 
  WilliamsTerrain - Stylesheet
  Modern, professional design system with earthy tones.
*/

:root {
    /* Color Palette */
    --primary: #2d5a27; /* Deep forest green */
    --primary-light: #3d7935;
    --primary-dark: #1b3817;
    --secondary: #d4af37; /* Earthy gold/yellow accent (similar to machinery) */
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-dark: #111827;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Box Shadow */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

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

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

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Typography utilities */
.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: var(--primary);
    color: var(--bg-white);
    padding: 1rem 2.5rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1.125rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-primary-small {
    display: inline-block;
    background-color: var(--primary);
    color: var(--bg-white);
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.btn-primary-small:hover {
    background-color: var(--primary-light);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.0);
    backdrop-filter: blur(0px);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--bg-white); /* White on hero */
}

.navbar.scrolled .logo {
    color: var(--primary-dark);
}

.logo span {
    color: var(--secondary);
}

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

.nav-links a:not(.btn-primary-small) {
    color: var(--bg-white);
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
}

.navbar.scrolled .nav-links a:not(.btn-primary-small) {
    color: var(--text-main);
}

.nav-links a:not(.btn-primary-small)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--secondary);
    transition: var(--transition-smooth);
}

.nav-links a:not(.btn-primary-small):hover::after {
    width: 100%;
}

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

.mobile-menu-btn span {
    width: 30px;
    height: 3px;
    background-color: var(--bg-white);
    transition: var(--transition-smooth);
}

.navbar.scrolled .mobile-menu-btn span {
    background-color: var(--primary-dark);
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-white);
    z-index: 999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateY(-100%);
    transition: transform 0.4s ease-in-out;
}

.mobile-nav.active {
    transform: translateY(0);
}

.mobile-nav a {
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-dark);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(17, 24, 39, 0.7), rgba(17, 24, 39, 0.5));
}

.hero-content {
    max-width: 800px;
    color: var(--bg-white);
    z-index: 1;
}

.hero-content h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    margin-bottom: 2.5rem;
    color: #e5e7eb;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background-color: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    border-bottom: 4px solid transparent;
}

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

.service-img {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

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

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

.service-info {
    padding: 2rem;
}

.service-info h3 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.service-info p {
    color: var(--text-muted);
}

/* About Section */
.about {
    background-color: var(--bg-white);
}

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

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

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

.features {
    list-style: none;
    margin-top: 2rem;
}

.features li {
    font-size: 1.125rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.about-stats {
    display: flex;
    gap: 2rem;
}

.stat-box {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    flex: 1;
    border: 1px solid #e5e7eb;
}

.stat-box h3 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-box p {
    font-weight: 600;
    color: var(--text-main);
}

/* CTA */
.cta {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: var(--bg-white);
    text-align: center;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Footer */
.footer {
    background-color: var(--bg-dark);
    color: var(--bg-white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

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

.footer-brand p {
    color: #9ca3af;
}

.footer-contact h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-item svg {
    color: var(--secondary);
}

.contact-item a {
    color: #d1d5db;
    font-size: 1.125rem;
}

.contact-item a:hover {
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .section {
        padding: 4rem 0;
    }
    
    .about-stats {
        flex-direction: column;
    }
}
