@font-face {
    font-family: 'Underwood Champion';
    src: url('https://fonts.cdnfonts.com/s/15291/UnderwoodChampion.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --cream: #f0eee9;
    --ink: #0a0a0a;
    --mid: #666;
    --light: #1a1a1a;
    --border: #ececec;
    --font-display: 'Underwood Champion', 'Bebas Neue', 'Oswald', serif;
    --font-mono: 'Share Tech Mono', monospace;
    --font-body: 'Space Mono', 'Share Tech Mono', monospace;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--ink);
    font-family: var(--font-mono);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

button:focus, button:active {
    box-shadow: none;
    border: none;
    outline: none;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
}

img {
    display: block;
}

/* ── Main page wrapper ── */
.main-wrapper {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: var(--ink);
    overflow: hidden;
}

/* ── Photo / video variant panels ── */
.photo-variant,
.vid-variant {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.page-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.page-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    opacity: 0.5;
    filter: brightness(0.6) blur(24px);
    scale: 1.2;
}

/* ── Chips row ── */
.chips-wrapper {
    display: flex;
    justify-content: center;
    padding: 136px 0 20px;
}

/* ── Video layer ── */
.vid-layer {
    position: absolute;
    inset: 0;
    transition: opacity 700ms ease;
}

.vid-layer video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

/* ── Header / Nav ── */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 22px 36px;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 500;
    transition: color 0.3s ease;
    pointer-events: none;
}

.site-header.tone-light {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55), 0 0 18px rgba(0, 0, 0, .35);
}

.site-header.tone-dark {
    color: var(--ink);
    text-shadow: none;
}

.site-header > * {
    pointer-events: auto;
}

.logo {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    color: inherit;
    text-decoration: none;
}

.logo-name {
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 1.0;
    letter-spacing: 0.01em;
    font-weight: 400;
}

.logo-sub {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    opacity: 0.75;
}

.site-nav {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 44px;
    width: 100%;
}

.site-nav a, .site-nav button {
    color: inherit;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-shadow: inherit;
    padding: 0;
    opacity: 1;
    transition: opacity 0.2s ease;
    padding: 24px;
}

.site-nav a:hover, .site-nav button:hover {
    opacity: 0.6;
}

/* ── Information overlay ── */
.info-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    opacity: 0;
    transition: opacity 480ms ease;
    backdrop-filter: blur(22px) saturate(110%);
    -webkit-backdrop-filter: blur(22px) saturate(110%);
    background: rgba(255, 255, 255, 0.82);
}

.info-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.info-close {
    position: absolute;
    top: 24px;
    right: 28px;
    z-index: 2;
    background: transparent;
    border: none;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 8px 12px;
    font-weight: 500;
    transition: opacity 0.2s;
}

.info-close:hover {
    opacity: 0.55;
}

.info-body {
    position: absolute;
    inset: 0;
    max-height: 100dvh;
    padding: 90px 80px 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    color: var(--ink);
    transform: translateY(12px);
    transition: transform 520ms cubic-bezier(.2, .7, .2, 1);
    overflow-y: auto;
}

.info-overlay.open .info-body {
    transform: translateY(0);
}

.info-photo {
    width: max-content;
    height: 100%;
    max-height: 60vh;
    margin-left: auto;
    overflow: hidden;
}

.info-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
}

.info-text {
    font-family: var(--font-body);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-text h2 {
    font-family: var(--font-display);
    font-size: 44px;
    line-height: 1.1;
    letter-spacing: 0.005em;
    font-weight: 400;
    margin: 0;
    color: var(--ink);
}

.info-text p {
    margin: 0;
    font-size: 15px;
    line-height: 1.7;
    color: #1a1a1a;
}

.info-contacts {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 24px;
}

.info-contacts p, .info-contacts a {
    color: #666;
}

/* ── Slider / full-bleed stage ── */
.slider-stage {
    position: absolute;
    overflow: hidden;
    background: var(--ink);
    width: 100%;
    height: 100%;
}

.slider-track {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    display: flex;
    /* Прибираємо inset: 0 та width: 300% з HTML */
    width: max-content;
    /* Трек розтягнеться під сумарну ширину всіх слайдів */
    transition: transform 900ms cubic-bezier(0.7, 0, 0.2, 1);
    will-change: transform;
}

.slider-slide {
    position: relative;
    overflow: hidden;
    width: 100vw;
    /* Тепер кожен слайд точно дорівнює ширині екрана */
    flex-shrink: 0;
    height: 100%;
}

.slider-slide .slider-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: auto;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

/* ── Click halves navigation ── */
.click-halves {
    position: absolute;
    inset: 0;
    display: flex;
    z-index: 5;
}

.click-halves button {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0;
}

.click-halves .prev {
    cursor: w-resize;
}

.click-halves .next {
    cursor: e-resize;
}

/* ── Photography grid ── */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: calc(100% - 64px);
    max-width: 1620px;
    margin: 0 32px 32px;
    height: calc(100vh - 230px);
    animation: fade-in-up 480ms ease;
    overflow-y: auto;
}

.photo-grid-item {
    overflow: hidden;
    background: var(--ink);
    cursor: pointer;
    width: 100%;
    min-height: 400px;
    height: 400px;
}

.photo-grid-item img {
    min-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: cover;
    transition: transform 700ms ease;
}

.photo-grid-item:hover img {
    transform: scale(1.04);
}

/* ── Switcher chips ── */
.switcher-chips {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid #d8d6d2;
    border-radius: 999px;
    background: #fff;
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.switcher-chips button {
    padding: 8px 18px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--ink);
    font-family: inherit;
    font-size: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    transition: background 250ms ease, color 250ms ease;
}

.switcher-chips button.active {
    background: var(--ink);
    color: #fff;
}

/* ── Page tab system ── */
.page-view {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 500ms ease;
    overflow: hidden;
}

.page-view.active {
    opacity: 1;
    pointer-events: auto;
}

/* ── Animations ── */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Scrollbar hide ── */
* {
    scrollbar-width: none;
}

*::-webkit-scrollbar {
    display: none;
}

/* ── Mobile header ── */
.mobile-top-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 22px;
    align-items: flex-start;
    justify-content: space-between;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .55), 0 0 18px rgba(0, 0, 0, .35);
}

.mobile-top-bar.tone-dark {
    color: var(--ink);
    text-shadow: none;
}

.mobile-logo {
    display: inline-flex;
    flex-direction: column;
    gap: 3px;
    color: inherit;
    text-decoration: none;
}

.mobile-logo-name {
    font-family: var(--font-display);
    font-size: 24px;
    line-height: 1;
    letter-spacing: 0.01em;
}

.mobile-logo-sub {
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.mobile-top-bar.tone-dark .mobile-logo-sub {
    color: rgba(0, 0, 0, 0.6);
}

.mobile-hamburger {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Mobile menu overlay ── */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    color: #fff;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 360ms ease;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 22px;
}

.mobile-menu-header .mobile-logo-sub {
    color: rgba(255, 255, 255, 0.7);
}

.mobile-menu-close {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-list {
    flex: 1;
    padding: 40px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mobile-menu-link {
    color: #fff;
    text-decoration: none;
    font-family: var(--font-display);
    font-size: 32px;
    letter-spacing: 0.005em;
    line-height: 1.05;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 480ms ease, transform 480ms ease;
}

.mobile-menu.open .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu.open .mobile-menu-link:hover {
    opacity: 0.6;
}

.mobile-menu-footer {
    padding: 24px 28px 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    display: flex;
    justify-content: space-between;
}

/* ── Photo modal ── */
.photo-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 360ms ease;
}

.photo-modal.open {
    opacity: 1;
    pointer-events: auto;
}

.photo-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 8, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.photo-modal-img {
    position: relative;
    z-index: 1;
    max-width: calc(100vw - 120px);
    max-height: calc(100vh - 80px);
    object-fit: contain;
    display: block;
    user-select: none;
}

.photo-modal-close {
    position: absolute;
    top: 24px;
    right: 28px;
    z-index: 2;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.photo-modal-close:hover {
    color: #fff;
}

.photo-modal-prev,
.photo-modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 48px;
    height: 64px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.photo-modal-prev {
    left: 24px;
}

.photo-modal-next {
    right: 24px;
}

.photo-modal-prev:hover,
.photo-modal-next:hover {
    color: #fff;
}

@media (max-width: 767px) {
    .site-header {
        display: none;
    }

    .mobile-top-bar {
        display: flex;
    }

    .chips-wrapper {
        padding: 80px 0 20px;
    }

    .photo-modal-img {
        max-width: 100vw;
        max-height: calc(100vh - 120px);
    }

    .photo-modal-prev {
        left: 8px;
    }

    .photo-modal-next {
        right: 8px;
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        margin: 0 16px;
        height: calc(100vh - 200px);
    }
}

@media (max-width: 570px) {
    .photo-grid {
        grid-template-columns: repeat(1, 1fr) !important;
    }

    .photo-grid-item {
        width: 100%;
        height: max-content;
        min-height: unset;
    }

    .photo-grid-item img {
        min-width: 100%;
        width: 100%;
        object-fit: contain;
        object-position: center !important;
    }
}

@media (max-width: 1000px) {
    .info-body {
        grid-template-columns: 1fr;
        margin: 80px 24px 32px;
        padding: 0;
        gap: 32px;
        max-height: calc(100dvh - 32px);
    }

    .info-photo {
        min-width: 100%;
        min-height: 240px;
        max-height: 400px;
    }

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

    .chips-wrapper {
        padding: 100px 0 32px;
    }

    .switcher-chips {
        padding: 2px;
    }

    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
        width: calc(100% - 32px);
        height: calc(100vh - 200px);
        margin: 0 16px;
    }
}

@media (min-width: 1440px) {
    .photo-grid {
        grid-template-columns: repeat(5, 1fr);
        margin-inline: auto;
    }
}

.mute-toggle {
    position: absolute;
    bottom: 24px;
    right: 24px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.mute-toggle:hover {
    background: rgba(0, 0, 0, 0.7);
}

.mute-toggle svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

/* показываем нужную иконку */
.mute-toggle .icon-sound {
    display: none;
}

.mute-toggle .icon-mute {
    display: block;
}

.mute-toggle.is-on .icon-sound {
    display: block;
}

.mute-toggle.is-on .icon-mute {
    display: none;
}

@media (orientation: portrait) {
    .info-body {
        grid-template-columns: 1fr;
        margin: 80px 24px 32px;
        padding: 0;
        gap: 32px;
        max-height: calc(100dvh - 32px);
    }

    .info-photo {
        width: auto;
        height: 100%;
        min-height: 400px;
        margin-inline: auto;
    }

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