﻿/* --- Imports & Variables --- */
@import url('https://fonts.googleapis.com/css2?family=Mrs+Saint+Delafield&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&display=swap');

:root {
    --gold: #b59551;
    --charcoal: #2c2c2c;
    --white: #ffffff;
    --cream: #fafafa;
}

/* --- Reset & Global --- */
body, html {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background-color: var(--white);
    color: var(--charcoal);
    font-family: 'Cormorant Garamond', serif;
    line-height: 1.6;
}

/* --- Global Header --- */
.site-header {
    background-color: var(--cream);
    border-bottom: 0.5px solid rgba(181, 149, 81, 0.3);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 15px;
}

.logo-link:visited,
.logo-link:hover,
.logo-link:active {
    text-decoration: none; /* Removes the underline */
    color: inherit; /* Forces it to use the parent's color (Charcoal) */
    outline: none; /* Removes the focus ring */
}

/* Optional: Subtle transition if you want it to feel "alive" without changing color */
.logo-link {
    transition: opacity 0.3s ease;
}

    .logo-link:hover {
        opacity: 0.8;
    }

.header-logo {
    height: 50px;
    width: 50px;
    object-fit: contain;
}

/* --- Landing Page Specific --- */
.hero-main {
    height: 80vh;
    display: flex;
    justify-content: center; /* Centers the canvas-container horizontally */
    align-items: center; /* Centers the canvas-container vertically */
    padding-bottom: 8vh;
    text-align: center; /* Safety net for inline elements */
}

.canvas-container {
    display: flex;
    flex-direction: column; /* Stacks image and button vertically */
    align-items: center; /* CRITICAL: Centers the image and button inside this div */
    gap: 40px; /* Adds breathing room between the art and the button */
    width: 100%; /* Ensures it takes up the full width for centering */
}

.main-art {
    max-height: 65vh;
    width: auto;
    display: block; /* Removes any bottom whitespace inherent to images */
    margin: 0 auto; /* Manual center fallback */
}

.brand-name {
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 30px;
}

    .nav-links a {
        text-decoration: none;
        color: var(--charcoal);
        font-weight: 600;
        font-size: 0.95rem;
        text-transform: uppercase;
        letter-spacing: 1.5px;
        opacity: 0.7;
        transition: 0.3s;
    }

        .nav-links a:hover, .nav-links a.active {
            color: var(--gold);
            opacity: 1;
        }

/* --- Services Menu Layout --- */
.service-menu {
    max-width: 700px;
    margin: 0 auto;
    text-align: left;
    background: var(--white);
    padding: 40px;
    border: 0.5px solid rgba(181, 149, 81, 0.2);
}

.menu-section {
    margin-bottom: 40px;
}

    .menu-section h2 {
        font-family: 'Cormorant Garamond', serif;
        font-size: 1.4rem;
        text-transform: uppercase;
        letter-spacing: 2px;
        border-bottom: 0.5px solid var(--gold);
        padding-bottom: 10px;
        margin-bottom: 20px;
        color: var(--charcoal);
    }

/* Base Service Select Styling */
#baseService {
    width: 100%;
    padding: 15px;
    background: var(--cream);
    border: 0.5px solid var(--gold);
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: var(--charcoal);
    outline: none;
    cursor: pointer;
}

/* Enhancement Items */
.enhancement-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.enhancement-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 0.5px solid #eee;
}

    .enhancement-item label {
        font-size: 1.1rem;
        font-weight: 400;
    }

.addon-check {
    width: 18px;
    height: 18px;
    accent-color: var(--gold);
    cursor: pointer;
    margin-left: 10px;
}

/* Summary & Total Box */
.summary-box {
    margin-top: 50px;
    padding: 30px;
    background: var(--cream);
    border: 0.5px solid var(--gold);
    text-align: center;
}

    .summary-box.success-lock {
        max-width: 600px; /* Constrains the box width */
        margin: 2rem auto;
        padding: 3rem 2rem; /* Adds breathing room inside the gold border */
        text-align: center;
    }

.total-display {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    color: var(--gold);
    margin-bottom: 15px;
}

.summary-box p {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1rem;
    margin-bottom: 25px;
}

.email-notice {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.5;
    max-width: 80%; /* Encourages the long sentence to wrap cleanly */
    margin: 0 auto 2.5rem auto;
    opacity: 0.9;
}

.highlight {
    font-weight: 600;
    color: var(--gold); /* Or your preferred brand accent color */
}

.button-wrapper {
    margin-top: 2rem;
}

/* --- Typography --- */
h1 {
    font-weight: 400;
    font-size: 2.5rem;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: var(--charcoal);
    margin-bottom: 30px;
}

.gold-heading {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300; /* Lighter weight for a softer feel */
    font-style: italic; /* Italics instantly soften "all caps" text */
    font-size: 2.2rem; /* Slightly smaller to ensure it fits one line */
    letter-spacing: 4px; /* Reduced from 8px to keep words together */
    text-transform: uppercase;
    color: var(--charcoal);
    margin-bottom: 25px;
    white-space: nowrap; /* Forces it to stay on one line */
}

/* --- About Page Layout (Fixed) --- */
.about-container {
    max-width: 1100px;
    margin: 80px auto;
    padding: 0 40px;
}

.about-content {
    display: grid;
    grid-template-columns: 0.9fr 1.4fr; /* Shrinks the logo side, expands the text side */
    gap: 60px;
    align-items: center;
    margin-top: 40px;
}

.about-text p {
    line-height: 1.75;
    margin-bottom: 1.1rem;
    max-width: 600px;
}

    .about-text p:last-of-type {
        margin-bottom: 0;
    }

.about-image-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
}

    /* Floating Gold Frame */
    .about-image-wrapper::after {
        content: '';
        position: absolute;
        top: -15px;
        left: -15px;
        width: 100%;
        height: 100%;
        border: 0.5px solid var(--gold);
        z-index: -1;
    }

.headshot {
    width: 100%;
    max-width: 450px;
    height: auto;
    border: 0.5px solid var(--gold);
    background: var(--white);
}

/* Updated Signature Placement */
.signature {
    font-family: 'Mrs Saint Delafield', cursive;
    font-size: 5.5rem;
    color: var(--gold);
    width: fit-content;
    margin-left: auto;
    margin-right: 15%; /* Adjusted for better visual balance */
    margin-top: 30px; /* Pulls it closer to the text */
    line-height: 1;
    transform: rotate(-1deg);
}

/* --- AI Intake Assistant Styling --- */
#ai-intake-bot {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: white;
    border: 1px solid var(--gold);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: none; /* Controlled by toggleBot() in your JS */
    flex-direction: column;
    z-index: 1000;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.chat-header {
    background: var(--gold);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    letter-spacing: 1px;
}

#chat-history {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.5;
    background: #fdfcf9; /* Subtle cream background */
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    background: white;
}

#user-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.chat-send-btn {
    background: var(--gold);
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.2s;
}

    .chat-send-btn:hover {
        opacity: 0.8;
    }

/* --- The Teaser Section (Top of Page) --- */
.ai-teaser {
    text-align: center;
    margin-bottom: 50px;
    padding: 30px;
    border: 1px dashed var(--gold);
    background: var(--cream);
}

/* --- Booking Page Layout (Tightened) --- */
.booking-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px; /* Reduced from 60px */
    min-height: 100vh;
    text-align: center;
}

.booking-logo {
    max-width: 220px; /* Slightly smaller logo to save vertical space */
    margin-bottom: 10px; /* Reduced from 30px */
}

#service-summary {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    font-size: 1.4rem; /* Slightly smaller */
    color: var(--gold);
    margin-top: 0;
    margin-bottom: 15px; /* Reduced from 40px */
    letter-spacing: 1px;
}

/* Calendar Container */
#calendar-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    min-height: 320px; /* Reduced to pull slots up higher */
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Time Slot Grid */
#slots-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px; /* Reduced from 15px */
    width: 100%;
    max-width: 600px;
    margin-top: 10px; /* Pulls buttons closer to the calendar */
}

/* Flatpickr Customization */
.flatpickr-calendar {
    background: var(--white);
    border: 1px solid var(--gold) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
    margin: 0 auto; /* Ensures the calendar widget itself stays centered */
}

.time-slot {
    padding: 12px;
    border: 1px solid var(--gold);
    background: transparent;
    color: var(--charcoal);
    cursor: pointer;
    transition: all 0.3s ease;
}

    .time-slot:hover {
        background: var(--gold);
        color: white;
    }

/* Loading Spinner */
#calendar-loader {
    padding: 40px;
    color: var(--gold);
    font-size: 0.8rem;
    letter-spacing: 3px;
}

/* Hide the 'weird' input box above the calendar */
#datepicker {
    display: none;
}

/* Refine the calendar container to prevent layout jumping */
#calendar-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    min-height: 350px; /* Reserves space so the page doesn't 'pop' when loaded */
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Ensure the inline calendar is centered and styled */
.flatpickr-calendar.inline {
    box-shadow: none !important; /* Optional: cleaner look without the double shadow */
    border: 1px solid var(--gold) !important;
    background: transparent !important;
}

/* Adjust the 'Select a Date' heading to match your other pages */
#service-summary {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    color: var(--gold);
    margin-top: 20px;
    letter-spacing: 1px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 2px solid var(--cream);
    border-top: 2px solid var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- Details / Confirmation Form --- */
.details-form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    width: 100%;
    text-align: left;
}

.details-form input {
    width: 100%;
    padding: 15px;
    border: none;
    border-bottom: 1px solid var(--gold); /* Minimalist underline style */
    background: transparent;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: var(--charcoal);
    transition: border-color 0.3s ease;
}

    .details-form input:focus {
        outline: none;
        border-bottom: 2px solid var(--gold);
    }

    /* Placeholder styling */
    .details-form input::placeholder {
        color: rgba(0, 0, 0, 0.3);
        font-style: italic;
    }

/* Error Message (Hidden by default) */
.error-text {
    display: none; /* JS will toggle this */
    color: #ff4444;
    font-size: 0.9rem;
    margin-top: 10px;
    font-style: italic;
}

/* Adjusting the subtext from image_82f959.png */
#details-subtext {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: var(--gold);
    letter-spacing: 1px;
}

/* --- Referrals / Partners Page --- */

.referrals-page .container {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 40px;
    text-align: center;
}

/* Updated Grid logic for dynamic centering */
.referral-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Fixes centering for image_77d9b6.png */
    gap: 30px;
    margin: 60px 0;
}

.lmt-card {
    background: var(--cream);
    border: 0.5px solid rgba(181, 149, 81, 0.25);
    padding: 30px;
    display: flex;
    flex-direction: column;
    text-align: left;
    width: 100%;
    max-width: 500px;
    flex: 0 1 450px; /* Changed to 0 growth so centering works with 1 card */
}

/* Header Row for Portrait + Info */
.card-header-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
}

.partner-portrait {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    border: 0.5px solid var(--gold);
    flex-shrink: 0;
}

    .partner-portrait img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.partner-info-right {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.partner-meta h3 {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: 1px;
    color: var(--charcoal);
}

.specialty {
    color: var(--gold);
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.partner-contact-text {
    font-size: 0.85rem;
    line-height: 1.4;
    opacity: 0.8;
}

    .partner-contact-text p {
        margin: 0;
    }

.partner-bio {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-top: 10px;
}

/* Restored Referral Invite & Buttons */
.referral-invite {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

    .referral-invite p {
        font-size: 1.1rem;
        letter-spacing: 1px;
    }

.cta-btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 45px;
    border: 0.5px solid var(--charcoal);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 5px;
    color: var(--charcoal);
    transition: 0.4s;
}

    .cta-btn:hover {
        border-color: var(--gold);
        color: var(--gold);
        letter-spacing: 7px;
    }

/* --- Referrals Grid --- */
.coming-soon-box {
    margin: 60px auto;
    padding: 40px;
    background-color: var(--cream);
    border: 0.5px solid rgba(181, 149, 81, 0.2);
    text-align: center;
}

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

    .about-image-wrapper::after {
        display: none;
    }

    .signature {
        margin-right: auto;
        margin-left: auto;
    }
}

/* --- Enhanced Mobile Responsiveness --- */
@media (max-width: 768px) {
    /* 1. Header & Navigation */
    .header-container {
        flex-direction: column; /* Stacks logo and links */
        gap: 20px;
        padding: 0 20px;
    }

    .nav-links {
        gap: 15px; /* Tighter spacing for mobile thumbs */
        flex-wrap: wrap; /* Allows links to wrap to a second line if needed */
        justify-content: center;
    }

    .logo-link {
        flex-direction: column; /* Stacks the icon/logo image above the text */
        justify-content: center;
        text-align: center;
        width: 100%;
        margin: 0 auto;
    }

    .brand-name {
        text-transform: none; /* Removes the all-caps requirement */
        letter-spacing: 1px; /* Tightens spacing for a softer look */
        font-size: 1.4rem; /* Adjust size for mobile readability */
        display: block;
        width: 100%;
    }

    /* 2. Hero & Typography */
    .hero-main {
        height: auto; /* Allow content to dictate height on small screens */
        padding: 60px 20px;
    }

    .gold-heading {
        font-size: 1.5rem; /* Shrink to prevent horizontal scroll */
        letter-spacing: 2px;
        white-space: normal; /* CRITICAL: Allow long headings to wrap */
        line-height: 1.2;
    }

    .main-art {
        max-height: 40vh; /* Shorter art so the button stays visible */
        width: 90%;
    }

    /* 3. About & Services Layouts */
    .about-container {
        margin: 40px auto;
        padding: 0 20px;
    }

    .about-content {
        grid-template-columns: 1fr; /* Force single column */
        gap: 30px;
    }

    .about-text p {
        max-width: 100%;
        font-size: 1.1rem;
    }

    /* 4. The Signature Fix */
    .signature {
        font-size: 3.5rem; /* Dramatically smaller for mobile */
        margin-right: auto;
        margin-left: auto;
        text-align: center;
        width: 100%;
    }

    /* 5. Booking & Form Elements */
    .service-menu {
        padding: 20px;
        border: none; /* Cleaner look on small screens */
    }

    #slots-container {
        grid-template-columns: 1fr 1fr; /* Two columns of time slots instead of many */
    }

    .email-notice {
        max-width: 100%;
        font-size: 1rem;
    }

    /* 6. AI Bot Mobile Tuning */
    #ai-intake-bot {
        width: 100%; /* Full width chat on phones */
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .service-menu .menu-section h2 {
        text-transform: none; /* Removes all-caps */
        font-size: 1.25rem; /* Scales down slightly for mobile */
        letter-spacing: 1px; /* Reduces spacing to match the new casing */
        text-align: center; /* Centers the section title */
        padding-bottom: 8px;
        margin-bottom: 15px;
        white-space: normal; /* Ensures long service category names wrap */
    }

    /* Optional: Center the dropdown and labels to match the new heading alignment */
    #baseService, .enhancement-item {
        text-align: center;
    }

    /* Maybe */
    /*.enhancement-item {
        flex-direction: column;*/ /* Stacks name and checkbox for better tap targets */
        /*gap: 10px;
        padding: 15px 0;
    }*/

    .addon-check {
        margin-left: 0; /* Centers the checkbox under the text */
    }

    /* 7. Referrals & Cards */
    .card-header-row {
        flex-direction: column;
        text-align: center;
    }

    .partner-info-right {
        align-items: center;
    }
}