/* Front Page */

{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    max-width: 100%;
    overflow-x: hidden;
    width: 100vw;
}

body {
    font-family: 'Bellota Text', cursive;
    color: #2f2218;
    background-color: #f5f0e8;
    height: 100%;
    font-weight: 500;
}

section {
    width: 100%;
    position: relative;
    background-position: center;
    background-size: cover;
    overflow: hidden;
}

/* Nav */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999;
    background-color: #f5f0e8;
    font-weight: 300;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav a {
    color: #000;
    padding: 30px;
    text-decoration: none;
    font-size: 17px;
    text-align: center;
}

.nav a:hover {
    color: #c3c3c3;
}

/* Hero */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 40px 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.hero h2 {
    font-family: 'Amatic SC', sans-serif;
    font-size: 4.5rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    color: #1a1a1a;
    margin: 0 auto 1.25rem;
    line-height: 1;
    text-align: center;
}

.hero .rule-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-gap: 1rem;
    margin: 0 auto 1rem;
    max-width: 560px;
}

.hero .rule {
    height: 1px;
    width: 48px;
    background: #3a5a32;
    flex-shrink: 0;
}

.hero h1 {
    font-family: 'Libre Bodoni', serif;
    font-weight: 100;
    font-size: 0.95rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #3a5a32;
    margin: 0;
    text-align: center;
    white-space: nowrap;
}

.hero p {
    max-width: 780px;
    margin: 0 auto;
    line-height: 1.85;
    text-align: center;
    font-size: 1rem;
}

/* Gallery */
.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 40px;
    width: 100%;
    box-sizing: border-box;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 16px;
    width: 100%;
    box-sizing: border-box;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .overlay {
    opacity: 1;
}

/* Overlay */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 45, 60, 0.8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    text-align: center;
}

.overlay-card {
    max-width: 80%;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.overlay h1 {
    margin: 0;
    color: #fff;
    font-family: 'Bellota Text', cursive;
    font-weight: 300;
    font-size: 20px;
    line-height: 1.5;
}

.overlay h2 {
    margin: 0;
    font-family: 'Libre Bodoni', serif;
    font-size: 20px;
    font-weight: 500;
    color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
    .hero h1 {
        font-size: 0.8rem;
    }
    .hero p {
        max-width: 560px;
    }
    .home-container {
        padding: 24px 30px;
    }
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 6rem 1.5rem 2rem;
    }
    .hero h2 {
        font-size: 2.5rem;
    }
    .hero h1 {
        font-size: 0.65rem;
    }
    .hero .rule-wrap {
        max-width: 100%;
        padding: 0 1rem;
    }
    .hero p {
        max-width: 100%;
        padding: 0 0.5rem;
    }
    .home-container {
        padding: 24px 16px;
    }
    .gallery {
        grid-template-columns: 1fr;
        padding: 8px;
    }
    .overlay {
        opacity: 1;
        background: rgba(0, 0, 0, 0.4);
    }
    .overlay-card {
        opacity: 1;
        transform: none;
    }
}