/* WebForge AI: портфолио. Цвета, шрифты и размеры - в tokens.css */
@import url("tokens.css");
@import url("fonts.css");

.directions__grid { display: grid; gap: 1rem; }
.direction { display: flex; flex-direction: column; padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.direction .work__links { margin-top: auto; padding-top: 1rem; }
.work__badge { color: var(--blue); font-size: .875rem; font-weight: 600; }
.direction .btn, .work--featured .btn { white-space: normal; text-align: center; line-height: 1.2; padding-block: .6rem; }
@media (min-width: 720px) { .directions__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.sec.showcase { padding-block: clamp(2.5rem, 6vw, 5rem); }
.showcase__grid { display: grid; gap: 1rem; }
.showcase__card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 9rem);
  gap: .8rem; align-items: start; padding: clamp(1rem, 2vw, 1.5rem);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
}
.showcase__card h3 { font-size: clamp(1.05rem, 1rem + .35vw, 1.35rem); }
.showcase__copy { display: grid; gap: .45rem; }
.showcase__copy p, .showcase__actions { font-size: var(--t-sm); }
.showcase__count { color: var(--blue); font-weight: 600; }
.showcase__examples a { text-underline-offset: .15em; }
.showcase__media.stage {
  align-self: center;
  min-height: 0;
  padding: .4rem;
  background: none;
  overflow: visible;
}
.showcase__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .25rem 1rem; border-top: 1px solid var(--line); padding-top: .6rem; align-self: end; }
.showcase__actions a { display: inline-flex; align-items: center; min-height: 2.5rem; }
.showcase__card:not(:has(.showcase__media)) .showcase__copy { grid-column: 1 / -1; }
.showcase__all { margin-top: 1.25rem; }
.legacy-project:not(:target) { display: none; }
.legacy-project:target { display: block; margin-top: 1rem; }
@media (min-width: 760px) { .showcase__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 390px) { .showcase__card { grid-template-columns: minmax(0, 1fr) minmax(0, 5.5rem); } }

.catalog__filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1.25rem .75rem; }
.catalog__filters a { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .55rem .85rem; border: 1px solid var(--line); border-radius: 1.25rem; text-decoration: none; }
.catalog__filters a[aria-current] { color: white; background: var(--blue); border-color: var(--blue); }
.catalog__filters span { font-weight: 600; }
.catalog__count { margin-bottom: 1rem; color: var(--ink-2); }
.catalog__ai-note { margin-top: 1rem; color: var(--ink-2); }
.catalog .work[hidden] { display: none; }
.catalog .work { padding-block: clamp(1.5rem, 3vw, 3rem); }
.catalog .work:target .work__text h3 { color: var(--blue); }
.catalog .work__links .btn { white-space: normal; text-align: center; line-height: 1.2; padding-block: .6rem; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5rem; overflow-x: clip; }
body {
  margin: 0; overflow-x: clip;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: var(--t-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -0.025em; overflow-wrap: anywhere; text-wrap: balance; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
p { text-wrap: pretty; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 60; padding: 0.6rem 1rem; background: var(--ink); color: #fff; border-radius: 0.5rem; }
.skip:focus { top: 1rem; }

/* ---------- боковое меню ---------- */
.rail { position: fixed; z-index: 40; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px); }
.rail__bar { display: flex; align-items: center; justify-content: space-between; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.03em; text-decoration: none; white-space: nowrap; }
.logo__mark { width: 1.25rem; height: 1.25rem; background: var(--blue); border-radius: 0.35rem 0.35rem 0.35rem 0; transform: rotate(-8deg); }
.logo__ai { color: var(--blue-text); margin-left: -0.35rem; }
.rail__list { display: grid; gap: 0.15rem; }
.rail__list a { position: relative; display: block; padding: 0.55rem 0 0.55rem 1rem; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: var(--t-sm); transition: color 0.2s; }
.rail__list a::before { content: ""; position: absolute; left: 0; top: 50%; width: 2px; height: 0.4rem; border-radius: 2px; background: var(--line); transform: translateY(-50%); transition: height 0.3s var(--ease), background-color 0.2s; }
.rail__list a:hover { color: var(--ink); }
.rail__list a.is-on { color: var(--ink); font-weight: 600; }
.rail__list a.is-on::before { height: 1.4rem; background: var(--blue); }
.rail__contacts { display: grid; gap: 0.25rem; }
.rail__contacts p { font-size: 0.8125rem; color: var(--ink-2); margin-bottom: 0.25rem; }

.rail__tools { display: flex; align-items: center; gap: 0.5rem; }
.theme { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--ink); transition: background-color 0.2s, border-color 0.2s, transform 0.2s var(--ease); }
.theme:hover { border-color: var(--blue); transform: rotate(-12deg); }
.theme svg { grid-area: 1 / 1; width: 1.3rem; height: 1.3rem; }
.theme__moon { fill: currentColor; }
.theme__sun { display: none; }
:root[data-theme="dark"] .theme__sun { display: block; }
:root[data-theme="dark"] .theme__moon { display: none; }
.burger { display: none; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--white); position: relative; }
.burger span { position: absolute; left: 0.8rem; right: 0.8rem; height: 2px; background: var(--ink); transition: transform 0.25s var(--ease); }
.burger span:first-child { top: 1.05rem; }
.burger span:last-child { top: 1.55rem; }
.rail.is-open .burger span:first-child { transform: translateY(0.25rem) rotate(45deg); }
.rail.is-open .burger span:last-child { transform: translateY(-0.25rem) rotate(-45deg); }

@media (min-width: 1100px) {
  body { padding-left: var(--rail); }
  .rail { inset: 0 auto 0 0; width: var(--rail); padding: 1.75rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: 2.5rem; border-right: 1px solid var(--line); }
  .rail__menu { flex: 1; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; }
}
@media (max-width: 1099.98px) {
  .rail { inset: 0 0 auto 0; border-bottom: 1px solid var(--line); }
  .rail__bar { padding: 0.65rem var(--gutter); min-height: 4rem; }
  .burger { display: block; }
  .rail__menu { display: none; padding: 0.5rem var(--gutter) 1.5rem; background: var(--paper); border-bottom: 1px solid var(--line); max-height: calc(100svh - 4rem); overflow-y: auto; }
  .rail.is-open .rail__menu { display: block; }
  .rail__list a { padding-block: 0.85rem; font-size: var(--t-base); }
  .rail__contacts { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
  .page > section:first-child { padding-top: calc(4rem + 2rem); }
}

/* ---------- кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: 0 1.75rem; border-radius: 999px; font-weight: 600; font-size: 1rem; line-height: 1; text-decoration: none; white-space: nowrap; border: 1.5px solid transparent; transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-hover); box-shadow: 0 10px 24px -10px var(--blue); }
.btn--ghost { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.textlink { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.3em; }
.textlink:hover { color: var(--blue-text); text-decoration-thickness: 2px; }

/* ---------- общая сетка секций ---------- */
.sec { padding: var(--sec-y) var(--gutter); }
.sec > * { max-width: var(--max); margin-inline: auto; }
.hero, .about { max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; }
.sec__head { margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem); }
.sec__head h2 { max-width: 20ch; }
.sec__head p { margin-top: 1rem; max-width: 52ch; color: var(--ink-2); font-size: var(--t-lg); }

/* ---------- устройства (мокапы) ---------- */
.stage {
  position: relative; display: block; border-radius: var(--radius); overflow: hidden;
  background-color: var(--bg, var(--mist));
  background-image: radial-gradient(120% 90% at 20% 0%, rgb(255 255 255 / 0.55), transparent 60%), radial-gradient(rgb(10 18 48 / 0.12) 1px, transparent 1.4px);
  background-size: auto, 22px 22px;
  padding: 8% 7% 3%;
  transition: background-color 0.8s var(--ease);
}
.rig { container-type: inline-size; width: 100%; padding-bottom: 6cqw; }
.rig__tilt { position: relative; transition: transform 0.5s var(--ease); transform: perspective(1500px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); will-change: transform; }

.laptop { width: 86cqw; filter: drop-shadow(0 3cqw 3cqw rgb(10 18 48 / 0.28)); }
.laptop__lid { position: relative; padding: 1.1cqw 1.1cqw 1.4cqw; background: #0b0f22; border-radius: 2cqw 2cqw 0.5cqw 0.5cqw; border: 1px solid rgb(255 255 255 / 0.1); }
.laptop__lid::before { content: ""; position: absolute; top: 0.45cqw; left: 50%; width: 0.5cqw; height: 0.5cqw; border-radius: 50%; background: #2a3150; transform: translateX(-50%); }
.laptop__screen { position: relative; aspect-ratio: 1440 / 850; border-radius: 0.6cqw; overflow: hidden; background: #fff; }
.laptop__base { position: relative; height: 1.7cqw; margin: 0 -4%; background: linear-gradient(#e1e5f1, #a9b2c9); border-radius: 0 0 2.4cqw 2.4cqw / 0 0 1cqw 1cqw; }
.laptop__base::after { content: ""; position: absolute; top: 0; left: 50%; width: 14cqw; height: 0.6cqw; border-radius: 0 0 1cqw 1cqw; background: #8f98b1; transform: translateX(-50%); }

.phone { position: absolute; right: 0; bottom: -6cqw; width: 21cqw; filter: drop-shadow(0 2.5cqw 2.5cqw rgb(10 18 48 / 0.32)); }
.phone__body { position: relative; padding: 0.9cqw; background: #0b0f22; border-radius: 3.6cqw; border: 1px solid rgb(255 255 255 / 0.12); }
.phone__body::before { content: ""; position: absolute; z-index: 2; top: 1.9cqw; left: 50%; width: 5cqw; height: 1.3cqw; border-radius: 1cqw; background: #04060e; transform: translateX(-50%); }
.phone__screen { position: relative; aspect-ratio: 390 / 844; border-radius: 2.8cqw; overflow: hidden; background: #fff; }

.scr { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s var(--ease), transform 0.6s var(--ease); transform: scale(1.04); }
.scr.is-on { opacity: 1; transform: none; }
.scr img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* ---------- 1. первый экран ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 4rem); align-items: center; min-height: min(100svh, 62rem); padding: clamp(2.5rem, 1.5rem + 4vw, 5rem) var(--gutter) clamp(3rem, 2rem + 4vw, 5rem); }
.hero__kicker { font-size: var(--t-sm); font-weight: 600; color: var(--blue-text); margin-bottom: 1.25rem; }
.hero h1 { font-size: var(--t-h1); font-weight: 650; line-height: 1.06; letter-spacing: -0.035em; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.hero h1 .line > span { display: inline-block; }
.hero__promise { display: inline-block; margin-top: 1.5rem; padding: 0.45rem 1rem; border-radius: 999px; background: var(--mist); color: var(--blue-text-2); font-weight: 650; font-size: var(--t-base); }
.hero__timing { display: grid; gap: .4rem; padding: .75rem 1rem; border-radius: .85rem; font-weight: 400; font-size: var(--t-sm); }
.hero__lead { margin-top: 1.75rem; max-width: 34rem; font-size: var(--t-lg); color: var(--ink-2); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; margin-top: 2rem; }
.hero__note { margin-top: 2rem; max-width: 32rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: var(--t-sm); color: var(--ink-2); }
.hero__stage { min-width: 0; }
.hero__picker { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; margin-top: 1rem; padding-inline: 0.25rem; }
.hero__now { font-size: var(--t-sm); color: var(--ink-2); min-height: 1.5em; }
.hero__now-label { color: var(--ink-2); }
.hero__now #hero-title { color: var(--ink); font-weight: 600; }
.hero__dots { display: flex; align-items: center; }
.dot { position: relative; width: 1.5rem; height: 2.75rem; padding: 0; border: 0; background: none; }
.dot::after { content: ""; position: absolute; left: 50%; top: 50%; width: 0.55rem; height: 0.55rem; border-radius: 999px; background: var(--line); transform: translate(-50%, -50%); transition: width 0.35s var(--ease), background-color 0.2s; }
.dot:hover::after { background: var(--blue-soft); }
.dot.is-on { width: 2.4rem; }
.dot.is-on::after { width: 1.7rem; background: var(--blue); }
@media (min-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
  .hero h1 .line > span { transform: translateY(110%); animation: rise 0.95s var(--ease) forwards; }
  .hero h1 .line:nth-child(2) > span { animation-delay: 0.1s; }
  .hero h1 .line:nth-child(3) > span { animation-delay: 0.2s; }
  .hero__kicker, .hero__promise, .hero__lead, .hero__actions, .hero__note { opacity: 0; animation: fade 0.8s var(--ease) forwards; }
  .hero__kicker { animation-delay: 0.05s; }
  .hero__promise { animation-delay: 0.35s; }
  .hero__lead { animation-delay: 0.45s; }
  .hero__actions { animation-delay: 0.55s; }
  .hero__note { animation-delay: 0.7s; }
  .hero .stage { opacity: 0; transform: translateY(2rem) scale(0.98); animation: stage-in 1.1s 0.2s var(--ease) forwards; }
  .hero .phone { opacity: 0; transform: translateX(3cqw) translateY(4cqw); animation: phone-in 0.9s 0.85s var(--ease) forwards; }
  .hero__picker { opacity: 0; animation: fade 0.8s 1.1s var(--ease) forwards; }
}
@keyframes rise { to { transform: none; } }
@keyframes fade { to { opacity: 1; } }
@keyframes stage-in { to { opacity: 1; transform: none; } }
@keyframes phone-in { to { opacity: 1; transform: none; } }

/* ---------- бегущая строка ---------- */
.strip { overflow: hidden; background: var(--white); border-block: 1px solid var(--line); }
.strip__track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.strip:hover .strip__track { animation-play-state: paused; }
.strip span { display: inline-flex; align-items: center; gap: 1.75rem; padding: 1rem 0 1rem 1.75rem; font-family: var(--font-display); font-weight: 500; font-size: 0.95rem; letter-spacing: -0.02em; white-space: nowrap; }
.strip span::after { content: ""; width: 0.5rem; height: 0.5rem; background: var(--blue); border-radius: 0.15rem; transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .strip__track { animation: none; width: auto; flex-wrap: wrap; }
  .strip span:nth-child(n + 8) { display: none; }
}

/* ---------- 2. проблемы ---------- */
.pairs { border-bottom: 1px solid var(--line); }
.pair { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.65rem; padding: clamp(1rem, 0.8rem + 0.7vw, 1.5rem) 0; border-top: 1px solid var(--line); }
.pair::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease); }
.pair.is-in::before { transform: scaleX(1); }
.pair__if { font-family: var(--font-display); font-weight: 500; font-size: clamp(1rem, 0.95rem + 0.35vw, 1.22rem); line-height: 1.3; letter-spacing: -0.02em; }
.pair__then { color: var(--ink-2); padding-left: 1.1rem; border-left: 2px solid var(--mist); transition: border-color 0.4s; }
.pair.is-in .pair__then { border-left-color: var(--blue); }
@media (min-width: 900px) {
  .pair { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 4vw, 4.5rem); align-items: start; }
}
@media (prefers-reduced-motion: reduce) { .pair::before { transform: none; transition: none; } .pair__then { border-left-color: var(--blue); } }

/* ---------- 3. что делаю ---------- */
.services { background: var(--night); color: var(--on-night); }
.services__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 4rem); margin-inline: auto; }
.services__big { font-family: var(--font-display); font-weight: 700; font-size: clamp(6.5rem, 4rem + 11vw, 13rem); line-height: 0.85; letter-spacing: -0.06em; color: var(--blue-soft); display: flex; align-items: flex-end; gap: 0.5rem; margin-bottom: 1.75rem; }
.services__big small { font-size: clamp(1.1rem, 0.8rem + 1.1vw, 1.7rem); letter-spacing: -0.02em; color: var(--on-night); padding-bottom: 0.4em; }
.services__head p:last-child { margin-top: .75rem; color: var(--on-night-2); max-width: 65ch; }
.services__head h2 { max-width: 14ch; }
.svc { border-bottom: 1px solid rgb(255 255 255 / 0.14); }
.svc li { display: grid; grid-template-columns: minmax(0, 1fr) 8rem 14rem; grid-template-areas: "name price actions" "details details details"; align-items: baseline; gap: 0 .9rem; padding: .6rem .25rem; border-top: 1px solid rgb(255 255 255 / 0.14); }
.svc li:hover { background: rgb(255 255 255 / 0.04); }
.svc__name { grid-area: name; }
.svc__timing { display: block; margin-top: .25rem; color: var(--on-night-2); font-size: .85rem; }
.svc__shared-timing { grid-column: 1 / -1; margin: 0; text-align: center; }
.svc h3 { font-family: var(--font-body); font-weight: 600; letter-spacing: -0.01em; font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); line-height: 1.3; }
.svc p { margin-top: 0.3rem; color: var(--on-night-2); font-size: var(--t-sm); max-width: 46ch; }
.svc a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.1rem; border: 1px solid rgb(255 255 255 / 0.3); border-radius: 999px; font-size: var(--t-sm); font-weight: 600; text-decoration: none; white-space: nowrap; transition: background-color 0.2s, color 0.2s, border-color 0.2s; }
.svc a:hover { background: var(--on-night); color: var(--night); border-color: var(--on-night); }
.svc p.svc__incl { margin-top: 0.55rem; font-size: 0.875rem; max-width: 56ch; }
.svc p.svc__incl b { color: var(--on-night); font-weight: 600; }
.svc__details { grid-area: details; }
.svc__details summary { min-height: 2.5rem; align-content: center; color: var(--on-night); cursor: pointer; font-size: .875rem; font-weight: 600; }
.svc__details[open] p.svc__incl { margin-top: 0; }
.svc__col { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.35rem; }
.svc__extra, .svc__note { grid-column: 1 / -1; }
.svc__extra { justify-self: stretch; }
.svc__extra > summary { width: fit-content; max-width: 100%; margin-inline: auto; text-align: center; }
.svc__group > h3 { margin-bottom: .55rem; font-size: 1rem; color: var(--on-night); }
.svc__group .svc li { padding-block: .6rem; }
.svc__group .svc li h3 { font-size: var(--t-base); }
.svc__extra > summary { min-height: 2.75rem; align-content: center; cursor: pointer; font-weight: 600; }
.svc__extra > .svc__group > h3 { display: none; }
.svc__note { margin-top: 1.25rem; color: var(--on-night-2); font-size: var(--t-sm); }
.svc__side { grid-area: actions; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .35rem; }
.svc__estimate { display: grid; gap: .2rem; max-width: 9rem; }
.svc__estimate small { font-size: .8rem; line-height: 1.35; }
.svc__price { grid-area: price; justify-self: end; font-variant-numeric: tabular-nums; font-weight: 700; font-size: clamp(1.05rem, 1rem + 0.3vw, 1.2rem); letter-spacing: -0.01em; white-space: nowrap; }
@media (min-width: 960px) {
  .svc__col { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.25rem, 3vw, 3rem); align-items: start; }
}
@media (max-width: 640px), (min-width: 960px) {
  .svc li { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name price" "details actions"; gap: .15rem .65rem; }
  .svc__details[open] { grid-column: 1 / -1; }
  .svc__details[open] + .svc__side { grid-area: auto; grid-column: 1 / -1; }
  .svc a { padding-inline: .65rem; }
}
.services :focus-visible, .request__head :focus-visible, .foot :focus-visible { outline-color: #fff; }
@media (min-width: 960px) {
}

/* ---------- 4. подход ---------- */
.about__body { max-width: 46rem; margin-inline: 0; }
.about:has(.about__photo) { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center; }
.about:has(.about__photo) > * { max-width: none; }
.about__photo { border-radius: var(--radius); overflow: hidden; background: var(--mist); max-width: 22rem; }
.about__photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about__lead { margin-top: 1.5rem; font-size: var(--t-lg); max-width: 40rem; }
.about__two { display: grid; gap: 1.5rem; margin-top: 2rem; padding-left: 0; list-style: none; }
.about__two > li { padding-top: 1rem; border-top: 2px solid var(--blue); }
.about__me .btn { margin-top: .75rem; }
.about__two h3 { font-size: 1.05rem; font-family: var(--font-body); font-weight: 650; letter-spacing: -0.01em; }
.about__two p { margin-top: 0.5rem; color: var(--ink-2); }
.about__support { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--ink-2); }
.about__me { margin-top: 2rem; padding: 1.25rem 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink-2); max-width: 40rem; }
@media (min-width: 720px) { .about__two { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .about:has(.about__photo) { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } .about__photo { max-width: none; } }

/* ---------- 5. работы ---------- */
.works { background: var(--white); border-top: 1px solid var(--line); }
.work { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(1.5rem, 1rem + 2vw, 3rem); align-items: center; padding-block: clamp(2rem, 1rem + 4vw, 4.5rem); border-top: 1px solid var(--line); }
.work:first-child { border-top: 0; padding-top: 0; }
.work__media { text-decoration: none; }
.work__text h3 { max-width: 18ch; }
.work__brand { margin-top: 0.6rem; font-size: var(--t-sm); font-weight: 600; color: var(--blue-text); }
.work__gives { margin-top: 1.1rem; max-width: 40rem; color: var(--ink-2); }
.work__points { margin-top: 1.25rem; max-width: 36rem; border-top: 1px solid var(--line); }
.work__points li { position: relative; padding: 0.6rem 0 0.6rem 1.5rem; border-bottom: 1px solid var(--line); font-size: var(--t-sm); }
.work__points li::before { content: ""; position: absolute; left: 0.15rem; top: 1.05rem; width: 0.55rem; height: 0.55rem; background: var(--blue); border-radius: 0.15rem; transform: rotate(45deg); }
.work__links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; margin-top: 1.75rem; }
.work--soon { grid-template-columns: minmax(0, 1fr); padding-bottom: 0; }
.work--soon .work__text { padding: 1.5rem; border: 1.5px dashed var(--line); border-radius: var(--radius); background: var(--paper); }
.work__badge { display: inline-block; margin-bottom: 0.9rem; padding: 0.25rem 0.8rem; border-radius: 999px; background: var(--mist); color: var(--blue-text-2); font-size: 0.8125rem; font-weight: 650; }
@media (min-width: 900px) {
  .work { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  /* в чётных строках меняем и порядок, и ширины колонок: мокап везде одного размера */
  .work:nth-child(even) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .work:nth-child(even) .work__media { order: 2; }
  .work.work--soon { grid-template-columns: minmax(0, 1fr); }
}
.work__media:hover .rig__tilt { --lift: 1; }

/* ---------- 6. заявка ---------- */
.request { background: var(--blue); color: #fff; padding: var(--sec-y) var(--gutter); }
.request__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 4rem); max-width: var(--max); align-items: start; }
.request__head h2 { max-width: 14ch; color: #fff; }
.request__head p { margin-top: 1.25rem; max-width: 34ch; font-size: var(--t-lg); color: rgb(255 255 255 / 0.88); }
@media (min-width: 960px) { .request__in { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); } .request__head { position: sticky; top: 4rem; } }

.asks { padding: clamp(1.25rem, 1rem + 1.6vw, 2.25rem); background: var(--white); color: var(--ink); border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgb(7 13 36 / 0.6); }
.asks h3 { font-size: var(--t-h3); }
.asks > p { margin-top: 0.6rem; max-width: 38ch; color: var(--ink-2); font-size: var(--t-sm); }
.asks ul { margin-top: 1.25rem; border-top: 1px solid var(--line); }
.ask { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; transition: color 0.2s, padding 0.2s var(--ease); }
.ask__go { font-size: var(--t-sm); font-weight: 600; color: var(--blue-text); }
.ask:hover { color: var(--blue-text); padding-left: 0.5rem; }
.ask:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 40%, transparent); outline-offset: 2px; }
.request__alt .request__mail { margin: 1.5rem 0 0; font-size: var(--t-sm); }
.request__mail a { color: #fff; text-underline-offset: 0.2em; }

/* ---------- форма заявки ---------- */
.request__side { display: grid; gap: 1.5rem; }
.lead { padding: clamp(1.25rem, 1rem + 1.6vw, 2.25rem); background: var(--white); color: var(--ink); border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgb(7 13 36 / 0.6); }
.lead h3 { font-size: var(--t-h3); }
.lead__sub { margin-top: 0.6rem; max-width: 44ch; color: var(--ink-2); font-size: var(--t-sm); }
.field { margin-top: 1rem; }
.field label { display: block; margin-bottom: 0.35rem; font-weight: 600; font-size: var(--t-sm); }
.field__opt { font-weight: 400; color: var(--ink-2); }
.lead input[type="text"], .lead textarea { width: 100%; min-height: 3rem; padding: 0.7rem 0.9rem; border: 1.5px solid var(--line); border-radius: 0.75rem; background: #fff; color: var(--ink); font: 400 1rem/1.4 var(--font-body); transition: border-color 0.2s, box-shadow 0.2s; }
.lead textarea { resize: vertical; min-height: 5.5rem; }
.lead input:focus-visible, .lead textarea:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 30%, transparent); }
.lead [aria-invalid="true"] { border-color: #b42318; }
.field__err { margin-top: 0.35rem; color: #b42318; font-size: var(--t-sm); }
.lead__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field .lead__consent { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0; font-weight: 400; color: var(--ink-2); cursor: pointer; }
.lead__consent input { flex: none; width: 1.25rem; height: 1.25rem; margin-top: 0.15rem; accent-color: var(--blue); }
.lead__consent a { color: var(--blue-text); }
.lead__send { margin-top: 1.25rem; width: 100%; min-height: 3.25rem; padding: 0 1.5rem; border: 0; border-radius: 999px; background: var(--blue); color: #fff; font: 600 1.0625rem/1 var(--font-body); cursor: pointer; transition: background-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s; }
.lead__send:hover { background: var(--blue-hover); box-shadow: 0 10px 24px -10px var(--blue); }
.lead__send:active { transform: translateY(1px); }
.lead__send:disabled { opacity: 0.6; cursor: progress; }
.lead__send:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 40%, transparent); outline-offset: 2px; }
.lead__status { min-height: 1.4em; margin-top: 0.75rem; font-size: var(--t-sm); color: var(--ink-2); }
.lead__status[data-kind="error"] { color: #b42318; }
.lead__ok { padding: 0.5rem 0; }
.lead__ok p { margin-top: 0.6rem; color: var(--ink-2); }
.lead__ok:focus { outline: none; }

/* ---------- 7. нижняя шапка ---------- */
.foot { background: var(--night); color: var(--on-night); padding: clamp(3.5rem, 2rem + 5vw, 6rem) var(--gutter) 2rem; }
.foot__in { max-width: var(--max); }
.foot__lead { color: var(--on-night-2); }
.copy { padding: 0.35rem 0.25rem; margin: 0 0.25rem; background: none; border: 0; border-bottom: 1px dashed var(--on-night-2); color: var(--on-night); font-weight: 600; }
.copy:hover { color: var(--blue-soft); border-color: var(--blue-soft); }
.foot__legal { margin-top: clamp(2.5rem, 2rem + 3vw, 4.5rem); padding-top: 1.75rem; border-top: 1px solid rgb(255 255 255 / 0.14); display: grid; gap: 1.75rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); font-size: 0.9375rem; color: var(--on-night-2); }
.foot__h { color: var(--on-night); font-weight: 650; margin-bottom: 0.7rem; }
.foot__dl { display: grid; gap: 0.55rem; }
.foot__dl div { display: grid; gap: 0.1rem; }
.foot__dl dt { font-size: 0.8125rem; color: var(--on-night-2); opacity: 0.8; }
.foot__dl dd { margin: 0; color: var(--on-night); }
.foot__links { display: grid; gap: 0.5rem; }
.foot__links a { color: var(--on-night); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: rgb(255 255 255 / 0.4); }
.foot__links a:hover { text-decoration-color: currentColor; }
.foot__small { margin-top: 1.75rem; font-size: 0.8125rem; color: var(--on-night-2); }

/* ---------- кнопки мессенджеров ---------- */
.msgs { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.msg { display: inline-flex; align-items: center; gap: 0.65rem; min-height: 3.25rem; padding: 0 1.4rem 0 1.15rem; border: 1.5px solid transparent; border-radius: 999px; font: 600 1rem/1 var(--font-body); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s; }
.msg svg { width: 1.3rem; height: 1.3rem; fill: currentColor; flex: none; }
.msg:active { transform: translateY(1px); }
.msg--tg { background: var(--blue); color: #fff; }
.msg--tg:hover { background: var(--blue-hover); box-shadow: 0 10px 24px -10px var(--blue); }
.msg--max { background: transparent; border-color: var(--ink); color: var(--ink); }
.msg--max:hover { background: var(--ink); color: var(--paper); }
.msgbox .msgs__hint { margin: 0.65rem 0 0; font-size: var(--t-sm); opacity: 0.85; }
.msgbox .msgs__alt { margin: 0.2rem 0 0; font-size: var(--t-sm); opacity: 0.9; }
.msgs__link { display: inline-block; padding: 0.5rem 0.2rem; color: inherit; background: none; border: 0; font: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; cursor: pointer; }
.msgs__link:hover { text-decoration-thickness: 2px; }
.rail__contacts .msgs { flex-direction: column; align-items: stretch; gap: 0.5rem; }
.rail__contacts .msg { min-height: 2.75rem; font-size: var(--t-sm); }
.request .msg--tg { background: #fff; color: var(--blue-hover); }
.request .msg--tg:hover { background: var(--mist); box-shadow: none; }
.request .msg--max { border-color: rgb(255 255 255 / 0.7); color: #fff; }
.request .msg--max:hover { background: #fff; color: var(--blue-hover); }
.request__alt { margin-top: 2.25rem; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / 0.35); }
.request__alt p { margin: 0 0 0.9rem; font-size: var(--t-base); }
.foot .msg { min-height: 3.6rem; font-size: 1.0625rem; padding-inline: 1.6rem 1.8rem; }
.foot .msg--max { border-color: rgb(255 255 255 / 0.45); color: var(--on-night); }
.foot .msg--max:hover { background: var(--on-night); color: var(--night); }
.foot__title { margin: 0.5rem 0 1.75rem; font-family: var(--font-display); font-weight: 650; font-size: clamp(1.7rem, 0.9rem + 3.4vw, 3.2rem); letter-spacing: -0.04em; line-height: 1.1; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: 1.5rem; max-width: min(92vw, 28rem); padding: 0.9rem 1.25rem; background: var(--ink); color: var(--paper); border-radius: 0.9rem; font-size: var(--t-sm); box-shadow: 0 20px 40px -20px rgb(7 13 36 / 0.7); opacity: 0; transform: translate(-50%, 1rem); pointer-events: none; transition: opacity 0.25s, transform 0.3s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- общее: без анимаций ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}


/* ---------- уведомление о cookie ---------- */
.cookie { position: fixed; z-index: 60; right: 1rem; bottom: 1rem; left: 1rem; max-width: 30rem; margin-left: auto; display: flex; gap: 1rem; align-items: center; padding: 1rem 1.1rem; border-radius: 1rem; background: var(--night); color: var(--on-night); font-size: 0.875rem; line-height: 1.45; box-shadow: 0 0.75rem 2rem rgb(5 10 30 / 0.3); }
.cookie p { margin: 0; }
.cookie a { color: var(--on-night); text-decoration: underline; text-underline-offset: 0.2em; }
.cookie__ok { flex: none; min-height: 2.75rem; padding: 0 1.1rem; border: 0; border-radius: 999px; background: #fff; color: var(--night); font: inherit; font-weight: 650; cursor: pointer; }
.cookie__ok:hover { background: #e4e9ff; }
.cookie :focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 30rem) { .cookie { flex-direction: column; align-items: stretch; } }
