/* ================================================================
   HYPROCOL DIGITAL PRODUCT CATALOG
================================================================ */

:root {
    --hyprocol: #008cc1;
    --hyprocol-dark: #006e99;
    --hyprocol-deep: #004f70;
    --hyprocol-soft: #c7f0f1;

    --white: #ffffff;
    --paper: #fdfdfc;

    --text: #101820;
    --text-muted: #727b82;

    --page-width: 560px;
    --page-height: 720px;

    --transition-book:
        1s cubic-bezier(.645, .045, .355, 1);
}


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

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;

    width: 100%;
    height: 100%;
    overflow: hidden !important;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background:
        radial-gradient(
            circle at 50% 20%,
            #f9fbfc 0,
            #edf1f3 55%,
            #e3e8eb 100%
        );

    color: var(--text);

    overflow: hidden !important;
}

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

button {
    font: inherit;
}


/* ================================================================
   APP
================================================================ */

.catalog-app {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;

    display: flex;
    flex-direction: column;
}


/* ================================================================
   HEADER
================================================================ */

.catalog-header {
    height: 82px;

    display: grid;

    grid-template-columns:
        1fr
        auto
        1fr;

    align-items: center;

    padding:
        0
        clamp(20px, 4vw, 70px);

    position: relative;

    z-index: 100;
}

.catalog-logo {
    display: flex;

    align-items: center;

    text-decoration: none;
}

.catalog-logo img {
    display: block;

    max-width: 270px;

    max-height: 80px;

    object-fit: contain;
}

.catalog-header-center {
    text-align: center;

    display: flex;

    flex-direction: column;

    gap: 3px;
}

.catalog-header-center span {
    font-size: 9px;

    letter-spacing: .26em;

    color: #879198;

    font-weight: 700;
}

.catalog-header-center strong {
    font-size: 13px;

    letter-spacing: .18em;

    font-weight: 800;
}

.catalog-header-actions {
    justify-self: end;

    display: flex;

    gap: 8px;
}

.catalog-icon-btn {
    width: 43px;
    height: 43px;

    border: 1px solid
        rgba(0, 0, 0, .08);

    border-radius: 50%;

    background:
        rgba(255, 255, 255, .65);

    display: grid;

    place-items: center;

    color: #273038;

    cursor: pointer;

    backdrop-filter:
        blur(10px);

    transition:
        transform .2s ease,
        border-color .2s ease,
        background .2s ease;
}

.catalog-icon-btn:hover {
    transform:
        translateY(-2px);

    border-color:
        rgba(0, 140, 193, .4);

    background:
        white;
}

.catalog-icon-btn svg {
    width: 18px;
    height: 18px;
}


/* ================================================================
   STAGE
================================================================ */

.catalog-stage {
    flex: 1;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: clamp(
        12px,
        3vw,
        45px
    );

    min-height:
        calc(100vh - 160px);

    padding:
        25px
        20px
        35px;
}


/* ================================================================
   BOOK WRAPPER
================================================================ */

.book-wrapper {
    position: relative;

    width:
        calc(var(--page-width) * 2);

    height:
        var(--page-height);

    perspective:
        2800px;

    filter:
        drop-shadow(
            0 28px 35px rgba(7, 21, 30, .18)
        );
}


/* ================================================================
   BOOK
================================================================ */

.book {
    position: relative;

    width: 50%;
    height: 100%;

    margin-left: 50%;

    -webkit-transform-style: preserve-3d;
    transform-style:
        preserve-3d;

    perspective:
        2600px;
}


/* ================================================================
   PAGE
================================================================ */

.catalog-page {
    position: absolute;

    width: 100%;
    height: 100%;

    top: 0;
    left: 0;

    transform-origin:
        left center;

    -webkit-transform-style: preserve-3d;
    transform-style:
        preserve-3d;

    transition:
        transform var(--transition-book);

    will-change:
        transform;
}

.catalog-page::after {
    content: "";

    position: absolute;

    inset: 0;

    z-index: 8;

    pointer-events: none;

    opacity: 0;

    background:
        linear-gradient(
            90deg,
            transparent 0%,
            rgba(0, 0, 0, .11) 55%,
            rgba(0, 0, 0, .22) 100%
        );

    transition:
        opacity .45s ease;

    backface-visibility:
        hidden;
}

.catalog-page.turned {
    -webkit-transform: rotateY(-180deg);
    transform:
        rotateY(-180deg);
}

.catalog-page.turned::after {
    opacity: .55;
}


/* ================================================================
   FRONT / BACK
================================================================ */

.page-front,
.page-back {
    position: absolute;

    inset: 0;

    overflow: hidden;

    backface-visibility:
        hidden;

    -webkit-backface-visibility:
        hidden;

    background:
        var(--paper);
}

.page-front {
    z-index: 2;

    -webkit-transform: rotateY(0deg);
    transform: rotateY(0deg);

    box-shadow:
        inset 20px 0 25px
        rgba(0, 0, 0, .025);
}

.page-back {
    -webkit-transform: rotateY(180deg);
    transform:
        rotateY(180deg);

    background:
        linear-gradient(
            90deg,
            #f3f4f3,
            #fff
        );

    box-shadow:
        inset -16px 0 25px
        rgba(0, 0, 0, .04);
}


/* ================================================================
   BOOK SPINE
================================================================ */

.book-spine {
    position: absolute;

    top: 0;
    bottom: 0;

    left: 50%;

    width: 3px;

    transform:
        translateX(-50%);

    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, .12),
            rgba(255, 255, 255, .75),
            rgba(0, 0, 0, .08)
        );

    box-shadow:
        0 0 25px
        rgba(0, 0, 0, .15);

    z-index: 20;

    pointer-events: none;
}


/* ================================================================
   COVER
================================================================ */

.cover-background {
    height: 100%;

    position: relative;

    overflow: hidden;

    padding: 54px 52px;

    background:
        linear-gradient(
            145deg,
            #007baa 0%,
            #008cc1 55%,
            #009fd4 100%
        );

    color: white;
}

.cover-background::before {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            130deg,
            rgba(255,255,255,.08),
            transparent 40%,
            rgba(0,0,0,.08)
        );
}

.cover-circle {
    position: absolute;

    border-radius: 50%;

    border:
        1px solid rgba(
            255,
            255,
            255,
            .17
        );
}

.cover-circle-one {
    width: 470px;
    height: 470px;

    right: -250px;
    top: 50px;
}

.cover-circle-two {
    width: 280px;
    height: 280px;

    right: -95px;
    top: 145px;
}

.cover-top {
    position: relative;

    z-index: 2;
}

.cover-edition {
    display: inline-flex;

    border:
        1px solid
        rgba(255,255,255,.35);

    padding:
        9px 14px;

    border-radius:
        100px;

    font-size: 9px;

    font-weight: 700;

    letter-spacing: .18em;
}

.cover-content {
    position: absolute;

    left: 52px;
    right: 52px;

    top: 46%;

    transform:
        translateY(-50%);

    z-index: 2;
}

.cover-small-title {
    margin:
        0
        0
        20px;

    font-size: 12px;

    letter-spacing: .16em;

    text-transform:
        uppercase;

    opacity: .78;
}

.cover-content h1 {
    margin: 0;

    font-size:
        clamp(56px, 5.5vw, 80px);

    font-weight: 300;

    letter-spacing:
        -.06em;

    line-height: .9;
}

.cover-content h1 span {
    display: block;

    font-weight: 700;
}

.cover-line {
    width: 46px;
    height: 2px;

    background: white;

    margin:
        30px
        0
        20px;
}

.cover-description {
    max-width: 320px;

    margin: 0;

    line-height: 1.65;

    opacity: .8;

    font-size: 13px;
}

.cover-brand {
    position: absolute;

    left: 52px;
    bottom: 52px;

    z-index: 2;

    display: flex;

    flex-direction: column;
}

.cover-brand span {
    font-size: 17px;

    font-weight: 800;

    letter-spacing: .18em;
}

.cover-brand small {
    font-size: 9px;

    margin-top: 5px;

    opacity: .65;

    letter-spacing: .12em;
}

.cover-number {
    position: absolute;

    right: 30px;
    bottom: -25px;

    font-size: 155px;

    font-weight: 800;

    line-height: 1;

    letter-spacing: -.1em;

    color:
        rgba(255,255,255,.055);
}


/* ================================================================
   INTRO PAGE
================================================================ */

.intro-content {
    height: 100%;

    padding:
        55px
        55px
        40px;

    display: flex;

    flex-direction: column;

    position: relative;

    overflow: hidden;
}

.intro-number {
    font-size: 105px;

    font-weight: 800;

    letter-spacing: -.08em;

    line-height: 1;

    color:
        rgba(0, 140, 193, .07);

    position: absolute;

    top: 30px;
    right: 35px;
}

.intro-main {
    margin-top: auto;

    margin-bottom: auto;

    position: relative;

    z-index: 2;
}

.eyebrow {
    color:
        var(--hyprocol);

    font-size: 10px;

    letter-spacing: .23em;

    font-weight: 800;
}

.intro-main h2 {
    margin:
        18px
        0
        28px;

    font-size: 53px;

    letter-spacing:
        -.055em;

    line-height: .98;

    font-weight: 700;
}

.intro-main p {
    max-width: 340px;

    color:
        var(--text-muted);

    line-height: 1.8;

    font-size: 14px;
}

.intro-decoration {
    display: flex;

    gap: 5px;

    margin-bottom: 30px;
}

.intro-decoration span {
    width: 6px;
    height: 33px;

    display: block;

    background:
        var(--hyprocol);
}

.intro-decoration span:nth-child(2) {
    opacity: .55;
}

.intro-decoration span:nth-child(3) {
    opacity: .2;
}

.page-bottom {
    display: flex;

    justify-content:
        space-between;

    align-items: center;

    border-top:
        1px solid #e9ecee;

    padding-top: 18px;

    font-size: 10px;

    text-transform: uppercase;

    letter-spacing: .13em;
}


/* ================================================================
   PRODUCTS GRID PAGE (4 PER PAGE)
================================================================ */

.products-grid-layout {
    position: relative;
    height: 100%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--hyprocol-soft);
    padding-bottom: 10px;
}

.page-category {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
    color: var(--hyprocol);
}

.page-number {
    font-size: 24px;
    font-weight: 800;
    color: rgba(0,0,0,.08);
}

.products-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
}

.product-card {
    display: flex;
    flex-direction: column;
    padding: 15px;
    border: 1px solid #f0f3f4;
    border-radius: 8px;
    transition: transform .3s ease, box-shadow .3s ease;
    background: #fafafa;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,.05);
    background: #fff;
}

.product-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    min-height: 140px;
    padding: 10px;
    background: white;
    border-radius: 6px;
}

.product-image {
    max-width: 100%;
    max-height: 140px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-cat {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--hyprocol);
    text-transform: uppercase;
}

.product-name {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-ref {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 4px;
}


/* ================================================================
   PAGE BACK
================================================================ */

.back-page-decoration {
    height: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #fafafa,
            #f0f3f4
        );
}

.back-page-decoration span {
    transform:
        rotate(-90deg);

    color:
        rgba(0, 140, 193, .07);

    font-size: 70px;

    font-weight: 800;

    letter-spacing: .15em;
}


/* ================================================================
   FINAL PAGE
================================================================ */

.final-content {
    height: 100%;

    padding: 60px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    background:
        var(--text);

    color: white;
}

.final-small {
    color:
        var(--hyprocol);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: .25em;

    margin-bottom: 25px;
}

.final-content h2 {
    margin: 0;

    font-size: 54px;

    line-height: .98;

    letter-spacing: -.055em;

    font-weight: 300;
}

.final-content h2 span {
    display: block;

    font-weight: 700;

    color:
        var(--hyprocol);
}

.final-contact {
    margin-top: 55px;

    padding-top: 22px;

    border-top:
        1px solid
        rgba(255,255,255,.12);

    font-size: 13px;

    letter-spacing: .08em;
}


/* ================================================================
   ARROWS
================================================================ */

.book-arrow {
    width: 56px;
    height: 56px;

    border-radius: 50%;

    border:
        1px solid
        rgba(20, 30, 40, .1);

    background:
        rgba(255,255,255,.7);

    display: grid;

    place-items: center;

    color:
        var(--text);

    cursor: pointer;

    backdrop-filter:
        blur(15px);

    transition:
        transform .25s ease,
        opacity .2s ease,
        background .2s ease;

    flex-shrink: 0;

    z-index: 50;
}

.book-arrow:hover:not(:disabled) {
    transform:
        scale(1.08);

    background:
        var(--hyprocol);

    color: white;
}

.book-arrow:disabled {
    opacity: .2;

    cursor: default;
}

.book-arrow svg {
    width: 23px;
}


/* ================================================================
   NAVIGATION
================================================================ */

.catalog-navigation {
    position: absolute;
    bottom: clamp(20px, 4vw, 40px);
    left: clamp(20px, 4vw, 70px);

    display: flex;

    align-items: center;

    padding: 15px 25px;

    border:
        1px solid
        rgba(0,0,0,.08);

    border-radius: 100px;

    background:
        rgba(255,255,255,.65);

    backdrop-filter:
        blur(10px);
    
    z-index: 100;
}

.navigation-category {
    display: flex;

    flex-direction: column;

    gap: 3px;
}

.navigation-label {
    font-size: 7px;

    font-weight: 800;

    letter-spacing: .2em;

    color: #a2a9ae;
}

.navigation-category strong {
    font-size: 11px;

    letter-spacing: .08em;

    text-transform: uppercase;
}

.navigation-progress {
    display: flex;

    align-items: center;

    gap: 13px;

    font-size: 9px;

    font-weight: 800;

    color: #69737a;
}

.progress-track {
    width:
        clamp(
            120px,
            18vw,
            250px
        );

    height: 2px;

    background:
        rgba(0,0,0,.1);

    overflow: hidden;
}

.progress-bar {
    display: block;

    width: 0;
    height: 100%;

    background:
        var(--hyprocol);

    transition:
        width .4s ease;
}

.navigation-help {
    justify-self: end;

    font-size: 8px;

    color: #9ba2a7;

    letter-spacing: .08em;
}


/* ================================================================
   OVERVIEW MODAL
================================================================ */

.overview-modal {
    position: fixed;

    inset: 0;

    background:
        rgba(10, 20, 28, .93);

    backdrop-filter:
        blur(16px);

    z-index: 5000;

    padding:
        clamp(
            25px,
            5vw,
            70px
        );

    opacity: 0;

    visibility: hidden;

    transform:
        scale(1.02);

    transition:
        opacity .35s ease,
        transform .35s ease,
        visibility .35s;
}

.overview-modal.visible {
    opacity: 1;

    visibility: visible;

    transform:
        scale(1);
}

.overview-header {
    max-width: 1300px;

    margin:
        0 auto 40px;

    display: flex;

    justify-content:
        space-between;

    align-items: center;

    color: white;
}

.overview-header span {
    color:
        var(--hyprocol);

    font-size: 9px;

    font-weight: 800;

    letter-spacing: .22em;
}

.overview-header h3 {
    margin:
        6px 0 0;

    font-size: 31px;

    letter-spacing: -.03em;
}

.overview-close {
    width: 48px;
    height: 48px;

    border-radius: 50%;

    border:
        1px solid
        rgba(255,255,255,.17);

    color: white;

    background: transparent;

    font-size: 27px;

    cursor: pointer;
}

.overview-grid {
    max-width: 1300px;

    max-height:
        calc(100vh - 180px);

    margin: auto;

    overflow-y: auto;

    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(150px, 1fr)
        );

    gap: 28px;

    padding-bottom: 50px;
}

.overview-item {
    padding: 0;

    border: 0;

    background: transparent;

    color: white;

    cursor: pointer;

    text-align: left;
}

.overview-image,
.overview-cover {
    aspect-ratio: .76;

    background: white;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    box-shadow:
        0 10px 30px
        rgba(0,0,0,.3);

    transition:
        transform .3s ease;
}

.overview-item:hover
.overview-image,

.overview-item:hover
.overview-cover {
    transform:
        translateY(-7px);
}

.overview-image img {
    width: 85%;
    height: 85%;

    object-fit: contain;
}

.overview-cover {
    background:
        var(--hyprocol);

    flex-direction: column;

    align-items: flex-start;

    justify-content: flex-end;

    padding: 20px;
}

.overview-cover strong {
    font-size: 17px;

    letter-spacing: .12em;
}

.overview-cover span {
    margin-top: 4px;

    font-size: 10px;

    opacity: .7;
}

.overview-item small {
    display: block;

    margin-top: 12px;

    font-size: 10px;

    line-height: 1.4;

    color:
        rgba(255,255,255,.7);
}


/* ================================================================
   LARGE SCREENS
================================================================ */

@media (min-width: 1600px) {

    :root {
        --page-width: 620px;
        --page-height: 790px;
    }

}


/* ================================================================
   LAPTOP
================================================================ */

@media (
    max-width: 1300px
) {

    :root {
        --page-width: 460px;
        --page-height: 610px;
    }

    .products-grid-layout {
        padding: 25px;
    }

    .products-grid {
        gap: 15px;
    }

    .product-card {
        padding: 10px;
    }

    .product-image-container {
        min-height: 100px;
    }

    .product-image {
        max-height: 100px;
    }

    .product-name {
        font-size: 11px;
    }

    .cover-content h1 {
        font-size: 57px;
    }

    .intro-main h2 {
        font-size: 43px;
    }

}


/* ================================================================
   TABLET / MOBILE
================================================================ */

@media (
    max-width: 980px
) {

    body {
        overflow: hidden !important;
    }

    .catalog-header {
        height: 67px;

        grid-template-columns:
            1fr
            auto;
    }

    .catalog-header-center {
        display: none;
    }

    .catalog-logo img {
        max-width: 115px;
    }

    .catalog-icon-btn {
        width: 39px;
        height: 39px;
    }

    .catalog-stage {
        min-height:
            calc(100vh - 130px);

        padding:
            12px
            12px
            20px;

        gap: 8px;
    }

    /*
     * MOBILE:
     * One page instead of two-page book.
     */

    .book-wrapper {
        width:
            min(
                92vw,
                520px
            );

        height:
            min(
                76vh,
                700px
            );

        perspective:
            1800px;
    }

    .book {
        width: 100%;

        height: 100%;

        margin-left: 0;
    }

    .book-spine {
        left: 0;

        opacity: .3;
    }

    .catalog-page {
        transform-origin:
            left center;
    }

    .book-arrow {
        position: fixed;

        bottom: 90px;

        width: 46px;
        height: 46px;

        z-index: 200;
    }

    .book-arrow-left {
        left: 15px;
    }

    .book-arrow-right {
        right: 15px;
    }

    .catalog-navigation {
        padding:
            0 20px;
    }

    .navigation-progress {
        justify-self: end;
    }

    .navigation-help {
        display: none;
    }

}


/* ================================================================
   MOBILE
================================================================ */

@media (
    max-width: 620px
) {

    .catalog-header {
        padding:
            0 16px;
    }

    .catalog-stage {
        align-items:
            flex-start;
    }

    .book-wrapper {
        width: 94vw;

        height:
            calc(100vh - 150px);

        max-height: 720px;

        min-height: 560px;
    }

    .products-grid-layout {
        padding: 20px;
    }
    .products-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr;
        gap: 10px;
    }
    .product-card {
        padding: 8px;
    }
    .product-image-container {
        min-height: 85px;
        margin-bottom: 8px;
    }
    .product-image {
        max-height: 85px;
    }
    .product-cat {
        font-size: 7px;
    }
    .product-name {
        font-size: 10px;
    }
    .product-ref {
        font-size: 8px;
    }

    .cover-background {
        padding:
            38px
            34px;
    }

    .cover-content {
        left: 34px;
        right: 34px;
    }

    .cover-content h1 {
        font-size: 58px;
    }

    .cover-brand {
        left: 34px;
        bottom: 40px;
    }

    .intro-content {
        padding:
            40px
            35px
            30px;
    }

    .intro-main h2 {
        font-size: 44px;
    }

    .final-content {
        padding: 40px;
    }

    .final-content h2 {
        font-size: 43px;
    }

    .navigation-category {
        display: none;
    }

    .catalog-navigation {
        /* Mobile adjustments can go here if needed */
    }

    .navigation-progress {
        justify-self: center;
    }

    .progress-track {
        width: 140px;
    }

}


/* ================================================================
   SMALL MOBILE
================================================================ */

@media (
    max-width: 390px
) {

    .book-wrapper {
        width: 96vw;

        min-height: 530px;
    }

    .products-grid-layout {
        padding: 15px;
    }
    .page-header {
        margin-bottom: 15px;
    }

    .cover-content h1 {
        font-size: 50px;
    }

}


/* ================================================================
   REDUCE MOTION
================================================================ */

@media (
    prefers-reduced-motion:
    reduce
) {

    .catalog-page {
        transition:
            transform .2s linear;
    }

}
