/**
 * @description Оформление сцен, навигации и контактных блоков сайта «Цитадель».
 */
@font-face {
  font-family: Manrope;
  src: url('fonts/manrope.ttf') format('truetype');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: Prata;
  src: url('fonts/prata.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
:root { --ink: #263e34; --muted: #6d765e; --paper: #f7f2e6; --gold: #ad8d51; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Manrope, Arial, sans-serif; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #9b7e44; outline-offset: 5px; }
header { position: fixed; inset: 0 0 auto; height: 104px; padding: 0 5%; display: flex; align-items: center; justify-content: space-between; gap: 20px; z-index: 20; background: linear-gradient(#f9f4e6dc, #f9f4e655 70%, transparent); }
.brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 13px; }
.brand-mark { font-size: 38px; color: #3f5c49; }
.brand>span:last-child { font-size: 21px; letter-spacing: 5px; }
.brand small { display: block; font-size: 7px; letter-spacing: 2px; margin-top: 6px; color: #8c794e; }
nav { display: flex; gap: 25px; }
nav button { background: none; border: 0; font-size: 10px; padding: 9px 0; position: relative; }
nav button:after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: var(--gold); transition: width .3s; }
nav button:hover:after, nav button.selected:after { width: 100%; }
.contact { background: #fbf8ec77; border: 1px solid #70806a55; padding: 14px 21px; font-size: 11px; }
.contact span { color: #a3864e; margin-left: 23px; }
#journey { height: 690vh; }
.viewport { height: 100svh; position: sticky; top: 0; overflow: hidden; isolation: isolate; background: #ede8d6; }
.exterior, .scene, .art-frame, .foreground { position: absolute; inset: 0; pointer-events: none; }
.scene { z-index: 0; opacity: 0; }
.art-frame { opacity: 0; transform-origin: 35% 52%; overflow: hidden; will-change: transform, opacity; }
.scene-art { position: absolute; width: max(100vw, 177.778svh); height: max(100svh, 56.25vw); left: 50%; top: 50%; transform: translate(-50%, -50%); background-image: url('art/scenes-team.png'); background-repeat: no-repeat; background-size: 200% 200%; }
.scene-art-1 { background-position: 0 0; }
.scene-art-2 { background-position: 100% 0; }
.scene-art-3 { background-position: 0 100%; }
.scene-art-4 { background-position: 100% 100%; }
.exterior { z-index: 1; backface-visibility: hidden; }
.exterior img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foreground { z-index: 3; background: url('art/foreground.png') center / cover no-repeat; transform-origin: 50% 100%; will-change: transform; }
.readability-wash { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg,#fbf4e533,transparent 50%), linear-gradient(0deg,#162f2a55,transparent 17%); }
body:not([data-scene='0']) .readability-wash { background: linear-gradient(90deg,transparent 35%,#f3eddd25), linear-gradient(0deg,#172e2740,transparent 20%); }
.intro { position: absolute; z-index: 5; left: 6%; top: 22%; width: 49%; text-shadow: 0 1px 15px #fff8e655; }
.eyebrow { display: flex; align-items: center; gap: 12px; font-size: 8px; letter-spacing: 3px; color: #7f794f; }
.eyebrow>span { width: 34px; height: 1px; background: #b29c67; }
h1 { font: 400 clamp(33px, 3.7vw, 62px)/1.3 Prata, Georgia, serif; letter-spacing: -1.5px; margin: 27px 0 22px; }
h1 em { font-style: normal; color: #53603b; }
.intro p { font-size: 12px; line-height: 2; color: #52604c; }
.enter { margin-top: 22px; padding: 17px 23px; border: 1px solid #3e5743; background: #2f4b3df5; color: #fcf4df; font-size: 11px; box-shadow: 0 8px 20px #243c3420; }
.enter span { margin-left: 40px; color: #d6bf8a; }
.enter:hover, .service-cta:hover { background: #4b6348; }
.landmark-note { margin-top: 24px; font-size: 9px; line-height: 1.8; color: #596348; }
.landmark-note span { color: #7a7f63; font-size: 8px; }
.plaque { position: absolute; z-index: 6; width: min(420px, 36vw); right: 8%; top: 18%; max-height: 72svh; overflow: auto; scrollbar-width: thin; scrollbar-color: #b9b99b transparent; padding: 29px 31px; background: linear-gradient(135deg,#fffdf3f5,#f5efdfed); border: 1px solid #b5a47a66; border-radius: 3px; box-shadow: 0 18px 65px #26392c29, inset 0 0 0 5px #fffaf21a; opacity: 0; transform: translate3d(0,18px,0); transition: opacity .55s, transform .65s; }
.plaque.active { opacity: 1; transform: translate3d(0,0,0); }
.plaque-top { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.plaque-top>small { color: #8d7c4e; font-size: 7px; letter-spacing: 1.5px; line-height: 1.8; }
.plaque-top>span { font-size: 17px; color: #b09a64; }
.plaque h2 { font: 400 clamp(25px,2.3vw,34px)/1.3 Prata, Georgia, serif; margin: 18px 0; letter-spacing: -.5px; }
.plaque>p { font-size: 11px; color: #65705a; line-height: 1.85; margin: 0 0 20px; }
.service-tabs { display: flex; gap: 6px; margin: 0 0 12px; }
.service-tabs button { border: 1px solid #a2a78b55; background: transparent; padding: 11px 7px; font-size: 9px; flex: 1; border-radius: 2px; }
.service-tabs button[aria-selected='true'] { background: #4b634b; color: #fff7e4; border-color: #4b634b; }
.service-list details { border-top: 1px solid #a7aa8a44; }
.service-list summary { padding: 11px 20px 11px 0; font-size: 11px; line-height: 1.55; cursor: pointer; list-style: none; position: relative; }
.service-list summary::-webkit-details-marker { display: none; }
.service-list summary:after { content: '+'; position: absolute; right: 1px; top: 9px; color: #9a8d5d; font-size: 17px; }
.service-list details[open] summary:after { content: '−'; }
.service-list details p { font-size: 10px; line-height: 1.8; color: #728066; margin: 0 0 13px; }
.service-cta { margin-top: 19px; padding: 15px 16px; width: 100%; border: 0; border-radius: 2px; background: #3d5946; color: #fbf4e4; display: flex; justify-content: space-between; font-size: 10px; }
.contacts { padding: 0; list-style: none; margin: 23px 0; }
.contacts li { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid #aaa98b33; align-items: flex-start; }
.contacts svg { width: 18px; height: 18px; margin-top: 10px; color: #a18c58; flex: 0 0 18px; }
.contacts a { text-decoration: none; color: #3c5542; font-size: 12px; line-height: 1.7; }
.contacts small { display: block; color: #9b956e; font-size: 6px; letter-spacing: 1.5px; margin-bottom: 4px; }
.contacts a span { display: block; font-size: 10px; color: #7c8267; }
.contacts a:hover { text-decoration: underline; }
.contact-actions { display: flex; gap: 9px; }
.contact-actions a { flex: 1; padding: 12px 8px; text-align: center; background: #3c5744; color: #fff8e5; border: 1px solid #3c5744; text-decoration: none; font-size: 10px; }
.contact-actions a:last-child { background: transparent; color: #3c5744; }
.location { position: absolute; bottom: 35px; left: 5%; z-index: 7; display: flex; align-items: center; gap: 19px; color: #fff4d7; text-shadow: 0 1px 8px #213b2b55; }
.location>span { font: 43px Prata, Georgia, serif; }
.location small { display: block; font-size: 6px; letter-spacing: 2px; margin-bottom: 5px; color: #f0e7c9; }
.location b { display: block; max-width: 220px; font-size: 9px; line-height: 1.5; font-weight: 400; }
.scrollhint { position: absolute; z-index: 7; bottom: 29px; left: 50%; transform: translateX(-50%); color: #fff1d6; text-align: center; font-size: 6px; letter-spacing: 2px; text-shadow: 0 1px 5px #29402a77; }
.scrollhint span { display: block; font-size: 22px; margin-top: 12px; }
.progress { position: absolute; z-index: 8; right: 2.5%; top: 42%; text-align: center; }
#dots { display: flex; flex-direction: column; gap: 16px; align-items: center; }
#dots button { position: relative; width: 7px; height: 7px; padding: 0; border: 1px solid #6d7a55; border-radius: 50%; background: #f8f1df55; box-shadow: 0 0 0 4px #f8f2e122; }
#dots button.active { background: #4b664b; box-shadow: 0 0 0 4px #f8f2e155; }
#dots button span { display: none; position: absolute; white-space: nowrap; right: 18px; top: -7px; font-size: 9px; padding: 4px 8px; background: #faf5e5; border: 1px solid #b0ae8b44; }
#dots button:hover span, #dots button:focus-visible span { display: block; }
.progress>small { display: block; margin-top: 19px; font-size: 8px; color: #435b40; background: #faf2db99; padding: 3px 5px; border-radius: 2px; }
.back { position: absolute; z-index: 7; bottom: 38px; right: 5%; color: #fff1d6; border: 0; background: none; font-size: 9px; text-shadow: 0 1px 5px #29402a77; }
#load-status { position: absolute; z-index: 10; top: 50%; left: 10%; color: #823f29; }
@media(min-width:1500px) { .intro { top: 24%; } .plaque { right: 10%; } }
@media(max-width:1050px) { nav { gap: 15px; } nav button { font-size: 8px; } .brand>span:last-child { font-size: 17px; } .plaque { right: 7%; width: 40vw; padding: 24px; } .intro { width: 58%; } h1 { font-size: 38px; } }
@media(max-width:760px) {
   header { height: 85px; padding: 0 6%; }
   nav { display: none; }
   .brand-mark { font-size: 30px; }
   .brand>span:last-child { font-size: 16px; letter-spacing: 3px; }
   .brand small { font-size: 6px; letter-spacing: 1.1px; }
   .contact { padding: 11px 13px; font-size: 9px; }
   .contact span { margin-left: 13px; }
   .intro { left: 7%; top: 16%; width: 85%; }
   .eyebrow { font-size: 7px; letter-spacing: 2px; }
   h1 { font-size: clamp(27px,6.7vw,38px); margin: 19px 0 13px; letter-spacing: -.6px; }
   .intro p { font-size: 10px; line-height: 1.85; }
   .enter { padding: 14px 18px; margin-top: 13px; font-size: 10px; }
   .landmark-note { margin-top: 17px; font-size: 8px; }
   .exterior img { object-position: 59% center; }
   .readability-wash { background: linear-gradient(#faf3e6b0,transparent 52%),linear-gradient(0deg,#18382a77,transparent 22%); }
   .scene-art { left: 0; transform: translate(0,-50%); }
   .plaque { width: 85%; right: 7.5%; top: 19%; max-height: 69svh; padding: 22px 23px; background: linear-gradient(135deg,#fffdf3f2,#f5efdfef); }
   .plaque h2 { font-size: 26px; margin: 15px 0; }
   .plaque>p { font-size: 10px; margin-bottom: 16px; }
   .plaque-top>small { font-size: 6px; }
   .service-list summary { font-size: 10px; padding: 10px 18px 10px 0; }
   .service-tabs button { font-size: 9px; padding: 10px 5px; }
   .foreground { opacity: .4; background-position: center; }
   .location { bottom: 29px; left: 6%; gap: 11px; }
   .location>span { font-size: 31px; }
   .location b { font-size: 8px; max-width: 155px; }
   .location small { font-size: 5px; letter-spacing: 1px; }
   .scrollhint { display: none; }
   .progress { right: 2.5%; top: 40%; }
   #dots { gap: 14px; }
   #dots button { width: 5px; height: 5px; box-shadow: none; }
   .back { right: 6%; bottom: 35px; font-size: 8px; }
}
@media(max-height:650px) { .plaque { top: 16%; max-height: 70svh; padding: 20px 25px; } .plaque h2 { font-size: 25px; margin: 10px 0; } .landmark-note { display: none; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } .plaque, nav button:after { transition: none; } }

/* Сохраняем персонажей в кадре при разных пропорциях экрана. */
.scene-art { left: 0; transform: translateY(-50%); }
@media(max-width:760px) {
   body:not([data-scene='0']) .plaque { top: 41%; max-height: 49svh; padding: 18px 21px; }
   body:not([data-scene='0']) .plaque h2 { font-size: 21px; margin: 10px 0; }
   body:not([data-scene='0']) .plaque>p { font-size: 9px; margin-bottom: 12px; }
   .scene-art { top: 0; left: 0; transform: none; width: max(100vw,106.667svh); height: 60svh; }
   .foreground { background-size: 100% 100%; }
}
/* Независимые створки с шарнирами у каменных косяков. */
.gate-stage { position: absolute; perspective: 420px; transform-style: preserve-3d; }
.gate-door { position: absolute; top: 0; width: 50%; height: 100%; transform-style: preserve-3d; backface-visibility: visible; filter: drop-shadow(1px 0 2px #392d2940); }
.gate-left { left: 0; transform-origin: 0 65%; }
.gate-right { right: 0; transform-origin: 100% 65%; }
.gate-door svg { display: block; width: 100%; height: 100%; overflow: visible; }
.gate-right svg { transform: scaleX(-1); }
/* Более крупная типографика для чтения услуг. */
nav button { font-size: 13px; }
.contact { font-size: 14px; }
.eyebrow { font-size: 11px; }
.intro p { font-size: 16px; line-height: 1.8; }
.enter { font-size: 14px; padding: 18px 25px; }
.landmark-note { font-size: 12px; }
.landmark-note span { font-size: 11px; }
.plaque { width: min(510px,42vw); top: 15%; max-height: 77svh; padding: 30px 33px; }
.plaque h2 { font-size: clamp(30px,2.7vw,40px); line-height: 1.25; }
.plaque-top>small { font-size: 10px; letter-spacing: 1px; }
.plaque>p { font-size: 14px; line-height: 1.8; }
.service-tabs button { font-size: 12px; padding: 13px 8px; }
.service-list summary { font-size: 14px; padding-top: 13px; padding-bottom: 13px; }
.service-list details p { font-size: 13px; line-height: 1.8; }
.service-cta { font-size: 14px; padding: 16px 18px; }
.contacts a { font-size: 17px; }
.contacts small { font-size: 10px; letter-spacing: 1px; }
.contacts a span { font-size: 14px; }
.contacts svg { width: 22px; height: 22px; flex-basis: 22px; }
.contact-actions a { font-size: 14px; }
.location small { font-size: 9px; }
.location b { font-size: 12px; max-width: 260px; }
.scrollhint { font-size: 9px; letter-spacing: 1px; }
.back { font-size: 12px; }
.progress>small { font-size: 11px; }
@media(max-width:1100px) { nav { gap: 13px; } nav button { font-size: 11px; } .plaque { width: 44vw; right: 7%; padding: 25px; } .plaque h2 { font-size: 30px; } }
@media(max-width:760px) {
   .contact { font-size: 12px; }
   .eyebrow { font-size: 9px; }
   .intro p { font-size: 13px; }
   .enter { font-size: 13px; padding: 16px 20px; }
   .landmark-note { font-size: 10px; }
   .landmark-note span { font-size: 9px; }
   body:not([data-scene='0']) .plaque { top: 37%; max-height: 53svh; width: 86%; right: 7%; padding: 21px; }
   body:not([data-scene='0']) .plaque h2 { font-size: 26px; }
   body:not([data-scene='0']) .plaque>p { font-size: 13px; }
   .plaque-top>small { font-size: 8px; }
   .service-tabs button { font-size: 11px; padding: 12px 5px; }
   .service-list summary { font-size: 13px; padding-top: 12px; padding-bottom: 12px; }
   .service-list details p { font-size: 12px; }
   .service-cta { font-size: 13px; }
   .contacts a { font-size: 15px; }
   .contacts small { font-size: 9px; }
   .contacts a span { font-size: 12px; }
   .contact-actions a { font-size: 12px; }
   .location small { font-size: 7px; }
   .location b { font-size: 10px; max-width: 175px; }
   .back { font-size: 10px; }
   .progress>small { font-size: 9px; }
}

/* Проводница — независимый слой поверх иллюстрации. */
.guide { position:absolute; z-index:9; left:43%; bottom:10%; width:250px; height:375px; transition:left .7s ease,bottom .7s ease,width .7s ease,height .7s ease,opacity .35s; }
.guide-portrait { width:100%; height:100%; padding:0; border:0; background:none; cursor:pointer; }
.guide-portrait img { width:100%; height:100%; object-fit:contain; display:block; filter:drop-shadow(0 10px 8px #233d2d1a); }
.guide-note { position:absolute; top:112px; right:225px; width:250px; padding:17px 18px; background:#fcf7eaf5; border:1px solid #b6a47866; border-radius:8px 8px 0 8px; box-shadow:0 8px 30px #3c4d3320; }
.guide-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.guide-heading small { font-size:9px; letter-spacing:1.5px; color:#9c8857; }
.guide-close { padding:0 3px; font-size:20px; border:0; background:none; color:#8b9879; line-height:1; }
.guide-note p { font-size:13px; line-height:1.75; margin:9px 0 12px; color:#475d43; }
.guide-next { width:100%; text-align:left; border:0; background:none; padding:0; display:flex; justify-content:space-between; font-size:12px; color:#3c6047; }
.guide-next:hover { text-decoration:underline; }
.guide.is-collapsed .guide-note { display:none; }
body:not([data-scene='0']) .guide { left:22px; bottom:107px; width:106px; height:159px; }
body:not([data-scene='0']) .guide-note { top:10px; right:auto; left:111px; width:255px; padding:13px 16px; }
body:not([data-scene='0']) .guide-note p { font-size:12px; margin:7px 0; }
body:not([data-scene='0']) .guide-heading small { font-size:8px; }
@media(min-width:1500px) { .guide { left:43%; width:290px; height:435px; } .guide-note { right:260px; top:160px; } }
@media(prefers-reduced-motion:reduce) { .guide { transition:none; } }
/* В первой сцене показываем оба встречных рабочих места целиком. */
.art-frame-1 { background:#e7dbc1; }
.art-frame-1:before { content:''; position:absolute; inset:-35px; background: url('art/scenes-team.png') 0 0 / 200% 200%; filter:blur(25px); opacity:.22; }
.art-frame-1 .scene-art { width:100vw; height:56.25vw; top:50%; left:0; transform:translateY(-50%); }
body[data-scene='1'] .plaque { top:53%; max-height:38svh; }
body[data-scene='1'] .plaque h2 { font-size:29px; margin:12px 0; }
body[data-scene='1'] .plaque>p { margin-bottom:14px; }
body[data-scene='1'] .guide-note { top:0; }

/* Геодезист по фотографии сотрудника. */
.art-frame-2 .scene-art, .art-frame-4 .scene-art { background-image:url('art/scenes-stylized.png'); }
/* Оставляем лицо Оксаны Петровны слева от контактной панели. */
.art-frame-4 .scene-art { left:-22vw; width:max(120vw,210svh); height:max(118.125svh,67.5vw); }

/* Просторная композиция настольной версии и непрозрачные поверхности текста. */
@media(min-width:761px) {
   header { height:90px; background:#faf6ec; border-bottom:1px solid #d9d2bd; }
   .exterior { background:#eae5d6; }
   .exterior img { object-fit:contain; }
   .art-frame { background:#e8e2d2; transform-origin:50% 50%; }
   .art-frame-1:before { display:none; }
   .art-frame .scene-art { width:100vw; height:56.25vw; left:0; top:50%; transform:translateY(-50%); }
   .foreground { opacity:.28; }
   .readability-wash, body:not([data-scene='0']) .readability-wash { background:linear-gradient(0deg,#f7f2e6 0,transparent 15%); }
   .intro { left:4%; top:18%; width:43%; padding:25px 29px; background:#faf6ec; border:1px solid #d4c9ac; border-radius:9px; text-shadow:none; box-shadow:0 8px 35px #263e3412; }
   h1 { font-size:clamp(30px,3vw,49px); margin:18px 0; line-height:1.3; }
   .intro p { color:#354d3d; }
   .eyebrow, .landmark-note, .landmark-note span { color:#586044; }
   .landmark-note { margin-top:18px; }
   .enter { margin-top:14px; }
   .plaque, body[data-scene='1'] .plaque { top:calc(90px + 3vh); right:5.5%; width:42%; max-height:calc(100svh - 205px); padding:25px 29px; background:#fcf8ed; border:1px solid #c9bd9e; border-radius:9px; box-shadow:0 10px 36px #263e3420; }
   .plaque h2, body[data-scene='1'] .plaque h2 { font-size:clamp(28px,2.5vw,38px); margin:14px 0; }
   .plaque>p, body[data-scene='1'] .plaque>p { margin-bottom:17px; color:#445540; line-height:1.65; }
   .plaque-top>small, .contacts small { color:#74613b; }
   .service-list details p { color:#45593f; }
   .guide { left:58%; bottom:3%; width:24svh; height:36svh; transition:opacity .35s; }
   .guide:before { content:''; position:absolute; z-index:-1; width:52%; height:12px; left:19%; bottom:2px; background:#34433155; border-radius:50%; filter:blur(4px); }
   .guide-note { top:18%; right:auto; left:100%; width:235px; background:#fcf8ed; border-color:#c9bd9e; }
   .guide-portrait img { filter:drop-shadow(2px 3px 2px #233d2d30); }
   .guide-heading small { color:#74613b; }
   .guide-note p { color:#354d3d; font-size:14px; line-height:1.65; }
   body:not([data-scene='0']) .guide { left:26px; bottom:100px; width:88px; height:132px; }
   body:not([data-scene='0']) .guide-note, body[data-scene='1'] .guide-note { top:0; left:95px; width:245px; background:#fcf8ed; }
   body:not([data-scene='0']) .guide-note p { font-size:13px; }
   .location { bottom:19px; padding:9px 15px; gap:12px; background:#fcf8ed; color:#263e34; border:1px solid #d4c9ac; border-radius:6px; text-shadow:none; }
   .location>span { font-size:31px; }
   .location small { color:#586044; }
   .location b { font-size:13px; }
   .scrollhint { bottom:20px; color:#263e34; text-shadow:none; background:#fcf8ed; padding:9px 16px; border-radius:6px; }
   .scrollhint span { margin-top:4px; }
   .back { bottom:26px; color:#263e34; background:#fcf8ed; padding:12px 15px; border:1px solid #d4c9ac; border-radius:6px; text-shadow:none; }
   .progress>small { background:#fcf8ed; }
}
@media(min-width:761px) {
   .art-frame-1 .scene-art { background-image:url('art/engineers-wide.png'); background-size:100% 100%; background-position:center; }
}
@media(min-width:761px) {
   body[data-scene='0'] .guide { bottom:max(12px,calc((100svh - 56.28vw)/2 + 12px)); }
}
@media(min-width:761px) {
   body:not([data-scene='0']) .guide { bottom:max(100px,calc((100svh - 56.25vw)/2 + 12px)); }
}
@media(min-width:761px) {
   body:not([data-scene='0']) .guide { bottom:110px; height:88px; }
   body:not([data-scene='0']) .guide:before { display:none; }
   body:not([data-scene='0']) .guide-portrait { width:88px; height:88px; overflow:hidden; border-radius:50%; border:2px solid #fcf8ed; background:#e4ddc8; box-shadow:0 4px 15px #263e3420; }
   body:not([data-scene='0']) .guide-portrait img { width:88px; height:132px; object-fit:contain; transform:scale(2.15); transform-origin:50% 0; filter:none; }
   body:not([data-scene='0']) .guide-note { top:auto; bottom:0; }
}

/* Полноэкранные сцены: отдаление нарисовано в самой иллюстрации. */
@media(min-width:761px) {
   .exterior img { object-fit:cover; }
   .art-frame .scene-art { width:max(100vw,177.778svh); height:max(100svh,56.25vw); top:50%; left:0; transform:translateY(-50%); background-image:url('art/scenes-depth-final.png'); background-size:200% 200%; }
   .art-frame-1 .scene-art { background-position:0 0; }
   .art-frame-2 .scene-art { background-position:100% 0; }
   .art-frame-3 .scene-art { background-position:0 100%; }
   .art-frame-4 .scene-art { background-position:100% 100%; }
   .readability-wash, body:not([data-scene='0']) .readability-wash { background:none; }
   body[data-scene='0'] .guide { bottom:max(96px,9svh); }
   .guide-heading { justify-content:flex-end; height:10px; }
   .guide-note p { margin-top:5px; }
}
@media(min-width:761px) {
   header { background:linear-gradient(180deg,#faf6ecc9,#faf6ec82); border-bottom:1px solid #f9f5e55c; }
   .intro { width:40%; }
   h1 { font-size:clamp(30px,2.8vw,46px); }
}

/* Каждая сцена использует отдельный полноразмерный рисунок. */
@media(min-width:761px) {
   .art-frame .scene-art { background-size:100% 100%; background-position:center; }
   .art-frame-1 .scene-art { background-image:url('art/scene-1-hd.png'); }
   .art-frame-2 .scene-art { background-image:url('art/scene-2-style-fixed.png'); }
   .art-frame-3 .scene-art { background-image:url('art/scene-3-hd.png'); }
   .art-frame-4 .scene-art { background-image:url('art/scene-4-style-fixed.png'); }
}

/* Детали окружения меняются отдельными слоями, лица остаются в исходной сцене. */
.scene-detail { position:absolute; inset:0; background-size:100% 100%; background-repeat:no-repeat; pointer-events:none; }
.detail-flag { background-image:url('art/scene-3-russia.png'); clip-path:polygon(30.3% 24%,33.5% 24%,33.5% 50%,30.3% 50%); }
.detail-chair { background-image:url('art/oksana-red-chair-balanced.png'); clip-path:inset(42.5% 76% 43.5% 12.6%); }
.detail-orchid { background-image:url('art/scene-4-orchid.png'); clip-path:polygon(37.3% 32.8%,48.5% 32.8%,48.5% 57.5%,37.3% 57.5%); }

/* Только согласованные коррекции людей, остальная иллюстрация неизменна. */
.detail-engineer-left { background-image:url('art/engineers-natural-faces.png'); clip-path:inset(40.5% 89% 48.2% 4.3%); }
.detail-engineer-right { background-image:url('art/engineers-natural-faces.png'); clip-path:inset(43% 62.7% 45.5% 31%); }
.detail-surveyor-face { background-image:url('art/surveyor-photo-20261023.png'); clip-path:inset(30.2% 79% 57% 15%); }
.detail-oksana-person { background-image:url('art/oksana-balanced.png'); clip-path:inset(30.7% 64.2% 42.8% 17.3%); }

/* Знак башни с восходящим солнцем; слово и знак на общей базовой линии. */
.brand { align-items:flex-end; gap:10px; }
.brand .brand-mark { display:block; width:48px; height:42px; color:#3f5c49; flex:0 0 48px; margin-bottom:-2px; }
.brand>span:last-child { position:relative; line-height:1; padding-bottom:0; margin-bottom:0; }
.brand small { position:absolute; top:100%; left:0; white-space:nowrap; margin-top:8px; }
body[data-scene='4'] .scrollhint { display:none; }
.gate-preview { position:absolute; inset:0; background:url('art/scene-1-hd.png') 20% center / cover no-repeat; clip-path:polygon(0 100%,0 37%,10% 19%,27% 7%,50% 0,73% 7%,90% 19%,100% 37%,100% 100%); }
.gate-door { z-index:1; }
.art-frame:first-child { transform-origin:50% 52%; }

.foreground { z-index:5; }

/* Компактный фирменный знак без мелкой подписи. */
.brand { align-items:center; gap:11px; }
.brand .brand-mark { width:47px; height:43px; flex-basis:47px; margin:0; }
.brand>span:last-child { font-size:25px; font-weight:500; letter-spacing:2px; line-height:1; padding-top:7px; }
.gate-preview { filter:blur(.7px); }

/* Новый знак: крепостные ворота и солнечный горизонт. */
.brand { gap:12px; align-items:center; }
.brand .brand-mark { width:51px; height:46px; flex-basis:51px; }
.brand>span:last-child { font:400 25px/1 Prata,Georgia,serif; letter-spacing:.4px; padding-top:9px; }

/* Утверждённый вариант 2: ровная башня, восходящее солнце, шрифтовая надпись. */
.brand { display:flex; flex-shrink:0; gap:9px; align-items:flex-end; color:#2d4c3f; }
.brand-symbol { display:block; width:72px; height:68px; flex:0 0 72px; }
.brand>span:last-child { font:400 28px/1 Prata,Georgia,serif; letter-spacing:-.7px; padding:0; margin-bottom:5px; }

/* Утверждённый рисунок целиком: исходные знак и надпись без перерисовки. */
.brand { display:block; width:250px; height:auto; flex:0 0 250px; line-height:0; }
.brand-approved { display:block; width:100%; height:auto; aspect-ratio:1490/485; overflow:hidden; }

/* Компактные панели по содержимому и открытая нижняя навигация. */
@media(min-width:761px) {
   .plaque, body[data-scene='1'] .plaque { width:min(430px,37vw); padding:20px 23px; height:auto; min-height:0; max-height:calc(100svh - 195px); }
   .plaque h2, body[data-scene='1'] .plaque h2 { font-size:clamp(26px,2.15vw,32px); line-height:1.25; margin:11px 0; }
   .plaque>p, body[data-scene='1'] .plaque>p { font-size:14px; line-height:1.55; margin-bottom:13px; }
   .service-tabs { margin-bottom:8px; }
   .service-tabs button { padding:10px 7px; }
   .service-list summary { padding-top:10px; padding-bottom:10px; }
   .service-cta { padding:12px 15px; margin-top:13px; }
   .contacts { margin:15px 0; }
   .contacts li { padding:10px 0; }
   .contact-actions a { padding:10px 7px; }
   .intro { width:min(480px,40%); padding:20px 24px; }
   .intro h1 { font-size:clamp(29px,2.6vw,40px); margin:15px 0; line-height:1.25; }
   .intro p { margin:12px 0; font-size:15px; line-height:1.6; }
   .enter { padding:14px 19px; margin-top:8px; }
   .landmark-note { margin-top:15px; }
   .guide-note, body:not([data-scene='0']) .guide-note { padding:12px 14px; }
   .guide-note p, body:not([data-scene='0']) .guide-note p { margin:0 0 9px; line-height:1.6; }
   .location, .scrollhint, .back { background:transparent; border:0; box-shadow:none; border-radius:0; padding:0; color:#233d31; text-shadow:0 1px 3px #fff8e8,0 0 12px #fff8e8; }
   .location small { color:#3f5140; }
   .location { bottom:26px; }
   .scrollhint { bottom:22px; }
   .back { bottom:31px; }
}
.guide-portrait { cursor:default; }

/* Цветы уже нарисованы в сценах: повторный слой больше не накладывается. */
.foreground { display:none; }
/* Негромкая навигация с достаточным контрастом на любом рисунке. */
@media(min-width:761px) {
   .location, .scrollhint, .back { background:#fbf7eb9c; color:#263e34; text-shadow:0 1px 2px #fff9ed; border:1px solid #fffaf033; border-radius:6px; box-shadow:none; padding:8px 12px; }
   .location { gap:11px; }
   .location>span { font-size:28px; }
   .scrollhint { font-size:9px; }
   .scrollhint span { font-size:18px; margin-top:3px; }
}

.brand-approved { aspect-ratio:1730/590; }
/* Центральная линия шапки; оптическая поправка надписи в исходном логотипе. */
@media(min-width:761px) {
   header { display:flex; align-items:center; gap:22px; height:94px; }
   .brand { width:195px; flex-basis:195px; transform:translateY(-10px); }
   nav { display:flex; align-items:center; justify-content:center; gap:24px; }
   nav button { display:inline-flex; align-items:center; justify-content:center; min-height:42px; white-space:nowrap; line-height:1.3; padding:8px 0; }
   .contact { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:11px 18px; line-height:1.3; white-space:nowrap; }
}
/* У входа обратная навигация не нужна. */
body[data-scene='0'] .back { display:none; }

/* Единый маршрут вместо разрозненных указателей по краям экрана. */
.location, .scrollhint, .progress, .back { display:none !important; }
.journey-nav { position:absolute; z-index:12; bottom:20px; left:50%; transform:translateX(-50%); display:flex; gap:4px; width:max-content; max-width:calc(100% - 40px); padding:6px; border:1px solid #fff8e777; border-radius:16px; background:#f9f4e6b8; box-shadow:0 6px 28px #243b3020; backdrop-filter:blur(14px); }
.journey-nav button { display:flex; align-items:center; gap:9px; min-height:44px; padding:10px 16px; border-radius:11px; font-size:12px; font-weight:500; line-height:1.3; color:#344f42; transition:background .25s,color .25s; }
.journey-nav button:after { display:none; }
.journey-nav button:hover { background:#ffffff80; }
.journey-nav button.selected { background:#345646; color:#fff9e9; box-shadow:0 2px 7px #203e3022; }
.chapter-number { font-size:10px; opacity:.65; font-variant-numeric:tabular-nums; }
.journey-nav button:focus-visible { outline:2px solid #b48b3d; outline-offset:2px; }
.sun-motion { position:absolute; width:max(100vw,177.683svh); height:max(100svh,56.28vw); left:50%; top:50%; transform:translate(-50%,-50%); pointer-events:none; }
.sun-shimmer { animation:sun-shimmer 6s ease-in-out infinite alternate; }
.sun-rays { transform-box:fill-box; transform-origin:50% 100%; animation:sun-rays 7s ease-in-out infinite alternate; opacity:.18; }
@keyframes sun-shimmer { from { opacity:.25; } to { opacity:.9; } }
@keyframes sun-rays { from { transform:translateY(0) rotate(-.6deg); opacity:.08; } to { transform:translateY(-3px) rotate(.6deg); opacity:.4; } }
@media(prefers-reduced-motion:reduce) { .sun-shimmer,.sun-rays { animation:none; } }

/* Прозрачный фасад позволяет видеть кабинет через настоящий проём. */
.exterior { background:transparent; }

.gate-stage { clip-path:polygon(0 100%,0 37%,10% 19%,27% 7%,50% 0,73% 7%,90% 19%,100% 37%,100% 100%); }

/* Контакты в шапке; маршруты остаются только в нижней панели. */
.header-contacts { margin-left:auto; display:flex; align-items:center; gap:clamp(22px,3.4vw,54px); }
.header-contacts a { text-decoration:none; color:#2d483c; display:flex; flex-direction:column; gap:5px; line-height:1.3; }
.header-contacts small { font-size:11px; color:#5d6a5e; }
.header-phone span { font-size:18px; font-weight:600; letter-spacing:.2px; }
.header-address span { font-size:14px; }
.header-contacts .header-max { flex-direction:row; align-items:center; gap:10px; font-size:13px; }
.header-max img { width:36px; height:36px; object-fit:contain; }
.header-contacts a:hover { color:#987536; }
.header-contacts a:focus-visible { outline:2px solid #987536; outline-offset:6px; border-radius:4px; }
/* Солнце без мерцания: лучи слегка покачиваются вокруг центра диска. */
.sun-shimmer { animation:none; opacity:0; }
.sun-rays { transform-box:view-box; transform-origin:1190px 300px; animation:sun-rays-sway 6s ease-in-out infinite alternate; opacity:.65; }
.sun-rays path { animation:none; transform:none; fill:#f6bd60; opacity:1; }
@keyframes sun-rays-sway {
   from { transform:rotate(-1.8deg); }
   to { transform:rotate(1.8deg); }
}
@media(prefers-reduced-motion:reduce) { .sun-rays { animation:none; } }

/* Проводница стоит на дорожке, положение привязано к иллюстрации крепости. */
@media(min-width:761px) {
   body[data-scene='0'] .guide { left:calc(50% + max(100vw,177.683svh) * .19 - 12svh); }
   body[data-scene='0'] .guide-note { left:auto; right:100%; top:18%; margin-right:8px; }
}

/* Контакты открываются поверх выбранной сцены. */
.contact-dialog { position:fixed; inset:0; margin:auto; width:min(470px,calc(100vw - 48px)); max-height:calc(100svh - 64px); overflow:auto; padding:32px; color:#2d483c; background:#fcf8ed; border:1px solid #d7c9a8; border-radius:16px; box-shadow:0 24px 100px #142b3655; }
.contact-dialog::backdrop { background:#162d2859; backdrop-filter:blur(5px); }
.contact-dialog[open] { animation:contact-appear .22s ease-out; }
.contact-dialog h2 { font:400 30px/1.3 Prata,Georgia,serif; margin:17px 0 12px; padding-right:15px; }
.contact-dialog>p { font-size:14px; line-height:1.65; color:#61705e; margin:0 0 20px; }
.dialog-eyebrow { font-size:10px; letter-spacing:2px; color:#947a48; }
.dialog-close { position:absolute; top:12px; right:12px; width:36px; height:36px; border-radius:50%; font-size:26px; line-height:1; background:#ede7d8; color:#415c4d; }
.dialog-close:hover { background:#e1d7c0; }
.contact-dialog a:focus-visible,.dialog-close:focus-visible { outline:2px solid #aa8540; outline-offset:3px; }
@keyframes contact-appear { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
@media(prefers-reduced-motion:reduce) { .contact-dialog[open] { animation:none; } }

/* Золотая роза ветров на двух знамёнах у входа. */
.citadel-flags { position:absolute; width:max(100vw,177.683svh); height:max(100svh,56.28vw); left:50%; top:50%; transform:translate(-50%,-50%); pointer-events:none; }

/* Узнаваемые лица юристов по фото; окружение сохранено буквально. */
.detail-lawyer-man { background-image:url('art/lawyers-photo-20261023.png'); clip-path:inset(28% 80% 60.3% 13.3%); }
.detail-lawyer-woman { background-image:url('art/lawyers-photo-20261023.png'); clip-path:inset(32.2% 72.4% 54.9% 20.1%); }

/* Согласованные рисованные персонажи, независимые от остальных сцен. */
.detail-surveyor-face { background-image:url('art/surveyor-approved-drawn.png'); clip-path:inset(30% 78% 19% 9.7%); }
.detail-lawyer-man { background-image:url('art/lawyers-approved-drawn.png'); clip-path:inset(28.5% 79.5% 36.5% 9.3%); }
.detail-lawyer-woman { background-image:url('art/lawyers-approved-drawn.png'); clip-path:inset(33% 70.5% 13.5% 20%); }

/* Финальные согласованные общие планы, без перерисовки персонажей. */
.art-frame-1 .scene-art { background-image:url('art/engineers-final-wide.png'); }
.art-frame-2 .scene-art { background-image:url('art/surveyor-final-wide.png'); }
.art-frame-3 .scene-art { background-image:url('art/lawyers-final-wide.png'); }
.art-frame-1 .scene-art, .art-frame-2 .scene-art, .art-frame-3 .scene-art { width:max(100vw,177.778svh); height:max(100svh,56.25vw); background-size:100% 100%; background-position:center; }
.detail-engineer-left, .detail-engineer-right, .detail-surveyor-face, .detail-lawyer-man, .detail-lawyer-woman, .art-frame-3 .detail-flag { display:none; }

/* Сцена суда вписана в пространство под шапкой. */
@media(min-width:901px) {
   .art-frame-3 { background:#e7d3ad; }
   .art-frame-3 .scene-art { width:max(100vw,calc((100svh - var(--header-height,94px)) * 1.77778)); height:max(calc(100svh - var(--header-height,94px)),56.25vw); top:calc(50% + var(--header-height,94px) / 2); }
   body[data-scene='3'] .plaque { top:auto; bottom:105px; max-height:calc(100svh - 390px); }
}

@media(min-width:901px) {
   .art-frame-3 .scene-art { width:max(100vw,calc((100svh - var(--header-height,94px) - 100px) * 1.77778)); height:max(calc(100svh - var(--header-height,94px) - 100px),56.25vw); top:calc(50% + var(--header-height,94px) / 2 - 45px); }
}

@media(min-width:901px) {
   .art-frame-3 { background:#e7d3ad url('art/lawyers-final-wide.png') center bottom / cover no-repeat; }
}

@media(min-width:901px) {
   .art-frame-3 { background-size:200% auto; background-position:right bottom; }
}

/* Письменное общение: спокойный акцент рядом со способами связи. */
.contacts li.written-contact { display:block; margin:0 0 8px 36px; padding:0 0 8px; border:0; border-radius:0; background:none; }
.written-contact strong { display:block; color:#3c5542; font-size:13px; line-height:1.4; font-weight:600; }
.written-contact p { margin:4px 0 0; color:#61705e; font-size:12px; line-height:1.5; }

/* Контакты компактно помещаются в настольном окне. */
@media(min-width:901px) {
   body[data-scene='4'] .plaque h2 { margin:8px 0; font-size:28px; }
   body[data-scene='4'] .plaque>p { margin-bottom:10px; }
   body[data-scene='4'] .contacts, .contact-dialog .contacts { margin:10px 0; }
   body[data-scene='4'] .contacts li:not(.written-contact), .contact-dialog .contacts li:not(.written-contact) { padding:8px 0; }
   .contact-dialog { padding:24px 28px; }
   .contact-dialog h2 { margin:12px 0 8px; font-size:28px; }
   .contact-dialog>p { margin-bottom:10px; }
}

.site-footer {
  padding: 22px 16px 96px;
  background: var(--paper);
  text-align: center;
  font-size: 13px;
}
.site-footer a { color: inherit; text-underline-offset: 3px; }
@media (min-width: 1025px) {
  .site-footer { padding-bottom: 22px; }
}
