/* ==========================================================================
   Интер Студия — styles
   ========================================================================== */

@font-face {
  font-family: "Exo 2";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/exo2-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Exo 2";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/exo2-latin.woff2") format("woff2");
  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 {
  --accent: #6c6ef7;
  --accent-hi: #8587ff;
  --ink: #0b0b10;
  --paper: #ffffff;
  --card: #f0f0f0;
  --card-dark: #2a2a2a;
  --night: #05060d;
  --muted: #7b7b82;
  --muted-light: #a9a9b3;
  --line: rgba(255, 255, 255, .16);

  --radius: 32px;
  --radius-sm: 22px;
  --gutter: clamp(16px, 3.6vw, 70px);
  --max: 1780px;
  --section: clamp(72px, 10vw, 140px);

  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 7' shape-rendering='crispEdges' fill='%23fff'%3E%3Crect x='0' y='3' width='9' height='1'/%3E%3Crect x='4' y='0' width='1' height='1'/%3E%3Crect x='5' y='1' width='1' height='1'/%3E%3Crect x='6' y='2' width='1' height='1'/%3E%3Crect x='7' y='2' width='1' height='3'/%3E%3Crect x='6' y='4' width='1' height='1'/%3E%3Crect x='5' y='5' width='1' height='1'/%3E%3Crect x='4' y='6' width='1' height='1'/%3E%3C/svg%3E");
  --play: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 8' shape-rendering='crispEdges' fill='%23fff'%3E%3Crect x='0' y='0' width='2' height='8'/%3E%3Crect x='2' y='1' width='1' height='6'/%3E%3Crect x='3' y='2' width='1' height='4'/%3E%3Crect x='4' y='3' width='1' height='2'/%3E%3C/svg%3E");
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Exo 2", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

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

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section); position: relative; }
.section--dark { background: var(--night); color: #fff; }
.section--follow { padding-top: calc(var(--section) * .45); }

.eyebrow {
  font-size: clamp(20px, 1.6vw, 30px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1.2;
}

.muted { color: var(--muted); }
.show-sm { display: none; }

/* ---------- Pixel canvas ---------- */

.pixels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--night);
}

/* ---------- Round arrow & buttons ---------- */

.arrow {
  --size: 56px;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: var(--accent);
  transition: background-color .25s, transform .25s;
}
.arrow::before {
  content: "";
  width: 50%;
  height: 40%;
  background: var(--arrow) center / contain no-repeat;
  image-rendering: pixelated;
}
.arrow--down::before { transform: rotate(90deg); }
.arrow--play::before { background-image: var(--play); width: 30%; height: 40%; margin-left: 8%; }
.arrow--sm { --size: 44px; }

a:hover > .arrow, button:hover > .arrow, .arrow:hover { background: var(--accent-hi); transform: translateX(3px); }
a:hover > .arrow--down { transform: translateY(3px); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 10px 10px 10px 30px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 20px;
  border: 0;
  cursor: pointer;
}
.pill--accent { background: var(--accent); color: #fff; }
.pill--accent .arrow { background: rgba(255, 255, 255, .18); }

.tag {
  display: inline-block;
  padding: .45em 1.4em;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 999px;
  font-size: clamp(17px, 1.7vw, 32px);
  line-height: 1.3;
  backdrop-filter: blur(2px);
}

/* ---------- Header ---------- */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  color: #fff;
  transition: background-color .3s, backdrop-filter .3s;
}
.header.is-scrolled,
.case-page .header {
  background: rgba(5, 6, 13, .72);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 80px;
}
.header__nav {
  display: flex;
  gap: clamp(16px, 2vw, 36px);
  margin-left: auto;
  font-size: 17px;
}
.header__nav a { opacity: .8; transition: opacity .2s; }
.header__nav a:hover { opacity: 1; }
.header__cta { padding: 6px 6px 6px 22px; font-size: 17px; gap: 12px; }
.header__cta .arrow { --size: 36px; }

.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: 22px;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo svg { width: 44px; height: 44px; flex: none; }
.logo--lg { font-size: clamp(24px, 2.6vw, 50px); gap: clamp(12px, 1.4vw, 26px); }
.logo--lg svg { width: clamp(48px, 4vw, 78px); height: auto; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.hero .pixels { z-index: -1; }
.hero__inner {
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding-top: clamp(120px, 14vh, 180px);
  padding-bottom: clamp(28px, 6vh, 70px);
}
.hero__title {
  font-size: clamp(42px, 5.6vw, 108px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.005em;
  max-width: 12em;
}
.hero__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.hero__tags { display: flex; flex-wrap: wrap; gap: 14px 20px; max-width: 820px; }
.hero__year { font-size: clamp(28px, 2.6vw, 50px); line-height: 1; }
.hero__hint {
  margin-top: 24px;
  font-size: 15px;
  color: rgba(255, 255, 255, .55);
}

/* ---------- About ---------- */

.about {
  overflow: hidden;
  isolation: isolate;
  min-height: min(1080px, 100svh);
  display: flex;
  align-items: center;
}
.about__photo {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(62%, 1100px);
  z-index: -1;
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 30% center; }
.about__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--night) 0%, rgba(5, 6, 13, 0) 40%),
              linear-gradient(0deg, var(--night) 0%, rgba(5, 6, 13, 0) 25%);
}
.about .eyebrow { margin-bottom: clamp(40px, 6vw, 72px); }

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
  max-width: 800px;
}
.bento > * {
  border-radius: var(--radius);
  padding: clamp(24px, 2.4vw, 34px);
  min-height: clamp(220px, 20vw, 300px);
}
.bento h3 {
  font-size: clamp(28px, 2.3vw, 40px);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1em;
}
.bento p { font-size: clamp(17px, 1.25vw, 21px); line-height: 1.3; }
.bento__since { grid-column: span 4; background: var(--accent); color: #fff; }
.bento__since p { color: rgba(255, 255, 255, .62); }
.bento__start { grid-column: span 8; background: var(--card); color: var(--ink); }
.bento__approach { grid-column: span 7; background: var(--card); color: var(--ink); }
.bento__start p, .bento__approach p { color: var(--muted); }
.bento__what {
  grid-column: span 5;
  background: var(--card-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  transition: background-color .25s;
}
.bento__what p { font-size: clamp(18px, 1.35vw, 22px); }
.bento__what .arrow { align-self: flex-end; }
.bento__what:hover { background: #333340; }

/* ---------- Section head (solutions etc.) ---------- */

.head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 2fr);
  gap: 24px 40px;
  align-items: start;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.head__lead { font-size: clamp(18px, 1.3vw, 22px); line-height: 1.32; }
.note {
  display: flex;
  align-items: center;
  gap: 20px;
  justify-content: space-between;
  padding: 20px 20px 20px 34px;
  border-radius: 999px;
  background: var(--card-dark);
  color: var(--muted-light);
  font-size: clamp(16px, 1.2vw, 21px);
  line-height: 1.3;
  transition: background-color .25s;
}
.note:hover { background: #333340; }

/* ---------- Solutions ---------- */

.solutions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 26px 24px;
}
.solution {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  isolation: isolate;
}
.solution__img {
  aspect-ratio: 310 / 340;
  overflow: hidden;
  margin-bottom: -44px;
}
.solution__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.solution:hover .solution__img img { transform: scale(1.06); }
.solution__body {
  position: relative;
  flex: 1;
  background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 26px clamp(20px, 2.5vw, 48px) 36px;
}
.solution__num { font-size: clamp(20px, 1.5vw, 28px); margin-bottom: clamp(28px, 3.4vw, 64px); }
.solution h3 {
  font-size: clamp(22px, 1.6vw, 30px);
  font-weight: 400;
  line-height: 1.12;
  margin-bottom: 18px;
}
.solution p { font-size: 16px; line-height: 1.3; color: var(--muted); }

/* ---------- Process ---------- */

.process {
  color: var(--ink);
  overflow: hidden;
  isolation: isolate;
}
.process .pixels { z-index: -1; }
.process .eyebrow { color: #fff; margin-bottom: clamp(48px, 8vw, 140px); }
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px) clamp(24px, 1.8vw, 32px);
  max-width: 1580px;
  margin-inline: auto;
  counter-reset: step;
}
.step {
  position: relative;
  min-height: clamp(240px, 17vw, 316px);
  padding: clamp(24px, 2vw, 34px);
  border-radius: var(--radius);
  background: var(--card);
  counter-increment: step;
}
.step::before {
  content: "0" counter(step);
  position: absolute;
  right: 12%;
  bottom: 18px;
  font-size: clamp(110px, 9vw, 168px);
  font-weight: 300;
  line-height: .8;
  color: #dedede;
  pointer-events: none;
}
.step h3 {
  position: relative;
  font-size: clamp(22px, 1.6vw, 28px);
  font-weight: 400;
  line-height: 1.12;
  margin-bottom: 18px;
}
.step p { position: relative; font-size: 16px; line-height: 1.2; color: var(--muted); max-width: 16em; }
.step > .arrow {
  position: absolute;
  right: calc(var(--size) / -2 - 2px);
  top: 50%;
  margin-top: calc(var(--size) / -2);
  z-index: 2;
  --size: 66px;
  pointer-events: none;
}
.step--next {
  background: var(--card-dark);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  transition: background-color .25s;
}
.step--next::before { content: none; }
.step--next p { color: #fff; font-size: clamp(20px, 1.5vw, 26px); max-width: 17em; }
.step--next .arrow { align-self: flex-end; --size: 60px; }
.step--next:hover { background: #333340; }

/* ---------- Formats ---------- */

.formats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px;
  margin-top: clamp(40px, 6vw, 84px);
}
.format {
  position: relative;
  border-radius: 48px;
  overflow: hidden;
  isolation: isolate;
  padding-top: 78px;
  background: var(--night);
}
.format .pixels { height: 130px; bottom: auto; }
.format__body {
  position: relative;
  background: var(--card);
  border-radius: 48px 48px 0 0;
  padding: 36px clamp(24px, 2.6vw, 50px) 50px;
  min-height: 330px;
}
.format__num { color: var(--muted); font-size: 22px; margin-bottom: clamp(48px, 5vw, 92px); }
.format h3 { font-size: clamp(26px, 1.85vw, 34px); font-weight: 400; line-height: 1.1; margin-bottom: 20px; }
.format p { color: var(--muted); font-size: clamp(18px, 1.3vw, 22px); line-height: 1.32; }

.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 1px minmax(0, 1.5fr);
  gap: 40px;
  margin-top: 34px;
  padding: clamp(36px, 3.4vw, 64px);
  border-radius: 48px;
  background: #000;
  color: #fff;
}
.principle .arrow { margin-bottom: clamp(32px, 3.4vw, 64px); }
.principle h3 { font-size: clamp(20px, 1.35vw, 24px); font-weight: 400; line-height: 1.25; margin-bottom: 20px; }
.principle p { color: #8d8d94; font-size: 16px; line-height: 1.38; }
.principles__rule { background: rgba(255, 255, 255, .5); }
.principles__quote { font-size: clamp(22px, 1.65vw, 30px); line-height: 1.25; }

/* ---------- Clients ---------- */

.clients {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 40px;
}
.clients__text p { margin-top: clamp(40px, 4vw, 70px); font-size: clamp(18px, 1.3vw, 22px); line-height: 1.35; max-width: 26em; }
.logos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
}
.logos li {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: clamp(130px, 12vw, 230px);
  padding: 16px;
}
.logos img {
  max-height: 96px;
  width: auto;
  opacity: .88;
  transition: opacity .25s, transform .25s;
}
.logos li:hover img { opacity: 1; transform: scale(1.04); }

/* ---------- Cases ---------- */

.cases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  margin-top: clamp(40px, 6vw, 100px);
}
.case-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  isolation: isolate;
}
.case-card__img { aspect-ratio: 570 / 430; overflow: hidden; margin-bottom: -40px; }
.case-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.case-card:hover .case-card__img img { transform: scale(1.05); }
.case-card__body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 36px clamp(24px, 2.6vw, 50px) 30px;
  min-height: 330px;
}
.case-card__num { color: var(--muted); font-size: 22px; margin-bottom: clamp(32px, 2.6vw, 48px); }
.case-card h3 { font-size: clamp(26px, 1.85vw, 34px); font-weight: 400; line-height: 1.08; margin-bottom: 12px; }
.case-card__meta { font-size: 15px; }
.case-card .arrow { margin-top: auto; align-self: flex-end; }

/* ---------- Contacts / footer ---------- */

.contacts {
  position: relative;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.contacts .pixels { z-index: -1; }
.contacts__inner {
  min-height: min(100svh, 1080px);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  gap: 40px;
  padding-block: clamp(80px, 9vw, 120px) clamp(32px, 4vw, 64px);
}
.contacts__title { font-size: clamp(38px, 5.6vw, 108px); font-weight: 400; line-height: 1.02; max-width: 12em; }
.contacts__inner .logo--lg { align-self: start; }
.contacts__links {
  grid-column: 1 / -1;
  align-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .3em;
  font-size: clamp(26px, 2.7vw, 50px);
  line-height: 1.15;
}
.contacts__links a { border-bottom: 1px solid transparent; transition: border-color .2s; }
.contacts__links a:hover { border-color: rgba(255, 255, 255, .7); }
.contacts__cta { font-size: clamp(22px, 2.3vw, 44px); line-height: 1.15; }
.contacts__year { font-size: clamp(28px, 2.6vw, 50px); align-self: end; justify-self: end; line-height: 1; }
.copyright { font-size: 14px; color: rgba(255, 255, 255, .45); grid-column: 1 / -1; }

/* ---------- Case page ---------- */

.case {
  display: grid;
  grid-template-columns: minmax(0, 700fr) minmax(0, 1220fr);
  min-height: 100svh;
}
.case__aside {
  position: relative;
  color: #fff;
  background: #111;
  border-radius: 0 var(--radius) var(--radius) 0;
  overflow: hidden;
  isolation: isolate;
}
.case__aside-inner {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 120px clamp(24px, 3.6vw, 70px) 48px;
}
.case__bg { position: absolute; inset: 0; z-index: -1; }
.case__bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05) brightness(.62); }
.case__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .65) 0%, rgba(0, 0, 0, .15) 45%, rgba(0, 0, 0, .55) 100%);
}
.case__title { font-size: clamp(26px, 2.2vw, 40px); font-weight: 400; text-transform: uppercase; line-height: 1.1; }
.case__meta { color: rgba(255, 255, 255, .6); margin-top: 8px; font-size: 18px; }
.case__aside .pill { margin-top: clamp(32px, 4vw, 64px); align-self: flex-start; font-size: 22px; padding-left: 32px; }
.case__source { margin-top: auto; padding-top: 40px; font-size: 14px; color: rgba(255, 255, 255, .6); }
.case__back {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(28px, 4vw, 48px);
  font-size: 16px;
  color: rgba(255, 255, 255, .7);
  transition: color .2s;
}
.case__back:hover { color: #fff; }
.case__back .arrow { --size: 34px; transform: scaleX(-1); }
.case__back:hover .arrow { transform: scaleX(-1) translateX(3px); }

.case__main { padding: clamp(40px, 5vw, 80px) clamp(16px, 3.6vw, 70px) var(--section) clamp(16px, 3.3vw, 64px); }
.case__intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(24px, 3.4vw, 64px);
  align-items: start;
  padding-top: 40px;
}
.case__lead { font-size: clamp(19px, 1.3vw, 23px); line-height: 1.32; }
.case__note {
  position: relative;
  border-radius: 40px;
  background: var(--card);
  padding: 34px 90px 34px 36px;
  font-size: clamp(17px, 1.2vw, 21px);
  line-height: 1.28;
}
.case__note .arrow { position: absolute; right: 30px; bottom: 30px; --size: 46px; }
.case__note small { display: block; color: var(--muted); font-size: 16px; margin-bottom: 12px; }
.case__note li { position: relative; padding-left: 22px; }
.case__note li::before { content: ""; position: absolute; left: 4px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 1.9vw, 36px);
  margin-top: clamp(40px, 4.4vw, 72px);
}
.gallery figure { margin: 0; border-radius: 40px; overflow: hidden; background: var(--card); }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 338 / 652; cursor: zoom-in; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.gallery figure:hover img { transform: scale(1.04); }
.gallery--bento { grid-template-columns: minmax(0, 468fr) minmax(0, 584fr); grid-template-rows: auto auto; }
.gallery--bento figure:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; }
.gallery--bento figure:nth-child(-n + 2) img { aspect-ratio: 468 / 312; }
.gallery--bento figure:nth-child(3) img { aspect-ratio: auto; }

.more-cases { margin-top: var(--section); }
.more-cases .eyebrow { margin-bottom: 32px; }
.more-cases .cases { margin-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Dialogs (video / lightbox) ---------- */

.modal {
  width: min(1200px, 100vw - 32px);
  max-height: calc(100svh - 32px);
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: #000;
  color: #fff;
  overflow: visible;
}
.modal::backdrop { background: rgba(3, 4, 10, .86); backdrop-filter: blur(6px); }
.modal__frame { aspect-ratio: 16 / 9; border-radius: inherit; overflow: hidden; }
.modal__frame iframe, .modal__frame video { width: 100%; height: 100%; border: 0; display: block; }
.modal--image { width: auto; max-width: calc(100vw - 32px); background: transparent; }
.modal--image img { max-height: calc(100svh - 32px); width: auto; border-radius: var(--radius-sm); }
.modal__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Reveal on scroll ---------- */

.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1280px) {
  .header__nav { display: none; }
  .header__cta { margin-left: auto; }
  .head { grid-template-columns: 1fr 1fr; }
  .head .note { grid-column: 1 / -1; }
  .solutions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .principles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .principles__rule { display: none; }
  .principles__quote { grid-column: 1 / -1; padding-top: 32px; border-top: 1px solid rgba(255, 255, 255, .3); }
  .case { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
  .case__intro { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .about { display: block; }
  .about__photo { position: relative; width: auto; height: 60vw; margin: -40px calc(var(--gutter) * -1) 0; }
  .about__photo::after { background: linear-gradient(180deg, var(--night) 0%, rgba(5, 6, 13, 0) 30%, rgba(5, 6, 13, 0) 70%, var(--night) 100%); }
  .about .container { position: relative; }
  .bento { max-width: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step > .arrow { display: none; }
  .formats { grid-template-columns: 1fr; gap: 20px; }
  .format__body { min-height: 0; }
  .format__num { margin-bottom: 32px; }
  .clients { grid-template-columns: 1fr; }
  .cases { grid-template-columns: 1fr 1fr; }
  .case { grid-template-columns: 1fr; }
  .case__aside { border-radius: 0 0 var(--radius) var(--radius); }
  .case__aside-inner { position: relative; min-height: 70svh; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  :root { --radius: 26px; }
  .header__inner { height: 64px; }
  .logo { font-size: 18px; gap: 10px; }
  .logo svg { width: 36px; height: 36px; }
  .header__cta { font-size: 15px; padding-left: 16px; }
  .hide-sm { display: none; }
  .show-sm { display: inline; }
  .header__cta .arrow { --size: 32px; }
  .hero__bottom { flex-direction: column; align-items: stretch; }
  .hero__tags { gap: 10px; }
  .hero__year { align-self: flex-end; }
  .hero__hint { display: none; }

  .bento { grid-template-columns: 1fr; gap: 14px; }
  .bento > * { grid-column: auto; min-height: 0; }
  .bento h3 { margin-bottom: .6em; }

  .head { grid-template-columns: 1fr; }
  .note { border-radius: var(--radius); padding: 20px 20px 20px 24px; }

  /* horizontal swipe row on phones */
  .solutions {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
    gap: 14px;
    scrollbar-width: none;
  }
  .solutions::-webkit-scrollbar { display: none; }
  .solution { scroll-snap-align: start; }
  .solution__num { margin-bottom: 24px; }

  .steps { grid-template-columns: 1fr; gap: 14px; }
  .step { min-height: 200px; }
  .step::before { font-size: 110px; right: 20px; }

  .format { border-radius: var(--radius); padding-top: 56px; }
  .format__body { border-radius: var(--radius) var(--radius) 0 0; padding-bottom: 36px; }
  .principles { grid-template-columns: 1fr; border-radius: var(--radius); gap: 32px; }
  .principle .arrow { margin-bottom: 20px; --size: 48px; }

  .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logos li { min-height: 120px; }
  .logos img { max-height: 70px; }

  .cases, .more-cases .cases { grid-template-columns: 1fr; gap: 16px; }
  .case-card__body { min-height: 260px; }

  .contacts__inner { grid-template-columns: 1fr; }
  .contacts__inner .logo--lg { order: -1; }
  .contacts__links { font-size: 24px; }
  .contacts__links a { overflow-wrap: anywhere; }

  .case__aside-inner { padding-top: 96px; min-height: 60svh; }
  .case__note { border-radius: var(--radius); padding: 26px 24px 80px; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery figure { border-radius: var(--radius-sm); }
  .gallery figure:nth-child(3):not(.gallery--bento *) { grid-column: 1 / -1; }
  .gallery figure:nth-child(3):not(.gallery--bento *) img { aspect-ratio: 4 / 5; }
  .gallery--bento { grid-template-columns: 1fr 1fr; }
  .gallery--bento figure:nth-child(3) { grid-column: 1 / -1; grid-row: auto; }
  .gallery--bento figure:nth-child(3) img { aspect-ratio: 4 / 4.4; }
  .modal__close { top: 8px; right: 8px; }
}
