/* --- 1. RESET & VARIABLES --- */
:root {
    /* Palette */
    --color-primary: #1C1C1C;       /* Charcoal */
    --color-stone: #E7DFD7;         /* Warm Stone */
    --color-light-bg: #F7F5F2;      /* Soft Grey/Beige */
    --color-white: #FFFFFF;
    --color-text: #444444;          /* Body Text */
    --color-border: #E5E5E5;
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --spacing-section: 100px;
    --container-width: 1280px;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    font-size: 16px;
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; object-fit: cover; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }

/* --- 2. TYPOGRAPHY --- */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

h1 { letter-spacing: 0px; font-weight: 600; }

p { margin-bottom: 1.5rem; font-weight: 300; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 40px; }
.text-center { text-align: center; }
.section-padding { padding: var(--spacing-section) 0; }

/* Background Utilities */
.bg-stone { background-color: var(--color-stone); }
.bg-light { background-color: var(--color-light-bg); }
.bg-dark { background-color: var(--color-primary); color: var(--color-white); }

/* --- 3. BUTTONS --- */
.btn {
    display: inline-block;
    padding: 16px 32px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    min-width: 180px;
    text-align: center;
}

/* Primary: Charcoal */
.btn-primary { background-color: var(--color-primary); color: var(--color-white); }
.btn-primary:hover { background-color: #333; transform: translateY(-2px); }

/* Outline Dark */
.btn-outline-dark {
    background-color: transparent;
    color: var(--color-primary);
    border: 1px solid rgba(28,28,28,0.3);
}
.btn-outline-dark:hover {
    border-color: var(--color-primary);
    background-color: var(--color-primary);
    color: var(--color-white);
}

/* Hero Specific Buttons */
.btn-hero-primary { background-color: var(--color-primary); color: var(--color-white); border: 1px solid var(--color-primary); }
.btn-hero-primary:hover { background-color: #000; border-color: #000; }

.btn-hero-outline { background-color: transparent; color: var(--color-white); border: 1px solid var(--color-white); }
.btn-hero-outline:hover { background-color: var(--color-white); color: var(--color-primary); }

/* --- 4. NAVIGATION --- */
header {
    background-color: var(--color-white);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
}

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

.logo { cursor: pointer; }
.logo img { height: 40px; width: auto; }

.nav-links { display: flex; gap: 40px; }
.nav-link {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-primary);
    position: relative;
    cursor: pointer;
}
.nav-link::after {
    content: ''; position: absolute; width: 0; height: 1px; bottom: -5px; left: 0;
    background-color: var(--color-primary); transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

/* --- 5. HERO SECTION --- */
.hero {
    height: 90vh;
    min-height: 600px;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
}

.hero-content { position: relative; z-index: 2; color: var(--color-white); max-width: 900px; padding: 0 20px; }

.hero h1 { font-size: 3.5rem; color: var(--color-white); margin-bottom: 1.5rem; line-height: 1.2; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero-sub { font-size: 1.2rem; margin-bottom: 3rem; color: rgba(255,255,255,0.95); font-weight: 400; }

.hero-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }

/* --- 6. COMPONENTS --- */

/* Icon Row */
.icon-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 40px; text-align: center; }
.icon-item { padding: 0 10px; }
.icon-item i { font-size: 28px; color: var(--color-primary); margin-bottom: 20px; font-weight: 300; opacity: 0.8; }
.icon-item h4 { font-size: 14px; letter-spacing: 1px; margin-bottom: 10px; }
.icon-item p { font-size: 13px; color: #555; line-height: 1.5; }

/* Introduction Text */
.intro-text { max-width: 800px; margin: 0 auto; font-size: 1.1rem; line-height: 1.8; color: var(--color-primary); }

/* Card Grid */
.grid-5 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }
@media (min-width: 1024px) {
    .grid-5 { grid-template-columns: repeat(3, 1fr); }
}

.card {
    background: var(--color-white);
    border: 1px solid #F0F0F0;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none; /* Ensure links inside don't double underline */
    color: inherit;
}
.card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }

.card-img { height: 300px; overflow: hidden; position: relative; }
.card-img img { width: 100%; height: 100%; transition: transform 0.8s ease; }
.card:hover .card-img img { transform: scale(1.05); }

.card-body { padding: 30px; text-align: center; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; }
.card h3 { font-size: 16px; margin-bottom: 10px; letter-spacing: 0.5px; }
.card-sub { font-size: 14px; color: #666; margin-bottom: 20px; display: block; line-height: 1.5; }
.card-link { 
    font-size: 11px; text-transform: uppercase; font-weight: 700; 
    border: 1px solid #ddd; padding: 10px 20px; align-self: center; 
    color: var(--color-primary); transition: 0.3s;
}
.card:hover .card-link { background: var(--color-primary); color: white; border-color: var(--color-primary); }

/* --- 7. INTERNAL PREVIEW SECTION --- */
.split-section { display: flex; align-items: stretch; min-height: 600px; }
.split-img { flex: 1; min-height: 400px; background-size: cover; background-position: center; }
.split-content { flex: 1; padding: 100px 60px; display: flex; flex-direction: column; justify-content: center; }

/* --- 8. PROJECT CTA --- */
.project-cta { background-color: var(--color-white); padding: 120px 0; text-align: center; border-top: 1px solid #eee; }

/* --- 9. FOOTER --- */
footer { background-color: var(--color-white); color: var(--color-primary); padding: 80px 0 40px; border-top: 1px solid #eee; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 60px; }

.footer-col h4 { font-size: 12px; margin-bottom: 20px; opacity: 0.5; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { font-size: 14px; opacity: 0.8; color: var(--color-primary); font-weight: 500; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }

.footer-bottom { 
    border-top: 1px solid #eee; padding-top: 30px; 
    display: flex; justify-content: space-between; 
    font-size: 12px; opacity: 0.6; 
}

/* --- MOBILE & RESPONSIVE FIXES --- */
@media (max-width: 768px) {
    /* Layout Adjustments */
    .nav-links { display: none; }
    .hero h1 { font-size: 2.2rem; }
    .icon-row { grid-template-columns: 1fr; gap: 30px; }
    .split-section { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
    .grid-5 { grid-template-columns: 1fr; }
    
    /* --- HEADER FIX --- */
    header { padding: 15px 0; }
    
    /* Shrink the logo to prevent crowding */
    .logo img { 
        height: 28px !important; 
        width: auto;
    }
    
    /* Make the button compact */
    header .btn-primary {
        min-width: auto !important; /* Force override */
        padding: 8px 14px !important;
        font-size: 10px !important;
        line-height: 1;
        height: auto;
        white-space: nowrap;
    }
    
    /* Add spacing between logo and button container if needed */
    nav { gap: 10px; }
    
    /* Form Fixes for Contact Page */
    .form-container { padding: 30px; }
    .search-container { flex-direction: column; }
    .search-btn { padding: 15px; }
}