@import "./styles/foundations/fonts.css";
@import "./styles/foundations/tokens.css";
@import "./styles/base.css";

.home {
  padding: 16px var(--page-x) 72px;
}

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

.sidebar {
  position: sticky;
  top: 16px;
  align-self: start;
}

.intro {
  margin: 0 0 16px;
  font-family: var(--body-font);
  font-size: var(--text-body-sm);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-body-sm);
}

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

.menu-row {
  min-height: 82px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0 8px 0 2px;
  background: transparent;
  text-align: left;
}

.menu-link,
.contact-toggle {
  cursor: pointer;
  transition: color 180ms ease;
}

.menu-link:hover,
.contact-toggle:hover {
  color: var(--muted-active);
}

.menu-title {
  display: block;
  flex: 0 0 auto;
  font-family: var(--title-font);
  font-size: 50px;
  font-weight: var(--font-weight-title-light);
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.menu-meta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--soft);
  font-family: var(--label-font);
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  transform: translateY(12px);
}

.available {
  color: var(--open);
}

.dot {
  color: var(--soft);
  font-size: 14px;
}

.label-mobile {
  display: none;
}

.contact-row {
  border-bottom: 1px solid var(--line);
}

.contact-row .contact-toggle {
  border-bottom: 0;
}

.contacts-panel {
  max-height: 0;
  overflow: hidden;
  padding: 0 8px 0 7px;
  opacity: 0;
  transition:
    max-height 260ms ease,
    opacity 180ms ease,
    padding 260ms ease;
}

.contact-row.is-open .contacts-panel {
  max-height: 104px;
  padding-top: 22px;
  padding-bottom: 28px;
  opacity: 1;
}

.contacts-note {
  margin: 0 0 13px;
  color: var(--color-text-disabled);
  font-family: var(--body-font);
  font-size: 14px;
  line-height: 1;
}

.contacts-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  align-items: center;
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1;
}

.contacts-links a {
  transition: color 160ms ease;
}

.contacts-links a:hover {
  color: var(--muted-active);
}

.copy-tooltip {
  position: fixed;
  z-index: 40;
  transform: translate(-50%, -100%) translateY(4px);
  background: var(--color-black);
  color: var(--color-text-inverse);
  font-family: var(--body-font);
  font-size: 13px;
  line-height: 1;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.copy-tooltip.is-visible {
  opacity: 1;
  transform: translate(-50%, -100%) translateY(0);
}

.work-feed {
  padding-top: 37px;
}

.project-card {
  display: block;
  margin: 0 0 24px;
  color: var(--text);
}

/* Кейсы в работе: карточка без ссылки читается как временно неактивная */
div.project-card {
  opacity: 0.55;
}

.project-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1.93;
  margin: 0;
  overflow: hidden;
  background: var(--color-surface-thumbnail);
}

.project-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1);
  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 220ms ease;
}

a.project-card:hover .project-media img {
  transform: scale(1.018);
  filter: saturate(0.96) contrast(0.98);
}

.project-title {
  margin: 7px 0 0;
  font-family: var(--title-font);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: 0;
}

@media (min-width: 810px) and (max-width: 1199px) {
  .home {
    padding-top: 16px;
  }

  .menu-row {
    min-height: 82px;
  }

  .menu-title {
    font-size: 48px;
  }

  .menu-meta {
    font-size: 11px;
    transform: translateY(11px);
  }

  .project-media {
    aspect-ratio: 1.43;
  }

  .project-title {
    font-size: 15px;
  }
}

@media (max-width: 809px) {
  .home {
    padding: 16px 0 64px 16px;
  }

  .home-grid {
    display: block;
  }

  .sidebar {
    position: relative;
    top: auto;
  }

  .intro {
    margin-bottom: 16px;
    font-size: 16px;
  }

  .menu-row {
    min-height: 74px;
    padding-left: 2px;
    padding-right: 8px;
  }

  .menu-title {
    font-size: 40px;
  }

  .menu-meta {
    gap: 5px;
    font-size: 11px;
    transform: translateY(9px);
  }

  .label-desktop {
    display: none;
  }

  .label-mobile {
    display: inline;
  }

  .contact-row.is-open .contacts-panel {
    max-height: 126px;
    padding-top: 13px;
    padding-bottom: 21px;
  }

  .contacts-note {
    font-size: 13px;
  }

  .contacts-links {
    gap: 14px 22px;
    font-size: 16px;
    line-height: 1.3;
  }

  .work-feed {
    width: calc(100dvw - 16px);
    max-width: calc(100dvw - 16px);
    padding-top: 0;
    margin-top: 88px;
  }

  .project-card {
    margin-bottom: 27px;
  }

  .project-media {
    aspect-ratio: 484 / 353;
  }

  .project-title {
    width: calc(100dvw - 32px);
    margin-top: 6px;
    padding-right: 16px;
    font-size: 17px;
    line-height: 1.2;
  }
}

.about-body {
  overflow: hidden;
}

.about-page {
  height: 100vh;
  overflow: hidden;
  padding: 0 16px 16px;
}

/* Шапка внутренних страниц: липнет к верху, белая на всю ширину,
   отступ под кнопкой равен отступу над ней */
.inner-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  margin: 0 -16px;
  padding: 16px;
  background: var(--paper);
}

.inner-close {
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 18px;
  transition: color 160ms ease;
}

.inner-close:hover {
  color: var(--muted-active);
}

.about-content {
  display: flex;
  gap: 16px;
  width: 100%;
  height: calc(100vh - 66px);
  overflow: hidden;
}

.about-copy {
  flex: 1 0 0;
  width: 1px;
  color: var(--text);
  font-family: var(--body-font);
  font-size: 20px;
  font-weight: var(--font-weight-regular);
  line-height: 1.3;
  letter-spacing: 0;
}

.about-copy p {
  width: 80%;
  margin: 0 0 26px;
}

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

.about-photo {
  position: relative;
  flex: 1 0 0;
  width: 1px;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.about-photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.grid-page {
  min-height: 100vh;
  overflow-x: clip;
  padding: 0 16px 16px;
}

.grid-header {
  justify-content: space-between;
  gap: 16px;
}

.grid-updated {
  margin: 0;
  color: var(--color-text-disabled);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 18px;
}

.grid-masonry {
  --grid-column-count: 4;
  --grid-gap: 16px;
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(var(--grid-column-count), minmax(0, 1fr));
  gap: var(--grid-gap);
  align-items: start;
}

.grid-masonry__column {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  gap: var(--grid-gap);
}

.grid-masonry__item {
  display: block;
  min-width: 0;
  overflow: hidden;
  background: var(--color-surface-thumbnail);
  cursor: default;
}

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

@media (max-width: 809px) {
  .grid-page {
    padding: 0 12px 48px;
  }

  .grid-page .inner-header {
    margin: 0 -12px;
    padding: 16px 12px;
  }

  .grid-updated {
    font-size: 14px;
  }

  .grid-masonry {
    --grid-column-count: 2;
    --grid-gap: 12px;
  }
}

@media (min-width: 810px) and (max-width: 1199px) {
  .about-content {
    flex-direction: column;
    gap: 318px;
    height: calc(100vh - 66px);
  }

  .about-copy {
    flex: none;
    width: 100%;
    height: auto;
  }

  .about-copy p {
    width: 80%;
  }

  .about-photo {
    flex: none;
    width: 100%;
    height: 820px;
  }
}

@media (max-width: 809px) {
  .about-content {
    flex-direction: column;
    gap: 80px;
    height: calc(100vh - 66px);
  }

  .about-copy {
    flex: none;
    width: 100%;
    height: auto;
    font-size: 16px;
    line-height: 22px;
  }

  .about-copy p {
    width: 100%;
    margin-bottom: 22px;
  }

  .about-photo {
    flex: none;
    width: 100%;
    height: calc(100vh - 373px);
    min-height: 827px;
  }
}

.project-page {
  padding: 0 16px 88px;
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(240px, 25%) minmax(0, 1fr);
  gap: var(--project-column-gap);
  min-height: calc(100vh - 66px);
  align-items: stretch;
}

/* 50px = высота фиксированной шапки: сайдбар хиро прилипает вплотную под неё */
.project-hero__sidebar {
  position: sticky;
  top: 50px;
  height: calc(100vh - 66px);
  min-height: 640px;
  align-self: start;
  overflow: hidden;
}

.project-hero__title {
  margin: 0 0 14px;
  font-family: var(--title-font);
  font-size: 28px;
  font-weight: var(--font-weight-title-light);
  line-height: 1.04;
}

.project-hero__intro p {
  max-width: 380px;
  margin: 0 0 24px;
  color: var(--color-text-faint);
  font-family: var(--body-font);
  font-size: 18px;
  line-height: 1.2;
}

.project-tags-list {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 260px;
}

.project-tags-list span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 8px;
  background: var(--color-surface-muted);
  padding: 2px 12px;
  font-family: var(--label-font);
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
}

.project-hero__media {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.project-hero__media::after {
  display: none;
}

.project-hero__media img {
  position: relative;
  z-index: 1;
  display: block;
  width: min(78%, 1120px);
  height: auto;
}

.project-media-frame {
  margin: 0;
}

.project-media-frame::after {
  display: none;
}

.project-media-frame img {
  position: absolute;
  inset: 80px;
  z-index: 1;
  display: block;
  width: calc(100% - 160px);
  height: calc(100% - 160px);
  object-fit: contain;
  object-position: center;
}

.placeholder-media {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(135deg, var(--color-media-sheen-strong), var(--color-media-sheen-soft) 48%),
    var(--color-surface-media);
}

.placeholder-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--color-overlay-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-overlay-grid) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.22;
}

.placeholder-media--dark {
  background:
    linear-gradient(135deg, var(--color-media-sheen-dark), var(--color-media-sheen-soft) 48%),
    var(--color-surface-media-dark);
}

.placeholder-media--hero {
  min-height: calc(100vh - 66px);
}

.project-media-cover {
  margin: 0;
}

.project-media-cover::after {
  display: none;
}

.project-media-cover img,
.project-media-cover video {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.project-media-cover video {
  transform: scale(1.006);
}

.project-main {
  display: grid;
  grid-template-columns: minmax(240px, 25%) minmax(0, 1fr);
  gap: var(--project-column-gap);
  padding-top: var(--project-card-gap);
}

.project-case-nav {
  position: relative;
}

.project-case-nav__inner {
  position: sticky;
  top: 66px;
}

.project-case-nav__row {
  border-top: 1px solid var(--color-line-faint);
  padding: 18px var(--project-sidebar-inset-end) 19px 0;
}

.project-case-nav__row:last-child {
  border-bottom: 1px solid var(--color-line-faint);
}

.project-case-nav__row h2 {
  margin: 0;
  color: var(--color-text-muted);
  font-family: var(--body-font);
  font-size: var(--text-body-sm);
  font-weight: 400;
  line-height: var(--line-body-sm);
  letter-spacing: 0;
}

.project-case-nav__row p {
  max-height: 0;
  margin: 0;
  overflow: hidden;
  color: var(--color-text-secondary);
  font-family: var(--body-font);
  font-size: 14px;
  line-height: 1.45;
  opacity: 0;
  transition:
    max-height 260ms ease,
    margin 260ms ease,
    opacity 180ms ease;
}

.project-case-nav__row.is-active h2 {
  color: var(--text);
}

.project-case-nav__row.is-active p {
  max-height: 180px;
  margin-top: 8px;
  opacity: 1;
}

.project-content {
  display: grid;
  gap: var(--project-card-gap);
}

.project-scroll-zone {
  display: grid;
  gap: var(--project-card-gap);
  scroll-margin-top: 88px;
}

.project-section {
  display: grid;
  gap: var(--project-card-gap);
  scroll-margin-top: 88px;
}

.case-text-section {
  border-top: 1px solid var(--color-line-faint);
  padding: 38px 0 148px;
}

.case-text-section__copy {
  max-width: 760px;
}

.case-text-section__copy p {
  margin: 0;
  color: var(--text);
  font-family: var(--body-font);
  font-size: 28px;
  line-height: 1.18;
}

.case-text-section--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--project-card-gap);
}

.case-text-section__heading {
  margin: 0;
  color: var(--text);
  font-family: var(--body-font);
  font-size: 28px;
  font-weight: var(--font-weight-regular);
  line-height: 1.18;
}

.case-text-section__items {
  display: grid;
  gap: 64px;
}

.case-text-section__item {
  display: grid;
  gap: 40px;
}

.case-text-section__eyebrow {
  margin: 0;
  color: var(--text);
  font-family: var(--body-font);
  font-size: var(--text-body-sm);
  line-height: var(--line-body-sm);
}

.case-text-section__copy-text {
  margin: 0;
  color: var(--text);
  font-family: var(--body-font);
  font-size: 28px;
  line-height: 1.18;
}

.project-section__intro {
  display: none;
}

.project-section__intro h2 {
  margin: 0 0 18px;
  font-family: var(--body-font);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.project-section__intro p,
.project-outcome-copy p {
  max-width: 760px;
  margin: 0;
  color: var(--color-text-secondary);
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.5;
}

.placeholder-media--wide {
  aspect-ratio: 16 / 9;
}

.placeholder-media--portrait {
  aspect-ratio: 4 / 5;
}

.placeholder-media--tall {
  aspect-ratio: 4 / 6;
}

.placeholder-media--small-wide {
  aspect-ratio: 16 / 9;
}

.project-bento {
  --project-bento-blue: #163898;
  --project-bento-pink: #f9b0f6;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: 1.08fr 1.7fr 1fr;
  gap: var(--project-card-gap);
  aspect-ratio: 1.66 / 1;
}

.project-bento__card {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-surface-media);
  color: var(--color-text-inverse);
}

.project-bento__card--tall {
  grid-row: 1 / 4;
}

.project-bento__card--right {
  grid-column: 3;
  grid-row: 1 / 3;
  padding: 24px;
}

.project-bento__card--bottom {
  grid-column: 2 / 4;
  grid-row: 3;
  padding: 24px;
}

.project-bento__card--photo {
  background: var(--color-black);
}

.project-bento__card--photo img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-bento__card--tall::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 18, 44, 0) 24%, rgba(7, 18, 44, 0.74) 100%);
}

.project-bento__card--brand {
  background: var(--project-bento-blue);
  overflow: visible;
  z-index: 2;
}

.project-bento__brand-logo,
.project-bento__brand-icon {
  position: absolute;
  z-index: 1;
  display: block;
  pointer-events: none;
  user-select: none;
}

.project-bento__brand-logo {
  top: 50%;
  left: 50%;
  width: 62%;
  height: auto;
  transform: translate(-50%, -50%);
}

.project-bento__brand-icon--salo {
  width: clamp(128px, 14.4vw, 224px);
  bottom: -28%;
  left: -7%;
}

.project-bento__brand-icon--ozon {
  width: clamp(84px, 9.6vw, 150px);
  top: -15%;
  right: -2%;
}

.project-bento__card--right {
  background: var(--project-bento-blue);
}

.project-bento__speech-bubbles {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 1;
  display: block;
  width: 76%;
  height: auto;
  pointer-events: none;
  user-select: none;
}

.project-bento__card--summary {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--project-bento-pink);
}

.project-bento__title {
  position: relative;
  z-index: 1;
  max-width: 10ch;
  margin: 0;
  color: var(--color-text-inverse);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.project-bento__title--photo {
  position: absolute;
  right: 32px;
  bottom: 40%;
  left: 32px;
  max-width: none;
  text-align: center;
}

.project-bento__card--summary .project-bento__title {
  max-width: 13ch;
}

.project-bento__path {
  margin: 0;
  color: var(--color-text-inverse);
  font-family: var(--body-font);
  font-size: 18px;
  line-height: 1.2;
}

.project-bento--final {
  grid-template-columns: 781fr 761fr 900fr;
  grid-template-rows: 356fr 639fr 371fr;
}

.project-bento__card--final-top-left {
  grid-column: 1;
  grid-row: 1;
  background: var(--project-bento-blue);
}

.project-bento__card--final-left {
  grid-column: 1;
  grid-row: 2 / 4;
  background: #f8f8f8;
}

.project-bento__card--final-center {
  grid-column: 2;
  grid-row: 1 / 3;
  background: var(--project-bento-pink);
}

.project-bento__card--final-right {
  grid-column: 3;
  grid-row: 1 / 3;
  background: var(--project-bento-blue);
}

.project-bento__card--final-bottom {
  grid-column: 2 / 4;
  grid-row: 3;
  background: #f8f8f8;
}

.project-bento__final-image {
  position: absolute;
  z-index: 1;
  display: block;
  max-width: none;
  pointer-events: none;
  user-select: none;
}

.project-bento__final-image--toggle {
  top: 50%;
  left: 50%;
  width: 70%;
  height: auto;
  transform: translate(-50%, -50%);
}

.project-bento__final-image--passengers {
  top: 50%;
  left: 50%;
  width: 70%;
  height: auto;
  transform: translate(-50%, -50%);
}

.project-bento__final-image--info {
  top: 50%;
  left: 50%;
  width: auto;
  height: 82%;
  transform: translate(-50%, -50%);
}

.project-bento__final-image--card {
  top: 50%;
  left: 50%;
  width: auto;
  height: 82%;
  transform: translate(-50%, -50%);
}

.project-bento__final-image--stopka {
  top: 50%;
  left: 50%;
  width: 82%;
  height: auto;
  transform: translate(-50%, -50%);
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--project-card-gap);
}

.compare-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: clamp(420px, 48vw, 640px);
  margin: 0;
  padding: 28px 28px 48px;
}

.compare-card--media-only {
  display: block;
  min-height: 0;
  padding: 48px 28px;
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24' fill='none'%3E%3Cpath d='M14.5352 11.0865L18.5575 12.6605C20.8775 13.5683 22.0375 14.0222 21.9991 14.7422C21.9606 15.4622 20.75 15.7924 18.3288 16.4527C17.6079 16.6493 17.2475 16.7476 16.9976 16.9976C16.7476 17.2475 16.6493 17.6079 16.4527 18.3288C15.7924 20.75 15.4622 21.9606 14.7422 21.9991C14.0222 22.0375 13.5683 20.8775 12.6605 18.5575L11.0865 14.5352C10.136 12.1062 9.6608 10.8918 10.2763 10.2763C10.8918 9.6608 12.1062 10.136 14.5352 11.0865Z' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3Cpath d='M10.8576 7.08329C11.0714 7.43808 11.5323 7.55239 11.8871 7.33861C12.2419 7.12483 12.3562 6.66392 12.1424 6.30913L10.8576 7.08329ZM6.30914 12.1424C6.66392 12.3562 7.12483 12.2419 7.33861 11.8871C7.55239 11.5323 7.43808 11.0714 7.08329 10.8576L6.30914 12.1424ZM5.75 8.5C5.75 6.98122 6.98123 5.75 8.5 5.75V4.25C6.15281 4.25 4.25 6.15279 4.25 8.5H5.75ZM8.5 5.75C9.49944 5.75 10.3752 6.28272 10.8576 7.08329L12.1424 6.30913C11.3999 5.07687 10.0469 4.25 8.5 4.25V5.75ZM7.08329 10.8576C6.28272 10.3752 5.75 9.49945 5.75 8.5H4.25C4.25 10.0469 5.07688 11.3999 6.30914 12.1424L7.08329 10.8576Z' fill='black'/%3E%3Cpath d='M14.2515 8.13498C14.2778 8.54836 14.6342 8.86216 15.0476 8.83587C15.461 8.80958 15.7748 8.45316 15.7485 8.03979L14.2515 8.13498ZM8.04118 15.7485C8.45457 15.7747 8.81093 15.4608 8.83714 15.0475C8.86335 14.6341 8.54948 14.2777 8.1361 14.2515L8.04118 15.7485ZM2.75 8.50661C2.75 5.32733 5.32736 2.75 8.50664 2.75V1.25C4.49895 1.25 1.25 4.49889 1.25 8.50661H2.75ZM8.50664 2.75C11.561 2.75 14.0604 5.12926 14.2515 8.13498L15.7485 8.03979C15.5074 4.24925 12.3576 1.25 8.50664 1.25V2.75ZM8.1361 14.2515C5.12986 14.0609 2.75 11.5614 2.75 8.50661H1.25C1.25 12.358 4.25002 15.5081 8.04118 15.7485L8.1361 14.2515Z' fill='black'/%3E%3C/svg%3E") 2 2,
    zoom-in;
}

.compare-card::after {
  display: none;
}

.compare-card__copy {
  position: relative;
  z-index: 1;
}

.compare-card--media-only .compare-card__copy {
  display: none;
}

.compare-card__copy h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-family: var(--title-font);
  font-size: 28px;
  font-weight: var(--font-weight-title-light);
  line-height: 1.04;
}

.compare-card__copy p {
  max-width: 420px;
  margin: 0;
  color: var(--color-text-faint);
  font-family: var(--body-font);
  font-size: 18px;
  line-height: 1.2;
}

.compare-card img {
  position: relative;
  z-index: 1;
  align-self: end;
  display: block;
  width: 100%;
  height: auto;
  transform: scale(1);
  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 220ms ease;
}

.compare-card--media-only:hover img {
  transform: scale(1.018);
  filter: saturate(0.96) contrast(0.98);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.72);
  padding: 48px;
}

.lightbox[hidden] {
  display: none;
}

body.is-lightbox-open {
  overflow: hidden;
}

.lightbox__image {
  display: block;
  max-width: min(92vw, 1440px);
  max-height: 88vh;
  object-fit: contain;
}

.lightbox__close,
.lightbox__nav {
  position: absolute;
  z-index: 1;
  border: 0;
  background: transparent;
  color: var(--color-text-inverse);
  cursor: pointer;
}

.lightbox__close {
  top: 24px;
  left: 24px;
  font-family: var(--body-font);
  font-size: var(--text-body-sm);
  line-height: var(--line-body-sm);
}

.lightbox__nav {
  top: 50%;
  width: 64px;
  height: 64px;
  font-size: 48px;
  line-height: 1;
  transform: translateY(-50%);
}

.lightbox__nav--prev {
  left: 24px;
}

.lightbox__nav--next {
  right: 24px;
}

.before-after {
  --compare-inset: 80px;
  --compare-position: 78%;
  margin: 0;
}

.before-after::after {
  display: none;
}

.before-after__image {
  position: absolute;
  inset: var(--compare-inset);
  z-index: 1;
  display: block;
  width: calc(100% - (var(--compare-inset) * 2));
  height: calc(100% - (var(--compare-inset) * 2));
  object-fit: contain;
  object-position: center;
  pointer-events: none;
  user-select: none;
}

.before-after__image--after {
  clip-path: inset(0 0 0 var(--compare-position));
}

.before-after__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--compare-position);
  z-index: 2;
  width: 1px;
  background: rgba(0, 0, 0, 0.2);
  transform: translateX(-50%);
  pointer-events: none;
}

.before-after__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
  transform: translate(-50%, -50%);
}

.before-after__range {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: ew-resize;
  opacity: 0;
}

.project-media-grid {
  display: grid;
  gap: var(--project-card-gap);
}

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

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

.project-media-stack {
  display: grid;
  gap: var(--project-card-gap);
  align-content: stretch;
}

.project-outcome-copy {
  display: grid;
  grid-template-columns: minmax(200px, 34%) minmax(0, 1fr);
  gap: var(--project-card-gap);
  padding-top: 0;
}

.project-outcome-copy h2 {
  margin: 0;
  font-family: var(--body-font);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.05;
}

.miniapp-page figure.placeholder-media {
  margin: 0;
}

.miniapp-hero .project-hero__sidebar {
  position: static;
  display: flex;
  height: calc(100vh - 66px);
  min-height: 640px;
  flex-direction: column;
  justify-content: space-between;
}

.miniapp-page .case-text-section {
  padding: 38px 0 148px;
}

.miniapp-page .case-text-section--split {
  padding-bottom: 148px;
}

.miniapp-page .project-section {
  gap: var(--project-card-gap);
}

.miniapp-page .project-media-grid--two > .placeholder-media {
  height: clamp(520px, 40.5vw, 700px);
  min-height: 0;
  aspect-ratio: auto;
}

.miniapp-settings-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.miniapp-settings-card img {
  position: relative;
  z-index: 1;
  display: block;
  width: min(66%, 393px);
  max-height: 100%;
  border-radius: 28px;
  object-fit: contain;
}

.miniapp-node-column {
  position: relative;
}

.miniapp-node-column__inner {
  display: flex;
  min-height: calc(100vh - 32px);
  align-items: flex-end;
}

.product-node {
  position: relative;
  width: 100%;
  border-top: 1px solid var(--color-line-faint);
  padding-top: 16px;
  font-family: var(--body-font);
}

.product-node__toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.product-node__feed {
  display: grid;
  max-height: 0;
  gap: 14px;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 260ms ease,
    margin 260ms ease,
    opacity 180ms ease;
}

.product-node__toggle-input:checked ~ .product-node__feed {
  max-height: 520px;
  margin-bottom: 18px;
  opacity: 1;
}

.product-node__post {
  border-top: 1px solid var(--color-line-faint);
  padding-top: 14px;
}

.product-node__date,
.product-node__eyebrow {
  margin: 0 0 8px;
  color: var(--color-text-muted);
  font-size: var(--text-body-sm);
  line-height: var(--line-body-sm);
}

.product-node__post h3,
.product-node__latest h2 {
  margin: 0;
  color: var(--text);
  font-size: var(--text-body-sm);
  font-weight: 400;
  line-height: var(--line-body-sm);
}

.product-node__post p:last-child,
.product-node__latest p:last-child {
  margin: 8px 0 0;
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.42;
}

.product-node__toggle {
  display: inline-flex;
  margin-top: 16px;
  color: var(--text);
  font-size: var(--text-body-sm);
  line-height: var(--line-body-sm);
  cursor: pointer;
}

.product-node__toggle-close {
  display: none;
}

.product-node__toggle-input:checked ~ .product-node__toggle .product-node__toggle-open {
  display: none;
}

.product-node__toggle-input:checked ~ .product-node__toggle .product-node__toggle-close {
  display: inline;
}

.miniapp-bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--project-card-gap);
}

.miniapp-bento__card {
  min-height: 280px;
}

.miniapp-bento__card--large {
  grid-row: span 2;
  min-height: 584px;
}

.miniapp-bento__card--wide {
  grid-column: span 2;
}

@media (min-width: 810px) and (max-width: 1199px) {
  .project-page {
    padding: 0 16px 80px;
  }

  .project-hero {
    display: block;
    min-height: 0;
  }

  .project-hero__sidebar {
    position: static;
    display: block;
    height: auto;
    min-height: 0;
  }

  .project-hero__intro p {
    max-width: 540px;
  }

  .project-tags-list {
    max-width: none;
    margin-bottom: var(--project-card-gap);
  }

  .project-hero__media {
    width: 100%;
  }

  .placeholder-media--hero {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .project-main {
    display: block;
    padding-top: var(--project-card-gap);
  }

  .project-case-nav {
    display: none;
  }

  .project-content {
    gap: var(--project-card-gap);
  }

  .project-section__intro {
    display: block;
    margin-bottom: var(--project-card-gap);
  }

  .case-text-section {
    padding: 34px 0 124px;
  }

  .case-text-section__copy {
    max-width: 680px;
  }

  .case-text-section__copy p {
    font-size: 24px;
  }

  .case-text-section--split {
    grid-template-columns: 1fr;
  }

  .case-text-section__heading,
  .case-text-section__copy-text {
    font-size: 24px;
  }

  .case-text-section__items {
    gap: 56px;
  }

  .project-media-frame img {
    inset: 56px;
    width: calc(100% - 112px);
    height: calc(100% - 112px);
  }

  .miniapp-node-column {
    margin-bottom: var(--project-card-gap);
  }

  .miniapp-node-column__inner {
    position: static;
    min-height: 0;
  }
}

@media (max-width: 809px) {
  .project-page {
    max-width: 100%;
    overflow-x: clip;
    padding: 0 16px 64px;
  }

  .project-hero {
    display: block;
    min-height: 0;
  }

  .project-hero__sidebar {
    position: static;
    display: block;
    height: auto;
    min-height: 0;
  }

  .project-hero__intro p {
    max-width: 380px;
  }

  .project-tags-list {
    max-width: none;
    margin-bottom: var(--project-card-gap);
  }

  .placeholder-media--hero {
    width: 100%;
    min-height: 0;
    aspect-ratio: 1 / 0.72;
  }

  .project-main {
    display: block;
    padding-top: var(--project-card-gap);
  }

  .project-case-nav {
    display: none;
  }

  .project-content {
    gap: var(--project-card-gap);
  }

  .project-section {
    gap: var(--project-card-gap);
  }

  .project-section__intro {
    display: block;
    margin-bottom: var(--project-card-gap);
  }

  .case-text-section {
    padding: 30px 0 96px;
  }

  .case-text-section__copy p {
    font-size: 21px;
    line-height: 1.22;
  }

  .case-text-section--split {
    grid-template-columns: 1fr;
  }

  .case-text-section__heading,
  .case-text-section__copy-text {
    font-size: 21px;
    line-height: 1.22;
  }

  .case-text-section__items {
    gap: 48px;
  }

  .case-text-section__item {
    gap: 28px;
  }

  .project-media-frame img {
    inset: 32px;
    width: calc(100% - 64px);
    height: calc(100% - 64px);
  }

  .miniapp-node-column {
    margin-bottom: var(--project-card-gap);
  }

  .miniapp-node-column__inner {
    position: static;
    min-height: 0;
  }

  .miniapp-bento {
    grid-template-columns: 1fr;
  }

  .miniapp-bento__card,
  .miniapp-bento__card--large {
    grid-column: auto;
    min-height: 240px;
  }

  .miniapp-bento__card--wide {
    grid-column: auto;
  }

  .miniapp-settings-card {
    min-height: 520px;
    padding: 28px;
  }

  .miniapp-settings-card img {
    width: min(82%, 360px);
    border-radius: 24px;
  }

  .before-after {
    --compare-inset: 32px;
  }

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

  .compare-card {
    min-height: 420px;
    padding: 24px 24px 36px;
  }

  .compare-card--media-only {
    min-height: 0;
    padding: 36px 24px;
  }

  .lightbox {
    padding: 24px;
  }

  .lightbox__close {
    top: 16px;
    left: 16px;
  }

  .lightbox__nav {
    width: 48px;
    height: 48px;
    font-size: 36px;
  }

  .lightbox__nav--prev {
    left: 8px;
  }

  .lightbox__nav--next {
    right: 8px;
  }

  .compare-card__copy h2 {
    font-size: 24px;
  }

  .compare-card__copy p {
    font-size: 16px;
  }

  .project-bento {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    aspect-ratio: auto;
  }

  .project-bento__card,
  .project-bento__card--tall,
  .project-bento__card--right,
  .project-bento__card--bottom {
    grid-column: auto;
    grid-row: auto;
    aspect-ratio: 16 / 11;
  }

  .project-bento__card--right,
  .project-bento__card--bottom {
    padding: 28px;
  }

  .project-bento__title {
    font-size: clamp(32px, 10vw, 52px);
  }

  .project-bento__title--photo {
    right: 28px;
    bottom: 32%;
    left: 28px;
  }

  .project-section__intro h2 {
    font-size: 20px;
  }

  .project-section__intro p,
  .project-outcome-copy p {
    font-size: 15px;
    overflow-wrap: anywhere;
  }

  .project-media-grid--two,
  .project-media-grid--split {
    grid-template-columns: 1fr;
  }

  .project-outcome-copy {
    grid-template-columns: 1fr;
    gap: var(--project-card-gap);
  }

  .project-outcome-copy h2 {
    font-size: 24px;
  }
}
