/* ============================================
   Mayer's Office — Custom Styles
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #7B2D3B;
    color: #F5E6E0;
}

/* --- Navigation --- */
.nav-fixed {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-fixed.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #7B2D3B;
    transition: width 0.3s ease;
}

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

/* Mobile Menu */
.mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-line {
    transition: all 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

#menu-toggle.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Buttons --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #7B2D3B;
    color: #fff;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #7B2D3B;
}

.btn-primary:hover {
    background: #6c2530;
    border-color: #6c2530;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(123, 45, 59, 0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #fff;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    transform: translateY(-2px);
}

/* --- Hero --- */
.hero {
    position: relative;
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(58, 19, 24, 0.82) 0%,
        rgba(123, 45, 59, 0.72) 50%,
        rgba(180, 88, 69, 0.55) 100%
    );
}

.hero-shape {
    animation: float 6s ease-in-out infinite;
}

.hero-shape-2 { animation-delay: -1.5s; animation-duration: 8s; }
.hero-shape-3 { animation-delay: -3s; animation-duration: 7s; }
.hero-shape-4 { animation-delay: -4.5s; animation-duration: 9s; }
.hero-shape-5 { animation-delay: -2s; animation-duration: 5s; }

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.hero-content {
    opacity: 0;
    animation: heroFadeIn 1s ease forwards;
    animation-delay: 0.3s;
}

.hero-title {
    opacity: 0;
    animation: heroFadeIn 1s ease forwards;
    animation-delay: 0.5s;
}

.hero-subtitle {
    opacity: 0;
    animation: heroFadeIn 1s ease forwards;
    animation-delay: 0.7s;
}

.hero-buttons {
    opacity: 0;
    animation: heroFadeIn 1s ease forwards;
    animation-delay: 0.9s;
}

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

.scroll-indicator {
    animation: fadeInUp 1s ease forwards;
    animation-delay: 1.5s;
    opacity: 0;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* --- Section Spacing --- */
.section {
    position: relative;
}

/* --- Labels --- */
.label {
    letter-spacing: 0.15em;
}

/* --- Image Grid --- */
.image-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
    height: 500px;
}

.image-grid-item {
    overflow: hidden;
    border-radius: 16px;
}

.image-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.image-grid-item--large {
    grid-row: 1 / 3;
}

.image-grid-item--small {
    grid-column: 2;
    grid-row: 1;
}

.image-grid-item--accent {
    grid-column: 2;
    grid-row: 2;
}

/* --- Feature Cards --- */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(123, 45, 59, 0.12);
}

/* --- Menu --- */
.menu-tabs {
    box-shadow: 0 2px 8px rgba(123, 45, 59, 0.06);
}

.menu-tab {
    color: #7B2D3B;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-tab.active {
    background: #7B2D3B;
    color: #fff;
    box-shadow: 0 4px 12px rgba(123, 45, 59, 0.25);
}

.menu-tab:hover:not(.active) {
    background: #f9f0f1;
}

.menu-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.menu-item:hover {
    transform: translateX(4px);
}

/* --- Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 280px 280px;
    gap: 1rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
}

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

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

.gallery-item--1 {
    grid-row: 1 / 3;
}

.gallery-item--2 {
    grid-column: 2;
    grid-row: 1;
}

.gallery-item--3 {
    grid-column: 2;
    grid-row: 2;
}

.gallery-item--4 {
    grid-column: 1 / 3;
    grid-row: 3;
}

/* --- Visit Cards --- */
.visit-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.visit-card:hover {
    transform: translateX(6px);
    box-shadow: 0 8px 25px rgba(123, 45, 59, 0.1);
}

/* --- Contact Form --- */
.input-field {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-field:focus {
    box-shadow: 0 0 0 3px rgba(123, 45, 59, 0.1);
}

.success-message {
    animation: fadeIn 0.5s ease forwards;
}

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

/* --- Reveal Animations --- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-up.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
    opacity: 1;
    transform: translate(0, 0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .image-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 250px 200px 160px;
        height: auto;
    }

    .image-grid-item--large {
        grid-row: 1;
    }

    .image-grid-item--small {
        grid-column: 1;
        grid-row: 2;
    }

    .image-grid-item--accent {
        grid-column: 1;
        grid-row: 3;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 220px 220px 220px;
    }

    .gallery-item--1,
    .gallery-item--2,
    .gallery-item--3,
    .gallery-item--4 {
        grid-column: 1;
        grid-row: auto;
    }

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

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

    .gallery-item--3 {
        grid-row: 3;
    }

    .gallery-item--4 {
        grid-row: 4;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-title span {
        display: block;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .image-grid {
        grid-template-rows: 200px 180px 140px;
    }
}

/* --- Print --- */
@media print {
    .nav-fixed,
    .hero-scroll,
    .hero-shape {
        display: none;
    }
}
