/* =========================================================
   zmiloscidosztuki.pl — styl
   Estetyka: muzealny, edytorski. Kremowy papier, atrament, akcent szafranowy.
   ========================================================= */

:root {
    --paper: #f3ede2;
    --paper-deep: #e8e0d0;
    --ink: #1a1814;
    --ink-soft: #3d3a33;
    --muted: #7a7368;
    --line: #c9beac;
    --accent: #b8451f;       /* terakota / szafran */
    --accent-deep: #8a3216;
    --hi: #faf6ec;

    --serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
    --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;

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

* { -webkit-font-smoothing: antialiased; }

html, body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 400;
}

body {
    background-image:
        radial-gradient(at 100% 0%, rgba(184,69,31,.05), transparent 50%),
        radial-gradient(at 0% 100%, rgba(26,24,20,.04), transparent 60%);
    overflow-x: hidden;
}

/* Subtelna tekstura ziarna na całym tle */
body::before {
    content: "";
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: .35;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.85' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 0 0.12'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    mix-blend-mode: multiply;
}

body > * { position: relative; z-index: 2; }

::selection { background: var(--ink); color: var(--paper); }

a { color: var(--ink); }
a:hover { color: var(--accent); }

/* === HEADER === */
.site-header {
    border-bottom: 1px solid var(--line);
    background: rgba(243, 237, 226, .85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: sticky; top: 0;
    z-index: 50;
}

.brand {
    text-decoration: none;
    display: inline-flex; align-items: baseline; gap: .65rem;
    color: var(--ink);
}
.brand-mark {
    font-family: var(--serif);
    font-style: italic;
    font-size: 2.2rem;
    line-height: 1;
    color: var(--accent);
    transform: translateY(.15rem);
}
.brand-name {
    font-family: var(--serif);
    font-size: 1.35rem;
    letter-spacing: .01em;
    line-height: 1;
}
.brand-name em { font-style: italic; color: var(--ink-soft); }

.nav-list { list-style: none; padding: 0; }
.nav-link-art {
    text-decoration: none;
    font-family: var(--sans);
    font-size: .92rem;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-soft);
    position: relative;
    padding-bottom: .25rem;
    transition: color .3s var(--ease-art);
}
.nav-link-art::after {
    content: "";
    position: absolute; left: 0; bottom: 0;
    width: 0; height: 1px; background: var(--accent);
    transition: width .35s var(--ease-art);
}
.nav-link-art:hover { color: var(--ink); }
.nav-link-art:hover::after { width: 100%; }

.btn-ghost {
    background: none; border: 1px solid var(--line);
    width: 44px; height: 44px;
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    padding: 0 10px;
}
.btn-ghost span { display: block; height: 1px; background: var(--ink); }

.offcanvas-art { background: var(--paper); color: var(--ink); }

/* === HERO === */
.hero {
    padding: clamp(4rem, 10vw, 9rem) 0 clamp(3rem, 6vw, 6rem);
    overflow: hidden;
}
.hero-eyebrow {
    font-family: var(--mono);
    font-size: .8rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--accent);
    display: inline-flex; align-items: center; gap: .85rem;
}
.hero-eyebrow::before {
    content: ""; display: inline-block;
    width: 36px; height: 1px; background: var(--accent);
}
.hero-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(3rem, 9vw, 7.5rem);
    line-height: .96;
    letter-spacing: -.02em;
    margin: 1.5rem 0 2rem;
}
.hero-title em {
    font-style: italic;
    color: var(--accent);
    font-weight: 300;
}
.hero-lead {
    font-family: var(--serif);
    font-size: clamp(1.15rem, 1.6vw, 1.5rem);
    line-height: 1.55;
    color: var(--ink-soft);
    max-width: 42ch;
    font-weight: 400;
}

.hero-meta {
    border-top: 1px solid var(--line);
    padding-top: 1.5rem;
    margin-top: 3rem;
    display: flex; flex-wrap: wrap; gap: 2.5rem;
}
.meta-item .num {
    font-family: var(--serif);
    font-size: 2.4rem;
    line-height: 1;
    display: block;
    color: var(--ink);
}
.meta-item .lbl {
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: .35rem;
    display: block;
}

/* === SECTION TYPO === */
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-label {
    font-family: var(--mono);
    font-size: .8rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent);
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: 1.25rem;
}
.section-label::before {
    content: ""; width: 28px; height: 1px; background: var(--accent);
}
.section-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: -.015em;
    margin-bottom: 2.5rem;
}
.section-title em { font-style: italic; color: var(--accent); }

/* === GALLERY GRID === */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: clamp(1.25rem, 2.5vw, 2.5rem) clamp(1rem, 2vw, 2rem);
}

/* Każdy slot ma inny rozmiar - asymetryczny rytm */
.art-card { display: block; text-decoration: none; color: inherit; }
.art-card:hover { color: inherit; }

.art-card:nth-child(9n+1) { grid-column: span 7; }
.art-card:nth-child(9n+2) { grid-column: span 5; margin-top: 4rem; }
.art-card:nth-child(9n+3) { grid-column: span 4; }
.art-card:nth-child(9n+4) { grid-column: span 5; margin-top: 6rem; }
.art-card:nth-child(9n+5) { grid-column: span 3; }
.art-card:nth-child(9n+6) { grid-column: span 6; margin-top: 3rem; }
.art-card:nth-child(9n+7) { grid-column: span 6; }
.art-card:nth-child(9n+8) { grid-column: span 4; margin-top: 5rem; }
.art-card:nth-child(9n+9) { grid-column: span 8; }

@media (max-width: 991px) {
    .art-card,
    .art-card:nth-child(9n+1),
    .art-card:nth-child(9n+2),
    .art-card:nth-child(9n+3),
    .art-card:nth-child(9n+4),
    .art-card:nth-child(9n+5),
    .art-card:nth-child(9n+6),
    .art-card:nth-child(9n+7),
    .art-card:nth-child(9n+8),
    .art-card:nth-child(9n+9) { grid-column: span 6; margin-top: 0; }
}
@media (max-width: 575px) {
    .gallery-grid { gap: 2.5rem 1rem; }
    .art-card,
    .art-card:nth-child(n) { grid-column: span 12; }
}

.art-frame {
    position: relative;
    overflow: hidden;
    background: var(--paper-deep);
    aspect-ratio: 4 / 3;
}
.art-card:nth-child(3n+1) .art-frame { aspect-ratio: 4 / 5; }
.art-card:nth-child(3n+2) .art-frame { aspect-ratio: 1 / 1; }
.art-card:nth-child(3n)   .art-frame { aspect-ratio: 5 / 4; }

.art-frame img,
.art-frame svg {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 1.4s var(--ease-art), filter 1s var(--ease-art);
    filter: saturate(.96);
}
.art-card:hover .art-frame img,
.art-card:hover .art-frame svg {
    transform: scale(1.04);
    filter: saturate(1.05);
}

.art-frame::after {
    content: "→ Zobacz";
    position: absolute;
    bottom: 1.1rem; right: 1.1rem;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    padding: .55rem .9rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .4s var(--ease-art), transform .4s var(--ease-art);
}
.art-card:hover .art-frame::after { opacity: 1; transform: translateY(0); }

.art-caption {
    padding-top: 1rem;
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 1rem;
    border-top: 1px solid var(--line);
    margin-top: 1rem;
}
.art-caption .left { flex: 1; }
.art-author {
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    display: block;
    margin-bottom: .35rem;
}
.art-title {
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.55rem;
    line-height: 1.15;
    font-weight: 400;
    color: var(--ink);
}
.art-year {
    font-family: var(--mono);
    font-size: .85rem;
    color: var(--muted);
    white-space: nowrap;
}

/* === ARTYŚCI === */
.authors-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}
.author-tile {
    background: var(--paper);
    padding: 2rem 1.75rem;
    text-decoration: none;
    color: var(--ink);
    display: flex; flex-direction: column; justify-content: space-between;
    min-height: 200px;
    transition: background .35s var(--ease-art), color .35s var(--ease-art);
}
.author-tile:hover { background: var(--ink); color: var(--paper); }
.author-tile:hover .author-tile-num { color: var(--accent); }
.author-tile:hover .author-tile-arrow { transform: translateX(8px); color: var(--accent); }

.author-tile-num {
    font-family: var(--mono);
    font-size: .8rem;
    color: var(--muted);
    letter-spacing: .12em;
}
.author-tile-name {
    font-family: var(--serif);
    font-size: 1.85rem;
    line-height: 1.05;
    font-weight: 400;
    margin: .75rem 0 .5rem;
}
.author-tile-meta {
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    opacity: .7;
}
.author-tile-arrow {
    font-family: var(--serif);
    font-size: 1.4rem;
    align-self: flex-end;
    transition: transform .35s var(--ease-art), color .35s var(--ease-art);
}

/* === STRONA OBRAZU === */
.crumb {
    font-family: var(--mono);
    font-size: .75rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 2rem 0 1rem;
}
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }

.artwork-detail {
    padding: 1rem 0 6rem;
}
.artwork-detail .display {
    background: var(--paper-deep);
    padding: clamp(1.5rem, 4vw, 4rem);
    position: relative;
}
.artwork-detail .display::before,
.artwork-detail .display::after {
    content: "";
    position: absolute;
    width: 28px; height: 28px;
    border: 1px solid var(--accent);
}
.artwork-detail .display::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.artwork-detail .display::after  { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

.artwork-detail .display svg,
.artwork-detail .display img {
    width: 100%; height: auto; display: block;
    box-shadow:
        0 1px 0 rgba(0,0,0,.08),
        0 20px 50px -20px rgba(0,0,0,.35),
        0 40px 90px -40px rgba(0,0,0,.25);
}

.detail-sidebar { position: sticky; top: 6rem; }

.detail-eyebrow {
    font-family: var(--mono);
    font-size: .75rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--accent);
}
.detail-title {
    font-family: var(--serif);
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    font-style: italic;
    line-height: 1.05;
    font-weight: 400;
    margin: .9rem 0 1.5rem;
    letter-spacing: -.01em;
}
.detail-author {
    font-family: var(--sans);
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.detail-author a {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    padding-bottom: 2px;
    transition: border-color .3s var(--ease-art), color .3s var(--ease-art);
}
.detail-author a:hover { color: var(--accent); border-color: var(--accent); }

.detail-desc {
    font-family: var(--serif);
    font-size: 1.2rem;
    line-height: 1.65;
    color: var(--ink-soft);
    margin: 2rem 0;
}

.spec-table {
    width: 100%;
    border-top: 1px solid var(--line);
    margin-top: 2rem;
}
.spec-table dt, .spec-table dd {
    font-family: var(--mono);
    font-size: .82rem;
    letter-spacing: .04em;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    margin: 0;
}
.spec-table .row-spec { display: flex; justify-content: space-between; gap: 1.5rem; align-items: baseline; }
.spec-table dt { color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; }
.spec-table dd { color: var(--ink); text-align: right; }

.detail-cta {
    display: inline-flex; align-items: center; gap: .85rem;
    padding: 1rem 1.5rem;
    background: var(--ink);
    color: var(--paper);
    text-decoration: none;
    font-family: var(--mono);
    font-size: .8rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-top: 2rem;
    transition: background .3s var(--ease-art), color .3s var(--ease-art);
}
.detail-cta:hover { background: var(--accent); color: var(--paper); }
.detail-cta .arrow { transition: transform .3s var(--ease-art); }
.detail-cta:hover .arrow { transform: translateX(6px); }

/* === STRONA AUTORA === */
.author-hero { padding: 4rem 0 3rem; }
.author-name {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 6.5rem);
    line-height: .98;
    letter-spacing: -.02em;
    margin-bottom: 1rem;
}
.author-name em { font-style: italic; color: var(--accent); }
.author-lifespan {
    font-family: var(--mono);
    font-size: .85rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}
.author-bio {
    font-family: var(--serif);
    font-size: clamp(1.15rem, 1.5vw, 1.4rem);
    line-height: 1.7;
    color: var(--ink-soft);
    max-width: 60ch;
    margin-top: 2.5rem;
    text-indent: 2.5rem; /* tradycyjne wcięcie pierwszego akapitu */
}

.author-works-label {
    display: flex; justify-content: space-between; align-items: end;
    border-bottom: 1px solid var(--line);
    padding-bottom: 1rem;
    margin-bottom: 3rem;
}
.author-works-label h2 {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    margin: 0;
}
.author-works-label .count {
    font-family: var(--mono);
    font-size: .85rem;
    color: var(--muted);
    letter-spacing: .1em;
}

/* === FOOTER === */
.site-footer {
    background: var(--ink);
    color: var(--paper);
    margin-top: 6rem;
}
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--accent); }
.footer-display {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(2.5rem, 5vw, 4rem);
    line-height: 1;
}
.footer-display em { font-style: italic; color: var(--accent); }
.footer-lead {
    font-family: var(--serif);
    font-size: 1.1rem;
    color: rgba(243, 237, 226, .75);
    line-height: 1.6;
    max-width: 38ch;
}
.footer-label {
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.25rem;
}
.footer-meta {
    font-family: var(--sans);
    font-size: .95rem;
    line-height: 1.7;
    font-style: normal;
    color: rgba(243, 237, 226, .8);
}
.footer-bottom {
    border-top: 1px solid rgba(243, 237, 226, .15);
}
.mono-tag {
    font-family: var(--mono);
    font-size: .72rem;
    letter-spacing: .14em;
    color: rgba(243, 237, 226, .55);
    text-transform: uppercase;
}

/* === ANIMATIONS === */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.reveal { opacity: 0; animation: fadeUp .9s var(--ease-art) forwards; }
.reveal-1 { animation-delay: .05s; }
.reveal-2 { animation-delay: .2s; }
.reveal-3 { animation-delay: .35s; }
.reveal-4 { animation-delay: .5s; }

/* Skroll-reveal */
.io-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s var(--ease-art), transform 1s var(--ease-art);
}
.io-fade.is-visible { opacity: 1; transform: translateY(0); }
