/* ============================================================
   STRUVING CURATED - Global Design System
   Editorial luxury art gallery. Source of truth: reference image.
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
    --bg: #0C0B0A;
    --surface: #171310;
    --text: #EEE8DF;
    --muted: #9A9188;
    --accent: #B49A78;

    --border: rgba(238, 232, 223, .20);
    --border-strong: rgba(238, 232, 223, .35);
    --border-faint: rgba(238, 232, 223, .10);

    --container: 1500px;
    --gutter: clamp(18px, 4.2vw, 55px);

    --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
    --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
    --script: "Caveat", "Segoe Script", cursive;

    /* vertical rhythm */
    --section-y: clamp(64px, 9vw, 150px);
    --gap: clamp(20px, 3vw, 48px);

    --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img { display: block; max-width: 100%; }

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 400;
    font-family: var(--serif);
    letter-spacing: -0.005em;
}

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent); color: var(--bg); }

/* Accessible focus */
:focus-visible {
    outline: 1px solid var(--accent);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    z-index: 200;
    background: var(--surface);
    color: var(--text);
    padding: 12px 18px;
    border: 1px solid var(--border-strong);
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Layout helpers ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.site-main { display: block; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(48px, 6vw, 96px); }

.divider-top { border-top: 1px solid var(--border); }
.divider-bottom { border-bottom: 1px solid var(--border); }

/* ---------- Typography utilities ---------- */
.eyebrow {
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0;
}

.eyebrow--accent { color: var(--accent); }

.lead {
    color: var(--muted);
    font-size: clamp(15px, 1.15vw, 17px);
    line-height: 1.8;
    max-width: 46ch;
}

.serif { font-family: var(--serif); }
.italic { font-style: italic; }

/* Handwritten annotation (integrated into artwork, not a UI label) */
.handwritten {
    font-family: var(--script);
    font-weight: 400;
    color: var(--text);
    line-height: 1.15;
    letter-spacing: .01em;
}

/* Display / headings scale */
.display {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(56px, 8.8vw, 118px);
    line-height: .96;
    letter-spacing: -0.01em;
}

.h-section {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(38px, 5vw, 70px);
    line-height: 1.02;
}

.h-page {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(52px, 8vw, 104px);
    line-height: 1;
}

.h-card {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.05;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 16px 26px;
    min-height: 50px;
    border: 1px solid var(--border-strong);
    background: transparent;
    color: var(--text);
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}

.btn .btn__arrow {
    display: inline-block;
    transition: transform .3s var(--ease);
}

.btn:hover,
.btn:focus-visible {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.btn:hover .btn__arrow,
.btn:focus-visible .btn__arrow { transform: translateX(4px); }

/* ---------- Shared: object / product metadata ---------- */
.meta { margin-top: 18px; }

.meta__id {
    font-family: var(--sans);
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
}

.meta__title {
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--text);
    margin-top: 8px;
}

.meta__desc,
.meta__year {
    font-family: var(--sans);
    font-size: 12px;
    letter-spacing: .04em;
    color: var(--muted);
    margin-top: 5px;
}

.meta__price {
    font-family: var(--sans);
    font-size: 13px;
    letter-spacing: .05em;
    color: var(--text);
    margin-top: 8px;
}

/* ---------- Shared: media / image behaviour ---------- */
.media {
    position: relative;
    overflow: hidden;
    background: var(--surface);
}

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

.media--zoom img {
    transition: transform .65s var(--ease);
    will-change: transform;
}
.media--zoom:hover img { transform: scale(1.035); }

/* SOLD badge (archive) */
.sold-badge {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 6px 12px;
    background: rgba(12, 11, 10, .82);
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-family: var(--sans);
    font-size: 10px;
    letter-spacing: .22em;
    text-transform: uppercase;
    backdrop-filter: blur(2px);
}

/* ---------- Shared: filter bar (collection + archive) ---------- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(20px, 3vw, 42px);
    justify-content: center;
    padding-block: 26px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.filter-bar__btn {
    position: relative;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 6px;
    transition: color .25s var(--ease);
}

.filter-bar__btn::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--text);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s var(--ease);
}

.filter-bar__btn:hover { color: var(--text); }
.filter-bar__btn.is-active { color: var(--text); }
.filter-bar__btn.is-active::after { transform: scaleX(1); }

/* filtered items fade/reflow */
.filter-item {
    transition: opacity .5s var(--ease);
}
.filter-item.is-hidden {
    display: none;
}
.filter-item.is-fading {
    opacity: 0;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 90;
    background: var(--bg);
    border-bottom: 1px solid var(--border-faint);
}

.header__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 92px;
}

.brand {
    display: block;
    line-height: 1.02;
    font-family: var(--serif);
    letter-spacing: .06em;
    flex-shrink: 0;
}
.brand__line {
    display: block;
    font-size: 17px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text);
}

.nav {
    margin-inline: auto;
}
.nav ul {
    display: flex;
    gap: clamp(22px, 3vw, 52px);
}
.nav__link {
    position: relative;
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 6px 0;
    transition: color .25s var(--ease);
}
.nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: var(--text);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .35s var(--ease);
}
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--text); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text);
    transition: opacity .25s var(--ease);
}
.icon-btn:hover { opacity: .65; }
.icon-btn svg { width: 18px; height: 18px; }

.nav-toggle { display: none; }
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- Language switch ---------- */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-right: 6px;
    padding-right: 14px;
    border-right: 1px solid var(--border-faint);
}
.lang-switch__btn {
    display: inline-flex;
    width: 25px;
    height: 17px;
    overflow: hidden;
    border: 1px solid var(--border);
    opacity: .38;
    filter: grayscale(35%);
    transition: opacity .25s var(--ease), filter .25s var(--ease), border-color .25s var(--ease);
}
.lang-switch__btn:hover { opacity: .75; filter: grayscale(0); }
.lang-switch__btn.is-active {
    opacity: 1;
    filter: grayscale(0);
    border-color: var(--border-strong);
}
.lang-switch__btn .flag {
    width: 100%;
    height: 100%;
    display: block;
}

/* ---------- Mobile nav panel ---------- */
.mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 95;
    background: var(--bg);
    padding: 28px var(--gutter);
    display: flex;
    flex-direction: column;
    transform: translateY(-100%);
    visibility: hidden;
    transition: transform .5s var(--ease), visibility .5s var(--ease);
}
.mobile-nav.is-open {
    transform: translateY(0);
    visibility: visible;
}
.mobile-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 40px;
}
.mobile-nav__list {
    margin-top: clamp(32px, 8vh, 80px);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.mobile-nav__list a {
    font-family: var(--serif);
    font-size: clamp(34px, 11vw, 52px);
    line-height: 1.25;
    color: var(--text);
    opacity: 0;
    transform: translateY(14px);
}
.mobile-nav.is-open .mobile-nav__list a {
    animation: navItemIn .5s var(--ease) forwards;
}
.mobile-nav.is-open .mobile-nav__list a:nth-child(1) { animation-delay: .08s; }
.mobile-nav.is-open .mobile-nav__list a:nth-child(2) { animation-delay: .14s; }
.mobile-nav.is-open .mobile-nav__list a:nth-child(3) { animation-delay: .20s; }
.mobile-nav.is-open .mobile-nav__list a:nth-child(4) { animation-delay: .26s; }
.mobile-nav.is-open .mobile-nav__list a:nth-child(5) { animation-delay: .32s; }
@keyframes navItemIn {
    to { opacity: 1; transform: translateY(0); }
}
.mobile-nav__foot {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: var(--bg);
    padding: clamp(24px, 5vw, 56px) var(--gutter);
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s var(--ease), visibility .4s var(--ease);
}
.search-overlay.is-open { opacity: 1; visibility: visible; }

.search-overlay__top {
    display: flex;
    justify-content: flex-end;
}
.search-overlay__inner {
    max-width: 900px;
    margin: clamp(40px, 12vh, 140px) auto 0;
}
.search-field {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-strong);
    padding-bottom: 18px;
}
.search-field input {
    flex: 1;
    background: transparent;
    border: 0;
    color: var(--text);
    font-family: var(--serif);
    font-size: clamp(26px, 5vw, 56px);
    font-weight: 400;
    letter-spacing: .01em;
}
.search-field input::placeholder {
    color: var(--muted);
    opacity: .55;
}
.search-field input:focus { outline: none; }

.search-results {
    margin-top: 34px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.search-results a {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 2px;
    border-bottom: 1px solid var(--border-faint);
    color: var(--muted);
    transition: color .2s var(--ease);
}
.search-results a:hover { color: var(--text); }
.search-results__name {
    font-family: var(--sans);
    font-size: 13px;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.search-results__meta {
    font-size: 12px;
    letter-spacing: .05em;
}
.search-results__empty {
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
}

/* ============================================================
   BAG DRAWER
   ============================================================ */
.bag-backdrop {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(6, 5, 5, .55);
    opacity: 0;
    visibility: hidden;
    transition: opacity .4s var(--ease), visibility .4s var(--ease);
}
.bag-backdrop.is-open { opacity: 1; visibility: visible; }

.bag-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 115;
    height: 100%;
    width: min(420px, 90vw);
    background: var(--bg);
    border-left: 1px solid var(--border);
    padding: 28px clamp(22px, 3vw, 34px);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .45s var(--ease);
}
.bag-drawer.is-open { transform: translateX(0); }

.bag-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}
.bag-drawer__title {
    font-size: 11px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--text);
}
.bag-drawer__empty {
    margin-top: clamp(40px, 12vh, 120px);
    text-align: center;
    font-size: 11px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    border-top: 1px solid var(--border);
    padding-block: clamp(40px, 5vw, 64px);
}
.site-footer__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: clamp(28px, 4vw, 60px);
    align-items: start;
}
.footer-brand__name {
    font-family: var(--serif);
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.05;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text);
}
.footer-brand__tag {
    margin-top: 12px;
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(18px, 1.8vw, 26px);
    color: var(--muted);
}
.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}
.footer-nav a {
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--muted);
    transition: color .25s var(--ease);
}
.footer-nav a:hover { color: var(--text); }
.footer-legal {
    text-align: right;
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 2;
}

/* ============================================================
   ENTRANCE ANIMATION (fade-up)
   ============================================================ */
[data-fade] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
}
[data-fade].is-visible {
    opacity: 1;
    transform: translateY(0);
}
[data-fade-delay="1"] { transition-delay: .08s; }
[data-fade-delay="2"] { transition-delay: .16s; }
[data-fade-delay="3"] { transition-delay: .24s; }
[data-fade-delay="4"] { transition-delay: .32s; }

/* ============================================================
   RESPONSIVE - header / footer
   ============================================================ */
@media (max-width: 900px) {
    .nav { display: none; }
    .search-open-desktop { }
    .nav-toggle { display: inline-flex; }
    .header__inner { min-height: 76px; }

    .site-footer__inner {
        grid-template-columns: 1fr;
        gap: 36px;
        text-align: left;
    }
    .footer-nav { align-items: flex-start; }
    .footer-legal { text-align: left; }
}

@media (max-width: 620px) {
    .header__actions .icon-btn[data-search-open],
    .header__actions .icon-btn[data-bag-open] { display: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    [data-fade] { opacity: 1; transform: none; }
}
