/* ABC Areal — Dinamo. Файлы в /fonts, веб-лицензия обязательна. */
@font-face {
  font-family: "ABC Areal";
  src: url("../fonts/ABCAreal-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "ABC Areal Semi Mono";
  src: url("../fonts/ABCArealSemiMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font: "ABC Areal", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "ABC Areal Semi Mono", var(--font);
  --screen-h: 100vh;
  /* 1 px из Figma-фрейма 1200×800, вписанного в окно */
  --u: min(100vw / 1200, var(--screen-h) / 800);

  --text-size: 14px;
  --counter-size: 10px;
  --gap: 5px;
  --edge-x: 18px;
  --edge-y: 20px;
  --caption-left: calc(50% + 3px);
  --caption-width: 320px;
  --paragraph-gap: 28px; /* расстояние между абзацами на info */
  --cursor-size: 10px;
  --fade-duration: 700ms; /* длительность проявления одной картинки */
  --fade-step: 180ms;     /* задержка между соседними картинками */
}
@supports (height: 100svh) {
  :root { --screen-h: 100svh; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  background: #fff;
  color: #000;
  scroll-snap-type: y proximity;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--text-size);
  font-weight: 700;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
}

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

/* долгое нажатие на картинку в iOS не предлагает «Сохранить» */
.screen img, .screen video {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
a:focus-visible, [role="button"]:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }

/* ---------- шапка ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--edge-y) var(--edge-x);
  color: #fff;
  mix-blend-mode: exclusion;
  pointer-events: none;
}
.site-header a { pointer-events: auto; }

.brand {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  white-space: nowrap;
}
.role--mobile { display: none; }

/* ---------- экраны ---------- */

.screen {
  position: relative;
  height: var(--screen-h);
  overflow: hidden;
  scroll-snap-align: start;
  background: #fff;
}

.full-media, .full-media__item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.full-media__item { object-fit: cover; display: block; }

.screen--group {
  display: flex;
  align-items: center;
  justify-content: center;
}

.group { display: flex; gap: var(--gap); align-items: flex-start; }
.group--stack { flex-direction: column; }

.cell { display: flex; flex-direction: column; gap: var(--gap); }

/* поочерёдное проявление картинок в группе */
.group.is-fading .cell { opacity: 0; }
.group.is-fading.is-in .cell {
  opacity: 1;
  transition: opacity var(--fade-duration) ease;
  transition-delay: calc(var(--i) * var(--fade-step));
}
@media (prefers-reduced-motion: reduce) {
  .group.is-fading .cell { opacity: 1; transition: none; }
}

.cell__frame {
  position: relative;
  width: calc(var(--u) * var(--w));
  height: calc(var(--u) * var(--h));
  background: #f5f5f5;
  overflow: hidden;
}
.cell__frame.is-clickable { cursor: pointer; }

.cell__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.cell__img.is-hidden { visibility: hidden; }

.cell__counter {
  font-family: var(--font-mono);
  font-size: var(--counter-size);
  line-height: 16px;
  height: 16px;
  opacity: 0.3;
}

.screen--single {
  display: flex;
  align-items: center;
  justify-content: center;
}
.single__img {
  display: block;
  height: calc(var(--u) * var(--h));
  width: auto;
  max-width: calc(100vw - 2 * var(--edge-x));
  object-fit: contain;
}

/* ---------- подписи ---------- */

.caption {
  position: absolute;
  left: var(--caption-left);
  bottom: var(--edge-y);
  max-width: var(--caption-width);
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  z-index: 1;
}
.caption__sub { opacity: 0.3; }

.caption--blend { color: #fff; mix-blend-mode: exclusion; }
.caption--dark { color: #000; }

/* ---------- info ---------- */

.info {
  min-height: var(--screen-h);
  display: flex;
  flex-direction: column;
  padding: min(388px, 48vh) var(--edge-x) var(--edge-y) var(--caption-left);
}
.info__col { width: 482px; max-width: 100%; }
.info p { margin: 0; }
.info p + p { margin-top: var(--paragraph-gap); }
.dim { opacity: 0.3; }

.info__email { display: inline-block; margin-bottom: 45px; }
.info__bio {
  font-size: 24px;
  line-height: 28px;
  color: rgba(0, 0, 0, 0.3);
  margin-bottom: 70px;
}
.info__label { font: inherit; margin-bottom: 35px; }

.clients { list-style: none; display: flex; flex-direction: column; gap: 30px; }
/* логотипы серые, как в макете; при наведении — фирменный цвет */
.clients img {
  display: block;
  width: 80px;
  height: auto;
  filter: grayscale(1);
  transition: filter 400ms ease;
}
.clients img:hover { filter: grayscale(0); }

.info__links {
  display: grid;
  grid-template-columns: 92px 92px auto;
  justify-content: start;
  gap: 5px;
  margin-top: auto;
  padding-top: 100px;
}
.info__links a { opacity: 0.3; }
.info__links a:hover { opacity: 1; }

/* ---------- курсор ---------- */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--cursor-size);
  height: var(--cursor-size);
  background: #fff;
  mix-blend-mode: exclusion;
  pointer-events: none;
  z-index: 100;
  opacity: 0;
}
.cursor.is-visible { opacity: 1; }
.has-cursor, .has-cursor * { cursor: none !important; }

/* ---------- телефон ---------- */

@media (max-width: 700px) {
  html { scroll-snap-type: none; } /* на телефоне без доводки к экранам */

  :root {
    --u: min(100vw / 375, var(--screen-h) / 680);
    --text-size: 9px;
    --counter-size: 9px;
    --edge-x: 16px;
    --edge-y: 10px;
    --caption-left: calc(50% + 2.5px);
    --caption-width: 112px;
  }

  .brand { flex-direction: row; white-space: normal; }
  .brand .name { width: 52px; }
  .role--desktop { display: none; }
  .role--mobile { display: block; }

  .single__img {
    width: 100%;
    height: auto;
    max-width: none;
    max-height: 100%;
  }

  .info { padding: min(350px, 45vh) var(--edge-x) var(--edge-y); }
  .info__col { width: 100%; }
  .info__indent { padding-left: calc(50% + 2.5px); }
  .info__email { display: block; margin-bottom: 25px; }
  .info__bio { margin-bottom: 75px; }
  .info__label { margin-bottom: 25px; }

  .info__links {
    grid-template-columns: repeat(3, 53px);
    padding-top: 75px;
  }
}
