@font-face {
  font-family: Unbounded;
  src: url("assets/fonts/unbounded-cyrillic.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: Onest;
  src: url("assets/fonts/onest-cyrillic.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --plum: #2b1f2f;
  --ivory: #f3eee8;
  --amber: #e7a93b;
  --champagne: #c7a56a;
  --line-on-light: rgb(43 31 47 / 19%);
  --line-on-dark: rgb(243 238 232 / 22%);
  --gutter: clamp(20px, 5.25vw, 104px);
  --page-max: 1720px;
  --hero-depth: 1;
  --hero-scale: 1;
  color-scheme: light;
  background: var(--plum);
  color: var(--plum);
  font-family: Onest, Arial, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; scrollbar-gutter: stable; }
body { margin: 0; }
body, button, a, summary { -webkit-tap-highlight-color: transparent; }
::selection { color: var(--plum); background: var(--amber); }
a { color: inherit; text-decoration: none; }
button, summary, textarea { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
p, h1, h2, h3 { margin: 0; }
p { line-height: 1.6; }
a, summary { touch-action: manipulation; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }
main:focus { outline: none; }
[id] { scroll-margin-top: 32px; }
.page-width { width: min(calc(100% - var(--gutter) * 2), var(--page-max)); margin-inline: auto; }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: .115em; line-height: 1.6; text-transform: uppercase; }
.skip-link { position: fixed; z-index: 100; top: 14px; left: 14px; padding: 14px 20px; color: var(--plum); background: var(--ivory); transform: translateY(-180%); }
.skip-link:focus { transform: none; }

/* Hero и следующий слой находятся в общем длинном контейнере. */
.hero-scene { position: relative; }
.hero { position: relative; min-height: max(740px, 100svh); display: flex; flex-direction: column; overflow: clip; color: var(--ivory); background: var(--plum); isolation: isolate; }
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
  .hero.is-pinned { position: sticky; top: var(--hero-sticky-top, 0px); z-index: 0; }
}
.hero-art { position: absolute; z-index: -1; width: min(58vw, 1050px); right: -11%; top: 11%; opacity: .045; pointer-events: none; transform: rotate(-8deg); }
.hero-art img { width: 100%; }
.site-header { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 32px; min-height: 118px; border-bottom: 1px solid var(--line-on-dark); }
.brand { display: inline-flex; flex: none; align-items: center; gap: 10px; }
.brand img { width: 158px; }
.brand-descriptor { margin-left: -5px; padding-left: 10px; border-left: 1px solid var(--line-on-dark); font-size: 14px; letter-spacing: .055em; }
.desktop-nav { display: flex; align-items: center; gap: clamp(26px, 3.3vw, 68px); font-size: 14px; }
.desktop-nav a, .desktop-nav button { padding-block: 14px; transition: color .2s; }
.desktop-nav a:hover, .desktop-nav button:hover, .text-link:hover, .back-to-top:hover { color: var(--amber); }
.nav-contact { display: flex; align-items: center; gap: 28px; }
.nav-contact, button.text-link { padding-inline: 0; border: 0; color: inherit; background: transparent; }
button.nav-contact { font-size: 14px; }
button.text-link { border-bottom: 1px solid var(--line-on-dark); }
.nav-contact span { font-size: 21px; }
.mobile-menu { display: none; }
.hero-content { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-block: clamp(42px, 6vh, 80px); transform: scale(var(--hero-scale)); transform-origin: left center; opacity: var(--hero-depth); }
.hero-eyebrow { display: flex; align-items: center; gap: 18px; margin-bottom: clamp(30px, 3vw, 50px); }
.accent-line { display: inline-block; width: 30px; height: 1px; flex: none; background: var(--amber); }
h1, h2, h3 { overflow-wrap: break-word; }
h1 { font-family: Unbounded, Arial, sans-serif; font-size: clamp(32px, 4.4vw, 80px); line-height: 1.22; font-weight: 700; letter-spacing: -.052em; }
h1 > span { display: block; }
.hero-title-secondary { margin-top: 24px; font-size: .58em; line-height: 1.45; letter-spacing: -.035em; }
.hero-columns { display: grid; grid-template-columns: 1.2fr .8fr; align-items: start; gap: clamp(36px, 5vw, 96px); }
.hero-copy { max-width: 470px; padding-top: 5px; font-size: 16px; }
.hero-copy p + p, .section-intro p + p, .contact-aside p + p { margin-top: 18px; }
.title-period { color: var(--amber); }
.hero-actions { display: flex; align-items: center; gap: 34px; margin-top: 36px; padding-bottom: 4px; }
.button { display: inline-flex; justify-content: space-between; align-items: center; gap: 34px; min-height: 60px; padding: 18px 24px; border: 1px solid transparent; font-size: 14px; line-height: 1.3; font-weight: 500; transition: background .2s, transform .2s; }
.button-amber { color: var(--plum); background: var(--amber); }
.button:hover { background: var(--ivory); transform: translateY(-2px); }
.button span { font-size: 22px; line-height: 1; }
.text-link { display: inline-flex; align-items: center; gap: 20px; padding-block: 14px; border-bottom: 1px solid var(--line-on-dark); font-size: 14px; line-height: 1.3; transition: color .2s; }
.text-link span { font-size: 19px; }
.hero-foot { display: flex; align-items: center; justify-content: space-between; gap: 30px; min-height: 84px; border-top: 1px solid var(--line-on-dark); font-size: 13px; letter-spacing: .015em; }
.scroll-hint { display: inline-flex; align-items: center; gap: 26px; padding-block: 18px; }
.scroll-hint span { font-size: 19px; }

/* Светлая поверхность проходит над первым экраном без перехвата прокрутки. */
.content-sheet { position: relative; z-index: 2; border-radius: 32px 32px 0 0; background: var(--ivory); }
.section-space { padding-block: clamp(72px, 8.5vw, 152px); }
.section-heading > .eyebrow { margin-bottom: 32px; }
.heading-grid { display: grid; grid-template-columns: 1.2fr .8fr; align-items: end; gap: clamp(40px, 8vw, 150px); }
h2 { font-family: Unbounded, Arial, sans-serif; font-size: clamp(40px, 2.8vw, 50px); line-height: 1.35; letter-spacing: -.052em; font-weight: 700; }
.section-intro { max-width: 340px; padding-bottom: 4px; font-size: 17px; }
.solution-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 10px 64px; margin-top: 54px; }
.solution-card { min-width: 0; border-top: 1px solid var(--line-on-light); }
.case-details > summary { display: block; min-height: 44px; list-style: none; cursor: pointer; }
.case-details > summary::-webkit-details-marker { display: none; }
.case-kicker { display: block; margin-bottom: 18px; font-size: 12px; font-weight: 500; letter-spacing: .035em; line-height: 1.6; }
.solution-card summary { padding-top: 26px; }
.solution-card h3 { max-width: 580px; font-size: clamp(22px, 1.65vw, 28px); line-height: 1.45; font-weight: 500; letter-spacing: -.025em; }
.details-action { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 58px; margin-top: 10px; font-size: 12px; }
.details-plus { display: inline-grid; width: 26px; height: 26px; place-items: center; flex: none; font-size: 25px; line-height: 1; transition: transform .2s; }
.case-details[open] .details-plus { transform: rotate(45deg); }
.case-body { max-width: 640px; padding-bottom: 28px; font-size: 16px; }
.case-body p + p { margin-top: 16px; }
.case-body strong { font-weight: 600; }
.case-details > summary:hover .details-action { text-decoration: underline; text-underline-offset: 4px; }
.projects { padding-top: 14px; }
.projects-heading { margin-bottom: 70px; }
.project-gallery { display: grid; grid-template-columns: 1.15fr .85fr; align-items: start; gap: clamp(32px, 6vw, 110px); }
.project-card { min-width: 0; }
.project-card-small { margin-top: clamp(90px, 11vw, 200px); }
.project-placeholder { position: relative; display: grid; place-items: center; padding: 36px; border: 1px solid var(--line-on-light); overflow: clip; background: var(--ivory); }
.project-placeholder-portrait { aspect-ratio: 1.3; }
.project-placeholder-landscape { aspect-ratio: 1.6; background: var(--plum); color: var(--ivory); border-color: transparent; }
.placeholder-frame { position: absolute; inset: 30px; border: 1px solid var(--line-on-light); transition: transform .5s; }
.project-placeholder-landscape .placeholder-frame { border-color: var(--line-on-dark); }
.placeholder-frame i { position: absolute; width: 13px; height: 13px; border-color: var(--plum); border-style: solid; }
.placeholder-frame i:nth-child(1) { top: -1px; left: -1px; border-width: 1px 0 0 1px; }
.placeholder-frame i:nth-child(2) { top: -1px; right: -1px; border-width: 1px 1px 0 0; }
.placeholder-frame i:nth-child(3) { bottom: -1px; right: -1px; border-width: 0 1px 1px 0; }
.placeholder-frame i:nth-child(4) { bottom: -1px; left: -1px; border-width: 0 0 1px 1px; }
.project-placeholder-landscape .placeholder-frame i { border-color: var(--champagne); }
.placeholder-content { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding-block: 30px; }
.preview-index { margin-bottom: 23px; font-family: Unbounded, Arial, sans-serif; font-size: clamp(44px, 5vw, 80px); letter-spacing: -.05em; line-height: 1.2; }
.preview-title { font-size: 16px; font-weight: 500; }
.preview-caption { max-width: 185px; margin-top: 8px; font-size: 13px; line-height: 1.6; }
.project-card .case-kicker { margin-top: 24px; }
.project-card h3 { font-size: clamp(22px, 1.65vw, 28px); line-height: 1.45; font-weight: 500; letter-spacing: -.025em; }
.project-archive { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 12px 64px; margin-top: 64px; }
.project-card-compact { padding-top: 8px; border-top: 1px solid var(--line-on-light); }
.project-card-compact .case-kicker { margin-top: 16px; }
.project-image { width: 100%; height: auto; object-fit: cover; }

.about { border-top: 1px solid var(--line-on-light); }
.about .eyebrow { margin-bottom: 34px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: clamp(40px, 7vw, 130px); }
.about h2 { font-size: clamp(40px, 2.45vw, 43px); }
.author-name { margin-top: 34px; font-size: 19px; font-weight: 500; }
.author-fields { max-width: 340px; margin-top: 9px; font-size: 13px; }
.about-copy { font-size: 17px; }
.about-copy p + p { margin-top: 22px; }
.about-copy > p:first-child { font-size: 20px; line-height: 1.55; }
.about-copy strong { font-weight: 600; }

.contact { color: var(--ivory); background: var(--plum); }
.contact-content { padding-block: clamp(72px, 8vw, 140px); }
.contact-content > .eyebrow { margin-bottom: 46px; }
.contact-grid { display: grid; grid-template-columns: 1.3fr .7fr; align-items: end; gap: clamp(40px, 6vw, 110px); }
.contact h2 { font-size: clamp(40px, 2.65vw, 48px); }
.contact-aside { max-width: 340px; padding-bottom: 6px; }
.contact-aside > p { font-size: 17px; }
.contact-aside .button { margin-top: 28px; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 30px; min-height: 118px; padding-block: 24px; border-top: 1px solid var(--line-on-dark); }
.footer-brand img { width: 148px; }
.footer-author { margin-left: auto; font-size: 12px; }
.footer-author p + p { margin-top: 4px; font-size: 11px; }
.back-to-top { display: inline-flex; align-items: center; gap: 22px; margin-left: 50px; padding-block: 12px; font-size: 12px; transition: color .2s; }
.back-to-top span { font-size: 19px; }

.contact-dialog { position: fixed; inset: 16px; width: min(690px, calc(100% - 32px)); height: fit-content; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid var(--line-on-light); border-radius: 6px; color: var(--plum); background: var(--ivory); overscroll-behavior: contain; }
.contact-dialog::backdrop { background: rgb(43 31 47 / 78%); }
.dialog-inner { padding: clamp(24px, 4vw, 52px); }
.dialog-close { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; margin: -8px 0 24px auto; padding: 0 2px; border: 0; color: var(--plum); background: transparent; font-size: 12px; }
.dialog-close span { font-size: 28px; }
.contact-dialog .eyebrow { margin-bottom: 20px; }
.contact-dialog h2 { font-size: clamp(25px, 3vw, 35px); line-height: 1.4; }
#dialog-description { margin-top: 20px; font-size: 16px; }
.message-label { display: block; margin-top: 26px; margin-bottom: 9px; font-size: 14px; font-weight: 500; }
.contact-dialog textarea { display: block; width: 100%; min-height: 145px; resize: vertical; padding: 14px; border: 1px solid var(--plum); border-radius: 0; background: transparent; color: var(--plum); font-size: 16px; line-height: 1.6; }
.contact-dialog textarea::placeholder { color: var(--plum); opacity: .75; }
.contact-send { margin-top: 22px; }
.contact-availability { margin-top: 18px; font-size: 12px; }
.no-script-note { margin: 0; padding: 18px var(--gutter); color: var(--ivory); background: var(--plum); font-size: 14px; }

/* Без JS контент виден; анимация подключается только при наличии наблюдателя. */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal].will-reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s cubic-bezier(.2,.65,.3,1); }
  [data-reveal].will-reveal.is-visible { opacity: 1; transform: none; }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .project-card:hover .placeholder-frame { transform: translateY(-4px); }
}

@media (min-width: 1920px) {
  .hero-content { padding-block: 72px; }
}

@media (max-width: 1100px) {
  .hero { min-height: max(720px, 100svh); }
  .hero-actions { gap: 24px; }
  .button { gap: 20px; padding-inline: 18px; }
  .heading-grid, .contact-grid { gap: 40px; }
  .solution-grid, .project-archive { gap: 12px 40px; }
  .project-gallery { gap: 36px; }
  .contact h2 { font-size: 40px; }
}

@media (max-width: 900px) {
  .hero-columns { grid-template-columns: 1fr; gap: 30px; }
  h1 { font-size: clamp(38px, 5.6vw, 52px); }
  .hero-copy { max-width: 640px; }
  .hero-actions { justify-content: flex-start; }
  .hero-foot { min-height: 78px; }
  .heading-grid { grid-template-columns: 1fr; gap: 26px; }
  .section-intro { max-width: 480px; }
  .solution-grid { margin-top: 40px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-heading { max-width: 650px; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-aside { max-width: 430px; }
  .back-to-top { margin-left: 20px; }
}

@media (max-width: 767px) {
  html { scroll-padding-top: 22px; }
  [id] { scroll-margin-top: 22px; }
  .hero { position: relative; min-height: max(680px, 100svh); }
  .hero-content { transform: none; opacity: 1; padding-block: 62px 68px; }
  .hero-art { width: 105vw; top: 29%; right: -49%; opacity: .035; }
  .site-header { min-height: 96px; gap: 16px; }
  .brand { gap: 6px; }
  .brand img { width: 148px; }
  .brand-descriptor { font-size: 12px; padding-left: 8px; }
  .desktop-nav { display: none; }
  .mobile-menu { display: block; }
  .mobile-menu summary { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; list-style: none; }
  .mobile-menu summary::-webkit-details-marker { display: none; }
  .menu-label { font-size: 12px; }
  .menu-icon { display: grid; gap: 6px; width: 23px; }
  .menu-icon i { display: block; width: 23px; height: 1px; background: var(--ivory); transition: transform .2s; }
  .mobile-menu[open] .menu-icon i:first-child { transform: translateY(3.5px) rotate(45deg); }
  .mobile-menu[open] .menu-icon i:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .mobile-menu nav { position: absolute; top: calc(100% - 1px); left: 0; right: 0; display: grid; padding: 10px 22px; border: 1px solid var(--line-on-dark); background: var(--plum); }
  .mobile-menu nav a { display: flex; justify-content: space-between; align-items: center; min-height: 57px; font-size: 16px; }
  .mobile-menu nav a + a { border-top: 1px solid var(--line-on-dark); }
  .hero-eyebrow { max-width: 300px; align-items: flex-start; gap: 12px; margin-bottom: 34px; font-size: 11px; }
  .hero-eyebrow .accent-line { width: 20px; margin-top: 8px; }
  h1 { font-size: clamp(31px, 8.4vw, 57px); line-height: 1.25; letter-spacing: -.052em; }
  .hero-title-secondary { margin-top: 18px; font-size: .62em; }
  .hero-copy { font-size: 16px; }
  .hero-actions { flex-wrap: wrap; gap: 10px 26px; }
  .button { min-height: 56px; }
  .hero-foot { min-height: 70px; gap: 16px; font-size: 11px; }
  .hero-foot > span { max-width: 150px; }
  .scroll-hint { gap: 12px; white-space: nowrap; }
  .content-sheet { margin-top: 0; border-radius: 22px 22px 0 0; }
  .section-space { padding-block: 68px; }
  .section-heading > .eyebrow { margin-bottom: 24px; }
  .eyebrow { font-size: 11px; }
  h2 { font-size: clamp(27px, 5.7vw, 39px); line-height: 1.38; letter-spacing: -.055em; }
  .section-intro { font-size: 16px; }
  .solution-grid, .project-archive { grid-template-columns: 1fr; gap: 12px; }
  .solution-card h3, .project-card h3 { font-size: 22px; }
  .case-kicker { margin-bottom: 15px; font-size: 12px; }
  .case-body { font-size: 16px; }
  .projects { padding-top: 8px; }
  .projects-heading { margin-bottom: 36px; }
  .project-gallery { grid-template-columns: 1fr; gap: 48px; }
  .project-card-small { margin-top: 0; }
  .project-placeholder-portrait { aspect-ratio: 1.25; }
  .project-placeholder-landscape { aspect-ratio: 1.45; }
  .project-archive { margin-top: 42px; }
  .preview-index { font-size: clamp(44px, 9vw, 68px); }
  .contact-content { padding-block: 66px; }
  .contact-content > .eyebrow { margin-bottom: 30px; }
  .about h2, .contact h2 { font-size: clamp(27px, 5.7vw, 39px); line-height: 1.4; }
  .about-copy { font-size: 16px; }
  .about-copy > p:first-child { font-size: 18px; }
  .contact-aside > p { font-size: 16px; }
  .site-footer { flex-wrap: wrap; gap: 22px; padding-block: 24px; }
  .footer-brand .brand-descriptor { display: none; }
  .footer-author { width: 100%; margin-left: 0; font-size: 12px; }
  .back-to-top { width: 100%; justify-content: space-between; margin-left: 0; padding-top: 20px; border-top: 1px solid var(--line-on-dark); }
}

@media (max-width: 374px) {
  .site-header { min-height: 88px; }
  .brand-descriptor, .menu-label { display: none; }
  .mobile-menu summary { width: 44px; justify-content: flex-end; }
  .hero { min-height: max(700px, 100svh); }
  h1 { font-size: 27px; }
  .hero-actions { display: grid; justify-items: start; gap: 12px; }
  .button { width: 100%; }
  h2, .contact h2 { font-size: 25px; }
  .solution-card h3, .project-card h3 { font-size: 20px; }
  .project-placeholder { padding: 25px; }
  .placeholder-frame { inset: 20px; }
  .preview-caption { max-width: 160px; }
  .about h2 { font-size: 25px; }
  .contact-dialog .button { gap: 12px; padding-inline: 12px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero { position: relative; }
  .hero-content { transform: none; opacity: 1; }
  .content-sheet { margin-top: 0; }
}
