/* ===========================================
   ART 332 — digitální galerie
   Neviditelný rám. Barvu nese tvorba, ne web.
   =========================================== */

:root {
    --bg: #ffffff;
    --bg-soft: #f5f4f2;
    --ink: #141414;
    --ink-soft: #565656;
    --ink-faint: #9a9a9a;
    --rule: #e7e5e1;
    --accent: #141414;      /* monochromní — aktivní stavy = sytá čerň */

    --display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

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

*, *::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 .3s ease, opacity .3s ease; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }

::selection { background: rgba(20,20,20,0.12); color: var(--ink); }

/* ============= NAVIGATION ============= */
.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    background: rgba(255,255,255,0.82);
    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: 18px var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand { display: flex; align-items: center; }
.brand img {
    height: 38px;
    width: auto;
    transition: opacity .3s ease;
}
.brand:hover img { opacity: 0.6; }

/* Na úvodní stránce je hlavičkové logo skryté nahoře (velké je v hero),
   odkryje se až po sjetí pod hero (třída show-brand z app.js). */
.is-home .brand {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .45s ease, visibility .45s ease;
}
.is-home .site-nav.show-brand .brand {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.site-nav nav ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 34px;
}
.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-social { display: flex; align-items: center; gap: 16px; }
.nav-social a { display: inline-flex; align-items: center; color: var(--ink-soft); }
.nav-social a:hover { color: var(--ink); }
.nav-social svg { display: block; }

.nav-burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}
.nav-burger span {
    display: block;
    width: 24px;
    height: 1.5px;
    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(-3.5px) 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: 28px; text-align: center; }
    .site-nav nav a {
        font-family: var(--display);
        font-size: 26px;
        text-transform: none;
        letter-spacing: 0;
        color: var(--ink);
    }
    .nav-social { gap: 28px; margin-top: 8px; }
    .nav-social svg { width: 26px; height: 26px; }
    .nav-burger { display: flex; position: relative; z-index: 60; }
}

/* ============= HERO ============= */
.hero {
    min-height: 86vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px var(--gutter) 80px;
    text-align: center;
}
.hero-inner { max-width: 900px; }
.hero-eyebrow {
    margin: 0 0 26px;
    font-family: var(--display);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--ink);
}
.hero-title {
    margin: 0;
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(56px, 11vw, 150px);
    line-height: 0.95;
    letter-spacing: -0.02em;
}
.hero-logo {
    margin: 0;
    line-height: 0;
}
.hero-logo img {
    width: clamp(290px, 64vw, 780px);
    height: auto;
    margin: 0 auto;
}
.hero-tagline {
    margin: 32px auto 0;
    max-width: 560px;
    font-family: var(--sans);
    font-weight: 300;
    font-size: clamp(16px, 1.7vw, 20px);
    color: var(--ink-soft);
    line-height: 1.6;
}
.hero-tagline em { font-style: normal; color: var(--ink); font-weight: 500; }
.hero-scroll {
    display: inline-block;
    margin-top: 56px;
    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(--ink); border-color: var(--ink); }

/* ============= SECTION ============= */
.section {
    padding: 96px var(--gutter);
    max-width: var(--max);
    margin: 0 auto;
}
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2,
.section h2 {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.015em;
    margin: 10px 0;
}
.eyebrow {
    margin: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: var(--letter-wide);
    color: var(--ink-faint);
}
.dim {
    margin: 8px 0 0;
    color: var(--ink-faint);
    font-size: 13px;
    letter-spacing: 0.02em;
}

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

/* ============= MASONRY GRID ============= */
.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 .8s ease, transform .8s ease;
}
.masonry .tile.is-visible { opacity: 1; transform: none; }
.tile-img { display: block; overflow: hidden; }
.masonry .tile img {
    width: 100%;
    height: auto;
    transition: transform 1.1s ease;
}
.masonry .tile:hover img { transform: scale(1.03); }
.tile-meta {
    position: absolute;
    inset: auto 0 0 0;
    padding: 28px 16px 14px;
    color: #fff;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.62) 100%);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .4s ease, transform .4s ease;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.masonry .tile:hover .tile-meta { opacity: 1; transform: none; }
.tile-title {
    font-family: var(--display);
    font-weight: 500;
    font-size: 16px;
    letter-spacing: 0.01em;
    line-height: 1.15;
}
.tile-sub {
    font-size: 10px;
    letter-spacing: var(--letter);
    text-transform: uppercase;
    opacity: 0.85;
}

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

/* ============= WORK DETAIL ============= */
.work {
    max-width: 1100px;
    margin: 0 auto;
    padding: 130px var(--gutter) 40px;
}
.work-head { text-align: center; margin-bottom: 48px; }
.work-head .eyebrow { margin-bottom: 14px; color: var(--ink-faint); }
.back-link {
    display: inline-block;
    margin-bottom: 28px;
    font-size: 11px;
    letter-spacing: var(--letter-wide);
    text-transform: uppercase;
    color: var(--ink-faint);
}
.back-link:hover { color: var(--ink); }
.work-title {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(32px, 5.5vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.015em;
    margin: 0 0 16px;
}
.work-meta {
    margin: 0;
    color: var(--ink-soft);
    font-size: 14px;
    letter-spacing: 0.03em;
}

.work-gallery { display: flex; flex-direction: column; gap: 14px; }
.work-shot {
    display: block;
    background: var(--bg-soft);
    overflow: hidden;
    cursor: zoom-in;
}
.work-shot img { width: 100%; height: auto; }
.work-shot.is-cover { /* titulní = velký */ }
/* detailní záběry pod titulním — do mřížky když je jich víc */
.work-gallery .work-shot:not(.is-cover) {
    /* zůstávají na plnou šířku pro maximální čitelnost */
}
@media (min-width: 760px) {
    .work-gallery {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .work-shot.is-cover { grid-column: 1 / -1; }
}

/* sdílení díla */
.work-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 48px;
}
.share-label {
    font-size: 10px;
    letter-spacing: var(--letter-wide);
    text-transform: uppercase;
    color: var(--ink-faint);
    margin-right: 4px;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--rule);
    border-radius: 50%;
    color: var(--ink-soft);
    background: none;
    position: relative;
    transition: color .25s ease, border-color .25s ease, background .25s ease;
}
.share-btn:hover { color: var(--bg); background: var(--ink); border-color: var(--ink); }
.share-copied {
    position: absolute;
    bottom: -26px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.share-copy.is-copied .share-copied { opacity: 1; }

.work-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 56px;
    padding-top: 28px;
    border-top: 1px solid var(--rule);
}
.work-nav-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 45%;
}
.work-nav-link.next { text-align: right; margin-left: auto; }
.wn-dir {
    font-size: 10px;
    letter-spacing: var(--letter-wide);
    text-transform: uppercase;
    color: var(--ink-faint);
}
.wn-title {
    font-family: var(--display);
    font-weight: 500;
    font-size: 17px;
    color: var(--ink);
}
.work-nav-link:hover .wn-title { color: var(--ink-soft); }

/* ============= ABOUT ============= */
.about { background: var(--bg-soft); max-width: none; }
.about-grid {
    max-width: var(--max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 1.8fr;
    gap: clamp(36px, 6vw, 88px);
    align-items: center;
}
.about-portrait img {
    width: 100%;
    max-width: 380px;
    filter: grayscale(0.1);
}
.about-text h2 { margin-top: 8px; }
.about-text p {
    font-size: clamp(16px, 1.3vw, 19px);
    line-height: 1.75;
    color: var(--ink);
    margin: 0 0 1em;
    font-weight: 300;
}
@media (max-width: 760px) {
    .about-grid { grid-template-columns: 1fr; }
    .about-portrait { display: flex; justify-content: center; }
}

/* ============= EXHIBITIONS ============= */
.exhibitions {
    max-width: var(--max);
    margin: 72px auto 0;
    padding-top: 56px;
    border-top: 1px solid var(--rule);
}
.exhibitions-head { margin-bottom: 28px; }
.exhibitions-head h3 {
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(24px, 3vw, 36px);
    margin: 8px 0 0;
    letter-spacing: -0.01em;
}
.exhibition-list {
    list-style: none;
    margin: 0;
    padding: 0;
    columns: 2;
    column-gap: clamp(32px, 5vw, 72px);
}
.exhibition-list li {
    break-inside: avoid;
    padding: 9px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 14px;
    line-height: 1.4;
    color: var(--ink-soft);
}
@media (max-width: 680px) { .exhibition-list { columns: 1; } }

/* ============= CONTACT ============= */
.contact {
    background: var(--bg-soft);
    text-align: center;
    max-width: none;
    padding: 110px var(--gutter) 130px;
}
.contact-inner { max-width: 760px; margin: 0 auto; }
.contact-headline {
    font-family: var(--display);
    font-weight: 500;
    margin: 14px 0 22px;
    letter-spacing: -0.015em;
}
.contact-note {
    font-size: clamp(15px, 1.4vw, 18px);
    color: var(--ink-soft);
    margin: 0 auto 48px;
    max-width: 540px;
    line-height: 1.6;
}
.contact-email {
    display: inline-block;
    margin: 16px auto 0;
    font-family: var(--display);
    font-weight: 500;
    font-size: clamp(26px, 4.5vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--ink);
    border-bottom: 1px solid var(--rule);
    padding-bottom: 6px;
    transition: color .35s ease, border-color .35s ease;
    word-break: break-word;
}
.contact-email:hover { color: var(--ink-soft); border-bottom-color: var(--ink); }

.contact-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 52px auto 38px;
    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;
    background: var(--ink);
    transform: rotate(45deg);
}

.contact-meta {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 52px;
}
.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(--display);
    font-weight: 500;
    font-size: 18px;
    color: var(--ink);
}
.contact-meta li > a:hover { color: var(--ink-soft); }
@media (max-width: 600px) {
    .contact-meta { flex-direction: column; gap: 24px; }
}

/* ============= FOOTER ============= */
.site-foot {
    border-top: 1px solid var(--rule);
    padding: 32px var(--gutter);
    margin-top: 0;
}
.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;
}

/* ============= mediaFace kreditní odznak (eye varianta) ============= */
.mfb, .mfb * { box-sizing: border-box; }
.mfb {
    --mfb-coral: #FF5C2E;
    --mfb-ink: #0E0E10;
    font-family: "Space Grotesk", system-ui, sans-serif;
    text-decoration: none;
    text-transform: none;       /* přebít uppercase patičky */
    letter-spacing: normal;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    line-height: 1;
    white-space: nowrap;
    transition: transform .2s ease, opacity .2s ease;
}
.mfb:hover { transform: translateY(-1px); }
.mfb .mfb-wm {
    font-weight: 700;
    font-size: 14px;
    letter-spacing: -0.03em;
    display: inline-flex;
    align-items: baseline;
    color: var(--mfb-ink);
}
.mfb .mfb-wm .f { color: var(--mfb-coral); }
.mfb--eye .ey {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--mfb-coral);
    position: relative;
    flex: none;
}
.mfb--eye .ey .p {
    position: absolute; inset: 0; margin: auto;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--mfb-ink);
    animation: mfb-eye 2.6s ease-in-out infinite;
}
@keyframes mfb-eye { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.7); opacity: .7; } }
@media (prefers-reduced-motion: reduce) { .mfb--eye .ey .p { animation: none; } }

/* ============= GLIGHTBOX OVERRIDES ============= */
.glightbox-clean .gslide-description { background: transparent; }
.glightbox-clean .gdesc-inner { padding: 16px 20px; }
.glightbox-clean .gslide-title { font-family: var(--display); font-weight: 500; }
.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; }
}
