:root {
  --sans: "Manrope", "Segoe UI", sans-serif;
  --display: "Fraunces", "Times New Roman", serif;
  --ink: #141311;
  --muted: #6d675f;
  --paper: #f3f0ea;
  --paper-2: #e6e0d6;
  --line: rgba(20, 19, 17, 0.16);
  --accent: #e25b2a;
  --night: #0c0c0c;
  --bone: #f4f1eb;
  --pad: 40px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.5;
}

.page--photo {
  background: var(--night);
  color: var(--bone);
}

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

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

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

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 50;
  padding: 8px 12px;
  background: var(--bone);
  color: var(--ink);
}

.skip:focus {
  top: 16px;
}

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

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 14px var(--pad);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.page--photo .header,
.page--photo .footer {
  background: var(--night);
  color: var(--bone);
  border-color: rgba(244, 241, 235, 0.16);
}

.header__logo {
  position: relative;
  z-index: 26;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-decoration: none;
}

.header__nav {
  display: flex;
  gap: 32px;
}

.header__link {
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.header__link--current {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.header__toggle {
  position: relative;
  z-index: 26;
  display: none;
  align-items: center;
  min-height: 40px;
  padding: 0 2px;
  font-weight: 600;
}

.header__toggle-text--open {
  display: none;
}

.header__toggle[aria-expanded="true"] .header__toggle-text--closed {
  display: none;
}

.header__toggle[aria-expanded="true"] .header__toggle-text--open {
  display: inline;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px var(--pad) 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.page--photo .footer {
  color: rgba(244, 241, 235, 0.62);
}

.label,
.intro__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.page--photo .label,
.page--photo .intro__label {
  color: rgba(244, 241, 235, 0.62);
}

.intro {
  padding: 72px var(--pad) 48px;
}

.intro__label {
  margin-bottom: 22px;
}

.intro__layout,
.page-head__layout,
.who__layout,
.bio {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.8fr);
  gap: 24px 48px;
  align-items: end;
}

.intro__title,
.page-head__title,
.bio__title,
.case__title {
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 0.9;
}

.intro__title {
  font-size: 92px;
  animation: rise 0.8s ease both;
}

.intro__title em,
.page-head__title em,
.bio__title em {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--accent);
}

.intro__text {
  max-width: 352px;
  padding-bottom: 6px;
  color: var(--muted);
}

.doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
}

.door {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.door:hover .door__link,
.door:focus-visible .door__link {
  color: var(--accent);
}

.door--photo,
.door--web {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 520px;
  overflow: hidden;
  color: var(--bone);
  background: var(--night);
}

.door--photo .cycle,
.door--web .cycle {
  position: absolute;
  inset: 0;
  max-width: none;
  height: auto;
  margin: 0;
}

.cycle::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: rgba(8, 8, 8, 0);
  pointer-events: none;
  transition: background 0.35s ease;
}

.door:hover .cycle::after,
.door:focus-visible .cycle::after {
  background: rgba(8, 8, 8, 0.18);
}

.door__copy {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 24px var(--pad) 28px;
  background: rgba(8, 8, 8, 0.92);
}

.door--photo .label,
.door--web .label {
  color: rgba(244, 241, 235, 0.72);
}

.door--web {
  border-left: 1px solid rgba(244, 241, 235, 0.16);
}

.door__title {
  margin: 8px 0 10px;
  font-size: 52px;
  font-weight: 700;
  letter-spacing: -2px;
  line-height: 0.92;
}

.door--photo .door__title,
.door--web .door__title {
  font-family: var(--display);
  font-size: 64px;
  font-weight: 500;
}

.door__text {
  max-width: 416px;
}

.door__link {
  position: relative;
  z-index: 3;
  display: inline-block;
  margin-top: 18px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cycle {
  position: relative;
  overflow: hidden;
  background: #181715;
}

.cycle__frame {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transform: translateY(12px) scale(1.04);
  transition: opacity 0.8s ease, transform 1.1s ease;
}

.cycle__frame--current {
  z-index: 1;
  opacity: 1;
  transform: none;
}

.cycle__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.cycle__photo--center {
  object-position: center;
}

.cycle__label {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  margin: 0;
  padding: 4px 8px;
  background: rgba(8, 8, 8, 0.72);
  color: var(--bone);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.who,
.page-head,
.bio,
.orders,
.contacts {
  padding: 64px var(--pad);
}

.who {
  border-top: 1px solid var(--line);
}

.who__line {
  font-family: var(--display);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.who__side {
  align-self: end;
  color: var(--muted);
}

.who__side a,
.case__body a {
  font-weight: 600;
}

.who__icons {
  display: flex;
  gap: 12px;
}

.who__icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.who__icons svg {
  width: 20px;
  height: 20px;
}

.who__icons a:hover,
.who__icons a:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.page-head {
  padding-bottom: 24px;
}

.page-head__title,
.bio__title {
  font-size: 80px;
}

.page--photo .page-head__title {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -1px;
}

.page-head__text,
.bio__body p,
.case__lead,
.orders__text {
  max-width: 608px;
}

.page-head__text,
.page-head__aside {
  align-self: end;
  color: var(--muted);
}

.page--photo .page-head__text,
.page--photo .page-head__aside {
  color: rgba(244, 241, 235, 0.72);
}

.page-head__aside p + p {
  margin-top: 12px;
}

.series {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(244, 241, 235, 0.16);
  border-bottom: 1px solid rgba(244, 241, 235, 0.16);
}

.series__card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px var(--pad) 22px;
  text-decoration: none;
}

.series__card + .series__card {
  border-left: 1px solid rgba(244, 241, 235, 0.16);
}

.series__cover {
  width: 100%;
  height: 280px;
  margin-bottom: 8px;
  object-fit: cover;
}

.series__cover--center {
  object-position: center;
}

.series__meta {
  color: rgba(244, 241, 235, 0.5);
  font-size: 13px;
  letter-spacing: 2px;
}

.series__title {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 500;
}

.gallery {
  column-count: 2;
  column-gap: 8px;
  padding: 0 var(--pad) 64px;
}

.gallery__item {
  position: relative;
  break-inside: avoid;
  margin: 0 0 8px;
}

.gallery__photo {
  display: block;
  width: 100%;
  height: auto;
  cursor: zoom-in;
}

.gallery__caption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  margin: 0;
  padding: 2px 6px;
  background: rgba(8, 8, 8, 0.62);
  color: var(--bone);
  font-size: 11px;
  letter-spacing: 0.4px;
}

.case {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 24px 48px;
  align-items: start;
  padding: 56px var(--pad);
  border-top: 1px solid var(--line);
}

.case--flip,
.case--last {
  background: var(--paper-2);
}

.case__title {
  margin: 6px 0 12px;
  font-size: 64px;
}

.case__facts {
  display: grid;
  gap: 14px;
  margin: 20px 0;
}

.case__facts > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
}

.case__facts dt {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.case--flip .case__media {
  order: -1;
}

.case__media {
  margin: 0;
}

.case__shot {
  margin: 0;
}

.case__view {
  position: relative;
  overflow: hidden;
}

.case__track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.45s ease;
}

.case__photo {
  display: block;
  width: 100%;
  min-width: 100%;
  height: auto;
  aspect-ratio: 1440 / 900;
  object-fit: cover;
  object-position: top;
  cursor: zoom-in;
}

.case__arrow {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(12, 12, 12, 0.72);
  color: var(--bone);
  transform: translateY(-50%);
}

.case__arrow[hidden],
.case__dots[hidden] {
  display: none;
}

.case__arrow--prev {
  left: 12px;
}

.case__arrow--next {
  right: 12px;
}

.case__arrow svg {
  display: block;
  width: 22px;
  height: 22px;
}

.case__dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 12px;
}

.case__dot {
  width: 8px;
  height: 8px;
  padding: 10px;
  box-sizing: content-box;
  border-radius: 50%;
  background: rgba(12, 12, 12, 0.28);
  background-clip: content-box;
}

.case__dot--current {
  background: #e25b2a;
  background-clip: content-box;
}

.case__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 16px;
}

.case__links a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.bio__body p + p,
.orders__text + .orders__text {
  margin-top: 14px;
}

.orders {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 48px;
  border-top: 1px solid var(--line);
}

.orders__title {
  margin: 6px 0 12px;
  font-size: 40px;
  letter-spacing: -1px;
}

.contacts {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.contacts__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contacts__item {
  border-top: 1px solid var(--line);
}

.contacts__row {
  display: grid;
  grid-template-columns: 144px 1fr;
  gap: 16px;
  padding: 18px 0;
  font-size: 32px;
  letter-spacing: -0.5px;
}

.contacts__name {
  align-self: center;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal--in {
  opacity: 1;
  transform: none;
}

.door--web.reveal {
  transition-delay: 0.12s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--ink);
  color: var(--bone);
}

.page--photo .to-top {
  background: var(--bone);
  color: var(--ink);
}

.to-top[hidden] {
  display: none;
}

.to-top svg,
.lightbox__close svg,
.lightbox__prev svg,
.lightbox__next svg {
  display: block;
  width: 22px;
  height: 22px;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(244, 241, 235, 0.35);
}

.lightbox[open] {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0c0c0c;
  color: var(--bone);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.78);
}

.lightbox__bar,
.lightbox__stage {
  display: flex;
  align-items: center;
}

.lightbox__bar {
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.lightbox__count {
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.lightbox__stage {
  flex: 1;
  justify-content: center;
  gap: 10px;
  min-height: 0;
  padding: 0 12px 20px;
}

.lightbox__photo {
  width: auto;
  height: auto;
  max-width: calc(100vw - 128px);
  max-height: calc(100vh - 104px);
  object-fit: contain;
  cursor: default;
}

.lightbox--page .lightbox__stage {
  align-items: stretch;
}

.lightbox--page .lightbox__prev,
.lightbox--page .lightbox__next {
  align-self: center;
  flex: none;
}

.lightbox--page .lightbox__scroll {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.lightbox--page .lightbox__photo {
  display: block;
  width: min(880px, 100%);
  max-width: min(880px, 100%);
  max-height: none;
  height: auto;
  margin: 0 auto;
  object-fit: fill;
}

@media (min-width: 1100px) {
  .gallery {
    column-count: 3;
  }
}

@media (max-width: 900px) {
  :root {
    --pad: 20px;
  }

  .intro__title {
    font-size: 48px;
  }

  .page-head__title,
  .bio__title,
  .case__title {
    font-size: 40px;
  }

  .door__title,
  .door--photo .door__title,
  .door--web .door__title {
    font-size: 40px;
  }

  .intro__layout,
  .page-head__layout,
  .who__layout,
  .bio,
  .doors,
  .case,
  .orders,
  .series,
  .case__facts > div,
  .contacts__row {
    grid-template-columns: 1fr;
  }

  .door--photo,
  .door--web {
    min-height: 440px;
  }

  .door--web {
    border-left: 0;
    border-top: 1px solid rgba(244, 241, 235, 0.16);
  }

  .series__card + .series__card {
    border-left: 0;
    border-top: 1px solid rgba(244, 241, 235, 0.16);
  }

  .case--flip .case__media {
    order: 0;
  }

  .gallery {
    column-count: 2;
  }
}

@media (max-width: 720px) {
  .header__toggle {
    display: inline-flex;
  }

  .header__nav {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    padding: 96px var(--pad);
    background: var(--paper);
  }

  .page--photo .header__nav {
    background: var(--night);
  }

  .header__nav--open {
    display: flex;
  }

  .header__link {
    font-size: 32px;
  }

  .page--nav-open {
    overflow: hidden;
  }

  .gallery {
    column-count: 1;
  }

  .lightbox__photo {
    max-width: calc(100vw - 120px);
  }
}

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

  .intro__title,
  .js .reveal {
    animation: none;
    transition: none;
    opacity: 1;
    transform: none;
  }

  .cycle__frame,
  .cycle::after,
  .case__track {
    transition: none;
  }
}

@media (max-width: 500px) {
  .case__dots,
  .case__arrow {
    display: none;
  }

  .lightbox--page .lightbox__photo {
    width: 100%;
    max-width: 100%;
  }
}
