:root {
    /* Colors */
    --primary-color: #0f1c2e; /* Deep Navy */
    --accent-color: #b59b5f; /* Antique Gold */
    --text-primary: #1f2937; /* Charcoal */
    --text-secondary: #4b5563; /* Slate */
    --bg-main: #ffffff; /* White */
    --bg-light: #f9fafb; /* Off-white */
    --bg-dark: #0a111a; /* Very Dark Navy */
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --max-width: 1000px;
    --nav-height: 80px;
}

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

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

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--bg-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 1rem 2rem;
    z-index: 2000;
    transition: top 0.3s ease;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.2;
    text-wrap: balance; /* Prevents awkward orphans in headings */
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 1px;
    background-color: var(--accent-color);
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-family: var(--font-body);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-weight: 300;
    font-size: 1.05rem;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100px;
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    height: 75px;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(181, 155, 95, 0.2);
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
    transition: all 0.5s ease;
}

.logo-text {
    font-family: 'Bodoni Moda', serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--primary-color);
    letter-spacing: -0.01em;
}

/* Grain Overlay for Tactile Feel */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}

.logo-sub {
    font-family: var(--font-body);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent-color);
    margin-top: 2px;
}

.navbar.scrolled .logo-text {
    font-size: 1.4rem;
}

.navbar.scrolled .logo-sub {
    font-size: 0.6rem;
}

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

.nav-links a {
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    padding-bottom: 4px;
}

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

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

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1100;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    position: relative;
    transition: background 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

.hamburger::before { top: -8px; left: 0; }
.hamburger::after { bottom: -8px; left: 0; }

.mobile-nav-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.mobile-nav-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-nav-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Sections */
section {
    padding: 7rem 0;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    background: linear-gradient(rgba(15, 28, 46, 0.4), rgba(15, 28, 46, 0.4)), url('Caprock.png') center/cover no-repeat;
    position: relative;
    overflow: hidden;
    background-attachment: fixed; /* For browsers that support it, fallback handled by JS parallax */
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.65);
    padding: 3.5rem;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.subtitle {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    color: #8c733d; /* Darker gold for better contrast on light backgrounds */
    font-style: italic;
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero-text {
    font-size: 1.125rem;
    color: var(--text-primary);
    max-width: 700px;
}

.quote {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary-color);
    border-left: 1px solid var(--accent-color);
    padding-left: 1.5rem;
    margin-top: 3.5rem;
    font-style: italic;
    font-weight: 400;
}

/* Content Blocks */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.text-block {
    max-width: 750px;
}

.icon-list {
    list-style: none;
    margin: 2rem 0;
}

.icon-list li {
    position: relative;
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
}

.icon-bullet {
    color: var(--accent-color);
    margin-right: 1rem;
    font-size: 1.1rem;
    min-width: 24px;
    text-align: center;
    margin-top: 5px;
}

.principles-list {
    list-style: none;
    margin: 2.5rem 0;
}

.principles-list li {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
}

.circle-icon {
    color: var(--accent-color);
    margin-right: 1.25rem;
    font-size: 1.5rem;
    min-width: 30px;
    text-align: center;
}

.principles-list strong {
    color: var(--accent-color);
    font-style: italic;
}

.emphasis-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--primary-color);
    font-style: italic;
}

.mt-2 {
    margin-top: 2rem;
}

/* Services Grid */
.bg-light {
    background-color: var(--bg-light);
    border-top: 1px solid rgba(0,0,0,0.03);
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.section-intro {
    max-width: 600px;
    margin-bottom: 3.5rem;
}

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

.service-card {
    background: var(--bg-main);
    padding: 3rem 2.5rem;
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    border-color: var(--accent-color);
}

/* Staggered Animation for Services */
.services-grid .fade-in-section {
    transition-delay: calc(var(--order) * 0.1s);
}

.service-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    display: block;
    transition: transform 0.4s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Focus States */
a:focus-visible, 
button:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 4px;
    border-radius: 2px;
}

/* Contact Section */
.bg-dark {
    background-color: var(--bg-dark);
    color: rgba(255,255,255,0.8);
}

.bg-dark h2 {
    color: var(--bg-main);
}

.bg-dark h2::after {
    background-color: var(--accent-color);
}

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

.contact-wrapper {
    max-width: 700px;
}

.contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-top: 4.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 3.5rem;
}

.contact-item h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.contact-icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.contact-item p {
    font-size: 0.95rem;
    line-height: 1.8;
}

.contact-item a {
    color: rgba(255,255,255,0.7);
}

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

/* Footer */
footer {
    background-color: #060a10;
    color: rgba(255,255,255,0.4);
    padding: 2.5rem 0;
    text-align: center;
    font-size: 0.85rem;
}

footer p {
    color: rgba(255,255,255,0.4);
    margin-bottom: 0;
}

/* Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.2s cubic-bezier(0.165, 0.84, 0.44, 1), transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .fade-in-section,
    .hero,
    .service-card,
    .navbar,
    .back-to-top {
        transition: none !important;
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 900;
    font-size: 1.2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-5px);
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    section {
        padding: 5rem 0;
    }
    
    .nav-links {
        gap: 1.5rem;
    }
    
    .hero-content {
        padding: 2.5rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    :root {
        --nav-height: 70px;
    }

    .navbar {
        height: 70px;
        padding: 0;
    }

    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 1.5rem;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-main);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 1050;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1rem;
        font-weight: 600;
    }

    h1 {
        font-size: 2.25rem;
        margin-bottom: 1rem;
    }
    
    h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-text {
        font-size: 1rem;
    }
    
    .quote {
        font-size: 1.2rem;
        margin-top: 2.5rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    section {
        padding: 4rem 0;
    }

    .hero {
        padding-top: 70px;
    }
    
    .hero-content {
        padding: 2.5rem 1.5rem;
        margin: 0 1rem;
        text-align: center;
    }


    .quote {
        border-left: none;
        border-top: 1px solid var(--accent-color);
        padding-left: 0;
        padding-top: 1.5rem;
        text-align: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    .contact-details {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 3rem;
        padding-top: 2.5rem;
    }
    
    .principles-list li {
        font-size: 1.15rem;
    }
    
    .icon-list li {
        font-size: 0.95rem;
    }
}
