/* ===================================================================
   Страница «О замке / История» — storytelling, палитра Валерии
   =================================================================== */
.oz {
  --bordo: #6B1D2A;
  --bordo-light: #8B2D3A;
  --gold: #B09E6B;
  --gold-soft: #C9B98C;
  --cream: #F5F0E8;
  --cream-soft: #FBF8F3;
  --ink: #2C2C2C;
  --ink-soft: #5c564d;
  --line: #e4ddd0;
  font-family: 'Montserrat', sans-serif;
  color: var(--ink);
  background: var(--cream-soft);
  overflow-x: clip;
}
.oz p { margin: 0 0 18px; font-size: 16.5px; line-height: 1.75; color: var(--ink-soft); }
.oz p:last-child { margin-bottom: 0; }
.oz-wrap { max-width: 820px; margin: 0 auto; padding: 0 24px; }

.oz-kicker {
  font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--bordo); margin-bottom: 14px;
}
.oz-kicker--light { color: var(--gold-soft); }
.oz-h2 {
  font-family: 'Playfair Display', serif; font-weight: 600;
  font-size: clamp(24px, 3.4vw, 36px); line-height: 1.2; color: var(--ink); margin: 0 0 20px;
}
.oz-h2--light { color: #fff; }
.oz-accent {
  font-family: 'Playfair Display', serif; font-style: italic;
  font-size: clamp(19px, 2.4vw, 24px); line-height: 1.4; color: var(--bordo); margin: 22px 0 0;
}
.oz-accent--center { text-align: center; max-width: 720px; margin: 0 auto 22px; }
.oz-section-head { margin-bottom: 36px; }
.oz-section-head--center { text-align: center; }

/* ---------- Плейсхолдер под фото ---------- */
.oz-photo {
  position: relative; width: 100%; overflow: hidden; border-radius: 12px;
  background:
    repeating-linear-gradient(135deg, #efe8db 0 14px, #ece4d5 14px 28px);
  border: 1.5px dashed var(--gold);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; text-align: center; color: var(--bordo);
}
.oz-photo__ic { width: 46px; height: 46px; opacity: .75; }
.oz-photo__ic svg { width: 100%; height: 100%; }
.oz-photo__label { font-size: 12.5px; line-height: 1.5; color: #9a8f7c; letter-spacing: .02em; }
.oz-photo__label b { color: var(--bordo); font-weight: 600; }
/* когда внутрь плейсхолдера вставят <img> — он заполняет блок, заглушка прячется */
.oz-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.oz-photo:has(img) { border-style: solid; border-color: var(--line); background: var(--cream); }
.oz-photo:has(img) .oz-photo__ic,
.oz-photo:has(img) .oz-photo__label { display: none; }
/* подпись под одиночным фото (overlay) */
figure.oz-photo { margin: 0; }
.oz-photo__cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 16px 14px 11px; font-size: 12.5px; line-height: 1.4; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.66));
}

/* ---------- Слайдер фото (несколько фото) ---------- */
.oz-slider { position: relative; border-radius: 12px; overflow: hidden; background: #e7e0d4; box-shadow: 0 2px 14px rgba(0,0,0,.08); }
.oz-slider__track { display: flex; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.oz-slide { flex: 0 0 100%; position: relative; margin: 0; }
.oz-slide__img { width: 100%; }
.oz-slide__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oz-slide__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 16px 30px; font-size: 13px; line-height: 1.45; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.7)); }
.oz-slider__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border: none; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.92); color: #6B1D2A; font-size: 24px; line-height: 1;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 12px rgba(0,0,0,.22); transition: background .2s, transform .2s;
}
.oz-slider__nav:hover { background: #fff; }
.oz-slider__nav--prev { left: 12px; } .oz-slider__nav--next { right: 12px; }
.oz-slider__dots { position: absolute; bottom: 12px; left: 0; right: 0; z-index: 3; display: flex; gap: 7px; justify-content: center; }
.oz-slider__dot { width: 8px; height: 8px; padding: 0; border: none; border-radius: 50%; background: rgba(255,255,255,.55); cursor: pointer; transition: background .25s, width .25s; }
.oz-slider__dot.is-on { background: #fff; width: 22px; border-radius: 4px; }

/* ---------- Ряд небольших фото с подписями (лид, dev, return) ---------- */
.oz-grow { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 34px; }
.oz-grow__item { margin: 0; width: 235px; max-width: calc(50% - 11px); }
.oz-grow__img { border-radius: 10px; overflow: hidden; background: #e7e0d4; box-shadow: 0 3px 16px rgba(0,0,0,.09); cursor: zoom-in; }
.oz-grow__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.oz-grow__item:hover .oz-grow__img img { transform: scale(1.05); }
.oz-grow__cap { margin: 10px 2px 0; font-size: 13px; line-height: 1.45; color: #6b6b6b; font-style: italic; }
/* пустой ряд (плейсхолдер) — небольшой, не на всю ширину */
.oz-grow .oz-photo { width: 100%; }
.oz-grow .oz-photo__ic { width: 30px; height: 30px; }
.oz-grow .oz-photo__label { font-size: 10.5px; padding: 0 10px; }
@media (max-width: 560px) { .oz-grow__item { width: calc(50% - 11px); } }

/* ---------- Мозаика (дракон) ---------- */
.oz-mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 38px; max-width: 1080px; margin-left: auto; margin-right: auto; }
.oz-mosaic--empty { grid-template-columns: 1fr; }
.oz-mosaic__item { position: relative; margin: 0; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 3; background: rgba(255,255,255,.06); }
.oz-mosaic__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .45s; }
.oz-mosaic__item:hover img { transform: scale(1.06); }
.oz-mosaic__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 10px 8px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.62)); }
@media (max-width: 700px) { .oz-mosaic { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Лайтбокс (клик = увеличение) ---------- */
.oz-lb { position: fixed; inset: 0; z-index: 9999; background: rgba(20,10,12,.93); display: none; align-items: center; justify-content: center; }
.oz-lb.open { display: flex; }
.oz-lb img { max-width: 92vw; max-height: 86vh; border-radius: 6px; box-shadow: 0 12px 44px rgba(0,0,0,.5); }
.oz-lb__close { position: absolute; top: 18px; right: 18px; width: 48px; height: 48px; border: none; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; cursor: pointer; }
.oz-lb__close:hover { background: rgba(255,255,255,.26); }
.oz-lb__cap { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.85); font-size: 13.5px; padding: 0 20px; }
.oz-lb__cap:empty { display: none; }
.oz-lb__nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; border: none; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.14); color: #fff; font-size: 30px; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.oz-lb__nav:hover { background: rgba(255,255,255,.28); }
.oz-lb__nav--prev { left: 16px; }
.oz-lb__nav--next { right: 16px; }
@media (max-width: 600px) {
  .oz-lb__nav { width: 44px; height: 44px; }
  .oz-lb__nav--prev { left: 8px; }
  .oz-lb__nav--next { right: 8px; }
}

/* ---------- Портрет в цитате ---------- */
.oz-quote__portrait { width: 170px; height: 170px; margin: 0 auto 22px; }
.oz-quote__portrait .oz-photo { width: 170px; height: 170px; aspect-ratio: 1 / 1 !important; border-radius: 50%; overflow: hidden; }
.oz-quote__portrait .oz-photo img { border-radius: 50%; }
.oz-quote__portrait .oz-photo__ic { width: 30px; height: 30px; }
.oz-quote__portrait .oz-photo__label { font-size: 8.5px; padding: 0 6px; }
.oz-quote__portrait .oz-photo__cap { display: none; }

/* ---------- HERO ---------- */
.oz-hero {
  position: relative; min-height: 82vh; display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center; overflow: hidden; color: #fff;
}
.oz-hero__bg {
  position: absolute; inset: -10% 0 0; z-index: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(139,45,58,.25), transparent 60%),
    linear-gradient(160deg, #3a1119 0%, #6B1D2A 55%, #4a1520 100%);
  will-change: transform;
}
/* декоративный силуэт замка (пока нет фото) */
.oz-hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='300' viewBox='0 0 1200 300'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='2'%3E%3Cpath d='M0 300V150h40v-30h20v30h40V150h60v-40h20v40h60V160h80v-30h20v30h80V150h60v-40h20v40h60V160h80v-30h20v30h80V150h60v-40h20v40h60V160h80v-30h20v30h80V150h40v150z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x; background-position: bottom; background-size: 1200px auto; opacity: .8;
}
.oz-hero__scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(20,8,12,.3) 0%, rgba(20,8,12,.42) 45%, rgba(20,8,12,.62) 100%); }
.oz-hero__in { position: relative; z-index: 2; max-width: 860px; padding: 90px 24px; }
.oz-crumbs { font-size: 13px; color: rgba(255,255,255,.7); margin-bottom: 22px; }
.oz-crumbs a { color: var(--gold-soft); text-decoration: none; }
.oz-crumbs span { margin: 0 7px; }
.oz-hero__kicker {
  font-size: 12.5px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold-soft); margin-bottom: 20px;
}
.oz-hero__title {
  font-family: 'Playfair Display', serif; font-weight: 600;
  font-size: clamp(32px, 6vw, 60px); line-height: 1.12; margin: 0 0 20px; color: #fff;
  text-shadow: 0 2px 30px rgba(0,0,0,.3);
}
.oz .oz-hero__sub { font-size: clamp(16px, 2vw, 19px); line-height: 1.6; color: #fff !important; max-width: 640px; margin: 0 auto; text-wrap: balance; text-shadow: 0 1px 14px rgba(0,0,0,.45); }
.oz-hero__scroll { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2; }
.oz-hero__scroll span {
  display: block; width: 24px; height: 38px; border: 2px solid rgba(255,255,255,.5); border-radius: 14px; position: relative;
}
.oz-hero__scroll span::after {
  content: ''; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--gold-soft); border-radius: 2px; animation: oz-scroll 1.6s infinite;
}
@keyframes oz-scroll { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 80% { opacity: 0; transform: translateY(12px); } 100% { opacity: 0; } }

/* ---------- Текстовые секции ---------- */
.oz-lead { padding: 84px 0 20px; }
.oz-lead__text {
  font-family: 'Playfair Display', serif; font-size: clamp(22px, 3.2vw, 30px) !important;
  line-height: 1.4 !important; color: var(--ink) !important; margin-bottom: 26px !important;
}
.oz-text { padding: 56px 0; }

/* ---------- Split (медиа + текст) ---------- */
.oz-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px);
  align-items: center; max-width: 1180px; margin: 0 auto; padding: 64px 24px;
}
.oz-split--rev .oz-split__media { order: 2; }
.oz-split__media { width: 100%; }
.oz-split__media .oz-photo { min-height: 360px; }

/* ---------- Цитата ---------- */
.oz-quote { padding: 40px 0 64px; }
.oz-quote__in { text-align: center; position: relative; }
.oz-quote__mark {
  font-family: 'Playfair Display', serif; font-size: 120px; line-height: .5; color: var(--gold);
  opacity: .35; margin-bottom: 8px; height: 60px;
}
.oz-quote blockquote {
  font-family: 'Playfair Display', serif; font-style: italic; font-weight: 500;
  font-size: clamp(21px, 3vw, 30px); line-height: 1.45; color: var(--ink); margin: 0 auto 22px; max-width: 760px;
}
.oz-quote__author { font-size: 14px; letter-spacing: .04em; color: var(--bordo); font-weight: 600; }

/* ---------- Feature (дракон) — тёмная широкая ---------- */
.oz-feature {
  position: relative; background: linear-gradient(150deg, #3a1119, #6B1D2A 70%);
  color: #fff; padding: clamp(48px, 6vw, 80px) 24px; margin: 40px 0;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px);
  align-items: center; max-width: 1280px; margin-left: auto; margin-right: auto; border-radius: 16px;
}
.oz-feature__media .oz-photo { min-height: 320px; background: rgba(255,255,255,.06); border-color: rgba(201,185,140,.5); }
.oz-feature__media .oz-photo__label { color: rgba(255,255,255,.6); }
.oz-feature__media .oz-photo__label b { color: var(--gold-soft); }
.oz-feature__media .oz-photo__ic { color: var(--gold-soft); }
.oz-feature p { color: rgba(255,255,255,.85); }
/* дракон: текст сверху по центру, плитка фото снизу на всю ширину */
.oz-feature--stack { display: block; }
.oz-feature--stack .oz-feature__body { max-width: 760px; margin: 0 auto; text-align: center; }

/* ---------- Герб ---------- */
.oz-crest { padding: 64px 0; background: var(--cream); }
.oz-crest__in { display: grid; grid-template-columns: 260px 1fr; gap: clamp(28px, 4vw, 52px); align-items: center; max-width: 900px; }
.oz-crest__media .oz-photo { max-width: 260px; }

/* ---------- Питомцы ---------- */
.oz-pets { padding: 64px 0; }
.oz-pets__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 44px); }
.oz-pet .oz-photo { margin-bottom: 20px; min-height: 240px; }
.oz-pet__name { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--bordo); margin: 0 0 10px; }

/* ---------- Возвращаются ---------- */
.oz-return { padding: 56px 0 72px; }

/* ---------- Финал / CTA ---------- */
.oz-final { position: relative; overflow: hidden; color: #fff; padding: clamp(64px, 8vw, 110px) 0; text-align: center; margin-top: 40px; }
.oz-final__bg {
  position: absolute; inset: -12% 0 0; z-index: 0; will-change: transform;
  background: radial-gradient(120% 90% at 50% 10%, rgba(139,45,58,.4), transparent 55%),
              linear-gradient(160deg, #2c0d13, #6B1D2A 60%, #3a1119);
}
.oz-final__scrim { position: absolute; inset: 0; z-index: 1; background: rgba(20,8,12,.4); }
.oz-final__in { position: relative; z-index: 2; }
.oz-final__title { font-family: 'Playfair Display', serif; font-weight: 600; font-size: clamp(26px, 4vw, 42px); line-height: 1.2; margin: 0 0 20px; color: #fff; }
.oz-final__lead { font-size: clamp(16px, 2vw, 18.5px); line-height: 1.7; color: rgba(255,255,255,.96) !important; max-width: 680px; margin: 0 auto 30px; text-shadow: 0 1px 10px rgba(0,0,0,.3); }
.oz-final__list { list-style: none; margin: 0 auto 30px; padding: 0; max-width: 560px; text-align: left; display: inline-block; }
.oz-final__list li { position: relative; padding: 8px 0 8px 30px; font-size: 15.5px; color: rgba(255,255,255,.88); border-bottom: 1px solid rgba(255,255,255,.1); }
.oz-final__list li:last-child { border-bottom: none; }
.oz-final__list li::before { content: '✦'; position: absolute; left: 4px; color: var(--gold-soft); }
.oz-final__cta-hint { font-family: 'Playfair Display', serif; font-style: italic; font-size: clamp(17px, 2.2vw, 21px); color: var(--gold-soft) !important; margin: 0 auto 32px !important; max-width: 620px; }
.oz-final__cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.oz-btn { display: inline-flex; align-items: center; justify-content: center; padding: 15px 34px; border-radius: 4px; font-size: 15px; font-weight: 700; text-decoration: none; transition: all .3s; }
.oz-btn--gold { background: var(--gold); color: var(--ink); }
.oz-btn--gold:hover { background: var(--gold-soft); transform: translateY(-2px); }
.oz-btn--ghost { border: 2px solid rgba(255,255,255,.6); color: #fff; }
.oz-btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.1); }

/* ---------- Постепенное раскрытие блоков (CSS-driven) ---------- */
.reveal { opacity: 1; }
/* элементы блока скрыты до появления секции */
.reveal .oz-kicker, .reveal .oz-h2, .reveal p, .reveal blockquote,
.reveal .oz-quote__mark, .reveal .oz-quote__author, .reveal .oz-lead__text,
.reveal .oz-accent, .reveal .oz-pet__name, .reveal .oz-final__title,
.reveal .oz-final__lead, .reveal .oz-final__list, .reveal .oz-final__cta-hint, .reveal .oz-final__cta {
  opacity: 0; transform: translateY(30px);
  transition: opacity .8s cubic-bezier(.16,.72,.3,1), transform .8s cubic-bezier(.16,.72,.3,1);
}
.reveal .oz-photo, .reveal .oz-slider, .reveal .oz-grow, .reveal .oz-mosaic {
  opacity: 0; transform: scale(1.06);
  transition: opacity 1s ease, transform 1.1s cubic-bezier(.16,.72,.3,1);
}
.reveal .oz-grow, .reveal .oz-mosaic { transform: translateY(30px); }
/* появление */
.reveal.is-visible .oz-kicker, .reveal.is-visible .oz-h2, .reveal.is-visible p,
.reveal.is-visible blockquote, .reveal.is-visible .oz-quote__mark, .reveal.is-visible .oz-quote__author,
.reveal.is-visible .oz-lead__text, .reveal.is-visible .oz-accent, .reveal.is-visible .oz-pet__name,
.reveal.is-visible .oz-final__title, .reveal.is-visible .oz-final__lead, .reveal.is-visible .oz-final__list,
.reveal.is-visible .oz-final__cta-hint, .reveal.is-visible .oz-final__cta,
.reveal.is-visible .oz-photo, .reveal.is-visible .oz-slider,
.reveal.is-visible .oz-grow, .reveal.is-visible .oz-mosaic { opacity: 1; transform: none; }
/* постепенное раскрытие (stagger по типу) */
.reveal.is-visible .oz-h2 { transition-delay: .12s; }
.reveal.is-visible p, .reveal.is-visible blockquote, .reveal.is-visible .oz-lead__text, .reveal.is-visible .oz-accent { transition-delay: .22s; }
.reveal.is-visible .oz-quote__author, .reveal.is-visible .oz-final__list, .reveal.is-visible .oz-final__cta-hint { transition-delay: .32s; }
.reveal.is-visible .oz-final__cta { transition-delay: .42s; }
@media (prefers-reduced-motion: reduce) {
  .reveal .oz-kicker, .reveal .oz-h2, .reveal p, .reveal blockquote, .reveal .oz-quote__mark,
  .reveal .oz-quote__author, .reveal .oz-lead__text, .reveal .oz-accent, .reveal .oz-pet__name,
  .reveal .oz-final__title, .reveal .oz-final__lead, .reveal .oz-final__list, .reveal .oz-final__cta-hint,
  .reveal .oz-final__cta, .reveal .oz-photo, .reveal .oz-slider,
  .reveal .oz-grow, .reveal .oz-mosaic { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ---------- Адаптив ---------- */
@media (max-width: 860px) {
  .oz-split, .oz-feature { grid-template-columns: 1fr; }
  .oz-split--rev .oz-split__media { order: 0; }
  .oz-crest__in { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  /* явная ширина: при justify-items:center блок сжимался по контенту (img absolute) до 0 → герб пропадал на мобиле */
  .oz-crest__media { width: 100%; max-width: 260px; }
  .oz-crest__media .oz-photo { margin: 0 auto; }
  .oz-pets__grid { grid-template-columns: 1fr; }
  .oz-hero { min-height: 76vh; }
}
@media (max-width: 560px) {
  .oz p { font-size: 15.5px; }
  .oz-lead { padding: 56px 0 12px; }
  .oz-split, .oz-text, .oz-crest, .oz-pets, .oz-return { padding-left: 20px; padding-right: 20px; }
  .oz-feature { margin: 24px 12px; border-radius: 12px; }
}
