/* =========================================================
   Faev Design — стили сайта
   Цвета, шрифты и отступы — в блоке :root ниже
   ========================================================= */

:root {
    /* Акцентный цвет сайта. Оранжевый вариант: --accent #ff5a00, --accent-rgb 255, 90, 0,
       градиент подвала #d9b2a3 / #f59a2c / #e8611a, пятна #ffb13b / #f1a28a / #ff4d00 */
    --accent: #2952ff;
    --accent-rgb: 41, 82, 255;
    --ink: #0d0d0d;
    --white: #ffffff;
    --bg: #ffffff;
    --muted: #8a8a8a;
    --line: #e4e4e4;

    /* Градиент подвала и плавающие пятна в нём */
    --sunset-top: #7b90ff;
    --sunset-mid: #3358ff;
    --sunset-bottom: #1023d9;
    --blob-1: #4f6fff;
    --blob-2: #93a8ff;
    --blob-3: #0b1fe8;

    --font-display: 'Inter Tight', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    --gutter: clamp(16px, 2.2vw, 36px);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.45;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Плавный скролл (Lenis): пока он работает, встроенная плавность браузера отключается */
html.lenis,
html.lenis body {
    height: auto;
}

html.lenis {
    scroll-behavior: auto;
}

.lenis.lenis-stopped {
    overflow: clip;
}

body.is-locked {
    overflow: hidden;
}

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

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

.container {
    padding: 0 var(--gutter);
}

.section {
    padding: clamp(80px, 10vw, 160px) 0;
}

.muted {
    color: var(--muted);
}

.h2 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.2rem, 4.4vw, 4.6rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.label {
    display: inline-block;
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 20px;
}

.label--light {
    color: rgba(255, 255, 255, 0.75);
}

.arrow {
    font-style: normal;
    display: inline-block;
    transition: transform 0.4s var(--ease);
}

/* ---------- Кнопки ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    height: 56px;
    padding: 0 26px;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.3s, color 0.3s, border-color 0.3s, transform 0.3s var(--ease);
}

.btn:hover .arrow {
    transform: translate(3px, -3px);
}

.btn--outline {
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.85);
}

.btn--outline:hover {
    background: var(--white);
    color: var(--ink);
}

.btn--light {
    background: var(--white);
    color: var(--ink);
}

.btn--light:hover {
    background: var(--ink);
    color: var(--white);
}

.btn--dark {
    width: 100%;
    background: var(--ink);
    color: var(--white);
}

.btn--dark:hover {
    background: var(--accent);
}

.btn--dark:disabled {
    opacity: 0.6;
    cursor: wait;
}

.link-arrow {
    display: inline-flex;
    gap: 10px;
    font-size: 1.1rem;
}

.link-arrow:hover .arrow {
    transform: translate(3px, -3px);
}

/* =========================================================
   Прелоадер: чёрный экран со знаком и счётчиком,
   в конце сжимается в скруглённую рамку главного экрана
   ========================================================= */

.preloader {
    --frame: 18px;
    --frame-radius: 28px;
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    background: #000;
    color: var(--white);
    clip-path: inset(0 round 0);
    transition: clip-path 0.8s var(--ease), opacity 0.45s 0.35s;
}

/* Пока идёт прелоадер, страница не прокручивается */
html.is-preloading {
    overflow: hidden;
}

.preloader.is-done {
    clip-path: inset(var(--frame) round var(--frame-radius));
    opacity: 0;
    pointer-events: none;
}

.preloader__center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    transition: opacity 0.4s, transform 0.6s var(--ease);
}

.preloader.is-done .preloader__center {
    opacity: 0;
    transform: translateY(-20px) scale(0.96);
}

.preloader__mark {
    width: 64px;
    fill: var(--accent);
    animation: preMark 0.9s var(--ease) both;
}

@keyframes preMark {
    from { opacity: 0; transform: translateY(18px) rotate(-12deg) scale(0.7); }
    to   { opacity: 1; transform: none; }
}

.preloader__word {
    display: block;
    overflow: hidden;
    padding-bottom: 0.08em;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2rem, 4vw, 3.4rem);
    letter-spacing: -0.05em;
    line-height: 1;
}

.preloader__word > span {
    display: block;
    animation: preWord 0.9s 0.12s var(--ease) both;
}

.preloader__word sup {
    font-size: 0.4em;
    color: var(--accent);
}

@keyframes preWord {
    from { transform: translateY(110%); }
    to   { transform: none; }
}

.preloader__bottom {
    position: absolute;
    left: 40px;
    right: 40px;
    bottom: 34px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    transition: opacity 0.4s;
}

.preloader.is-done .preloader__bottom {
    opacity: 0;
}

.preloader__caption {
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.preloader__count {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(3rem, 7vw, 6.5rem);
    line-height: 0.8;
    letter-spacing: -0.06em;
    font-variant-numeric: tabular-nums;
}

.preloader__bar {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
}

/* =========================================================
   Шапка
   ========================================================= */

.header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    padding: 18px;
    pointer-events: none;
}

.header__bar {
    pointer-events: auto;
    border-radius: 22px;
    color: var(--white);
    transition: background 0.4s, backdrop-filter 0.4s, margin 0.5s var(--ease);
}

/* После главного экрана шапка превращается в тёмную «стеклянную» плашку */
.header.is-compact .header__bar,
.header__bar.is-open {
    background: rgba(14, 14, 14, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.header__row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 24px;
    padding: 12px 12px 12px 12px;
}

.header__left {
    display: flex;
    align-items: center;
    gap: 34px;
}

.header__burger {
    width: 56px;
    height: 50px;
    padding: 0;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 12px;
    background: #1d1d1d;
    transition: background 0.3s;
}

.header__burger:hover {
    background: #2a2a2a;
}

.header__burger span {
    width: 24px;
}

.header__bar.is-open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.header__bar.is-open .burger span:nth-child(2) { opacity: 0; }
.header__bar.is-open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.header__links {
    display: flex;
    gap: 28px;
    font-size: 1.1rem;
}

.header__links a {
    transition: color 0.3s;
}

.header__links a:hover {
    color: var(--accent);
}

.header__links sup {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: 10px;
    background: var(--accent);
    font-size: 0.7rem;
    vertical-align: 0.6em;
}

.header__logo {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 500;
    letter-spacing: -0.05em;
}

.header__logo sup {
    font-size: 0.45em;
    color: var(--accent);
}

.header__actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Переключатель языка RU / EN */
.lang {
    display: inline-flex;
    gap: 2px;
    height: 52px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
}

.lang button {
    min-width: 42px;
    padding: 0 8px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    transition: background 0.3s, color 0.3s;
}

.lang button:hover {
    color: var(--white);
}

.lang button.is-active {
    background: var(--white);
    color: var(--ink);
}

/* В меню переключатель показываем только на телефоне */
.lang--menu {
    display: none;
    align-self: flex-start;
    height: 44px;
    margin-top: 20px;
}

.btn-head {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 52px;
    padding: 0 20px;
    border-radius: 12px;
    font-size: 1.1rem;
    white-space: nowrap;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.btn-head--ghost {
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-head--ghost:hover {
    border-color: var(--white);
}

.btn-head--light {
    background: var(--white);
    color: var(--ink);
}

.btn-head--light:hover {
    background: var(--accent);
    color: var(--white);
}

.dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    transition: background 0.3s;
}

.btn-head--light:hover .dot {
    background: var(--white);
}

/* Выпадающее меню */
.header__menu {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.6s var(--ease);
}

.header__bar.is-open .header__menu {
    grid-template-rows: 1fr;
}

.header__inner {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-width: 640px;
    padding: 0 24px;
}

.header__bar.is-open .header__inner {
    padding-bottom: 28px;
}

.header__bar.is-open .menu-link {
    opacity: 1;
    transform: none;
}

.header__bar.is-open .menu-link:nth-child(2) { transition-delay: 0.05s; }
.header__bar.is-open .menu-link:nth-child(3) { transition-delay: 0.1s; }
.header__bar.is-open .menu-link:nth-child(4) { transition-delay: 0.15s; }
.header__bar.is-open .menu-link:nth-child(5) { transition-delay: 0.2s; }
.header__bar.is-open .menu-link:nth-child(6) { transition-delay: 0.25s; }

.burger {
    display: flex;
    flex-direction: column;
}

.burger span {
    display: block;
    height: 2px;
    background: currentColor;
    transition: transform 0.4s var(--ease), opacity 0.3s;
}

.menu-link {
    display: flex;
    align-items: baseline;
    gap: 18px;
    padding: 10px 0;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    letter-spacing: -0.04em;
    line-height: 1.05;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s, transform 0.6s var(--ease), color 0.3s;
}

.menu-link span {
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.5);
}

.menu-link:hover {
    color: var(--accent);
}

.menu-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
}

.menu-socials a:hover {
    color: var(--white);
}

/* =========================================================
   Главный экран
   ========================================================= */

.hero {
    padding: 18px;
    background: var(--bg);
}

.hero__card {
    position: relative;
    height: calc(100vh - 36px);
    height: calc(100svh - 36px);
    min-height: 620px;
    border-radius: 28px;
    overflow: hidden;
    background: #000;
    color: var(--white);
    isolation: isolate;
}

/* Огромное слово на фоне */
.hero__bgword {
    position: absolute;
    left: 50%;
    bottom: -0.2em;
    translate: -50% 0;
    z-index: -2;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 21vw;
    line-height: 1;
    letter-spacing: -0.07em;
    white-space: nowrap;
    color: #121212;
    will-change: transform;
}

/* Тёплый свет за фигурой */
.hero__glow {
    position: absolute;
    left: 50%;
    bottom: -20%;
    width: 70vmax;
    aspect-ratio: 1;
    translate: -50% 0;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.3), rgba(var(--accent-rgb), 0.09) 55%, rgba(var(--accent-rgb), 0));
    animation: glow 6s ease-in-out infinite alternate;
}

@keyframes glow {
    from { opacity: 0.7; transform: scale(0.95); }
    to   { opacity: 1;   transform: scale(1.05); }
}

.hero__title {
    position: relative;
    z-index: 1;
    padding-top: clamp(110px, 13vh, 150px);
    text-align: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(2.6rem, 6.6vw, 8rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.hero__accent {
    color: var(--accent);
}

.hero__title .mask:nth-child(2) > span {
    transition-delay: 0.12s;
}

/* Фото поверх заголовка */
.hero__person {
    position: absolute;
    left: 50%;
    bottom: 0;
    z-index: 2;
    height: 76%;
    aspect-ratio: 2 / 3;
    translate: -50% 0;
    will-change: transform;
}

.hero__person img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom center;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 9%), linear-gradient(to top, transparent 0%, #000 14%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent 0%, #000 9%), linear-gradient(to top, transparent 0%, #000 14%);
    mask-composite: intersect;
    filter: contrast(1.05) brightness(0.95);
    opacity: 0;
    transform: translateY(5%);
    transition: opacity 1.6s 0.2s var(--ease), transform 1.8s 0.2s var(--ease);
}

.is-loaded .hero__person img {
    opacity: 1;
    transform: none;
}

/* Нижняя линия с подписями */
.hero__bottom {
    position: absolute;
    left: 40px;
    right: 40px;
    bottom: 40px;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 34px;
}

.hero__line {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.18);
    transform: scaleX(0);
    transition: transform 1.6s 0.4s var(--ease);
}

.hero__line::before,
.hero__line::after {
    content: "";
    position: absolute;
    top: -1px;
    width: 80px;
    height: 3px;
    background: var(--accent);
}

.hero__line::before { left: 0; }
.hero__line::after  { right: 0; }

.is-loaded .hero__line {
    transform: none;
}

.hero__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 1.2rem;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.6);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 1s 0.7s, transform 1.2s 0.7s var(--ease);
}

.is-loaded .hero__info {
    opacity: 1;
    transform: none;
}

.hero__info strong {
    font-weight: 500;
    color: var(--white);
}

.hero__info--right {
    text-align: right;
}

.hero__label {
    margin-bottom: 10px;
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

/* Вращающийся бейдж */
.hero__badge {
    position: absolute;
    right: 9%;
    top: 56%;
    z-index: 3;
    width: clamp(150px, 14vw, 220px);
    aspect-ratio: 1;
    translate: -50% -50%;
    color: var(--white);
    will-change: transform;
}

.hero__badge svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.badge__text {
    fill: currentColor;
    font-family: var(--font-body);
    font-size: 10px;
    text-transform: uppercase;
    animation: spin 22s linear infinite;
}

.badge__dash circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 1;
    stroke-dasharray: 4 3;
}

.badge__dash {
    animation: spin 16s linear infinite reverse;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.badge__mark {
    width: 26% !important;
    height: 26% !important;
    inset: 37% !important;
    fill: var(--accent);
}

/* Маска для появления текста снизу */
.mask {
    display: block;
    overflow: hidden;
    padding-bottom: 0.08em;
}

.mask > span {
    display: block;
    transform: translateY(110%);
    transition: transform 1.2s var(--ease);
}

.is-loaded .mask > span {
    transform: none;
}

/* =========================================================
   Манифест + цифры
   ========================================================= */

.intro__text {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.9rem, 3.6vw, 4.1rem);
    line-height: 1.04;
    letter-spacing: -0.055em;
    text-indent: 25%;
    max-width: 1800px;
}

/* Слова текста «из дымки» — JS оборачивает каждое слово в .hw */
[data-haze] .hw {
    display: inline-block;
    text-indent: 0;
    opacity: 0.12;
    filter: blur(10px);
    will-change: opacity, filter;
}

.intro__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    margin-top: clamp(80px, 9vw, 140px);
}

.intro__col {
    display: flex;
    flex-direction: column;
    padding: 0 clamp(20px, 2.6vw, 50px);
    min-height: 520px;
}

.intro__col:first-child {
    padding-left: 0;
}

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

.intro__col h3 {
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    margin-bottom: 36px;
}

.intro__col .muted {
    max-width: 420px;
    font-size: 1.1rem;
    line-height: 1.2;
}

.square {
    width: 16px;
    height: 16px;
    background: var(--ink);
    margin: 6px 0 46px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 22px;
    margin: auto 0 60px;
    padding-top: 60px;
}

.stat__num {
    font-family: var(--font-display);
    font-size: clamp(4rem, 7.6vw, 9rem);
    font-weight: 500;
    line-height: 0.85;
    letter-spacing: -0.06em;
}

.stat__label {
    max-width: 130px;
    font-size: 1.05rem;
    line-height: 1.15;
}

.intro__copy {
    font-size: 1.1rem;
}

/* =========================================================
   В работе: проекты в разработке (тёмная скруглённая карточка)
   ========================================================= */

.wip {
    margin: 0 18px;
    padding: clamp(60px, 7vw, 110px) 0;
    border-radius: 28px;
    background: #0a0a0a;
    color: var(--white);
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

/* Мягкое синее свечение в углу, как за фото на главном экране */
.wip::before {
    content: "";
    position: absolute;
    right: -15%;
    top: -30%;
    z-index: -1;
    width: 60vw;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-rgb), 0));
}

.wip__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-bottom: clamp(40px, 5vw, 70px);
}

.wip__head .label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.wip__desc {
    max-width: 460px;
    font-size: 1.1rem;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.55);
}

/* Пульсирующая точка «идёт работа» */
.pulse {
    position: relative;
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
    from { transform: scale(1); opacity: 0.8; }
    to   { transform: scale(3.2); opacity: 0; }
}

.wip__list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gutter);
}

.wip-card {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px;
    transition: background 0.4s, border-color 0.4s, transform 0.6s var(--ease);
}

.wip-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(var(--accent-rgb), 0.6);
    transform: translateY(-6px);
}

/* Скриншот в рамке окна браузера */
.wip-card__browser {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
}

.wip-card__bar {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    background: #1d1d1d;
}

.wip-card__bar i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.wip-card__bar span {
    flex: 1;
    min-width: 0;
    margin-left: 10px;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wip-card__media {
    aspect-ratio: 16 / 11;
    overflow: hidden;
}

.wip-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: object-position 3.2s cubic-bezier(0.45, 0, 0.2, 1);
}

.wip-card:hover .wip-card__media img {
    object-position: bottom center;
}

.wip-card__status {
    position: absolute;
    left: 12px;
    top: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 100px;
    background: rgba(10, 10, 10, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.8rem;
}

.wip-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 22px 12px 12px;
}

.wip-card__name {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.45rem;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.wip-card__cat {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.5);
}

.wip-card__progress {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.wip-card__progress b {
    font-weight: 500;
    color: var(--white);
}

/* Полоса прогресса: заполняется, когда карточка появляется на экране */
.wip-card__track {
    position: relative;
    display: block;
    height: 4px;
    margin-top: 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.wip-card__track::after {
    content: "";
    position: absolute;
    inset: 0;
    width: var(--p);
    border-radius: inherit;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.6s 0.3s var(--ease);
}

.wip__list.is-in .wip-card__track::after {
    transform: none;
}

.wip-card__steps {
    display: flex;
    gap: 6px;
    margin-top: 16px;
    list-style: none;
    flex-wrap: wrap;
}

.wip-card__steps li {
    padding: 5px 10px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

.wip-card__steps li.is-done {
    color: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.25);
}

.wip-card__steps li.is-done::before {
    content: "✓ ";
}

.wip-card__steps li.is-current {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.wip-card__link {
    display: inline-flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 26px;
    font-size: 1rem;
}

.wip-card:hover .wip-card__link .arrow {
    transform: translate(3px, -3px);
}

/* =========================================================
   Кейсы
   ========================================================= */

.works__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-bottom: clamp(48px, 5vw, 80px);
}

.works__head .h2 {
    max-width: 700px;
}

.works__desc {
    max-width: 600px;
    font-size: 1.15rem;
    line-height: 1.2;
}

.works__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--gutter);
    row-gap: clamp(70px, 8vw, 140px);
    align-items: start;
}

.case {
    display: block;
    cursor: none;
}

.case--full { grid-column: span 12; }
.case--lg   { grid-column: span 7; }
.case--sm   { grid-column: span 5; }
.case--xs   { grid-column: span 4; }

.case--offset {
    margin-top: clamp(60px, 10vw, 180px);
}

.works__note {
    grid-column: span 4;
    align-self: center;
    max-width: 340px;
    justify-self: center;
    font-size: 1.15rem;
    line-height: 1.25;
}

/* Широкая текстовая вставка рядом с одной карточкой */
.works__note--wide {
    grid-column: span 7;
    justify-self: start;
    max-width: 420px;
    font-size: clamp(1.15rem, 1.5vw, 1.5rem);
}

.case__media {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #f1f1f1;
    aspect-ratio: 16 / 10;
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1.4s var(--ease);
}

.case--sm .case__media,
.case--xs .case__media   { aspect-ratio: 1 / 1; }

/* Широкий кейс: скриншот как экран на цветной подложке (цвет — в style="--tint") */
.case--full .case__media {
    aspect-ratio: 21 / 9;
    background: var(--tint, #ececec);
    padding: 5% 17% 0;
}

.case--full .case__media img {
    border-radius: 10px 10px 0 0;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.case__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transform: scale(1.25);
    transition: transform 1.6s var(--ease), object-position 3.2s cubic-bezier(0.45, 0, 0.2, 1);
}

.case.is-in .case__media {
    clip-path: inset(0 0 0 0);
}

.case.is-in .case__media img {
    transform: scale(1);
}

/* Наведение: скриншот плавно пролистывается до второго экрана */
.case:hover .case__media img {
    object-position: bottom center;
}

/* Тонкая рамка-«экран» поверх скриншота */
.case__media::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    pointer-events: none;
}

.case__info {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding-top: 16px;
    font-size: 1.15rem;
    line-height: 1.25;
}

.case__info em {
    font-style: normal;
    color: var(--muted);
}

.case__num {
    font-style: normal;
    margin-right: 12px;
    color: var(--muted);
    transition: color 0.3s;
}

.case:hover .case__num {
    color: var(--accent);
}

.case__info span:last-child {
    flex: none;
}

/* Кнопка «наверх» */
.to-top {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 90;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(14, 14, 14, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--white);
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
    transition: opacity 0.4s, transform 0.6s var(--ease), background 0.3s;
}

.to-top.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.to-top:hover {
    background: var(--accent);
}

.to-top__ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.to-top__ring circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.14);
    stroke-width: 2;
}

/* Синее кольцо заполняется по мере прокрутки страницы */
.to-top__ring .to-top__progress {
    stroke: var(--accent);
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: calc(1 - var(--progress, 0));
    transition: stroke 0.3s;
}

.to-top:hover .to-top__progress {
    stroke: var(--white);
}

.to-top__arrow {
    position: relative;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.4s var(--ease);
}

.to-top:hover .to-top__arrow {
    transform: translateY(-3px);
}

/* Курсор-подсказка */
.cursor-tag {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    width: 120px;
    height: 120px;
    margin: -60px 0 0 -60px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
    white-space: pre-line;
    pointer-events: none;
    transform: scale(0);
    transition: transform 0.4s var(--ease);
}

.cursor-tag.is-visible {
    transform: scale(1);
}

/* =========================================================
   Бегущая строка
   ========================================================= */

.marquee {
    padding: clamp(40px, 6vw, 90px) 0;
    overflow: hidden;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(3rem, 8vw, 9rem);
    line-height: 1;
    letter-spacing: -0.05em;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.marquee__row {
    display: flex;
    width: max-content;
    white-space: nowrap;
    will-change: transform;
}

.marquee__row > * {
    padding: 0 0.25em;
}

.marquee__row i {
    font-style: normal;
    font-size: 0.5em;
    align-self: center;
    color: var(--accent);
}

/* =========================================================
   Обо мне
   ========================================================= */

.about__grid {
    display: grid;
    grid-template-columns: minmax(0, 360px) minmax(0, 720px);
    justify-content: center;
    gap: clamp(40px, 5vw, 96px);
    align-items: start;
}

.about__photo {
    position: sticky;
    top: 120px;
    aspect-ratio: 4 / 5;
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    background: #eee;
}

.about__photo img {
    width: 100%;
    height: 118%;
    object-fit: cover;
    will-change: transform;
}

.about__text .h2 {
    margin-bottom: clamp(32px, 4vw, 60px);
}

.about__p {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 1.45vw, 1.6rem);
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin-bottom: 1em;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
    list-style: none;
}

.tags li {
    padding: 10px 18px;
    border: 1px solid var(--line);
    border-radius: 100px;
    font-size: 0.95rem;
}

/* =========================================================
   Услуги
   ========================================================= */

.services__head {
    margin-bottom: clamp(40px, 5vw, 70px);
}

.service {
    position: relative;
    display: grid;
    grid-template-columns: 80px 1.3fr 1.4fr auto;
    align-items: start;
    gap: 24px;
    padding: 40px 0;
    border-top: 1px solid var(--line);
    overflow: hidden;
    isolation: isolate;
    transition: color 0.5s, padding 0.5s var(--ease);
}

.service:last-child {
    border-bottom: 1px solid var(--line);
}

/* Заливка снизу при наведении */
.service::before {
    content: "";
    position: absolute;
    inset: 0 calc(var(--gutter) * -1);
    z-index: -1;
    background: var(--ink);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.6s var(--ease);
}

.service--accent::before {
    background: var(--accent);
}

.service:hover {
    color: var(--white);
    padding-left: 20px;
    padding-right: 20px;
}

.service:hover::before {
    transform: scaleY(1);
}

.service__num {
    color: var(--muted);
    padding-top: 8px;
}

.service__title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.8rem, 3vw, 3.2rem);
    line-height: 1;
    letter-spacing: -0.05em;
}

.service__list {
    list-style: none;
    display: grid;
    gap: 6px;
    padding-top: 8px;
    font-size: 1.05rem;
}

.service__list li {
    opacity: 0.75;
}

.service__price {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 2.4vw, 2.6rem);
    font-weight: 500;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.service:hover .service__num {
    color: rgba(255, 255, 255, 0.7);
}

/* =========================================================
   FAQ
   ========================================================= */

.faq {
    padding-top: 0;
}

.faq__grid {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: clamp(40px, 6vw, 120px);
}

.faq__item {
    border-top: 1px solid var(--line);
}

.faq__item:last-child {
    border-bottom: 1px solid var(--line);
}

.faq__q {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 28px 0;
    text-align: left;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 1.8vw, 1.8rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    transition: color 0.3s;
}

.faq__q:hover {
    color: var(--accent);
}

.faq__icon {
    position: relative;
    flex: none;
    width: 22px;
    height: 22px;
}

.faq__icon::before,
.faq__icon::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 2px;
    background: currentColor;
    transition: transform 0.4s var(--ease);
}

.faq__icon::after {
    transform: rotate(90deg);
}

.faq__item.is-open .faq__icon::after {
    transform: rotate(0deg);
}

.faq__a {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s var(--ease);
}

.faq__a p {
    min-height: 0;
    overflow: hidden;
    max-width: 700px;
    color: var(--muted);
    font-size: 1.1rem;
}

.faq__item.is-open .faq__a {
    grid-template-rows: 1fr;
}

.faq__item.is-open .faq__a p {
    padding-bottom: 28px;
}

/* =========================================================
   Контакты и подвал
   ========================================================= */

/* Фон блока контактов: цветной градиент + плавающие пятна + зерно */
.sunset {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--sunset-top) 0%, var(--sunset-mid) 45%, var(--sunset-bottom) 100%);
    overflow: hidden;
}

.sunset::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.18;
    mix-blend-mode: overlay;
}

.sunset__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.85;
    animation: blob 18s ease-in-out infinite alternate;
}

.sunset__blob--1 {
    width: 55vw;
    height: 55vw;
    left: -12vw;
    top: 30%;
    background: var(--blob-1);
}

.sunset__blob--2 {
    width: 45vw;
    height: 45vw;
    right: -10vw;
    top: -10%;
    background: var(--blob-2);
    animation-duration: 22s;
    animation-delay: -6s;
}

.sunset__blob--3 {
    width: 40vw;
    height: 40vw;
    right: 10vw;
    bottom: -25%;
    background: var(--blob-3);
    animation-duration: 26s;
    animation-delay: -12s;
}

@keyframes blob {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(8vw, -6vh) scale(1.15); }
    100% { transform: translate(-6vw, 6vh) scale(0.9); }
}

/* Подвал — скруглённая карточка с теми же отступами, что у главного экрана */
.contact {
    position: relative;
    margin: 18px;
    border-radius: 28px;
    overflow: hidden;
    isolation: isolate;
    color: var(--white);
    padding-top: clamp(60px, 6vw, 100px);
}

/* Заголовок и почта слева, кнопки справа */
.contact__inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: end;
    column-gap: 40px;
}

.contact__inner .label,
.contact__title,
.contact__mail {
    grid-column: 1;
}

.contact__actions {
    grid-column: 2;
    grid-row: 2 / 4;
    align-self: end;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.contact__title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.6rem, 5.4vw, 6.4rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.contact__mail {
    display: inline-block;
    justify-self: start;
    margin: 24px 0;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2.2vw, 2.4rem);
    letter-spacing: -0.04em;
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    transition: border-color 0.3s;
}

.contact__mail:hover {
    border-color: var(--white);
}

.contact__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer {
    position: relative;
    margin-top: clamp(40px, 4vw, 70px);
}

.footer__big {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 11.5vw;
    line-height: 0.8;
    letter-spacing: -0.07em;
    white-space: nowrap;
    padding-bottom: 0.2em;
    margin-left: -0.04em;
}

.footer__big sup {
    font-size: 0.35em;
    vertical-align: 1.2em;
    letter-spacing: 0;
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 20px 76px 24px 0; /* справа — место под кнопку «наверх» */
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.95rem;
}

/* Ссылки на юридические документы */
.footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
}

.footer__legal a {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(255, 255, 255, 0.45);
    transition: text-decoration-color 0.3s;
}

.footer__legal a:hover {
    text-decoration-color: var(--white);
}

/* =========================================================
   Окно заявки
   ========================================================= */

.modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(10, 10, 10, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal__box {
    position: relative;
    width: 100%;
    max-width: 520px;
    padding: 44px 40px 40px;
    border-radius: 20px;
    background: var(--white);
    transform: translateY(30px) scale(0.98);
    transition: transform 0.6s var(--ease);
}

.modal.is-open .modal__box {
    transform: none;
}

.modal__close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 2rem;
    line-height: 1;
    color: var(--muted);
}

.modal__close:hover {
    color: var(--ink);
}

.modal__title {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 2.2rem;
    letter-spacing: -0.05em;
    margin-bottom: 10px;
}

.modal__success {
    text-align: center;
    padding: 30px 0;
}

.form {
    display: grid;
    gap: 14px;
    margin-top: 28px;
}

.form input,
.form textarea {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
    font: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

.form .form__trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.form input:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--ink);
}

/* Галочка согласия на обработку данных */
.consent {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1.35;
    color: var(--muted);
}

.consent input {
    position: absolute;
    opacity: 0;
    width: 22px;
    height: 22px;
    margin: 0;
}

.consent__box {
    flex: none;
    position: relative;
    width: 22px;
    height: 22px;
    border: 1px solid var(--line);
    border-radius: 6px;
    transition: background 0.2s, border-color 0.2s;
}

.consent__box::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid var(--white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s var(--ease);
}

.consent input:checked + .consent__box {
    background: var(--accent);
    border-color: var(--accent);
}

.consent input:checked + .consent__box::after {
    transform: rotate(45deg) scale(1);
}

.consent input:focus-visible + .consent__box {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.consent a {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.consent a:hover {
    color: var(--accent);
}

/* =========================================================
   Появление элементов при скролле
   ========================================================= */

[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(8px);
    transition: opacity 1s var(--ease), transform 1.2s var(--ease), filter 1s var(--ease);
}

[data-reveal].is-in {
    opacity: 1;
    transform: none;
    filter: none;
}

[data-delay="1"] { transition-delay: 0.12s; }
[data-delay="2"] { transition-delay: 0.24s; }

/* У кейсов анимируется картинка, а не вся карточка */
.case[data-reveal] {
    opacity: 1;
    transform: none;
    filter: none;
}

.case[data-reveal] .case__info {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s 0.4s, transform 1s 0.4s var(--ease);
}

.case.is-in .case__info {
    opacity: 1;
    transform: none;
}

/* =========================================================
   Страницы документов (privacy.html, consent.html)
   ========================================================= */

.legal {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 20px 100px;
}

.legal__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: clamp(48px, 7vw, 90px);
}

.legal__logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: -0.05em;
}

.legal__logo sup {
    font-size: 0.45em;
    color: var(--accent);
}

.legal__back {
    transition: color 0.3s;
}

.legal h1 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    line-height: 1;
    letter-spacing: -0.05em;
    margin-bottom: 18px;
}

.legal__date {
    color: var(--muted);
    margin-bottom: 48px;
}

.legal h2 {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.45rem;
    letter-spacing: -0.03em;
    margin: 44px 0 14px;
}

.legal p,
.legal li {
    font-size: 1.02rem;
    line-height: 1.6;
    color: #333;
}

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

.legal ul {
    margin: 10px 0 0 22px;
}

.legal li + li {
    margin-top: 6px;
}

.legal a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal .legal__logo {
    color: var(--ink);
    text-decoration: none;
}

.legal .legal__back {
    color: var(--muted);
    text-decoration: none;
}

.legal .legal__back:hover {
    color: var(--accent);
}

/* Адаптив шапки и главного экрана */
@media (max-width: 1100px) {
    .header__links {
        display: none;
    }

    .header__logo {
        justify-self: start;
    }

    .header__row {
        grid-template-columns: auto 1fr auto;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 10px;
    }

    .header__actions .btn-head--ghost,
    .header__actions .lang {
        display: none;
    }

    .lang--menu {
        display: inline-flex;
    }

    .btn-head {
        height: 46px;
        padding: 0 14px;
        font-size: 0.95rem;
    }

    .header__burger {
        width: 46px;
        height: 46px;
    }

    .header__logo {
        font-size: 1.25rem;
        white-space: nowrap;
    }

    .header__row {
        gap: 12px;
        padding: 8px;
    }

    .hero {
        padding: 10px;
    }

    .hero__card {
        height: calc(100svh - 20px);
        border-radius: 22px;
    }

    .hero__title {
        padding-top: 96px;
        font-size: 10vw;
    }

    .hero__person {
        height: 66%;
        bottom: 0;
    }

    .hero__bgword {
        font-size: 30vw;
        bottom: 18%;
    }

    /* На телефоне бейдж стоит в потоке сразу под заголовком — не наезжает на текст при любой высоте экрана */
    .hero__badge {
        position: relative;
        top: auto;
        right: auto;
        translate: none;
        display: block;
        width: clamp(72px, 22vw, 96px);
        margin: 10px 7% 0 auto;
    }

    .hero__info--right {
        display: none;
    }

    .hero__bottom {
        left: 20px;
        right: 20px;
        bottom: 22px;
        padding-top: 20px;
    }

    .hero__info {
        font-size: 0.95rem;
    }

    .hero__info span:last-child {
        display: none;
    }

    .hero__label {
        margin-bottom: 4px;
        font-size: 0.7rem;
    }
}

/* =========================================================
   Адаптив
   ========================================================= */

@media (max-width: 1400px) and (min-width: 1101px) {
    .wip__list {
        grid-template-columns: repeat(2, 1fr);
    }

    .wip-card__media {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 1100px) {
    /* Планшет и телефон: карточки «В работе» листаются вбок */
    .wip__list {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        /* Отступ слева/справа как у текста — и при прокрутке, и у прилипания карточек */
        scroll-padding-inline: var(--gutter);
        margin: 0 calc(var(--gutter) * -1);
        padding: 0 var(--gutter) 6px;
        scrollbar-width: none;
    }

    .wip__list::-webkit-scrollbar {
        display: none;
    }

    /* Пустое место после последней карточки (Safari не учитывает правый padding) */
    .wip__list::after {
        content: "";
        flex: 0 0 1px;
    }

    .wip-card {
        flex: 0 0 min(420px, 78vw);
        scroll-snap-align: start;
    }

    .wip-card:hover {
        transform: none;
    }

    .works__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .intro__grid {
        grid-template-columns: 1fr 1fr;
    }

    .intro__col:first-child {
        grid-column: 1 / -1;
        min-height: 0;
        margin-bottom: 60px;
    }

    .intro__col:nth-child(2) {
        padding-left: 0;
        border-left: none;
    }

    .service {
        grid-template-columns: 50px 1fr auto;
    }

    .service__list {
        grid-column: 2 / 3;
        grid-row: 2;
    }
}

@media (max-width: 768px) {
    .intro__text {
        text-indent: 0;
    }

    .intro__grid {
        grid-template-columns: 1fr;
    }

    .intro__col,
    .intro__col + .intro__col {
        min-height: 0;
        padding: 40px 0;
        border-left: none;
        border-top: 1px solid var(--line);
    }

    .intro__col:first-child {
        margin-bottom: 0;
        border-top: none;
    }

    .stat {
        margin: 40px 0;
        padding-top: 0;
    }

    .works__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .works__grid {
        grid-template-columns: 1fr;
        row-gap: 48px;
    }

    .case--full,
    .case--sm,
    .case--lg,
    .case--xs,
    .works__note {
        grid-column: auto;
    }

    .works__note {
        justify-self: start;
    }

    .case__info {
        flex-direction: column;
        gap: 4px;
    }

    .case--offset {
        margin-top: 0;
    }

    .case--sm .case__media,
    .case--xs .case__media {
        aspect-ratio: 1 / 1;
    }

    .case--full .case__media {
        aspect-ratio: 1 / 1;
        padding: 8% 8% 0;
    }

    .case__info {
        font-size: 1rem;
    }

    .about__grid,
    .faq__grid {
        grid-template-columns: 1fr;
    }

    .about__photo {
        position: relative;
        top: 0;
    }

    .service {
        grid-template-columns: 1fr auto;
        padding: 32px 0;
    }

    .service__num {
        display: none;
    }

    .service__list {
        grid-column: 1 / -1;
    }

    /* Подвал на телефоне: всё по левому краю, ссылки в одну строку */
    .footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 20px 0 64px; /* снизу — место под кнопку «наверх» */
    }

    .footer__legal {
        flex-direction: column;
        gap: 8px;
        font-size: 0.8rem;
    }

    .footer__legal a {
        white-space: nowrap;
    }

    .contact {
        margin: 10px;
        border-radius: 22px;
    }

    .wip {
        margin: 0 10px;
        border-radius: 22px;
    }

    .to-top {
        right: 16px;
        bottom: 16px;
        width: 50px;
        height: 50px;
    }

    .wip__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .wip__desc {
        font-size: 1rem;
    }

    .wip-card {
        flex-basis: 78vw;
    }

    .wip-card__name {
        font-size: 1.4rem;
    }

    .preloader {
        --frame: 10px;
        --frame-radius: 22px;
    }

    .preloader__bottom {
        left: 20px;
        right: 20px;
        bottom: 24px;
    }

    .preloader__caption {
        max-width: 50%;
        font-size: 0.7rem;
    }

    .contact__inner {
        grid-template-columns: 1fr;
    }

    .contact__actions {
        grid-column: 1;
        grid-row: auto;
        justify-content: flex-start;
        margin-bottom: 0;
    }

    .footer__big {
        font-size: 17vw;
    }

    .modal__box {
        padding: 40px 22px 24px;
    }
}

/* Совсем узкие телефоны (iPhone SE и т.п.) */
@media (max-width: 380px) {
    .header__logo {
        font-size: 1.05rem;
    }

    .btn-head {
        padding: 0 12px;
        font-size: 0.85rem;
    }
}

/* Для тех, у кого в системе выключены анимации */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }

    html {
        scroll-behavior: auto;
    }

    .mask > span,
    [data-reveal],
    .case[data-reveal] .case__info,
    .hero__person img,
    .hero__info,
    .hero__line {
        opacity: 1;
        transform: none;
        filter: none;
    }

    .case__media {
        clip-path: none;
    }

    .case__media img {
        transform: none;
    }
}
