@font-face {
  font-family: 'Courier Prime';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/courier-prime-bold.ttf') format('truetype');
  unicode-range: U+0400-04FF;
}

:root {
  --bg: #ece8e1;
  --dark: #1a1713;
  --light: #f3f0eb;
  --muted: #afada8;

  --font-mono: 'Courier Prime', 'Cousine', 'Courier New', monospace;
  --font-sans: 'Inter Tight', sans-serif;
  --font-typewriter: 'Courier New', Courier, monospace;

  --marquee-duration: 60000ms;
}

* { box-sizing: border-box; }

html.lenis, html.lenis body { height: auto; }
html.lenis.lenis-smooth { scroll-behavior: auto !important; }
html.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
html.lenis.lenis-stopped { overflow: hidden; }
html.menu-open,
html.menu-open body { overflow: hidden; overscroll-behavior: none; }

/*
  The whole layout is sized in rem, and the root font-size scales down
  proportionally with viewport width below the 1920px design frame (down to
  an 11px floor around ~1320px). Above 1920px it stays pinned at 16px, so
  the design never grows past its intended pixel-perfect size — only
  shrinks to fit smaller desktop/laptop screens.
*/
html {
  width: 100%;
  background: var(--bg);
  overflow-x: clip;
  font-size: clamp(11px, calc(100vw * 16 / 1920), 16px);
}

body {
  width: 100%;
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--dark);
  font-family: var(--font-sans);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: none; }

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

.heading {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.8rem;
  line-height: 1.2;
  letter-spacing: -0.018rem;
  margin: 0;
}

.body-text { margin: 0; font-size: 1.125rem; line-height: 1.4; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  width: fit-content;
  height: fit-content;
  flex-shrink: 0;
  font-size: 1.125rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.btn img { width: 1rem; height: 1rem; }
.btn--light { background: var(--light); color: var(--dark); }
.btn--light em { color: var(--muted); font-style: normal; }
.btn--dark { background: var(--dark); color: var(--light); }
.btn--dark em { color: var(--muted); font-style: normal; }

/* ===== layout shell ===== */

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15rem;
  padding-bottom: 0;
}

/* ===== header ===== */

.site-header {
  position: static;
  height: 0;
  width: 100%;
  overflow: visible;
  pointer-events: none;
}

/*
  Fixed (not sticky-parent + absolute-children) on purpose: a position:sticky
  ancestor leaves its absolutely-positioned children stuck in a broken
  compositing state in this Chromium build, so mix-blend-mode never blends
  against page content behind them (verified empirically). Fixed directly on
  each element sidesteps that and blends correctly.
*/
.logo {
  position: fixed;
  left: 1.25rem;
  top: 1.0625rem;
  width: 10rem;
  height: 3.0625rem;
  z-index: 50;
  mix-blend-mode: difference;
  pointer-events: auto;
}
.logo img { width: 100%; height: 100%; object-fit: contain; object-position: left center; }

.site-nav a {
  position: fixed;
  top: 1.0625rem;
  z-index: 50;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--light);
  mix-blend-mode: difference;
  pointer-events: auto;
  white-space: nowrap;
}
.site-nav a:nth-child(1) { left: 31.82%; }
.site-nav a:nth-child(2) { left: 62.66%; }
.site-nav a:nth-child(3) { right: 1.25rem; }

.nav-toggle { display: none; }

/* ===== hero ===== */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  padding: 1.875rem 1.25rem;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero__row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  height: 100%;
}

.hero__action {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.5rem;
  width: 35.4375rem;
}

.hero__title {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02rem;
  color: var(--light);
  font-style: normal;
}
.hero__title s { color: var(--muted); text-decoration-skip-ink: none; }

.hero__stats {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 0.9375rem;
  width: 43.625rem;
  color: var(--light);
  text-transform: lowercase;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.stat { display: flex; flex-direction: column; align-items: flex-start; }
.stat__num {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 4rem;
  opacity: 0.25;
}
.stat__label {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.125rem;
}

.hero__tagline {
  margin: 0;
  width: 100%;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 2.30625rem;
  line-height: 1.2;
  letter-spacing: -0.0230625rem;
  text-transform: none;
}

/* ===== intro (2 блок) ===== */

.intro {
  display: flex;
  gap: 8.125rem;
  width: 102.75rem;
}

.intro__media {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  position: relative;
}
.intro__media img {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%) scale(1);
  transition: transform 200ms ease-in;
  width: auto;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: bottom;
}
.intro__media:hover img { transform: translateX(-50%) scale(1.1); }

.intro__content {
  width: 43.625rem;
  height: 55.25rem;
  padding-top: 7rem;
  display: flex;
  flex-direction: column;
  gap: 8.375rem;
}

.intro__cols {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.4;
}
.intro__cols p:nth-child(1) { width: 21.3125rem; margin: 0; }
.intro__cols p:nth-child(2) { width: 16.25rem; margin: 0; }
.intro__cols-mobile { display: none; }
.intro__cols b { font-weight: inherit; }

.intro__routes {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  width: 100%;
}
.intro__routes > p { margin: 0; font-size: 1.125rem; line-height: 1.4; }

.route-tags {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.route-tags span {
  font-family: var(--font-typewriter);
  font-weight: 700;
  font-size: 1.1875rem;
  white-space: nowrap;
}
.route-tags i {
  width: 0.375rem;
  height: 0.375rem;
  flex: 0 0 0.375rem;
  background: url('../assets/icons/ellipse.svg') center / contain no-repeat;
}

/* ===== collage ===== */

.collage {
  position: relative;
  width: 102.75rem;
  height: 64.4375rem;
}

.collage__text {
  position: absolute;
}
.collage__text--left {
  inset: 0 53.36% 78.04% 0;
  padding-top: 2.375rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.collage__text--left .heading { width: 42.5rem; }
/* Anchored to the container's right edge and sized to its longest line,
   so the text block sits flush against the right guide. */
.collage__text--right {
  top: 79.35%;
  right: 0;
  bottom: 0;
  width: max-content;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.collage__text--right .heading,
.collage__text--right .body-text { white-space: nowrap; }

/* The photos bleed past the content column; on narrow laptops (~1200-1320px)
   that bleed is capped so the outer photos stay 1rem inside the screen. */
.collage__photos {
  position: absolute;
  top: 0;
  left: max(-7.18%, calc((100% - 100vw) / 2 + 1rem));
  right: max(-7.18%, calc((100% - 100vw) / 2 + 1rem));
  height: 64.4375rem;
}

.cph {
  position: absolute;
  overflow: hidden;
  transform: translateY(-50%);
}
.cph img { width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease-in; }

.cph--1 { left: 81.74%; right: 0.02%; top: calc(50% - 22.094375rem); aspect-ratio: 343/324; }
.cph--2 { left: 56.58%; right: 18.9%; top: calc(50% - 11.563125rem); aspect-ratio: 343/324; }
.cph--3 { left: 25.15%; right: 56.61%; top: calc(50% + 9.405625rem); aspect-ratio: 343/436; }
.cph--4 { left: -0.01%; right: 75.49%; top: calc(50% - 1.094375rem); aspect-ratio: 461/324; }
.cph--5 { left: 44.03%; right: 44.06%; top: calc(50% - 1.063125rem); aspect-ratio: 224/325; }

/* ===== ritual (4 блок) ===== */

.ritual {
  display: flex;
  align-items: center;
  gap: 5.1875rem;
  width: 102.75rem;
}

.ritual__text {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16rem;
}

.body-stack { display: flex; flex-direction: column; gap: 2.3125rem; }
.body-stack p { margin: 0; font-size: 1.125rem; line-height: 1.4; }

.ritual__photos {
  position: relative;
  width: 65.75rem;
  height: 48.25rem;
}
.rph { position: absolute; overflow: hidden; transform: translateY(-50%); }
.rph img { width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease-in; }
.rph--1 { left: 0; right: 44.96%; top: 50%; aspect-ratio: 579/772; }
.rph--2 { left: 56.18%; right: 0; top: calc(50% - 3.5rem); aspect-ratio: 461/660; }
.rph--2 img { object-position: bottom; }

/* ===== random shots (5 блок) ===== */

.random-shots {
  width: 102.75rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.shots-strip {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
}
.shots-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: shots-marquee var(--marquee-duration) linear infinite;
  will-change: transform;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}
.shots-track.is-dragging { cursor: grabbing; }
.shots-track img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }

@keyframes shots-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.shot { overflow: hidden; flex-shrink: 0; margin-right: 8.125rem; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease-in; }
.shot--sm { width: 14.0625rem; height: 13.3125rem; }
.shot--md { width: 21.4375rem; height: 27.25rem; }
.shot--lg { width: 36.1875rem; height: 41.25rem; }

.shots-caption {
  display: flex;
  justify-content: space-between;
  width: 78.5rem;
}
.shots-caption p { margin: 0; font-size: 1.125rem; line-height: 1.4; }
.shots-caption p:first-child { width: 28.8125rem; }
.shots-caption p:last-child { width: 26.75rem; }

/* ===== team (пацаны) ===== */

.team {
  width: 102.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.team__text-col {
  width: 43.625rem;
  display: grid;
}

.team__text-triggers {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 5rem;
}
.team__text-triggers .team__member {
  width: 100%;
  height: 55.25rem;
}

.team__text-sticky {
  grid-area: 1 / 1;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  align-self: start;
}

.team__text-stack {
  position: relative;
  width: 43.625rem;
  height: 55.25rem;
}

.team__member-text {
  position: absolute;
  inset: 0;
  padding: 7rem 0;
  display: flex;
  flex-direction: column;
  gap: 27.25rem;
  pointer-events: none;
}
.team__member-text.is-current { pointer-events: auto; }

.team__member-text .line-mask { display: block; overflow: hidden; }
.team__member-text .line {
  display: block;
  transform: translateY(110%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.team__member-text.is-revealed .line { transform: translateY(0); }

.team__quote-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.team__author {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.4;
}

.team__member-text .body-text { max-width: 36.25rem; }

.team__photo-col {
  width: 51rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  align-self: flex-start;
}

.team__photo-stack {
  position: relative;
  width: 51rem;
  height: 55.25rem;
}

.team__photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.team__photo.is-swapped { clip-path: inset(0 0 100% 0); }
.team__photo:nth-child(1) { z-index: 4; }
.team__photo:nth-child(2) { z-index: 3; }
.team__photo:nth-child(3) { z-index: 2; }
.team__photo:nth-child(4) { z-index: 1; }

.team__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease-in; }

/* ===== footer ===== */

.site-footer {
  width: 100%;
  height: 67.5rem;
  display: flex;
  gap: 5.1875rem;
  overflow: hidden;
}

.site-footer__media {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}
.site-footer__media img,
.site-footer__media video { width: 100%; height: 100%; object-fit: cover; transition: transform 200ms ease-in; }

.site-footer__content {
  width: 43.5625rem;
  height: 67.5rem;
  padding: 17.0625rem 1.25rem 3.4375rem 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.footer-blocks {
  display: flex;
  flex-direction: column;
  gap: 7.5rem;
}

.footer-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.footer-heading {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.6875rem;
  line-height: 1.2;
  letter-spacing: -0.016875rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01rem;
}
.footer-dev { margin: 0; text-decoration: underline; }
.footer-bottom p { margin: 0; }

/* ===== preloader (photos flash in a 280px square, then it unmasks the hero) ===== */

html.is-preloading { overflow: hidden; }

.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.preloader__frame {
  position: relative;
  width: 280px;
  height: 280px;
}
.preloader__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  visibility: hidden;
}
.preloader__frame img.is-active { visibility: visible; }

.hero.is-unmasking { transition: clip-path 1.1s cubic-bezier(0.76, 0, 0.24, 1); }
@media (prefers-reduced-motion: reduce) {
  .hero.is-unmasking { transition-duration: 0.01s; }
}

/* ===== line reveal (mask + slide-up on load) ===== */

[data-reveal-lines] .line-mask {
  display: block;
  overflow: hidden;
}
[data-reveal-lines] .line {
  display: block;
  transform: translateY(110%);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal-lines].is-revealed .line {
  transform: translateY(0);
}

/* ===== photo hover zoom (frame stays fixed, image scales inside it) ===== */

.cph:hover img,
.rph:hover img,
.shot:hover img,
.team__photo:hover img,
.site-footer__media:hover img {
  transform: scale(1.1);
}
