/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #C0593A;
    color: #FFFCF8;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* ===== NAVBAR ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(255, 252, 248, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(92, 38, 24, 0.08);
}

.nav-logo-text {
    transition: color 0.3s ease;
}

#navbar:not(.scrolled) .nav-logo-text {
    color: #5C2618;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: #C0593A;
    border-radius: 1px;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 24px;
}

/* ===== MOBILE MENU ===== */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* ===== HERO ===== */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 0.8s ease forwards;
}

.hero-image {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 0.8s ease 0.2s forwards;
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

@keyframes heroFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ===== GEOMETRIC SHAPES ===== */
.geo-shape {
    position: absolute;
    pointer-events: none;
}

.circle-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(192, 89, 58, 0.08) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    border-radius: 50%;
    animation: drift 8s ease-in-out infinite;
}

.circle-2 {
    width: 200px;
    height: 200px;
    background: rgba(224, 160, 74, 0.1);
    bottom: 20%;
    left: 5%;
    border-radius: 50%;
    animation: drift 6s ease-in-out infinite reverse;
}

.circle-3 {
    width: 120px;
    height: 120px;
    background: rgba(192, 89, 58, 0.06);
    top: 40%;
    right: 45%;
    border-radius: 50%;
    animation: drift 10s ease-in-out infinite;
}

.triangle-1 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid rgba(192, 89, 58, 0.06);
    top: 25%;
    left: 8%;
    transform: rotate(15deg);
    animation: spin-slow 20s linear infinite;
}

.rect-1 {
    width: 80px;
    height: 80px;
    background: rgba(224, 160, 74, 0.08);
    border-radius: 16px;
    bottom: 15%;
    right: 5%;
    transform: rotate(45deg);
    animation: drift 7s ease-in-out infinite;
}

.dot-grid {
    width: 120px;
    height: 120px;
    top: 60%;
    left: 2%;
    background-image: radial-gradient(circle, rgba(192, 89, 58, 0.15) 1px, transparent 1px);
    background-size: 16px 16px;
    animation: drift 9s ease-in-out infinite reverse;
}

@keyframes drift {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33% { transform: translateY(-15px) rotate(2deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

@keyframes spin-slow {
    from { transform: rotate(15deg); }
    to { transform: rotate(375deg); }
}

/* ===== ABOUT ===== */
.about-images {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-images.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-content {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-content.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== MENU ===== */
.menu-tab {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
}

.menu-tab.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.menu-tab:hover:not(.active) {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

.menu-panel {
    animation: menuFadeIn 0.5s ease forwards;
}

@keyframes menuFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== GALLERY ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 280px);
    gap: 16px;
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(92, 38, 24, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
.gallery-item:nth-child(2) { grid-column: span 1; grid-row: span 2; }
.gallery-item:nth-child(3) { grid-column: span 1; grid-row: span 1; }
.gallery-item:nth-child(4) { grid-column: span 1; grid-row: span 1; }
.gallery-item:nth-child(5) { grid-column: span 1; grid-row: span 1; }
.gallery-item:nth-child(6) { grid-column: span 2; grid-row: span 1; }

/* ===== CONTACT FORM ===== */
#contact-form input,
#contact-form textarea {
    transition: all 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(192, 89, 58, 0.1);
}

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 240px);
    }
    .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
    .gallery-item:nth-child(2) { grid-column: span 1; grid-row: span 1; }
    .gallery-item:nth-child(3) { grid-column: span 1; grid-row: span 1; }
    .gallery-item:nth-child(4) { grid-column: span 1; grid-row: span 1; }
    .gallery-item:nth-child(5) { grid-column: span 1; grid-row: span 1; }
    .gallery-item:nth-child(6) { grid-column: span 2; grid-row: span 1; }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 220px);
    }
    .gallery-item:nth-child(n) { grid-column: span 1; grid-row: span 1; }

    h1 {
        font-size: 2.75rem !important;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
        max-height: 50vh;
    }

    .floating-card {
        display: none;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-rows: repeat(6, 200px);
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}
