/* ==========================================================================
   Local fonts: Instrument Sans (regular, bold), Instrument Serif (regular)
   Place .woff2 files in assets/fonts/ — see assets/fonts/README.md
   ========================================================================== */

.u-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.u-has-brackets::before { content: "[ "; }
.u-has-brackets::after { content: " ]"; }

@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/instrument-sans-regular.woff2") format("woff2"),
       url("../assets/fonts/instrument-sans-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/instrument-sans-bold.woff2") format("woff2"),
       url("../assets/fonts/instrument-sans-bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("../assets/fonts/instrument-serif-regular.woff2") format("woff2"),
       url("../assets/fonts/instrument-serif-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   CSS Custom Properties (design tokens)
   ========================================================================== */

:root {
  /* Font families */
  --font-sans: "Instrument Sans", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;

  /* Spacing scale (rem) */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;

  /* Typography base */
  --text-base: 16px;
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* Colors (placeholders — заменить на финальную палитру) */
  --color-text: #1a1a1a;
  --color-text-muted: #666;
  --color-bg: #fff;
  --color-accent: #2563eb;
  --color-border: #e5e7eb;
  --Basic-Coral: #ff5151;
}

/* Base: apply font and minimum readable size */
html {
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  position: relative;
}

/* Overlay для затемнения контента при hover на footer */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-color: #1a1a1a;
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms linear;
  z-index: 50;
}

body.is-footer-hovered::before {
  opacity: 0.5;
}

.l-site {
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* ==========================================================================
   Keyboard focus — global a11y baseline
   Visible only on keyboard nav (:focus-visible), invisible on mouse click.
   Uses --color-accent so it inherits brand palette.
   ========================================================================== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   Hero section (Figma: My Case — Hero, node 247-3883) — pixel perfect @ 1440px
   ========================================================================== */

/* Ровно один экран по высоте: 100dvh (исключает UI браузера на мобилке), fallback 100vh */
.l-section-hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  padding: 0 0 1.5rem;
  background-color: #ffffff;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

/* Шапка сайта: залипает при скролле, на всю ширину контейнера */
.l-section-hero__nav.l-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  padding: 1.5rem 1.5rem 0;
  box-sizing: border-box;
}

.l-section-hero__nav nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Вся левая область — одна ссылка на главную */
.l-section-hero__nav-left {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0.75rem 0;
  margin: 0;
  min-width: 0;
  text-decoration: none;
  color: #7b7b7b;
  box-sizing: border-box;
}

.l-section-hero__nav-left:hover {
  color: #1a1a1a;
}

.l-section-hero__logo {
  display: block;
  line-height: 0;
}

.l-section-hero__logo img {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.l-section-hero__name,
.c-button--text {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #7b7b7b;
  text-decoration: none;
  mix-blend-mode: difference;
}

.l-section-hero__name {
  min-width: 0;
}

.c-button--text:hover {
  color: #1a1a1a;
}

.l-section-hero__nav-right {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.5rem;
  margin-left: auto;
}

@media (max-width: 27.4375rem) { /* <440px */
  .l-section-hero__nav-right {
    gap: 0.5rem; /* 8px */
  }
}

@media (max-width: 23.4375rem) { /* <376px */
  .l-section-hero__nav-right .c-button--text:first-child {
    display: none;
  }
}

@media (max-width: 26.875rem) { /* 430px и менее */
  .l-section-hero__nav.l-header {
    padding-top: 0.5rem;
  }
}

/* Тач-цели не менее ~44px на мобилке (frontend-stack) */
@media (max-width: 47.9375rem) {
  .l-section-hero__nav .l-section-hero__nav-left {
    min-height: 2.75rem;
    padding-top: 0.875rem;
    padding-bottom: 0.875rem;
  }

  .l-section-hero__nav .c-button--text {
    min-height: 2.75rem;
    padding: 0.875rem 1rem;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 44.9375rem) { /* <720px */
  .l-section-hero__nav.l-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .l-section-hero__nav .l-section-hero__nav-left {
    padding-left: 0;
    padding-right: 0;
  }

  .l-section-hero__nav .c-button--text {
    padding-left: 0;
    padding-right: 0;
  }
}

.l-section-hero__content {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  justify-content: center;
  gap: clamp(0.75rem, 5dvh, 5rem);
  padding: 0 1rem;
  box-sizing: border-box;
  overflow: hidden;
}

.l-section-hero__title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  overflow: visible;
  gap: 0;
}

.l-section-hero__title-wrap {
  position: relative;
  z-index: 1;
  max-width: 100%;
  top: -2px;
}

.l-section-hero__title {
  font-family: var(--font-serif);
  font-weight: 400;
  /* Fluid: 48px @ ≤430 → 96px @ ≥1024 (anchors match prior breakpoints) */
  font-size: clamp(3rem, 8vw + 0.83rem, 6rem);
  line-height: 1.2;
  color: #ff5151;
  /* -0.292em = baseline overlap, scales with font-size automatically */
  margin: 0 0 -0.292em;
  text-align: left;
  position: relative;
  z-index: 1;
}

/* Плашка на весь экран: full-bleed */
.l-section-hero__play-bar {
  position: relative;
  z-index: 0;
  align-self: stretch;
  width: auto;
  margin-left: -1rem;
  margin-right: -1rem;
  /* -1px перекрывает sub-pixel rounding gap при fluid font-size заголовка */
  margin-top: -1px;
  min-height: clamp(4rem, 12dvh, 7.125rem);
  background-color: #d4d4d4;
  background-image: url('../assets/img/reel2-pingpong.gif');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: none;
  padding: 1rem 0;
  cursor: pointer;
  font: inherit;
}

.l-section-hero__play-bar:hover {
  background-color: transparent;
}

@media (max-width: 64rem) {
  .l-section-hero__title-wrap {
    max-width: 35rem;   /* 560px */
  }
}

@media (max-width: 48rem) {
  .l-section-hero__title-wrap {
    max-width: 30rem;   /* 480px */
  }
  /* font-size & margin handled by clamp() + em above */
}

@media (max-width: 26.875rem) {
  .l-section-hero__title-wrap {
    max-width: 17.5rem;   /* 280px */
  }
  /* font-size & margin handled by clamp() + em above */
}

.c-button--play__text {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(2rem, 3.4375vw, 3.4375rem);
  line-height: 1.3;
  letter-spacing: 0.14545em;
  color: #ffffff;
  pointer-events: none;
}

.l-section-hero__bio-row {
  display: flex;
  justify-content: flex-end;
  gap: 0.875rem;
  align-items: flex-end;
  align-self: stretch;
  box-sizing: border-box;
}

/* ≥1024px: bio начинается строго от центра секции и не растягивается дальше */
@media (min-width: 64rem) {
  .l-section-hero__bio-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    justify-content: initial;
  }

  .l-section-hero__bio {
    grid-column: 2;
  }
}

.l-section-hero__scroll {
  position: fixed;
  left: 1.5rem;
  bottom: 1.5rem;
  z-index: 50;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #1a1a1a;
  margin: 0;
  pointer-events: none;
  opacity: 1;
  transition: opacity 1s ease;
}

.l-section-hero__scroll.is-hidden {
  opacity: 0;
}

@media (max-width: 44.9375rem) { /* <720px — как у хидера */
  .l-section-hero__scroll {
    left: 1rem;
  }
}

@media (max-width: 26.875rem) { /* <430px — как у хидера (padding-top: 0.5rem) */
  .l-section-hero__scroll {
    bottom: 0.5rem;
  }
}

.l-section-hero__bio {
  max-width: 31.25rem; /* 500px */
  display: flex;
  flex-direction: column;
  gap: 0.4375rem;
  box-sizing: border-box;
}

.l-section-hero__description {
  max-width: 31.25rem; /* 500px */
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.5;
  margin: 0;
}

.l-section-hero__description [data-hero-word] {
  display: inline-block;
  color: #e8e8e8;
}

.l-section-hero__description [data-hero-word].is-active {
  color: #1a1a1a;
}

@media (max-width: 26.875rem) { /* 430px и менее: bio-row вертикально, сначала bio, затем scroll, оба во всю ширину */
  .l-section-hero__bio-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.875rem;
  }

  .l-section-hero__bio {
    order: 1;
    width: 100%;
    max-width: none;
  }

  .l-section-hero__scroll {
    order: 2;
    width: 100%;
    margin-top: 1rem;
  }
}

@media (max-width: 48rem) { /* 768px и менее: title-block по центру, bio-row внизу, без absolute */
  .l-section-hero__content {
    justify-content: flex-start;
    gap: clamp(1rem, 4vh, 2.5rem);
  }

  .l-section-hero__title-block {
    flex: 1 1 0;
    min-height: 0;
    max-height: clamp(9rem, 25vh, 11.5rem); /* cap growth ~3x smaller than the old ~33rem/531px balloon — was filling leftover vh, pushing empty space above title */
    justify-content: flex-start;
  }

  .l-section-hero__bio-row {
    flex-shrink: 0;
    min-height: 0;
    overflow: auto;
  }
}

/* ==========================================================================
   Section: We Work With (Figma: section - clients, node 2893-2992)
   Бегущая строка справа налево
   ========================================================================== */

.l-section-clients {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  gap: 1.5rem;
  padding: 1.5rem 1rem;
  box-sizing: border-box;
  background-color: #ffffff;
}

.l-section-clients__header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: stretch;
}

.l-section-clients__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #7b7b7b;
  margin: 0;
}

.l-section-clients__marquee-wrap {
  overflow: hidden;
  width: calc(100% + 2rem);
  margin-left: -1rem;
  margin-right: -1rem;
  padding: 2.5rem 0;
}

@media (max-width: 44.9375rem) { /* <720px */
  .l-section-clients__marquee-wrap {
    padding: 0;
  }
}

.l-section-clients__marquee-track {
  display: flex;
  flex-shrink: 0;
  width: max-content;
  height: 7.5rem; /* 120px */
  gap: 4.375rem;
  align-items: center;
  animation: clients-marquee 40s linear infinite;
}

@media (max-width: 44.9375rem) { /* <720px */
  .l-section-clients__marquee-track {
    gap: 2.625rem; /* 42px — scales down from 70px */
  }
}

@media (prefers-reduced-motion: reduce) {
  .l-section-clients__marquee-track {
    animation: none;
  }
}

.l-section-clients__marquee-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  height: 7.5rem;
}

.l-section-clients__marquee-img {
  display: block;
  height: 7.5rem;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

/* Один цикл = ширина одной копии при height:120px (2515×120/128≈2355px) + gap 70px */
@keyframes clients-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-2425px);
  }
}

/* ==========================================================================
   Модальное окно видео (заглушка)
   ========================================================================== */

.c-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
}

.c-modal.is-hidden {
  visibility: hidden;
  pointer-events: none;
}

.c-modal:not(.is-hidden) {
  visibility: visible;
  pointer-events: auto;
}

.c-modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  cursor: pointer;
}

.c-modal__box {
  position: relative;
  width: 100%;
  max-width: 56.25rem; /* 900px */
  max-height: 90vh;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 3rem 1.5rem 1.5rem;
  box-sizing: border-box;
}

.c-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  background: none;
  font-size: 1.75rem;
  line-height: 1;
  color: #1a1a1a;
  cursor: pointer;
}

.c-modal__close:hover {
  color: #7b7b7b;
}

/* Видео-модалка: фулскрин, embed на весь экран, крестик поверх */
.c-modal--video {
  padding: 0;
}

.c-modal--video .c-modal__video-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
  background-color: #000;
}

.c-modal--video .c-modal__video-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.c-modal__close--overlay {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 201;
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  font-size: 1.5rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.c-modal__close--overlay:hover {
  background-color: rgba(255, 255, 255, 0.9);
  color: #1a1a1a;
}

.c-modal__video-wrap {
  aspect-ratio: 16 / 9;
  background-color: #d4d4d4;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.c-modal__placeholder {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: #7b7b7b;
}

/* Модалка формы заявки: выезд снизу по оси Y */
.c-modal--cta {
  align-items: flex-end;
  padding: 0;
}

.c-modal--cta .c-modal__backdrop--cta {
  background-color: rgba(26, 26, 26, 0.5);
  transition: opacity 0.3s ease;
}

.c-modal--cta.is-hidden .c-modal__backdrop--cta {
  opacity: 0;
}

.c-modal--cta:not(.is-hidden) .c-modal__backdrop--cta {
  opacity: 1;
}

.c-modal__cta-box {
  position: relative;
  width: 100%;
  max-width: 36rem;
  max-height: 90vh;
  margin: 0 1rem;
  padding: 2rem 1rem 2.5rem;
  background-color: #ffffff;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  transform: translateY(100%);
  transition: transform 0.35s ease-out;
  overflow-y: auto;
  z-index: 2;
}

.c-modal--cta:not(.is-hidden) .c-modal__cta-box {
  transform: translateY(0);
}

.c-modal--cta .c-modal__close {
  top: 1rem;
  right: 1rem;
}

.c-modal__cta-header {
  margin-bottom: 2.5rem; /* 40px */
}

@media (max-width: 26.875rem) { /* <430px */
  .c-modal__cta-header {
    margin-bottom: 1.5rem; /* 24px */
  }
}

.c-modal__cta-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #7b7b7b;
  margin: 0;
}

.c-cta-form__tabs {
  display: flex;
  justify-content: space-between;
  gap: 0;
  flex-shrink: 0;
  width: 100%;
}

.c-cta-form__tab {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--Basic-Coral, #ff5151);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.c-cta-form__tab.is-active {
  color: #7b7b7b;
}

.c-cta-form__tab:not(.is-active):hover {
  color: #1a1a1a;
}

/* Форма заявки */
.c-cta-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (max-width: 26.875rem) { /* <430px */
  .c-cta-form {
    gap: 1rem; /* 16px */
  }
}

.c-cta-form__field {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Honeypot: visually and assistive-tech hidden, still submittable so bots fill it */
.c-cta-form__honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.c-cta-form__label {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #7b7b7b;
  margin-bottom: 0.375rem;
}

.c-cta-form__input {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: #1a1a1a;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 0;
  background-color: #f0f0f0;
  box-sizing: border-box;
  width: 100%;
  max-width: 33.75rem;
  min-height: 2.75rem;
}

.c-cta-form__input::placeholder {
  color: #a3a3a3;
}

.c-cta-form__input:hover {
  background-color: #ebebeb;
}

.c-cta-form__input:focus {
  outline: none;
  background-color: #ebebeb;
}

.c-cta-form__textarea {
  min-height: 6rem;
  resize: vertical;
}

.c-cta-form__submit {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #ffffff;
  background-color: var(--Basic-Coral, #ff5151);
  border: none;
  border-radius: 0;
  padding: 1rem 1.5rem;
  min-height: 2.75rem;
  cursor: pointer;
  margin-top: 0.25rem;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.c-cta-form__submit:hover {
  background-color: #e64848;
}

.c-cta-form__submit:active {
  opacity: 0.9;
}

.c-cta-form__consent {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.4;
  color: #7b7b7b;
}

.c-cta-form__consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  min-height: 2.75rem;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.c-cta-form__checkbox {
  margin-top: 0.2rem;
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--Basic-Coral, #ff5151);
  flex-shrink: 0;
}

.c-cta-form__error {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.3;
  color: var(--Basic-Coral, #ff5151);
  display: none;
  margin-top: 0;
}
.c-cta-form__error.is-visible {
  display: block;
}

.c-cta-form__link {
  color: var(--Basic-Coral, #ff5151);
  text-decoration: underline;
}
.c-cta-form__link:hover {
  text-decoration: none;
}

.c-cta-form.is-hidden {
  display: none;
}

.c-cta-form__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding: 2rem 0 1rem;
}
.c-cta-form__success.is-hidden {
  display: none;
}
.c-cta-form__success-icon {
  display: block;
  width: 6rem;
  height: 6rem;
  flex-shrink: 0;
  line-height: 0;
}
.c-cta-form__success-icon svg {
  width: 100%;
  height: 100%;
}
.c-cta-form__success-text {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  color: #1a1a1a;
  margin: 0;
}
.c-cta-form__success-meta {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.9375rem; /* 15px */
  line-height: 1.5;
  color: #7b7b7b;
  margin: 0;
  max-width: 24rem;
}
.c-cta-form__success-close {
  margin-top: 1rem;
  appearance: none;
  background: transparent;
  border: 1px solid #1a1a1a;
  color: #1a1a1a;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  padding: 0.875rem 2rem;
  min-height: 2.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.c-cta-form__success-close:hover {
  background-color: #1a1a1a;
  color: #ffffff;
}

/* ==========================================================================
   Section: Featured Projects (Figma: section - projects, node 2893-2374)
   Grid 2×2, карточки с фоновыми изображениями
   ========================================================================== */

.l-section-projects {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding: 1.5rem 1rem;
  box-sizing: border-box;
  background-color: #ffffff;
}

@media (max-width: 26.875rem) { /* <430px */
  .l-section-projects {
    padding: 1rem;
  }
}

.l-section-projects__header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
  padding-bottom: 1.5rem;
  box-sizing: border-box;
}

@media (max-width: 26.875rem) { /* <430px */
  .l-section-projects__header {
    padding-bottom: 1rem;
  }
}

.l-section-projects__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #7b7b7b;
  margin: 0;
}

.l-section-projects__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
  align-self: stretch;
}

@media (max-width: 28.0625rem) { /* 449px */
  .l-section-projects__grid {
    grid-template-columns: 1fr;
  }
}

.c-project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 1.5rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  text-decoration: none;
  box-sizing: border-box;
  aspect-ratio: 700 / 525;
  overflow: hidden;
}

.c-project-card:hover {
  opacity: 0.95;
}

.c-project-card--gradient::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(183deg, rgba(93, 142, 166, 0) 61%, rgba(93, 142, 166, 1) 100%);
  pointer-events: none;
}

.c-project-card--overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

/* Стрелка: по умолчанию 0% opacity, отступы 40px (2.5rem) сверху и справа; по hover — 100% opacity, отступы 16px */
.c-project-card__icon {
  position: absolute;
  top: 2.5rem;
  right: 2.5rem;
  display: block;
  width: 72px;
  height: 72px;
  opacity: 0;
  z-index: 1;
  transition: opacity 600ms ease-in-out, top 600ms ease-in-out, right 600ms ease-in-out;
}

.c-project-card:hover .c-project-card__icon {
  opacity: 1;
  top: 1rem;
  right: 1rem;
}

.c-project-card__caption {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.8125rem;
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 0.5rem 0;
  align-self: flex-start;
  text-align: left;
  z-index: 1;
}

.c-project-card__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0;
  align-self: flex-start;
  text-align: left;
  z-index: 1;
}

.c-project-card__title--long {
  max-width: 40.375rem; /* 646px */
}

/* ==========================================================================
   Section: Services (Figma: node 247-3437)
   4 блока с заголовками, картинками при hover и стрелками
   ========================================================================== */

.l-section-services {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding: 1.5rem 1rem;
  box-sizing: border-box;
  background-color: #ffffff;
}

@media (max-width: 26.875rem) { /* <430px */
  .l-section-services {
    gap: 1.5rem; /* 24px */
  }
}

.l-section-services__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #7b7b7b;
  margin: 0;
}

.l-section-services__list {
  list-style: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  padding: 2.5rem 0;
  box-sizing: border-box;
}

@media (max-width: 26.875rem) { /* <430px */
  .l-section-services__list {
    padding: 1.5rem 0; /* 24px */
  }
}

.c-service-item {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  align-self: stretch;
  min-height: 3.75rem; /* 60px, halved from 120px */
  padding: 0;
  border-bottom: 1px solid #d4d4d4;
  box-sizing: border-box;
  overflow: hidden;
}

.c-service-item--no-border {
  border-bottom: none;
}

.c-service-item__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(1rem, 2.25vw, 2.25rem); /* halved from clamp(2rem, 4.5vw, 4.5rem) to fit halved row height */
  line-height: 1.2;
  color: #1a1a1a;
  margin: 0;
  padding: 0.5rem;
  z-index: 1;
  transition: color 600ms ease-in-out;
}

.c-service-item.is-hover .c-service-item__title,
.c-service-item:hover .c-service-item__title {
  color: #d4d4d4;
}

.c-service-item.is-hover .c-service-item__title {
  transition-duration: 1200ms;
}

.c-service-item__arrow {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 36px; /* halved from 72px to fit halved row height */
  height: 36px;
  opacity: 0;
  transition: opacity 200ms ease-in-out;
  pointer-events: none;
  z-index: 2;
}

.c-service-item.is-hover .c-service-item__arrow,
.c-service-item:hover .c-service-item__arrow {
  opacity: 1;
}

.c-service-item.is-hover .c-service-item__arrow {
  transition-duration: 600ms;
}

.c-service-item__img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 3.25rem; /* fits inside item min-height 3.75rem, halved */
  width: 16.25rem; /* 260px */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 200ms ease-in-out;
  pointer-events: none;
  z-index: 2;
}

.c-service-item.is-hover .c-service-item__img,
.c-service-item:hover .c-service-item__img {
  opacity: 1;
}

.c-service-item.is-hover .c-service-item__img {
  transition-duration: 600ms;
}

@media (max-width: 26.875rem) { /* <430px */
  .c-project-card {
    padding: 1rem;
  }

  .c-service-item {
    justify-content: center;
  }

  .c-service-item__title {
    text-align: center;
    padding-left: 0;
    padding-right: 0;
  }

  .c-service-item__img,
  .c-service-item__arrow {
    display: none;
  }
}

/* ==========================================================================
   Section: About Me (Figma: About, node 247-3625)
   Фоновая фотография и текст с эффектом highlight
   ========================================================================== */

.l-section-about {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem 1rem;
  box-sizing: border-box;
  background-color: #ffffff;
  align-self: stretch;
}

@media (max-width: 26.875rem) { /* <430px */
  .l-section-about {
    gap: 1rem; /* 16px */
    padding: 1rem;
  }
}

.l-section-about__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #7b7b7b;
  margin: 0;
}

.l-section-about__content {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-self: stretch;
  gap: 0.5rem;
  padding: 2.5rem 1.5rem;
  box-sizing: border-box;
  min-height: 58.25rem; /* 932px */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

@media (max-width: 26.875rem) { /* <430px */
  .l-section-about__content {
    padding: 1.5rem 1rem; /* 24px/16px */
    background-position: 30% center; /* keep face in frame on narrow crops */
  }
}

.l-section-about__text-block {
  position: relative;
  width: 100%;
  max-width: 63.125rem; /* 1010px */
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box;
}

.l-section-about__text-inner {
  position: relative;
  width: 100%;
  transform: translateY(100%);
}

.l-section-about__text {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  line-height: 1.4;
  color: #ffffff;
  margin: 0;
}

.l-section-about__text--new-para {
  margin-top: 3rem;
}

@media (max-width: 26.875rem) { /* <430px */
  .l-section-about__text--new-para {
    margin-top: 2rem; /* 32px */
  }
}

.l-section-about__text [data-about-word] {
  display: inline-block;
  color: transparent;
}


/* ==========================================================================
   Section: How It Works (Figma: Section How It, node 71-35)
   4 карточки шагов с подготовкой под sticky-эффект
   ========================================================================== */

.l-section-how {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  gap: 1.5rem;
  padding: 1.5rem 1rem;
  box-sizing: border-box;
  background-color: #ffffff;
}

@media (max-width: 26.875rem) { /* <430px */
  .l-section-how {
    gap: 1rem; /* 16px */
    padding: 1rem;
  }
}

.l-section-how__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #a3a3a3;
  margin: 0;
}

.l-section-how__container {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.c-step-item {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 25rem) 1fr;
  align-self: stretch;
  gap: 2.625rem;
  padding: 5rem 0;
  box-sizing: border-box;
}

@media (max-width: 48rem) { /* 768px и менее */
  .c-step-item {
    grid-template-columns: 2.5rem 1fr;
    grid-template-areas:
      "number content"
      "description description";
    gap: 1.5rem;
    padding: 3rem 0;
  }

  .c-step-item__number {
    grid-area: number;
  }

  .c-step-item__content {
    grid-area: content;
  }

  .c-step-item__description {
    grid-area: description;
  }
}

.c-step-item--border {
  border-top: 1px solid #d4d4d4;
}

.c-step-item__number {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: #1a1a1a;
  opacity: 0.2;
  margin: 0;
}

.c-step-item__content {
  display: flex;
  flex-direction: row;
  justify-content: stretch;
  align-items: stretch;
  gap: 0.5rem;
  box-sizing: border-box;
  min-width: 0;
}

.c-step-item__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: #1a1a1a;
  margin: 0;
  flex: 1;
  min-width: 0;
}

.c-step-item__description {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.5rem;
  line-height: 1.5;
  color: #1a1a1a;
  opacity: 0.8;
  margin: 0;
  min-width: 0;
}

@media (max-width: 51.25rem) { /* 820px и менее */
  .c-step-item__description {
    font-size: 1.25rem; /* 20px */
  }
}

@media (max-width: 26.875rem) { /* 430px и менее */
  .c-step-item__description {
    font-size: 1rem; /* 16px */
  }
}

/* ==========================================================================
   Footer / CTA (Figma: section - footer, node 2893-3033) — pixel perfect
   Grid структура: 2.5rem | minmax(0, 25rem) | 1fr — идентично c-step-item
   ========================================================================== */

.l-section-footer {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 25rem) 1fr;
  grid-template-rows: auto 1fr;
  align-self: stretch;
  gap: 2.625rem;
  padding: 12.5rem 1rem 1.5rem;
  box-sizing: border-box;
  background-color: #ffffff;
  z-index: 100;
  overflow: visible;
}

.l-section-footer__label {
  grid-column: 1;
  grid-row: 1;
}

.l-section-footer__spacer {
  grid-column: 2;
  grid-row: 1 / -1;
}

.l-section-footer__col-main {
  grid-column: 3;
  grid-row: 1 / -1;
}

.l-section-footer__policies {
  grid-column: 1;
  grid-row: 2;
  align-self: end;
}

@media (max-width: 63.9375rem) { /* 1024px и менее */
  .l-section-footer {
    padding-top: 6.25rem; /* 100px */
  }
}



/* Левая колонка: 2.5rem, контент выходит за границы справа */
.l-section-footer__col-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch;
  box-sizing: border-box;
  overflow: visible;
  padding-top: 1.8rem;
}

.l-section-footer__label {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #a3a3a3;
  margin: 0;
  width: max-content;
  padding-top: 1.8rem;
}

.l-section-footer__policies {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  width: max-content;
}

/* Пустой spacer: minmax(0, 25rem) */
.l-section-footer__spacer {
  min-width: 0;
}

/* Центральный блок: 1fr */
.l-section-footer__col-main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2.9375rem;
  box-sizing: border-box;
  min-width: 0;
  overflow: visible;
}

/* Компонент CTA футера: заголовок слева, стрелка справа */
.c-footer-button {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
  overflow: hidden;
}

.c-footer-button__arrow {
  display: block;
  width: 100px;
  height: 100px;
  color: #1a1a1a;
  opacity: 0.2;
  transition: color 300ms linear, opacity 300ms linear;
}

.c-footer-button:hover .c-footer-button__arrow {
  color: var(--Basic-Coral, #ff5151);
  opacity: 1;
  transition-duration: 600ms;
}

.c-footer-button__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 4.5vw, 4.5rem);
  line-height: 1.2;
  color: #1a1a1a;
  opacity: 0.8;
  min-width: 0;
  max-width: 33.4375rem; /* 535px */
  margin: 0;
}

.c-footer-button__arrow-wrap {
  flex-shrink: 0;
  box-sizing: border-box;
  overflow: hidden;
}

/* Нижний ряд: коралловый блок слева, соцссылки справа, выравнивание по низу */
.l-section-footer__row-bottom {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  align-self: stretch;
  box-sizing: border-box;
  overflow: visible;
  gap: 2rem;
  position: relative;
}

/* Коралловый блок: скрыт при ≤768px */
.l-section-footer__coral {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 15rem;
  height: 6.4375rem;
  min-width: 15rem;
  min-height: 6.4375rem;
  margin-top: 1.5rem;
  margin-bottom: -1.5rem;
  padding-top: 2rem;
  background-color: var(--Basic-Coral, #ff5151);
  flex-shrink: 0;
  box-sizing: border-box;
  overflow: hidden;
  transition: background-color 150ms linear;
}


.l-section-footer__coral-logo {
  display: block;
  width: 12rem;
  height: auto;
  filter: brightness(0) invert(1);
}

.l-section-footer__col-main:has(.c-footer-button:hover) .l-section-footer__coral {
  background-color: #e8e8e8;
  transition-duration: 300ms;
}

.l-section-footer__social {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  flex-shrink: 0;
  width: max-content;
  mix-blend-mode: difference;
}

@media (max-width: 48rem) { /* 768px */
  .l-section-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .l-section-footer__label {
    order: 1;
    width: 100%;
    padding-top: 0;
  }

  .l-section-footer__col-main {
    order: 2;
    width: 100%;
    gap: 2rem; /* 32px, scaled down from 47px */
  }

  .l-section-footer__policies {
    order: 3;
    width: 100%;
    justify-content: space-between;
  }

  .l-section-footer__spacer {
    display: none;
  }

  .l-section-footer__row-bottom {
    width: 100%;
    gap: 1.25rem; /* 20px */
  }

  .l-section-footer__social {
    position: static;
    width: 100%;
    justify-content: space-between;
    gap: 0;
  }

  .l-section-footer__coral {
    display: none;
  }

  .c-footer-button__title {
    font-size: 2rem; /* 32px — clamp min (2.5rem/40px) wrapped "Let's make something" onto 2 lines by itself, pushing to 3 lines total */
  }
}

@media (max-width: 28.0625rem) { /* 449px */
  .l-section-footer {
    padding-top: 6.25rem; /* 100px */
  }

  .l-section-footer__social {
    flex-direction: column;
    align-items: stretch;
  }

  .c-footer-button__arrow-wrap {
    width: 5.5rem;
    height: 5.5rem;
  }

  .c-footer-button__arrow {
    width: 5.5rem;
    height: 5.5rem;
  }
}

.l-section-footer__policy-link {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #a3a3a3;
  text-decoration: none;
}

.l-section-footer__policy-link:hover {
  color: #1a1a1a;
}

.l-section-footer__social-link {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #5c5c5c;
  text-decoration: none;
}

.l-section-footer__social-link:hover {
  color: #e5e5e5;
}

/* GPU Acceleration for GSAP Animations */
/* Will be toggled dynamically by JS — prefer using JS to add/remove for performance */
[data-hero-word],
[data-about-word],
.c-step-item,
.c-service-item {
  will-change: transform, color;
}

/* ==========================================================================
   Legal page (privacy.html, terms etc.)
   ========================================================================== */

.l-legal {
  background-color: #ffffff;
  padding: 4rem 1.5rem 6rem;
  box-sizing: border-box;
}

.l-legal__article {
  max-width: 47.5rem; /* 760px */
  margin: 0 auto;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
}

.l-legal__article p,
.l-legal__article ul {
  margin: 0 0 1.25rem;
}

.l-legal__title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw + 0.5rem, 3rem);
  line-height: 1.2;
  color: var(--color-text);
  margin: 2rem 0 0.5rem;
}

.l-legal__meta {
  color: #7b7b7b;
  margin-bottom: 2.5rem;
}

.l-legal__h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--color-text);
  margin: 2rem 0 0.75rem;
}

.l-legal__list {
  padding-left: 1.25rem;
}

.l-legal__list li {
  margin: 0 0 0.35rem;
}

.l-legal__article a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.l-legal__article a:hover {
  color: #7b7b7b;
}

.l-legal__back a {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: #7b7b7b;
}

.l-legal__back a:hover {
  color: var(--color-text);
}

.l-legal__back--bottom {
  margin-top: 3rem;
}

@media (max-width: 44.9375rem) {
  .l-legal {
    padding: 3rem 1rem 4rem;
  }

  .l-legal__title {
    margin: 1.5rem 0 0.5rem; /* 24px */
  }

  .l-legal__meta {
    margin-bottom: 1.5rem; /* 24px */
  }

  .l-legal__h2 {
    margin: 1.5rem 0 0.75rem; /* 24px */
  }

  .l-legal__back--bottom {
    margin-top: 2rem; /* 32px */
  }
}