:root {
  --bg: #493b30;
  --bg-deep: #2f261f;
  --bg-soft: #5b493a;
  --panel: #6a5543;
  --panel-2: #80684f;
  --ink: #fff8ef;
  --muted: #dfcfbd;
  --muted-2: #b9a38c;
  --line: rgba(255, 248, 239, .13);
  --line-strong: rgba(255, 248, 239, .24);
  --accent: #e6b86f;
  --accent-soft: rgba(230, 184, 111, .15);
  --sage: #a3a88f;
  --shadow: 0 34px 120px rgba(39, 27, 17, .32);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --font-sans: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Bodoni 72", Didot, "Iowan Old Style", Georgia, serif;
  --hero-pan-x: 0px;
  --hero-pan-y: 0px;
  --hero-card-y: 0px;
  --hero-img-y: 0px;
  --about-y: 0px;
  --hero-progress: 0;
  --canvas-y: 0px;
  --cursor-x: 0px;
  --cursor-y: 0px;
  --about-bg: #4d3f33;
  --photo-veil: rgba(232, 211, 181, .16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body {
  margin: 0;
  background:
    linear-gradient(140deg, rgba(255, 248, 239, .10), transparent 34%),
    linear-gradient(180deg, #5e4b3b 0%, #493b30 28%, #342a22 72%, #4f4033 100%);
  color: var(--ink);
  font-family: var(--font-sans);
  overflow-x: hidden;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(115deg, rgba(232, 190, 122, .18), transparent 32%),
    linear-gradient(290deg, rgba(255, 248, 239, .06), transparent 44%),
    linear-gradient(180deg, transparent 0%, rgba(47, 38, 31, .48) 100%);
  transform: translate3d(0, var(--canvas-y), 0);
  will-change: transform;
}

body.menu-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

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

.wrap {
  width: min(1360px, calc(100% - 48px));
  margin: 0 auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 248, 239, .08);
  background: rgba(47, 38, 31, .58);
  backdrop-filter: blur(22px) saturate(1.12);
  transition-property: background-color, border-color;
  transition-duration: .42s;
  transition-timing-function: var(--ease);
}

body.is-scrolled .top {
  border-color: rgba(255, 248, 239, .14);
  background: rgba(47, 38, 31, .80);
}

.top__inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 700;
}

.mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(255, 246, 234, .035);
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2vw, 30px);
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  transition: color .18s var(--ease);
}

.nav a:hover {
  color: var(--ink);
}

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 246, 234, .055);
}

.lang-btn {
  min-width: 42px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  transition-property: color, background-color, transform;
  transition-duration: .18s;
  transition-timing-function: var(--ease);
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn.is-active {
  color: #151511;
  background: var(--accent);
}

.burger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  color: var(--ink);
  cursor: pointer;
}

.burger span {
  display: block;
  width: 18px;
  height: 1px;
  margin: 5px auto;
  background: currentColor;
  transition-property: transform, opacity;
  transition-duration: .18s;
  transition-timing-function: var(--ease);
}

.burger[aria-expanded="true"] span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.burger[aria-expanded="true"] span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.mobile-menu {
  display: none;
}

.hero {
  min-height: 720px;
  display: grid;
  align-items: center;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(90deg, rgba(73, 59, 48, .92) 0%, rgba(73, 59, 48, .72) 31%, rgba(73, 59, 48, .20) 58%, rgba(73, 59, 48, .08) 100%),
    linear-gradient(180deg, rgba(47, 38, 31, .04) 0%, rgba(47, 38, 31, .16) 100%),
    linear-gradient(105deg, rgba(255, 248, 239, .10), transparent 28%),
    linear-gradient(118deg, #5e4c3d 0%, #44362b 38%, #2d241d 63%, #6b563f 82%, var(--about-bg) 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 246, 234, .045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 246, 234, .032) 1px, transparent 1px);
  background-size: 112px 112px;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, .42), transparent 72%);
  opacity: .16;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px 0;
  z-index: 2;
  height: 30vh;
  background:
    linear-gradient(180deg, transparent 0%, rgba(69, 55, 44, .34) 62%, var(--about-bg) 100%);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, .72fr);
  gap: clamp(36px, 6vw, 92px);
  align-items: center;
  min-height: 720px;
  padding: 68px 0 98px;
}

.hero__copy {
  position: relative;
  z-index: 3;
  min-width: 0;
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 28px;
  max-width: 860px;
  font-size: clamp(58px, 8vw, 118px);
  line-height: .96;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 650;
  text-wrap: balance;
  overflow: visible;
}

h1 span,
h1 em {
  display: block;
}

h1 em {
  color: var(--accent);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.hero__lead {
  max-width: 700px;
  color: var(--muted);
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.5;
  text-wrap: pretty;
}

.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 18px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition-property: transform, background-color, border-color, color;
  transition-duration: .18s;
  transition-timing-function: var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.ghost {
  color: var(--muted);
}

.btn.ghost:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.hero__visual {
  position: absolute;
  top: 120px;
  right: max(24px, calc((100vw - 1360px) / 2));
  bottom: auto;
  width: min(54vw, 780px);
  aspect-ratio: 16 / 10;
  min-height: 0;
  z-index: 1;
  pointer-events: auto;
}

.hero-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  transform-origin: center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .76) 12%, rgba(0, 0, 0, .98) 70%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .76) 12%, rgba(0, 0, 0, .98) 70%, transparent 100%);
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-card::before {
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(68, 54, 43, .156) 0%, rgba(68, 54, 43, .036) 24%, transparent 52%),
    linear-gradient(180deg, transparent 0%, rgba(45, 36, 29, .024) 78%, rgba(77, 63, 51, .144) 100%);
}

.hero-card::after {
  z-index: 3;
  background: linear-gradient(90deg, rgba(45, 36, 29, .282) 0%, rgba(45, 36, 29, .246) 18%, rgba(45, 36, 29, .144) 34%, rgba(45, 36, 29, .024) 52%, rgba(45, 36, 29, 0) 66%);
}

.hero-card img,
.hero-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 1;
  filter: saturate(1.08) contrast(1.04) brightness(1.04);
  transform: none;
  transition: filter .22s var(--ease);
}

.hero-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  width: min(86px, 18vw);
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  color: #16130f;
  background: rgba(255, 248, 239, .9);
  box-shadow: 0 14px 32px rgba(18, 14, 11, .42);
  cursor: pointer;
  transition: transform .18s var(--ease), opacity .18s var(--ease), background-color .18s var(--ease);
}

.hero-play-button span {
  display: inline-block;
  margin-left: 2px;
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  font-size: 24px;
  line-height: 1;
}

.hero-play-button:hover {
  transform: translate(-50%, -50%) scale(1.03);
  background: #fff8ef;
}

.hero-play-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hero-play-button.is-hidden {
  opacity: 0;
  pointer-events: none;
}

body.is-ready .hero-card img,
body.is-ready .hero-card video {
  animation: none;
}

.section {
  padding: clamp(74px, 8vw, 120px) 0;
  position: relative;
  overflow: visible;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 248, 239, .045), transparent);
  opacity: 0;
  transform: translateX(-18%);
  pointer-events: none;
  transition: opacity .7s var(--ease), transform .9s var(--ease);
}

.section.section-in::before {
  opacity: 1;
  transform: translateX(0);
}

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  margin-bottom: clamp(38px, 5vw, 70px);
}

h2 {
  margin: 0;
  max-width: 1180px;
  font-size: clamp(40px, 6vw, 86px);
  line-height: .98;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 640;
  text-wrap: balance;
  overflow-wrap: normal;
}

#projects .section-head {
  padding-right: clamp(0px, 4vw, 48px);
}

#projects .section-head h2 {
  max-width: 100%;
  font-size: clamp(44px, 7.2vw, 104px);
}

.about-section {
  background:
    linear-gradient(180deg, var(--about-bg) 0%, rgba(77, 63, 51, .92) 16%, rgba(54, 43, 34, .54) 62%, rgba(69, 55, 44, .40) 100%),
    linear-gradient(135deg, rgba(93, 73, 57, .58), rgba(54, 43, 34, .42));
  margin-top: -1px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(280px, 410px) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 86px);
  align-items: start;
}

.about-photo {
  position: sticky;
  top: 108px;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: transparent;
  box-shadow:
    0 28px 120px rgba(34, 23, 14, .24),
    inset 0 0 0 1px rgba(255, 248, 239, .10);
  transform: translateY(var(--about-y));
  will-change: transform;
}

.about-photo img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about-copy h2 {
  max-width: 1080px;
  font-size: clamp(58px, 7.4vw, 124px);
  line-height: .92;
}

.about-bio {
  max-width: 900px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.15vw, 19px);
  line-height: 1.62;
  text-wrap: pretty;
}

.about-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr);
  gap: clamp(24px, 4vw, 56px);
  margin-top: 42px;
}

.about-columns > div {
  padding: 24px 0 0;
  border-top: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
}

.about-columns h3 {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(244, 239, 228, .08);
  color: var(--muted);
  line-height: 1.45;
}

li:last-child {
  border-bottom: 0;
}

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

.tags span {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 248, 239, .035);
  font-size: 14px;
}

.projects-section {
  background:
    linear-gradient(180deg, rgba(47, 38, 31, .04), rgba(47, 38, 31, .22)),
    linear-gradient(135deg, rgba(230, 184, 111, .08), transparent 32%);
}

.project-rail {
  border-top: 1px solid rgba(255, 248, 239, .18);
}

.project-link {
  min-height: 146px;
  display: grid;
  grid-template-columns: 74px minmax(240px, .74fr) minmax(260px, 1fr) 46px;
  gap: clamp(18px, 3vw, 40px);
  align-items: center;
  border-bottom: 1px solid rgba(255, 248, 239, .18);
  position: relative;
  overflow: clip;
  opacity: .92;
  transform: none;
  transition-property: transform, opacity, border-color;
  transition-duration: .58s;
  transition-timing-function: var(--ease);
}

.project-link::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0;
  background:
    linear-gradient(90deg, rgba(230, 184, 111, .12), transparent 32%),
    linear-gradient(180deg, rgba(255, 248, 239, .035), transparent);
  opacity: 0;
  transform: translateX(-22px);
  transition-property: opacity, transform;
  transition-duration: .46s;
  transition-timing-function: var(--ease);
}

.project-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transition: width .58s var(--ease);
}

.project-link:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.project-link:hover {
  opacity: 1;
  transform: none;
  border-color: rgba(230, 184, 111, .42);
}

.project-link:hover::after {
  width: 100%;
}

.section-in .project-link {
  animation: none;
}

.project-link > * {
  position: relative;
  z-index: 1;
}

.project-num {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
}

.project-link b {
  color: var(--ink);
  font-size: clamp(34px, 4.9vw, 72px);
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 620;
  text-wrap: balance;
}

.project-link span:not(.project-num) {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
  text-wrap: pretty;
}

.project-link i {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  justify-self: end;
  transition-property: transform, border-color, background-color;
  transition-duration: .18s;
  transition-timing-function: var(--ease);
}

.project-link i::before {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}

.project-link:hover i {
  transform: none;
  border-color: var(--accent);
  background: var(--accent-soft);
}

.contact-section {
  background:
    linear-gradient(135deg, rgba(230, 184, 111, .10), transparent 36%),
    linear-gradient(180deg, rgba(47, 38, 31, .10), rgba(47, 38, 31, .36));
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(320px, 1fr);
  gap: clamp(36px, 6vw, 82px);
  align-items: start;
}

.form {
  display: grid;
  gap: 12px;
  padding: 28px 0 0;
  border: 0;
  border-top: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  backdrop-filter: blur(12px);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  color: var(--ink);
  outline: 0;
  padding: 15px 16px;
  transition-property: border-color, background-color;
  transition-duration: .18s;
  transition-timing-function: var(--ease);
}

input:focus,
textarea:focus {
  border-color: rgba(199, 164, 106, .62);
  background: rgba(255, 255, 255, .065);
}

input::placeholder,
textarea::placeholder {
  color: rgba(244, 239, 228, .42);
}

textarea {
  min-height: 128px;
  resize: vertical;
}

.form-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.submit {
  min-height: 48px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #171611;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
  transition-property: transform, filter;
  transition-duration: .18s;
  transition-timing-function: var(--ease);
}

.submit:disabled {
  cursor: wait;
  opacity: .62;
}

.submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.form-status.is-success {
  color: var(--accent);
}

.form-status.is-error {
  color: #f0b7a1;
}

footer {
  padding: 32px 0;
  color: var(--muted);
}

.foot {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.project-hero {
  padding: clamp(84px, 9vw, 132px) 0 56px;
  background:
    linear-gradient(135deg, rgba(230, 184, 111, .12), transparent 34%),
    linear-gradient(180deg, rgba(255, 248, 239, .05), transparent 38%);
}

.project-hero .wrap {
  position: relative;
}

.home-pill {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255, 248, 239, .18);
  border-radius: 999px;
  background: rgba(255, 248, 239, .055);
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.home-pill:hover {
  border-color: rgba(230, 184, 111, .62);
  background: rgba(230, 184, 111, .12);
}

.project-title {
  max-width: 1040px;
  margin: 0 0 22px;
  font-size: clamp(52px, 7.6vw, 112px);
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 640;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.meta span,
.meta a {
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .035);
  font-size: 14px;
}

.cover {
  width: min(760px, 100%);
  aspect-ratio: 16 / 6;
  min-height: 0;
  max-height: none;
  height: auto;
  margin-top: 26px;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  border: 0;
  border-radius: 2px;
  background: rgba(255, 248, 239, .035);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 239, .08);
}

.cover::after,
.about-photo::after,
.gallery-stage-button::after,
.gallery-thumb::after,
.lb-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: var(--photo-veil);
  opacity: 1;
  mix-blend-mode: normal;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

.cover > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  object-fit: contain;
  object-position: center center;
}

.kapitan-cover {
  width: 100%;
  min-height: clamp(520px, 72vh, 780px);
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(320px, .64fr);
  gap: 8px;
  align-items: stretch;
  background: #f7f4ec;
  color: #11100d;
}

.kapitan-cover__main,
.kapitan-cover__thumb {
  overflow: hidden;
}

.kapitan-cover__main img,
.kapitan-cover__thumb img {
  height: 100%;
  object-fit: cover;
}

.kapitan-cover__side {
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto;
  gap: 26px;
  padding: clamp(18px, 3vw, 36px) 0 clamp(22px, 3vw, 42px);
}

.kapitan-cover__side h2 {
  margin: 0;
  max-width: 7ch;
  color: #11100d;
  font-size: clamp(58px, 7.2vw, 104px);
  line-height: .86;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 850;
}

.kapitan-cover__thumb {
  width: min(100%, 360px);
  aspect-ratio: 1 / 1;
  align-self: start;
}

.kapitan-cover__side p {
  max-width: 360px;
  margin: 0;
  color: #1f1a15;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.18;
}

.cover.empty {
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.two {
  display: grid;
  grid-template-columns: minmax(220px, .42fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 72px);
}

.ptext {
  margin: 0;
  font-size: clamp(26px, 3.5vw, 52px);
  line-height: 1.16;
  text-wrap: pretty;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 248, 239, .18);
  border-left: 0;
}

.fact {
  min-height: 130px;
  display: flex;
  align-items: flex-end;
  padding: 22px;
  border-right: 1px solid rgba(255, 248, 239, .16);
  border-bottom: 1px solid rgba(255, 248, 239, .16);
  color: var(--ink);
  background: transparent;
  font-size: clamp(20px, 2vw, 30px);
  line-height: 1.15;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
}

.count-up {
  display: inline-block;
  min-width: .62em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.blocks {
  display: grid;
  gap: 12px;
}

.hide-logic-title .project-logic-head {
  display: none;
}

.hide-logic-title .project-logic-section {
  padding-top: 0;
}

.project-gallery-first .project-hero,
.project-gallery-first .project-intro-section,
.project-gallery-first .project-facts-section,
.project-gallery-first .project-logic-section,
.project-gallery-first .project-gallery-section > .wrap > .section-head {
  display: none;
}

.project-gallery-first .project-gallery-section {
  padding-top: clamp(104px, 10vw, 148px);
}

.project-gallery-redesign .project-hero {
  padding: clamp(58px, 7vw, 96px) 0 clamp(28px, 4vw, 50px);
}

.project-gallery-redesign .project-title {
  max-width: 980px;
  font-size: clamp(46px, 6.7vw, 96px);
}

.project-gallery-redesign .meta {
  display: none;
}

.project-gallery-redesign .cover {
  display: none;
}

body[data-project="kapitan"].project-gallery-redesign .cover {
  display: grid;
  min-height: clamp(260px, 42vh, 500px);
  max-height: 500px;
}

body[data-project="zilart"].project-gallery-redesign .cover {
  display: grid;
  width: min(760px, 100%);
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 16 / 6;
  background: rgba(255, 248, 239, .045);
}

body[data-project="oldfond"].project-gallery-redesign .cover {
  display: grid;
  width: min(760px, 100%);
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 16 / 6;
  background: rgba(255, 248, 239, .045);
}

body[data-project="zilart"].project-gallery-redesign .cover img,
body[data-project="oldfond"].project-gallery-redesign .cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

body[data-project="rigapark"].project-gallery-redesign .project-intro-section,
body[data-project="oldfond"].project-gallery-redesign .project-intro-section {
  display: none;
}

body[data-project="rigapark"].project-gallery-redesign .project-hero {
  padding-bottom: clamp(18px, 3vw, 34px);
}

body[data-project="rigapark"].project-gallery-redesign .project-logic-section {
  display: none;
}

body[data-project="rigapark"].project-gallery-redesign .project-gallery-section {
  padding-top: clamp(18px, 3vw, 34px);
}

.project-gallery-redesign .kapitan-cover {
  min-height: clamp(260px, 42vh, 500px);
}

.kapitan-cover--single {
  grid-template-columns: 1fr;
  gap: 0;
  background: transparent;
}

.kapitan-cover--single .kapitan-cover__main {
  min-height: inherit;
}

.kapitan-cover--single .kapitan-cover__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.project-gallery-redesign .project-intro-section {
  padding-top: clamp(18px, 3vw, 36px);
  padding-bottom: clamp(34px, 5vw, 64px);
}

.project-gallery-redesign .ptext {
  max-width: 980px;
  font-size: clamp(21px, 2.4vw, 38px);
  line-height: 1.22;
}

.project-gallery-redesign .project-facts-section {
  display: none;
}

.project-gallery-redesign .project-logic-section {
  padding: clamp(18px, 3vw, 36px) 0 clamp(34px, 5vw, 68px);
}

.project-gallery-redesign .project-gallery-section {
  padding-top: clamp(24px, 4vw, 54px);
}

.project-gallery-redesign .project-gallery-section > .wrap > .section-head {
  display: none;
}

.project-direct-gallery .project-hero,
.project-direct-gallery .project-intro-section,
.project-direct-gallery .project-logic-section {
  display: none;
}

.project-direct-gallery .project-gallery-section {
  padding-top: clamp(42px, 7vw, 86px);
}

.project-object-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 18px);
  border-top: 1px solid rgba(255, 248, 239, .18);
  padding-top: clamp(16px, 2vw, 24px);
}

.object-choice {
  min-height: 112px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: 1fr auto;
  gap: 12px 16px;
  align-items: start;
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid rgba(255, 248, 239, .16);
  border-radius: 2px;
  background: rgba(255, 248, 239, .028);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition-property: background-color, border-color, transform;
  transition-duration: .2s;
  transition-timing-function: var(--ease);
}

.object-choice:hover {
  border-color: rgba(230, 184, 111, .52);
  background: rgba(255, 248, 239, .045);
  transform: none;
}

.object-choice.is-active {
  border-color: rgba(230, 184, 111, .82);
  background:
    linear-gradient(135deg, rgba(230, 184, 111, .13), rgba(255, 248, 239, .045)),
    rgba(255, 248, 239, .04);
}

.object-choice span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  font-variant-numeric: tabular-nums;
}

.object-choice strong {
  min-width: 0;
  color: var(--ink);
  font-size: clamp(18px, 1.55vw, 26px);
  line-height: 1.04;
  text-transform: uppercase;
  font-weight: 680;
  letter-spacing: 0;
  text-wrap: balance;
}

.object-choice em {
  grid-column: 2;
  align-self: end;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.project-object-selector:empty {
  display: none;
}

.portfolio-gallery-wrap {
  display: grid;
  gap: clamp(22px, 4vw, 48px);
}

.portfolio-gallery {
  display: grid;
  gap: clamp(18px, 3vw, 34px);
}

.portfolio-gallery__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(8px, 1.4vw, 18px);
  align-items: start;
  border-top: 1px solid rgba(255, 248, 239, .18);
  padding-top: clamp(18px, 3vw, 30px);
}

.portfolio-gallery__head h2 {
  max-width: none;
  font-size: clamp(32px, 3.7vw, 58px);
  line-height: 1;
  overflow-wrap: normal;
  word-break: normal;
  text-wrap: balance;
}

.portfolio-gallery__head > p {
  max-width: 960px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(14px, 1.05vw, 18px);
  font-weight: 520;
  letter-spacing: 0;
  line-height: 1.48;
  text-transform: none;
  font-variant-numeric: tabular-nums;
  text-wrap: pretty;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: clamp(16px, 2vw, 28px);
}

.portfolio-item {
  position: relative;
  min-height: 0;
  aspect-ratio: 1.06 / 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 248, 239, .035);
  cursor: zoom-in;
  isolation: isolate;
}

.portfolio-item--wide {
  grid-column: auto;
  min-height: 0;
}

.portfolio-item::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: var(--photo-veil);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.9) contrast(.96) brightness(.98) sepia(.035);
  transform: scale(1.001);
  transition-property: transform, filter;
  transition-duration: .34s;
  transition-timing-function: var(--ease);
}

.portfolio-item:hover img {
  transform: scale(1.035);
  filter: saturate(.94) contrast(.98) brightness(1) sepia(.035);
}

body[data-project="visual"] .cover::after,
body[data-project="visual"] .portfolio-item::after,
body[data-project="visual"] .gallery-stage-button::after,
body[data-project="visual"] .gallery-thumb::after,
body[data-project="visual3d"] .cover::after,
body[data-project="visual3d"] .portfolio-item::after,
body[data-project="visual3d"] .gallery-stage-button::after,
body[data-project="visual3d"] .gallery-thumb::after {
  display: none;
}

body[data-project="visual"] .portfolio-item img,
body[data-project="visual3d"] .portfolio-item img {
  filter: none;
}

.portfolio-item span {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  min-width: 34px;
  padding: 6px 8px;
  border-radius: 999px;
  color: #241d17;
  background: rgba(232, 211, 181, .90);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}

.block {
  display: grid;
  grid-template-columns: minmax(180px, .42fr) minmax(0, 1fr);
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid rgba(255, 248, 239, .18);
}

.block:last-child {
  border-bottom: 1px solid rgba(255, 248, 239, .18);
}

.block h3 {
  margin: 0;
  color: var(--accent);
  font-size: clamp(24px, 2.6vw, 38px);
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 620;
}

.block p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.62;
}

.gallery {
  display: grid;
  gap: clamp(46px, 7vw, 92px);
}

.gallery.grouped-gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(44px, 7vw, 86px);
}

.gallery.project-carousel-gallery {
  gap: clamp(18px, 4vw, 42px);
}

.gallery-group {
  display: grid;
  gap: clamp(18px, 3vw, 30px);
}

.gallery-group--images-only {
  gap: 14px;
}

.gallery-group--images-only .gallery-group-head {
  display: none;
}

.gallery-group-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: clamp(14px, 3vw, 36px);
  align-items: start;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 248, 239, .18);
}

.gallery-group-head span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .16em;
}

.gallery-group-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 5.4vw, 82px);
  line-height: .96;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 640;
}

.gallery-group-head p {
  grid-column: 2;
  max-width: 900px;
  margin: -6px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.55;
}

.gallery-viewer {
  display: grid;
  gap: 16px;
}

.gallery-stage {
  position: relative;
  min-height: clamp(520px, 76svh, 820px);
  height: clamp(520px, 76svh, 820px);
  overflow: hidden;
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(255, 248, 239, .045), rgba(255, 248, 239, .018)),
    rgba(40, 31, 25, .20);
  box-shadow: inset 0 0 0 1px rgba(255, 248, 239, .08);
}

.gallery-stage-button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 2px;
  background: transparent;
  cursor: zoom-in;
}

.gallery-stage-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  transition-property: opacity, transform;
  transition-duration: .32s;
  transition-timing-function: var(--ease);
}

.gallery-stage-img.is-switching {
  opacity: .28;
  transform: scale(1.012);
}

.gallery-counter {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 3;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid rgba(255, 248, 239, .20);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(47, 38, 31, .54);
  backdrop-filter: blur(14px);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 248, 239, .20);
  border-radius: 50%;
  background: rgba(47, 38, 31, .38);
  color: var(--ink);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(16px);
  transform: translateY(-50%);
  transition-property: background-color, border-color, transform;
  transition-duration: .18s;
  transition-timing-function: var(--ease);
}

.gallery-arrow:hover {
  border-color: rgba(230, 184, 111, .62);
  background: rgba(85, 68, 52, .74);
  transform: translateY(-50%) scale(1.03);
}

.gallery-arrow:active {
  transform: translateY(-50%) scale(.97);
}

.gallery-arrow--prev {
  left: 18px;
}

.gallery-arrow--next {
  right: 18px;
}

.gallery-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(230, 184, 111, .52) rgba(255, 248, 239, .08);
}

.gallery-thumb {
  position: relative;
  flex: 0 0 clamp(94px, 10vw, 152px);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 248, 239, .10);
  border-radius: 2px;
  background: rgba(255, 248, 239, .035);
  cursor: pointer;
  scroll-snap-align: center;
  opacity: .52;
  transition-property: opacity, border-color, transform, filter;
  transition-duration: .22s;
  transition-timing-function: var(--ease);
}

.gallery-thumb:hover,
.gallery-thumb.is-active {
  opacity: 1;
  border-color: rgba(230, 184, 111, .82);
  filter: saturate(1.03);
}

.gallery-thumb:active {
  transform: scale(.985);
}

.gallery-thumb span {
  position: absolute;
  left: 7px;
  top: 7px;
  z-index: 3;
  min-width: 30px;
  padding: 4px 6px;
  border-radius: 999px;
  color: #241d17;
  background: rgba(232, 211, 181, .90);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty-note {
  grid-column: 1 / -1;
  padding: 28px;
  border-top: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--muted);
  background: transparent;
}

.project-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(255, 248, 239, .16);
  border-bottom: 1px solid rgba(255, 248, 239, .16);
  background:
    linear-gradient(135deg, rgba(230, 184, 111, .10), transparent 38%),
    transparent;
}

.project-nav__item {
  padding: clamp(32px, 5vw, 68px);
  display: grid;
  gap: 14px;
  min-height: 240px;
  align-content: center;
  border-right: 1px solid rgba(255, 248, 239, .16);
  transition: background-color .22s var(--ease), color .22s var(--ease);
}

.project-nav__item:last-child {
  border-right: 0;
}

.project-nav__item:hover {
  background: rgba(255, 248, 239, .045);
}

.project-nav__item span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.project-nav__item strong {
  color: var(--ink);
  font-size: clamp(30px, 4vw, 64px);
  line-height: 1;
  text-transform: uppercase;
  font-weight: 640;
}

.project-nav__item--next {
  text-align: right;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(24, 18, 14, .94);
  backdrop-filter: blur(18px);
}

.lightbox.open {
  display: flex;
}

.lb-frame {
  position: relative;
  max-width: 94vw;
  max-height: 90vh;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 248, 239, .035);
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 239, .10),
    0 34px 120px rgba(0, 0, 0, .36);
}

.lightbox img {
  max-width: 94vw;
  max-height: 90vh;
  object-fit: contain;
  background: transparent;
}

.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 248, 239, .18);
  border-radius: 50%;
  background: rgba(255, 248, 239, .88);
  color: #17120e;
  cursor: pointer;
  font-size: 26px;
  transition-property: transform, background-color, border-color;
  transition-duration: .18s;
  transition-timing-function: var(--ease);
}

.lb-close:hover,
.lb-prev:hover,
.lb-next:hover {
  background: var(--accent);
  border-color: rgba(230, 184, 111, .72);
  transform: scale(1.04);
}

.lb-close {
  right: 22px;
  top: 22px;
}

.lb-prev {
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next {
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev:hover,
.lb-next:hover {
  transform: translateY(-50%) scale(1.04);
}

.lb-count {
  position: absolute;
  bottom: 22px;
  color: var(--ink);
  font-weight: 800;
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 34px, 0) scale(.99);
  filter: blur(9px);
  transition-property: opacity, transform, filter;
  transition-duration: 1s;
  transition-timing-function: var(--ease);
  will-change: opacity, transform, filter;
}

.reveal.in {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

.facts:not(.facts-in) .fact {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
}

.facts.facts-in .fact {
  animation: factPanelIn .82s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}

.hero .reveal {
  opacity: 1;
  transform: none;
  filter: none;
}

body.is-ready .hero .eyebrow {
  animation: fadeLift .72s var(--ease) .05s both;
}

body.is-ready .hero h1 span:first-child {
  animation: titleRise .92s var(--ease) .10s both;
}

body.is-ready .hero h1 span:nth-child(2) {
  animation: titleRise .92s var(--ease) .18s both;
}

body.is-ready .hero h1 em {
  animation: titleRise .98s var(--ease) .26s both;
}

body.is-ready .hero__lead {
  animation: fadeLift .82s var(--ease) .34s both;
}

body.is-ready .hero-card {
  animation: none;
}

@keyframes fadeLift {
  from {
    opacity: .86;
    transform: translate3d(0, 18px, 0);
    filter: blur(0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes titleRise {
  from {
    opacity: .9;
    transform: translate3d(0, 24px, 0);
    filter: blur(0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

@keyframes imageBloom {
  from {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }

  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

@keyframes cameraDrift {
  0% {
    transform: none;
  }

  38% {
    transform: none;
  }

  100% {
    transform: none;
  }
}

@keyframes projectRise {
  from {
    opacity: .92;
    transform: none;
  }

  to {
    opacity: .92;
    transform: none;
  }
}

@keyframes factPanelIn {
  from {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
    filter: blur(8px);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  .hero-card img {
    animation: none !important;
  }
}

@media (max-width: 980px) {
  .wrap {
    width: calc(100vw - 28px);
  }

  .nav {
    display: none;
  }

  .burger {
    display: block;
  }

  .mobile-menu {
    position: fixed;
    inset: 84px 14px auto;
    z-index: 70;
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(59, 48, 39, .96);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition-property: opacity, transform;
    transition-duration: .18s;
    transition-timing-function: var(--ease);
  }

  .mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-menu a {
    padding: 12px 0;
    color: var(--ink);
    font-size: 24px;
  }

  .mobile-lang {
    width: max-content;
    margin-top: 10px;
  }

  .hero {
    min-height: auto;
    overflow: hidden;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 54px 0 74px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(52px, 14.5vw, 92px);
  }

  .hero__visual {
    position: relative;
    right: auto;
    top: auto;
    width: min(100%, 720px);
    aspect-ratio: 16 / 10;
    min-height: 0;
    margin: 22px 0 0;
    order: 0;
  }

  .hero-card img,
  .hero-card video {
    object-position: center center;
  }

  .hero-card {
    inset: 0;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .88) 22%, rgba(0, 0, 0, .98) 76%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .88) 22%, rgba(0, 0, 0, .98) 76%, transparent 100%);
  }

  .hero-play-button {
    width: 64px;
  }

  .hero-stat {
    width: min(240px, 74vw);
  }

  .stat-a {
    top: 16px;
  }

  .stat-b {
    right: 16px;
    bottom: 16px;
  }

  .section-head,
  .about-grid,
  .about-columns,
  .contact-grid,
  .two,
  .block,
  .project-nav {
    grid-template-columns: 1fr;
  }

  .about-photo {
    position: relative;
    top: auto;
    max-width: 420px;
  }

  .project-link {
    min-height: auto;
    grid-template-columns: 48px 1fr 34px;
    gap: 14px;
    padding: 24px 0;
    transform: none;
  }

  .project-link span:not(.project-num) {
    grid-column: 2 / -1;
  }

  .project-link b {
    grid-column: 2 / -1;
    font-size: clamp(32px, 10vw, 54px);
  }

  .project-link i {
    grid-column: 1;
    justify-self: start;
  }

  .facts {
    grid-template-columns: 1fr 1fr;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .gallery-group-head {
    grid-template-columns: 1fr;
  }

  .gallery-group-head p {
    grid-column: auto;
  }

  .gallery-stage {
    min-height: min(72svh, 660px);
    height: min(72svh, 660px);
  }

  .gallery-arrow {
    width: 46px;
    height: 46px;
    font-size: 30px;
  }

  .gallery-arrow--prev {
    left: 10px;
  }

  .gallery-arrow--next {
    right: 10px;
  }

  .gallery-counter {
    left: 12px;
    bottom: 12px;
  }

  .project-object-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portfolio-gallery__head {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .portfolio-item--wide {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .top__inner {
    min-height: 66px;
  }

  .logo {
    min-width: 0;
  }

  .logo span:last-child {
    max-width: 218px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .burger {
    flex: 0 0 44px;
  }

  h1 {
    font-size: clamp(38px, 10.2vw, 48px);
    line-height: 1;
  }

  #projects .section-head h2 {
    font-size: clamp(36px, 9.8vw, 54px);
    line-height: 1;
  }

  .hero__lead {
    max-width: 31ch;
    font-size: 16px;
    line-height: 1.56;
  }

  .hero__visual {
    min-height: 0;
    aspect-ratio: 16 / 10;
    overflow: hidden;
  }

  .hero-card img {
    object-position: center center;
  }

  .section {
    padding: 64px 0;
  }

  .about-columns > div,
  .form {
    padding: 20px 0 0;
  }

  .facts {
    grid-template-columns: 1fr;
  }

  .cover {
    width: 100%;
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 7;
  }

  body[data-project="zilart"].project-gallery-redesign .cover,
  body[data-project="oldfond"].project-gallery-redesign .cover {
    width: 100%;
    min-height: 0;
    height: auto;
    aspect-ratio: 16 / 7;
  }

  .kapitan-cover {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .kapitan-cover__side {
    grid-template-rows: auto auto auto;
    padding: 18px;
  }

  .kapitan-cover__side h2 {
    max-width: 100%;
    font-size: clamp(42px, 14vw, 74px);
  }

  .kapitan-cover__thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
  }

  .lb-prev,
  .lb-next {
    top: auto;
    bottom: 22px;
    transform: none;
  }

  .lb-prev:hover,
  .lb-next:hover {
    transform: scale(1.04);
  }

  .gallery-stage {
    min-height: 62svh;
    height: 62svh;
  }

  .gallery-strip {
    gap: 7px;
  }

  .gallery-thumb {
    flex-basis: 86px;
  }

  .project-object-selector,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-item,
  .portfolio-item--wide {
    grid-column: auto;
    min-height: 0;
    aspect-ratio: 1.06 / 1;
  }

  .object-choice {
    min-height: 96px;
  }
}
