/*
Theme Name: Волоколамская Гранитка
Version: 1.0
Text Domain: volokolamsk
*/
:root {
    color-scheme: light;
    --bg: #f1eee8;
    --surface: #fbf9f5;
    --ink: #242522;
    --muted: #555753;
    --line: #cec7bb;
    --accent: #8c4529;
    --button: #803a22;
    --button-text: #fff5e9;
    --shadow: #1b140d24;
    --serif: Georgia, 'Times New Roman', serif;
    font: 16px/1.55 system-ui, sans-serif;
}
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #191a18;
    --surface: #232420;
    --ink: #f3ede2;
    --muted: #c2bcb1;
    --line: #494740;
    --accent: #e19a73;
    --button: #dfa27e;
    --button-text: #241812;
    --shadow: #0007;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
        color-scheme: dark;
        --bg: #191a18;
        --surface: #232420;
        --ink: #f3ede2;
        --muted: #c2bcb1;
        --line: #494740;
        --accent: #e19a73;
        --button: #dfa27e;
        --button-text: #241812;
        --shadow: #0007;
    }
}
*, *::before, *::after {box-sizing:border-box}
html {scroll-behavior:smooth}
body {margin:0;background:var(--bg);color:var(--ink);transition:background-color .24s,color .24s}
a {color:inherit}
img {max-width:100%;height:auto;display:block}
button,input {font:inherit}
button {cursor:pointer}
:focus-visible {outline:2px solid var(--accent);outline-offset:4px}
h1,h2,h3,p,figure {margin:0}
h1,h2,h3 {font-family:var(--serif);font-weight:400;line-height:1.06}
[hidden] {display:none!important}
.shell {width:min(1280px,calc(100% - 100px));margin-inline:auto}
.skip,.screen-reader-text {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.skip:focus {width:auto;height:auto;clip-path:none;z-index:50;background:var(--surface);padding:12px}
.site-header {border-bottom:1px solid var(--line);position:relative;z-index:10}
.header-inner {min-height:76px;display:flex;gap:28px;align-items:center;justify-content:space-between}
.brand {display:inline-flex;flex-shrink:0;align-items:center;gap:11px;text-decoration:none}
.brand span {font-family:var(--serif);font-size:1.16rem;line-height:1.06}
.brand img {object-fit:contain;aspect-ratio:1}
.header-inner nav,.header-actions {display:flex;align-items:center;gap:clamp(16px,2.3vw,34px)}
.header-inner nav a,.header-phone,.footer-inner>a:last-child {font-weight:580;font-size:.94rem;text-decoration:none}
.header-inner nav a:hover,.header-inner nav a[aria-current],.header-phone:hover,.text-link:hover {color:var(--accent)}
.icon-button {display:grid;place-items:center;width:42px;height:42px;background:var(--surface);border:1px solid var(--line);color:var(--ink);border-radius:50%;font-size:1.35rem;line-height:1;padding:0}
.icon-button:hover {color:var(--accent);border-color:var(--accent)}
.menu-button,.theme-sun {display:none}
[data-theme="dark"] .theme-sun {display:inline}
[data-theme="dark"] .theme-moon {display:none}
.hero {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.04fr);align-items:center;gap:36px;padding-block:58px 44px}
.hero-copy {animation:arrive .55s ease-out both}
.overline {display:flex;align-items:center;gap:11px;color:var(--accent);font-size:.8rem;font-weight:660;letter-spacing:.06em;margin-bottom:27px}
.overline span {width:26px;height:1px;background:currentColor}
.hero h1 {font-size:clamp(2.65rem,5.35vw,6rem);letter-spacing:-.07em}
.hero-intro {max-width:34ch;color:var(--muted);font-size:clamp(1rem,1.7vw,1.28rem);margin-top:25px}
.actions {display:flex;align-items:center;gap:16px 24px;flex-wrap:wrap;margin-top:29px}
.button,.text-link {display:inline-flex;align-items:center;justify-content:center;gap:10px;font-weight:620;text-decoration:none}
.button {min-height:47px;padding:10px 17px;border:1px solid transparent;border-radius:3px;transition:transform .2s,box-shadow .2s}
.button:hover {transform:translateY(-2px);box-shadow:0 5px 14px var(--shadow)}
.primary {background:var(--button);color:var(--button-text)}
.secondary {background:var(--surface);color:var(--ink);border-color:var(--line)}
.text-link {text-decoration:underline;text-underline-offset:.23em;line-height:1.4}
.hero-visual {padding:9px;border:1px solid var(--line);position:relative;animation:arrive .65s .07s ease-out both}
.hero-visual::after {content:"";position:absolute;right:-1px;bottom:-1px;width:16%;height:20%;border-bottom:2px solid var(--accent);border-right:2px solid var(--accent);pointer-events:none}
.hero-visual img {width:100%;aspect-ratio:1.19;object-fit:cover;object-position:53% 52%}
.location {padding-block:16px;display:grid;gap:18px;grid-template-columns:1.4fr 1fr auto;align-items:center;border-block:1px solid var(--line)}
.location small {display:block;color:var(--muted)}
.location a:not(.button),.contact-phone {font-weight:650;text-decoration:none}
.location a:hover,.contact-phone:hover {color:var(--accent)}
.content-section {padding-block:67px 0;scroll-margin-top:16px}
.section-heading {display:flex;gap:20px;align-items:end;justify-content:space-between;margin-bottom:23px}
.content-section h2,.editor-start h2 {font-size:clamp(2rem,4vw,3.4rem);letter-spacing:-.05em}
.section-heading p,.contact-section p,.editor-head p,.editor-start p {color:var(--muted);margin-top:8px}
.forms {display:grid;grid-template-columns:minmax(0,412fr) minmax(0,486fr) minmax(0,628fr);gap:16px}
.form-card {border:1px solid var(--line);background:var(--surface);overflow:hidden}
.form-card img {width:100%;height:auto}
.form-card div {position:relative;background:var(--surface);padding:18px}
.form-card h3 {font-size:clamp(1.16rem,2.15vw,1.6rem)}
.form-card p,.image-note {color:var(--muted);font-size:.9rem;margin-top:7px}
.story-wrap {margin-top:24px;margin-bottom:32px}
.story-wrap .rc-story {margin:0;width:100%;max-width:none;border-radius:2px;aspect-ratio:3/2}
.story-wrap .rc-story .rc-story-title {color:#322a25!important}
.story-wrap .rc-story .rc-story-cta {background:#803a22!important;border-color:#803a22}
.story-wrap .rc-story .rc-story-cta:hover {background:#613222!important}
.story-wrap .rc-story-controls {justify-content:flex-start}
.contact-section {display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-block:65px 58px;padding-block:32px;border-block:1px solid var(--line)}
.contact-links {justify-self:end;display:grid;gap:8px;justify-items:start}
.contact-phone {font-size:1.6rem}
.site-footer {border-top:1px solid var(--line);padding-block:22px 28px}
.footer-inner {display:flex;align-items:center;justify-content:space-between;gap:16px}
.editor-head {padding-block:24px 20px}
.editor-head h1 {font-size:clamp(1.7rem,4vw,2.8rem);letter-spacing:-.04em}
.vg-embed-page {display:flex;flex-direction:column;height:calc(100dvh - var(--wp-admin--admin-bar--height,0px))}
.vg-embed-page .site-header {flex:none}
.vg-embed-page .header-inner {min-height:43px;width:calc(100% - 28px);gap:12px}
.vg-embed-page .brand {gap:7px}
.vg-embed-page .brand img {width:26px}
.vg-embed-page .brand span {font-size:.92rem}
.vg-embed-page .header-inner nav {gap:clamp(10px,1.35vw,22px)}
.vg-embed-page .header-inner nav a {font-size:.85rem}
.vg-embed-page .header-actions {gap:5px}
.vg-embed-page .header-actions .icon-button,.vg-embed-page .header-actions .assistant-launch {
    width:36px;height:36px;min-width:36px;min-height:36px;padding:0;justify-content:center
}
.vg-embed-page .header-actions .assistant-launch img {width:22px}
.vg-embed-page .header-actions .assistant-launch span {display:none}
.vg-embed-page .constructor-main {flex:1;min-height:0;display:grid;grid-template-rows:minmax(0,1fr)}
.constructor-frame {border:0;display:block;width:100%;height:100%;background:var(--surface)}
.editor-start {display:grid;grid-template-columns:1.1fr 1fr;gap:32px;align-items:center;border-block:1px solid var(--line);padding-block:22px;margin-bottom:44px}
.editor-start img {width:100%;aspect-ratio:1.55;object-fit:cover}
.editor-content {margin-block:20px 40px}
.max-dialog {max-width:min(500px,calc(100% - 30px));background:var(--surface);color:var(--ink);border:1px solid var(--line);padding:30px;box-shadow:0 16px 50px var(--shadow);z-index:60}
.max-dialog::backdrop {background:#110f0bd0}
.max-dialog h2 {font-size:1.8rem;margin-bottom:12px}
.dialog-close {position:absolute;right:12px;top:12px;width:32px;height:32px}
.max-dialog .actions {margin-top:15px}
.max-number {margin-top:8px;font-size:1.3rem;font-weight:650}
.copy-status {color:var(--muted);font-size:.85rem;margin-top:8px}
.assistant-launch,.assistant-panel {position:fixed;z-index:25;right:24px;bottom:22px}
.assistant-launch {display:flex;align-items:center;gap:8px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:32px;padding:6px 13px 6px 7px;font-weight:650;box-shadow:0 5px 23px var(--shadow)}
.assistant-launch:hover {border-color:var(--accent)}
.header-actions .assistant-launch {position:static;box-shadow:none;font-size:.85rem;min-height:42px}
.header-actions .assistant-launch[hidden] {display:flex!important;visibility:hidden}
.assistant-panel {display:flex;flex-direction:column;width:min(396px,calc(100% - 26px));max-height:calc(100dvh - 28px);border:1px solid var(--line);background:var(--surface);border-radius:10px;box-shadow:0 14px 55px var(--shadow);overflow:hidden;animation:arrive .22s ease-out both}
.assistant-panel header {display:flex;align-items:center;gap:10px;padding:11px 14px;border-bottom:1px solid var(--line)}
.assistant-panel header,.assistant-form,.assistant-models {flex:none}
.assistant-panel h2 {font:650 1rem/1.2 system-ui,sans-serif}
.assistant-panel header span {font-size:.8rem;color:var(--muted)}
.assistant-close {width:33px;height:33px;margin-left:auto}
.assistant-scroll {display:grid;gap:12px;min-height:0;max-height:320px;overflow:auto;padding:14px}
.assistant-models {border-bottom:1px solid var(--line);padding:8px 10px}
.assistant-gallery-label {margin-bottom:5px;color:var(--muted);font-size:.78rem}
.assistant-gallery {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.assistant-model {display:grid;justify-items:center;gap:4px;min-width:0;padding:4px;color:var(--ink);background:var(--bg);border:1px solid var(--line);border-radius:4px;font-size:.72rem;line-height:1.15}
.assistant-model img {width:100%;height:54px;object-fit:contain;background:#b1a59a;border-radius:2px}
.assistant-model:hover,.assistant-model[aria-pressed=true] {border-color:var(--accent)}
.assistant-model[aria-pressed=true] {box-shadow:inset 0 0 0 1px var(--accent)}
.assistant-viewer {margin-bottom:8px}
.assistant-viewer-bar,.assistant-viewer-actions {display:flex;align-items:center;justify-content:space-between;gap:8px}
.assistant-viewer-bar {margin-bottom:5px}
.assistant-viewer-bar h3 {font:650 .87rem/1.25 system-ui,sans-serif}
.assistant-viewer-close {width:28px;height:28px}
.assistant-stage {position:relative;height:clamp(92px,24dvh,200px);background:var(--bg);overflow:hidden;border:1px solid var(--line);border-radius:4px}
.assistant-stage canvas {display:block;width:100%;height:100%;cursor:grab;touch-action:none}
.assistant-stage canvas:active {cursor:grabbing}
.assistant-stage-status:not(:empty) {position:absolute;inset:0;display:grid;place-content:center;text-align:center;padding:10px;font-size:.82rem;color:var(--muted)}
.assistant-viewer-actions {margin-top:5px;font-size:.77rem}
.assistant-reset {border:0;padding:2px 0;background:none;color:var(--ink);text-decoration:underline;text-underline-offset:2px}
.assistant-log {display:grid;gap:8px}
.assistant-message {max-width:92%;background:var(--bg);padding:8px 11px;border-radius:5px;font-size:.91rem}
.assistant-message.visitor {justify-self:end;background:var(--button);color:var(--button-text)}
.assistant-message a,.assistant-message .button {color:var(--accent);min-height:0;padding:2px 0;background:transparent;border:0;text-decoration:underline}
.assistant-message .assistant-links {display:flex;align-items:flex-start;gap:4px 12px;flex-wrap:wrap;margin-top:5px}
.assistant-choices {display:flex;gap:6px;flex-wrap:wrap}
.assistant-choices button {border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:20px;font-size:.8rem;padding:5px 9px}
.assistant-choices button:hover {border-color:var(--accent)}
.assistant-form {display:flex;gap:8px;padding:10px;border-top:1px solid var(--line)}
.assistant-form input {flex:1;min-width:0;background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:4px;padding:8px 9px}
.assistant-form .voice-button[aria-pressed=true] {background:var(--button);color:var(--button-text)}
.assistant-voice-status:not(:empty) {padding:0 12px 10px;color:var(--muted);font-size:.8rem}
@keyframes arrive {from {opacity:.2;transform:translateY(8px)} to {opacity:1;transform:none}}
@media (max-width:980px) {
    .shell {width:calc(100% - 56px)}
    .header-inner {gap:17px}
    .header-actions {gap:10px}
    .hero {padding-block:38px 32px;gap:22px}
    .hero h1 {font-size:clamp(2.5rem,6vw,4rem)}
}
@media (max-width:740px) {
    .shell {width:calc(100% - 32px)}
    .header-inner {min-height:64px}
    .header-inner nav {display:none;align-items:start;position:absolute;top:100%;right:0;left:0;background:var(--surface);padding:16px;flex-direction:column;border-bottom:1px solid var(--line)}
    .header-inner nav.is-open {display:flex}
    .menu-button {display:grid}
    .header-phone {display:none}
    .hero,.editor-start {grid-template-columns:1fr}
    .hero {padding-top:25px}
    .hero h1 {font-size:clamp(2.72rem,10.3vw,4.1rem)}
    .overline {margin-bottom:13px}
    .hero-intro,.actions {margin-top:16px}
    .hero-visual img {aspect-ratio:1.36}
    .content-section {padding-top:46px}
    .section-heading {align-items:start;flex-direction:column;gap:9px}
    .location {grid-template-columns:1fr 1fr;gap:10px 12px}
    .location .button {justify-self:start;grid-column:1/-1}
    .forms {gap:8px}
    .form-card div {padding:8px}
    .form-card h3 {font-size:clamp(.93rem,3.2vw,1.12rem)}
    .form-card p {font-size:.73rem}
    .story-wrap {margin-bottom:23px}
    .story-wrap .rc-story {display:flex;flex-direction:column;aspect-ratio:auto;min-height:0;padding:0}
    .story-wrap .rc-story-copy {position:relative;inset:auto;width:auto;padding:17px 18px 14px;order:-1}
    .story-wrap .rc-story-copy::before {display:none}
    .story-wrap .rc-story .rc-story-title {font-size:clamp(26px,4.8vw,34px)!important;margin:9px 0!important}
    .story-wrap .rc-story .rc-story-line {min-height:0;margin-bottom:12px!important}
    .story-wrap .rc-story-scene {position:relative;inset:auto;aspect-ratio:3/2}
    .story-wrap .rc-story-frame,.story-wrap .rc-story-dimensions {width:100%!important;left:0!important}
    .story-wrap .rc-story-controls {position:relative;inset:auto;padding:8px 12px}
    .contact-section {margin-block:45px 35px;padding-block:22px;grid-template-columns:1fr}
    .contact-links {justify-self:start}
    .assistant-launch,.assistant-panel {right:13px;bottom:12px}
    .assistant-launch {padding:8px}
    .assistant-launch span {display:none}
    .header-actions .assistant-launch {padding:5px;min-width:42px}
    .footer-inner {align-items:start;padding-bottom:46px}
    .footer-inner .brand span {max-width:8rem}
    .footer-inner>a:last-child {white-space:nowrap}
}
@media (max-width:540px) {
    .forms {grid-template-columns:1fr;gap:12px}
    .form-card img {height:clamp(240px,78vw,350px);object-fit:contain;background:#b1a59a}
    .form-card div {padding:11px 12px}
    .form-card h3 {font-size:1.22rem}
    .form-card p {font-size:.86rem}
}
@media (prefers-reduced-motion:reduce) {
    html {scroll-behavior:auto}
    *,*::before,*::after {animation-duration:.01ms!important;transition-duration:.01ms!important}
}
