:root {
    --header-bg: #f9f5e8;
    --logo-color: #f29879;
    /* Peach salmon */

    --left-bg: #fcad46;
    /* Deeper orange */
    --center-bg: #8ce3f7;
    /* Vibrant Light blue (closer to image) */
    --right-bg: #d0eefb;
    /* Pale blue */

    --text-dark: #514e54;
    --card-bg: #f6efdf;
    --card-wrapper-bg: #cdefeb;
    /* Lighter cyan for layer between */

    --leather-base: #ca8545;
    --btn-text: #ead49b;
    --preview-chip-bg: #3f5a71;
    --preview-chip-text: #f8f5ec;

    --font-logo: 'Playfair Display', serif;
    --font-sans: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--header-bg);
    overflow-x: hidden;
    margin: 0;
}

.main-header {
    background-color: var(--header-bg);
    padding: 12px 5vw;
    display: flex;
    justify-content: space-between;
    /* Changed to space-between to push nav left, logo right */
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10;
}

.header-nav {
    display: flex;
    align-items: center;
    position: relative;
}

.brand-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    /* Space between links */
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-dark);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-links li a:hover {
    color: var(--leather-base);
    background-color: rgba(0, 0, 0, 0.03);
}

.nav-links li a.is-active {
    color: var(--leather-base);
    background-color: rgba(0, 0, 0, 0.05);
}

.nav-scroll-arrow {
    display: none;
}

.logo-text {
    font-family: var(--font-logo);
    color: var(--logo-color);
    font-size: 4.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1), 0 0 20px rgba(255, 255, 255, 0.8);
}

.environment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--preview-chip-bg);
    color: var(--preview-chip-text);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.11em;
    font-weight: 700;
    line-height: 1;
    border-radius: 999px;
    padding: 8px 14px;
    margin: 0;
    box-shadow: 0 2px 8px rgba(40, 56, 71, 0.24);
}

/* Hero Section */
.hero-section {
    display: flex;
    width: 100%;
    /* Let the inner contents and panel heights dictate layout, but ensure a min size */
    height: calc(100vh - 100px);
    min-height: 500px;
    max-height: 850px;
}

.panel {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Left Panel */
.left-panel {
    width: 25%;
    background-color: var(--left-bg);
    position: relative;
    align-items: flex-end;
    /* Align image to bottom */
}

/* Right Panel */
.right-panel {
    width: 25%;
    background-color: var(--right-bg);
    position: relative;
    align-items: flex-end;
}

.model-img {
    height: 100%;
    max-height: 100%;
    /* Ensure it fits perfectly */
    object-fit: contain;
    object-position: center bottom;
    /* Anchor to bottom edge exactly */
}

/* Center Panel */
.center-panel {
    width: 50%;
    /* Need very specific light blue */
    background: linear-gradient(135deg, #a4ddf0 0%, #8acbe5 100%);
    flex-direction: column;
    justify-content: center;
    padding: 0;
    /* Let flex scale stuff */
    position: relative;
}

.hero-title {
    text-align: center;
    color: #ffffff;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4), 1px 1px 2px rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
    font-family: var(--font-sans);
    line-height: 1.15;
    z-index: 5;
}

.hero-title .line-1 {
    font-size: 2.3vw;
    /* Use vw for dynamic sizing relative to screen */
    font-weight: 400;
    letter-spacing: 0.05em;
    display: block;
}

.hero-title .line-2 {
    font-size: 3.8vw;
    font-weight: 600;
    letter-spacing: 0.03em;
    display: block;
}

/* Center Card */
.center-card-wrapper {
    background-color: #d1ecf6;
    /* Very gentle pale blue */
    padding: 2vw 2.5vw;
    width: 85%;
    max-width: 650px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

/* Inner Beige Card */
.center-card {
    background-color: var(--card-bg);
    text-align: center;
    padding: 3vw 2vw;
}

.card-title {
    font-family: var(--font-logo);
    color: var(--text-dark);
    font-size: 4.8vw;
    font-weight: 400;
    /* Regular weight in original */
    letter-spacing: 0.1em;
    margin-bottom: 5px;
    line-height: 1;
}

.card-subtitle {
    font-family: var(--font-sans);
    color: var(--text-dark);
    font-size: 1.1vw;
    font-weight: 400;
    letter-spacing: 0.15em;
    margin-bottom: 2.5vw;
    text-transform: uppercase;
}

/* Leather Button */
.leather-button {
    display: inline-block;
    background: #c3844a;
    background-image:
        linear-gradient(to bottom, #d2945d, #b57037);
    color: var(--btn-text);
    text-decoration: none;
    font-family: var(--font-sans);
    font-size: 1.25vw;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 1vw 3vw;
    border-radius: 8px;
    box-shadow:
        0 8px 15px rgba(0, 0, 0, 0.25),
        inset 0 1px 3px rgba(255, 255, 255, 0.4),
        inset 0 -2px 6px rgba(0, 0, 0, 0.4);
    border: 1px solid #7c441b;
    position: relative;
    text-shadow:
        1px 1px 0px rgba(255, 255, 255, 0.1),
        -1px -1px 1px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease;
    z-index: 1;
    cursor: pointer;
}

/* Stitches */
.leather-button::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1.5px dashed #6f3b14;
    border-radius: 5px;
    pointer-events: none;
    z-index: 2;
    opacity: 0.9;
}

.leather-button:hover {
    transform: scale(1.04);
}

/* Category Gallery */
.category-gallery {
    position: absolute;
    left: clamp(14px, 2vw, 24px);
    right: clamp(14px, 2vw, 24px);
    top: clamp(86px, 17%, 148px);
    bottom: clamp(12px, 2.4vh, 22px);
    background: linear-gradient(180deg, #fbf3e6 0%, #f2e5d3 100%);
    border: 1px solid rgba(124, 93, 62, 0.24);
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 14;
    transform: translateY(104%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease;
}

.category-gallery.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.center-panel .hero-title,
.center-panel .center-card-wrapper {
    transition: opacity 0.24s ease, transform 0.24s ease;
}

.center-panel.gallery-open .hero-title,
.center-panel.gallery-open .center-card-wrapper {
    opacity: 0.16;
    transform: translateY(-6px);
    pointer-events: none;
}

.gallery-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.gallery-kicker {
    color: #8a6a4a;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    margin: 0;
}

.gallery-close {
    border: 1px solid #ceb08d;
    background: #fff5e8;
    color: #5f4a34;
    border-radius: 999px;
    min-width: 36px;
    min-height: 36px;
    padding: 8px 12px;
    font-size: 0.72rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.gallery-title {
    font-family: var(--font-logo);
    color: #4c3c2f;
    font-size: clamp(1.35rem, 1.8vw, 1.95rem);
    line-height: 1.1;
    margin: 0;
}

.gallery-description {
    color: #6e5d4c;
    font-size: 0.84rem;
    line-height: 1.45;
    margin: 0;
}

.gallery-status {
    margin: 0;
    color: #6d5a47;
    font-size: 0.82rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
    overflow-y: auto;
    min-height: 0;
    flex: 1;
    padding-right: 3px;
    align-content: flex-start;
}

.gallery-card {
    position: relative;
    height: 260px;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(123, 96, 66, 0.18);
}

.gallery-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background-color: #f7efe1;
    padding: 0;
}

@media (min-width: 1280px) {
    .gallery-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Handle really wide monitors gracefully */
@media (min-width: 1400px) {
    .hero-title .line-1 {
        font-size: 32px;
    }

    .hero-title .line-2 {
        font-size: 52px;
    }

    .center-card-wrapper {
        padding: 30px 40px;
    }

    .center-card {
        padding: 40px 30px;
    }

    .card-title {
        font-size: 65px;
    }

    .card-subtitle {
        font-size: 16px;
        margin-bottom: 40px;
    }

    .leather-button {
        font-size: 18px;
        padding: 15px 45px;
    }
}

@media (max-width: 1024px) {
    .logo-text {
        font-size: 4rem;
    }

    .environment-badge {
        font-size: 0.66rem;
        padding: 7px 12px;
    }

    .hero-title .line-1 {
        font-size: 3vw;
    }

    .hero-title .line-2 {
        font-size: 4.5vw;
    }

    .card-title {
        font-size: 6vw;
    }

    .card-subtitle {
        font-size: 1.5vw;
    }

    .leather-button {
        font-size: 1.8vw;
        padding: 1.5vw 3vw;
    }

    .category-gallery {
        top: 16%;
        left: 12px;
        right: 12px;
    }

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

@media (max-width: 768px) {
    .main-header {
        justify-content: center;
        flex-direction: column;
        gap: 10px;
        padding: 12px 4vw;
    }

    .header-nav {
        width: 100%;
        overflow-x: hidden;
    }

    .nav-links {
        gap: 10px;
        min-width: max-content;
        min-width: 0;
        width: 100%;
        overflow-x: auto;
        scroll-behavior: smooth;
        scrollbar-width: none;
        padding-inline: 2px;
        padding-bottom: 4px;
    }

    .nav-links li {
        flex: 0 0 auto;
    }

    .header-nav.has-scroll-controls .nav-links {
        padding-inline: 40px;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-scroll-arrow {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 50%;
        width: 34px;
        height: 34px;
        border-radius: 999px;
        border: 1px solid rgba(95, 74, 52, 0.35);
        background: rgba(255, 246, 232, 0.96);
        color: #654a33;
        box-shadow: 0 8px 16px rgba(54, 40, 28, 0.2);
        transform: translateY(-50%);
        z-index: 3;
        font-size: 1.25rem;
        font-weight: 600;
        line-height: 1;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease, transform 0.22s ease, background-color 0.22s ease;
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
    }

    .nav-scroll-arrow span {
        transform: translateY(-1px);
    }

    .nav-scroll-arrow-left {
        left: 0;
    }

    .nav-scroll-arrow-right {
        right: 0;
    }

    .nav-scroll-arrow.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    .nav-scroll-arrow.is-visible:hover {
        background: rgba(255, 251, 243, 0.98);
        transform: translateY(-50%) scale(1.04);
    }

    .nav-scroll-arrow:disabled {
        opacity: 0.42;
        pointer-events: none;
    }

    .logo-text {
        margin-right: 0;
        font-size: 2.2rem;
        letter-spacing: 0.04em;
        line-height: 1.05;
        text-align: center;
    }

    .brand-meta {
        align-items: center;
    }

    .environment-badge {
        font-size: 0.62rem;
        padding: 7px 10px;
        letter-spacing: 0.09em;
    }

    .hero-section {
        display: block;
        height: auto;
        min-height: 0;
        max-height: none;
    }

    .left-panel,
    .right-panel {
        display: none;
    }

    .center-panel {
        width: 100%;
        min-height: 460px;
        padding: 26px 14px;
    }

    .hero-title .line-1 {
        font-size: 1.25rem;
    }

    .hero-title .line-2 {
        font-size: 2rem;
    }

    .center-card-wrapper {
        width: min(94%, 500px);
        padding: 16px;
    }

    .center-card {
        padding: 22px 14px;
    }

    .card-title {
        font-size: 2.5rem;
    }

    .card-subtitle {
        font-size: 0.9rem;
        margin-bottom: 18px;
    }

    .leather-button {
        font-size: 0.95rem;
        padding: 11px 24px;
    }

    .category-gallery {
        top: 10px;
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 12px;
    }

    .gallery-title {
        font-size: 1.55rem;
    }

    .gallery-description {
        font-size: 0.75rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
}

@media (max-width: 520px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
