/* ==========================
   RESET
========================== */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #000;
    color: #F7F5F2;
    font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    overflow-x: hidden;
}

body.viewer-open {
    overflow: hidden;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}


/* ==========================
   HERO
========================== */

#hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 620px;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;
    opacity: 0;
    background-image: none;

    animation: heroFadeIn 1.3s ease forwards;
}

#hero::before {
    content: "";
    position: absolute;
    inset: 0;

    background-image: var(--hero-image, url("assets/hero.jpg"));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    transform: scale(1.04);
    animation: heroZoomOut 2.6s ease-out forwards;

    z-index: 0;
}

.overlay {
    position: absolute;
    inset: 0;
    z-index: 1;

    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.18) 0%,
        rgba(0, 0, 0, 0.28) 50%,
        rgba(0, 0, 0, 0.58) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;

    text-align: center;

    opacity: 0;
    transform: translateY(24px);

    animation: heroContentFade 1s ease forwards;
    animation-delay: 1.1s;
}

.hero-content h1 {
    font-size: 72px;
    letter-spacing: 10px;
    font-weight: 400;
}

.hero-content h2 {
    margin-top: 14px;
    font-size: 18px;
    letter-spacing: 8px;
    font-weight: 300;
}

#openCollections {
    margin-top: 90px;
    padding: 18px 42px;

    border: 1px solid rgba(255, 255, 255, 0.6);

    background: transparent;
    color: white;

    cursor: pointer;

    font-size: 15px;
    letter-spacing: 3px;
    text-transform: uppercase;

    opacity: 0;
    transform: translateY(18px);

    transition:
        background 0.35s,
        color 0.35s,
        border-color 0.35s;

    animation: heroButtonFade 0.9s ease forwards;
    animation-delay: 1.8s;
}

#openCollections:hover,
#openCollections:focus-visible {
    background: white;
    color: black;
    border-color: white;
}


/* ==========================
   CATÁLOGO
========================== */

#collections {
    min-height: 100vh;
    padding: 110px 7vw 130px;
    background: #F7F5F2;
    color: #171717;
}

.collections-header {
    max-width: 720px;
    margin: 0 auto 72px;
    text-align: center;
}

.section-eyebrow {
    margin-bottom: 16px;
    font-size: 12px;
    letter-spacing: 5px;
    text-transform: uppercase;
}

.collections-header h2,
.viewer-header h2 {
    font-size: clamp(46px, 7vw, 82px);
    line-height: 0.95;
    letter-spacing: 7px;
    font-weight: 300;
}

.section-description,
.viewer-subtitle {
    max-width: 560px;
    margin: 24px auto 0;
    font-size: 20px;
    line-height: 1.55;
    color: #5c5955;
}

.catalog-status {
    min-height: 28px;
    margin: 24px auto;
    text-align: center;
    font-size: 17px;
    color: #6d6964;
}

.catalog-status:empty {
    display: none;
}

.collections-grid {
    width: min(1260px, 100%);
    margin: 0 auto;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 72px 42px;
}

.collection-card {
    min-width: 0;
}

.collection-card-button {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.collection-cover {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #dedbd6;
}

.collection-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;

    transform: scale(1);
    transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.collection-card-button:hover .collection-cover img,
.collection-card-button:focus-visible .collection-cover img {
    transform: scale(1.035);
}

.collection-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.2),
        transparent 38%
    );
    pointer-events: none;
}

.collection-info {
    padding-top: 25px;
}

.collection-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px;
}

.collection-title {
    font-size: 32px;
    line-height: 1.1;
    font-weight: 400;
}

.collection-price {
    flex: 0 0 auto;
    font-size: 18px;
    letter-spacing: 1px;
}

.collection-subtitle {
    margin-top: 13px;
    max-width: 650px;
    font-size: 18px;
    line-height: 1.5;
    color: #67635f;
}

.collection-link {
    display: inline-block;
    margin-top: 20px;
    padding-bottom: 5px;

    border-bottom: 1px solid #252525;

    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
}


/* ==========================
   VISOR
========================== */

.collection-viewer {
    position: fixed;
    inset: 0;
    z-index: 20;

    visibility: hidden;
    opacity: 0;
    pointer-events: none;

    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}

.collection-viewer.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(5px);
}

.viewer-panel {
    position: relative;
    z-index: 1;

    width: min(1180px, calc(100% - 34px));
    height: calc(100% - 34px);
    margin: 17px auto;
    padding: 82px 54px 70px;

    overflow-y: auto;

    background: #F7F5F2;
    color: #171717;

    transform: translateY(18px);
    transition: transform 0.35s ease;
}

.collection-viewer.is-open .viewer-panel {
    transform: translateY(0);
}

.viewer-close {
    position: absolute;
    top: 22px;
    right: 28px;

    width: 48px;
    height: 48px;
    border: 0;

    background: transparent;
    color: #171717;

    font-family: Arial, sans-serif;
    font-size: 38px;
    font-weight: 200;
    line-height: 1;

    cursor: pointer;
}

.viewer-header {
    max-width: 800px;
    margin: 0 auto 58px;
    text-align: center;
}

.viewer-meta {
    margin-top: 24px;

    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 28px;

    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

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

.photo-item {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: #dedbd6;
}

.photo-item img {
    width: 100%;
    height: auto;
    display: block;
}

.photo-item.is-locked {
    min-height: 460px;
}

.photo-item.is-locked img {
    height: 100%;
    min-height: 460px;
    object-fit: cover;
    filter: blur(18px);
    transform: scale(1.08);
}

.locked-overlay {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 30px;
    text-align: center;

    background: rgba(12, 12, 12, 0.48);
    color: white;
}

.lock-icon {
    font-family: Arial, sans-serif;
    font-size: 26px;
}

.locked-overlay strong {
    margin-top: 16px;
    font-size: 25px;
    font-weight: 400;
}

.locked-overlay span {
    margin-top: 9px;
    font-size: 16px;
}

.unlock-button {
    margin-top: 23px;
    padding: 13px 25px;

    border: 1px solid rgba(255, 255, 255, 0.8);

    background: transparent;
    color: white;

    cursor: pointer;

    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
}


/* ==========================
   ANIMACIONES
========================== */

@keyframes heroFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes heroZoomOut {
    from { transform: scale(1.04); }
    to { transform: scale(1); }
}

@keyframes heroContentFade {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

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

@keyframes heroButtonFade {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

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


/* ==========================
   RESPONSIVE
========================== */

@media (max-width: 768px) {
    #hero {
        min-height: 560px;
    }

    .hero-content h1 {
        font-size: 48px;
        letter-spacing: 7px;
    }

    .hero-content h2 {
        font-size: 14px;
        letter-spacing: 5px;
    }

    #openCollections {
        margin-top: 65px;
        padding: 15px 30px;
        font-size: 13px;
    }

    #collections {
        padding: 86px 20px 100px;
    }

    .collections-header {
        margin-bottom: 52px;
    }

    .collections-grid {
        grid-template-columns: 1fr;
        gap: 58px;
    }

    .collection-title {
        font-size: 29px;
    }

    .viewer-panel {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 76px 18px 50px;
    }

    .viewer-close {
        top: 16px;
        right: 13px;
    }

    .viewer-header {
        margin-bottom: 42px;
    }

    .photos-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}


/* ==========================
   ACCESIBILIDAD
========================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    #hero,
    #hero::before,
    .hero-content,
    #openCollections {
        opacity: 1;
        transform: none;
    }
}
