@font-face {
  font-family: "MontHeavy";
  src: url("Fonts/mont_heavydemo.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #f2f3f5;
  --muted: rgba(242, 243, 245, 0.52);
  --line: rgba(255, 255, 255, 0.28);

  /* Accent */
  --accent: #845CFF;
  --accentText: #ffffff;

  --pad: clamp(20px, 2.5vw, 28px);
  --max: 1180px;

  --font: "Montserrat", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { height: 100%; }

body {
  position: relative;
  margin: 0;
  font-family: var(--font);
  font-size: 120%;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.35;
}

/* Fixed pattern layer */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("data/svg/pattern.svg") center / auto repeat;
  opacity: 0.10;
  pointer-events: none;
  z-index: 0;
}

/* Keep content above pattern */
header.header,
main,
footer.footer {
  position: relative;
  z-index: 1;
}

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

.media__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }

.skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip:focus {
  left: var(--pad);
  top: var(--pad);
  width: auto;
  height: auto;
  z-index: 999;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* Layout */
.container {
  width: min(var(--max), calc(100% - var(--pad) * 2));
  margin-inline: auto;
}

.section {
  padding: clamp(42px, 7vw, 96px) 0;
}

.h2 {
  margin: 0 0 10px;
  font-size: clamp(35px, 4.7vw, 53px);
  letter-spacing: -0.02em;
}

.muted { color: var(--muted); }
.accent { color: var(--accent); }
.strong { font-weight: 700; }

/* Placeholder hint text */
.placeholder { position: relative; }

.placeholder::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}

/* Typography accents */
.brand,
.hero__title,
.h2,
.workCard__title,
.person__name,
.footer__title,
.quote__name {
  font-family: "MontHeavy", var(--font);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 12px 20px;
  border-radius: 999px;

  background: var(--accent);
  color: var(--accentText);

  cursor: pointer;
  white-space: nowrap;
  font-size: 16px;
  line-height: 1;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary { background: var(--accent); color: var(--accentText); }
.btn--ghost { background: var(--accent); color: var(--accentText); }

.btn--cta {
  padding: 24px 26px;
  font-size: 20px;
}

@media (max-width: 520px) {
  .btn--cta { padding: 20px 22px; }
  .btn:not(.btn--cta) { padding: 9px 14px; font-size: 15px; }
}

.link {
  opacity: 0.9;
  color: rgba(242, 243, 245, 0.92);
}

.link:hover { opacity: 1; text-decoration: underline; }

/* Header */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: transparent;
}

.header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}

.brand { white-space: nowrap; font-size: 24px; }

.nav {
  display: none;
  gap: 16px;
  align-items: center;
}

.nav__link {
  padding: 8px 10px;
  border-radius: 12px;
  opacity: 0.9;
}

.nav__link:hover { opacity: 1; }

.header__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Hero */
.hero { padding: 0; position: relative; }

.hero__photo {
  position: relative;
  width: 100vw;
  height: min(88vh, 550px);
  margin-left: calc(50% - 50vw);
  overflow: visible;
  isolation: isolate;
}

/* Hero cards carousel (Lottie) */
.hero__cards {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.hero__cardsHitbox{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 35%;
  height: 70%;
  z-index: 5;
  background: transparent;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
}

.hero__card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(40vmin, 440px);
  height: min(40vmin, 440px);
  transform: translate(-50%, -50%);
  will-change: transform, opacity, filter;
}

.hero__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data/photo/Rectangle_card.png") center / contain no-repeat;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}

.hero__card > .hero__lottie {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80%;
  height: 80%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 3;
  padding-top: 18px;
  padding-bottom: 18px;
}

.hero__title {
  font-size: clamp(43px, 7.8vw, 84px);
  letter-spacing: -0.03em;
  line-height: 1.02;
  margin: 0;
}

.hero__cta { margin-top: 16px; }

/* Lead text blocks around showreel */
.hero__before { padding-top: 60px; padding-bottom: 60px; }
.hero__after  { padding-top: 60px; }

.leadText {
  margin: 0;
  font-size: 32px;
  line-height: 1.3;
}

.leadText p { margin: 0; }
.leadText p + p { margin-top: 12px; }

/* Showreel */
.hero__showreel { margin-top: 24px; }

.hero__right { position: relative; }

.media { background: transparent; }

.media--hero {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  aspect-ratio: 16 / 9;
  border-radius: 0;

  /* cap height + crop */
  max-height: 70vh;
  overflow: hidden;
}

.media--video {
  display: block;
  background: transparent;
  position: relative;
}

.showreelPreview,
.showreelMain {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.showreelHidden { display: none !important; }

.playBtn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--accent);
  color: var(--accentText);
  padding: 20px 0px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  cursor: pointer;
  font-size: 20px;
  width: 50%;
}

.showreelControls {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  width: min(920px, calc(100% - 28px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  backdrop-filter: blur(10px);
  opacity: 1;
  transition: opacity 180ms ease;
}

.showreelControls.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.showreelControls.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.srBtn {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: var(--accent);
  color: var(--accentText);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  padding: 0;
  line-height: 0;
}

.srBtn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.srBtn:hover { transform: translateY(-1px); }

.srRange {
  flex: 1;
  accent-color: var(--accent);
  height: 4px;
}

.srTime {
  font-size: 14px;
  opacity: 0.9;
  white-space: nowrap;
}

@media (max-width: 520px) {
  .showreelControls {
    width: calc(100% - 20px);
    gap: 8px;
    padding: 8px 10px;
  }
  .srBtn { width: 40px; height: 40px; }
  .srTime { font-size: 12px; }
}

/* Marquee */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 16px;
  white-space: nowrap;
  margin-bottom: 16px;
}

.marquee .chip {
  padding: 16px 16px;
  font-size: 22px;
  border: 0;
}

.chip--btn { cursor: pointer; }
.chip--btn:hover { border-color: rgba(255, 255, 255, 0.45); }

.chip--btn.is-active {
  background: var(--accent);
  color: var(--accentText);
}

.marquee {
  overflow: hidden;
  padding: 14px 0;
}

.marquee__track {
  display: inline-flex;
  gap: 14px;
  align-items: center;
  white-space: nowrap;
  will-change: transform;
  animation: marquee-rtl 28s linear infinite;
}

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

/* Logo marquee */
.logoChip {
  height: 64px;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.logoChip__img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: contain;
  opacity: 0.95;
}

.logoMarquee .chip.logoChip{
  height: 100px;
  padding: 10px 18px;
  min-width: 140px;
  margin-bottom: 0;
}

@media (max-width: 520px) {
  .logoChip { height: 54px; padding: 10px 14px; }
}

/* Work */
.workGrid { display: grid; gap: 40px; }
.workCard { background: transparent; }

.media--card { width: 100%; aspect-ratio: 16 / 10; }

.media--p1 { background: url("data/photo/Label-1.png") center / cover no-repeat; }
.media--p2 { background: url("data/photo/Label-2.png") center / cover no-repeat; }
.media--p3 { background: url("data/photo/Label-3.png") center / cover no-repeat; }
.media--p4 { background: url("data/photo/Label-4.png") center / cover no-repeat; }
.media--p5 { background: url("data/photo/Label-5.png") center / cover no-repeat; }
.media--p6 { background: url("data/photo/Label-6.png") center / cover no-repeat; }

.workCard__meta { padding: 14px 0; }

.workCard__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.workCard__title { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.workCard__client { opacity: 0.7; white-space: nowrap; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.tag {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  font-size: 13px;
  opacity: 0.9;
}

.moreLink { margin-top: 22px; display: flex; justify-content: center; }

/* Team */
.teamGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.person { border: 0; padding: 0; background: transparent;}

.media--avatar {
  width: 100%;
  aspect-ratio: 3 / 4;
  margin-bottom: 20px;
  border-radius: 18px;
  overflow: hidden;

  /* cap height + crop */
  max-height: 520px;
}

.person__name { margin: 0 0 6px; }
.person__role { margin: 0 0 6px; opacity: 0.9; font-size: 14px; }
.person__note { margin: 0; font-size: 14px; line-height: 1.45; }

/* Testimonials */
.section--testimonials { background: var(--accent); }

.testimonials {
  display: grid;
  gap: 40px;
}

.quote { border: 0; padding: 0; background: transparent; }
.quote__text { margin: 0 0 14px; font-size: 19px; }
.quote__by { display: flex; align-items: center; gap: 12px; }
.media--mini { width: 44px; height: 44px; border-radius: 999px; overflow: hidden; }
.quote__name { font-weight: 600; font-size: 14px; line-height: 1.2; }
.quote__by .muted { font-size: 14px; line-height: 1.2; opacity: 0.9; }

/* Contact */
.contact { display: grid; gap: 30px; }

.contact__top { display: grid; gap: 14px; }
.contact__filters { display: grid; gap: 14px; }
.filter__label { margin-bottom: 8px; opacity: 0.85; }

.form {
  border: 0;
  padding: 0;
  background: transparent;
  display: grid;
  gap: 20px;
}

.form__grid {
  display: grid;
  gap: 20px;
}

.field { display: grid; gap: 20px; }

.field__input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  border-radius: 0;
  padding: 10px 0;
  outline: none;
}

.field__input:focus { border-bottom-color: var(--accent); }

.field__input--ta {
  resize: none;
  overflow: hidden;
  min-height: 0;
  height: auto;
}

.field__input::placeholder,
.field__input--ta::placeholder {
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.02em;
  opacity: 0.65;
}

.field--full { grid-column: 1 / -1; }

.form__actions {
  display: flex;
  justify-content: center;
}

.form__actions .btn--cta { margin-top: 40px; }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.footer__title { margin-bottom: 10px; font-size: 30px; }

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Responsive */
@media (min-width: 860px) {
  .nav { display: flex; }
  .workGrid { grid-template-columns: repeat(3, 1fr); }
  .testimonials { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
  .form__grid { grid-template-columns: 1fr 1fr; }
}

/* Project modal (full screen) */
body.modalOpen { overflow: hidden; }

.projectModal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
}

.projectModal.is-open { display: block; }

.projectModal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.projectModal__panel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: auto;
  background: var(--bg);
}

/* fixed overlay back button */
.projectModal__top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  display: flex;
  justify-content: flex-start;
  padding: 14px var(--pad);
  background: transparent;
  pointer-events: none;
}

.projectModal__backBtn {
  pointer-events: auto;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  backdrop-filter: blur(10px);

  color: var(--accentText);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.projectModal__cover {
  width: 100%;
}

.projectModal__coverImg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
}

.projectModal__body {
  padding: 40px var(--pad) 40px;
}

.projectModal__title {
  margin: 0 0 10px;
  font-size: clamp(30px, 5vw, 56px);
  letter-spacing: -0.02em;
}

.projectModal__subtitle {
  margin: 0 0 22px;
  font-size: 20px;
  line-height: 1.35;
}

.projectModal__tags {
  margin: 0 0 18px;
}

.projectModal__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.projectAnim {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
  aspect-ratio: 1 / 1;
}

.projectAnim__lottie {
  width: 100%;
  height: 100%;
}

/* Work card preview button */
.workCard__open {
  border: 0;
  cursor: pointer;
  padding: 0;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn:hover { transform: none; }
  .marquee__track { animation: none; }
}

/* Wave animation for the word "анимации" */
.waveWord {
  display: inline-block;
  white-space: nowrap;
}

.waveChar {
  display: inline-block;
  will-change: transform;
  animation: waveJump 5s ease-in-out infinite;
  animation-delay: calc(var(--i) * 0.06s);
}

@keyframes waveJump {
  0%, 84% { transform: translateY(0); }
  86% { transform: translateY(-10px); }
  90% { transform: translateY(0); }
  100% { transform: translateY(0); }
}

/* Inline Lottie as “custom emoji” */
.inlineLottie {
  width: 1.05em;
  height: 1.05em;
  vertical-align: -0.15em;
}

.inlineLottie--big {
  width: 1.2em;
  height: 1.2em;
  vertical-align: -0.18em;
}

/* Agreement checkbox */
.agree {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.9;
  font-size: 16px;
}

.agree__cb {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.agree__text {
  line-height: 1.2;
}