@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,400;1,600&family=Inter:wght@300;400;500&display=swap');
:root {
  --bg: #F3EFE5;
  --bg-soft: #EAE4D6;
  --ink: #3B3730;
  --ink-soft: #83796A;
  --sage: #8A9A7E;
  --dust: #C79E9A;
  --line: rgba(59,55,48,.12);

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;

  --space-1: 8px; --space-2: 16px; --space-3: 28px;
  --space-4: 48px; --space-5: 88px; --space-6: 140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-weight: 300;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }

/* ---------- Nav: почти невидима ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  transition: color .3s ease;
}
.nav__mark { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 20px; letter-spacing: .02em; color: inherit; }
.nav__links a { color: inherit; }
.nav.nav--on-photo { color: #FBF8F1; }
.nav:not(.nav--on-photo) { color: var(--ink); }
.nav__links { display: flex; gap: var(--space-3); font-size: 16px; letter-spacing: .08em; }
.nav__links a { opacity: .65; transition: opacity .3s ease; }
.nav__links a:hover { opacity: 1; }
@media (max-width: 560px) {
  .nav { padding: var(--space-2) var(--space-2); }
  .nav__mark { font-size: 16px; }
  .nav__links { gap: 10px; font-size: 10px; letter-spacing: .04em; }
}

#about-section, #contacts-section { scroll-margin-top: 90px; }
.float-cta {
  position: fixed; left: 50%; bottom: 32px; z-index: 40;
  transform: translate(-50%, 14px);
  padding: 12px 28px;
  font-family: var(--serif); font-style: italic; font-size: 16px;
  color: var(--ink); background: rgba(246, 242, 234, .78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: 999px;
  opacity: 0; pointer-events: none;
  transition: opacity .5s ease, transform .5s ease, border-color .25s ease, box-shadow .25s ease;
}
.float-cta.is-visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.float-cta:hover { border-color: var(--sage); box-shadow: 0 6px 18px rgba(38,34,27,.1); }
@media (max-width: 560px) { .float-cta { font-size: 14px; padding: 10px 22px; bottom: 20px; } }

.opening {
  position: relative;
  height: 100svh; min-height: 560px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
}
.opening__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.8s ease;
}
.opening__bg.is-active { opacity: 1; }
.opening__scrim { position: absolute; inset: 0; background: rgba(30,28,22,.45); z-index: 1; }
.opening__inner { position: relative; z-index: 2; padding: var(--space-4); }
.opening__name {
  font-family: var(--serif); font-weight: 300; font-style: italic;
  font-size: clamp(38px, 8vw, 120px); letter-spacing: .01em; color: #FBF8F1;
  margin: 0 0 var(--space-2);
  opacity: 0; animation: fadeUp 2s ease forwards .3s;
}
.opening__tag {
  font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: rgba(251,248,241,.82);
  opacity: 0; animation: fadeUp 2s ease forwards 1s;
}
/* PERFECT CENTERING FOR SCROLL CUE */
.opening__cue {
  position: absolute; bottom: var(--space-4); left: 0; right: 0; margin: 0 auto;
  z-index: 2; width: max-content;
  font-size: 12px; color: rgba(251,248,241,.75); letter-spacing: .1em;
  opacity: 0; animation: fadeUp 2s ease forwards 2s, bob 3s ease-in-out infinite 3s;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- Второй слайд: цитата на фоне сменяющихся картин ---------- */
.slide2 {
  position: relative;
  height: 100svh; min-height: 560px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
  padding: var(--space-4) 80px;
  background-color: #1e1c16;
}
.slide2__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0;
  transition: opacity .8s ease;
}
.slide2__bg.is-active {
  opacity: 1;
}
.slide2__scrim {
  position: absolute; inset: 0;
  background: rgba(30,28,22,.45);
  z-index: 1;
}
.slide2__text {
  position: relative; z-index: 2; max-width: 900px;
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: clamp(28px, 5vw, 52px); line-height: 1.3; color: #FBF8F1;
  user-select: none;
  opacity: 1;
  transition: opacity 1.5s ease;
}
.slide2__text.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Кнопки переключения: без круга, только крупная стрелка */
.slide2__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10;
  width: auto; height: auto;
  display: flex; align-items: center; justify-content: center;
  color: #FBF8F1;
  background: none;
  border: none;
  border-radius: 0;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  opacity: 0.65;
  transition: opacity .25s ease, transform .25s ease;
  padding: 20px;
}
.slide2__btn:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.15);
}
.slide2__btn:active {
  transform: translateY(-50%) scale(0.95);
}
.slide2__btn svg {
  width: 42px; height: 42px; stroke: currentColor;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}
.slide2__btn--prev { left: 24px; }
.slide2__btn--next { right: 24px; }

@media (max-width: 768px) {
  .slide2__btn { padding: 14px; }
  .slide2__btn svg { width: 32px; height: 32px; }
  .slide2__btn--prev { left: 8px; }
  .slide2__btn--next { right: 8px; }
}

/* ---------- About: полный сплит-экран, фото слева, текст справа ---------- */
.about {
  display: flex; align-items: stretch;
  min-height: 100svh;
}
.about__photo { flex: 0 0 50%; max-width: 50%; }
.about__photo img { display: block; width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); }
.about__text {
  flex: 0 0 50%; max-width: 50%;
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--space-6) clamp(var(--space-4), 6vw, 96px);
  text-align: left;
}
.about__lead { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(28px, 3.4vw, 40px); margin: 0 0 var(--space-3); }
.about__lead:empty { display: none; }
.about__body { color: var(--ink-soft); font-size: 18px; line-height: 1.85; margin: 0 0 18px; max-width: 46ch; }
.about__body:last-child { margin-bottom: 0; }
@media (max-width: 860px) {
  .about { flex-direction: column; min-height: 0; }
  .about__photo, .about__text { flex: 1 1 auto; max-width: 100%; }
  .about__photo { height: 62vh; }
  .about__text { padding: var(--space-5) var(--space-4); text-align: center; align-items: center; }
  .about__body { max-width: 100%; }
}

/* ---------- Contacts: тихо и без плашек ---------- */
.contacts { padding: var(--space-6) var(--space-4) var(--space-5); text-align: center; }
.contacts__lead { font-family: var(--serif); font-style: italic; font-size: clamp(22px, 3vw, 30px); margin: 0 0 var(--space-3); }
.contacts__row { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; font-size: 14px; }
.contacts__row a.live { border-bottom: 1px solid var(--ink); }
.contacts__row span.soon { color: var(--ink-soft); opacity: .55; }

.footer {
  text-align: center; padding: var(--space-3) var(--space-4);
  font-size: 11px; letter-spacing: .08em; color: var(--ink-soft); text-transform: uppercase;
}

/* ---------- Views ---------- */
.view { display: none; }
.view.is-active { display: block; }

/* ---------- Витрина: все работы сразу ---------- */
.vitrina { max-width: 1200px; margin: 0 auto; padding: 140px var(--space-4) var(--space-6); }
.vitrina__intro {
  text-align: center; font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(20px, 2.6vw, 28px); color: var(--ink-soft); margin: 0 0 var(--space-5);
}
.vitrina__tabs {
  display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap;
  margin-bottom: var(--space-4);
  font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
}
.vitrina__tabs button { color: var(--ink-soft); padding-bottom: 4px; border-bottom: 1px solid transparent; transition: color .2s ease, border-color .2s ease; }
.vitrina__tabs button:hover { color: var(--ink); }
.vitrina__tabs button.is-active { color: var(--ink); border-color: var(--sage); }
.vitrina__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-6) var(--space-3); }
.vitrina__card { cursor: zoom-in; opacity: 0; transform: translateY(16px); transition: opacity 1s ease, transform 1s ease; }
.vitrina__card.is-visible { opacity: 1; transform: translateY(0); }
.vitrina__frame { position: relative; aspect-ratio: 4/5; overflow: hidden; background: var(--bg-soft); }
.vitrina__sold {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--bg); color: var(--ink-soft);
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px;
}
.vitrina__frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.vitrina__card:hover .vitrina__frame img { transform: scale(1.03); }
.vitrina__caption { margin-top: 10px; text-align: center; }

/* FIXED TITLE FONT FOR PERFECT CYRILLIC RENDERING (NO BOLD 'Й' ISSUE) */
.vitrina__caption .name, .painting-title {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.01em; /* чуть сближает буквы, убирая дефект рендеринга на мобильных */
  -webkit-text-size-adjust: 100%; /* запрещает мобильным браузерам самовольно менять размер/толщину */
}

/* Параметры картины */
.vitrina__caption .specs {
  display: block;
  font-family: var(--sans);
  font-weight: 300;
  font-size: 13px;
  letter-spacing: .02em;
  text-transform: lowercase;
  color: var(--ink-soft);
  margin-top: 3px;
}

.overlay { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: none; overflow-y: auto; }
.overlay.is-active { display: block; }
.overlay__close {
  position: fixed; top: var(--space-3); right: var(--space-4); z-index: 5;
  width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%; background: var(--bg);
}
.overlay__close svg { width: 15px; height: 15px; }
.overlay__stage { min-height: 94vh; display: flex; align-items: center; justify-content: center; padding: var(--space-2); }
.overlay__stage img { max-width: 98vw; max-height: 94vh; opacity: 0; animation: fadeIn 1s ease forwards; }
@keyframes fadeIn { to { opacity: 1; } }
.overlay__caption { text-align: center; padding-bottom: var(--space-5); }
.overlay__cat { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.overlay__name { display: block; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 24px; color: var(--ink); margin-bottom: 8px; }
.overlay__specs { display: block; font-family: var(--sans); font-size: 14px; text-transform: lowercase; color: var(--ink-soft); margin-bottom: 4px; }
.overlay__price { display: block; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink); }

@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
