/* ── Google Fonts: Archivo Narrow (Medium 500 + Semibold 600) ── */
@import url('https://fonts.googleapis.com/css2?family=Archivo+Narrow:ital,wght@0,400..700;1,400..700&display=swap');

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

::selection {
  background: #FD4AE5;
}

::-moz-selection {
  background: #FD4AE5;
}

body {
    font-family: 'Archivo Narrow', sans-serif;
    font-weight: 500;
    /* Medium — site-wide base */
    background-color: #CDCED2;

    /* ── Typography & Rendering ── */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
    overscroll-behavior: none;
    cursor: default;
}

.nav {
    position: fixed;
    width: 100%;
    padding: 8px 10px;
    z-index: 1000;
}

.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2.778vw;
}

.nav .container-left {
    width: 50%;
    display: flex;
    justify-content: flex-start;
    gap: 0.694vw;
}

.nav .container-right {
    width: 50%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2.778vw;
}

.nav .container-right-inner {
    width: 50%;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.694vw;
}

.nav .container-photo .profile-photo {
    width: 8.333vw;
    height: auto;
    position: relative;
    transform-origin: top right;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
    will-change: transform;
    z-index: 100;
}

@media (min-width: 569px) {
    body.is-about .nav .container-photo .profile-photo {
        transform: scale(1.875);
    }
}

.nav .container-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav .container-photo .photo-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.text-link {
    color: #fff;
    font-family: 'Archivo Narrow', sans-serif;
    font-size: clamp(32px, 2.778vw, 2.778vw);
    font-weight: 600;
    /* Semibold */
    line-height: 90%;
    /* Restricts height perfectly */
    letter-spacing: -0.03em;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;

    /* Animation Core */
    display: inline-flex;
    overflow: hidden;
    vertical-align: top;
}

.text-link-inner {
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.text-link-inner::after {
    content: attr(data-hover);
    position: absolute;
    top: 100%;
    left: 0;
    white-space: nowrap;
}

.text-link:hover .text-link-inner {
    transform: translateY(-100%);
}

/* Nav link opacity: active page = 100%, rest = 30%, hover restores 100% */
.nav .text-link {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.nav .text-link.active,
.nav .text-link:hover {
    opacity: 1;
}

/* =========================================================
   PRELOADER
   ========================================================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.645, 0.045, 0.355, 1);
}

#preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

#preloader-text {
    color: #fff;
    font-family: 'Archivo Narrow', sans-serif;
    font-weight: 600;
    font-size: clamp(32px, 2.778vw, 2.778vw);
    line-height: 90%;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    transition: opacity 0.4s ease;
}

#preloader-dots {
    display: inline;
    letter-spacing: 0.05em;
}

/* контейнер секции */
.gallery {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 17.361vw 10px;
}

/* masonry-сетка на 6 колонок */
.masonry {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 10.417vw 2.778vw;
    align-items: start;
    /* CRITICAL: ensures each row honors authentic varying card heights! */
}

/* карточка — не ломать колонку, одинаковые отступы */
.card {
    break-inside: avoid;
    height: fit-content;
    overflow: hidden;
    will-change: transform;
    border-radius: 4px;
}

/* Media (img + video) — grows by natural height, hidden because ThreeJS renders overtop */
.card>img,
.card>video {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    opacity: 0;
}

/* Hide fallback browser scrollbars */
::-webkit-scrollbar {
    display: none;
}

/* =========================================================
   CARD FOCUS OVERLAY
   A transparent HTML layer that sits exactly over the open
   WebGL card, making the entire card a clickable link.
   Dimensions & opacity are driven by script.js each frame.
   ========================================================= */
#card-overlay {
    position: fixed;
    /* JS sets top/left/width/height each frame */
    pointer-events: none;
    /* JS enables when card is open */
    opacity: 0;
    z-index: 8;
    /* above WebGL (5), below nav (10) */
    transition: opacity 0.15s ease;
}

/* The invisible anchor that fills the whole card area */
#card-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    /* Subtle focus ring for a11y */
    outline: none;
    border-radius: 4px;
}

/* ── Badge ──────────────────────────────────────────────────
   Positioned in the top-right corner, straddling the edge.
   right / transform use % so it scales with any card size.
   ──────────────────────────────────────────────────────── */
.card-link-badge {
    position: absolute;
    top: 0.694vw;
    right: 0.694vw;
    /* % of the card's width  */
    /* floats 45% above the top edge */
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    cursor: pointer;
}

/* The SVG icon inside the badge */
.card-link-icon {
    display: block;
    width: 5vw;
    object-fit: contain;
}


/* About */

main {
    width: 100%;
}

body.is-about #webgl-container {
    display: none !important;
}

body.is-about main {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    background-color: #CDCED2;
}

.about {
    width: 100%;
    min-height: 100vh;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 6.944vw 10px 0 10px;
}

.content-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 59.722vw;
    margin-bottom: 4.167vw;
}

.head-wraper {
    width: 100%;
    overflow: hidden;
    margin-bottom: 2.778vw;
}

.head-wraper h1 {
    width: 100%;
    color: #fff;
    font-family: 'Archivo Narrow', sans-serif;
    font-size: clamp(40px, 2.778vw, 2.778vw);
    font-weight: 600;
    /* Semibold */
    line-height: 90%;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    text-align: center;
}

.main-text {
    color: #fff;
    font-family: 'Archivo Narrow', sans-serif;
    font-size: clamp(16px, 1.389vw, 1.389vw);
    font-weight: 500;
    /* Medium */
    line-height: 115%;
    letter-spacing: -0.02em;
    text-align: center;
}

.about-text {
    width: 100%;
    max-width: 75%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.link-box {
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.main-text a {
    text-decoration: none;
    color: #fff;
}

.social-link {
    display: inline-flex;
    overflow: hidden;
    vertical-align: top;
}

.social-link:hover .text-link-inner {
    transform: translateY(-100%);
}

.bottom-descriptor {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 2.778vw;
    padding: 0 10px 10px 10px;
}

.botom-wrap-elem {
    width: 100%;
}

.small-descriptor {
    color: #fff;
    font-size: clamp(13px, 0.903vw, 0.903vw);
    font-weight: 500;
    /* Medium */
    line-height: 110%;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.end-elem {
    text-align: end;
    position: relative;
    display: flex;
    justify-content: flex-end;
}

.end-elem p {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.end-elem p::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #E60000;
    border-radius: 50%;
    animation: flashInfo 1.5s ease-in-out infinite;
}

@keyframes flashInfo {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.fixed-mobile-descriptor {
    display: none;
}

@media (max-width: 568px) {

    .masonry {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 25.445vw 5.089vw;
    }

    .content-wrapper {
        max-width: 100%;
        margin-bottom: 14.249vw;
    }

    .about-text {
        max-width: 100%;
    }

    .head-wraper {
        margin-bottom: 7.634vw;
    }

    .desktop-only {
        display: none;
    }

    .bottom-descriptor {
        top: 0;
        grid-template-columns: repeat(1, 1fr);
        padding: 16px 10px 0 10px;
        bottom: auto;
    }

    .fixed-mobile-descriptor {
        display: grid;
        position: fixed;
        z-index: 1000;
    }

    .end-elem {
        text-align: center;
        justify-content: center;
    }

    .card-link-badge {
        top: 2vw;
        right: 2vw;
    }

    .card-link-icon {
        width: 18vw;
    }

}



/* =========================================================
   MOBILE MENU
   ========================================================= */
.mobile-menu {
    position: fixed;
    bottom: 3.5vw;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border-radius: 8px;
    width: 12.723vw;
    height: auto;
    max-height: 8.906vw;
    overflow: hidden;
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

@media (max-width: 568px) {
    .mobile-menu {
        display: flex;
    }
}

.mobile-menu.is-open {
    width: 65vw;
    max-height: 85vh;
    border-radius: 8px;
}

/* Dots Button Area */
.menu-dots-container {
    position: relative;
    width: 100%;
    height: 8.906vw;
    flex: 0 0 8.906vw;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.mobile-menu.is-open .menu-dots-container {
    height: 15vw;
    flex: 0 0 15vw;
}

.dot {
    width: 6px;
    height: 6px;
    background-color: #CDCED2;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.dot-1 {
    left: calc(50% - 10px);
    transform: translate(-50%, -50%);
}

.dot-2 {
    left: 50%;
    transform: translate(-50%, -50%);
}

.dot-3 {
    left: calc(50% + 10px);
    transform: translate(-50%, -50%);
}

.mobile-menu.is-open .dot-1,
.mobile-menu.is-open .dot-3 {
    left: 50%;
    opacity: 0;
}

.mobile-menu.is-open .dot-2 {
    background-color: #000;
}

/* Content Area */
.menu-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex: 1;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    padding: 0 5vw 6vw 5vw;
}

.mobile-menu.is-open .menu-content {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.5s ease 0.3s;
}

.menu-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1vw;
    margin-top: 3vh;
    margin-bottom: 8vh;
}

.menu-link {
    font-size: clamp(32px, 11vw, 42px);
    font-weight: 600;
    line-height: 100%;
    letter-spacing: -0.03em;
    text-decoration: none;
    text-transform: uppercase;
    color: #CDCED2;
    transition: color 0.3s;

    display: inline-flex;
    overflow: hidden;
    vertical-align: top;
}

.menu-link.active {
    color: #000;
}

.menu-link:hover .text-link-inner {
    transform: translateY(-100%);
}

.menu-photo {
    width: 32vw;
    overflow: hidden;
    margin-top: auto;
    margin-bottom: 16px;
}

.menu-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.menu-footer {
    font-size: clamp(10px, 2.5vw, 13px);
    color: #CDCED2;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}