/* ===== 1. CSS Custom Properties ===== */
:root {
    /* Brand Colors */
    --color-primary: #A0785A;
    --color-primary-light: #B8936F;
    --color-primary-dark: #8A6548;

    /* Backgrounds */
    --color-bg-hero: #E8DDD3;
    --color-bg-warm: #D5C8BA;
    --color-bg-light: #F5F0EB;
    --color-bg-white: #FFFBF7;

    /* Text */
    --color-text-dark: #3D2E22;
    --color-text-medium: #6B5B4E;
    --color-text-light: #9A8B7D;

    /* Accent */
    --color-accent-gold: #C9A96E;
    --color-border: #D5C8BA;

    /* Fonts */
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;

    /* Spacing */
    --section-padding: 6rem 0;
    --container-width: 1200px;
    --container-padding: 0 2rem;
}

/* ===== 2. Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

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

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

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

ul {
    list-style: none;
}

/* ===== 3. Typography ===== */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    line-height: 1.2;
    color: var(--color-text-dark);
}

h2 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 500;
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 500;
}

h4 {
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-medium);
}

/* ===== 4. Layout ===== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: var(--container-padding);
}

.section {
    padding: var(--section-padding);
}

.section-title {
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-divider {
    width: 60px;
    height: 2px;
    background-color: var(--color-primary);
    margin: 0 auto 1.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-medium);
    font-weight: 300;
    font-size: 1.0625rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* ===== 5. Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}

.navbar.scrolled {
    background-color: var(--color-bg-white);
    padding: 0.75rem 0;
    box-shadow: 0 2px 20px rgba(61, 46, 34, 0.08);
}

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

.nav-logo img {
    height: 45px;
    width: auto;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.navbar.scrolled .nav-logo img {
    opacity: 1;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-medium);
    position: relative;
    padding: 0.25rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--color-primary);
}

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

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text-dark);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== 6. Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #E8DDD3 0%, #D5C8BA 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    animation: heroFadeIn 1.2s ease-out;
}

.hero-logo {
    max-width: 400px;
    width: 80%;
    margin: 0 auto 2rem;
}

.hero-tagline {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 400;
    color: var(--color-text-medium);
    letter-spacing: 0.02em;
}

.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scroll-arrow {
    width: 1px;
    height: 40px;
    background-color: var(--color-primary);
    position: relative;
    animation: scrollBounce 2s ease-in-out infinite;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 8px;
    height: 8px;
    border-bottom: 1.5px solid var(--color-primary);
    border-right: 1.5px solid var(--color-primary);
}

/* ===== 7. About ===== */
.about {
    background-color: var(--color-bg-light);
}

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

.about-text .lead {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--color-text-dark);
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.about-text p {
    color: var(--color-text-medium);
    margin-bottom: 1.25rem;
}

.about-quote {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    color: var(--color-primary);
    border-left: 3px solid var(--color-accent-gold);
    padding-left: 1.5rem;
    margin: 2rem 0;
    line-height: 1.5;
}

.about-image img {
    border-radius: 12px;
    object-fit: cover;
    width: 100%;
    max-height: 550px;
    box-shadow: 0 20px 60px rgba(61, 46, 34, 0.12);
}

/* ===== 8. Services ===== */
.services {
    background-color: var(--color-bg-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background-color: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(61, 46, 34, 0.1);
}

.service-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.5rem;
    color: var(--color-primary);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    margin-bottom: 0.75rem;
    color: var(--color-text-dark);
}

.service-card p {
    color: var(--color-text-medium);
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* ===== 9. Gallery ===== */
.gallery {
    background-color: var(--color-bg-light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 280px;
    gap: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    display: block;
}

.gallery-item--tall {
    grid-row: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(61, 46, 34, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.4s ease;
}

.gallery-overlay span {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-style: italic;
    color: white;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    background: rgba(61, 46, 34, 0.45);
}

.gallery-item:hover .gallery-overlay span {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 10. Contact ===== */
.contact {
    background-color: var(--color-bg-warm);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: start;
}

/* Form */
.contact-form {
    background-color: var(--color-bg-white);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(61, 46, 34, 0.08);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-medium);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(160, 120, 90, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-light);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236B5B4E' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    color: white;
    transform: translateY(-1px);
}

.form-message {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    text-align: center;
}

.form-message.visible {
    display: block;
}

.form-message.success {
    background-color: #e8f5e8;
    color: #2d6a2d;
}

.form-message.error {
    background-color: #fde8e8;
    color: #9b1c1c;
}

.cf-turnstile {
    margin-bottom: 1rem;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-top: 1rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--color-primary);
    margin-top: 0.125rem;
}

.contact-icon svg {
    width: 100%;
    height: 100%;
}

.contact-info-item h4 {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.contact-info-item a {
    font-size: 0.9375rem;
    color: var(--color-text-dark);
}

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

/* ===== 11. WhatsApp Float ===== */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
    z-index: 999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: whatsappPulse 3s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
}

.whatsapp-float svg {
    width: 28px;
    height: 28px;
}

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

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    height: 50px;
    width: auto;
    margin-bottom: 1rem;
    filter: brightness(1.5);
    opacity: 0.9;
}

.footer-brand p {
    color: var(--color-text-light);
    font-size: 0.9375rem;
    max-width: 300px;
}

.footer h4 {
    color: var(--color-bg-warm);
    margin-bottom: 1.25rem;
    font-size: 0.75rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--color-text-light);
    font-size: 0.9375rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-bg-light);
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-text-light);
    border-radius: 50%;
    color: var(--color-text-light);
    transition: color 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.social-icons a:hover {
    color: var(--color-bg-white);
    border-color: var(--color-primary);
    background-color: var(--color-primary);
}

.social-icons svg {
    width: 18px;
    height: 18px;
}

.footer-bottom {
    border-top: 1px solid rgba(154, 139, 125, 0.2);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--color-text-light);
    font-size: 0.8125rem;
}

/* ===== 13. Animations ===== */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scrollBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(10px);
    }
}

@keyframes whatsappPulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
    }
    50% {
        box-shadow: 0 4px 24px rgba(37, 211, 102, 0.55);
    }
}

/* ===== 14. Media Queries ===== */

/* Tablet */
@media (max-width: 1023px) {
    :root {
        --section-padding: 4.5rem 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-image {
        order: -1;
    }

    .about-image img {
        max-height: 400px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 260px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

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

/* Mobile */
@media (max-width: 767px) {
    :root {
        --section-padding: 3.5rem 0;
        --container-padding: 0 1.25rem;
    }

    /* Mobile Nav */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: var(--color-bg-white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: right 0.4s ease;
        box-shadow: -10px 0 30px rgba(61, 46, 34, 0.1);
    }

    .nav-menu.open {
        right: 0;
    }

    .nav-link {
        font-size: 1rem;
    }

    /* Hero */
    .hero-logo {
        max-width: 260px;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }

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

    /* Gallery */
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 300px;
    }

    .gallery-item--tall {
        grid-row: span 1;
    }

    /* Contact */
    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 2rem 1.5rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* WhatsApp */
    .whatsapp-float {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 50px;
        height: 50px;
    }

    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-content {
        animation: none;
    }

    .scroll-arrow {
        animation: none;
    }

    .whatsapp-float {
        animation: none;
    }

    .gallery-item img {
        transition: none;
    }

    .service-card {
        transition: none;
    }
}
