/* ===== DESIGN TOKENS ===== */
:root {
    --bg: #fafaf7;
    --bg-alt: #f0eee9;
    --fg: #0a0a0a;
    --fg-muted: #5a5a55;
    --fg-soft: #8a8a85;
    --border: #e5e3de;
    --accent: #c9a27c;
    --accent-hover: #b8916c;
    --radius: 2px;
    --radius-lg: 8px;
    --shadow: 0 1px 2px rgba(0,0,0,.04);
    --shadow-lg: 0 20px 40px -20px rgba(0,0,0,.15);
    --header-h: 72px;
    --font-sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
    --ease: cubic-bezier(.22, 1, .36, 1);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0a0a0a;
        --bg-alt: #141414;
        --fg: #f5f5f0;
        --fg-muted: #a0a09a;
        --fg-soft: #70706a;
        --border: #262626;
        --shadow: 0 1px 2px rgba(0,0,0,.3);
        --shadow-lg: 0 20px 40px -20px rgba(0,0,0,.5);
    }
}
[data-theme="dark"] {
    --bg: #0a0a0a;
    --bg-alt: #141414;
    --fg: #f5f5f0;
    --fg-muted: #a0a09a;
    --fg-soft: #70706a;
    --border: #262626;
    --shadow: 0 1px 2px rgba(0,0,0,.3);
    --shadow-lg: 0 20px 40px -20px rgba(0,0,0,.5);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: var(--fg);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: "ss01", "cv11";
    transition: background .4s var(--ease), color .4s var(--ease);
}

body.bitrix-panel-visible { padding-top: 45px; }
body:has(#bitrix-panel:not(:empty)) { padding-top: 45px; }
body.menu-open { overflow: hidden; }

img, picture, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.serif { font-family: var(--font-serif); font-weight: 400; font-style: italic; letter-spacing: -.01em; }
.eyebrow {
    display: inline-block;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .2em;
    color: var(--fg-soft);
    margin-bottom: 16px;
    font-weight: 500;
}

.section { padding: clamp(40px, 6vw, 80px) 0; }
.section-head { margin-bottom: clamp(24px, 4vw, 48px); max-width: 720px; }
.section-title {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: clamp(1.8rem, 4.5vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--fg);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: .9rem;
    font-weight: 500;
    letter-spacing: .02em;
    border-radius: var(--radius);
    transition: all .3s var(--ease);
    white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); }

/* ===== HEADER ===== */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s var(--ease), background .4s var(--ease);
}
body.bitrix-panel-visible .site-header { top: 45px; }

.site-header.scrolled { border-bottom-color: var(--border); }
.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo { display: flex; flex-direction: column; line-height: 1; z-index: 101; }
.logo-name { font-size: 1.05rem; font-weight: 500; letter-spacing: -.01em; color: var(--fg); }
.logo-tag { font-size: .7rem; color: var(--fg-soft); text-transform: uppercase; letter-spacing: .25em; margin-top: 3px; }

.nav { display: flex; gap: 32px; }
.nav-link {
    font-size: .85rem;
    font-weight: 400;
    color: var(--fg-muted);
    position: relative;
    padding: 4px 0;
    transition: color .2s var(--ease);
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 100%; height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform .35s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--fg); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); transform-origin: left; }

.theme-toggle {
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: 50%;
    transition: background .2s var(--ease);
    color: var(--fg);
    z-index: 101;
}
.theme-toggle:hover { background: var(--bg-alt); }
.theme-toggle svg { width: 18px; height: 18px; }
.icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .icon-sun { display: none; }
    :root:not([data-theme="light"]) .icon-moon { display: block; }
}

.burger { display: none; width: 32px; height: 32px; position: relative; z-index: 101; }
.burger span {
    position: absolute; left: 4px; right: 4px;
    height: 1.5px; background: var(--fg);
    transition: all .3s var(--ease);
}
.burger span:first-child { top: 12px; }
.burger span:last-child { bottom: 12px; }
.burger.open span:first-child { top: 15px; transform: rotate(45deg); }
.burger.open span:last-child { bottom: 15px; transform: rotate(-45deg); }

/* ===== HERO ===== */
.hero {
    position: relative;
    height: 100svh;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
}
.hero-bg {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: -1;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10,10,10,.2) 0%, rgba(10,10,10,.5) 60%, rgba(10,10,10,.85) 100%);
    z-index: -1;
}
.hero-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    align-items: center;
    min-height: 100%;
    padding-top: var(--header-h);
}
.hero-content {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 40px 20px;
}
.hero-title {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    line-height: .95;
    letter-spacing: -.03em;
    margin-bottom: 24px;
}
.hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: rgba(255,255,255,.8);
    margin-bottom: 40px;
    max-width: 480px;
}
.hero .btn-primary { background: #fff; color: #0a0a0a; }
.hero .btn-primary:hover { background: var(--accent); color: #fff; }

.scroll-hint {
    position: absolute;
    bottom: 32px; right: 24px;
    color: rgba(255,255,255,.7);
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .3em;
    writing-mode: vertical-rl;
    display: flex; align-items: center; gap: 12px;
}
.scroll-hint span {
    width: 1px; height: 40px;
    background: rgba(255,255,255,.4);
    animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
    0% { transform: scaleY(.3); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(.3); transform-origin: bottom; }
}

/* ===== ABOUT ===== */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: center;
}
.about-text p {
    color: var(--fg-muted);
    font-size: clamp(1rem, 1.3vw, 1.1rem);
    margin-bottom: 20px;
}
.about-text p:last-of-type { margin-bottom: 0; }
.about-note {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: .9rem;
    color: var(--fg-soft);
    font-style: italic;
}

.about-photo { position: relative; }
.about-photo img {
    width: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: var(--radius-lg);
}
.about-photo figcaption {
    position: absolute;
    bottom: 16px; left: 16px;
    font-size: .75rem;
    color: #fff;
    letter-spacing: .15em;
    text-transform: uppercase;
    mix-blend-mode: difference;
}

/* ===== BENTO PORTFOLIO (Masonry) ===== */
.bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 10px;
    gap: 12px;
}
.bento-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    cursor: pointer;
}
.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s var(--ease);
}
.bento-item:hover img { transform: scale(1.04); }
.bento-item figcaption {
    position: absolute;
    left: 16px; bottom: 14px;
    color: #fff;
    font-size: .85rem;
    font-weight: 500;
    letter-spacing: .02em;
    mix-blend-mode: difference;
    opacity: 0;
    transform: translateY(6px);
    transition: all .4s var(--ease);
}
.bento-item:hover figcaption { opacity: 1; transform: translateY(0); }

/* ===== REVIEWS ===== */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.review {
    padding: 32px;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.review p {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.05rem, 1.3vw, 1.2rem);
    line-height: 1.5;
    color: var(--fg);
}
.review cite {
    font-style: normal;
    font-size: .8rem;
    color: var(--fg-soft);
    letter-spacing: .15em;
    text-transform: uppercase;
}

/* ===== PRICING ===== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.price {
    padding: 32px 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    transition: border-color .3s var(--ease), transform .3s var(--ease);
    position: relative;
}
.price:hover { border-color: var(--fg-soft); }
.price-featured { border-color: var(--fg); background: var(--bg-alt); }
.price-badge {
    position: absolute;
    top: -10px; right: 20px;
    background: var(--fg); color: var(--bg);
    font-size: .65rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    padding: 4px 10px;
    border-radius: 2px;
}
.price h3 {
    font-size: .8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--fg-muted);
    margin-bottom: 20px;
}
.price-value {
    font-size: clamp(1.8rem, 2.5vw, 2.2rem);
    font-weight: 300;
    letter-spacing: -.02em;
    margin-bottom: 24px;
}
.price-value span { font-size: .9rem; color: var(--fg-muted); margin-left: 4px; }
.price-note {
    font-size: .8rem;
    color: var(--fg-soft);
    margin-bottom: 20px;
    font-style: italic;
}

.pricing-additional {
    margin-top: 48px;
    padding: 32px;
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--accent);
}
.pricing-additional h3 {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--fg);
    letter-spacing: .1em;
    text-transform: uppercase;
}
.additional-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.additional-list li {
    padding: 10px 0;
    padding-left: 24px;
    position: relative;
    color: var(--fg-muted);
    font-size: .95rem;
    line-height: 1.5;
}
.additional-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.2rem;
    line-height: 1;
}
.price-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    margin-bottom: 24px;
    flex-grow: 1;
}
.price-list li {
    font-size: .88rem;
    color: var(--fg-muted);
    padding-left: 18px;
    position: relative;
    line-height: 1.5;
}
.price-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--fg-soft);
}
.price-list li.gift { color: var(--accent); }
.price-list li.gift::before { content: '+'; color: var(--accent); }
.price-meta {
    font-size: .75rem;
    color: var(--fg-soft);
    padding-top: 16px;
    border-top: 1px solid var(--border);
    letter-spacing: .05em;
}
.pricing-note {
    margin-top: 32px;
    font-size: .88rem;
    color: var(--fg-muted);
    text-align: center;
    font-style: italic;
}

/* ===== CONTACT ===== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: start;
}
.contact-list {
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.contact-list li {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 24px;
    align-items: baseline;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.contact-list span {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: var(--fg-soft);
}
.contact-list a {
    font-size: 1rem;
    color: var(--fg);
    transition: color .2s var(--ease);
}
.contact-list a:hover { color: var(--accent); }

.socials {
    display: flex;
    gap: 8px;
    margin-bottom: 40px;
}
.socials a {
    width: 44px; height: 44px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .05em;
    transition: all .2s var(--ease);
}
.socials a:hover { border-color: var(--fg); background: var(--fg); color: var(--bg); }

.quote {
    padding: 24px;
    border-left: 2px solid var(--accent);
    background: var(--bg-alt);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}
.quote p {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 12px;
}
.quote cite {
    font-style: normal;
    font-size: .75rem;
    color: var(--fg-soft);
    letter-spacing: .15em;
    text-transform: uppercase;
}

.contact-form {
    background: var(--bg-alt);
    padding: clamp(28px, 4vw, 44px);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.contact-form h3 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: clamp(1.5rem, 2vw, 1.8rem);
    margin-bottom: 8px;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.field span {
    font-size: .75rem;
    color: var(--fg-soft);
    text-transform: uppercase;
    letter-spacing: .15em;
}
.field input, .field select, .field textarea {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    font: inherit;
    color: var(--fg);
    transition: border-color .2s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--fg);
}
.field textarea { resize: vertical; min-height: 80px; font-family: inherit; }
.contact-form .btn-primary { margin-top: 8px; }
.form-note { font-size: .75rem; color: var(--fg-soft); text-align: center; line-height: 1.5; }

/* ===== SCROLL TO TOP ===== */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--fg);
    color: var(--bg);
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all .3s var(--ease);
    z-index: 90;
}
.scroll-top svg { width: 20px; height: 20px; }
.scroll-top:hover { background: var(--accent); transform: translateY(-2px); }
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }

/* ===== FOOTER ===== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    background: var(--bg);
    transition: background .4s var(--ease), border-color .4s var(--ease);
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    font-size: .85rem;
    color: var(--fg-muted);
}
.footer-link { color: var(--fg-muted); text-decoration: underline; text-underline-offset: 4px; }
.footer-link:hover { color: var(--fg); }

/* ===== REVEAL ANIMATION ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .burger { display: block; }
    
    /* Мобильное меню (Полноэкранный оверлей) */
    .nav {
        position: fixed;
        height:250px;
        margin-top:0px;
        inset: 0;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 32px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .4s var(--ease), visibility .4s var(--ease);
        z-index: 99;
        padding-top: var(--header-h);
        padding-bottom: 30px;
    }
    body.bitrix-panel-visible .nav { padding-top: calc(45px + var(--header-h)); }
    .nav.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        height:500px;
    }
    .nav-link { font-size: 1.5rem; font-weight: 300; }

    .about-grid { grid-template-columns: 1fr; }
    .about-photo { order: -1; max-width: 420px; }
    .reviews-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-grid { grid-template-columns: 1fr; }
    
    .hero-container { grid-template-columns: 1fr; padding-top: 0; }
    .hero-content { grid-column: 1; justify-content: center; align-items: center; text-align: center; padding: 0 20px; }
    
    .bento { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
    :root { --header-h: 64px; }
    .container { padding: 0 20px; }

    .bento { grid-template-columns: repeat(2, 1fr); }

    .pricing-grid { grid-template-columns: 1fr; }
    .contact-list li { grid-template-columns: 1fr; gap: 4px; }
    .scroll-hint { display: none; }
    .footer-inner { flex-direction: column; text-align: center; }
    
    .scroll-top { bottom: 24px; right: 24px; width: 44px; height: 44px; }
}