/* FR Property: restrained motion, loaded after the existing stylesheet. */
:root {
  --motion-ease: cubic-bezier(.22, 1, .36, 1);
  --page-progress: 0;
}

html { scrollbar-gutter: stable; }
body { overflow-x: clip; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible {
  outline: 2px solid #b47d59;
  outline-offset: 6px;
}
.skip-link {
  position: fixed;
  z-index: 200;
  top: 12px;
  left: 16px;
  padding: 12px 18px;
  background: #faf7f3;
  color: #4b2311;
  font-family: var(--font-ui);
  translate: 0 -180%;
}
.skip-link:focus { translate: 0; }

/* Content is visible by default, including when JavaScript is unavailable. */
.motion-ready [data-reveal] {
  transition: opacity .85s var(--motion-ease), translate .85s var(--motion-ease);
  transition-delay: var(--reveal-delay, 0ms);
}
.motion-ready [data-reveal]:not(.is-visible) {
  opacity: 0;
  translate: 0 22px;
}
.motion-ready [data-reveal="soft"]:not(.is-visible) { translate: 0 12px; }
.motion-ready [data-reveal="photo"]:not(.is-visible) { translate: 0 28px; }
.motion-ready .figma-rule {
  transform-origin: left center;
  transition: transform 1s var(--motion-ease) .2s;
}
.motion-ready [data-reveal]:not(.is-visible) .figma-rule,
.motion-ready .figma-rule[data-reveal]:not(.is-visible) { transform: scaleX(0); }

#navbar::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: #f2d4b8;
  transform: scaleX(var(--page-progress));
  transform-origin: left;
  pointer-events: none;
  opacity: .75;
}
.nav-links a, .footer-menu a { position: relative; }
.nav-links a::after, .footer-menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 4px;
  right: 4px;
  height: 1px;
  background: currentColor;
  opacity: .7;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--motion-ease);
}
.nav-links a:hover { text-decoration: none; }
.nav-links a:hover::after, .nav-links a:focus-visible::after,
.footer-menu a:hover::after, .footer-menu a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-links a[aria-current="page"]::after { transform: scaleX(.35); transform-origin: left; }
.nav-links a[aria-current="page"]:hover::after { transform: scaleX(1); }
.mobile-panel { display: contents; }

/* A single, slow camera move in the photograph, independent of the text. */
.figma-hero--about {
  width: 100%;
  margin-inline: 0;
  background-image: none;
  isolation: isolate;
}
.figma-hero--about .hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transform-origin: 60% 46%;
  pointer-events: none;
}
.figma-hero--about::before { z-index: 1; }
.figma-hero--about .figma-hero__content { z-index: 2; }
.hero-image.is-zooming {
  animation: hero-lens-in 6s cubic-bezier(.2, .65, .35, 1) both;
  will-change: transform;
}
.hero-image.is-zoom-complete { will-change: auto; }
@keyframes hero-lens-in {
  from { transform: scale(1); }
  to { transform: scale(1.09); }
}
@media (max-width: 900px) {
  .figma-hero--about .hero-image { object-position: 58% center; }
}

.figma-hero h1 em { font-weight: inherit; }
.figma-hero .figma-btn { white-space: normal; }
.figma-about .figma-btn {
  transition: opacity .85s var(--motion-ease), translate .85s var(--motion-ease), background .35s ease, box-shadow .35s ease, transform .35s var(--motion-ease);
}
.figma-btn .btn-arrow {
  transition: transform .45s var(--motion-ease);
}
.figma-about .figma-btn:hover {
  box-shadow: 0 12px 26px rgb(70 35 16 / 16%);
  transform: translateY(-2px);
}
.figma-btn:hover .btn-arrow { transform: translate(5px, 1px); }
.figma-btn:active { transform: translateY(0); }

.figma-service-row {
  position: relative;
  transition: border-color .45s ease, box-shadow .45s ease;
}
.figma-service-copy { min-width: 0; }
.figma-service-row::after {
  content: "";
  position: absolute;
  inset: -1px auto auto -1px;
  width: 58px;
  height: 1px;
  background: #a66949;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--motion-ease) .4s;
  pointer-events: none;
}
.figma-service-row.is-visible::after { transform: scaleX(1); }
.motion-photo { margin: 0; overflow: hidden; }
.motion-photo img { width: 100%; height: auto; transition: transform 1.2s var(--motion-ease); }
.figma-personal .motion-photo img { aspect-ratio: 421 / 525; object-fit: cover; }
.figma-why li::marker, .figma-personal li::marker { color: #a66949; }

@media (hover: hover) and (pointer: fine) {
  .motion-photo:hover img { transform: scale(1.025); }
  .figma-service-row:hover { border-color: #be977b; }
}

/* Contact panel: opens only after a deliberate click. */
.contact-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(540px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  padding: 0;
  overflow: auto;
  border: 1px solid #d9c4b3;
  border-radius: 2px;
  background: #faf7f3;
  color: #4b2311;
  box-shadow: 0 30px 100px rgb(40 20 10 / 22%);
  opacity: 0;
  transform: translateY(18px) scale(.985);
  transition: opacity .3s ease, transform .45s var(--motion-ease);
}
.contact-dialog.is-open { opacity: 1; transform: none; }
.contact-dialog::backdrop {
  background: rgb(37 23 17 / 0%);
  backdrop-filter: blur(0);
  transition: background .3s ease, backdrop-filter .3s ease;
}
.contact-dialog.is-open::backdrop {
  background: rgb(37 23 17 / 42%);
  backdrop-filter: blur(5px);
}
.contact-dialog__inner { padding: 50px 42px 40px; }
.contact-dialog__close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 0;
  color: #6d4735;
  cursor: pointer;
}
.contact-dialog__close svg { width: 20px; height: 20px; }
.contact-dialog__eyebrow {
  font: 400 11px/1.5 var(--font-ui);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #946449;
  margin-bottom: 18px;
}
.contact-dialog h2 { font: 400 44px/1.05 var(--font-hero); max-width: 340px; }
.contact-dialog .figma-rule { width: 52px; margin: 24px 0; }
.contact-dialog__intro { font: 400 14px/1.65 var(--font-ui); color: #6d4735; }
.contact-dialog__name { margin-top: 28px; font: 400 27px/1.2 var(--font-text); }
.contact-dialog__links { display: grid; margin-top: 18px; }
.contact-dialog__links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  border-bottom: 1px solid #e1d3c8;
  font: 400 14px/1.5 var(--font-ui);
  transition: color .25s;
}
.contact-dialog__links a:hover { color: #a46139; }
.contact-dialog__links span { transition: translate .35s var(--motion-ease); }
.contact-dialog__links a:hover span { translate: 4px 0; }
.contact-dialog__note { margin-top: 28px; color: #886b58; font: 400 12px/1.5 var(--font-ui); }
html.dialog-open { overflow: hidden; }

@media (min-width: 901px) and (max-width: 1200px) {
  .nav-left { gap: 20px; }
  .nav-right { gap: 28px; }
  .nav-links { gap: 18px; }
  .nav-links a, .lang-link, .contact-bar .phone { font-size: 15px; }
  .figma-service-row--overlap .figma-service-copy { padding: 26px 22px; column-gap: 20px; grid-template-columns: 70px 1fr; }
  .figma-why { gap: 32px; }
  .figma-personal { gap: 60px; }
}

@media (max-width: 900px) {
  #navbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; min-height: 76px; padding: 12px 20px; }
  .nav-left { grid-column: 1; display: flex; min-width: 0; width: auto; gap: 16px; }
  .logo { padding: 0; flex-shrink: 0; }
  .logo img { width: auto; height: 46px; }
  .contact-bar { gap: 10px; }
  .contact-bar .phone { font-size: 14px; }
  .contact-bar .icon { width: 24px; }
  .mobile-menu-toggle {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 8px;
    border: 0;
    background: transparent;
    filter: none;
    cursor: pointer;
  }
  .mobile-menu-toggle span { display: block; width: 23px; height: 1px; background: #fff7ec; transition: transform .35s var(--motion-ease), opacity .25s; }
  .is-menu-open .mobile-menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .is-menu-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; }
  .is-menu-open .mobile-menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  #navbar .nav-right {
    grid-column: 1 / -1;
    display: grid;
    grid-template-rows: 0fr;
    gap: 0;
    width: 100%;
    padding: 0;
    border: 0;
    opacity: 0;
    visibility: hidden;
    transition: grid-template-rows .4s var(--motion-ease), opacity .25s ease, visibility .4s;
  }
  .mobile-panel { display: flex; flex-direction: column; gap: 16px; overflow: hidden; min-height: 0; }
  #navbar.is-menu-open .nav-right { grid-template-rows: 1fr; opacity: 1; visibility: visible; }
  .mobile-panel .nav-links { flex-direction: column; gap: 0; width: 100%; padding-top: 16px; }
  .nav-links a { display: inline-block; padding: 10px 0; font-size: 16px; }
  .nav-links a::after { left: 0; right: 0; }
  .mobile-panel .lang-switch { padding-bottom: 16px; }
  .figma-hero--about { width: 100%; min-height: 610px; margin: 0 0 72px; background-position: 58% center; }
  .figma-hero--about .figma-hero__content { width: calc(100% - 40px); padding: 190px 0 38px; }
  .figma-hero--about h1 { font-size: clamp(40px, 7.7vw, 60px); }
  .figma-hero--about p { font-size: 15px; }
  .figma-hero--about .figma-btn { width: fit-content; min-width: 0; min-height: 52px; padding: 14px 22px; font-size: 14px; }
  .figma-hero--about::before { background: linear-gradient(90deg, rgb(35 18 12 / 62%), rgb(35 18 12 / 8%)); }
  .figma-services--about { width: calc(100% - 30px); gap: 28px; margin-bottom: 76px; }
  .figma-services--about .figma-service-row--overlap,
  .figma-services--about .figma-service-row--overlap:nth-child(2) { grid-template-columns: minmax(0, 1fr); padding: 18px; min-height: 0; }
  .figma-service-row--overlap .figma-service-copy { grid-template-columns: 56px minmax(0, 1fr); gap: 0 18px; padding: 12px 4px 28px; }
  .figma-service-copy span { font-size: 54px; }
  .figma-service-copy h2 { font-size: clamp(27px, 4vw, 34px); margin-bottom: 20px; }
  .figma-service-copy h2 br { display: none; }
  .figma-service-copy p { grid-column: 2; font-size: 14px; line-height: 1.6; }
  .figma-service-copy p + p { margin-top: 10px; }
  .figma-services--about .figma-service-row--overlap img,
  .figma-services--about .figma-service-row--overlap:nth-child(2) img { order: 0; min-height: 0; aspect-ratio: 597 / 391; height: auto; }
  .figma-why, .figma-personal { width: calc(100% - 40px); grid-template-columns: 1fr 1fr; gap: 30px; }
  .figma-why { margin-bottom: 78px; align-items: start; }
  .figma-why .motion-photo { grid-column: 1 / -1; }
  .figma-why img { min-height: 0; max-height: 420px; object-fit: cover; }
  .figma-why h2, .figma-personal h2 { font-size: 34px; }
  .figma-why li, .figma-why p, .figma-personal li, .figma-personal p { font-size: 14px; line-height: 1.6; }
  .figma-why .figma-rule, .figma-personal .figma-rule { margin: 22px 0; width: 54px; }
  .figma-personal { padding-bottom: 200px; }
  .figma-personal::after { height: 220px; }
  .figma-personal .figma-btn { font-size: 14px; padding: 14px 22px; white-space: normal; }
  .site-footer .footer-row { grid-template-columns: 1fr 1fr 1fr; gap: 28px; align-items: start; }
  .site-footer .footer-phone, .site-footer .footer-email, .site-footer .footer-menu { font-size: 14px; }
  .site-footer .footer-logo { max-width: 140px; }
  html:not(.js-enabled) #navbar .nav-right { grid-template-rows: 1fr; opacity: 1; visibility: visible; }
  html:not(.js-enabled) .mobile-menu-toggle { display: none; }
}

@media (max-width: 600px) {
  #navbar { padding: 10px 15px; }
  .nav-left { gap: 12px; }
  .contact-bar { gap: 8px; }
  .contact-bar a[aria-label="Telegram"] .icon { width: 23px; }
  .contact-bar a[aria-label="Телефон"] .icon { width: 20px; }
  .contact-bar .phone { font-size: 12px; letter-spacing: 0; }
  .figma-hero--about { min-height: 600px; }
  .figma-hero--about .figma-hero__content { padding-top: 210px; }
  .figma-hero--about .figma-rule { margin: 22px 0; width: 52px; }
  .figma-hero--about p br { display: none; }
  .figma-hero--about p { max-width: 250px; line-height: 1.55; margin-bottom: 26px; }
  .figma-service-row--overlap .figma-service-copy { grid-template-columns: 42px minmax(0, 1fr); column-gap: 12px; padding-top: 6px; }
  .figma-service-copy span { font-size: 44px; }
  .figma-service-copy h2 { font-size: 28px; overflow-wrap: anywhere; }
  .figma-service-copy p { grid-column: 1 / -1; }
  .figma-why, .figma-personal { width: calc(100% - 30px); grid-template-columns: 1fr; gap: 28px; }
  .figma-why .motion-photo { grid-column: auto; }
  .figma-why ul { padding-left: 18px; }
  .figma-why img { aspect-ratio: 471 / 390; }
  .figma-personal .motion-photo { width: 85%; }
  .figma-personal > div { padding: 8px 8px 0; }
  .figma-personal { gap: 28px; padding-bottom: 150px; }
  .figma-personal::after { height: 150px; }
  .figma-personal .figma-person-name { margin-top: 0; }
  .site-footer { padding-top: 46px; }
  .site-footer .footer-row { grid-template-columns: 1fr; display: grid; gap: 30px; }
  .footer-col-left, .footer-col-center, .footer-col-right { justify-self: center; text-align: center; }
  .footer-social { justify-content: center; }
  .site-footer .footer-menu { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 24px; }
  .site-footer .footer-col-center { grid-row: 1; }
  .site-footer .footer-logo { max-width: 130px; }
  .footer-legal { width: calc(100% - 30px); margin-top: 36px; padding: 20px 0 0; font-size: 10px; }
  .contact-dialog__inner { padding: 52px 25px 32px; }
  .contact-dialog h2 { font-size: 40px; }
  .contact-dialog__links a { font-size: 13px; }
}

@media (max-width: 359px) {
  .contact-bar > a:first-child { display: none; }
  .figma-hero--about h1 { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .motion-ready [data-reveal]:not(.is-visible) { opacity: 1; translate: none; }
  .motion-ready .figma-rule { transform: none !important; }
  .contact-dialog { transform: none; }
  .hero-image.is-zooming { animation: none !important; transform: none; }
  .motion-photo:hover img, .figma-about .figma-btn:hover { transform: none; }
}
