/* ============================================================
   FONTS
   ============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..900;1,200..900&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap");

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --bg:           #e8e3d9;
    --bg-dark:      #1a1814;
    --text:         #1a1814;
    --text-muted:   #6b6660;
    --border:       rgba(26, 24, 20, 0.18);
    --form-bg:      #ddd9d0;
    --header-h:     72px;
    --container-px: 48px;
    --font-primary: "Nunito", sans-serif;
    --font-body:    "Source Sans 3", sans-serif;
}

/* ============================================================
   RESET / BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    overflow: hidden;
    min-height: 100svh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.15;
}

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

img, video { display: block; max-width: 100%; height: auto; }

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

/* ============================================================
   SITE HEADER
   ============================================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 var(--container-px);
    z-index: 100;
    pointer-events: none;
    background-color: transparent;
    transition: background-color 0.3s;
}
.site-header:not(.is-home) {
    background-color: var(--bg);
}
.site-header > * { pointer-events: auto; }

/* Hamburger */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.hamburger-btn:hover { opacity: 0.55; }

.hamburger-line {
    display: block;
    width: 26px;
    height: 1px;
    background-color: var(--text);
    transition: background-color 0.3s;
}
/* Hide hamburger on home — hero-nav handles navigation there */
.site-header.is-home .hamburger-btn { opacity: 0; pointer-events: none; }

/* nav-top never shown — hamburger + overlay handles all non-home navigation */
.nav-top { display: none; }

.nav-top__link {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    transition: color 0.2s;
}
.nav-top__link:hover { color: var(--text); }

@media (max-width: 767.98px) {
    :root { --container-px: 20px; }
}

/* ============================================================
   MENU OVERLAY
   ============================================================ */
.menu-overlay {
    position: fixed;
    inset: 0;
    background-color: var(--bg);
    z-index: 200;
    display: grid;
    grid-template-rows: var(--header-h) 1fr auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.menu-overlay__close {
    grid-row: 1;
    justify-self: end;
    align-self: center;
    margin-right: var(--container-px);
    font-size: 18px;
    color: var(--text);
    opacity: 0.5;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}
.menu-overlay__close:hover { opacity: 1; }

.menu-overlay__nav {
    grid-row: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 var(--container-px);
    gap: 4px;
}
.menu-overlay__link {
    font-family: var(--font-body);
    font-size: clamp(12px, 1vw, 14px);
    font-weight: 400;
    letter-spacing: 0.18em;
    color: var(--text);
    opacity: 0.45;
    padding: 10px 0;
    border-bottom: 1px solid transparent;
    transition: opacity 0.2s, border-color 0.2s;
    text-decoration: none;
}
.menu-overlay__link:hover {
    opacity: 1;
    border-bottom-color: var(--text);
}

.menu-overlay__footer {
    grid-row: 3;
    padding: 24px var(--container-px);
    display: flex;
    gap: 32px;
    align-items: center;
}
.menu-overlay__footer-link {
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 0.12em;
    color: var(--text);
    opacity: 0.3;
    text-decoration: none;
    transition: opacity 0.2s;
}
.menu-overlay__footer-link:hover { opacity: 0.7; }

/* ============================================================
   SECTION PAGES — shared
   ============================================================ */
.section-page {
    position: fixed;
    inset: 0;
    display: none;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.4s ease;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.section-page.is-active  { display: flex; z-index: 10; }
.section-page.is-visible { opacity: 1; }

/* ============================================================
   HERO VIDEO — Ken Burns animation (active even without .mp4)
   ============================================================ */
@keyframes kenBurns {
    0%   { transform: scale(1.0)  translate(0%,    0%);   }
    30%  { transform: scale(1.07) translate(-1.2%, -0.6%); }
    65%  { transform: scale(1.05) translate(0.8%,   0.5%); }
    100% { transform: scale(1.0)  translate(0%,    0%);   }
}

/* ============================================================
   SECTION: HOME
   ============================================================ */
.section-home {
    background-color: var(--bg-dark);
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.home-video-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

/* Animated background image — Ken Burns fallback (always visible) */
.home-video-wrap::before {
    content: '';
    position: absolute;
    inset: -8%;
    background-image: url('../img/hero-image.jpg');
    background-size: cover;
    background-position: center;
    animation: kenBurns 22s ease-in-out infinite;
    z-index: 0;
}

/* Actual video — plays on top when hero.mp4 is available */
.home-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

.home-video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.32);
    z-index: 2;
}

/* Hero top navigation: ABOUT | ARTWORK | CONTACT */
.hero-nav {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0 var(--container-px);
    z-index: 10;
}
.hero-nav__link {
    font-family: var(--font-body);
    font-size: clamp(12px, 1vw, 13px);
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.78);
    transition: color 0.2s;
    padding: 20px 16px;
}
.hero-nav__link:hover { color: #fff; }
.hero-nav__link:nth-child(1) { justify-self: start; margin-left: -16px; }
.hero-nav__link:nth-child(2) { justify-self: center; }
.hero-nav__link:nth-child(3) { justify-self: end; margin-right: -16px; }

.home-title-wrap {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 24px;
    pointer-events: none;
}

/* Reduced title — elegant, not dominant */
.home-title {
    color: #fff;
    font-family: var(--font-primary);
    font-size: clamp(22px, 3.2vw, 42px);
    font-weight: 300;
    letter-spacing: 0.22em;
    line-height: 1.2;
}

/* Hero bottom links: INSTAGRAM | PLAYLIST | TERMS */
.home-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 24px var(--container-px);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    z-index: 3;
}
.home-footer__link {
    font-family: var(--font-body);
    font-size: clamp(12px, 0.9vw, 13px);
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.55);
    transition: color 0.2s;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    padding: 12px 0;
    pointer-events: auto;
}
.home-footer__link:hover { color: rgba(255, 255, 255, 0.9); }
.home-footer__link:nth-child(1) { justify-self: start; }
.home-footer__link:nth-child(2) { justify-self: center; }
.home-footer__link:nth-child(3) { justify-self: end; }

@media (max-width: 575.98px) {
    .home-title { letter-spacing: 0.12em; }
    .home-footer { padding-bottom: 20px; }
    .hero-nav { padding: 0 20px; }
    .home-footer { padding-left: 20px; padding-right: 20px; }
}

/* ============================================================
   SECTION: ARTWORKS
   ============================================================ */
.section-artworks {
    background-color: var(--bg);
    padding: calc(var(--header-h) + 32px) var(--container-px) 32px;
    gap: 28px;
    justify-content: center;
}

.section-artworks__header { flex-shrink: 0; }

.section-artworks__title {
    font-size: clamp(28px, 4vw, 48px);
    color: var(--text);
    line-height: 1.05;
    margin-bottom: 6px;
}
.section-artworks__subtitle {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.section-artworks__gallery-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
}

/* Navigation arrows */
.artworks-nav__btn {
    color: var(--text);
    opacity: 0.45;
    transition: opacity 0.2s;
    padding: 6px 0;
    display: flex;
    align-items: center;
    align-self: flex-end;
}
.artworks-nav__btn:hover { opacity: 1; }
.artworks-nav__btn--top  { margin-bottom: 16px; }
.artworks-nav__btn--bottom { margin-top: 16px; }

/* Swiper */
.artworks-swiper {
    width: 100%;
    overflow: visible !important;
    flex-shrink: 0;
}
.artworks-swiper .swiper-wrapper { align-items: stretch; }
.artworks-swiper .swiper-slide  { width: auto; height: auto; }

.artwork-card {
    display: block;
    width: 100%;
    cursor: pointer;
    transition: opacity 0.25s, transform 0.3s;
    position: relative;
}
.artwork-card:hover { opacity: 0.78; transform: scale(0.975); }
.artwork-sold-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bg);
    background-color: var(--text);
    padding: 4px 10px;
    pointer-events: none;
}
.artwork-detail__sold {
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 4px;
}
.artwork-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
}

@media (max-width: 767.98px) {
    .section-artworks {
        padding: calc(var(--header-h) + 24px) var(--container-px) 24px;
        gap: 20px;
    }
}
@media (max-width: 575.98px) {
}

/* ============================================================
   ARTWORK DETAIL — overlay
   ============================================================ */
.artwork-detail {
    position: fixed;
    inset: 0;
    background-color: var(--bg);
    z-index: 150;
    display: none;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.artwork-detail.is-active  { display: flex; }
.artwork-detail.is-visible { opacity: 1; }

.artwork-detail__left {
    width: 48%;
    min-width: 320px;
    padding: calc(var(--header-h) + 32px) var(--container-px) 48px calc(var(--container-px) + 8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
}

.artwork-detail__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 48px;
    align-self: flex-start;
    transition: gap 0.2s, color 0.2s;
}
.artwork-detail__back:hover { gap: 3px; color: var(--text); }

.artwork-detail__meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 40px;
}
.artwork-detail__title {
    font-size: clamp(20px, 2.8vw, 36px);
    font-family: var(--font-primary);
    font-weight: 400;
    color: var(--text);
    margin: 0;
}
.artwork-detail__line {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}
.detail-year {
    font-size: 1em;
    font-weight: 300;
    color: inherit;
}

.artwork-detail__cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--bg);
    background-color: var(--text);
    padding: 13px 28px;
    border: 1px solid var(--text);
    align-self: flex-start;
    transition: background-color 0.22s, color 0.22s, gap 0.22s;
}
.artwork-detail__cta:hover {
    background-color: transparent;
    color: var(--text);
    gap: 20px;
}

.artwork-detail__right {
    flex: 1;
    position: relative;
    overflow: hidden;
    align-self: stretch;
}
.artwork-detail__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

@media (max-width: 991.98px) {
    .artwork-detail {
        flex-direction: column;
        overflow-y: auto;
    }
    .artwork-detail__left {
        width: 100%;
        min-width: 0;
        padding: calc(var(--header-h) + 16px) var(--container-px) 28px;
    }
    .artwork-detail__right {
        width: 100%;
        position: static;
        flex: none;
    }
    .artwork-detail__img {
        position: static;
        width: 100%;
        height: auto;
        object-fit: unset;
    }
}

/* ============================================================
   SECTION: ABOUT
   ============================================================ */
.section-about {
    background-color: var(--bg);
    padding: calc(var(--header-h) + 20px) var(--container-px) 40px;
}
.section-about__inner {
    display: flex;
    align-items: stretch;
    gap: 96px;
    flex: 1;
    padding: 24px 0;
}
.section-about__left {
    flex: 0 0 42%;
    max-width: 42%;
}
.section-about__title {
    font-size: clamp(24px, 3.4vw, 42px);
    margin-bottom: 24px;
}
.section-about__bio {
    font-size: 16px;
    line-height: 1.78;
    color: var(--text-muted);
    text-align: justify;
}
.section-about__bio p + p { margin-top: 18px; }

.section-about__cta-wrap { margin-top: 40px; }
.about-contact-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    transition: gap 0.2s;
}
.about-contact-cta:hover { gap: 16px; }
.cta-line { flex: 1; height: 1px; background-color: var(--text); min-width: 32px; }
.cta-arrow { display: flex; align-items: center; color: var(--text); transition: transform 0.25s; }
.about-contact-cta:hover .cta-arrow { transform: translateX(5px); }
.cta-text { font-size: 12px; letter-spacing: 0.2em; color: var(--text); white-space: nowrap; }

.section-about__right {
    flex: 1;
    overflow: hidden;
    display: flex;
    justify-content: flex-end;
}
.section-about__img {
    width: 85%;
    height: calc(100svh - var(--header-h) - 120px);
    object-fit: cover;
    object-position: center 70%;
    display: block;
}

@media (max-width: 991.98px) {
    .section-about {
        padding: calc(var(--header-h) + 16px) var(--container-px) 36px;
        overflow-y: auto;
    }
    .section-about__inner { flex-direction: column; gap: 32px; }
    .section-about__left  { flex: none; max-width: 100%; width: 100%; }
    .section-about__right { flex: none; width: 100%; justify-content: center; }
    .section-about__img   { width: 100%; height: 110vw; max-height: 580px; }
}

/* ============================================================
   SECTION: CONTACT
   ============================================================ */
.section-contact {
    background-color: var(--bg);
    padding: calc(var(--header-h) + 20px) var(--container-px) 40px;
}
.section-contact__inner {
    display: flex;
    align-items: flex-start;
    gap: 64px;
    flex: 1;
    padding: 40px 0;
    margin: auto 0;
}
.section-contact__left { flex: 0 0 34%; }

.section-contact__title {
    font-size: clamp(22px, 3vw, 38px);
    margin-bottom: 28px;
}
.section-contact__info { display: flex; flex-direction: column; gap: 6px; }
.section-contact__detail {
    font-size: 14px;
    color: var(--text-muted);
    transition: color 0.2s;
    display: block;
    line-height: 1.6;
}
.section-contact__detail:hover { color: var(--text); }

/* Form */
.section-contact__right { flex: 1; }
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.form-group {
    display: flex;
    flex-direction: column;
    padding: 20px 0 8px;
    border-bottom: 1px solid var(--border);
    position: relative;
}
.form-group:first-child { border-top: 1px solid var(--border); }

.form-label {
    font-size: 12px;
    letter-spacing: 0.2em;
    color: var(--text-muted);
    font-family: var(--font-body);
    user-select: none;
    margin-bottom: 8px;
    transition: color 0.2s;
}
.form-group:focus-within .form-label { color: var(--text); }

.form-input {
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0 0 10px;
    font-size: 16px;
    font-family: var(--font-body);
    color: var(--text);
    width: 100%;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}
.form-input:focus { outline: none; box-shadow: none; }
.form-input::placeholder { color: transparent; }
.form-textarea {
    resize: none;
    min-height: 90px;
    line-height: 1.6;
    -webkit-appearance: none;
    appearance: none;
}
.form-group:focus-within {
    border-bottom-color: var(--text);
}

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 36px;
}
.form-error {
    font-size: 13px;
    color: #b03a2e;
}
.form-submit {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--bg);
    background-color: var(--text);
    padding: 13px 28px;
    border: 1px solid var(--text);
    font-family: var(--font-body);
    transition: background-color 0.22s, color 0.22s, gap 0.22s;
    flex-shrink: 0;
}
.form-submit:hover {
    background-color: transparent;
    color: var(--text);
    gap: 18px;
}
.form-submit svg { flex-shrink: 0; }

@media (max-width: 991.98px) {
    .section-contact {
        padding: calc(var(--header-h) + 8px) var(--container-px) 20px;
        overflow-y: auto;
    }
    .section-contact__inner {
        flex-direction: column;
        gap: 28px;
        padding: 20px 0;
    }
    .section-contact__title { margin-bottom: 12px; }
    .section-contact__left  { flex: none; width: 100%; }
    .section-contact__right { flex: none; width: 100%; }
    .contact-form { padding: 0; }
    .form-group { padding: 10px 0 4px; }
    .form-footer { margin-top: 20px; }
    .form-textarea { min-height: unset; height: 72px; }
}

/* ============================================================
   ACCESSIBILITY & FOCUS
   ============================================================ */
.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;
}
:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 3px;
    border-radius: 1px;
}
