/**
 * Main Stylesheet for Elviine Art
 * Extracted from index.html for maintainability
 * bg color - ffdbcf
 */

/* ===========================================
   Reset & Global
   =========================================== */
:root {
    --focus-color: #008f3a;
    --mobile-utility-size: clamp(52px, 13vw, 64px);
    --mobile-edge-inset: clamp(12px, 3vw, 20px);
}

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

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #ffdbcf;
}

body {
    position: relative;
}

:where(a[href], button, [role='button'], [tabindex]):focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 4px;
}

.contact-btn button:focus-visible,
.contact-btn .lang-toggle-btn:focus-visible {
    outline-offset: -4px;
}

.nav-logo-link:focus-visible {
    outline: none;
}

.nav-logo-link:focus-visible .nav-logo {
    outline: 3px solid var(--focus-color);
    outline-offset: 4px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.landing-bg::before {
    opacity: 0.1;
}

/* ===========================================
   Container & Canvas
   =========================================== */
#container {
    width: 100%;
    height: 100vh;
    position: relative;
    z-index: 1;
    transition: opacity 0.5s ease;
}

html[data-gallery-performance='reduced'] #container {
    transition-duration: 180ms;
    transition-timing-function: ease-in-out;
}

#container.is-switching-gallery-layout {
    opacity: 0;
}

#container canvas {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ===========================================
   Static Gallery Fallback
   =========================================== */
body.static-gallery-active {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body.static-gallery-active #main-title,
body.static-gallery-active #scroll-incentive,
body.static-gallery-active .landing-nav,
body.static-gallery-active .vertical-lines {
    display: none;
}

.static-gallery {
    position: relative;
    z-index: 1;
    width: min(100%, 1440px);
    min-height: 100vh;
    margin: 0 auto;
    padding: clamp(120px, 16vh, 190px) clamp(24px, 6vw, 92px) 0;
}

.static-gallery > h2 {
    margin: 0 0 clamp(48px, 8vw, 110px);
    font-size: clamp(3.2rem, 9vw, 9rem);
    font-weight: 250;
    line-height: 0.9;
    letter-spacing: -0.055em;
}

.static-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(58px, 10vw, 150px) clamp(24px, 5vw, 80px);
    align-items: start;
}

.static-gallery-card {
    display: grid;
    gap: 16px;
    color: inherit;
    text-decoration: none;
}

.static-gallery-card:nth-child(even) {
    margin-top: clamp(60px, 12vw, 170px);
}

.static-gallery-image {
    display: block;
    width: 100%;
    height: auto;
    background: rgb(26 26 26 / 7%);
}

.static-gallery-card-copy {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgb(26 26 26 / 55%);
}

.static-gallery-title {
    font-size: clamp(1rem, 1.8vw, 1.45rem);
}

.static-gallery-year {
    font-size: 0.82rem;
    opacity: 0.62;
}

body.static-gallery-active .gallery-ending {
    position: relative;
    inset: auto;
    min-height: 92vh;
    margin-top: clamp(120px, 20vw, 280px);
    padding-inline: 0;
    visibility: visible;
    pointer-events: auto;
    transform: none !important;
    will-change: auto;
}

@media (hover: hover) {
    .static-gallery-card:hover .static-gallery-title {
        text-decoration: underline;
        text-underline-offset: 0.25em;
    }
}

html[data-layout='single-column'] .static-gallery {
    padding-inline: clamp(18px, 6vw, 32px);
}

html[data-layout='single-column'] .static-gallery-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 72px;
}

html[data-layout='single-column'] .static-gallery-card:nth-child(even) {
    margin-top: 0;
}

/* ===========================================
   Gallery Ending
   =========================================== */
.gallery-ending {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2;
    display: grid;
    width: 100%;
    min-height: 118vh;
    padding: 0 clamp(22px, 5.2vw, 88px);
    color: #1a1a1a;
    text-align: center;
    visibility: hidden;
    pointer-events: none;
    place-items: center;
    will-change: transform;
}

.gallery-ending.is-visible {
    visibility: visible;
    pointer-events: auto;
}

.gallery-ending-copy {
    display: flex;
    width: min(100%, 980px);
    flex-direction: column;
    gap: clamp(64px, 13vh, 140px);
    align-items: center;
    transform: translateY(-8vh);
}

.gallery-ending-sentence {
    max-width: 980px;
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(26px, 2.2vw, 34px);
    font-weight: 200;
    line-height: 0.98;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.gallery-ending-action {
    padding: 0 0 3px;
    color: inherit;
    font: inherit;
    font-size: clamp(13px, 1.1vw, 17px);
    line-height: 1.3;
    background: transparent;
    border: 0;
    border-bottom: 1px solid currentColor;
    cursor: pointer;
}

@media (hover: hover) {
    .gallery-ending-action:hover {
        border-bottom-color: transparent;
    }
}

/* ===========================================
   Loading Screen
   =========================================== */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    z-index: 20;
    transition: opacity 0.7s ease;
    background-color: #ffdbcf;
    opacity: 1;
    pointer-events: none;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    color: #1a1a1a;
}

.loader {
    width: clamp(42px, 7vw, 64px);
    aspect-ratio: 1;
    border: 2px solid rgba(26, 26, 26, 0.2);
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: loading-spin 0.85s linear infinite;
}

.loading-copy {
    margin: 0;
    font-size: clamp(11px, 1.1vw, 15px);
    font-weight: 500;
    letter-spacing: 0.2em;
    animation: loading-pulse 1.2s ease-in-out infinite;
}

@keyframes loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes loading-pulse {
    50% {
        opacity: 0.35;
    }
}

@media (prefers-reduced-motion: reduce) {
    .loader,
    .loading-copy {
        animation: none;
    }
}

/* ===========================================
   Main Title 
   =========================================== */
#main-title {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75%;
    height: auto;
    object-fit: contain;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
}

body.landing-bg #main-title,
body.landing-bg #scroll-incentive {
    opacity: 1;
    pointer-events: auto;
    transition: transform 1.2s cubic-bezier(0.32, 1, 0.32, 1);
}

/* ===========================================
   Scroll Incentive
   =========================================== */
#scroll-incentive {
    position: fixed;
    bottom: 1vh;
    right: 1.5%;
    transform: translateX(50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1vh;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
}

.scroll-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.7vw;
    letter-spacing: 0.15vw;
    font-weight: 300;
    color: #000;
}

.scroll-line {
    width: 1.3px;
    height: 8vh;
    background: linear-gradient(
        to bottom,
        black 0%,
        black 30%,
        white 50%,
        black 70%,
        black 100%
    );
    background-size: 100% 200%;
    animation: scroll-sweep 3s linear infinite;
}

@keyframes scroll-sweep {
    from {
        background-position: 0 160%;
    }
    to {
        background-position: 0 -60%;
    }
}

/* ===========================================
   Navbar
   =========================================== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5vh;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 2.2% 1%;
    z-index: 14;
    background-color: rgba(0, 0, 0, 0);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

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

nav.hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.nav-logo {
    position: fixed;
    top: 1%;
    left: 1%;
    width: 7vh;
    height: 7vh;
    background-color: #fff3cf;
    object-fit: contain;
    border: 1px solid rgb(0, 0, 0);
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
}

.nav-logo:hover {
    transform: scale(1.03);
}
/* Contact and language utility control */
.contact-btn {
    position: fixed;
    top: clamp(12px, 1.25vw, 22px);
    right: clamp(12px, 1.25vw, 22px);
    display: flex;
    align-items: stretch;
    height: clamp(42px, 3.4vw, 56px);
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: rgba(255, 243, 207, 0.94);
    border: 1px solid #1a1a1a;
    border-radius: 999px;
    box-shadow: 0 4px 18px rgba(26, 26, 26, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.contact-btn button,
.contact-btn .lang-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 clamp(16px, 1.4vw, 26px);
    color: #1a1a1a;
    font-family: inherit;
    font-size: clamp(11px, 0.85vw, 15px);
    font-weight: 520;
    line-height: 1;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
    text-decoration: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    touch-action: manipulation;
    transition:
        background-color 0.22s ease,
        color 0.22s ease;
}

#contact-trigger::before {
    content: '';
    width: 0.45em;
    height: 0.45em;
    margin-right: 0.8em;
    flex: 0 0 auto;
    background: #00ff2f;
    border: 1px solid #1a1a1a;
    border-radius: 50%;
}

.contact-btn .lang-toggle-btn {
    min-width: clamp(52px, 4.2vw, 68px);
    padding-inline: clamp(13px, 1vw, 18px);
    border-left: 1px solid rgba(26, 26, 26, 0.35);
    letter-spacing: 0.14em;
}

@media (hover: hover) {
    .contact-btn button:hover,
    .contact-btn .lang-toggle-btn:hover {
        color: #ffffff;
        background: #1a1a1a;
    }
}

.contact-btn button:active,
.contact-btn .lang-toggle-btn:active {
    color: #ffffff;
    background: #1a1a1a;
}

/* ===========================================
   Landing Navigation
   =========================================== */
.landing-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 70%;
    margin: 0 auto;
    width: clamp(720px, 68vw, 1120px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(4px, 0.5vw, 10px);
    opacity: 0;
    pointer-events: none;
    z-index: 14;
}

.landing-nav::before {
    display: none;
}

body.landing-bg .landing-nav {
    opacity: 1;
    pointer-events: auto;
    transition:
        opacity 0.6s ease,
        width 1.2s cubic-bezier(0.32, 1, 0.32, 1),
        gap 1.2s cubic-bezier(0.32, 1, 0.32, 1),
        transform 1.2s cubic-bezier(0.32, 1, 0.32, 1);
}

.landing-nav-link {
    color: #1a1a1a;
    text-decoration: none;
    font-size: clamp(15px, 1.5vw, 26px);
    font-weight: 450;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 1.8vh 2.5vw;
    border: 1px solid rgb(0, 0, 0);
    background: rgb(255, 243, 207);
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 6.2vh;
    white-space: nowrap;
    border-radius: 40px;
    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        padding 1.2s cubic-bezier(0.32, 1, 0.32, 1),
        font-size 1.2s cubic-bezier(0.32, 1, 0.32, 1),
        letter-spacing 1.2s cubic-bezier(0.32, 1, 0.32, 1);
}

.landing-nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: #1a1a1a;
    z-index: -1;
}

.landing-nav-link:hover {
    color: #ffbf1e;
}

.landing-nav-link:hover::before {
    height: 100%;
}

.landing-nav-link.active {
    color: #ffbf1e;
    background: #1a1a1a;
}

.landing-nav-link[aria-disabled='true'] {
    color: rgb(26 26 26 / 45%);
    cursor: not-allowed;
}

.landing-nav-link[aria-disabled='true']::before {
    display: none;
}

.landing-nav-link[aria-disabled='true']:hover {
    color: rgb(26 26 26 / 45%);
}

@media (prefers-reduced-motion: reduce) {
    body.landing-bg .landing-nav,
    .landing-nav-link {
        transition-duration: 0.01ms;
    }
}

/* ===========================================
   Vertical Lines (Landing Decoration)
   =========================================== */
.vertical-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
}

.vertical-line {
    position: absolute;
    width: 1px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.09) 20%
    );
    top: 0;
}

.vertical-line:nth-child(1) {
    left: 10%;
}
.vertical-line:nth-child(2) {
    left: 35%;
}
.vertical-line:nth-child(3) {
    left: 65%;
}
.vertical-line:nth-child(4) {
    left: 90%;
}

/* ===========================================
   Contact Popup
   =========================================== */
.contact-popup {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    color: #1a1a1a;
    background: #ffdbcf;
    z-index: 18;
    display: none;
    justify-content: center;
    align-items: center;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: clamp(20px, 5vw, 72px);
    border: 0;
    opacity: 0;
    transform: translateY(24px);
    transition:
        opacity 0.4s ease,
        transform 0.5s cubic-bezier(0.32, 1, 0.32, 1);
}

.contact-popup[open] {
    display: flex;
}

.contact-popup::backdrop,
.menu-modal::backdrop {
    background: transparent;
}

.contact-popup.active {
    opacity: 1;
    transform: translateY(0);
}

.contact-popup-content {
    position: relative;
    width: 100%;
    max-width: 920px;
    max-height: 100%;
    overflow-y: auto;
    scrollbar-width: thin;
}

.contact-layout {
    position: relative;
    width: 100%;
    padding: clamp(20px, 3vw, 44px);
}

.contact-popup-header {
    max-width: 720px;
    margin-bottom: clamp(28px, 4vw, 48px);
}

.contact-popup-kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: clamp(14px, 2vw, 22px);
    font-size: clamp(0.68rem, 0.8vw, 0.82rem);
    font-weight: 650;
    letter-spacing: 0.17em;
}

.contact-popup-kicker::before {
    width: 9px;
    aspect-ratio: 1;
    flex: 0 0 auto;
    content: '';
    background: var(--focus-color);
    border: 1px solid #1a1a1a;
    border-radius: 50%;
}

.contact-popup-title {
    margin: 0 0 clamp(14px, 2vw, 22px);
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 420;
    line-height: 0.95;
    letter-spacing: -0.055em;
}

.contact-popup-intro {
    max-width: 650px;
    font-size: clamp(1rem, 1.45vw, 1.25rem);
    font-weight: 380;
    line-height: 1.55;
}

.contact-popup-actions {
    display: grid;
    border-top: 1px solid rgba(26, 26, 26, 0.72);
}

.contact-popup-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: clamp(14px, 2vw, 22px);
    align-items: center;
    width: 100%;
    min-height: 96px;
    padding: clamp(18px, 2vw, 26px) 0;
    color: #1a1a1a;
    font: inherit;
    text-align: left;
    text-decoration: none;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(26, 26, 26, 0.72);
    border-radius: 0;
    cursor: pointer;
    transition:
        color 0.25s ease,
        transform 0.25s ease;
}

.contact-popup-icon-wrap {
    display: grid;
    width: clamp(34px, 3.5vw, 46px);
    aspect-ratio: 1;
    place-items: center;
}

.contact-popup-icon {
    width: 70%;
    height: 70%;
    stroke: currentColor;
}

.contact-popup-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.contact-popup-label {
    font-size: clamp(0.68rem, 0.75vw, 0.78rem);
    font-weight: 650;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.65;
}

.contact-popup-value {
    overflow: hidden;
    font-size: clamp(1rem, 1.6vw, 1.35rem);
    font-weight: 480;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-popup-action {
    min-width: auto;
    padding: 0 0 3px;
    font-size: clamp(0.66rem, 0.75vw, 0.78rem);
    font-weight: 650;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
    border: 0;
    border-bottom: 1px solid currentColor;
}

.contact-popup-note {
    margin-top: clamp(22px, 3vw, 34px);
    font-size: clamp(0.78rem, 0.9vw, 0.9rem);
    line-height: 1.4;
    opacity: 0.62;
}

@media (hover: hover) {
    .contact-popup-link:hover {
        transform: translateX(8px);
    }

    .contact-popup-link:hover .contact-popup-action {
        color: var(--focus-color);
    }
}

/* ===========================================
   Close Button Component (Reusable)
   =========================================== */
.close-button {
    position: fixed;
    top: max(clamp(14px, 2vw, 26px), env(safe-area-inset-top));
    right: max(clamp(14px, 2vw, 26px), env(safe-area-inset-right));
    z-index: 20003;
    display: grid;
    width: clamp(48px, 4.2vw, 64px);
    aspect-ratio: 1;
    padding: 0;
    color: inherit;
    place-items: center;
    background: rgba(255, 243, 207, 0.96);
    border: 1px solid currentColor;
    border-radius: 50%;
    cursor: pointer;
    touch-action: manipulation;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

@media (hover: hover) {
    .close-button:hover {
        color: #fff3cf;
        background: #1a1a1a;
        transform: scale(1.05);
    }

    .close-button:hover .close-button-icon {
        transform: rotate(90deg);
    }
}

.close-button:active {
    transform: scale(0.95);
}

.close-button-icon {
    position: relative;
    display: block;
    width: 42%;
    aspect-ratio: 1;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.close-button-icon::before,
.close-button-icon::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 1.5px;
    content: '';
    background: currentColor;
    border-radius: 999px;
}

.close-button-icon::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.close-button-icon::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* MOBILE */

html[data-layout='single-column'] .vertical-lines {
    z-index: 0;
}

html[data-layout='single-column'] .gallery-ending {
    min-height: 112vh;
    padding-inline: clamp(18px, 6vw, 28px);
}

html[data-layout='single-column'] .gallery-ending-copy {
    gap: 84px;
    transform: translateY(-7vh);
}

html[data-layout='single-column'] .gallery-ending-sentence {
    max-width: 390px;
    font-size: clamp(42px, 13.5vw, 62px);
}

html[data-layout='single-column'] body.landing-bg .vertical-lines {
    z-index: 2;
}

html[data-layout='single-column'] .vertical-line {
    width: 2px;
    transform: translateX(-1px);
}

html[data-layout='single-column'] nav {
    height: 9vh;
    padding: 3% 3%;
}

html[data-layout='single-column'] .nav-logo {
    top: max(var(--mobile-edge-inset), env(safe-area-inset-top));
    left: max(var(--mobile-edge-inset), env(safe-area-inset-left));
    width: var(--mobile-utility-size);
    height: var(--mobile-utility-size);
}

html[data-layout='single-column'] #main-title {
    width: 140%;
}

html[data-layout='single-column'] .landing-nav {
    top: 80%;
    width: 94vw;
    gap: 0.5vh;
}

html[data-layout='single-column'] .landing-nav-link {
    letter-spacing: 0em;
    font-size: clamp(10px, 1.8vh, 15px);
    padding-inline: 1vw;
}

html[data-layout='single-column'] #scroll-incentive {
    right: 3%;
    bottom: 3%;
}

html[data-layout='single-column'] .scroll-text {
    font-size: 3.7vw;
    letter-spacing: 0.15vw;
}

html[data-layout='single-column'] .contact-btn button,
html[data-layout='single-column'] .contact-btn .lang-toggle-btn {
    font-size: clamp(11px, 3vw, 14px);
    padding-inline: clamp(14px, 4vw, 20px);
}

html[data-layout='single-column'] .contact-btn {
    top: max(var(--mobile-edge-inset), env(safe-area-inset-top));
    right: max(var(--mobile-edge-inset), env(safe-area-inset-right));
    height: var(--mobile-utility-size);
}

html[data-layout='single-column'] .contact-btn .lang-toggle-btn {
    min-width: clamp(48px, 13vw, 58px);
    padding-inline: 12px;
}

html[data-layout='single-column'] .contact-popup {
    align-items: flex-start;
    padding: max(76px, calc(env(safe-area-inset-top) + 68px))
        max(14px, env(safe-area-inset-right))
        max(20px, env(safe-area-inset-bottom))
        max(14px, env(safe-area-inset-left));
}

html[data-layout='single-column'] .contact-popup-content {
    max-height: 100%;
}

html[data-layout='single-column'] .contact-layout {
    padding: 0 clamp(10px, 4vw, 18px) 24px;
}

html[data-layout='single-column'] .contact-popup-header {
    margin-bottom: 28px;
}

html[data-layout='single-column'] .contact-popup-title {
    font-size: clamp(2.4rem, 13vw, 4rem);
}

html[data-layout='single-column'] .contact-popup-intro {
    font-size: 1rem;
}

html[data-layout='single-column'] .contact-popup-link {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    min-height: 88px;
    gap: 12px;
    padding: 16px 0;
}

html[data-layout='single-column'] .contact-popup-icon-wrap {
    width: 34px;
}

html[data-layout='single-column'] .contact-popup-action {
    min-width: auto;
    padding: 0 0 2px;
    letter-spacing: 0.08em;
}

/* WIDE SCREEN */

@media (min-width: 2300px) {
    .landing-nav {
        top: 65%;
        width: min(50vw, 1200px);
        gap: 2vh;
    }

    .landing-nav-link {
        font-size: clamp(18px, 2vw, 28px);
        min-height: 7vh;
        padding: 2.2vh 3vw;
    }

    #main-title {
        width: 60%;
    }

    .contact-popup-content {
        max-width: 1100px;
    }

    .scroll-text {
        font-size: 0.8vw;
    }

    .scroll-line {
        height: 10vh;
    }
}

/* ===========================================
   Artwork Menu
   =========================================== */
.menu-icon {
    position: fixed;
    top: 50%;
    right: clamp(16px, 1.5vw, 32px);
    display: grid;
    width: clamp(42px, 3vw, 58px);
    aspect-ratio: 1;
    padding: clamp(6px, 0.5vw, 9px);
    place-items: center;
    color: inherit;
    font: inherit;
    z-index: 15;
    opacity: 0.8;
    cursor: pointer;
    background-color: #fff3cf;
    border: 1px solid rgb(0, 0, 0);
    border-radius: 50%;
    transform: translateY(-50%);
    transition:
        opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.menu-icon:hover {
    transform: translateY(-50%) scale(1.1);
}

.menu-icon img {
    display: block;
    width: 70%;
    height: 70%;
    object-fit: contain;
    filter: invert(1);
}

.menu-modal,
body > .artwork-directory {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 16;
    display: none;
    align-items: flex-start;
    justify-content: flex-start;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    padding-top: 5vh;
    padding-left: 35%;
    opacity: 1;
    overflow-x: hidden;
    overflow-y: auto;
    pointer-events: none;
    background-color: #ffdbcf;
    transform: translateX(100%);
    transition: transform 0.6s ease-out;
    -webkit-overflow-scrolling: touch;
}

.menu-modal[open],
body > .artwork-directory:target {
    display: flex;
}

.menu-modal.active,
body > .artwork-directory:target {
    pointer-events: auto;
    transform: translateX(0);
}

.menu-modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    background: transparent;
    animation: fade-in-menu-content 0.6s ease-out 0.15s both;
}

@keyframes fade-in-menu-content {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.menu-modal-title {
    margin: 2vh 25vw 4vh 0;
    padding-bottom: 2vh;
    color: #000;
    font-size: clamp(30px, 4vw, 68px) !important;
    font-weight: 300;
    line-height: 1.2;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.pieces-grid {
    display: flex;
    flex-direction: column;
    gap: 3vw;
    margin-top: 2vh;
    margin-bottom: 10vh;
}

.gallery-performance-control {
    display: flex;
    align-self: flex-end;
    gap: 8px;
    align-items: center;
    width: fit-content;
    min-height: 44px;
    margin: 0 25vw 5vh 0;
    padding: 10px 0;
    color: rgba(0, 0, 0, 0.72);
    font-size: clamp(0.72rem, 0.75vw, 0.85rem);
    letter-spacing: 0.04em;
    opacity: 0.52;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.gallery-performance-control:hover,
.gallery-performance-control:focus-within {
    opacity: 0.9;
}

.gallery-performance-control input {
    width: 0.95em;
    height: 0.95em;
    accent-color: var(--focus-color);
}

.piece-item {
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 1.2vw;
    width: fit-content;
    padding: 0.5vw 0;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    font-size: clamp(34px, 3vw, 48px) !important;
    font-weight: 300;
    letter-spacing: -0.02em;
    text-align: left;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.piece-item:hover {
    transform: translateX(8px);
}

.piece-number {
    min-width: 2.5vw;
    opacity: 0.4;
    font-size: 1vw;
    font-variant-numeric: tabular-nums;
    transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.piece-item:hover .piece-number {
    opacity: 0.2;
}

.menu-piece-title {
    position: relative;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.menu-piece-title::after {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    content: '';
    background: currentColor;
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.piece-item:hover .menu-piece-title {
    transform: translateX(12px);
}

.piece-item:hover .menu-piece-title::after {
    width: 100%;
}

body.menu-open .nav-logo,
body.menu-open .nav-logo-link,
body.menu-open .language-selector,
body.menu-open [class*='lang-'] {
    pointer-events: none !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease;
}

.menu-modal::-webkit-scrollbar {
    width: 6px;
}

.menu-modal::-webkit-scrollbar-track {
    background: transparent;
}

.menu-modal::-webkit-scrollbar-thumb {
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.3s ease;
}

.menu-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

html[data-layout='single-column'] .menu-modal,
html[data-layout='single-column'] body > .artwork-directory {
    padding-right: 5%;
    padding-left: 10%;
}

html[data-layout='single-column'] .menu-icon {
    right: max(var(--mobile-edge-inset), env(safe-area-inset-right));
    width: var(--mobile-utility-size);
    padding: clamp(8px, 2.5vw, 12px);
    opacity: 1;
}

html[data-layout='single-column'] .menu-modal-title {
    margin-bottom: 3vh;
    padding-top: 10vh;
    padding-bottom: 2vh;
    font-size: 12vw !important;
}

html[data-layout='single-column'] .pieces-grid {
    gap: 6vw;
    margin-top: 3vh;
}

html[data-layout='single-column'] .gallery-performance-control {
    margin-right: 0;
    margin-bottom: max(3vh, env(safe-area-inset-bottom));
    font-size: 0.78rem;
}

html[data-layout='single-column'] .piece-item {
    gap: 3vw;
    padding: 1vw 0;
    font-size: 7vw !important;
}

html[data-layout='single-column'] .piece-number {
    min-width: 6vw;
    font-size: 3vw !important;
}

@media (hover: none), (pointer: coarse) {
    .menu-icon {
        opacity: 1;
    }
}

/*
 * Some Android browsers can request a desktop-sized layout viewport while
 * still presenting it on a narrow portrait phone. Compensate only for that
 * unusually wide and tall viewport shape.
 */
@media (min-width: 700px) and (max-aspect-ratio: 9/16) {
    html[data-layout='single-column'] {
        --mobile-utility-size: clamp(104px, 13vw, 128px);
    }

    html[data-layout='single-column'] .contact-btn button,
    html[data-layout='single-column'] .contact-btn .lang-toggle-btn {
        padding-inline: clamp(28px, 4vw, 40px);
        font-size: clamp(20px, 2.8vw, 28px);
    }

    html[data-layout='single-column'] .contact-btn .lang-toggle-btn {
        min-width: clamp(96px, 12vw, 116px);
        padding-inline: 24px;
    }

    html[data-layout='single-column'] .menu-icon {
        padding: clamp(16px, 2.5vw, 24px);
    }
}

/* Gallery-strip artwork menu on the landing page. */
body.gallery-strip-menu .pieces-grid {
    gap: clamp(18px, 2vw, 32px);
}

body.gallery-strip-menu .piece-item {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr);
    align-items: center;
    width: min(54vw, 640px);
    gap: clamp(12px, 1.5vw, 24px);
    padding: 0;
    color: #fff3cf;
}

body.gallery-strip-menu .piece-number {
    min-width: 0;
    color: #000;
    opacity: 0.7;
}

body.gallery-strip-menu .menu-piece-title {
    display: flex;
    position: relative;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    aspect-ratio: 5.25 / 1;
    overflow: hidden;
    padding: clamp(16px, 2vw, 30px);
    isolation: isolate;
}

body.gallery-strip-menu .menu-piece-title::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: '';
    background-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2)),
        var(--menu-image);
    background-position: center;
    background-size: cover;
    transition:
        filter 180ms ease,
        transform 180ms ease;
}

body.gallery-strip-menu .piece-item:hover .menu-piece-title::before,
body.gallery-strip-menu .piece-item:focus-visible .menu-piece-title::before {
    filter: brightness(1.08);
    transform: scale(1.02);
}

@media (max-width: 700px) {
    body.gallery-strip-menu .piece-item {
        width: 100%;
        grid-template-columns: 2rem minmax(0, 1fr);
    }

    body.gallery-strip-menu .menu-piece-title {
        padding: clamp(16px, 5vw, 28px);
    }
}
