:root {
  color-scheme: dark;
  --bg: #101010;
  --panel: #171717;
  --panel-2: #1c1c1c;
  --text: #f5f5f3;
  --muted: #aaa9a5;
  --line: rgba(255, 255, 255, 0.08);
  --radius-lg: 18px;
  --radius-md: 14px;
  --page: min(1280px, calc(100vw - 48px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #0d0d0d;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body.is-loading {
  overflow: hidden;
}

body.is-loading > header,
body.is-loading > main,
body.is-loading > footer {
  visibility: hidden;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100dvh;
  background: #000;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 500ms ease,
    visibility 500ms ease;
}
.preloader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.preloader__animation {
  display: block;
  width: min(300px, 60vw);
  height: auto;
  object-fit: contain;
}

.preloader__progress {
  color: rgba(255, 255, 255, 0.65);
  font-size: 13px;
  letter-spacing: 0.08em;
}
a {
  color: inherit;
  text-decoration: none;
}

img,
video {
  display: block;
  width: 100%;
}

.site-header {
  width: var(--page);
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-logo {
  display: inline-flex;
  align-items: baseline;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.mini-logo span {
  display: inline-block;
  animation: logo-wave 3.2s ease-in-out infinite;
  animation-delay: calc(var(--i) * 65ms);
  transform-origin: 50% 100%;
}

.mini-logo:hover span {
  animation-duration: 0.8s;
}

.social-pill,
.service-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
}

.social-pill {
  padding: 10px 14px;
  color: #d1d1ce;
  font-size: 13px;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.social-pill:hover {
  color: white;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.section-shell {
  width: var(--page);
  margin-inline: auto;
}

.hero {
  padding-top: 10px;
}

.hero-kicker {
  margin: 0;
  max-width: 520px;
  font-size: clamp(22px, 2.25vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 400;
}

.service-tags {
  display: flex;
  gap: 8px;
  margin-top: clamp(160px, 22vh, 330px);
  margin-bottom: 14px;
}

.service-tags span {
  padding: 8px 17px;
  font-size: 13px;
  color: #d7d7d4;
}

.hero-logo {
  display: flex;
  margin: 0 0 28px;
  overflow: hidden;
  font-size: clamp(94px, 17.2vw, 224px);
  line-height: 0.78;
  letter-spacing: -0.085em;
  font-weight: 900;
  white-space: nowrap;
}

.hero-logo span {
  display: block;
  animation: logo-enter 900ms cubic-bezier(.16,.75,.2,1) both;
}

.hero-logo span:nth-child(2) { animation-delay: 55ms; }
.hero-logo span:nth-child(3) { animation-delay: 110ms; }
.hero-logo span:nth-child(4) { animation-delay: 165ms; }
.hero-logo span:nth-child(5) { animation-delay: 220ms; }
.hero-logo span:nth-child(6) { animation-delay: 275ms; }
.hero-logo span:nth-child(7) { animation-delay: 330ms; }

.hero-logo-video {
  width: 100%;
  aspect-ratio: 24 / 5;
  margin: 0 0 28px;
  overflow: hidden;
  background: #101010;
}

.hero-logo-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 780px) {
  :root {
    --page: calc(100vw - 28px);
    --radius-lg: 12px;
    --radius-md: 10px;
  }

  .hero-logo-video {
    margin-bottom: 16px;
  }
}

.hero-media {
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #222;
}

.hero-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: none;
  transition: none;
}



.projects {
  padding-top: 34px;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: row;
  gap: 22px;
  align-items: start;
}

.project-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--panel);
  isolation: isolate;
  cursor: pointer;
}

.project-card::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.68), transparent 34%);
  opacity: 0;
  transition: opacity 240ms ease;
  pointer-events: none;
}

.project-media {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: var(--panel);
}

.project-poster,
.project-video {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  transition:
    opacity 220ms ease,
    transform 500ms cubic-bezier(.2,.7,.2,1),
    filter 500ms ease;
}

.hero-logo-image {
  width: 100%;
  margin: 0 0 28px;
  overflow: hidden;
}

.hero-logo-image img {
  display: block;
  width: 100%;
  height: auto;
}

.project-video {
  opacity: 0;
  pointer-events: none;
}

.project-card.is-playing .project-video {
  opacity: 1;
}

.project-card.is-playing .project-poster {
  opacity: 0;
}

.project-card:hover .project-poster,
.project-card:hover .project-video,
.project-card:focus-visible .project-poster,
.project-card:focus-visible .project-video {
  transform: scale(1.025);
  filter: brightness(.84);
}

.project-card:hover::after,
.project-card:focus-visible::after {
  opacity: 1;
}

.project-meta {
  position: absolute;
  z-index: 2;
  left: 22px;
  right: 22px;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

.project-meta b {
  font-size: 15px;
}

.project-meta small {
  color: #d0cfca;
  text-align: right;
}

.project-card:hover .project-meta,
.project-card:focus-visible .project-meta {
  opacity: 1;
  transform: translateY(0);
}

.project-card--watch,
.project-card--device,
.project-card--keyboard-dark,
.project-card--keyboard-light,
.project-card--inti {
  aspect-ratio: 1 / 1;
}

.project-card--city {
  aspect-ratio: .95 / 1;
}

.project-card--car {
  aspect-ratio: 2.08 / 1;
}

.studio-copy {
  min-height: 190px;
  padding: 10px 20px 20px 0;
  display: flex;
  align-items: flex-start;
  font-size: clamp(18px, 1.65vw, 25px);
  line-height: 1.38;
  color: #e2e1de;
}

.project-card--device {
  margin-top: 0px;
}

.contact-cta {
  min-height: 76px;
  display: grid;
  place-items: center;
  align-self: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: clamp(22px, 2vw, 31px);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.contact-cta:hover {
  background: white;
  border-color: white;
  color: #101010;
  transform: translateY(-2px);
}
.studio-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));

  margin-top: 110px;
  margin-bottom: 40px;

  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat-item {
  min-width: 0;
  min-height: 190px;

  padding: 26px 30px 28px 0;

  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.stat-item + .stat-item {
  padding-left: 30px;
  border-left: 1px solid var(--line);
}

.stat-value {
  font-size: clamp(52px, 6vw, 92px);
  line-height: 0.9;

  font-weight: 700;
  letter-spacing: -0.06em;

  color: var(--text);
}

.stat-value--text {
  font-size: clamp(32px, 4vw, 62px);
}

.stat-label {
  margin-top: 36px;

  font-size: 13px;
  line-height: 1.35;

  color: var(--muted);
}
.clients {
  padding-top: 96px;
  padding-bottom: 78px;
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  gap: clamp(42px, 7vw, 110px);
  align-items: start;
}

.clients-heading {
  padding-top: 4px;
}

.clients-heading span {
  color: var(--muted);
  font-size: 13px;
}

.clients-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(28px, 3vw, 46px);
  line-height: .98;
  letter-spacing: -0.045em;
}

/* Логотипы находятся справа от заголовка.
   Каждый файл по-прежнему можно независимо заменить в assets/clients/. */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.client-logo {
  min-width: 0;
  min-height: 118px;
  padding: 25px clamp(18px, 3vw, 42px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* Тонкие разделители только между строками логотипов — без рамок вокруг сетки. */
.client-logo:nth-child(n + 4) {
  border-top: 1px solid var(--line);
}

.client-logo img {
  width: 100%;
  max-width: 190px;
  height: 68px;
  object-fit: contain;
  filter: grayscale(1);
  opacity: .94;
  transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease;
}

.client-logo:hover img {
  opacity: 1;
  filter: grayscale(0);
  transform: scale(1.035);
}

.site-footer {
  padding: 0 0 18px;
}

.footer-inner {
  position: relative;
  width: var(--page);
  min-height: 264px;
  margin: 0 auto;
  padding: 26px 34px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 0;
  overflow: hidden;
  background: #1b1b1b;
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: none;
}

.footer-inner::after {
  content: none;
}

.footer-contact,
.footer-logo {
  position: relative;
  z-index: 1;
}

.footer-contact {
  min-width: 0;
  padding: 0 18px;
}

.footer-contact:first-child {
  padding-left: 0;
}

.footer-contact + .footer-contact {
  border-left: 1px solid var(--line);
}

.footer-contact small {
  display: block;
  margin-bottom: 5px;
  color: #a8a8a5;
}

.footer-contact a {
  font-weight: 700;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-logo {
  position: absolute;
  right: 34px;
  bottom: 22px;

  width: clamp(260px, 24vw, 380px);
  height: auto;
}

.footer-logo img {
  display: block;
  width: 100%;
  height: auto;
}

@keyframes logo-wave {
  0%, 68%, 100% { transform: translateY(0) scaleY(1); }
  76% { transform: translateY(-4px) scaleY(1.07); }
  84% { transform: translateY(0) scaleY(.96); }
}

@keyframes logo-enter {
  from {
    transform: translateY(115%) rotate(4deg);
    opacity: 0;
  }
  to {
    transform: translateY(0) rotate(0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .project-video {
    display: none;
  }
}

@media (max-width: 780px) {

  .studio-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    width: var(--page);

    margin-top: 70px;
    margin-bottom: 20px;

    border-top: 1px solid var(--line);
    border-bottom: 0;
  }

  .stat-item {
    min-width: 0;
    min-height: 145px;

    padding: 20px 16px 20px 0;

    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .stat-item + .stat-item {
    padding-left: 16px;
    border-left: 1px solid var(--line);
  }

  /* Первый элемент второго ряда */
  .stat-item:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .stat-value {
    font-size: clamp(38px, 11vw, 58px);
    line-height: .9;
  }

  .stat-value--text {
    font-size: clamp(24px, 7vw, 36px);
    line-height: .95;

    white-space: normal;
    overflow-wrap: normal;
  }

  .stat-label {
    margin-top: 22px;

    font-size: 11px;
    line-height: 1.35;
  }

  .site-header {
    height: 62px;
  }

  .hero-kicker {
    font-size: 18px;
  }

  .service-tags {
    margin-top: 110px;
  }

  .service-tags span {
    padding: 7px 14px;
    font-size: 11px;
  }

  .hero-logo {
    margin-bottom: 16px;
    font-size: 25vw;
  }

  .hero-media {
    aspect-ratio: 1.75 / 1;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .studio-copy {
    min-height: auto;
    padding: 20px 6px 26px;
    font-size: 16px;
  }

  .project-card--device {
    margin-top: 0;
  }

  .project-card--car {
    aspect-ratio: 1.65 / 1;
  }

  .project-meta {
    opacity: 1;
    transform: none;
    left: 14px;
    right: 14px;
    bottom: 12px;
  }

  .project-card::after {
    opacity: .58;
  }

  .contact-cta {
    min-height: 64px;
    font-size: 20px;
  }

  .clients {
    padding-top: 66px;
    padding-bottom: 62px;
    grid-template-columns: 1fr;
    gap: 30px;
  }

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

  .client-logo {
    min-height: 104px;
    padding: 20px;
  }

  .client-logo:nth-child(n + 4) {
    border-top: 0;
  }

  .client-logo:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .client-logo img {
    height: 56px;
  }

  .footer-inner {
    width: var(--page);
    min-height: 350px;
    padding: 30px 24px;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-contact,
  .footer-contact:first-child {
    padding: 0;
  }

  .footer-contact + .footer-contact {
    padding-top: 14px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .footer-logo {
  right: 24px;
  bottom: 28px;
  width: 220px;
}
}

/* Particle logo base */
.hero-logo-image.hero-logo-particles {
  position: relative;
  width: 100%;
  margin: 0 0 28px;
  overflow: visible;
}

.hero-logo-particles .hero-logo-source {
  display: block;
  width: 100%;
  height: auto;
}

.hero-logo-particles .hero-logo-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
