/* Rogov Dental Clinic — styles. Tokens in :root (named after Figma styles), base, components, then one block per section. */
:root {
  /* Figma colour styles */
  --background-black: #0c0904;
  --foreground-white: #ffffff;
  --foreground-black: #000000;
  --foreground-gray: #b8b8b8;
  --action-main: #cdbd85;
  --action-secondary: #dcca8a;
  --light-main: #f2ece7;
  --surface: rgba(255, 255, 255, 0.16);
  --surface-hover: rgba(255, 255, 255, 0.24);
  --line: rgba(255, 255, 255, 0.24);
  --card-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  --error: #ff5757;

  /* Fonts */
  --font-sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "STIX Two Text", Georgia, "Times New Roman", serif;

  /* Layout */
  --page-max: 1440px;
  --gutter: 80px;
  /* section top / bottom padding, in steps at the existing breakpoints: 100 (Figma) → 64 (≤1279) → 40 (≤1023 = phone) */
  --section-pad: 100px;
  /* inner spacing, stepped at the same breakpoints (Figma desktop values here, see Responsive):
     --space-head = section head → content (and between the section's big rows), --space-block = between columns /
     big blocks, --head-gap / --head-text-gap = inside .section-head */
  --space-head: 80px; --space-block: 80px; --head-gap: 32px; --head-text-gap: 16px;
  --header-h: 96px;

  /* Fluid display sizes (= Figma values at 1440px) */
  --fs-hero: clamp(56px, 8.9vw, 128px);
  --fs-h2: clamp(40px, 5vw, 72px);
  --fs-48: clamp(36px, 3.34vw, 48px);
  --fs-40: clamp(30px, 2.78vw, 40px);
  --fs-32: clamp(24px, 2.23vw, 32px);

  --ease-default: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-figma-out: cubic-bezier(0, 0, 0.58, 1);   /* Figma "Ease out" (smart animate on hover states) */
  --dur-default: 0.25s;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* dark UI for native parts (scrollbar, form controls); scroll padding keeps keyboard focus clear of the fixed header */
html {
  color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 40px);
  -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent;   /* own :hover / :active states instead */
}
html, body { margin: 0; }
html { background: var(--background-black); }   /* overscroll areas (iOS / macOS bounce) stay dark */
/* no rubber-band bounce with a mouse / trackpad: its gap showed the white behind the page (the chrome's device iframe);
   vertical only — sideways swipe-back keeps working; touch screens keep the bounce + pull-to-refresh (dark, see above) */
@media (pointer: fine) { html { overscroll-behavior-y: none; } }
body {
  background: var(--background-black);
  color: var(--foreground-white);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 28px;
  font-feature-settings: "liga" 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
p, h1, h2, h3, figure, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
em { font-style: italic; }
:focus-visible { outline: 2px solid var(--action-secondary); outline-offset: 3px; }
#main:focus-visible { outline: none; }   /* skip-link target, not a control */
a, button, input, select, label { touch-action: manipulation; }   /* no double-tap zoom delay */

/* Skip link: off-screen until focused with the keyboard */
.skip-link {
  position: fixed; top: 16px; left: 16px; z-index: 200; padding: 12px 20px; border-radius: 28px;
  background: var(--foreground-white); color: var(--foreground-black); font-weight: 600; font-size: 16px; line-height: 24px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }   /* only keyboard (Tab) ever focuses it */
[hidden] { display: none !important; }
.br-m { display: none; }   /* a line break the phone layout has in Figma (shown ≤500px, see Responsive) */

.container { width: 100%; max-width: var(--page-max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Type ---------- */
.eyebrow {
  font-weight: 700; font-size: 20px; line-height: 24px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--action-secondary);
}
.h2, .hero__title, .title-48, .title-40, .title-32, .counter, .stat__num, .history__years-track {
  font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.04em;
}
.h2 { font-size: var(--fs-h2); line-height: 0.889; }
.h2, .hero__title, .title-48, .title-40 { text-wrap: balance; }   /* no lone word on the last line */
.h2 em, .title-40 em, .hero__title em { display: block; }
.title-48 { font-size: var(--fs-48); line-height: 1; }
.title-40 { font-size: var(--fs-40); line-height: 0.9; }
.title-32 { font-family: var(--font-serif); font-style: italic; font-size: var(--fs-32); line-height: 0.875; text-wrap: pretty; }
.lead, .text-gray { color: var(--foreground-gray); font-size: 18px; line-height: 28px; }
.lead { max-width: 520px; }
.text-gold { color: var(--action-secondary); }
.label {
  font-weight: 700; font-size: 14px; line-height: 18px; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--action-secondary);
}
.note { color: var(--foreground-gray); font-size: 16px; line-height: 24px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 20px 16px 24px; border-radius: 28px;
  font-weight: 600; font-size: 18px; line-height: 24px; white-space: nowrap;
  transition: background-color var(--dur-default) var(--ease-default), transform 0.15s var(--ease-default);
}
.btn img { flex: none; }
.btn:active { transform: scale(0.97); }
/* Figma button/main: Default → Hover = bg Action/Secondary + plus icon turns 90° clockwise, smart animate 0.3s ease-out */
.btn--main { background: var(--action-main); color: var(--foreground-black); transition: background-color 0.3s var(--ease-figma-out), transform 0.15s var(--ease-default); }
.btn--main img { transition: transform 0.3s var(--ease-figma-out); }
.btn--main:hover { background: var(--action-secondary); }
.btn--main:hover img { transform: rotate(90deg); }
/* Figma button/secondary: Default → Hover = bg 16% → 24% white + the ↗ arrow turns 45° clockwise (→) around its own
   centre (10.5, 13.5 in the 24px icon), smart animate 0.3s ease-out */
.btn--secondary { background: var(--surface); color: var(--foreground-white); transition: background-color 0.3s var(--ease-figma-out), transform 0.15s var(--ease-default); }
.btn--secondary img { transform-origin: 10.5px 13.5px; transition: transform 0.3s var(--ease-figma-out); }
.btn--secondary:hover { background: var(--surface-hover); }
.btn--secondary:hover img { transform: rotate(45deg); }
.btn--icon { padding: 16px; background: var(--surface); }
.btn--icon:hover, .social:hover { background: var(--surface-hover); }
.btn--arrow:disabled { background: transparent; cursor: default; transform: none; }
.btn--arrow:disabled img { opacity: 0.5; }

/* Figma button/tertiary: Default → Hover = text + arrow Action/Main → Action/Secondary and the ↗ arrow turns 45°
   clockwise (→) around its own centre, smart animate 0.3s ease-out. Footer links are the same component overridden
   white — they keep the colour and only turn the arrow. */
.link-gold, .link-white {
  display: inline-flex; align-items: center; gap: 4px; height: 24px;
  font-weight: 600; line-height: 24px; transition: color 0.3s var(--ease-figma-out);
}
.link-gold { color: var(--action-main); font-size: 18px; }
.link-white { color: var(--foreground-white); font-size: 16px; }
.link-gold:hover { color: var(--action-secondary); }
.link-arrow { flex: none; transform-origin: 10.5px 13.5px; transition: transform 0.3s var(--ease-figma-out); }
:is(.link-gold, .link-white):hover .link-arrow { transform: rotate(45deg); }

.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  padding: 16px 24px; border-radius: 28px; background: var(--surface);
  font-weight: 600; font-size: 18px; line-height: 24px; white-space: nowrap;
  transition: background-color var(--dur-default) var(--ease-default), color var(--dur-default) var(--ease-default);
}
.chip:hover { background: var(--surface-hover); }
.chip.is-active { background: var(--foreground-white); color: var(--foreground-black); }

/* Photo frame 600×384 (Services, Price) */
.media-frame { aspect-ratio: 600 / 384; overflow: hidden; }
.media-frame img { width: 100%; height: 100%; object-fit: cover; }
/* 56px round icon on the surface colour (features, socials); the interactive one is .btn--icon */
.icon-circle { flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 28px; background: var(--surface); }

.contacts { display: flex; flex-direction: column; gap: 12px; }
.contacts li { display: flex; align-items: center; gap: 8px; color: var(--action-secondary); font-weight: 600; font-size: 18px; line-height: 24px; }
.contacts a:hover { text-decoration: underline; text-underline-offset: 3px; }

.counter { display: flex; align-items: baseline; gap: 12px; }
.counter__current { font-style: italic; font-size: var(--fs-h2); line-height: 0.889; font-variant-numeric: lining-nums tabular-nums; }
.counter__total { color: var(--foreground-gray); font-size: var(--fs-32); line-height: 0.875; white-space: pre; }
.arrows { display: flex; gap: 12px; }
.slider-nav { display: flex; align-items: flex-start; justify-content: space-between; }


/* Content switch = fade-out → fade-in (Services slides, Price tabs) — driven by swap() in app.js: a copy of the old
   content (.swap-ghost) fades out on top in 0.3s, then the new items ([data-swap], order in --i) fade in 60ms apart.
   "next" rises from below, "prev" comes from above. */
.swap-stage { position: relative; }
.swap-ghost { position: absolute; inset: 0 0 auto; pointer-events: none; animation: swap-out 0.3s ease-in forwards; }
.swap-ghost.is-out-next { --to: -24px; }
.swap-ghost.is-out-prev { --to: 24px; }
.is-in-next { --from: 40px; }
.is-in-prev { --from: -40px; }
:is(.is-in-next, .is-in-prev) [data-swap] {
  animation: swap-in 0.6s var(--ease-default) both;
  animation-delay: calc(0.28s + var(--i, 0) * 0.06s);
}
@keyframes swap-in { from { opacity: 0; transform: translateY(var(--from)); } }
@keyframes swap-out { to { opacity: 0; transform: translateY(var(--to)); } }

/* ---------- Page background: the Figma "Bg" layers (4383:2295) + "eclipse" fades ----------
   ::before = a whole copy of the texture (texture-soft.webp = Figma "Texture" 4411:1221 at 12% (user decision; Figma 16%), transparent top / bottom
   20%, alpha baked in), NOT clipped by its section: it runs on over the next sections. A section that starts a layer sets
   --tex (+ --tex-top = offset from its top).
   ::after = the Figma "eclipse" fades over the texture (black → transparent): --fade-t (dark at the top) starts
   --fade-t-y below the section top, --fade-b (dark at the bottom) reaches black --fade-b-y above the section bottom and
   stays black down to it; a negative --fade-b-y runs it past the bottom; --fade-b-tail keeps it black that far into
   the next section. Either may leave the section (its box has 1200px of room both ways).
   Hosts: every .section + .services-track (the services section itself — NOT the sticky .services-pin inside it: a
   sticky box is its own stacking context, its layers would paint over the next sections' fades).
   z: textures −2 < fades −1 < content, all in #main's stacking context (#main clips them). */
#main { isolation: isolate; overflow: clip; }
.section { position: relative; padding-block: var(--section-pad); }
:is(.section, .services-track) {
  --texture: url("../img/texture-soft.webp"); --fade-h: 464px;
  --fade-top: linear-gradient(var(--background-black), rgba(12, 9, 4, 0));
  --fade-bottom: linear-gradient(rgba(12, 9, 4, 0), var(--background-black) var(--fade-h), var(--background-black));
}
:is(.section, .services-track)::before, :is(.section, .services-track)::after { content: ""; position: absolute; pointer-events: none; }
:is(.section, .services-track)::before {
  z-index: -2; top: var(--tex-top, 0); left: 50%; translate: -50% 0;
  width: max(100%, 1440px); aspect-ratio: 736 / 1307;   /* the texture's own ratio: 1440 → 2557 */
  background: var(--tex, none) center / 100% 100% no-repeat;
}
:is(.section, .services-track)::after {
  z-index: -1; inset: -1200px 0;
  background-image: var(--fade-t, none), var(--fade-b, none);
  background-repeat: no-repeat;
  background-size: 100% var(--fade-h), 100% calc(var(--fade-h) + max(0px, var(--fade-b-y, 0px)) + var(--fade-b-tail, 0px));
  background-position: 0 calc(1200px + var(--fade-t-y, 0px)), 0 calc(100% - 1200px - min(0px, var(--fade-b-y, 0px)) + var(--fade-b-tail, 0px));
}
/* Anchor jumps (menu, chrome flows, chips) land with the eyebrow 40px under the fixed header: html scroll-padding
   gives header + 40, each section pulls back by its own top padding (negative margin) */
.section, .services-track { scroll-margin-top: calc(-1 * var(--section-pad)); }
.section--booking { scroll-margin-top: calc(-1 * var(--booking-pad)); }
.services-track.is-pinned { scroll-margin-top: calc(-1 * (var(--header-h) + 40px)); }   /* the pinned block already starts 40px under the header */
.section-head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--head-gap); }
.section-head__text { display: flex; flex-direction: column; gap: var(--head-text-gap); }

/* ---------- Preloader (every load of the home page): tree draws bottom-up → moves left, text slides out of it and fades in (~2.1s) ---------- */
/* every preloader / reveal motion is ease-in-out (user request) — a smooth cubic one, not the weak built-in curve;
   phases overlap so the motion never stalls. Timeline: draw 0–1.1s, fill 0.6–1.2s, move 1.1–1.8s, text 1.3–2.1s. */
/* the leave (preloader out, site in) is longer and gentler (sine ease-in-out): no fast middle, user request 2026-10-12 */
:root { --pl-ease: cubic-bezier(0.65, 0, 0.35, 1); --pl-leave: 0.9s; --pl-leave-ease: cubic-bezier(0.37, 0, 0.63, 1); }
/* the scroll lock keeps the scrollbar's place (classic scrollbars: mouse / "Always show") — no 15px jump when it leaves */
html { scrollbar-gutter: stable; }
html.is-loading { overflow: hidden; }
.preloader {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background: var(--background-black);   /* solid: the site under it is invisible anyway; no full-screen blur to fade */
  transition: opacity var(--pl-leave) var(--pl-leave-ease), visibility var(--pl-leave);
}
html:not(.is-loading) .preloader:not(.is-leaving) { display: none; }
.preloader.is-leaving { opacity: 0; visibility: hidden; }
/* the site is invisible under the preloader and fades 0 → 100% while it leaves (same curve, user request);
   .is-revealing (preloader.js) holds the transition only for that moment, so the header keeps its own transitions after */
html.is-loading :is(.header, #main, .footer) { opacity: 0; }
html.is-revealing :is(.header, #main, .footer) { transition: opacity var(--pl-leave) var(--pl-leave-ease); }
.preloader__logo { width: min(320px, 64vw); height: auto; overflow: visible; }
.preloader__logo path { fill: #eace76; }

.pl-rise { transform: translateY(43px); animation: pl-rise 1.1s var(--pl-ease) forwards; }
.preloader__logo .pl-tree__line {
  fill: none; stroke: #eace76; stroke-width: 0.4;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: pl-draw 1.1s var(--pl-ease) forwards;
}
.pl-tree__fill { opacity: 0; animation: pl-fill 0.6s 0.6s var(--pl-ease) forwards; }
/* From 1.1s the tree (with the text's clip window) moves centre → its place in the logo;
   from 1.3s the text slides out from behind the tree's edge inside that window */
.pl-move { transform: translateX(63.35px); animation: pl-to-left 0.7s 1.1s var(--pl-ease) forwards; }
.pl-text {   /* from 1.3s: slides out and fades in */
  transform: translateX(-124px); opacity: 0;
  animation: pl-text-out 0.8s 1.3s var(--pl-ease) forwards, pl-fill 0.6s 1.3s var(--pl-ease) forwards;
}
@keyframes pl-rise { to { transform: translateY(-24px); } }
@keyframes pl-draw { to { stroke-dashoffset: 0; } }
@keyframes pl-fill { to { opacity: 1; } }
@keyframes pl-to-left { to { transform: none; } }
@keyframes pl-text-out { to { transform: none; } }

/* ---------- Header ---------- */
.header { position: fixed; inset: 0 0 auto; z-index: 100; transition: background-color 0.3s var(--ease-default), backdrop-filter 0.3s var(--ease-default); }
.header.is-filled { background: rgba(12, 9, 4, 0.8); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.header__inner {
  display: flex; align-items: center; gap: 80px;
  max-width: var(--page-max); height: var(--header-h); margin-inline: auto; padding-inline: var(--gutter);
}
.header__logo { flex: none; display: flex; align-items: center; width: 160px; height: 80px; }
.header__nav { flex: 1; display: flex; align-items: center; gap: 40px; }
.nav-link { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-weight: 500; font-size: 18px; line-height: 24px; color: var(--foreground-white); transition: color var(--dur-default) var(--ease-default); }
.nav-link:hover, .lang__toggle[aria-expanded="true"] { color: var(--action-main); }
.header__actions { flex: none; display: flex; align-items: center; gap: 12px; }
.header__burger { display: none; }

.lang { position: relative; display: flex; }   /* box = the toggle exactly (no 28px line box), so the panel's "UA" lands on it */
.lang__toggle svg { flex: none; transition: transform var(--dur-default) var(--ease-default); }
.lang__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
/* Figma header/filled "Language Dropdown": a square dark panel laid over the toggle so "UA" stays in place
   (panel = toggle − 1px border − 20px padding); current language gold + check, the other one white (gold on hover) */
.lang__menu {
  position: absolute; top: -21px; left: -21px; z-index: 1;
  display: flex; flex-direction: column; gap: 20px; padding: 20px;
  background: var(--background-black); border: 1px solid rgba(255, 255, 255, 0.08);
  animation: lang-in 0.2s var(--ease-figma-out);
}
.lang__menu li { display: flex; }   /* rows exactly 24px high (no inherited 28px line box) */
.lang__menu .nav-link { white-space: nowrap; }
.lang__menu .nav-link img { flex: none; width: 24px; max-width: none; }   /* the panel hugs its content — don't let the check shrink */
.lang__menu a[aria-current] { color: var(--action-secondary); }
@keyframes lang-in { from { opacity: 0; } }

.header__phone-dark, .header__burger-close, .header__burger[aria-expanded="true"] .header__burger-open { display: none; }
.header__burger[aria-expanded="true"] .header__burger-close { display: block; }

/* Mobile menu (Figma "Mobile Menu" 4174:14600): a full-screen layer over the page, right under the header (which stays
   as it is) — the page shows through blurred and darkened; links centred with lines between, language switch,
   CTA + phone pinned to the bottom */
html.menu-open { overflow: hidden; }
.mobile-menu {
  position: fixed; inset: 0; z-index: 99; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; align-items: center;
  padding: calc(var(--header-h) + 64px) var(--gutter) 40px;
  background: rgba(12, 9, 4, 0.8); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  animation: menu-fade 0.6s cubic-bezier(0.4, 0, 0.2, 1);   /* soft fade, no movement */
}
/* open = fade in, close = fade out (.is-closing, app.js hides it on animationend) — no movement */
.mobile-menu.is-closing { animation: menu-fade-out 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards; pointer-events: none; }
@keyframes menu-fade { from { opacity: 0; } }
@keyframes menu-fade-out { to { opacity: 0; } }
.mobile-menu__nav { display: flex; flex-direction: column; align-items: center; width: 100%; }
.mobile-menu__nav a {
  display: flex; justify-content: center; width: 100%; padding-block: 24px;
  font-family: var(--font-serif); font-size: 32px; line-height: 32px; letter-spacing: -0.04em;
  transition: color var(--dur-default) var(--ease-default);
}
.mobile-menu__nav a:first-child { padding-top: 0; }
.mobile-menu__nav a + a { border-top: 1px solid var(--line); }
.mobile-menu__nav a:hover { color: var(--action-main); }
.mobile-menu__lang { display: flex; align-items: center; gap: 20px; padding-top: 40px; font-weight: 500; font-size: 18px; line-height: 24px; color: var(--foreground-gray); }
.mobile-menu__lang a + a { padding-left: 20px; border-left: 1px solid var(--line); }
.mobile-menu__lang a { transition: color var(--dur-default) var(--ease-default); }
.mobile-menu__lang a:hover { color: var(--action-main); }
.mobile-menu__lang a[aria-current] { color: var(--action-secondary); }
.mobile-menu__actions { display: flex; flex-direction: column; gap: 12px; width: 100%; margin-top: auto; padding-top: 40px; }
.mobile-menu__actions .btn { width: 100%; max-width: none; }
.mobile-menu__phone { padding-left: 20px; padding-right: 24px; }
.mobile-menu__phone:hover img { transform: none; }   /* a phone icon, not the ↗ arrow that turns on hover */

/* ---------- Hero ---------- */
/* Hero = one screen at any width: header | gap | head | gap | place + chips (+ CTA) | bottom padding. The two gaps
   (::before / ::after spacers) share the free height equally, each 100…240 (--hero-gap-min / -max; Figma ≈ 168).
   Too short a screen: gaps stay 100 and the hero grows past it. Too tall: gaps stop at 240 and the hero gets shorter
   than the screen — the cap --hero-max (content + 2 × max) is set by app.js; without it the hero just fills the screen. */
.hero { position: relative; isolation: isolate; display: flex; --hero-gap-min: 100px; --hero-gap-max: 240px; }
/* Figma: video fill (cover) + "Rectangle 240648021" warm tint over the whole hero + "Rectangle 240648022" fade to
   black over the bottom half — the fade is CSS, so any screen size ends on exactly --background-black (= Directions) */
.hero__bg {
  position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--background-black) url("../img/hero-poster.jpg") center / cover no-repeat;
}
.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__bg::before, .hero__bg::after { content: ""; position: absolute; inset: 0; z-index: 1; }   /* over the <video> (without it the tint sat under the video) */
.hero__bg::before { background: linear-gradient(rgba(97, 57, 8, 0.2), rgba(36, 22, 5, 0.5)); }
/* eased ("scrim") fade instead of a linear one: a linear alpha ramp shows a hard edge where it starts on bright video
   frames; starts higher (35% instead of the Figma 50%) since the eased curve stays near-transparent in its first third */
.hero__bg::after {
  top: 35%;
  background: linear-gradient(rgba(12, 9, 4, 0), rgba(12, 9, 4, 0.002) 1.8%, rgba(12, 9, 4, 0.008) 4.8%,
    rgba(12, 9, 4, 0.021) 9%, rgba(12, 9, 4, 0.042) 13.9%, rgba(12, 9, 4, 0.075) 19.8%, rgba(12, 9, 4, 0.126) 27%,
    rgba(12, 9, 4, 0.194) 35%, rgba(12, 9, 4, 0.278) 43.5%, rgba(12, 9, 4, 0.382) 53%, rgba(12, 9, 4, 0.541) 66%,
    rgba(12, 9, 4, 0.738) 81%, var(--background-black));
}
.hero__inner {
  display: flex; flex-direction: column; padding-top: var(--header-h); padding-bottom: 80px;
  min-height: min(100vh, var(--hero-max, 100vh)); min-height: min(100svh, var(--hero-max, 100svh));
}
.hero__inner::before, .hero__inner::after { content: ""; flex: 1 1 0; min-height: var(--hero-gap-min); max-height: var(--hero-gap-max); }
.hero__head { order: 1; }
.hero__inner::after { order: 2; }
.hero__bottom { order: 3; }
.hero__head { display: flex; flex-direction: column; align-items: center; gap: 32px; text-align: center; }
.hero__title { font-size: var(--fs-hero); line-height: 0.8125; }
.hero__bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; }
.hero__place { display: flex; flex-direction: column; gap: 24px; }
.hero__services { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px 12px; max-width: 446px; }
.hero__cta { display: none; }

/* ---------- Directions ---------- */
.section--directions { --tex: var(--texture); --tex-top: 100px; --fade-t: var(--fade-top); --fade-t-y: 100px; }   /* Bg 1: runs on over About */
.section--directions .container { display: flex; flex-direction: column; gap: calc(var(--space-head) / 2); }   /* Figma 40 of 80 */
.problems { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, auto); grid-auto-flow: column; padding-bottom: 40px; }
.problem { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding-block: 40px; border-bottom: 1px solid var(--line); }
.problem:nth-child(3n) { border-bottom: 0; }
.problem:nth-child(n + 4) { padding-left: 40px; border-left: 1px solid var(--line); }

/* Figma 4383:1539 (user decision — not the photo variant 4403:1668): no photo, text left + CTA right (its bottom 4px
   above the text's), 268 high */
.offer { background: var(--card-gradient); }
.offer__body { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; padding: 80px 80px 76px; }
.offer__body .btn { flex: none; margin-bottom: 4px; }
.offer__text { display: flex; flex-direction: column; gap: 16px; max-width: 720px; }
.offer__title { display: flex; align-items: flex-end; gap: 16px; }
.offer__title em { display: inline; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.feature { display: flex; align-items: center; gap: 20px; padding-block: 40px; border-top: 1px solid var(--action-main); }

/* ---------- About ---------- */
/* tail: on tablets the sections are shorter and Bg 1 ends a few px into Services — keep that dark (no texture there anyway) */
.section--about { --fade-b: var(--fade-bottom); --fade-b-y: 117px; --fade-b-tail: 80px; }
.section--about .container { display: flex; flex-direction: column; gap: var(--space-head); }
.about__photo { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: rgba(255, 255, 255, 0.08); }
.about__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 36%; }
.about__text { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.stat { display: flex; align-items: center; gap: 16px; padding-top: 40px; border-top: 1px solid var(--action-main); min-height: 104px; }
.stat__num { font-style: italic; font-size: var(--fs-h2); line-height: 0.889; white-space: nowrap; }
.stat__label--wide { max-width: 177px; }

/* ---------- Services ---------- */
.section--services .container { display: flex; flex-direction: column; gap: var(--space-head); }
/* Desktop pin (.is-pinned set by app.js when it fits): #services is a tall scroll track, .services-pin sticks at exactly
   one screen high — heading 40px under the header, CTA row at the bottom, the service centred between; the background,
   heading, counter and arrows stay, scrolling switches the services. */
.services-track { position: relative; }
.services-pin { position: sticky; top: 0; }
.services-track.is-pinned .services-pin { height: 100vh; height: 100svh; padding: calc(var(--header-h) + 40px) 0 48px; }
.services-track.is-pinned .container { height: 100%; gap: 40px; }
.services-track.is-pinned .swap-stage { margin-block: auto; }
.services-track.is-pinned .service__media { aspect-ratio: auto; height: clamp(240px, calc(100svh - 504px), 384px); }
.service { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-block); align-items: start; }
.service__body { display: flex; flex-direction: column; gap: 40px; padding-top: 40px; }
.service__desc { display: flex; flex-direction: column; gap: 20px; }
.service__desc .title-32 { line-height: 0.875; }
.service__bottom { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-block); align-items: start; }
.service__bottom .btn { justify-self: start; }

/* ---------- Portfolio ---------- */
/* desktop: Bg 2 + its top fade start with Services (992 high in Figma) — anchored on Cases, the pinned services track is
   taller; tablet / phone (no pin) hang them on .services-track itself, see Responsive */
.section--cases { --tex: var(--texture); --tex-top: -992px; --fade-t: var(--fade-top); --fade-t-y: -992px; --fade-b: var(--fade-bottom); }
.section--cases .container { display: flex; flex-direction: column; gap: var(--space-head); }
.cases { display: flex; flex-direction: column; align-items: center; gap: var(--space-block); }
.cases__stage {
  position: relative; width: 100%; height: 620px; overflow: hidden; background: var(--card-gradient);
  touch-action: pan-y; user-select: none; -webkit-user-select: none;   /* sideways drags go to the carousel (app.js) */
}
.cases__stage img { -webkit-user-drag: none; }
.cases__nav { width: min(720px, 100%); }
/* Carousel = one horizontal strip: every work of the filter is a .case placed by app.js (transform) — the current one
   centred at full size, its neighbours peeking at half size (as in Figma), the rest off-stage; switching slides the
   whole strip sideways. Every card shows its before/after split in the middle; the photos never animate. */
.case {
  position: absolute; top: 0; left: 0; width: var(--case-w, 720px); transform-origin: 0 0;
  transition: transform 0.75s var(--ease-default), opacity 0.75s var(--ease-default);
}
.case:not(.is-active) { cursor: pointer; }
.case.is-far { opacity: 0; pointer-events: none; }
/* the before/after photos never animate: every card shows the split in the middle, only the centred one is draggable;
   desktop peeks (half size) hide their caption, as in Figma */
.case:not(.is-active) .compare__range { display: none; }
@container cases (min-width: 840px) {
  .case__meta { transition: opacity 0.4s var(--ease-default); }
  .case:not(.is-active) .case__meta { opacity: 0; }
}
.cases__stage.no-anim .case { transition: none; }
.case__meta { display: flex; height: 100px; padding-top: 40px; }
.case__meta > div { width: 50%; display: flex; flex-direction: column; }
.case__meta small { color: var(--foreground-gray); font-size: 12px; line-height: 16px; }
.case__meta strong { font-weight: 600; font-size: 16px; line-height: 24px; }
.case__meta div + div strong { font-weight: 500; }

.compare { position: relative; height: 520px; overflow: hidden; background: #fff; --pos: 50%; touch-action: pan-y; }
.compare__img { position: absolute; inset: 0; }
.compare__img img { width: 100%; height: 100%; object-fit: cover; }
.compare__img--after { clip-path: inset(0 0 0 var(--pos)); }
.compare__img::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(rgba(12, 9, 4, 0), rgba(12, 9, 4, 0.5)); }
.compare__label { position: absolute; bottom: 20px; z-index: 1; pointer-events: none; }   /* + .title-32 */
.compare__label--before { left: 20px; }
.compare__label--after { right: 20px; }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--background-black); pointer-events: none; z-index: 2; }
.compare__knob {
  position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 28px; background: var(--background-black);
}
.compare__knob img { position: absolute; top: 16px; }
.compare__knob img:first-child { left: 8px; }
.compare__knob img:last-child { left: 24px; }
.compare__range { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare:has(.compare__range:focus-visible) .compare__knob { outline: 2px solid var(--action-secondary); outline-offset: 3px; }


/* ---------- History ---------- */
/* History has its own texture copy, clipped to the section (as in Figma: from 970 above its top) */
.section--history { --tex: var(--texture); --tex-top: -970px; --fade-t: var(--fade-top); --fade-b: var(--fade-bottom); }
.section--history::before { top: 0; bottom: 0; aspect-ratio: auto; background-size: 100% auto; background-position: center var(--tex-top); }
.section--history .container { display: flex; flex-direction: column; gap: var(--space-head); }
.history { display: flex; flex-direction: column; align-items: center; gap: 40px; --step-w: 540px; --step-gap: 40px; --inset: 80px; }
.history__viewport { width: 100%; overflow: hidden; padding: 80px 0 28px var(--inset); background: var(--card-gradient); }
.history__track, .history__years-track { display: flex; gap: var(--step-gap); transition: transform 0.6s var(--ease-default); will-change: transform; }
.step { flex: none; width: var(--step-w); display: flex; flex-direction: column; gap: 40px; }
.step__img { position: relative; height: 376px; overflow: hidden; }
.step__img img { width: 100%; height: 100%; object-fit: cover; }
.step__img--cutout { background: url("../img/texture.jpg") 50% -291px / 100% auto no-repeat; }
.step__img--cutout::before { content: ""; position: absolute; inset: 0; background: rgba(12, 9, 4, 0.5); }
.step__img--cutout img { position: absolute; left: 0; top: -50px; width: 118.5%; height: auto; max-width: none; object-fit: contain; }
.step__text { display: flex; flex-direction: column; gap: 8px; }
.step__text .title-32 { line-height: 28px; }
.history__progress { position: relative; width: calc(100% - 2 * var(--inset)); height: 2px; overflow: hidden; background: var(--surface); }
.history__progress span { position: absolute; inset: 0; background: var(--action-main); transform-origin: 0 50%; transform: scaleX(var(--progress, 0)); transition: transform 0.6s var(--ease-default); }   /* --progress 0…1 from app.js (≥ 2px) */
.history__bottom { position: relative; width: 100%; height: 64px; }
.history__years { height: 100%; overflow: hidden; padding-left: var(--inset); }
.history__years-track { font-style: italic; font-size: var(--fs-h2); line-height: 64px; }
.history__years-track span { flex: none; width: var(--step-w); }
.history__arrows { position: absolute; top: 0; right: var(--inset); z-index: 1; }
.history__bottom::after {
  content: ""; position: absolute; top: 0; right: 0; width: 284px; height: 64px;
  background: linear-gradient(90deg, rgba(18, 13, 7, 0), #120d07 64px);
}

/* ---------- Price ---------- */
.section--price { --tex: var(--texture); --tex-top: 100px; --fade-t: var(--fade-top); }   /* Bg 3: runs on over Booking */
.section--price .container { display: flex; flex-direction: column; gap: var(--space-head); }
.price { display: grid; grid-template-columns: 600px 1fr; gap: var(--space-block); align-items: start; }
.price__list li { display: flex; align-items: center; gap: 40px; padding-block: 32px; border-bottom: 1px solid var(--line); font-size: 18px; line-height: 24px; }
.price__list li:first-child { padding-top: 0; }
.price__list li:last-child { border-bottom: 0; }
.price__list li > span:first-child { flex: 1; }
.price__value { flex: none; color: var(--action-secondary); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }   /* + .title-32 */
.price__cta { padding-block: 32px; }   /* + the last row's 32 above, the note's 32 below = 64 | 64 (Figma); 48 at ≤1279, 40 at ≤1023 (= phone) */
.price .note { padding-top: 32px; }

/* ---------- Booking ---------- */
.section--booking { --booking-pad: max(40px, 0.8 * var(--section-pad)); --fade-b: var(--fade-bottom); padding-block: var(--booking-pad); }   /* Figma 80 of 100, never under 40 */
.section--booking .container { display: flex; flex-direction: column; gap: calc(var(--space-head) * 0.8); }   /* Figma 64 of 80 */
.booking { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-block); align-items: start; }
.booking__form { display: flex; flex-direction: column; gap: 32px; padding: 40px; background: var(--card-gradient); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__caption { color: var(--foreground-gray); font-weight: 500; font-size: 12px; line-height: 16px; }
.field__control {
  width: 100%; padding: 15px 16px; border: 1px solid var(--line); border-radius: 0; background: transparent;
  font-size: 18px; line-height: 24px; color: var(--foreground-white); outline: none; appearance: none;
  transition: border-color var(--dur-default) var(--ease-default);
}
.field__control::placeholder { color: var(--foreground-white); opacity: 0.5; }
.field__control:hover { border-color: rgba(255, 255, 255, 0.4); }
.field__control:focus-visible { border-color: var(--action-main); }
.field.is-invalid .field__control { border-color: var(--error); }
.field__select { position: relative; }
.field__select select { padding-right: 52px; cursor: pointer; }
.field__select select:invalid, .field__select select.is-empty { color: rgba(255, 255, 255, 0.5); }
.field__select option { background-color: var(--background-black); color: var(--foreground-white); }
.field__select img { position: absolute; right: 16px; top: 50%; margin-top: -12px; pointer-events: none; }
.field__error { display: flex; align-items: center; gap: 4px; font-weight: 500; font-size: 12px; line-height: 16px; }
.field__error img { margin: 2px; }
.booking__submit { padding-top: 16px; }
.booking__info { display: flex; flex-direction: column; gap: 48px; padding-top: 16px; }
.booking__contacts { display: flex; flex-direction: column; gap: 24px; }
.socials { display: flex; gap: 12px; padding-top: 32px; }
.social { overflow: hidden; transition: background-color var(--dur-default) var(--ease-default); }   /* + .icon-circle */

/* ---------- Footer ---------- */
.footer { padding-block: 40px; }
/* halves as in Figma; on narrower screens the links column never gets narrower than its content (one line down to
   the phone layout) — only the copyright wraps */
.footer__inner { display: grid; grid-template-columns: 1fr minmax(max-content, 1fr); gap: var(--space-block); align-items: center; }
.footer__copy { color: var(--foreground-gray); font-size: 16px; line-height: 24px; }
.footer__links { display: flex; gap: 16px 40px; white-space: nowrap; }

/* =================== Responsive =================== */
@media (max-width: 1279px) {
  :root { --gutter: 40px; --section-pad: 64px; --space-head: 56px; --space-block: 48px; }
  .header__inner { gap: 32px; }
  .header__nav { gap: 24px; }   /* 1024: logo + 5 links + call + CTA fit one line */
  .price { grid-template-columns: 1fr 1fr; }
  .problem:nth-child(n + 4) { padding-left: 32px; }
  .features, .stats { grid-template-columns: repeat(2, 1fr); gap: 0 40px; }
  /* 2 × 2 stats, as on the phone: each line belongs to the number under it — line → 40 → number, then 40 to the next
     line (was 0: the second row's line stuck to the first row's numbers) */
  .stats { row-gap: 40px; }
  .price__cta { padding-block: 16px; }   /* 48 | 48 around the price CTA */
  .stat { min-height: 0; }
  .history { --step-w: 440px; --inset: 40px; }
}

@media (max-width: 1023px) {
  :root { --header-h: 80px; --section-pad: 40px; --space-head: 40px; --space-block: 40px; --head-gap: 24px; --head-text-gap: 12px; }
  .eyebrow { font-size: 16px; line-height: 20px; }   /* tablet: between desktop 20/24 and phone 12/16 (user decision) */
  /* buttons + chips at the phone size (Figma mobile) from the tablet down: 16px, 48 high (user decision) */
  .btn { padding: 12px 20px 12px 24px; font-size: 16px; }
  .btn--main img { width: 20px; height: 20px; }
  .btn--icon { padding: 12px; }
  .chip { padding: 12px 20px; font-size: 16px; }
  .header__nav { display: none; }
  .header__inner { justify-content: space-between; }
  .header__burger { display: inline-flex; }
  /* phone / tablet: no scrollbar strip (real devices overlay a thin one that hides itself); scrolling still works */
  html, .mobile-menu { scrollbar-width: none; }
  html::-webkit-scrollbar, .mobile-menu::-webkit-scrollbar { display: none; }
  /* Figma mobile header: the call button is gold with a dark icon */
  .header__phone { background: var(--action-main); }
  .header__phone:hover { background: var(--action-secondary); }
  .header__phone-light, .header.is-menu-open :is(.header__phone, .header__cta) { display: none; }   /* menu open: only the close button (Figma) */
  .header__phone-dark { display: block; }
  .hero__bottom { flex-direction: column; align-items: flex-start; }
  .hero__services { justify-content: flex-start; max-width: none; }
  /* one column; two (as on desktop) as soon as two 400px columns + the 40 gap fit (840 = ~920px window), no extra breakpoint */
  .service, .service__bottom { grid-template-columns: 1fr; }
  .price, .booking { grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); }
  .service__body { padding-top: 0; }
  .service__bottom .slider-nav { order: 1; }   /* stacked: CTA first, then counter + arrows (Figma mobile) */
  .offer__body { flex-direction: column; align-items: flex-start; padding: 56px 40px; }
  .offer__body .btn { margin-bottom: 0; }
  .footer__rights { display: none; }   /* tablet: copyright on one line next to the links (user decision) */
  .note { font-size: 14px; line-height: 20px; }   /* asterisk notes: Figma 16/24 desktop → 14/20 tablet → 12/16 phone */
  .price__cta { padding-block: 8px; }   /* 40 | 40 around the price CTA, as on the phone (Figma) */
  /* no pin here: Bg 2 + its top fade start at the services section itself (its height no longer ≈ Figma's 992) */
  .services-track { --tex: var(--texture); --fade-t: var(--fade-top); }
  .section--cases { --tex: none; --fade-t: none; }
}

/* Services on a tablet: two columns as soon as they fit (the same 2 × 400 + gap as price / booking above). A container
   query, not auto-fit: the bottom row must also switch back from "CTA, then counter" to "counter | CTA". */
.services-pin > .container { container: services / inline-size; }
/* Portfolio carousel: the desktop strip (centred 720 card + half-size peeks) while the block is ≥ 840 wide (~920px
   window — the same rule as above, app.js uses the same CASES_PEEK_MIN); narrower: one full-width card, no peeks */
.cases { container: cases / inline-size; }
@container cases (max-width: 839.98px) {
  .cases__nav { width: 100%; }
  .cases__stage { height: var(--stage-h, auto); cursor: grab; transition: height 0.75s var(--ease-default); }   /* set by app.js */
  .cases__stage:active { cursor: grabbing; }
  /* no stage backdrop, captions straight above the photo (Figma mobile) — on the backdrop they'd stick to its edge */
  .cases__stage { background: none; }
  .case__meta { height: auto; padding: 0 0 20px; }
  /* the whole photo drags the carousel; the split moves by its knob (app.js), the range stays for the keyboard */
  .compare__range { pointer-events: none; }
  .compare { height: auto; aspect-ratio: 720 / 520; }
}

/* Figma "Action/Regular" (price rows, form fields; 18/24 desktop, 16/24 phone): on a tablet 16/24 only while price /
   booking are two narrow columns — stacked (full width) they keep 18/24 */
.section--price .container { container: price / inline-size; }
.section--booking .container { container: booking / inline-size; }
@media (max-width: 1023px) {
  @container price (min-width: 840px) { .price__list li { font-size: 16px; } }
  @container booking (min-width: 840px) { .field__control { font-size: 16px; } }
}

/* Hero bottom row (place | service chips) on a tablet: side by side under the same rule — stacked only below it */
.hero__inner { container: hero / inline-size; }
@container hero (min-width: 840px) {
  .hero__bottom { flex-direction: row; align-items: flex-end; }
  .hero__services { justify-content: flex-end; max-width: 446px; }
}
@container services (min-width: 840px) {
  .service, .service__bottom { grid-template-columns: 1fr 1fr; }
  .service__bottom .slider-nav { order: 0; }
}

/* Narrow phone (≤500, Figma 390): the booking CTA moves from the header into the hero, gold CTAs go full width, the
   Figma line breaks (.br-m) apply. Wider phones (501–700) keep the header CTA and content-wide buttons, as on a tablet. */
@media (max-width: 500px) {
  .header__cta { display: none; }
  .hero__cta { display: inline-flex; }
  .btn--main { width: 100%; }   /* gold CTAs full width (Figma 390); wider screens keep them content-wide, as on desktop */
  .br-m { display: inline; }
}

/* Phone = Figma "Main page / Mobile" (4095:11520, 390 wide) + "Mobile Menu" (4174:14600) */
@media (max-width: 700px) {
  :root { --gutter: 16px; --section-pad: 40px; --header-h: 72px; --space-head: 32px; --space-block: 32px; --head-gap: 16px; --head-text-gap: 8px; }
  body { font-size: 16px; line-height: 24px; }

  /* type: mobile sizes of the same Figma styles */
  .eyebrow { font-size: 12px; line-height: 16px; }
  .h2 { font-size: 36px; line-height: 32px; }
  .title-48 { font-size: 32px; line-height: 32px; }
  .title-40 { font-size: 32px; line-height: 28px; }
  .title-32, .service__desc .title-32, .step__text .title-32 { font-size: 22px; line-height: 24px; }
  .lead, .text-gray { font-size: 16px; line-height: 24px; }
  .label { font-size: 10px; line-height: 16px; }
  .note { font-size: 12px; line-height: 16px; }
  .note br { display: none; }
  .counter__current { font-size: 36px; line-height: 32px; }
  .counter__total { font-size: 22px; line-height: 24px; }
  .slider-nav { align-items: center; }

  /* components */
  .btn--secondary { padding: 12px 20px; }   /* the hero chips lose their arrow here */
  .chips { gap: 12px 8px; }
  .icon-circle { width: 48px; height: 48px; }
  .link-gold { font-size: 16px; }
  .contacts { gap: 8px; }
  .contacts li { font-size: 16px; }
  .section-head .chips { padding-top: 8px; }

  /* page background: texture 693 high (Figma 390 frame), 200px fades; Figma Mobile: one layer per section */
  :is(.section, .services-track) { --fade-h: 200px; }
  :is(.section, .services-track)::before { width: 100%; aspect-ratio: auto; height: 693px; }   /* Figma height at any phone width (only the width stretches) — taller layers would pile up */
  .section--history::before { height: auto; background-size: 100% 693px; }
  .section--about { --fade-b: none; }   /* its Figma fade lies past the end of the texture — no effect */

  /* header: 72 high, logo 112×56 (stays this size when the header fills on scroll) */
  .header__inner { padding-inline: 16px; }
  .header__actions { gap: 8px; }
  .header__logo { width: 112px; height: 56px; }   /* the same size in the filled (sticky) header — user request */
  .header__logo img { width: 100%; height: auto; }

  /* hero: chips, place, CTA stacked 40 from the bottom (gaps: see Hero) */
  .hero__bg::after { top: calc(100% - 464px); }
  .hero__inner { padding-bottom: 40px; }
  .hero__head { gap: 16px; }
  .hero__title { font-size: 56px; line-height: 48px; }
  .hero__bottom { align-items: stretch; gap: 40px; }
  .hero__services { order: -1; gap: 12px 8px; }
  .hero__services .btn img { display: none; }
  .hero__place { gap: 24px; }

  /* directions */
  .section--directions { --tex-top: 938px; --fade-t-y: 938px; }   /* runs on over About */
  .section--directions .container { gap: 24px; }
  .problems { grid-template-columns: 1fr; grid-auto-flow: row; grid-template-rows: none; padding-bottom: 0; }
  .problem, .problem:nth-child(n + 4) { flex-direction: row; gap: 32px; padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .problem:nth-child(3n) { border-bottom: 1px solid var(--line); }
  .problem:last-child { border-bottom: 0; }
  .problem .title-32 { flex: 1; text-wrap: wrap; }   /* plain wrap, as in Figma ("Старі коронки вже / видно") */
  .offer__body { padding: 40px 24px; }
  .offer__title { gap: 12px; }
  .offer__title img { width: 32px; height: 32px; }
  .offer .text-gray { font-size: 14px; line-height: 20px; }
  .features { grid-template-columns: 1fr 1fr; gap: 32px; padding-block: 16px; }
  .feature { gap: 12px; padding: 32px 0 0; }

  /* about */
  .about__photo { aspect-ratio: 358 / 200; }
  .about__photo img { object-position: 50% 31%; }
  .stats { grid-template-columns: 1fr 1fr; gap: 32px; padding-top: 48px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 0; padding-top: 32px; }
  .stat__num { font-size: 52px; line-height: 48px; }
  .stat .label br { display: none; }

  /* services */
  .services-track { --tex-top: 270px; --fade-t-y: 270px; --fade-b: var(--fade-bottom); --fade-b-y: -60px; }
  .service__media { aspect-ratio: 358 / 220; }
  .service__body { gap: 20px; }
  .service__desc { gap: 8px; }
  .service__bottom { gap: 56px; padding-top: 8px; }

  /* portfolio */
  .section--cases { --tex: var(--texture); --tex-top: 80px; --fade-t: var(--fade-top); --fade-t-y: 80px; }
  .section--cases .container { gap: 40px; }
  .cases { gap: 56px; }
  .compare { aspect-ratio: 358 / 256; }
  .compare__label { bottom: 16px; }
  .compare__label--before { left: 16px; }
  .compare__label--after { right: 16px; }
  .compare__knob { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
  .compare__knob img { top: 12px; }
  .compare__knob img:first-child { left: 4px; }
  .compare__knob img:last-child { left: 20px; }

  /* history: 342-wide steps 16 apart, the next one peeks into the right margin */
  .section--history { --tex-top: 0px; }
  .section--history .container { gap: 40px; }
  .history { --step-w: min(calc(100vw - 48px), 440px); --step-gap: 16px; --inset: 0px; gap: 40px; }
  .history__viewport { width: auto; align-self: stretch; margin-right: calc(-1 * var(--gutter)); padding: 0; background: none; }
  .step { gap: 24px; }
  .step__img { height: 240px; }
  .step__img--cutout { background-position: 50% -184px; }
  .step__img--cutout img { top: -32px; }
  .step__text { gap: 4px; }
  .history__progress { width: 100%; }
  .history__bottom { height: 48px; }
  .history__years { padding-top: 8px; }
  .history__years-track { font-size: 36px; line-height: 32px; }
  .history__bottom::after { width: 172px; height: 48px; background: linear-gradient(90deg, rgba(18, 13, 7, 0), #120d07 48px); }

  /* price: no photo on the phone; rows stacked — name, then the price under it */
  .section--price { --tex-top: 200px; --fade-t-y: 200px; }
  .section--price .container { gap: 40px; }
  .section--price .chips { padding-bottom: 8px; }
  .price { gap: 0; }
  .price__media { display: none; }
  .price__list li { flex-direction: column; align-items: flex-start; gap: 20px; padding-block: 32px; font-size: 16px; }
  .price__list li:first-child { padding-top: 0; }
  .price__value { text-align: left; }

  /* booking */
  .section--booking { --tex: var(--texture); --tex-top: 40px; --fade-t: var(--fade-top); --fade-b: none; padding-block: 40px; scroll-margin-top: -40px; }
  .section--booking .container { gap: 32px; }
  .booking { gap: 80px; }
  .booking__form { gap: 24px; padding: 0; background: none; }
  .field__control { padding: 12px 16px; font-size: 16px; }
  .field__select select { padding-right: 48px; }
  .field__select img { right: 12px; }
  .booking__submit { padding-top: 16px; }
  .booking__info { gap: 40px; padding-top: 0; }
  .booking__contacts { gap: 24px; }
  .socials { padding-top: 0; }

  /* footer */
  .footer__inner { grid-template-columns: 1fr; gap: 20px; }
  .footer__copy { font-size: 12px; line-height: 16px; }
  .footer__rights { display: inline; }   /* phone: full line, as in Figma (12px, fits) */
  .footer__links { flex-direction: column; align-items: flex-start; gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .preloader__logo * { animation: none !important; transform: none !important; }
  .pl-tree__fill, .pl-text { opacity: 1; }
  .preloader__logo .pl-tree__line { stroke-dashoffset: 0; }
}

/* System messages (toast) come from proto-chrome: ProtoChrome.toast / data-action="soon" / data-soon */
