@font-face {
  font-family: "Prata";
  src: url("/fonts/prata-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Golos Text";
  src: url("/fonts/golos-text-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Golos Text";
  src: url("/fonts/golos-text-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #EAE1D4;
  --linen: #DDD1C0;
  --chocolate: #352D2B;
  --terracotta: #A65F50;
  --terracotta-text: #7E4639;
  --plum: #66505E;
  --muted: #5A5350;
  --line: #CFC2AF;
  --plum-line: rgba(102, 80, 94, .28);
  --shade: 36, 30, 29;

  --serif: "Prata", Georgia, "Times New Roman", serif;
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  --gap: clamp(16px, 2.2vw, 32px);
  --section: clamp(72px, 10vw, 136px);
  --header: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--chocolate);
  font-family: var(--sans);
  font-size: clamp(16px, 0.25vw + 15.2px, 18px);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html.is-locked,
html.is-lightbox {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color .2s ease;
}

a:hover {
  color: var(--terracotta-text);
}

:focus-visible {
  outline: 2px solid var(--terracotta);
  outline-offset: 3px;
}

.cookie :focus-visible,
.lightbox :focus-visible {
  outline-color: var(--paper);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.005em;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(2rem, 3.6vw, 3.25rem);
}

p {
  margin: 0 0 1em;
}

figure {
  margin: 0;
}

blockquote {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.nowrap {
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--chocolate);
  color: var(--paper);
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* --- общие элементы --- */

.eyebrow,
.section-label {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
}

.section-label::before {
  content: "";
  width: 40px;
  height: 1px;
  background: currentColor;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.caption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 14px 28px;
  border: 1px solid var(--plum);
  border-radius: 0;
  background: var(--plum);
  color: var(--paper);
  font: 500 15px/1.2 var(--sans);
  letter-spacing: 0.02em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

.btn:hover {
  border-color: var(--chocolate);
  background: var(--chocolate);
  color: var(--paper);
}

.btn--line {
  border-color: var(--chocolate);
  background: transparent;
  color: var(--chocolate);
}

.btn--line:hover {
  background: var(--chocolate);
  color: var(--paper);
}

.btn--paper {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--plum);
}

.btn--paper:hover {
  border-color: var(--plum);
  background: var(--plum);
  color: var(--paper);
}

.btn--ghost {
  border-color: rgba(234, 225, 212, .7);
  background: transparent;
  color: var(--paper);
}

.btn--ghost:hover {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--chocolate);
}

.btn--small {
  min-height: 40px;
  padding: 9px 18px;
  font-size: 14px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.link-arrow::after {
  content: "→";
  transition: transform .25s var(--ease);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.label {
  display: inline-block;
  margin-bottom: 14px;
  padding: 3px 10px;
  border: 1px solid currentColor;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1.6;
  text-transform: uppercase;
}

.label--render {
  color: var(--plum);
}

.label--photo {
  color: var(--chocolate);
}

.label--sketch {
  color: var(--terracotta-text);
}

.note {
  position: relative;
  padding-left: 28px;
  border-left: 1px solid var(--plum);
}

.note__label {
  margin-bottom: 12px;
  color: var(--terracotta-text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.note blockquote p,
blockquote.note > p {
  margin: 0;
  color: var(--plum);
  font-family: var(--serif);
  font-size: clamp(1.25rem, 1.6vw, 1.5rem);
  line-height: 1.4;
}

.note--big {
  margin-top: 36px;
}

blockquote.note--big > p {
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

/* --- шапка --- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(234, 225, 212, .94);
  border-bottom: 1px solid transparent;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color .3s ease;
}

.header.is-scrolled {
  border-bottom-color: var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header);
}

.logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1.2;
}

.logo:hover {
  color: inherit;
}

.logo__name {
  font-family: var(--serif);
  font-size: 21px;
}

.logo__role {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 36px);
  font-size: 15px;
}

.nav a:not(.btn) {
  text-decoration: none;
}

.nav a[aria-current="page"] {
  text-decoration: underline;
}

.burger {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--chocolate);
  cursor: pointer;
}

.burger__line,
.burger__line::before,
.burger__line::after {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 1px;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .2s ease;
}

.burger__line {
  top: 21px;
}

.burger__line::before,
.burger__line::after {
  content: "";
  left: 0;
}

.burger__line::before {
  top: -7px;
}

.burger__line::after {
  top: 7px;
}

.burger[aria-expanded="true"] .burger__line {
  background: transparent;
}

.burger[aria-expanded="true"] .burger__line::before {
  transform: translateY(7px) rotate(45deg);
}

.burger[aria-expanded="true"] .burger__line::after {
  transform: translateY(-7px) rotate(-45deg);
}

/* --- первый экран --- */

.js .page--over .header {
  position: fixed;
  inset: 0 0 auto;
  background: transparent;
  color: var(--paper);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

.js .page--over .header .logo__role {
  color: inherit;
  opacity: .8;
}

.js .page--over .burger {
  color: inherit;
}

html:not(.is-locked) .page--over .header:not(.is-scrolled) :focus-visible,
.hero :focus-visible {
  outline-color: var(--paper);
}

html:not(.is-locked) .page--over .header:not(.is-scrolled) .nav a:not(.btn):hover {
  color: inherit;
  text-decoration: underline;
}

.js .page--over .header.is-scrolled,
.js.is-locked .page--over .header {
  background: rgba(234, 225, 212, .94);
  color: var(--chocolate);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.hero {
  --marquee: 64px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  color: var(--paper);
  text-shadow: 0 1px 28px rgba(var(--shade), .35);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-zoom 10s cubic-bezier(.3, .3, .5, 1) both;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--shade), .55) 0%, rgba(var(--shade), .38) 45%, rgba(var(--shade), .62) 100%);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: calc(var(--header) + 32px);
  padding-bottom: calc(var(--marquee) + 64px);
  text-align: center;
}

.hero__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(16px, 1.8vw, 24px);
  margin-bottom: clamp(18px, 2vw, 26px);
  font-size: inherit;
  line-height: 1.3;
  letter-spacing: normal;
}

.hero__studio {
  font-family: var(--serif);
  font-size: clamp(2.3rem, 1.2rem + 3.6vw, 4.75rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.hero__subtitle {
  font-family: var(--sans);
  font-size: clamp(13px, 0.4vw + 11px, 15px);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero__title {
  margin: 0 0 clamp(32px, 4vw, 44px);
  font-family: var(--serif);
  font-size: clamp(1.45rem, 1.1rem + 1vw, 2.1rem);
  line-height: 1.15;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px 24px;
}

.hero .btn {
  text-shadow: none;
}

.hero__project {
  position: absolute;
  right: var(--gutter);
  bottom: calc(var(--marquee) + 20px);
  font-size: 14px;
  text-decoration: none;
}

.hero__project::after {
  content: " →";
}

.hero__project:hover {
  color: var(--paper);
  text-decoration: underline;
}

.marquee {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  height: var(--marquee);
  overflow: hidden;
  border-top: 1px solid rgba(234, 225, 212, .3);
  background: rgba(var(--shade), .4);
  font: 400 22px/1 var(--serif);
  white-space: nowrap;
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 60s linear infinite;
}

.marquee__group {
  display: flex;
  align-items: center;
}

.marquee__group > span {
  padding-inline: 0.7em;
}

.marquee__dot {
  display: inline-block;
  width: 0.2em;
  height: 0.2em;
  background: currentColor;
  opacity: .55;
  transform: rotate(45deg);
}

.word {
  display: inline-block;
  margin-bottom: -0.16em;
  padding-bottom: 0.16em;
  overflow: hidden;
  vertical-align: top;
}

.word > span {
  display: inline-block;
  transform: translateY(calc(100% + .2em));
  transition: transform 1.1s var(--ease);
}

.is-loaded .word > span {
  transform: none;
}

.js:not(.is-loaded) .hero__title {
  visibility: hidden;
}

@keyframes hero-zoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1);
  }
}

@keyframes marquee {
  to {
    transform: translate3d(-50%, 0, 0);
  }
}

/* --- обо мне --- */

.about {
  padding-block: var(--section);
}

.about__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: start;
}

.about__photo {
  grid-column: 1 / 5;
}

.about__photo img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: 50% 30%;
}

.about__text {
  grid-column: 6 / 12;
  padding-top: clamp(0px, 4vw, 64px);
}

.about__title {
  margin-bottom: 28px;
  font-size: clamp(1.6rem, 2.3vw, 2.15rem);
}

.about__outro {
  margin-top: 36px;
  font-size: clamp(17px, 1vw + 11px, 19px);
}

.about__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.about__geo {
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* --- избранные проекты --- */

.featured {
  padding-block: var(--section);
  border-top: 1px solid var(--line);
}

.feature {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: start;
}

.feature + .feature {
  margin-top: clamp(72px, 10vw, 144px);
}

.feature__cover {
  grid-column: 1 / 9;
  grid-row: 1;
  overflow: hidden;
}

.feature__cover img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.feature__cover:hover img {
  transform: scale(1.03);
}

.feature__caption {
  grid-column: 9 / 13;
  grid-row: 1;
  align-self: end;
  padding-top: 28px;
  padding-left: var(--gap);
}

.feature__title {
  margin-bottom: 10px;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
}

.feature__title a {
  text-decoration: none;
}

.feature__caption .link-arrow {
  margin-top: 20px;
}

.feature--flip .feature__cover {
  grid-column: 5 / 13;
}

.feature--flip .feature__caption {
  grid-column: 1 / 5;
  padding-left: 0;
  padding-right: var(--gap);
}

.feature--tall .feature__cover {
  grid-column: 2 / 7;
}

.feature--tall .feature__cover img {
  aspect-ratio: 4 / 5;
  object-position: 50% 30%;
}

.feature--tall .feature__caption {
  grid-column: 8 / 13;
  padding-left: 0;
}

.feature--tall.feature--flip .feature__cover {
  grid-column: 7 / 12;
}

.feature--tall.feature--flip .feature__caption {
  grid-column: 1 / 6;
}

.featured__more {
  margin: clamp(56px, 8vw, 112px) 0 0;
  text-align: center;
}

/* --- услуги --- */

.services {
  padding-block: var(--section);
  border-top: 1px solid var(--line);
  color: var(--plum);
}

.services .section-label {
  color: var(--plum);
}

.services__tabs {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: start;
}

.services__list {
  position: relative;
  display: flex;
  flex-direction: column;
  grid-column: 1 / 6;
  border-top: 1px solid var(--plum-line);
}

.service-tab {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: baseline;
  gap: 6px 12px;
  padding: 22px 12px 22px 0;
  border: 0;
  border-bottom: 1px solid var(--plum-line);
  background: none;
  color: var(--plum);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: padding .35s var(--ease), background-color .25s ease, box-shadow .35s ease;
}

.service-tab:focus-visible {
  outline-offset: -4px;
}

.service-tab:hover {
  background: rgba(221, 209, 192, .55);
}

.service-tab[aria-selected="true"] {
  padding-left: 18px;
  background: var(--linen);
  box-shadow: inset 2px 0 0 var(--terracotta);
}

.service-tab__num,
.service__num {
  color: var(--terracotta-text);
  font: 500 13px/1 var(--sans);
  letter-spacing: 0.14em;
}

.service-tab__title {
  font: 400 clamp(1.2rem, 1.6vw, 1.5rem)/1.25 var(--serif);
}

.service-tab__price {
  grid-column: 2;
  font-size: 14px;
}

.services__panels {
  position: sticky;
  top: calc(var(--header) + 24px);
  grid-column: 7 / 13;
}

.service {
  padding: clamp(28px, 3.4vw, 52px);
  background: var(--linen);
}

.js .service {
  animation: service-in .5s var(--ease);
}

.service__num {
  margin-bottom: 28px;
}

.service__title {
  margin-bottom: 12px;
  font-size: clamp(1.8rem, 2.6vw, 2.5rem);
}

.service__price {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--plum-line);
  font: 400 clamp(1.25rem, 1.6vw, 1.6rem)/1.3 var(--serif);
}

.service p,
.service ul,
.service ol {
  font-size: 16px;
}

.service ul,
.service ol {
  margin: 0 0 1em;
  padding-left: 1.15em;
}

.service li + li {
  margin-top: 10px;
}

.service li::marker {
  color: var(--terracotta-text);
}

.service .btn {
  margin-top: 12px;
}

html:not(.js) .services__list {
  display: none;
}

html:not(.js) .service[hidden] {
  display: block;
}

html:not(.js) .services__panels {
  position: static;
  display: grid;
  gap: var(--gap);
  grid-column: 1 / -1;
}

@keyframes service-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* --- контакты --- */

.contacts {
  padding-block: var(--section);
  background: var(--linen);
}

.contacts__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: end;
}

.contacts__text {
  grid-column: 1 / 7;
}

.contacts__title {
  margin-bottom: 20px;
  color: var(--plum);
  font-size: clamp(2.4rem, 5vw, 4.25rem);
}

.contacts__lead {
  margin: 0;
  max-width: 28em;
  font-size: clamp(17px, 1vw + 11px, 19px);
}

.contacts__actions {
  grid-column: 8 / 13;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contacts__social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.contacts__social .btn {
  flex: 1 1 140px;
  padding-inline: 12px;
  white-space: nowrap;
}

/* --- страница «Проекты» --- */

.page-head {
  padding-top: clamp(40px, 7vw, 104px);
  padding-bottom: clamp(40px, 6vw, 80px);
}

.page-head__title {
  margin-bottom: 20px;
  font-size: clamp(2.25rem, 1rem + 5vw, 5.5rem);
  line-height: 1.05;
}

.page-head__lead {
  max-width: 36em;
  color: var(--muted);
  font-size: clamp(17px, 1vw + 11px, 19px);
}

.page-head--center {
  min-height: 50vh;
  text-align: center;
}

.page-head--center .page-head__lead {
  margin-inline: auto;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 5vw, 80px);
  row-gap: clamp(48px, 6vw, 88px);
  align-items: start;
  padding-bottom: var(--section);
}

.card:nth-child(even) {
  margin-top: clamp(48px, 9vw, 136px);
}

.card__img {
  display: block;
  overflow: hidden;
}

.card__img img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 1.2s var(--ease);
}

.card__img:hover img {
  transform: scale(1.03);
}

.card__body {
  padding-top: 22px;
}

.card__title {
  margin-bottom: 8px;
  font-size: clamp(1.4rem, 2vw, 1.85rem);
}

.card__title a {
  text-decoration: none;
}

/* --- страница проекта --- */

.project__head {
  padding-top: clamp(32px, 5vw, 72px);
  padding-bottom: clamp(32px, 4vw, 56px);
}

.back {
  display: inline-block;
  margin-bottom: clamp(28px, 4vw, 48px);
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}

.project__head .label {
  display: table;
}

.project__title {
  max-width: 16em;
  margin-bottom: 16px;
  font-size: clamp(1.9rem, 1rem + 4.4vw, 4.5rem);
  line-height: 1.08;
}

.project__cover a {
  display: block;
}

.project__intro--side {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: start;
}

.project__intro--side .project__head {
  grid-column: 1 / 6;
  position: sticky;
  top: var(--header);
}

.project__intro--side .project__title {
  font-size: clamp(2.2rem, 3.8vw, 3.75rem);
}

.project__intro--side .project__cover {
  grid-column: 6 / 13;
  justify-self: end;
  margin-top: clamp(32px, 5vw, 72px);
}

.project__cover img {
  max-height: 86vh;
  width: auto;
}

.project__story {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: start;
  padding-block: clamp(48px, 7vw, 104px);
}

.project__text {
  grid-column: 1 / 8;
  max-width: 40em;
}

.project__text p:last-child {
  margin-bottom: 0;
}

.project__story .note {
  grid-column: 9 / 13;
  position: sticky;
  top: calc(var(--header) + 32px);
}

.gallery {
  padding-top: clamp(24px, 4vw, 56px);
  padding-bottom: var(--section);
}

.project__story + .gallery {
  padding-top: 0;
}

.g-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: start;
}

.g-row + .g-row {
  margin-top: clamp(24px, 4.5vw, 64px);
}

.g-row > * {
  grid-row: 1;
}

.g-item a {
  display: block;
  cursor: zoom-in;
}

.g-item img {
  width: 100%;
}

.g-row--solo > :first-child { grid-column: 1 / 12; }
.g-row--solo.g-row--flip > :first-child { grid-column: 2 / 13; }

.g-row--single > :first-child { grid-column: 3 / 9; }
.g-row--single.g-row--flip > :first-child { grid-column: 5 / 11; }

.g-row--ww > :first-child { grid-column: 1 / 9; }
.g-row--ww > :last-child { grid-column: 9 / 13; align-self: end; }
.g-row--ww.g-row--flip > :first-child { grid-column: 5 / 13; }
.g-row--ww.g-row--flip > :last-child { grid-column: 1 / 5; }

.g-row--wn > :first-child { grid-column: 1 / 9; }
.g-row--wn > :last-child { grid-column: 9 / 13; margin-top: clamp(32px, 8vw, 120px); }
.g-row--wn.g-row--flip > :first-child { grid-column: 5 / 13; }
.g-row--wn.g-row--flip > :last-child { grid-column: 1 / 5; }

.g-row--nw > :first-child { grid-column: 1 / 5; margin-top: clamp(32px, 8vw, 120px); }
.g-row--nw > :last-child { grid-column: 5 / 13; }
.g-row--nw.g-row--flip > :first-child { grid-column: 9 / 13; }
.g-row--nw.g-row--flip > :last-child { grid-column: 1 / 9; }

.g-row--nn > :first-child { grid-column: 1 / 7; }
.g-row--nn > :last-child { grid-column: 8 / 12; margin-top: clamp(48px, 12vw, 180px); }
.g-row--nn.g-row--flip > :first-child { grid-column: 7 / 13; }
.g-row--nn.g-row--flip > :last-child { grid-column: 2 / 6; }

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  padding-bottom: var(--section);
}

.pager__link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  text-decoration: none;
}

.pager__link--next {
  align-items: flex-end;
  text-align: right;
}

.pager__hint {
  color: var(--muted);
  font-size: 14px;
}

.pager__title {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  line-height: 1.25;
}

/* --- текстовые страницы --- */

.prose {
  max-width: calc(44em + 2 * var(--gutter));
  margin-left: 0;
  padding-bottom: var(--section);
}

.prose h2 {
  margin: 48px 0 16px;
  font-size: clamp(1.4rem, 2vw, 1.75rem);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose__date {
  margin-top: 48px;
  color: var(--muted);
  font-size: 15px;
}

/* --- подвал --- */

.footer {
  padding-block: 48px;
  border-top: 1px solid var(--line);
  font-size: 15px;
}

.footer__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 28px;
  align-items: start;
}

.footer__brand {
  grid-column: 1 / 5;
}

.footer__links {
  grid-column: 5 / 9;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer__links a {
  text-decoration: none;
}

.footer__legal {
  grid-column: 9 / 13;
  color: var(--muted);
  font-size: 14px;
}

.footer__legal p {
  margin-bottom: 6px;
}

/* --- cookie --- */

.cookie {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 90;
  max-width: 520px;
  margin-left: auto;
  padding: 20px 22px;
  background: var(--chocolate);
  color: var(--paper);
  font-size: 14px;
  line-height: 1.55;
  box-shadow: 0 12px 40px rgba(53, 45, 43, .25);
}

.cookie[hidden] {
  display: none;
}

.cookie p {
  margin-bottom: 14px;
}

.cookie a:hover {
  color: var(--linen);
}

.cookie__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cookie .btn--line {
  border-color: var(--paper);
  color: var(--paper);
}

.cookie .btn--line:hover,
.cookie .btn:hover {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--chocolate);
}

/* --- просмотр фото --- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  grid-template-rows: 64px minmax(0, 1fr) 56px;
  background: rgba(36, 30, 29, .97);
  color: var(--paper);
}

.lightbox[hidden] {
  display: none;
}

.lightbox__figure {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.lightbox__figure img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  user-select: none;
}

.lightbox button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--paper);
  font: 400 28px/1 var(--sans);
  cursor: pointer;
  opacity: .8;
  transition: opacity .2s ease;
}

.lightbox button:hover {
  opacity: 1;
}

.lightbox__close {
  grid-column: 3;
  grid-row: 1;
  justify-self: center;
  align-self: center;
}

.lightbox__prev,
.lightbox__next {
  grid-row: 2;
  align-self: center;
  justify-self: center;
}

.lightbox__prev {
  grid-column: 1;
}

.lightbox__next {
  grid-column: 3;
}

.lightbox--single .lightbox__prev,
.lightbox--single .lightbox__next,
.lightbox--single .lightbox__count {
  display: none;
}

.lightbox__counter {
  grid-column: 2;
  grid-row: 3;
  margin: 0;
  align-self: center;
  text-align: center;
  font-size: 14px;
  opacity: .8;
}

.lightbox__count {
  letter-spacing: 0.1em;
}

.lightbox__caption:not(:empty) + .lightbox__count::before {
  content: "·";
  margin-inline: 0.7em;
}


/* --- появление при прокрутке --- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s ease, transform .9s var(--ease);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* --- адаптив --- */

@media (max-width: 959px) {
  :root {
    --header: 64px;
  }

  .burger {
    display: block;
  }

  .nav {
    position: fixed;
    top: var(--header);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100dvh - var(--header));
    overflow-y: auto;
    padding: 8px var(--gutter) 28px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    color: var(--chocolate);
    font-size: 20px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .25s ease, transform .25s var(--ease), visibility 0s .25s;
  }

  .nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .25s ease, transform .25s var(--ease);
  }

  .nav a:not(.btn) {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .nav .btn {
    margin-top: 20px;
    min-height: 52px;
    font-size: 15px;
  }

  .services__tabs {
    display: block;
  }

  .services__list {
    flex-direction: row;
    gap: 8px;
    margin: 0 calc(var(--gutter) * -1) 20px;
    padding: 0 var(--gutter) 4px;
    border: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .services__list::-webkit-scrollbar {
    display: none;
  }

  .service-tab {
    display: block;
    flex: 0 0 auto;
    padding: 10px 16px;
    border: 1px solid rgba(102, 80, 94, .45);
    white-space: nowrap;
  }

  .service-tab__num,
  .service-tab__price {
    display: none;
  }

  .service-tab__title {
    font: 500 15px/1.2 var(--sans);
  }

  .service-tab[aria-selected="true"] {
    padding-left: 16px;
    box-shadow: none;
    background: var(--plum);
    color: var(--paper);
  }

  .services__panels {
    position: static;
  }

  .about__inner,
  .contacts__inner,
  .project__story,
  .footer__inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .about__photo {
    width: min(100%, 440px);
  }

  .about__text {
    margin-top: 40px;
    padding-top: 0;
  }

  .feature {
    display: block;
  }

  .feature__cover img {
    aspect-ratio: 4 / 3;
  }

  .feature__caption,
  .feature--flip .feature__caption {
    padding: 24px 0 0;
  }

  .contacts__actions {
    margin-top: 36px;
  }

  .project__story .note {
    position: static;
    margin-top: 40px;
  }

  .project__intro--side {
    display: block;
  }

  .project__intro--side .project__head {
    position: static;
  }

  .project__intro--side .project__cover {
    margin-top: 0;
  }
}

@media (max-width: 759px) {
  .hero {
    --marquee: 52px;
  }

  .hero__actions {
    flex-direction: column;
    width: min(100%, 360px);
  }

  .hero__project {
    right: auto;
    left: var(--gutter);
  }

  .marquee {
    font-size: 18px;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .card:nth-child(even) {
    margin-top: 0;
  }

  .g-row {
    display: block;
  }

  .gallery .g-row > * {
    width: 100%;
    margin: 0;
  }

  .gallery .g-row > * + * {
    width: 78%;
    margin: 16px 0 0 auto;
  }

  .gallery .g-row--flip > * + * {
    margin: 16px auto 0 0;
  }

  .gallery .g-row--single > :first-child {
    width: 86%;
  }

  .gallery .g-row--single.g-row--flip > :first-child {
    margin-left: auto;
  }

  .lightbox {
    grid-template-columns: 0 minmax(0, 1fr) 0;
    grid-template-rows: 56px minmax(0, 1fr) 64px;
  }

  .lightbox__close {
    grid-column: 2;
    justify-self: end;
  }

  .lightbox__prev,
  .lightbox__next {
    grid-row: 3;
  }

  .lightbox__prev {
    grid-column: 2;
    justify-self: start;
  }

  .lightbox__next {
    grid-column: 2;
    justify-self: end;
  }

  .pager__title {
    font-size: 1.1rem;
  }

  .lightbox__counter {
    padding-inline: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero__bg img,
  .marquee__track,
  .js .service {
    animation: none;
  }
}
