/* CSS Variables for "Quiet Luxury" Palette */
:root {
    --alabaster: #F5F3ED;
    /* Warm Alabaster - daytime reading */
    --mocha: #5C4A3D;
    /* Lighter Mocha */
    --espresso: #2A2621;
    /* Deep Espresso - high focus/serious */
    --espresso-light: rgba(42, 38, 33, 0.84);
    --charcoal: #1F1E1C;
    --taupe: #8C7E74;
    /* Warm Taupe Accent */
    --terracotta: #C98B75;
    /* Soft Terracotta Accent */
    --bronze: #A67C52;
    /* Muted Bronze Accent */

    --text-dark: #2A2621;
    --text-light: #F5F3ED;
    --text-muted: #6B655C;

    --font-heading: 'Cormorant Garamond', 'Playfair Display', serif;
    --font-body: 'Manrope', sans-serif;

    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--alabaster);
    overflow-x: hidden;
}

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

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: 1.5rem;
}

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

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

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

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

.text-center {
    text-align: center;
}

/* Backgrounds */
.bg-alabaster {
    background-color: var(--alabaster);
    color: var(--text-dark);
}

.bg-espresso {
    background-color: var(--espresso);
    color: var(--text-light);
}

.bg-espresso p {
    color: rgba(245, 243, 237, 0.85);
    /* Slightly muted alabaster */
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: none;
    border-radius: 2px;
    transition: var(--transition-smooth);
}

.btn-primary {
    background-color: var(--espresso);
    color: var(--alabaster);
    border: 1px solid var(--espresso);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--espresso);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-dark);
    border: 1px solid var(--taupe);
}

.btn-outline:hover {
    border-color: var(--bronze);
    color: var(--bronze);
}

.bg-espresso .btn-primary {
    background-color: var(--alabaster);
    color: var(--espresso);
    border-color: var(--alabaster);
}

.bg-espresso .btn-primary:hover {
    background-color: transparent;
    color: var(--alabaster);
}

/* UI Elements */
.gold-divider {
    height: 1px;
    width: 60px;
    background-color: var(--bronze);
    margin: 2rem 0;
}

.center-div {
    margin-left: auto;
    margin-right: auto;
}

/* Margin Utilities */
.mt-2 {
    margin-top: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 2.5rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition-smooth);
    padding: 1.5rem 0;
}

.navbar.scrolled {
    background-color: rgba(245, 243, 237, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar.scrolled.nav-dark {
    background-color: rgba(42, 38, 33, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

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

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: currentColor;
    transition: var(--transition-smooth);
}

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

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: inherit;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    padding-top: 5rem;
}

.hero-content {
    flex: 1;
    padding-right: 4rem;
    z-index: 2;
}

.hero-subtitle {
    display: block;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--bronze);
    margin-bottom: 1rem;
    padding-left: 0.25rem;
}

.hero-headline {
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.text-light-serif {
    font-family: var(--font-heading);
    font-style: italic;
    font-weight: 300;
    color: var(--text-muted);
}

.hero-content p {
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 2.5rem;
    max-width: 450px;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    border-radius: 50px;
}

.hero-image {
    flex: 1.2;
    height: 80vh;
    max-width: 70vh; /* Enforce max squareish aspect ratio */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.blob-shadow {
    position: absolute;
    right: -5%;
    top: 63%;
    transform: translateY(-50%);
    width: 80%;
    height: 70%;
    background-color: var(--espresso);
    opacity: 0.9;
    z-index: 1;
}

.blob-shape-1 {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
}

.blob-shape-2 {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

.blob-shape-3 {
    border-radius: 30% 70% 50% 50% / 30% 30% 70% 70%;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.hero-image .hero-leaf {
    position: absolute;
    bottom: 7%;
    left: -1%;
    width: 35%;
    height: auto;
    z-index: 3;
}

/* Split Layouts */
.split-layout {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.split-layout.align-start {
    align-items: flex-start;
}

.split-layout>div {
    flex: 1;
}

.pivot {
    position: relative;
    z-index: 1; /* To allow peeking elements to overlap subsequent sections */
    overflow: visible; /* Default, but for clarity */
}

.decorative-leaf-right {
    position: absolute;
    right: 0;
    bottom: 130px;
    max-width: 40vw;
    pointer-events: none; /* Decorative only */
}

.hover-scale-wrapper {
    width: 100%;
    height: 100%;
    transition: transform 0.8s ease;
    overflow: hidden;
    position: relative;
    z-index: 2;
}

.hero-image .hover-scale-wrapper {
    width: 85%;
    height: 85%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.pivot-image:hover .hover-scale-wrapper,
.hero-image:hover .hover-scale-wrapper {
    transform: scale(1.03);
}

.parallax-img,
.parallax-card {
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

/* Anchor Section Styling */
.anchor-left {
    top: 8rem;
    display: flex;
    flex-direction: column;
}

.overline-text {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--bronze);
    opacity: 0.9;
    text-transform: uppercase;
}

.gold-line {
    height: 1px;
    width: 3rem;
    background-color: var(--bronze);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(245, 243, 237, 0.1);
    margin-top: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--alabaster);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--taupe);
    margin-top: 0.5rem;
}

.drop-cap-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--alabaster);
    line-height: 1.8;
}

.drop-cap-text::first-letter {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    color: var(--bronze);
    float: left;
    line-height: 0.8;
    margin-right: 0.75rem;
    margin-top: -0.15rem;
}

/* Media Section */
.media-grid {
    display: grid;
    grid-template-columns: 3.6fr 3.7fr;
    gap: 3rem;
    margin-top: 4rem;
}

/* Contact / Open Door */
.open-door {
    position: relative;
    isolation: isolate;
    overflow: visible;
    z-index: 1;
}

.contact-blob-wrapper {
    position: absolute;
    width: clamp(300px, 32vw, 420px);
    aspect-ratio: 1 / 1;
    /* Position using calc to avoid transform conflict with fade-in-up */
    left: calc(clamp(300px, 32vw, 420px) * -0.52);
    top: calc(clamp(300px, 32vw, 420px) * -0.42);
    pointer-events: none;
    z-index: 0;
}

.contact-blob {
    width: 100%;
    height: 100%;
    background-color: var(--taupe);
    opacity: 0.84;
    border-radius: 57% 43% 26% 74% / 63% 36% 64% 37%;
}

.open-door .section-container {
    position: relative;
    z-index: 1;
}

.subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.capabilities {
    margin-top: 3rem;
}

.capability-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.capability-item i {
    font-size: 1.5rem;
    color: var(--taupe);
}

.card-elegant {
    background-color: var(--espresso-light);
    padding: 3rem;
    border-radius: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    color: var(--text-light);
    overflow: hidden;
}

.card-elegant h2 {
    color: var(--alabaster);
}

.card-elegant p {
    color: rgba(245, 243, 237, 0.8);
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: none; /* Hidden to match the minimalist look of code.html */
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem 1.5rem;
    border: none;
    background-color: var(--alabaster);
    color: var(--text-dark);
    font-family: var(--font-body);
    font-size: 0.9rem;
    border-radius: 50px;
    transition: var(--transition-smooth);
}

.contact-form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%235C4A3D' viewBox='0 0 256 256'%3E%3Cpath d='M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80a8,8,0,0,1,11.32-11.32L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.5rem center;
    padding-right: 3.5rem;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(245, 243, 237, 0.3);
}

.contact-form textarea {
    border-radius: 1.5rem;
    padding-top: 1.2rem;
    resize: none;
}

.submit-btn {
    width: 100%;
    display: block;
    width: auto;
    margin-left: auto;
    margin-top: 1rem;
    background-color: var(--alabaster);
    color: var(--mocha);
    border-radius: 50px;
    font-weight: 700;
    padding: 0.8rem 2.5rem;
}

.submit-btn:hover {
    background-color: #fff;
}

/* Footer */
.footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background-color: var(--alabaster);
}

.footer .section-container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.footer-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-privacy-link {
    justify-self: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-privacy-link:hover {
    color: var(--mocha);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-self: end;
}

.social-links a {
    font-size: 1.2rem;
    color: var(--text-muted);
    opacity: 0.7;
}

.social-links a:hover {
    opacity: 1;
    color: var(--mocha);
}

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

.fade-in {
    opacity: 0;
    transition: opacity 1.5s ease-out;
}

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

/* Responsive */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 3rem;
    }

    .hero-content p {
        margin: 0 auto 2.5rem;
    }

    .hero-image {
        width: 100%;
        height: 60vh;
        margin-bottom: 40px;
        max-width: 500px;
    }

    .pivot-image {
        max-width: 500px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .split-layout {
        flex-direction: column;
    }

    .media-grid {
        grid-template-columns: 1fr;
    }

    .contact-form-container {
        width: stretch;
        max-width: 600px;
    }

    .decorative-leaf-right {
        max-width: 50vw;
        bottom: 10px;
    }
}

@media (max-width: 768px) {
    .navbar {
        position: fixed;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(245, 243, 237, 0.95);
        backdrop-filter: blur(10px);
        padding: 2rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
        text-align: center;
        gap: 1.5rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-15px);
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .navbar.nav-dark .nav-links {
        background-color: rgba(42, 38, 33, 0.95);
    }

    .menu-toggle {
        display: block;
    }

    .section-container {
        padding: 4rem 1.5rem;
    }

    .card-elegant {
        padding: 2rem 1.5rem;
    }

    .contact-blob-wrapper {
        display: none;
    }

    .open-door::before {
        transform: translate(-60%, -38%);
        opacity: 0.1;
    }

    .decorative-leaf-right {
        max-width: 60vw;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-self: center;
    }
}
