/* UClean: the fit and access layer, loaded last. Fixes from the layout, interface and a11y audit of 19.11:
   nothing may push the page sideways, touch targets reach 44px, short screens and landscape phones keep
   their content, and focus stays visible on dark surfaces. */

/* ---------- nothing pushes the page sideways ---------- */
main > section { max-width: 100%; overflow-x: clip; }
.steps__body { grid-template-columns: minmax(0, 1fr); }
.steps__progress { flex: 1 1 auto; min-width: 0; grid-auto-columns: minmax(0, 64px); }
.calc2__sum { grid-template-columns: minmax(0, 1fr); }
.calc2__total { white-space: normal; text-wrap: balance; }

/* ---------- short screens: full-screen sections grow instead of cutting their content ---------- */
@media (min-width: 1280px) {
  main > .section:is(.fors, .calc-sec) { height: auto; min-height: 100svh; }
  main > .section:is(.fors, .calc-sec) > .wrap { height: auto; }
}
.fcard { min-height: clamp(280px, 48svh, 420px); }
@media (max-height: 560px) and (orientation: landscape) {
  main > .hero { height: auto; min-height: 100svh; }
  main > .hero--uc { position: relative; }
}

/* ---------- a price on a card wraps rather than being cut ---------- */
.tcard__foot { align-items: flex-end; }
.tcard__price { display: inline-flex; white-space: normal; height: auto; min-height: 40px; padding-block: 9px; line-height: 1.3;
  border-radius: 20px; overflow: visible; text-overflow: clip; }

/* ---------- touch targets: 44px where a finger lands ---------- */
.nav__lang a { position: relative; }
.nav__lang a::after { content: ""; position: absolute; inset: -7px -2px; }
.area__quick button, .freq__opt span, .incl__tabs .chip span, .lg-seg .chip span { min-height: 44px; }
.area__range { height: 44px; }
.pager__dot { height: 44px; }
.crumbs a { display: inline-flex; align-items: center; min-height: 28px; }
@media (max-width: 1023px) {
  .dfoot__cols a, .dfoot__legal a { display: inline-flex; align-items: center; min-height: 44px; }
  .dfoot__cols ul { gap: 0; }
}

/* ---------- a small laptop: the header keeps its words apart ---------- */
@media (min-width: 1024px) and (max-width: 1279px) {
  .hero--uc .hero__lead { max-width: 30rem; }
  header.nav .nav__bar > .nav__actions > .nav__phone { display: none; }
}

/* ---------- a phone ---------- */
@media (max-width: 639px) {
  .cta__word { font-size: 18vw; }
  /* the hero's words and both buttons fit the first screen in every language (uz is the longest) */
  .hero--uc { --photo: 36svh; }
  .hero--uc .hero__promise { font-size: 26px; }
  .hero--uc .hero__lead { font-size: 16px; }
}

/* ---------- the phone action bar clears the home indicator ---------- */
:root:has(> body > nav.actionbar) { --bar: calc(76px + env(safe-area-inset-bottom)); }

/* ---------- the accordion's closed row shows nothing of its text ---------- */
.acc__body > p { margin: 0; padding-bottom: var(--s-3); }

/* ---------- focus stays visible on dark glass and dark panels ---------- */
header.nav[data-over="dark"]:not(.is-open) :focus-visible, .calc2__sum :focus-visible, .deep__panel :focus-visible,
.hero--uc :focus-visible { outline-color: #fff; }
.calc2__sum .btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ---------- controls added for the moving parts ---------- */
.rail-btn[aria-disabled="true"] { opacity: .4; cursor: default; }
.mo-pause svg { width: 16px; height: 16px; }
.mo-pause .i-play { display: none; }
.mo-pause[aria-pressed="true"] .i-play { display: inline; }
.mo-pause[aria-pressed="true"] .i-pause { display: none; }
.trust__copy .mo-pause { margin-top: var(--s-5); }
.js-drift .trust__names.is-held .trust__list, .js-drift .trust:focus-within .trust__list { animation-play-state: paused; }

/* ---------- Escape shuts a hover menu even while the pointer or focus is still on it ---------- */
@media (min-width: 1024px) {
  header.nav .nav__item.is-shut > .nav__menu { opacity: 0 !important; visibility: hidden !important; pointer-events: none; }
}
.crumbs-nav { display: contents; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- the plain pages: the privacy policy and the 404 ---------- */
main > .section.legal { padding-top: calc(var(--nav, 72px) + clamp(48px, 8vw, 120px)); padding-bottom: clamp(64px, 8vw, 128px); }
.legal__wrap { max-width: 44rem; }
.legal h1 { margin: var(--s-3) 0 0; }
.legal__date { margin: var(--s-3) 0 0; color: var(--muted); font-size: 15px; }
.legal__part { margin-top: clamp(32px, 4vw, 48px); }
.legal__part h2 { margin: 0 0 var(--s-3); font-size: clamp(20px, 1vw + 14px, 24px); font-weight: 500; letter-spacing: -0.01em; }
.legal__part p { margin: 0; max-width: 62ch; line-height: 1.6; color: color-mix(in oklab, var(--p-ink) 82%, transparent); }
main.nf > .section.nf__sec { min-height: 100svh; display: grid; place-items: center; padding: calc(var(--nav, 72px) + 32px) var(--gut, 16px) 64px; }
.nf__wrap { display: grid; justify-items: center; text-align: center; gap: var(--s-4); }
.nf__code { margin: 0; font: 200 clamp(96px, 16vw, 200px)/.9 var(--font-display); letter-spacing: -0.04em; color: color-mix(in oklab, var(--p-ink) 16%, transparent); }
.nf__wrap h1 { margin: 0; }
.nf__text { margin: 0 0 var(--s-3); color: var(--muted); }
.nf__wrap > .btn { justify-self: center; width: auto; }

/* ---------- the services rail: a page control that is also the carousel's clock ---------- */
.rail-sec .rail-nav { align-items: center; }
.rail-dots { display: flex; align-items: center; padding-inline: 6px; }
.rail-dot { all: unset; box-sizing: border-box; position: relative; display: grid; place-items: center; width: 18px; height: 44px; cursor: pointer;
  transition: width .45s var(--lg-spring); }
.rail-dot i { display: block; position: relative; overflow: hidden; width: 7px; height: 7px; border-radius: 999px; background: rgb(24 24 24 / .2);
  transition: width .45s var(--lg-spring), background-color .3s var(--lg-ease); }
.rail-dot:hover i { background: rgb(24 24 24 / .4); }
.rail-dot.is-on { width: 40px; }
.rail-dot.is-on i { width: 28px; background: rgb(24 24 24 / .16); }
/* the fill: full when still (the dot marks where you are), a 4.5s clock while the rail turns by itself */
.rail-dot.is-on i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--p-ink); transform-origin: left; }
.rail-dot.is-on.is-tick i::after { transform: scaleX(0); animation: pager-fill 4500ms linear forwards; animation-play-state: paused; }
.rail-sec.is-auto .rail-dot.is-on.is-tick i::after { animation-play-state: running; }
.rail-sec:not(.is-auto) .rail-dot.is-on.is-tick i::after { animation: none; transform: scaleX(1); }
.rail-dot:focus-visible { outline: 2px solid var(--p-ink); outline-offset: -8px; border-radius: 999px; }
@media (max-width: 639px) {
  /* the phone: no arrows (a swipe), the dots stay and lead the foot */
  .rail-sec .rail-nav { display: flex; order: -1; }
  .rail-sec .rail-nav > .rail-btn { display: none; }
  .rail-sec .rail-dots { padding-inline: 0; margin-left: -6px; }
  .rail-sec .rail-foot { flex-direction: column; align-items: flex-start; gap: var(--s-3); }
}

/* ---------- a card says it opens: its arrow grows into "Details" on hover ---------- */
.tcard__go { width: auto; min-width: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 0;
  transition: transform .45s var(--lg-spring), gap .45s var(--lg-spring), padding .45s var(--lg-spring); }
.tcard__more { max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap; font-size: 14px; font-weight: 500;
  transition: max-width .45s var(--lg-spring), opacity .25s var(--lg-ease); }
@media (hover: hover) {
  .tcard:is(:hover, :focus-visible) .tcard__go { gap: 6px; padding: 0 14px 0 16px; transform: none; }
  .tcard:is(:hover, :focus-visible) .tcard__more { max-width: 8em; opacity: 1; }
}
.tcard:focus-visible .tcard__more { max-width: 8em; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .rail-dot, .rail-dot i, .tcard__go, .tcard__more { transition: none !important; } }
.rail-dot[hidden], .rail-dots[hidden] { display: none; }

/* ---------- the services rail on a phone: the row is as tall as its cards ---------- */
/* the card is a fixed 480px there, but the rail took the leftover of the screen, so the scroll box cut the card's
   foot and its shadow along a hard line; now the rail sizes to the card, and the shadow is a soft one that fits
   inside the rail's bottom room */
@media (max-width: 639px) {
  main > .section.rail-sec > .wrap { grid-template-rows: auto auto auto; height: auto; }
  .rail-sec .rail { height: auto; padding-bottom: 56px; margin-bottom: -40px; }
  .rail-sec .tcard, .rail-sec .tcard:hover { box-shadow: 0 14px 28px -18px rgb(0 0 0 / .32); }
  .rail-sec .tcard { height: 420px; }
}

/* ---------- the client names loop for ever, also under reduced motion (the client's call), at half speed ---------- */
@media (prefers-reduced-motion: reduce) {
  .js-drift .trust__list { animation-duration: var(--drift, 60s) !important; animation-iteration-count: infinite !important; }
}
/* the loop moves by one set of names (distinct.js measures --set), not by half the list */
.js-drift .trust__list { animation-name: d-loop; }
@keyframes d-loop { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, calc(-1 * var(--set, 50%)), 0); } }
/* below 1024 the panel is one column and the window grew with the list (nothing to scroll through): a set window */
@media (max-width: 1023px) {
  .trust__names { height: clamp(260px, 50svh, 440px); flex: none; }
}

/* ---------- the sliders' clocks run under reduced motion too (the client's call: phone = PC) ---------- */
/* the kit cuts every animation to .001ms under reduced motion; these fills are the sliders' timers, so they keep time */
@media (prefers-reduced-motion: reduce) {
  .steps__progress span.is-on::after { animation-duration: var(--step-ms, 7000ms) !important; }
  .pager__dot.is-on i::after { animation-duration: var(--slide-ms, 6500ms) !important; }
  .rail-dot.is-on.is-tick i::after { animation-duration: 4500ms !important; }
}

/* ---------- short laptop screens: the services section grows instead of pushing its cards under the foot ---------- */
/* the section stays at least a screen tall and the rail still fills what is left, but never gets shorter than a
   card (360) plus its shadow room, so at 1280x720 the cards no longer run under the text and arrows */
@media (min-width: 640px) {
  main > .section.rail-sec { height: auto; min-height: 100svh; display: flex; flex-direction: column; }
  main > .section.rail-sec > .wrap { flex: 1 1 auto; height: auto; }   /* keeps its own column width (a width: 100% here glued it to the screen edge) */
  .rail-sec .rail { min-height: 436px; }
}

/* ---------- the client names window takes its height from the panel, never from the list it scrolls ---------- */
/* (without this the repeated names made the window taller, which asked for more names: at 1024x700 it grew to 1100px) */
.trust__names { contain: size; min-height: 320px; }

/* ---------- the hero's words follow each slide's tone: white on a dark photograph, ink on a light one ---------- */
@media (min-width: 1024px) {
  .hero--uc .hero__text, .hero--uc .hero__text :is(h1, p, .promise) { transition: color .9s var(--lg-ease); }
  .hero--uc[data-tone="light"] .hero__text { color: #111; }
}
/* a wash under the words so the photograph never eats them: white on a light slide, near-black on a dark one, both
   fading out by 72% of the width. The strengths are measured (scratchpad hero-contrast.mjs): at least 3:1 for the
   headline and 4.5:1 for the lead over the worst 10% of the pixels under each line, on every slide. */
@media (min-width: 1024px) {
  .hero--uc { isolation: isolate; }
  .hero--uc > .hero__bg { z-index: -1; }
  .hero--uc::before, .hero--uc::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .9s var(--lg-ease); }
  .hero--uc::before { background: linear-gradient(90deg, rgb(12 12 14 / .56) 0%, rgb(12 12 14 / .46) 36%, rgb(12 12 14 / .18) 58%, rgb(12 12 14 / 0) 72%); }
  .hero--uc::after { background: linear-gradient(90deg, rgb(250 250 250 / .86) 0%, rgb(250 250 250 / .7) 36%, rgb(250 250 250 / .3) 58%, rgb(250 250 250 / 0) 72%); }
  .hero--uc[data-tone="dark"]::before, .hero--uc[data-tone="light"]::after { opacity: 1; }
}

/* ---------- the hero's pause on phones and tablets (WCAG 2.2.2): the dots stay hidden but keep the clock;
   the pause button sits on the photograph's lower right corner, just above the words ---------- */
@media (max-width: 1023px) {
  .hero--uc .hero__pager { visibility: visible !important; pointer-events: none !important; top: -100px; bottom: auto; left: auto; right: -8px;
    transform: none; width: auto; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0; }
  .hero--uc .hero__pager::before, .hero--uc .hero__pager::after { display: none; }
  .hero--uc .hero__pager .pager__dot { visibility: hidden; position: absolute; }
  .hero--uc .hero__pager .pager__pause { visibility: visible; pointer-events: auto; width: 44px; height: 44px; background: rgb(16 16 18 / .5);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff; }
}

@media (min-width: 640px) and (max-width: 1023px) { .hero--uc .hero__pager { top: -116px; } }

/* ---------- focus rings on the dark price card and the photo head of the service pages ---------- */
.phero__panel :focus-visible, .pcard :focus-visible { outline-color: #fff; }

/* ---------- the rail's clock: paused (not reset) while held, hidden from view or the tab is away ---------- */
.rail-sec.is-auto.is-held .rail-dot.is-on.is-tick i::after { animation-play-state: paused; }

/* ---------- reduced motion: the hero cross-fades softly instead of cutting, and does not zoom ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero--uc > .hero__bg { transition: opacity .6s ease !important; }
  .hero--uc > .hero__bg.is-on.is-drift img { scale: none; }
}

/* ---------- the phone menu: one frosted layer (the backdrop); the cards on it are near-opaque, not glass on glass ---------- */
@media (max-width: 1023px) {
  header.nav.is-open .nav__links, header.nav.is-open .nav__sheetfoot { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgb(255 255 255 / .86); }
}

/* ---------- audit 20.11: phones ---------- */
/* the service lists (hubs): on a narrow phone the price or line goes under the name instead of squeezing it */
@media (max-width: 479px) {
  .all-list a, .ilist--price > li { flex-wrap: wrap; row-gap: 4px; }
  .all-list a > span:first-child, .ilist--price > li > span:first-child { flex: 1 1 100%; }
  .all-list .v, .ilist--price .v { max-width: none; flex: 1 1 auto; text-align: start; }
}
@media (min-width: 480px) and (max-width: 639px) {
  .all-list .v { flex: 0 1 auto; min-width: 0; }
  .ilist--link a > span:first-child { min-width: min-content; }
}
/* short phones (an iPhone SE and the like): a lower photo and a two-line lead, so the main button is on the first screen */
@media (max-width: 639px) and (max-height: 700px) {
  .hero--uc { --photo: 22svh; }
  .hero--uc .hero__lead { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
/* a phone held sideways: the hero goes straight to the offer, and the open menu keeps room for its list */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 1023px) {
  .hero--uc { --photo: 0px; }
  .hero--uc .hero__promise { display: none; }
  /* html-prefixed: mobile.css loads after this file */
  html header.nav.is-open .nav__links { --foot: 72px; }
  html header.nav.is-open .nav__sheetfoot { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: center; top: auto; bottom: 8px; padding: 8px; }
  html .nav__sheetfoot .btn { height: 48px; }
  html .nav__sheetrow .nav__pill { height: 44px; }
  .hero--uc .hero__lead { display: none; }
}
/* the phone bar's controls keep their look but take a 44px tap */
.nav__icon, .lang-dd > summary { position: relative; }
.nav__icon::after, .lang-dd > summary::after { content: ""; position: absolute; inset: -2px -1px; }

/* ---------- audit 20.11: small things ---------- */
.rail-dot { width: 24px; }
.nav__lang a { padding-inline: 10px; }
@media (min-width: 1024px) { .pager__pause { min-width: 44px; min-height: 44px; } }
.qa__item summary { overflow: clip; }
@media (min-width: 640px) and (max-width: 1023px) { .mini { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
html { scroll-padding-top: calc(var(--nav, 56px) + 16px); }

/* ---------- the phone sheet's foot: the phone number, then Telegram and Instagram (icons; names from 640px) ---------- */
@media (max-width: 1023px) {
  html .nav__sheetrow { grid-template-columns: minmax(0, 1fr) auto auto; }
  html .nav__sheetrow .nav__pill--icon { width: 48px; padding: 0; font-size: 0; gap: 0; }
  html .nav__sheetrow .nav__pill--icon svg { width: 20px; height: 20px; }
}
@media (min-width: 640px) and (max-width: 1023px) {
  html .nav__sheetrow .nav__pill--icon { width: auto; padding: 0 16px; font-size: 15px; gap: 8px; }
}
@media (max-height: 500px) and (orientation: landscape) and (max-width: 1023px) {
  html .nav__sheetrow .nav__pill--icon { width: 44px; padding: 0; font-size: 0; gap: 0; }
}

/* the closing panel's contacts: phone · Telegram · Instagram wrap on a narrow phone */
.cta__meta { flex-wrap: wrap; row-gap: 4px; }
