/* =============================================
   PAGE LAYOUT — Header offset
   ============================================= */
.page-home {
    margin-top: var(--header-h);
}

/* =============================================
   HOME — FULL-SCREEN BANNERS
   ============================================= */
.home-banner {
    width: 100%;
    min-height: 100vh;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #2a3d5a;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    padding: clamp(2.5rem, 5vw, 5rem);
}
.home-banner::before,
.home-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}
.home-banner::before {
    z-index: 0;
    background: linear-gradient(0deg, rgba(255, 255, 255, 0.46) 0%, rgba(255, 255, 255, 0.12) 28%, rgba(255, 255, 255, 0) 56%);
}
.home-banner::after {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.04) 100%);
    z-index: 1;
}
.home-banner--1 {
    background-image: url('../images/banners/banner5.webp');
    background-position: center top;
    min-height: 100vh;
}
.home-banner--2 {
    background-image: url('../images/banners/banner6.webp');
    background-position: center center;
}
.home-banner--2::before {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.48) 0%, rgba(0, 0, 0, 0.16) 30%, rgba(0, 0, 0, 0) 62%);
}
.home-banner__mark {
    position: relative;
    z-index: 2;
    max-width: 18rem;
}
.home-banner__mark p {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.68rem, 0.8vw, 0.8rem);
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    opacity: 0.82;
}
.home-banner__mark h2 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.1rem, 3.8vw, 4.25rem);
    font-weight: 400;
    line-height: 0.95;
    margin: 0;
}
.home-banner__mark--dark {
    color: #111;
}
.home-banner__mark--light {
    color: #fff;
}
.home-banner__feature {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
}
.home-banner__feature p {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.76rem, 0.9vw, 0.9rem);
    font-weight: 500;
    line-height: 1.2;
    margin: 0 0 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}
.home-banner__feature h2 {
    font-family: 'DM Serif Display', serif;
    font-size: clamp(2.6rem, 5vw, 5.25rem);
    font-weight: 400;
    line-height: 0.95;
    margin: 0 0 1.4rem;
}
.home-banner__feature a {
    display: inline-flex;
    align-items: center;
    min-height: 2.7rem;
    padding: 0 1.45rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: inherit;
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease;
}
.home-banner__feature a:hover,
.home-banner__feature a:focus-visible {
    background: #fff;
    color: #111;
}
.home-banner__action {
    position: relative;
    z-index: 2;
    color: #111;
    text-align: center;
}
.home-banner__action--light {
    color: #fff;
}
.home-banner__action a {
    display: inline-flex;
    align-items: center;
    min-height: 2.7rem;
    padding: 0 1.45rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    color: inherit;
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease;
}
.home-banner__action a:hover,
.home-banner__action a:focus-visible {
    background: #111;
    color: #fff;
}
.home-banner__action--light a:hover,
.home-banner__action--light a:focus-visible {
    background: #fff;
    color: #111;
}

/* =============================================
   HOME — IMAGE CAROUSEL
   ============================================= */
.home-carousel {
    background: #fff;
    padding: clamp(1.5rem, 3vw, 2.5rem);
}
.carousel-wrap {
    position: relative;
    overflow: hidden;
    width: 60%;
    margin: 0 auto;
    border-radius: clamp(0.75rem, 1vw, 1.25rem);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    /* Promote wrap's clip region to its own GPU layer to prevent
       border-radius + overflow:hidden repaint artifacts during child animation */
    transform: translateZ(0);
}
.carousel-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.03) 0%, transparent 40%, rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
    z-index: 1;
}
.carousel-track {
    display: flex;
    will-change: transform;
    backface-visibility: hidden;
}
.carousel-slide {
    flex-shrink: 0;
    overflow: hidden;
    height: 100%;
    /* Width is set explicitly in pixels by JS to avoid flex-basis
       percentage resolution against an indefinite container width */
}
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: translateZ(0);
}
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0;
}
.carousel-btn:hover {
    transform: translateY(-50%) scale(1.15);
}
.carousel-btn:active {
    transform: translateY(-50%) scale(0.92);
}
.carousel-btn svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke: currentColor;
    fill: currentColor;
    opacity: 0.65;
    transition: opacity 0.25s ease;
}
.carousel-btn:hover svg {
    opacity: 1;
}
.carousel-btn--prev { left: clamp(1rem, 2vw, 2.5rem); }
.carousel-btn--next { right: clamp(1rem, 2vw, 2.5rem); }

/* =============================================
   HOME — PHOTO SHOWCASE
   ============================================= */
.home-showcase {
    padding: clamp(2.5rem, 5vw, 4rem) clamp(2.5rem, 5vw, 4rem) clamp(6rem, 12vw, 10rem);
    background: #F5F5F0;
    position: relative;
}
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: auto;
    gap: clamp(0.5rem, 0.75vw, 0.875rem);
    max-width: none;
    margin: 0 auto;
    padding: 0;
    width: 100%;
    padding-top: 0;
    align-items: start;
}
.showcase-item {
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.showcase-item:nth-child(2) { margin-top: clamp(40px, 5vw, 60px); }
.showcase-item:nth-child(4) { margin-top: clamp(40px, 5vw, 60px); }

.showcase-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.65s ease;
    filter: brightness(1);
}
.showcase-item:hover img {
    transform: scale(1.04) translateZ(0);
    filter: brightness(1.05);
}
.showcase-item:hover {
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .showcase-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: clamp(0.5rem, 0.75vw, 0.875rem);
    }
    .showcase-item:nth-child(2),
    .showcase-item:nth-child(4) {
        margin-top: clamp(30px, 4vw, 40px);
    }
    .showcase-item:nth-child(n+4) { display: none; }
}
@media (max-width: 768px) {
    .home-banner {
        min-height: 70vh;
        align-items: flex-end;
        padding: clamp(2rem, 8vw, 3rem);
    }
    .home-banner::before {
        background: linear-gradient(0deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.2) 40%, rgba(255, 255, 255, 0) 74%);
    }
    .home-banner--2::before {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.22) 40%, rgba(0, 0, 0, 0) 74%);
    }
    .home-banner__mark p {
        font-size: 0.72rem;
        letter-spacing: 0.18em;
    }
    .home-banner__mark h2,
    .home-banner__feature h2 {
        font-size: clamp(2.05rem, 10vw, 3.2rem);
    }
    .home-banner__feature a,
    .home-banner__action a {
        min-height: 2.55rem;
        padding: 0 1.2rem;
        font-size: 0.68rem;
    }
    .home-carousel {
        padding: clamp(1.25rem, 5vw, 2rem);
    }
    .showcase-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: clamp(0.625rem, 1vw, 0.875rem);
    }
    .showcase-item:nth-child(2),
    .showcase-item:nth-child(4) {
        margin-top: 0;
    }
    .showcase-item:nth-child(n+3) { display: none; }
}
