﻿/* Local font files and licenses: ../FONT-LICENSES.md */
@font-face {
    font-family: "Manrope"; font-style: normal; font-weight: 400 600; font-display: swap;
    src: url("../fonts/manrope/manrope-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Manrope"; font-style: normal; font-weight: 400 600; font-display: swap;
    src: url("../fonts/manrope/manrope-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500 600; font-display: swap;
    src: url("../fonts/cormorant-garamond/cormorant-garamond-cyrillic.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Cormorant Garamond"; font-style: normal; font-weight: 500 600; font-display: swap;
    src: url("../fonts/cormorant-garamond/cormorant-garamond-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Shared design system. Section backgrounds remain full width. */
:root {
    color-scheme: light;
    --paper: #f8f6f2; --stone: #eeebe5; --ink: #292722; --muted: #68645e;
    --line: #d4cfc5; --bronze: #927a58; --bronze-dark: #756044;
    --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --serif: "Cormorant Garamond", "Palatino Linotype", Georgia, serif;
    --gutter: clamp(20px, 5vw, 72px);
    --page-inset: max(var(--gutter), calc((100% - 1360px) / 2));
    --section-space: clamp(64px, 7.5vw, 112px);
    --grid-gap: clamp(20px, 2.5vw, 36px);
    --ease: cubic-bezier(.2, .65, .3, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; scrollbar-gutter: stable; }
body {
    margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans);
    font-size: clamp(16px, .94rem + .16vw, 18px); font-weight: 400; line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
[hidden] { display: none !important; }
img { display: block; width: 100%; max-width: 100%; height: auto; object-fit: cover; background: #e5dfd5; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
strong { font-weight: 600; }
button, a { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex="-1"]:focus-visible {
    outline: 3px solid var(--bronze); outline-offset: 5px;
}
button:disabled { cursor: not-allowed; }
:where(h1, h2, h3, p, li, dd) { overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.08; }
h1 { font-size: clamp(40px, 6.2vw, 88px); margin: 20px 0 28px; letter-spacing: -.035em; text-wrap: balance; }
h2 { font-size: clamp(32px, 4.1vw, 56px); margin: 16px 0 24px; letter-spacing: -.025em; text-wrap: balance; }
h3 { font-size: clamp(26px, 2.2vw, 34px); margin: 12px 0 16px; letter-spacing: -.015em; }
p { margin: 0 0 20px; }
:where(section, article, h1, h2)[id] { scroll-margin-top: 24px; }
::selection { background: #d9cdbd; color: var(--ink); }
.skip-link {
    position: fixed; z-index: 1000; top: 12px; left: 16px; padding: 12px 20px;
    background: var(--ink); color: #fff; font-size: 14px; transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.eyebrow { margin: 0 0 18px; font-size: 12px; font-weight: 500; line-height: 1.6; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Header: the mobile links stay expanded when JavaScript is unavailable. */
.header { display: flex; align-items: center; justify-content: space-between; gap: 28px; min-height: 96px; padding: 20px var(--page-inset); border-bottom: 1px solid var(--line); }
.logo { display: inline-block; flex-shrink: 0; width: 112px; line-height: 0; }
.logo picture { display: block; }
.logo-image { width: 100%; height: auto; object-fit: contain; background: transparent; }
.navigation-inner { display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); }
.navigation a { position: relative; display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 500; white-space: nowrap; transition: color 250ms ease; }
.navigation a::after { content: ""; position: absolute; bottom: 5px; left: 0; width: 100%; height: 1px; background: var(--bronze); transform: scaleX(0); transform-origin: left; transition: transform 300ms var(--ease); }
.navigation a:hover { color: var(--muted); }
.navigation a:is([aria-current], .is-current)::after { transform: scaleX(1); }

/* Shared controls and interactive states. */
.button, .header-button, .filter-button, .menu-toggle, .modal-close {
    display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
    border: 1px solid var(--line); border-radius: 2px; padding: 13px 24px;
    background: transparent; color: var(--ink); font-size: 13px; font-weight: 500;
    line-height: 1.5; letter-spacing: .015em; text-align: center; cursor: pointer;
    transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease, box-shadow 250ms ease;
}
.header-button { min-height: 44px; padding: 12px 18px; border-color: var(--ink); white-space: nowrap; }
.menu-toggle { display: none; }
.button-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.button-light { border-color: #aaa49a; }
.button:active, .header-button:active, .filter-button:active { box-shadow: inset 0 0 0 1px currentColor; }
:is(.button, .header-button, .filter-button):is(:disabled, [aria-disabled="true"]) { opacity: .55; cursor: not-allowed; }
.service-card a, .service-link, .privacy-back-top { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 500; }
.service-card a, .service-link { border-bottom: 1px solid #b8afa1; padding: 6px 0; transition: color 250ms ease, border-color 250ms ease; }

/* Main page. */
.hero { padding: clamp(56px, 6.5vw, 96px) var(--page-inset) 0; }
.hero-content { max-width: 1040px; margin-bottom: clamp(36px, 4vw, 56px); }
.hero-description { max-width: 540px; color: var(--muted); }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-image { position: relative; overflow: hidden; aspect-ratio: 16 / 8; }
.hero-image img { height: 100%; object-position: center; }
.demo-label, .gallery-demo-label, .about-image-label { position: absolute; z-index: 1; padding: 8px 12px; background: var(--paper); color: var(--ink); font-size: 12px; line-height: 1.5; max-width: calc(100% - 32px); }
.demo-label, .about-image-label { bottom: 16px; left: 16px; }
.gallery-demo-label { top: 16px; left: 16px; }
.section { padding: var(--section-space) var(--page-inset); }
.section-heading { max-width: 720px; margin-bottom: 44px; }
.section-heading > p:not(.eyebrow) { max-width: 600px; color: var(--muted); }
.portfolio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--grid-gap); }
.project-card { min-width: 0; overflow: hidden; }
.project-card img { aspect-ratio: 4 / 3; transition: transform 550ms var(--ease); }
.project-info { position: relative; padding: 22px 0 4px; background: var(--paper); }
.project-info span { font-size: 12px; color: var(--muted); }
.project-info h3 { margin: 8px 0 0; }
.center-button { text-align: center; margin-top: 44px; }
.services { background: var(--stone); }
.services-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.service-card { min-width: 0; padding: clamp(24px, 3vw, 40px); border: 1px solid var(--line); transition: background-color 300ms ease, border-color 300ms ease; }
.service-card h3 { margin-top: 0; }
.service-card p { font-size: 16px; color: var(--muted); }
.service-card a { margin-top: 8px; }
.about > h2 { max-width: 760px; }
.about > p:not(.eyebrow) { max-width: 650px; color: var(--muted); }
.contact { padding: var(--section-space) var(--page-inset); text-align: center; background: var(--ink); color: #fff; }
.contact h2 { max-width: 780px; margin: 16px auto 24px; }
.contact p:not(.eyebrow) { max-width: 560px; margin: 0 auto 32px; color: #d2cec5; }
.contact .eyebrow { color: #c4b9a8; }
.contact .button-light { background: var(--paper); border-color: var(--paper); color: var(--ink); }

/* Portfolio: consistent image ratios and progressively enabled filters. */
.portfolio-intro { padding: clamp(48px, 6vw, 88px) var(--page-inset) 44px; }
.portfolio-intro h1 { max-width: 960px; }
.portfolio-intro > p:not(.eyebrow) { max-width: 650px; color: var(--muted); }
.demo-notice { font-size: 13px; color: var(--muted); }
.portfolio-section { padding: 16px var(--page-inset) var(--section-space); }
.portfolio-filters { display: none; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.portfolio-filters.filters-ready { display: flex; }
.filter-button { min-height: 44px; padding: 11px 17px; }
.filter-button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.portfolio-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px var(--grid-gap); }
.gallery-card { min-width: 0; }
.gallery-open { position: relative; display: block; width: 100%; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.gallery-open:disabled { opacity: 1; cursor: default; }
.gallery-open img { aspect-ratio: 4 / 5; transition: transform 550ms var(--ease); }
.gallery-image { position: relative; display: block; overflow: hidden; }
.gallery-card-info { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 0 24px; background: var(--paper); }
.gallery-card-info > span { font-size: 12px; color: var(--muted); }
.gallery-card-info > span:last-child { font-size: 13px; margin-top: 4px; color: var(--ink); }
.gallery-card-info strong { font-family: var(--serif); font-size: clamp(26px, 2.4vw, 32px); font-weight: 500; line-height: 1.15; }
.gallery-open:disabled .gallery-card-info > span:last-child { display: none; }
.gallery-description { margin: 16px 0 0; font-size: 16px; color: var(--muted); }

/* Dialog: native scrolling and keyboard focus are retained. */
.project-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(25, 24, 21, .72); animation: fade-in 300ms ease both; }
.project-modal-panel { position: relative; width: 100%; max-width: 640px; max-height: min(90vh, calc(100dvh - 40px)); overflow-y: auto; padding: clamp(28px, 4vw, 48px); background: var(--paper); box-shadow: 0 24px 80px #0002; animation: dialog-in 450ms var(--ease) both; }
.project-modal-panel h2 { padding-right: 20px; font-size: clamp(32px, 4vw, 48px); }
.project-modal-panel > p:not(.eyebrow) { color: var(--muted); }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 1; width: 44px; min-height: 44px; padding: 0; font-size: 18px; }

/* Services, contacts and studio. */
.services-page-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px var(--grid-gap); padding: 16px var(--page-inset) var(--section-space); }
.service-page-card { min-width: 0; }
.service-page-card > img { aspect-ratio: 4 / 3; }
.service-page-content { padding: 28px 0 0; }
.service-page-content h2 { font-size: clamp(28px, 3vw, 40px); }
.service-page-content .eyebrow { margin-bottom: 14px; }
.service-page-content > p:not(.eyebrow) { max-width: 540px; color: var(--muted); }
.service-link { margin-top: 4px; }
.contacts-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: clamp(32px, 6vw, 88px); padding: 16px var(--page-inset) var(--section-space); }
.contacts-information { min-width: 0; }
.contacts-information h2 { font-size: clamp(32px, 4vw, 48px); }
.contacts-information > p:not(.eyebrow) { color: var(--muted); }
.contact-detail { display: flex; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.contact-detail > span { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--bronze-dark); }
.contact-detail > div { min-width: 0; }
.contact-detail strong { font-weight: 500; }
.contact-detail p { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.phone-contact-wrapper { min-width: 0; padding: clamp(24px, 3vw, 40px); background: var(--stone); border-top: 1px solid var(--line); }
.phone-contact-label { margin: 32px 0 16px; font-size: 14px; color: var(--muted); }
.phone-contact-number { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--serif); font-size: clamp(28px, 3.2vw, 44px); font-weight: 600; line-height: 1.3; white-space: nowrap; transition: color 250ms ease; }
.phone-contact-number:hover { color: var(--bronze-dark); }
.phone-contact-note { margin: 20px 0 0; font-size: 13px; color: var(--muted); }
.about-story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: center; gap: clamp(32px, 6vw, 88px); padding: 16px var(--page-inset) var(--section-space); }
.about-image { position: relative; min-width: 0; }
.about-image img { aspect-ratio: 4 / 5; }
.about-story-text { min-width: 0; }
.about-story-text h2 { font-size: clamp(32px, 4vw, 52px); }
.about-story-text > p:not(.eyebrow) { color: var(--muted); }
.about-principles { padding: var(--section-space) var(--page-inset); background: var(--stone); }
.about-section-heading { max-width: 720px; margin-bottom: 44px; }
.principles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--grid-gap); }
.principle-card { min-width: 0; padding-top: 24px; border-top: 1px solid #c5bcae; }
.principle-card > span { color: var(--bronze-dark); font-size: 12px; }
.principle-card p { color: var(--muted); font-size: 16px; }

/* Legal documents: calm typography and a readable line length. */
.privacy-intro { padding-bottom: 48px; }
.privacy-intro h1 { max-width: 1000px; font-size: clamp(34px, 4.8vw, 64px); }
.privacy-meta { display: flex; flex-wrap: wrap; gap: 24px 48px; margin: 36px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }
.privacy-meta > div { min-width: 0; }
.privacy-meta dt { margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.privacy-meta dd { margin: 0; font-size: 14px; }
.privacy-meta a { text-decoration: underline; text-underline-offset: 4px; }
.privacy-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: clamp(32px, 5vw, 80px); padding: 0 var(--page-inset) var(--section-space); }
.privacy-sidebar { position: sticky; top: 24px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; scrollbar-width: thin; }
.privacy-toc { padding: 24px 0; border-top: 1px solid var(--line); }
.privacy-toc ol { margin: 0; padding: 0; list-style: none; }
.privacy-toc a { display: flex; align-items: baseline; gap: 12px; min-height: 44px; padding: 10px 4px; font-size: 13px; line-height: 1.6; transition: background-color 250ms ease; }
.privacy-toc a span { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.privacy-toc a:hover { background: var(--stone); }
.privacy-toc a:focus-visible { outline-offset: -3px; }
.privacy-content { min-width: 0; max-width: 740px; }
.privacy-content section { padding: 36px 0; border-top: 1px solid var(--line); }
.privacy-content h2 { font-size: clamp(28px, 2.8vw, 38px); margin: 0 0 24px; line-height: 1.15; }
.privacy-content p, .privacy-content li { color: var(--muted); font-size: clamp(16px, 1.2vw, 17px); line-height: 1.8; }
.privacy-content strong { color: var(--ink); font-weight: 600; }
.privacy-content section > :last-child { margin-bottom: 0; }
.privacy-content .privacy-operator, .privacy-related { padding: 24px; border-left: 2px solid var(--bronze); background: var(--stone); }
.privacy-content ul { margin: 0 0 24px; padding-left: 24px; }
.privacy-content li + li { margin-top: 10px; }
.privacy-content li::marker { color: var(--bronze-dark); }
.privacy-content code { padding: 2px 6px; background: var(--stone); color: var(--ink); font-size: .9em; overflow-wrap: anywhere; }
.privacy-content a { text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.privacy-content a:not(.button):hover { color: var(--ink); }
.privacy-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; padding-top: 32px; }
.privacy-content .button { text-decoration: none; }
.privacy-related { margin-top: 16px; }
.privacy-related .eyebrow { font-size: 12px; margin-bottom: 8px; }
.privacy-related a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 0; font-size: 15px; }
.privacy-back-top { gap: 12px; color: var(--muted); }

.footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 32px var(--page-inset); border-top: 1px solid var(--line); }
.footer .logo { width: 96px; }
.footer p { margin: 0; font-size: 12px; color: var(--muted); }
.footer-legal { display: flex; flex-direction: column; align-items: flex-start; gap: 0; max-width: 440px; }
.footer-privacy { display: inline-flex; align-items: center; min-height: 44px; max-width: 100%; padding: 8px 0; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; transition: color 250ms ease; }
.footer-privacy:hover { color: var(--ink); }

/* JS only marks off-screen elements, after connecting the observer. */
.reveal-pending, .reveal-visible { transition: opacity 500ms var(--ease), transform 550ms var(--ease); transition-delay: var(--reveal-delay, 0ms); }
.reveal-pending { opacity: 0; transform: translateY(16px); }
.reveal-visible { opacity: 1; transform: none; }
.intro-ready { animation: dialog-in 550ms var(--ease) both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (hover: hover) and (pointer: fine) {
    .navigation a:hover::after { transform: scaleX(1); }
    .button-dark:hover { background: #484238; border-color: #484238; }
    .header-button:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
    .button-light:hover, .modal-close:hover, .menu-toggle:hover { background: #fff; border-color: var(--bronze); }
    .contact .button-light:hover { background: #e5dfd5; border-color: #e5dfd5; }
    .filter-button:not(.active):hover { background: var(--stone); border-color: #a99d8c; }
    .service-card:hover { background: #f5f2ed; border-color: #a99d8c; }
    .service-card a:hover, .service-link:hover { color: var(--bronze-dark); border-color: var(--bronze-dark); }
    .project-card:hover img, .gallery-open:enabled:hover img { transform: scale(1.025); }
}

@media (max-width: 1100px) {
    .header-button { display: none; }
    .portfolio-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .privacy-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .privacy-sidebar { position: static; max-height: none; overflow: visible; }
    .privacy-toc ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
    .privacy-content { max-width: 780px; }
}
@media (max-width: 900px) {
    .header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 16px; min-height: 80px; padding-block: 16px; }
    .header .logo { width: 92px; }
    .menu-ready .menu-toggle { display: inline-flex; width: 44px; min-height: 44px; padding: 0; font-size: 19px; }
    .navigation { grid-column: 1 / -1; display: grid; grid-template-rows: 1fr; }
    .navigation-inner { min-height: 0; overflow: hidden; flex-direction: column; align-items: stretch; gap: 0; }
    .navigation a { min-height: 48px; padding: 10px 2px; }
    .navigation a:first-child { margin-top: 12px; }
    .navigation a:focus-visible { outline-offset: -3px; }
    .navigation a::after { bottom: 5px; width: 32px; }
    .menu-ready .navigation { grid-template-rows: 0fr; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: grid-template-rows 300ms var(--ease), opacity 250ms ease, transform 300ms var(--ease), visibility 0s 300ms; }
    .menu-ready .navigation.is-open { grid-template-rows: 1fr; visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
    .services-grid { grid-template-columns: 1fr; }
    .service-card { padding: 28px; }
    .contacts-layout, .about-story { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .phone-contact-wrapper { max-width: 640px; width: 100%; }
    .about-image { max-width: 640px; width: 100%; }
}
@media (max-width: 700px) {
    .hero { padding-top: 48px; }
    .hero-image { aspect-ratio: 4 / 5; }
    .portfolio-grid, .portfolio-gallery, .services-page-grid, .principles-grid { grid-template-columns: minmax(0, 1fr); }
    .portfolio-gallery { gap: 32px; }
    .section-heading, .about-section-heading { margin-bottom: 32px; }
    .privacy-meta { flex-direction: column; gap: 20px; }
    .privacy-toc ol { grid-template-columns: minmax(0, 1fr); }
    .privacy-content section { padding-block: 28px; }
    .privacy-content .privacy-operator, .privacy-related { padding: 20px; }
    .footer { flex-direction: column; align-items: flex-start; gap: 16px; }
}
@media (max-width: 400px) {
    .hero-buttons { flex-direction: column; }
    .hero-buttons .button, .center-button .button, .contact .button, .privacy-actions .button { width: 100%; }
    .portfolio-filters { gap: 8px; }
    .filter-button { padding-inline: 12px; }
    .project-modal { padding: 12px; }
    .project-modal-panel { max-height: calc(100dvh - 24px); padding: 28px 22px; }
    .phone-contact-wrapper { padding: 24px 18px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal-pending { opacity: 1; transform: none; }
    .project-card:hover img, .gallery-open:enabled:hover img { transform: none; }
    .menu-ready .navigation { transform: none; }
}

