/* =========================================================
   Oldřich Lajsek — galerijní prezentace
   Vizuální směr: teplý, tradiční memoriál. Pozadí a typografie
   ustupují do pozadí, barevným prvkem stránky jsou obrazy.
   ========================================================= */

:root {
    /* Papír, ne bílá — podklad starého katalogu */
    --paper: #f7f3ec;
    --paper-deep: #f1ebe0;
    --mat: #fffdf9;          /* pasparta pod obrazem */

    /* Uhlově hnědá místo černé — měkčí kontrast */
    --ink: #2b2620;
    --ink-soft: #5c5449;
    --muted: #857b6c;

    /* Tlumená bronz — rám obrazu */
    --gold: #b08d57;
    --gold-deep: #8d6e41;
    --line: #ded4c4;
    --line-soft: #e8e0d3;

    --serif-display: "Cormorant Garamond", "Georgia", serif;
    --serif-text: "Source Serif 4", "Georgia", serif;
    --sans-ui: "Inter", system-ui, sans-serif;

    --max-width: 1240px;
    --shadow-frame: 0 1px 2px rgba(43, 38, 32, 0.06),
                    0 8px 24px rgba(43, 38, 32, 0.09);
    --shadow-frame-hover: 0 2px 4px rgba(43, 38, 32, 0.08),
                          0 16px 40px rgba(43, 38, 32, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--serif-text);
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--ink);
    background-color: var(--paper);
    -webkit-font-smoothing: antialiased;
    /* Šířku drží viewport; rám ani textura nesmí vyvolat vodorovný posun. */
    overflow-x: hidden;
}

/* Plátnová textura: dlaždice 8×8 px v pevné velikosti, aby na mobilu
   nezhrubla do kostiček. Leží pod obsahem, takže nezasahuje do textu. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: url("../img/canvas-weave.svg");
    background-repeat: repeat;
    background-size: 8px 8px;
    opacity: 0.05;
}

.wrap {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
}

/* ================= Rám kolem obsahu =================
   Skutečný rám má víc vrstev: vnější bronzová linka, vnitřní vlasová
   a měkký vnitřní stín, který plochu opticky zapustí. */
.frame-shell {
    position: relative;
    max-width: calc(var(--max-width) + 96px);
    margin: 30px auto 0;
    border: 1px solid var(--gold);
    box-shadow: inset 0 0 0 4px var(--paper),
                inset 0 0 0 5px rgba(176, 141, 87, 0.38),
                inset 0 0 26px rgba(120, 94, 56, 0.07);
    background: rgba(255, 253, 249, 0.45);
}

/* Rohové ornamenty — jeden prvek, čtyři pozadí, žádné další requesty. */
.frame-corners {
    position: absolute;
    inset: 7px;
    pointer-events: none;
    background-image: url("../img/corner-tl.svg"), url("../img/corner-tr.svg"),
                      url("../img/corner-bl.svg"), url("../img/corner-br.svg");
    background-position: left top, right top, left bottom, right bottom;
    background-repeat: no-repeat;
    background-size: 36px 36px;
    opacity: 0.85;
}

/* ================= Štětcové oddělovače =================
   Tři varianty se střídají, aby opakování nepůsobilo jako razítko. */
.hero::after,
.page-title::after,
.section-heading::after {
    content: "";
    display: block;
    height: 12px;
    background-repeat: no-repeat;
    background-position: center;
    /* Šířka se přizpůsobí kontejneru, výška zůstává čitelná i na mobilu. */
    background-size: 100% 12px;
}

.hero::after {
    background-image: url("../img/brush-2.svg");
    margin: 72px auto 0;
    max-width: 62%;
}

.page-title::after {
    background-image: url("../img/brush-1.svg");
    width: 190px;
    margin: 20px auto 0;
}

.section-heading {
    position: relative;
    border-bottom: none;
}

.section-heading::after {
    background-image: url("../img/brush-3.svg");
    margin-top: 10px;
}

/* Střídání variant u opakovaných nadpisů na téže stránce */
.section-heading:nth-of-type(2n)::after { background-image: url("../img/brush-1.svg"); }
.section-heading:nth-of-type(3n)::after { background-image: url("../img/brush-2.svg"); }

a {
    color: var(--ink);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover { color: var(--gold-deep); }

h1, h2, h3 {
    font-family: var(--serif-display);
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.2;
    color: var(--ink);
    /* Dlouhá česká slova (Uměleckoprůmyslová…) se musí umět zalomit. */
    overflow-wrap: break-word;
    hyphens: auto;
}

img { max-width: 100%; }

h1 { font-size: 2.75rem; margin: 0 0 0.4em; }
h2 { font-size: 1.85rem; }

p { margin: 0 0 1.2em; }

.muted { color: var(--muted); }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--ink);
    color: var(--paper);
    padding: 10px 18px;
    z-index: 100;
}

.skip-link:focus { left: 0; }

::selection { background: rgba(176, 141, 87, 0.22); }

/* ================= Hlavička ================= */
.site-header {
    background: rgba(247, 243, 236, 0.94);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 30;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding-top: 22px;
    padding-bottom: 22px;
}

.brand { display: flex; flex-direction: column; line-height: 1.15; }

.brand-name {
    font-family: var(--serif-display);
    font-size: 1.5rem;
    letter-spacing: 0.04em;
}

.brand-years {
    font-family: var(--sans-ui);
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    color: var(--gold-deep);
    margin-top: 3px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Odkazy uvnitř .has-sub nejsou flex položky, takže by zůstaly inline
   a seděly o pár pixelů jinde než ostatní — proto explicitní blok. */
.main-nav > a,
.has-sub > a {
    display: block;
    font-family: var(--sans-ui);
    font-size: 0.78rem;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: var(--ink-soft);
    padding: 6px 0;
    border-bottom: 1px solid transparent;
}

.main-nav > a,
.has-sub,
.lang-switch { align-self: center; }

.main-nav > a:hover,
.has-sub > a:hover {
    color: var(--ink);
    border-bottom-color: var(--gold);
}

/* Rozbalovací podmenu */
.has-sub { position: relative; }

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: -18px;
    min-width: 215px;
    padding: 10px 0;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-frame);
    z-index: 40;
}

.has-sub:hover .submenu,
.has-sub:focus-within .submenu { display: block; }

.submenu a {
    display: block;
    padding: 9px 22px;
    font-family: var(--serif-text);
    font-size: 0.95rem;
    color: var(--ink-soft);
}

.submenu a:hover {
    background: var(--paper-deep);
    color: var(--gold-deep);
}

/* Přepínač jazyka */
.lang-switch {
    display: flex;
    gap: 8px;
    padding-left: 22px;
    border-left: 1px solid var(--line);
}

.lang-switch a {
    font-family: var(--sans-ui);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--muted);
    padding: 3px 5px;
}

.lang-switch a.active {
    color: var(--gold-deep);
    border-bottom: 1px solid var(--gold);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-toggle span {
    display: block;
    height: 1px;
    width: 100%;
    background: var(--ink);
}

/* ================= Hero ================= */
.hero {
    padding: 96px 0 0;
}

.hero-inner {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 72px;
    align-items: center;
}

/* Portrét v paspartě — jako zarámovaná fotografie */
.hero-portrait {
    background: var(--mat);
    padding: 16px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-frame);
}

.hero-portrait img {
    width: 100%;
    display: block;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 400;
    margin: 0 0 6px;
}

.hero-sub {
    font-family: var(--sans-ui);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--gold-deep);
    margin-bottom: 34px;
}

/* Motto místo agresivní výzvy k akci */
.hero-motto {
    font-family: var(--serif-display);
    font-size: 1.5rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--ink-soft);
    margin: 0 0 18px;
    padding-left: 26px;
    border-left: 2px solid var(--gold);
}

.hero-motto-source {
    font-family: var(--sans-ui);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding-left: 28px;
    margin-bottom: 36px;
}

/* ================= Tlačítka ================= */
.btn {
    display: inline-block;
    font-family: var(--sans-ui);
    padding: 13px 32px;
    border: 1px solid var(--gold);
    color: var(--gold-deep);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.16em;
    background: transparent;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}

.btn:hover {
    background: var(--gold);
    color: #fff;
}

.btn-quiet {
    border-color: var(--line);
    color: var(--ink-soft);
}

.btn-quiet:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
}

/* ================= Obecná stránka ================= */
.page { padding: 72px 40px 90px; }

.page-narrow { max-width: 780px; }

.page-title {
    text-align: center;
    margin-bottom: 8px;
}

.page-lead {
    text-align: center;
    color: var(--muted);
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0 auto 56px;
}

.section-heading {
    font-family: var(--sans-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--muted);
    margin: 56px 0 24px;
}

.prose p { text-align: justify; hyphens: auto; }

.prose p:first-of-type::first-letter {
    font-family: var(--serif-display);
    font-size: 3.4rem;
    line-height: 0.9;
    float: left;
    margin: 6px 10px 0 0;
    color: var(--gold-deep);
}

/* Poznámka u nepřeloženého obsahu */
.translation-note {
    font-family: var(--sans-ui);
    font-size: 0.82rem;
    color: var(--muted);
    background: var(--paper-deep);
    border-left: 2px solid var(--gold);
    padding: 12px 18px;
    margin-bottom: 32px;
}

.list-plain { list-style: none; padding: 0; margin: 0; }

.list-plain li {
    padding: 18px 0;
    border-bottom: 1px solid var(--line-soft);
}

/* ================= Rozcestníkové dlaždice ================= */
.section-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    padding: 64px 40px 80px;
}

.tile {
    border: 1px solid var(--line);
    background: rgba(255, 253, 249, 0.6);
    padding: 34px 30px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.tile:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-frame);
    transform: translateY(-2px);
}

.tile h2 {
    font-size: 1.3rem;
    margin: 0 0 10px;
}

.tile p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* ================= Sály výstavy =================
   Rozcestník na domovské stránce jako expoziční tabule: římské číslo
   sálu na štítku, kresebná ikona a tenký bronzový rám v duchu rámu
   kolem obsahu. */
.halls {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
    padding: 64px 40px 96px;
    align-items: start;
}

.hall {
    position: relative;
    display: block;
    padding: 46px 26px 30px;
    background: rgba(255, 253, 249, 0.72);
    border: 1px solid var(--line);
    box-shadow: inset 0 0 0 3px var(--paper),
                inset 0 0 0 4px rgba(176, 141, 87, 0.28);
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

/* Salonní zavěšení: mírně nestejné výšky, žádný pravidelný vzorec. */
.hall:nth-child(1) { transform: translateY(18px); }
.hall:nth-child(2) { transform: translateY(-9px); }
.hall:nth-child(3) { transform: translateY(26px); }
.hall:nth-child(4) { transform: translateY(-3px); }

.hall:hover {
    border-color: var(--gold);
    box-shadow: inset 0 0 0 3px var(--paper),
                inset 0 0 0 4px rgba(176, 141, 87, 0.5),
                var(--shadow-frame);
}

.hall:nth-child(1):hover { transform: translateY(14px); }
.hall:nth-child(2):hover { transform: translateY(-13px); }
.hall:nth-child(3):hover { transform: translateY(22px); }
.hall:nth-child(4):hover { transform: translateY(-7px); }

/* Číslo sálu jako muzejní štítek */
.hall-num {
    position: absolute;
    top: 14px;
    left: 14px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif-display);
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    color: var(--gold-deep);
    border: 1px solid rgba(176, 141, 87, 0.45);
}

.hall-icon {
    display: block;
    width: 38px;
    height: 38px;
    margin: 0 0 18px;
    color: var(--gold);
    opacity: 0.9;
}

.hall:hover .hall-icon { opacity: 1; }

.hall h2 {
    font-size: 1.28rem;
    margin: 0 0 10px;
}

.hall p {
    margin: 0;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.6;
}

/* ================= Galerie obrazů ================= */
.filters {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 60px;
    scrollbar-width: none;
    font-family: var(--sans-ui);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.filters a {
    color: var(--muted);
    padding-bottom: 6px;
    border-bottom: 1px solid transparent;
}

.filters a.active,
.filters a:hover {
    color: var(--gold-deep);
    border-bottom-color: var(--gold);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 56px 44px;
}

/* Pasparta + rám: obraz nikdy nevyplňuje plochu na doraz */
.gallery-item .frame {
    background: var(--mat);
    padding: 18px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-frame);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.gallery-item:hover .frame {
    box-shadow: var(--shadow-frame-hover);
    transform: translateY(-3px);
}

.gallery-item img {
    width: 100%;
    height: 310px;
    object-fit: contain;
    display: block;
}

.gallery-item-info {
    padding: 18px 4px 0;
    text-align: center;
}

.gallery-item-info h2 {
    font-size: 1.15rem;
    margin: 0 0 4px;
    font-weight: 400;
}

.gallery-item-code {
    font-family: var(--sans-ui);
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

/* Upozornění, že web ukazuje jen část díla — zbytek eviduje katalog. */
.gallery-note {
    max-width: 660px;
    margin: -22px auto 46px;
    padding: 22px 28px;
    text-align: center;
    background: rgba(255, 253, 249, 0.6);
    border-top: 1px solid rgba(176, 141, 87, 0.35);
    border-bottom: 1px solid rgba(176, 141, 87, 0.35);
}

.gallery-note p {
    margin: 0 0 16px;
    color: var(--ink-soft);
    font-size: 0.98rem;
}

.gallery-note .btn {
    padding: 10px 24px;
    font-size: 0.7rem;
}

/* ================= Detail obrazu ================= */
.painting-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(280px, 0.9fr);
    gap: 64px;
    align-items: start;
    margin-top: 16px;
}

.painting-image {
    background: var(--mat);
    padding: 26px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-frame);
}

.painting-image img {
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    display: block;
}

/* Informace v postranním panelu, ne přes celou šířku */
.painting-info {
    position: sticky;
    top: 120px;
}

.painting-info h1 {
    font-size: 2.1rem;
    margin-bottom: 6px;
}

.painting-category {
    font-family: var(--sans-ui);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--gold-deep);
    margin-bottom: 26px;
}

.painting-meta {
    margin: 0 0 30px;
    border-top: 1px solid var(--line-soft);
}

.painting-meta div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 0;
    border-bottom: 1px solid var(--line-soft);
}

.painting-meta dt {
    font-family: var(--sans-ui);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.painting-meta dd {
    margin: 0;
    text-align: right;
}

.back-link {
    display: inline-block;
    margin-bottom: 26px;
    font-family: var(--sans-ui);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.related { margin-top: 96px; }

.related .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 34px;
}

.related .gallery-item img { height: 200px; }

/* ================= Životopis ================= */
.bio-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 64px;
    align-items: start;
}

.bio-figures figure {
    margin: 0 0 30px;
}

.bio-figures img {
    width: 100%;
    display: block;
    background: var(--mat);
    padding: 10px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-frame);
}

.bio-figures figcaption {
    font-family: var(--sans-ui);
    font-size: 0.78rem;
    color: var(--muted);
    margin-top: 10px;
    line-height: 1.5;
}

.subnav {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 44px;
    font-family: var(--sans-ui);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.subnav a {
    color: var(--muted);
    padding-bottom: 6px;
    border-bottom: 1px solid transparent;
}

.subnav a.active,
.subnav a:hover {
    color: var(--gold-deep);
    border-bottom-color: var(--gold);
}

/* ================= Katalog =================
   Náhled leží na desce stolu: mírné natočení a měkký široký stín,
   který se rozlévá pod objektem — ne stín zavěšeného obrazu. */
.catalog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 68px;
    align-items: center;
    margin-top: 22px;
}

.catalog-plate {
    margin: 0;
    padding: 14px;
    background: var(--mat);
    border: 1px solid var(--gold);
    box-shadow: inset 0 0 0 3px var(--paper),
                inset 0 0 0 4px rgba(176, 141, 87, 0.3),
                0 18px 42px -14px rgba(60, 46, 28, 0.42);
    transform: rotate(-2.4deg);
    transform-origin: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.catalog-plate:hover {
    transform: rotate(-1.2deg);
    box-shadow: inset 0 0 0 3px var(--paper),
                inset 0 0 0 4px rgba(176, 141, 87, 0.45),
                0 22px 52px -14px rgba(60, 46, 28, 0.48);
}

.catalog-plate img {
    display: block;
    width: 100%;
    height: auto;
}

.catalog-note p {
    color: var(--ink-soft);
}

.catalog-facts {
    display: flex;
    gap: 44px;
    margin: 28px 0;
    padding: 18px 0;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
}

.catalog-facts div { display: block; }

.catalog-facts dt {
    font-family: var(--sans-ui);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    margin-bottom: 6px;
}

.catalog-facts dd {
    margin: 0;
    font-family: var(--serif-display);
    font-size: 1.9rem;
    line-height: 1;
    color: var(--gold-deep);
}

.catalog-hint {
    font-size: 0.93rem;
    color: var(--muted);
    margin-bottom: 26px;
}

/* ================= Citáty a výstavy ================= */
/* ================= Citáty ================= */
.quote {
    position: relative;
    margin: 0 0 46px;
    padding-left: 34px;
    border-left: 2px solid var(--gold);
}

/* Velká uvozovka jako vodoznak za začátkem textu.
   Glyf „ má inkoust u účaří, proto se posouvá o celou výšku nahoru,
   aby seděl v horním rohu bloku a ne uprostřed textu. */
.quote-mark {
    position: absolute;
    top: -0.78em;
    left: 14px;
    z-index: 0;
    font-family: var(--serif-display);
    font-size: 7rem;
    line-height: 1;
    color: var(--gold);
    opacity: 0.2;
    pointer-events: none;
    user-select: none;
}

.quote blockquote {
    position: relative;
    z-index: 1;
    margin: 0 0 14px;
    font-family: var(--serif-display);
    font-size: 1.32rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--ink-soft);
}

/* Sudé citace mírně odsazené, ať nestojí v tuhé koloně */
.quote:nth-of-type(even) { margin-left: 7%; }

.quote figcaption {
    position: relative;
    z-index: 1;
    font-family: var(--sans-ui);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
}

/* Podpisová čárka nad jménem autora */
.quote-rule {
    display: block;
    width: 48px;
    height: 6px;
    margin-bottom: 11px;
    background-image: url("../img/brush-thin-2.svg");
    background-repeat: no-repeat;
    background-size: 100% 6px;
    opacity: 0.85;
}

/* Nadechnutí po každých dvou citacích — jemnější než předěl sekcí */
.quote-break {
    display: block;
    height: 6px;
    max-width: 210px;
    margin: 4px auto 42px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 6px;
    opacity: 0.5;
}

.quote-break.brush-a { background-image: url("../img/brush-thin-1.svg"); }
.quote-break.brush-b { background-image: url("../img/brush-thin-2.svg"); }
.quote-break.brush-c { background-image: url("../img/brush-thin-3.svg"); }

/* ================= Publikace =================
   Kompaktní bibliografie — záměrně tišší než citáty. */
.publications {
    padding: 26px 30px 10px;
    background: rgba(255, 253, 249, 0.55);
    border: 1px solid var(--line-soft);
}

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

.publications li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 0 0 18px;
    font-size: 0.93rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

.pub-figure {
    flex: 0 0 auto;
    color: var(--gold);
    opacity: 0.85;
}

.pub-icon {
    display: block;
    width: 21px;
    height: 21px;
    margin-top: 2px;
}

/* ================= Odkazy ================= */
.link-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.link-item { border-bottom: 1px solid var(--line-soft); }

.link-item a {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 4px;
}

.link-figure {
    flex: 0 0 auto;
    color: var(--gold);
    opacity: 0.9;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.link-icon {
    display: block;
    width: 30px;
    height: 30px;
}

.link-item a:hover .link-figure { opacity: 1; transform: translateY(-1px); }

.link-text {
    position: relative;
    /* Nesmí vyplnit celý řádek — tah pod textem má kopírovat jeho šířku.
       Šipku odsune doprava automatický margin. */
    flex: 0 1 auto;
    margin-right: auto;
    padding-bottom: 5px;
    color: var(--ink);
    transition: color 0.25s ease;
}

.link-item a:hover .link-text { color: var(--gold-deep); }

/* Štětcový tah místo podtržení: kreslí se zleva doprava. */
.link-text::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 6px;
    background-repeat: no-repeat;
    background-position: left bottom;
    background-size: 0% 100%;
    transition: background-size 280ms ease, opacity 280ms ease;
}

.link-item a.brush-a .link-text::after { background-image: url("../img/brush-thin-1.svg"); }
.link-item a.brush-b .link-text::after { background-image: url("../img/brush-thin-2.svg"); }
.link-item a.brush-c .link-text::after { background-image: url("../img/brush-thin-3.svg"); }

.link-item a:hover .link-text::after,
.link-item a:focus-visible .link-text::after { background-size: 100% 100%; }

.link-arrow {
    flex: 0 0 auto;
    color: var(--gold);
    opacity: 0.65;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.external-arrow {
    display: block;
    width: 15px;
    height: 15px;
}

.link-item a:hover .link-arrow {
    opacity: 1;
    transform: translate(2px, -2px);
}

.link-desc { margin: -8px 0 16px 50px; font-size: 0.9rem; }

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

/* Dotyková zařízení hover nemají — tah je vidět trvale, jen tlumeně,
   a dotyk ho rozsvítí naplno. */
@media (hover: none) {
    .link-text::after { background-size: 100% 100%; opacity: 0.38; }
    .link-item a:active .link-text::after { opacity: 1; }
    .link-item a:active .link-text { color: var(--gold-deep); }
}

/* ================= Výstavy jako cesta =================
   Každá kategorie má vlastní timeline; svislice je SVG s jemně
   nepravidelným tahem, aby ladila se štětcovými oddělovači. */
.timeline-heading { margin-top: 72px; }
.timeline-heading:first-of-type { margin-top: 32px; }

.timeline {
    position: relative;
    list-style: none;
    max-width: 880px;
    margin: 0 auto;
    padding: 6px 0 10px;
}

/* Samotná linka — začíná u prvního a končí u posledního milníku. */
.timeline::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 50%;
    width: 12px;
    margin-left: -6px;
    background-image: url("../img/timeline-line.svg");
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

/* Zmínka pod hlavní cestou: výstavy, kterých je ve skupině jen jedna
   a samostatná timeline by pro ně byla příliš velké gesto. */
.exhibition-mentions {
    max-width: 880px;
    margin: 72px auto 0;
    padding-top: 26px;
    background-image: url("../img/brush-2.svg");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: 100% 12px;
}

.exhibition-mentions dl {
    margin: 0;
    display: grid;
    gap: 16px;
}

.exhibition-mentions div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 10px 28px;
    align-items: baseline;
}

.exhibition-mentions dt {
    font-family: var(--sans-ui);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    text-align: right;
}

.exhibition-mentions dd {
    margin: 0;
    font-size: 0.98rem;
    color: var(--ink-soft);
}

/* Jediná položka nepotřebuje linku — zůstal by z ní jen pahýl. */
.timeline-single::before { display: none; }

.timeline-single .timeline-item {
    width: 100%;
    padding: 0;
    text-align: center;
}

.timeline-single .timeline-dot {
    position: static;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 46px 34px 0;
    text-align: right;
}

/* Střídání stran oživuje cestu; na mobilu se ruší. */
.timeline-item:nth-child(even) {
    margin-left: 50%;
    padding: 0 0 34px 46px;
    text-align: left;
}

.timeline-item:last-child { padding-bottom: 6px; }

/* Kompas putující po ose (pozici řídí JS přes transform).
   Výchozí stav je skrytý, takže bez JS se nic neukáže. */
.timeline-marker {
    position: absolute;
    top: 0;
    left: 50%;
    z-index: 2;
    width: 26px;
    height: 26px;
    opacity: 0;
    pointer-events: none;
    background-image: url("../img/compass.svg");
    background-repeat: no-repeat;
    background-size: 100% 100%;
    transform: translate(-50%, -50%);
    will-change: transform;
    transition: opacity 0.4s ease;
}

.timeline-single .timeline-marker { display: none; }

/* Milník: tenký kroužek, ne plná výplň */
.timeline-dot {
    position: absolute;
    top: 7px;
    right: -6px;
    width: 11px;
    height: 11px;
    border: 1px solid var(--gold);
    border-radius: 50%;
    background: var(--paper);
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.timeline-item:nth-child(even) .timeline-dot { right: auto; left: -6px; }

.timeline-item:hover .timeline-dot {
    background: var(--gold);
    border-color: var(--gold-deep);
    transform: scale(1.25);
}

.timeline-year {
    display: block;
    font-family: var(--sans-ui);
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    color: var(--gold-deep);
    margin-bottom: 3px;
}

.timeline-place {
    font-family: var(--serif-display);
    font-size: 1.22rem;
    color: var(--ink);
    transition: color 0.25s ease;
}

.timeline-item:hover .timeline-place { color: var(--gold-deep); }

.timeline-desc {
    margin: 4px 0 0;
    font-size: 0.93rem;
    color: var(--muted);
}

/* ================= Formulář ================= */
.contact-intro {
    color: var(--ink-soft);
    margin-bottom: 36px;
}

.contact-form .form-row {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin-bottom: 8px;
    font-family: var(--sans-ui);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.contact-form input,
.contact-form textarea {
    padding: 13px 16px;
    border: 1px solid var(--line);
    background: var(--mat);
    font-family: var(--serif-text);
    font-size: 1rem;
    color: var(--ink);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.field-error {
    color: #9c3a2e;
    font-size: 0.85rem;
    margin: 6px 0 0;
}

.messages { margin: 26px auto 0; }

.message {
    padding: 14px 20px;
    background: var(--mat);
    border-left: 2px solid var(--gold);
    font-family: var(--sans-ui);
    font-size: 0.9rem;
}

/* ================= Patička ================= */
.site-footer {
    margin-top: 110px;
    padding: 56px 0 44px;
    border-top: 1px solid var(--line);
    background: var(--paper-deep);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    text-align: center;
}

/* Autorův podpis jako opakující se motiv. Vektorová stopa vytažená
   z fotografie podpisu — plná barva, ostrá v každé velikosti. */
.footer-signature img {
    height: 56px;
    width: auto;
}

.footer-years {
    font-family: var(--sans-ui);
    font-size: 0.7rem;
    letter-spacing: 0.24em;
    color: var(--gold-deep);
    margin: 10px 0 0;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    font-family: var(--sans-ui);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.footer-nav a { color: var(--ink-soft); }

.footer-note {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0;
}

/* ================= Responzivita =================
   Desktop je pro prohlížení galerie prioritní; níže se layout
   zjednodušuje, ale pasparty a prostor kolem děl zůstávají. */
@media (max-width: 1080px) {
    .catalog-layout { grid-template-columns: 1fr; gap: 44px; }
    .catalog-plate { transform: rotate(-1.6deg); max-width: 640px; }
    .catalog-plate:hover { transform: rotate(-0.8deg); }

    .halls { grid-template-columns: repeat(2, 1fr); gap: 22px; padding-bottom: 72px; }
    .hall:nth-child(1) { transform: translateY(12px); }
    .hall:nth-child(2) { transform: translateY(-6px); }
    .hall:nth-child(3) { transform: translateY(12px); }
    .hall:nth-child(4) { transform: translateY(-6px); }
    .hall:nth-child(1):hover, .hall:nth-child(3):hover { transform: translateY(8px); }
    .hall:nth-child(2):hover, .hall:nth-child(4):hover { transform: translateY(-10px); }

    .hero-inner { grid-template-columns: 320px 1fr; gap: 48px; }
    .hero h1 { font-size: 3.2rem; }
    .painting-detail-grid { grid-template-columns: 1fr; gap: 40px; }
    .painting-info { position: static; }
    .bio-layout { grid-template-columns: 1fr; gap: 44px; }
    .bio-figures {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 860px) {
    /* Na úzké ploše natočení ruší a stín působí těžce — obojí utlumit. */
    .catalog-plate {
        transform: none;
        padding: 9px;
        box-shadow: inset 0 0 0 2px var(--paper),
                    inset 0 0 0 3px rgba(176, 141, 87, 0.3),
                    0 9px 20px -10px rgba(60, 46, 28, 0.34);
    }

    .catalog-plate:hover { transform: none; }
    .catalog-layout { gap: 32px; }
    .catalog-facts { gap: 32px; margin: 22px 0; }
    .catalog-facts dd { font-size: 1.6rem; }

    /* Pod sebou by salonní posun jen mátl — karty srovnat do řady. */
    .halls {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 44px 20px 64px;
    }

    .hall,
    .hall:hover,
    .hall:nth-child(1), .hall:nth-child(2),
    .hall:nth-child(3), .hall:nth-child(4),
    .hall:nth-child(1):hover, .hall:nth-child(2):hover,
    .hall:nth-child(3):hover, .hall:nth-child(4):hover {
        transform: none;
    }

    .hall { padding: 42px 22px 26px; }

    .wrap { padding: 0 20px; }
    .page { padding: 44px 20px 60px; }
    .section-links { padding: 44px 20px; gap: 20px; }

    /* Rám by na mobilu ukrajoval šířku, kterou potřebují obrazy —
       zůstává jen textura a horní bronzová linka jako ozvěna rámu. */
    .frame-shell {
        margin: 0;
        border: none;
        border-top: 1px solid var(--gold);
        box-shadow: none;
        background: transparent;
    }

    .frame-corners { display: none; }

    .nav-toggle { display: flex; width: 44px; height: 44px; margin-right: -6px; }
    .header-inner { flex-wrap: wrap; gap: 12px; }

    .main-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        padding: 10px 0;
        border-top: 1px solid var(--line-soft);
        margin-top: 12px;
    }

    .main-nav.open { display: flex; }
    .main-nav > a, .has-sub { width: 100%; }

    /* Dotykové cíle nejméně 44 px na výšku */
    .main-nav > a,
    .has-sub > a,
    .submenu a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 6px 2px;
    }

    .submenu {
        display: block;
        position: static;
        border: none;
        border-left: 1px solid var(--line);
        box-shadow: none;
        background: transparent;
        padding: 0 0 6px 16px;
        margin-left: 2px;
        min-width: 0;
    }

    .lang-switch {
        padding: 6px 0 0;
        border-left: none;
        border-top: 1px solid var(--line-soft);
        width: 100%;
        margin-top: 6px;
    }

    .lang-switch a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 0 12px 0 2px;
    }

    .hero { padding: 48px 0 0; }
    .hero::after { margin: 40px auto 0; max-width: 80%; }
    .hero-inner { grid-template-columns: 1fr; gap: 32px; }
    .hero-portrait { max-width: 290px; }
    .hero h1 { font-size: 2.5rem; }
    .hero-sub { letter-spacing: 0.16em; margin-bottom: 26px; }
    .hero-motto { font-size: 1.2rem; padding-left: 18px; }
    .hero-motto-source { padding-left: 20px; }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    /* Pohodlné čtení dlouhých textů bez zoomování */
    body { font-size: 1.0625rem; line-height: 1.8; }
    .prose p { text-align: left; hyphens: none; }
    .prose p:first-of-type::first-letter { font-size: 2.8rem; }
    .page-lead { margin-bottom: 40px; }

    /* Filtr kategorií: vodorovný posun místo rozbitého zalamování */
    .gallery-note {
        margin: -10px 0 34px;
        padding: 18px 20px;
    }

    .filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 22px;
        margin: 0 -20px 40px;
        padding: 0 20px 8px;
        -webkit-overflow-scrolling: touch;
    }

    .filters::-webkit-scrollbar { display: none; }
    .filters a { flex: 0 0 auto; min-height: 44px; display: flex; align-items: center; }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        gap: 36px 20px;
    }

    .gallery-item img { height: 250px; }
    .gallery-item .frame { padding: 12px; }
    .painting-image { padding: 14px; }
    .painting-image img { max-height: none; }
    .painting-info h1 { font-size: 1.7rem; }
    .related { margin-top: 64px; }
    .related .gallery-item img { height: 180px; }

    /* Na úzké ploše vše vpravo od linky, žádné střídání stran. */
    .timeline { max-width: none; }
    .timeline::before { left: 5px; margin-left: 0; width: 9px; }

    .timeline-item,
    .timeline-item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding: 0 0 26px 30px;
        text-align: left;
    }

    .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 1px;
        right: auto;
        top: 6px;
        width: 9px;
        height: 9px;
    }

    .timeline-heading { margin-top: 52px; }

    /* Na mobilu je osa vlevo (left 5px, šířka 9px) — střed tedy 9.5px. */
    .timeline-marker {
        left: 9.5px;
        width: 20px;
        height: 20px;
    }

    .exhibition-mentions { margin-top: 52px; }
    .exhibition-mentions div { grid-template-columns: 1fr; gap: 3px; }
    .exhibition-mentions dt { text-align: left; }
    .timeline-place { font-size: 1.1rem; }

    .quote { padding-left: 20px; margin-bottom: 38px; }
    .quote:nth-of-type(even) { margin-left: 0; }   /* žádné odsazení na mobilu */
    .quote blockquote { font-size: 1.15rem; }
    .quote-mark { font-size: 4.4rem; top: -0.74em; left: 8px; }
    .quote-break { max-width: 150px; margin-bottom: 34px; }

    .publications { padding: 20px 18px 6px; }
    .publications li { gap: 11px; font-size: 0.9rem; }
    .pub-icon { width: 18px; height: 18px; }

    .link-item a { gap: 14px; padding: 16px 2px; }
    .link-icon { width: 24px; height: 24px; }
    .external-arrow { width: 13px; height: 13px; }
    .link-desc { margin-left: 38px; }

    .site-footer { margin-top: 72px; padding: 44px 0 36px; }
    .footer-nav { gap: 18px 22px; }
    .footer-nav a { min-height: 44px; display: flex; align-items: center; }
}

/* Telefony na výšku — jeden sloupec, ať dílo není zbytečně malé */
@media (max-width: 560px) {
    .gallery-grid { grid-template-columns: 1fr; gap: 32px; }
    .gallery-item img { height: 300px; }
    .related .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .related .gallery-item img { height: 140px; }
    .section-links { grid-template-columns: 1fr; }
    .subnav { gap: 20px; }
    .subnav a { min-height: 44px; display: flex; align-items: center; }
}

/* Nejužší zařízení (320 px) */
@media (max-width: 380px) {
    .wrap { padding: 0 16px; }
    .page { padding: 36px 16px 52px; }
    .section-links { padding: 36px 16px; }
    .filters { margin: 0 -16px 32px; padding: 0 16px 8px; }
    .hero h1 { font-size: 2.1rem; }
    h1 { font-size: 1.75rem; }
    .brand-name { font-size: 1.25rem; }
    .gallery-item img { height: 250px; }
    .painting-meta div { flex-direction: column; gap: 2px; }
    .painting-meta dd { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
    .tile:hover, .gallery-item:hover .frame { transform: none; }
    /* Putující kompas je čistá dekorace — při omezení pohybu mizí,
       osa i milníky zůstávají beze změny. */
    .timeline-marker { display: none !important; }
}
