/* ПодСолНух — публичная часть.
   Палитра взята из работ: меловая доска, меловое золото, медь, бледная лазурь. */

@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 300; font-display: swap; src: url(../fonts/cormorant-garamond-cyrillic-300-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 300; font-display: swap; src: url(../fonts/cormorant-garamond-latin-300-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/cormorant-garamond-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/cormorant-garamond-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/cormorant-garamond-cyrillic-400-italic.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/cormorant-garamond-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/cormorant-garamond-cyrillic-500-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/cormorant-garamond-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/lora-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/lora-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/lora-cyrillic-400-italic.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/lora-latin-400-italic.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/lora-cyrillic-600-normal.woff2) format("woff2"); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/lora-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
    /* светлая тема: тёплая бумага, чернила, золото и медь глубоких оттенков */
    --bg: #f7f2e8;
    --bg-2: #eee6d6;
    --bg-3: #e4dac6;
    --ink: #262119;
    --ink-soft: #3f382d;
    --muted: #857b69;
    --gold: #9c7322;
    --gold-deep: #b48a35;
    --copper: #a95c34;
    --sky: #4c8792;
    --rose: #a8605c;
    --line: rgba(156, 115, 34, .28);
    --line-soft: rgba(38, 33, 25, .1);

    --f-display: "Cormorant", "Cormorant Garamond", Georgia, "Times New Roman", serif;
    --f-text: "Lora", Georgia, "Times New Roman", serif;

    --gutter: clamp(16px, 4vw, 48px);
    --header-h: 76px;
    --ease: cubic-bezier(.2, .7, .1, 1);
    color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 18px/1.8 var(--f-text);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
/* мелкое «меловое» зерно поверх всего фона */
body::before {
    content: "";
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .06;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .27 0 0 0 0 .15 0 0 0 1.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .site-header, .site-footer { position: relative; z-index: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: .2em; transition: color .3s; }
a:hover { color: var(--ink); }
:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }
::selection { background: rgba(214, 170, 72, .35); color: var(--ink); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 8px 14px; background: var(--gold); color: var(--bg); }
.skip:focus { top: 12px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.container--text { max-width: 820px; }
.container--wide { max-width: 1480px; }

/* ---------- многоточия: мерцание золотом ---------- */
.ell {
    letter-spacing: .08em;
    background: linear-gradient(90deg, var(--muted) 0%, var(--muted) 35%, var(--gold) 50%, var(--muted) 65%, var(--muted) 100%);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: ell-shimmer 5.5s linear infinite;
    word-break: break-all;
}
@keyframes ell-shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }

/* ---------- шапка ---------- */
.site-header {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 50;
}
/* Фон с размытием — на псевдоэлементе: backdrop-filter на самой шапке сделал бы её
   опорным блоком для position: fixed, и мобильное меню обрезалось бы по высоте шапки. */
.site-header::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    transition: background-color .4s, box-shadow .4s, backdrop-filter .4s;
}
.site-header.is-scrolled::before, .is-inner .site-header::before {
    background: rgba(247, 242, 232, .84);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 var(--line-soft);
}
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    height: var(--header-h);
    max-width: 1480px; margin: 0 auto; padding: 0 var(--gutter);
}

.brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; min-width: 0; }
.brand__emblem { width: 40px; height: 40px; flex: none; transition: transform 1.6s var(--ease); }
.brand:hover .brand__emblem { transform: rotate(137.5deg); }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.brand__name { font: 500 26px/1 var(--f-display); letter-spacing: .02em; white-space: nowrap; }
.brand__name b, .site-footer__name b { font-weight: 600; color: var(--gold); }
.brand__tagline { font: 400 11px/1.4 var(--f-text); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 4px; white-space: nowrap; }

.emblem { fill: var(--gold); }
.emblem circle:nth-child(3n) { fill: var(--copper); }
.emblem circle:nth-child(5n) { fill: var(--ink); opacity: .8; }

.nav { list-style: none; display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; }
.nav__item { position: relative; display: flex; align-items: center; }
.nav__link {
    position: relative;
    display: block;
    padding: 10px 14px;
    color: var(--ink-soft);
    font: 500 20px/1.2 var(--f-display);
    letter-spacing: .03em;
    text-decoration: none;
    white-space: nowrap;
}
.nav__link::after {
    content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    transform: scaleX(0); transition: transform .5s var(--ease);
}
.nav__link:hover, .nav__item.is-active > .nav__link { color: var(--ink); }
.nav__link:hover::after, .nav__item.is-active > .nav__link::after { transform: scaleX(1); }
.nav__sub-toggle {
    display: grid; place-items: center;
    width: 28px; height: 28px; margin-left: -10px;
    background: none; border: 0; color: var(--muted); cursor: pointer;
}
.nav__sub-toggle svg { width: 11px; transition: transform .3s; }
.nav__sub {
    position: absolute; top: 100%; right: 0;
    min-width: 520px;
    padding: 18px;
    background: rgba(255, 252, 245, .98);
    border: 1px solid var(--line);
    box-shadow: 0 30px 60px -24px rgba(60, 45, 20, .28);
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: opacity .35s, transform .35s var(--ease), visibility .35s;
}
.nav__sub::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav__item.has-sub:hover .nav__sub,
.nav__item.has-sub:focus-within .nav__sub,
.nav__item.is-open .nav__sub { opacity: 1; visibility: visible; transform: none; }
.nav__item.is-open .nav__sub-toggle svg, .nav__item.has-sub:hover .nav__sub-toggle svg { transform: rotate(180deg); }
.nav__sub ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.nav__sub a {
    display: flex; align-items: baseline; gap: 12px;
    padding: 9px 12px;
    color: var(--ink-soft);
    font: 400 20px/1.25 var(--f-display);
    text-decoration: none;
    transition: background-color .25s, color .25s;
}
.nav__sub a:hover, .nav__sub li.is-active a { background: rgba(156, 115, 34, .08); color: var(--ink); }
.nav__num { font: 400 12px/1 var(--f-text); color: var(--gold-deep); letter-spacing: .1em; }

.nav-toggle { display: none; }

/* Компактное меню: включается скриптом на узких экранах и когда пункты не влезают в строку. */
.brand { flex: none; }
.nav-measuring .site-nav, .nav-measuring .site-nav * { transition: none !important; animation: none !important; }
.nav-collapsed { --header-h: 64px; }
.nav-collapsed .brand__emblem { width: 34px; height: 34px; }
.nav-collapsed .brand__name { font-size: 23px; }
.nav-collapsed .nav-toggle {
    display: grid; place-items: center;
    width: 44px; height: 44px; margin-right: -8px;
    background: none; border: 0; color: var(--ink); cursor: pointer;
    position: relative; z-index: 2;
}
.nav-collapsed .nav-toggle__bars, .nav-collapsed .nav-toggle__bars::before, .nav-collapsed .nav-toggle__bars::after {
    display: block; width: 24px; height: 1.5px; background: currentColor;
    transition: transform .4s var(--ease), opacity .3s;
}
.nav-collapsed .nav-toggle__bars { position: relative; }
.nav-collapsed .nav-toggle__bars::before, .nav-collapsed .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-collapsed .nav-toggle__bars::before { top: -7px; }
.nav-collapsed .nav-toggle__bars::after { top: 7px; width: 16px; }
.nav-collapsed .nav-open .nav-toggle__bars { background: transparent; }
.nav-collapsed .nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-collapsed .nav-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); width: 24px; }

.nav-collapsed .site-nav {
    position: fixed; inset: 0;
    padding: calc(var(--header-h) + 16px) var(--gutter) 40px;
    background: var(--bg);
    overflow-y: auto;
    opacity: 0; visibility: hidden;
    transition: opacity .4s, visibility .4s;
}
.nav-collapsed .nav-open .site-nav { opacity: 1; visibility: visible; }
.nav-collapsed .nav-open { overflow: hidden; }
.nav-collapsed .nav { flex-direction: column; align-items: stretch; gap: 0; }
.nav-collapsed .nav__item { flex-wrap: wrap; border-bottom: 1px solid var(--line-soft); }
.nav-collapsed .nav__link { flex: 1; padding: 16px 0; font-size: 28px; }
.nav-collapsed .nav__link::after { display: none; }
.nav-collapsed .nav__sub-toggle { width: 48px; height: 48px; margin: 0; }
.nav-collapsed .nav__sub {
    position: static; flex-basis: 100%; min-width: 0;
    padding: 0 0 12px; border: 0; background: none; box-shadow: none;
    opacity: 1; visibility: visible; transform: none;
    display: none;
}
.nav-collapsed .nav__item.has-sub:hover .nav__sub-toggle svg { transform: none; }
.nav-collapsed .nav__item.is-open .nav__sub { display: block; }
.nav-collapsed .nav__item.is-open .nav__sub-toggle svg { transform: rotate(180deg); }
.nav-collapsed .nav__sub ul { grid-template-columns: 1fr; }
.nav-collapsed .nav__sub a { padding: 10px 0 10px 4px; font-size: 22px; }
.nav-collapsed .nav-open .nav__item { animation: nav-in .5s var(--ease) both; }
.nav-collapsed .nav-open .nav__item:nth-child(2) { animation-delay: .05s; }
.nav-collapsed .nav-open .nav__item:nth-child(3) { animation-delay: .1s; }
.nav-collapsed .nav-open .nav__item:nth-child(4) { animation-delay: .15s; }
.nav-collapsed .nav-open .nav__item:nth-child(5) { animation-delay: .2s; }
@keyframes nav-in { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 400px) { .brand__tagline { display: none; } }

/* ---------- главная: герой ---------- */
.hero {
    position: relative;
    min-height: 100vh; min-height: 100svh;
    display: grid; place-items: center;
    overflow: hidden;
    padding: calc(var(--header-h) + 20px) var(--gutter) 90px;
    text-align: center;
}
.hero__canvas {
    position: absolute; inset: 0; width: 100%; height: 100%;
    -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent 98%);
    mask-image: linear-gradient(to bottom, #000 62%, transparent 98%);
}
.hero__glow {
    position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(closest-side at 50% 52%, rgba(247, 242, 232, .78), rgba(247, 242, 232, .3) 50%, transparent 75%),
        linear-gradient(to bottom, transparent 70%, var(--bg));
}
.hero__content { position: relative; max-width: 900px; }
.hero__kicker {
    margin: 0 0 18px;
    font: 400 13px/1.4 var(--f-text); letter-spacing: .42em; text-transform: uppercase;
    color: var(--gold);
    animation: rise 1.4s .3s var(--ease) both;
}
.hero__title {
    margin: 0;
    font: 300 clamp(54px, 13vw, 176px)/.9 var(--f-display);
    letter-spacing: -.01em;
    white-space: nowrap;
    color: var(--ink);
    text-shadow: 0 0 50px rgba(247, 242, 232, .95);
}
.hero__syl { display: inline-block; animation: rise 1.6s calc(.45s + var(--i) * .18s) var(--ease) both; }
.hero__syl::first-letter { color: var(--gold); }
.hero__motto {
    margin: 26px 0 0;
    font: italic 400 clamp(20px, 2.6vw, 28px)/1.4 var(--f-display);
    color: var(--ink-soft);
    animation: rise 1.4s 1.1s var(--ease) both;
}
.hero__scroll {
    position: absolute; bottom: 28px; left: 50%;
    width: 26px; height: 42px; margin-left: -13px;
    border: 1px solid var(--line); border-radius: 13px;
    animation: rise 1s 1.6s var(--ease) both;
}
.hero__scroll span {
    position: absolute; left: 50%; top: 9px; width: 3px; height: 7px; margin-left: -1.5px;
    border-radius: 2px; background: var(--gold);
    animation: scroll-dot 2.2s ease-in-out infinite;
}
@keyframes scroll-dot { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- секции ---------- */
.section { padding: clamp(64px, 10vw, 140px) 0; }
.section--tight { padding: clamp(40px, 6vw, 80px) 0; }
.section + .section { padding-top: 0; }
.section-head { text-align: center; margin-bottom: clamp(36px, 5vw, 64px); }
.section-title {
    margin: 14px 0 0;
    font: 400 clamp(38px, 5.4vw, 64px)/1.08 var(--f-display);
    letter-spacing: .01em;
}
.ornament { width: 160px; height: 20px; overflow: visible; display: block; margin: 0 auto; }
.ornament path, .ornament circle { fill: none; stroke: var(--gold); stroke-width: .8; }
.ornament .ornament__dot { fill: var(--gold); stroke: none; }
.ornament__star { transform-origin: 0 0; animation: spin-slow 40s linear infinite; }

/* ---------- текст ---------- */
.prose { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-soft); hyphens: auto; -webkit-hyphens: auto; }
.prose > * + * { margin-top: 1.15em; }
.prose p { margin: 0; }
.prose p + p { margin-top: 1.15em; }
.prose strong, .prose b { color: var(--ink); font-weight: 600; }
.prose h2, .prose h3 {
    margin: 1.8em 0 .6em;
    font: 400 clamp(30px, 3.6vw, 42px)/1.15 var(--f-display);
    color: var(--ink);
}
.prose h3 { font-size: clamp(25px, 2.8vw, 32px); }
.prose > :first-child { margin-top: 0; }
.prose blockquote {
    position: relative;
    margin: 2em 0;
    padding: .4em 0 .4em clamp(20px, 3vw, 36px);
    border-left: 1px solid transparent;
    border-image: linear-gradient(to bottom, transparent, var(--gold), var(--copper), transparent) 1;
    color: var(--ink);
}
.prose blockquote p + p { margin-top: 1.1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li::marker { color: var(--gold); }
.prose img { margin: 2em auto; }
.prose a { color: var(--gold); }
.prose figure { margin: 2em 0; }

/* вступление на главной: первый абзац — эпиграф */
.prose--intro > p:first-child {
    text-align: center;
    font: italic 400 clamp(22px, 2.4vw, 28px)/1.5 var(--f-display);
    color: var(--ink);
    margin-bottom: 2em;
}
.prose--intro > p:nth-child(2)::first-letter {
    float: left;
    margin: .08em .12em 0 0;
    font: 400 4.2em/.8 var(--f-display);
    color: var(--gold);
}

/* ---------- карточки работ ---------- */
.cards {
    list-style: none; margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: clamp(20px, 3vw, 40px) clamp(16px, 2.4vw, 32px);
}
.card__link { display: block; color: inherit; text-decoration: none; }
.card__media {
    position: relative; display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--bg-2);
}
.card__media img {
    width: 100%; height: 100%; object-fit: cover;
    filter: saturate(.92);
    transform: scale(1.02);
    transition: transform 1.4s var(--ease), filter .8s;
}
.card__link:hover .card__media img, .card__link:focus-visible .card__media img { transform: scale(1.08); filter: saturate(1.05) brightness(1); }
.card__placeholder { width: 60%; height: 60%; margin: 10% auto 0; opacity: .5; }
.card__frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.card__frame rect {
    fill: none; stroke: var(--gold); stroke-width: .6; vector-effect: non-scaling-stroke;
    stroke-dasharray: 1; stroke-dashoffset: 1;
    transition: stroke-dashoffset 1.2s var(--ease);
}
.card__link:hover .card__frame rect, .card__link:focus-visible .card__frame rect { stroke-dashoffset: 0; }
.card__body { display: grid; grid-template-columns: auto 1fr; gap: 0 14px; align-items: baseline; padding: 16px 2px 0; }
.card__num { grid-row: span 2; font: italic 400 18px/1 var(--f-display); color: var(--gold-deep); min-width: 2.2em; }
.card__title { font: 500 clamp(23px, 2.2vw, 27px)/1.2 var(--f-display); color: var(--ink); transition: color .3s; }
.card__link:hover .card__title { color: var(--gold); }
.card__count { font-size: 13px; color: var(--muted); letter-spacing: .04em; }

/* ---------- полоса эскизов ---------- */
.strip {
    display: flex; gap: 14px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 4px var(--gutter) 20px;
    scrollbar-width: thin; scrollbar-color: var(--gold-deep) transparent;
}
.strip__item { flex: none; scroll-snap-align: start; overflow: hidden; background: var(--bg-2); }
.strip__item img { height: clamp(200px, 30vw, 340px); width: auto; transition: transform 1.2s var(--ease), opacity .6s; opacity: .85; }
.strip__item:hover img { transform: scale(1.05); opacity: 1; }
@media (min-width: 1200px) { .strip { justify-content: center; } }

/* ---------- внутренние страницы ---------- */
.page-hero {
    position: relative;
    padding: calc(var(--header-h) + clamp(48px, 8vw, 110px)) 0 clamp(40px, 6vw, 72px);
    text-align: center;
    overflow: hidden;
}
.page-hero__backdrop {
    position: absolute; inset: -60px;
    background-size: cover; background-position: center;
    filter: blur(50px) saturate(1.2);
    opacity: .28;
    animation: drift 30s ease-in-out infinite alternate;
}
.page-hero__backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(247, 242, 232, .35), var(--bg) 85%); }
@keyframes drift { to { transform: scale(1.12) translate(2%, 1%); } }
.page-hero__inner { position: relative; }
.crumbs { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); animation: rise 1s var(--ease) both; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--gold); }
.crumbs span { margin: 0 .6em; color: var(--gold-deep); }
.page-title {
    margin: 18px 0 26px;
    font: 300 clamp(44px, 7.6vw, 96px)/1.02 var(--f-display);
    letter-spacing: -.005em;
    overflow-wrap: anywhere;
    animation: rise 1.3s .1s var(--ease) both;
}
.page-hero .ornament { animation: rise 1.3s .3s var(--ease) both; }
.draft-badge { display: inline-block; margin: 0 0 20px; padding: 4px 12px; border: 1px dashed var(--copper); color: var(--copper); font-size: 14px; }

.page-gallery { margin-top: clamp(48px, 7vw, 96px); }

/* ---------- галерея ---------- */
.gallery--masonry { columns: 3 320px; column-gap: clamp(12px, 1.6vw, 22px); }
.prose .gallery--masonry, .intro .gallery--masonry { margin: 2.5em 0; columns: 2 260px; }
.gallery__item { break-inside: avoid; margin: 0 0 clamp(12px, 1.6vw, 22px); }
.gallery__item a { display: block; position: relative; overflow: hidden; background: var(--bg-2); cursor: zoom-in; }
.gallery__item img { width: 100%; transition: transform 1.4s var(--ease), opacity .8s; }
.gallery__item a::after {
    content: ""; position: absolute; inset: 0;
    box-shadow: inset 0 0 0 1px rgba(227, 196, 108, 0);
    transition: box-shadow .6s;
}
.gallery__item a:hover img { transform: scale(1.035); }
.gallery__item a:hover::after { box-shadow: inset 0 0 0 1px rgba(156, 115, 34, .6); }
.gallery__item figcaption { padding: 10px 2px 0; font-size: 15px; color: var(--muted); }
.gallery__item figcaption strong { display: block; color: var(--ink); font: 500 20px/1.3 var(--f-display); }
.js img[loading="lazy"]:not(.is-loaded) { opacity: 0; }
.js img.is-loaded { opacity: 1; }

/* ---------- навигация по работам ---------- */
.work-nav {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
    margin-top: clamp(64px, 8vw, 110px); padding-top: 36px; padding-bottom: 20px;
    border-top: 1px solid var(--line-soft);
}
.work-nav__link { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.work-nav__link--next { text-align: right; grid-column: 2; }
.work-nav__label { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.work-nav__title { font: 400 clamp(24px, 3vw, 34px)/1.15 var(--f-display); transition: color .3s; }
.work-nav__link:hover .work-nav__title { color: var(--gold); }

/* ---------- подвал ---------- */
.site-footer { margin-top: clamp(80px, 10vw, 140px); border-top: 1px solid var(--line-soft); background: linear-gradient(to bottom, transparent, rgba(156, 115, 34, .06)); }
.site-footer__inner {
    max-width: 1240px; margin: 0 auto; padding: 48px var(--gutter) 40px;
    display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; align-items: start;
}
.site-footer__brand { display: flex; gap: 16px; align-items: center; }
.site-footer__emblem { width: 64px; height: 64px; flex: none; animation: spin-slow 120s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }
.site-footer__name { font: 500 30px/1 var(--f-display); }
.site-footer__tagline { margin-top: 6px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.site-footer__contacts { list-style: none; margin: 0; padding: 0; font-size: 16px; color: var(--ink-soft); }
.site-footer__contacts li + li { margin-top: 6px; }
.site-footer__contacts a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--line); }
.site-footer__contacts a:hover { color: var(--gold); }
.site-footer__meta { font-size: 14px; color: var(--muted); text-align: right; }
.site-footer__meta p { margin: 0 0 6px; }
@media (max-width: 800px) {
    .site-footer__inner { grid-template-columns: 1fr; }
    .site-footer__meta { text-align: left; }
}

/* ---------- 404 ---------- */
.not-found { min-height: 80vh; display: grid; place-content: center; text-align: center; padding: calc(var(--header-h) + 40px) var(--gutter) 40px; }
.not-found__emblem { width: 140px; height: 140px; margin: 0 auto 10px; opacity: .8; animation: spin-slow 80s linear infinite; }
.button {
    display: inline-block; padding: 12px 26px;
    border: 1px solid var(--gold); color: var(--gold);
    font: 500 18px/1 var(--f-display); letter-spacing: .08em; text-decoration: none;
    transition: background-color .3s, color .3s;
}
.button:hover { background: var(--gold); color: var(--bg); }

/* ---------- лайтбокс ---------- */
.lightbox {
    /* просмотр картин — на тёмном фоне, со своей палитрой */
    --ink: #ece4d2;
    --ink-soft: #c9c1b0;
    --muted: #8f897d;
    --gold: #e3c46c;
    --line: rgba(227, 196, 108, .3);
    position: fixed; inset: 0; z-index: 100;
    display: grid; grid-template-rows: 1fr auto;
    background: rgba(6, 7, 10, .96);
    opacity: 0; transition: opacity .35s;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__stage { position: relative; display: grid; place-items: center; padding: 64px 72px 12px; min-height: 0; touch-action: pan-y; }
.lightbox__img {
    max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px);
    width: auto; height: auto; object-fit: contain;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
    transition: opacity .4s, transform .5s var(--ease);
}
.lightbox__img.is-switching { opacity: 0; transform: scale(.985); }
.lightbox__caption { margin: 0; padding: 10px 72px 22px; text-align: center; font: italic 400 20px/1.4 var(--f-display); color: var(--ink-soft); min-height: 1.4em; }
.lightbox__counter { position: absolute; top: 22px; left: 24px; font: 400 14px/1 var(--f-text); letter-spacing: .2em; color: var(--muted); }
.lightbox__btn {
    position: absolute; display: grid; place-items: center;
    width: 52px; height: 52px; padding: 0;
    background: none; border: 1px solid transparent; border-radius: 50%;
    color: var(--ink); cursor: pointer;
    transition: border-color .3s, color .3s;
}
.lightbox__btn:hover { border-color: var(--line); color: var(--gold); }
.lightbox__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.lightbox__close { top: 10px; right: 12px; }
.lightbox__prev, .lightbox__next { top: 50%; margin-top: -40px; }
.lightbox__prev { left: 10px; }
.lightbox__next { right: 10px; }
.lightbox__spinner {
    position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px;
    border: 1px solid var(--line); border-top-color: var(--gold); border-radius: 50%;
    animation: spin-slow .9s linear infinite; opacity: 0; transition: opacity .3s;
}
.lightbox.is-loading .lightbox__spinner { opacity: 1; }
@media (max-width: 700px) {
    .lightbox__stage { padding: 56px 8px 8px; }
    .lightbox__prev, .lightbox__next { top: auto; bottom: 8px; margin: 0; }
    .lightbox__caption { padding: 8px 64px 20px; font-size: 17px; }
}

/* ---------- появление при прокрутке ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
    .ell { animation: none; color: var(--gold-deep); background: none; }
    .js .reveal { opacity: 1; transform: none; }
}
