/* ===========================================
   PETR LORENZ — DIGITAL MONOGRAPH
   Design must not compete with the art.
   =========================================== */

:root {
    --bg: #ffffff;
    --bg-soft: #f7f5f2;
    --ink: #1a1a1a;
    --ink-soft: #555;
    --ink-faint: #999;
    --rule: #e7e3dd;
    --accent: #8a6e3c;

    --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --gutter: clamp(20px, 4vw, 56px);
    --max:    1480px;
    --letter: 0.16em;
    --letter-wide: 0.32em;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a  { color: inherit; text-decoration: none; transition: color .35s ease; }
a:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

::selection { background: rgba(138, 110, 60, 0.18); color: var(--ink); }

/* ============= NAVIGATION ============= */
.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: rgba(255,255,255,0.85);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    transition: background .4s ease, box-shadow .4s ease;
}
.site-nav.is-scrolled {
    background: rgba(255,255,255,0.95);
    box-shadow: 0 1px 0 var(--rule);
}
.nav-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 22px var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.04em;
}
.site-nav nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 36px;
}
.site-nav nav a {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: var(--letter-wide);
    color: var(--ink-soft);
}
.site-nav nav a:hover { color: var(--ink); }

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}
.nav-burger span {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--ink);
    transition: transform .35s ease, opacity .35s ease;
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(3px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { transform: translateY(-3px) rotate(-45deg); }

@media (max-width: 760px) {
    .site-nav nav {
        position: fixed;
        inset: 0;
        background: var(--bg);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity .45s ease;
    }
    .site-nav nav.is-open {
        opacity: 1;
        pointer-events: auto;
    }
    .site-nav nav ul {
        flex-direction: column;
        gap: 32px;
        text-align: center;
    }
    .site-nav nav a {
        font-family: var(--serif);
        font-size: 28px;
        text-transform: none;
        letter-spacing: 0;
        color: var(--ink);
    }
    .nav-burger { display: flex; position: relative; z-index: 60; }
}

/* ============= HERO ============= */
.hero {
    min-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px var(--gutter) 80px;
    text-align: center;
}
.hero-inner { max-width: 880px; }
.hero-eyebrow {
    margin: 0 0 32px;
    font-size: 11px;
    letter-spacing: var(--letter-wide);
    text-transform: uppercase;
    color: var(--ink-faint);
}
.hero-title {
    margin: 0;
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(48px, 9vw, 128px);
    line-height: 1;
    letter-spacing: -0.01em;
}
.hero-tagline {
    margin: 32px auto 0;
    max-width: 560px;
    font-family: var(--serif);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(18px, 2.2vw, 24px);
    color: var(--ink-soft);
    line-height: 1.5;
}
.hero-scroll {
    display: inline-block;
    margin-top: 64px;
    padding-bottom: 4px;
    font-size: 11px;
    letter-spacing: var(--letter-wide);
    text-transform: uppercase;
    color: var(--ink-soft);
    border-bottom: 1px solid var(--rule);
}
.hero-scroll:hover { color: var(--accent); border-color: var(--accent); }

/* ============= SECTION ============= */
.section {
    padding: 96px var(--gutter);
    max-width: var(--max);
    margin: 0 auto;
}
.section-head {
    text-align: center;
    margin-bottom: 56px;
}
.section-head h2,
.section h2,
.page-head h1 {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.005em;
    margin: 12px 0;
}
.eyebrow {
    margin: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: var(--letter-wide);
    color: var(--accent);
}
.dim {
    margin: 8px 0 0;
    color: var(--ink-faint);
    font-size: 13px;
    letter-spacing: 0.02em;
}

/* ============= YEAR TABS ============= */
.year-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 8px;
    margin-bottom: 48px;
}
.year-tab {
    padding: 8px 14px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: var(--letter);
    color: var(--ink-soft);
    border-radius: 100px;
    transition: color .3s ease, background .3s ease;
}
.year-tab:hover { color: var(--ink); }
.year-tab.is-active {
    background: var(--ink);
    color: var(--bg);
}
.tab-count {
    margin-left: 6px;
    opacity: 0.5;
    font-size: 10px;
}

/* ============= MASONRY ============= */
.masonry {
    width: 100%;
}
.masonry .tile {
    display: block;
    break-inside: avoid;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    background: var(--bg-soft);
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .9s ease, transform .9s ease;
}
.masonry .tile.is-visible {
    opacity: 1;
    transform: none;
}
.masonry .tile img {
    width: 100%;
    height: auto;
    transition: transform 1.2s ease;
}
.masonry .tile:hover img {
    transform: scale(1.025);
}
.tile-meta {
    position: absolute;
    inset: auto 0 0 0;
    padding: 16px;
    font-size: 11px;
    letter-spacing: var(--letter);
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.55) 100%);
    opacity: 0;
    transition: opacity .5s ease;
}
.masonry .tile:hover .tile-meta { opacity: 1; }

.empty-state {
    text-align: center;
    padding: 80px 0;
    color: var(--ink-faint);
    font-style: italic;
    font-family: var(--serif);
    font-size: 20px;
}

/* ============= ABOUT ============= */
.about {
    background: var(--bg-soft);
    max-width: none;
}
.about-grid {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 2fr;
    gap: clamp(40px, 6vw, 96px);
    align-items: center;
}
.about-portrait img {
    width: 100%;
    max-width: 380px;
    filter: grayscale(0.15);
}
.about-text h2 { margin-top: 8px; }
.about-text p {
    font-family: var(--serif);
    font-size: clamp(17px, 1.5vw, 20px);
    line-height: 1.8;
    color: var(--ink);
    margin: 0 0 1em;
}
@media (max-width: 760px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-portrait { display: flex; justify-content: center; }
}

/* ============= CONTACT ============= */
.contact {
    background: var(--bg-soft);
    text-align: center;
    max-width: none;
    padding: 120px var(--gutter) 140px;
}
.contact-inner { max-width: 760px; margin: 0 auto; }
.contact-headline {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    margin: 16px 0 24px;
}
.contact-note {
    font-family: var(--serif);
    font-style: italic;
    font-size: clamp(18px, 1.6vw, 22px);
    color: var(--ink-soft);
    margin: 0 auto 56px;
    max-width: 560px;
    line-height: 1.6;
}
.contact-email {
    display: inline-block;
    margin: 24px auto 0;
    font-family: var(--serif);
    font-weight: 400;
    font-style: italic;
    font-size: clamp(28px, 5vw, 56px);
    line-height: 1.1;
    color: var(--ink);
    border-bottom: 1px solid transparent;
    padding-bottom: 6px;
    transition: color .35s ease, border-color .35s ease, letter-spacing .5s ease;
    word-break: break-word;
}
.contact-email:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
    letter-spacing: 0.005em;
}

.contact-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 56px auto 40px;
    max-width: 320px;
}
.contact-ornament span {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--rule), transparent);
}
.contact-ornament i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    transform: rotate(45deg);
    border-radius: 0;
}

.contact-meta {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 56px;
}
.contact-meta li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
}
.contact-meta .meta-label {
    font-size: 10px;
    letter-spacing: var(--letter-wide);
    text-transform: uppercase;
    color: var(--ink-faint);
}
.contact-meta li > a,
.contact-meta li > span:last-child {
    font-family: var(--serif);
    font-size: 20px;
    color: var(--ink);
}
.contact-meta li > a:hover { color: var(--accent); }
@media (max-width: 600px) {
    .contact-meta { flex-direction: column; gap: 24px; }
}

/* ============= EXHIBITION ============= */
.page-head {
    max-width: var(--max);
    margin: 0 auto;
    padding: 140px var(--gutter) 56px;
}
.back-link {
    display: inline-block;
    margin-bottom: 32px;
    font-size: 11px;
    letter-spacing: var(--letter-wide);
    text-transform: uppercase;
    color: var(--ink-faint);
}
.back-link:hover { color: var(--accent); }

/* ============= FOOTER ============= */
.site-foot {
    border-top: 1px solid var(--rule);
    padding: 32px var(--gutter);
    margin-top: 64px;
}
.foot-inner {
    max-width: var(--max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: var(--letter-wide);
    color: var(--ink-faint);
    gap: 16px;
    flex-wrap: wrap;
}

/* ============= GLIGHTBOX OVERRIDES ============= */
.glightbox-clean .gslide-description { background: transparent; }
.glightbox-clean .gdesc-inner { padding: 16px 20px; }
.glightbox-clean .gslide-title {
    font-family: var(--serif);
    font-weight: 400;
}
.glightbox-clean .gnext, .glightbox-clean .gprev, .glightbox-clean .gclose {
    background: transparent;
}
.gbtn svg { fill: #fff; }

/* ============= REDUCED MOTION ============= */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
    html { scroll-behavior: auto; }
    .masonry .tile { opacity: 1; transform: none; }
}
