@font-face {
  font-family: Inter;
  src: url("assets/inter-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: Inter;
  src: url("assets/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --background: #f8f7f4;
  --text: #151515;
  --muted: #525557;
  --divider: #cccbc8;
  --outline: #8a867f;
  --panel: #efede8;
  --card-border: #d7d3cb;
  --telegram-surface: #efeeeb;
  --telegram-icon: #006fa8;
  --instagram-icon: #ae356a;
  --step: #006b9f;
  --focus: #006b9f;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --background: #090909;
    --text: #f8f7f5;
    --muted: #c1c0bd;
    --divider: #555555;
    --outline: #737373;
    --panel: #151515;
    --card-border: #2c2c2c;
    --telegram-surface: #141414;
    --telegram-icon: #65b7e2;
    --instagram-icon: #e482aa;
    --step: #35bbf3;
    --focus: #35bbf3;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: Inter, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

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

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

.page {
  width: min(86rem, calc(100% - 2 * clamp(1.25rem, 4.1vw, 4.5rem)));
  margin-inline: auto;
}

.intro {
  display: grid;
  grid-template-rows: auto 1fr;
  min-block-size: 100vh;
  min-block-size: 100svh;
}

.site-header {
  padding-block: clamp(1.5rem, 3.15vw, 3rem) clamp(1.75rem, 2.4vw, 2.25rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: clamp(0.85rem, 1.5vw, 1.05rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.065em;
  vertical-align: top;
}

.brand-mark {
  display: block;
  flex: none;
  width: 4.5rem;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  mix-blend-mode: multiply;
}

.brand-mark img {
  width: 100%;
  height: auto;
  transform: translateY(-8.75%);
  filter: grayscale(1) contrast(1.4);
}

@media (prefers-color-scheme: dark) {
  .brand-mark {
    mix-blend-mode: screen;
  }

  .brand-mark img {
    filter: grayscale(1) invert(1) contrast(1.4);
  }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.22fr);
  align-content: center;
  align-items: center;
  gap: clamp(1.75rem, 3.2vw, 3.5rem);
  padding-block: clamp(0.75rem, 1.6vh, 1.5rem) clamp(2.25rem, 5.5vh, 5rem);
}

h1,
h2 {
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2.125rem, 4.05vw, 4.25rem);
  overflow-wrap: anywhere;
}

h1 span {
  display: block;
}

.hero-copy p {
  max-width: 31rem;
  margin-top: clamp(1.125rem, 2vw, 1.875rem);
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.375rem);
  line-height: 1.45;
}

.social-links {
  display: grid;
  gap: 0.875rem;
  width: min(100%, 25rem);
  margin-top: clamp(1.5rem, 2.8vw, 2.5rem);
}

.social-link {
  display: grid;
  grid-template-columns: 1.5rem 1fr 1.5rem;
  align-items: center;
  gap: 0.875rem;
  min-height: 3.5rem;
  padding: 0.75rem 1.125rem;
  border: 1px solid var(--active-accent, var(--outline));
  box-shadow: 0 0 0.5rem color-mix(in srgb, var(--active-accent, transparent) 18%, transparent);
  border-radius: 0.65rem;
  color: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.telegram {
  background: var(--telegram-surface);
  font-weight: 750;
  --social-accent: var(--telegram-icon);
}

.instagram {
  --social-accent: var(--instagram-icon);
}

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

@media (hover: hover) {
  .social-link:hover {
    --active-accent: var(--social-accent);
  }
}

@media (hover: none) {
  .social-link {
    --active-accent: var(--social-accent);
  }
}

.social-link svg {
  width: 100%;
  height: auto;
}

.social-icon {
  color: var(--active-accent, inherit);
  transition: color 160ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .social-link,
  .social-icon {
    transition: none;
  }
}

.gallery {
  min-width: 0;
  margin: 0;
}

.gallery-frame {
  position: relative;
  overflow: hidden;
  border-radius: 0.65rem;
}

.gallery-track {
  display: flex;
  aspect-ratio: 4 / 3;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-slide {
  position: relative;
  display: block;
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
}

.gallery-slide,
.gallery-dot,
.photo-arrow {
  -webkit-tap-highlight-color: transparent;
}

.gallery-slide[aria-haspopup="dialog"] {
  cursor: zoom-in;
}

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

.gallery-slide:nth-child(2) img {
  object-position: center 71%;
}

.gallery-slide:nth-child(3) img {
  object-position: center 77%;
}

.gallery-slide:nth-child(4) img {
  object-position: center 38%;
}

.photo-arrow {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #ffffff65;
  border-radius: 50%;
  color: #fff;
  background: #101010cf;
  cursor: pointer;
}

.photo-arrow:hover {
  background: #101010;
}

.photo-arrow svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.gallery-arrow[hidden] {
  display: none;
}

.gallery-arrow.previous {
  left: 0.75rem;
}

.gallery-arrow.next {
  right: 0.75rem;
}

@media (hover: hover) and (pointer: fine) {
  .gallery-arrow {
    opacity: 0;
  }

  .gallery-frame:hover .gallery-arrow,
  .gallery-frame:focus-within .gallery-arrow {
    opacity: 1;
  }
}

@media (hover: none) {
  .gallery-arrow {
    display: none;
  }
}

.gallery-controls {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 2.25rem;
  margin-top: 0.15rem;
}

.gallery-controls[hidden] {
  visibility: hidden;
}

.gallery-dots {
  display: flex;
}

.gallery-dot {
  display: grid;
  place-items: center;
  width: 1.875rem;
  height: 2.25rem;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.gallery-dot::before {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 1rem;
  background: currentColor;
  content: "";
}

.gallery-dot[aria-current="true"] {
  color: var(--step);
}

.gallery-dot[aria-current="true"]::before {
  width: 1rem;
}

.gallery-count,
.viewer-count {
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}

.gallery-count {
  position: absolute;
  right: 0;
}

.gallery-slide:focus-visible,
.gallery-dot:focus-visible,
.photo-arrow:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.gallery-slide:focus-visible {
  outline-offset: -4px;
}

.photo-viewer {
  width: min(75rem, calc(100% - 1.5rem));
  max-width: none;
  max-height: calc(100% - 1.5rem);
  padding: clamp(0.625rem, 2vw, 1.25rem);
  border: 1px solid var(--divider);
  border-radius: 0.8rem;
  color: var(--text);
  background: var(--background);
}

.photo-viewer::backdrop {
  background: #000d;
}

.viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.625rem;
}

.viewer-count {
  padding-inline-start: 0.25rem;
}

.viewer-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.25rem, 1vw, 0.875rem);
}

.viewer-image {
  justify-self: center;
  max-width: 100%;
  max-height: calc(100vh - 7.5rem);
  max-height: calc(100dvh - 7.5rem);
  border-radius: 0.35rem;
  object-fit: contain;
}

@media (max-width: 37.5rem) {
  .viewer-stage {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .viewer-image {
    grid-column: 1 / -1;
    grid-row: 1;
    max-height: calc(100vh - 10rem);
    max-height: calc(100dvh - 10rem);
  }

  .viewer-stage [data-viewer-step="-1"] {
    justify-self: end;
  }
}

.section,
.site-footer {
  border-top: 1px solid var(--divider);
}

.section {
  padding-block: clamp(2.25rem, 4.5vw, 4rem);
}

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

.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 2.5rem);
  margin-top: clamp(1.5rem, 3vw, 2.375rem);
  padding: clamp(0.875rem, 1.6vw, 1.5rem);
  border-radius: 0.75rem;
  background: var(--panel);
  list-style: none;
}

.steps li {
  min-width: 0;
  font-size: clamp(1rem, 1.45vw, 1.25rem);
  font-weight: 700;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.step-title {
  display: block;
  max-width: 16.5ch;
  text-wrap: balance;
}

.step-number {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--step);
  font-size: 1.025rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.045em;
}

.principles {
  padding-top: clamp(3.125rem, 6.25vw, 5.5rem);
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.375rem, 2.9vw, 2.75rem);
  margin-top: clamp(1.5rem, 3.25vw, 2.75rem);
}

.principle {
  min-width: 0;
  padding: clamp(1rem, 2vw, 1.75rem);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  background: var(--panel);
}

.principle h3 {
  font-size: clamp(1.125rem, 2vw, 1.75rem);
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.18;
}

.principle p {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.48;
}

.site-footer {
  padding-block: clamp(1.625rem, 3.25vw, 3rem);
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 52rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-block: 0 clamp(1.75rem, 4.5vh, 3.5rem);
  }

  h1 {
    font-size: clamp(2rem, 9.2vw, 3.5rem);
  }

  .social-links {
    width: 100%;
  }

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

  .steps li {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr);
    align-items: baseline;
    gap: 0.75rem;
    padding: 0;
    border: 0;
    font-size: 1.0625rem;
  }

  .step-title {
    max-width: none;
    text-wrap: wrap;
  }

  .step-number {
    margin: 0;
  }
}

@media (min-width: 38rem) and (max-width: 52rem) {
  .intro {
    width: min(100%, 34rem);
    margin-inline: auto;
  }
}

@media (max-width: 37.5rem) {
  .principle-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 22rem) {
  .page {
    width: calc(100% - 1.75rem);
  }

  h1 {
    font-size: clamp(1.75rem, 9.7vw, 2rem);
  }

  .social-link {
    grid-template-columns: 1.125rem minmax(0, 1fr) 1.125rem;
    gap: 0.625rem;
    padding-inline: 0.75rem;
    font-size: 1.0625rem;
  }

  .gallery-dot {
    width: 1.625rem;
  }
}

@media (min-width: 53rem) {
  .page {
    display: flex;
    flex-direction: column;
    min-block-size: calc(100vh + min(100vh, 88rem));
    min-block-size: calc(100svh + min(100svh, 88rem));
  }

  .page main {
    display: flex;
    flex: 1;
    flex-direction: column;
  }

  .page .section {
    display: grid;
    flex: 1 0 auto;
    align-content: center;
  }
}


@media (min-width: 100rem) and (min-aspect-ratio: 2 / 1) {
  .page {
    width: min(clamp(86rem, 160vh, 124rem), calc(100% - 8.2vw));
  }

  h1 {
    font-size: clamp(4.25rem, 3.125vw, 5rem);
  }

  .hero-copy p {
    max-width: 36rem;
    font-size: clamp(1.375rem, 1.1vw, 1.625rem);
  }

  .social-links {
    width: min(100%, 28rem);
  }
}

@media (min-width: 52.0625rem) and (max-height: 46rem) {
  .site-header {
    padding-block: 1.25rem;
  }

  .brand-mark {
    width: 4.5rem;
  }

  .hero {
    padding-block: 0 2rem;
  }
}

@media (hover: none) and (max-width: 52rem),
       (hover: none) and (orientation: landscape) and (max-width: 64rem) and (max-height: 34rem) {
  .site-header {
    padding-block: clamp(0.625rem, 2.5svh, 1.125rem) clamp(0.5rem, 1.9svh, 1rem);
  }

  .brand-mark {
    width: clamp(3.25rem, 8svh, 4rem);
  }

  .hero {
    gap: clamp(0.625rem, 2svh, 1.125rem);
    padding-block: 0 clamp(0.625rem, 1.75svh, 1rem);
  }

  h1 {
    font-size: clamp(1.6rem, min(8.45vw, 4.65svh), 3.25rem);
  }

  .hero-copy p {
    margin-top: 0.65rem;
    font-size: clamp(0.875rem, 2.15svh, 1rem);
    line-height: 1.35;
  }

  .social-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
    width: 100%;
    margin-top: clamp(0.65rem, 2.1svh, 1rem);
  }

  .social-link {
    grid-template-columns: 1rem minmax(0, 1fr) 0.875rem;
    gap: 0.4rem;
    min-height: 2.75rem;
    padding: 0.45rem 0.6rem;
    font-size: clamp(0.875rem, 3.65vw, 1rem);
  }

  .gallery-controls {
    min-height: 2rem;
  }

  .gallery-dot {
    height: 2rem;
  }
}

@media (hover: none) and (max-width: 22rem) {
  .social-link {
    grid-template-columns: 1rem minmax(0, 1fr);
  }

  .social-link .link-arrow {
    display: none;
  }
}

@media (hover: none) and (max-width: 18rem) {
  .social-link {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .social-link .social-icon {
    display: none;
  }
}

@media (hover: none) and (orientation: portrait) and (max-width: 52rem) and (max-height: 42rem) {
  .hero .gallery {
    width: min(100%, 46svh);
    justify-self: center;
  }
}

@media (hover: none) and (orientation: portrait) and (max-width: 52rem) and (max-height: 36rem) {
  .site-header {
    padding-block: 0.5rem;
  }

  .brand-mark {
    width: 3.25rem;
  }

  .hero {
    gap: 0.5rem;
    padding-bottom: 0.5rem;
  }

  h1 {
    font-size: clamp(1.35rem, min(7.4vw, 4.65svh), 1.8rem);
  }

  .hero-copy p {
    margin-top: 0.5rem;
    line-height: 1.3;
  }

  .social-links {
    margin-top: 0.5rem;
  }

  .hero .gallery {
    width: min(100%, max(10rem, calc((100svh - 20rem) * 1.333333)));
  }
}

@media (hover: none) and (orientation: landscape) and (min-width: 32rem) and (max-width: 64rem) and (max-height: 34rem) {
  .intro {
    width: 100%;
  }

  .site-header {
    padding-block: 0.375rem;
  }

  .brand-mark {
    width: 3.25rem;
  }

  .hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: 0.5rem;
  }

  h1 {
    font-size: clamp(1.375rem, 5.8svh, 2.25rem);
  }

  .social-link {
    grid-template-columns: 1rem minmax(0, 1fr);
    gap: 0.35rem;
    padding-inline: 0.4rem;
    font-size: 0.875rem;
  }

  .social-link .link-arrow {
    display: none;
  }

  .hero .gallery {
    width: min(100%, calc((100svh - 6rem) * 1.333333));
    justify-self: center;
  }
}

@media (min-width: 53rem) and (min-height: 47rem) {
  .site-header {
    padding-block-start: clamp(1.75rem, 8.5vh, 7.25rem);
  }

  .hero {
    padding-block-end: clamp(2rem, calc(24vh - 5rem), 15rem);
  }
}
