/* VDS.RENT — the fixed header: service strip + bar (Figma «Навигация», 108 px, opaque black), the two desktop dropdowns
   with the dimmed page, and the phone / tablet bar + full-screen menu. Shared file (foundation). */

.hdr { position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-header); color: var(--t1); }

/* ------------------------------------------------------------------ service strip (36 px, #101012) */
.hdr__strip { height: var(--strip-h); background: var(--strip); }
.hdr__strip-in { display: flex; align-items: center; justify-content: space-between; height: 100%; max-width: var(--wrap-max); margin: 0 auto; padding: 0 var(--M); }
.strip { display: flex; align-items: center; }
.strip__link { display: inline-flex; align-items: center; gap: 6px; height: 36px; color: var(--t3);
  font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: -0.002em; white-space: nowrap; transition: color var(--t-fast) var(--ease); }
.strip__link:focus-visible { color: var(--t1); }
@media (hover: hover) and (pointer: fine) { .strip__link:hover { color: var(--t1); } }
.strip__badge { margin-left: 8px; }
/* «Статус систем» + «Все штатно» are one link (the badge keeps its Figma look; the label steps to white like the others) */
.strip__status { gap: 0; }
.strip__sep { width: 1px; height: 12px; margin: 0 14px; background: var(--hl-08); flex: none; }

/* ------------------------------------------------------------------ bar (72 px, black) */
.hdr__bar { position: relative; height: var(--nav-h); background: var(--black); }
.hdr__bar-in { display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); align-items: center; column-gap: 24px;
  height: 100%; max-width: var(--wrap-max); margin: 0 auto; padding: 0 var(--M);
  /* the Figma spacing (36 px between items, 28 px in the right group) down to ~1330 px; below it tightens so the centred menu
     never touches the side groups (13 / 20 px at 1280) */
  --nav-px: clamp(13px, calc(18px - (1330px - 100vw) * 0.1), 18px);
  --right-gap: clamp(20px, calc(28px - (1330px - 100vw) * 0.16), 28px); }
.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; color: var(--t1); }
.brand__logo { width: 36px; height: 36px; border-radius: 9px; }
.brand__wm { font-family: var(--brand); font-weight: 700; font-size: 19px; line-height: 24px; letter-spacing: -0.02em; color: var(--t1); white-space: nowrap; }
.brand__wm span { color: rgba(255, 255, 255, 0.45); }
.brand:focus-visible .brand__wm span { color: rgba(255, 255, 255, 0.6); }
@media (hover: hover) and (pointer: fine) { .brand:hover .brand__wm span { color: rgba(255, 255, 255, 0.6); } }
.brand { transition: opacity var(--t-fast) var(--ease); }
.brand__wm span { transition: color var(--t-fast) var(--ease); }

.nav__list { display: flex; align-items: center; margin: 0 calc(-1 * var(--nav-px)); }
.nav__link { display: inline-flex; align-items: center; gap: 4px; height: var(--nav-h); padding: 0 var(--nav-px);
  font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: -0.005em; color: var(--t3); white-space: nowrap;
  transition: color var(--t-fast) var(--ease); }
.nav__chev { color: var(--t6); transition: color var(--t-fast) var(--ease), transform var(--t-med) var(--ease-out); }
.nav__link:focus-visible { color: var(--t1); }
@media (hover: hover) and (pointer: fine) { .nav__link:hover { color: var(--t1); } }
.nav__link[aria-current="page"] { color: var(--t1); }
.nav__link--home[aria-current="page"] { color: var(--t-white); }
/* open dropdown: its trigger white with the chevron turned up; the page's own item steps back meanwhile (as in the menu frames) */
.nav__trigger[aria-expanded="true"] { color: var(--t1); }
.nav__trigger[aria-expanded="true"] .nav__chev { color: var(--t1); transform: rotate(180deg); }
.hdr.is-dd-open .nav__link[aria-current="page"]:not([aria-expanded="true"]) { color: var(--t3); }

.hdr__right { display: flex; align-items: center; justify-self: end; }
.lang { display: inline-flex; align-items: center; height: 36px; color: var(--t-soft); font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: -0.005em;
  transition: color var(--t-fast) var(--ease); }
.lang .tw { margin-left: 8px; }
.lang__chev { margin-left: 4px; color: var(--t3); }
.lang:focus-visible, .lang[aria-expanded="true"] { color: var(--t1); }
@media (hover: hover) and (pointer: fine) { .lang:hover { color: var(--t1); } }
.lang__chev { transition: transform var(--t-med) var(--ease-out), color var(--t-fast) var(--ease); }
.lang[aria-expanded="true"] .lang__chev { color: var(--t1); transform: rotate(180deg); }
/* the language menu: a compact .pop (components.css) 9 px under RU, its right edge on the trigger's, 200 wide, growing from the
   top right corner; no veil */
.lang-box { position: relative; display: flex; align-items: center; }
.lang-pop { position: absolute; top: calc(100% + 9px); right: 0; width: 200px; --pop-ox: 100%; }

.login { display: inline-flex; align-items: center; gap: 8px; height: 36px; margin-left: var(--right-gap); color: var(--t-soft);
  font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: -0.005em; white-space: nowrap; transition: color var(--t-fast) var(--ease); }
.login:focus-visible { color: var(--t1); }
@media (hover: hover) and (pointer: fine) { .login:hover { color: var(--t1); } }
.hdr__cta { margin-left: var(--right-gap); }

/* ------------------------------------------------------------------ desktop dropdowns */
.dd { position: absolute; left: 0; right: 0; top: var(--header-h); background: var(--black);
  border-radius: 0 0 var(--r-menu) var(--r-menu);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 200ms var(--ease), transform 280ms var(--ease-out), visibility 0s linear 280ms; }
.dd.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity 220ms var(--ease), transform 320ms var(--ease-out), visibility 0s; }
/* switching between the two menus: no slide, a quick cross-fade */
.hdr.is-dd-switch .dd { transform: none; transition-duration: 140ms, 0s, 0s; }

/* «Продукты»: five graphite cards 314 × 400 (gaps 15.5), panel 472 (32 top / bottom). The cards keep their proportions
   between 1280 and 1728 (--u = one Figma px at the current width), so the composition stays the Figma one */
.dd--products { padding: calc(32 * var(--u)) 0; }
.dd__cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: calc(15.5 * var(--u)); max-width: var(--wrap-max); margin: 0 auto; padding: 0 var(--M); }
.pcard { position: relative; display: block; height: calc(400 * var(--u)); border-radius: calc(24 * var(--u)); background: var(--graphite); overflow: hidden;
  color: var(--t1); transition: background-color var(--t-med) var(--ease); }
.pcard:focus-visible { background: #1B1B1D; }
@media (hover: hover) and (pointer: fine) { .pcard:hover { background: #1B1B1D; } }
/* the render: its Figma box inside the 314-wide card (centred on the card's middle if the card is wider, ≥ 1728) */
.pcard__r { position: absolute; left: calc(50% + (var(--x) - 157) * var(--u)); top: calc(var(--y) * var(--u));
  width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); max-width: none; pointer-events: none; }
.pcard__txt { position: absolute; left: calc(32 * var(--u)); bottom: calc(82 * var(--u)); width: max(calc(250 * var(--u)), calc(100% - 64 * var(--u))); max-width: calc(250 * var(--u) + 20px); display: flex; flex-direction: column; }
.pcard__t { font-size: max(18px, calc(22 * var(--u))); line-height: max(24px, calc(28 * var(--u))); font-weight: 600; letter-spacing: -0.011em; color: var(--t1); }
.pcard__d { margin-top: calc(4 * var(--u)); font-size: max(13px, calc(15 * var(--u))); line-height: max(19px, calc(22 * var(--u))); letter-spacing: -0.002em; color: var(--t2); }
.pcard__foot { position: absolute; left: calc(32 * var(--u)); right: calc(32 * var(--u)); bottom: calc(22 * var(--u)); height: calc(40 * var(--u));
  display: flex; align-items: center; justify-content: space-between; }
.pcard__p { font-size: max(13px, calc(15 * var(--u))); line-height: max(18px, calc(20 * var(--u))); font-weight: 500; letter-spacing: -0.002em; color: var(--t1); white-space: nowrap; }
.pcard__go { display: inline-flex; align-items: center; justify-content: center; width: calc(40 * var(--u)); height: calc(40 * var(--u)); border-radius: 50%;
  background: var(--hl-08); color: var(--t1); transition: background-color var(--t-fast) var(--ease); }
.pcard__go .i { width: calc(18 * var(--u)); height: calc(18 * var(--u)); transition: transform var(--t-med) var(--ease-out); }
.pcard:focus-visible .pcard__go { background: var(--hl-12); }
@media (hover: hover) and (pointer: fine) { .pcard:hover .pcard__go { background: var(--hl-12); } }
.pcard:focus-visible .pcard__go .i { transform: translateX(2px); }
@media (hover: hover) and (pointer: fine) { .pcard:hover .pcard__go .i { transform: translateX(2px); } }

/* «Поддержка»: three columns (1632 / 3), dividers 1 × 88 white 10 %, titles 40/44, panel 200 (56 top / bottom) */
.dd--support { padding: 56px 0; }
.dd__links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: var(--wrap-max); margin: 0 auto; padding: 0 var(--M); }
.dd__links > li { position: relative; min-height: 88px; }   /* the 88 px dividers set the height: panel 56 + 88 + 56 = 200 (Figma) */
.dd__links > li + li { padding-left: 40px; }
.dd__links > li + li::before { content: ''; position: absolute; left: 0; top: 0; width: 1px; height: 88px; background: var(--hl-10); }
.slink { display: inline-flex; flex-direction: column; color: var(--t1); }
.slink__t { display: inline-flex; align-items: center; gap: 12px; font-size: 40px; line-height: 44px; font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; }
.slink__t .i { color: var(--t2); margin-top: 1px; transition: transform var(--t-med) var(--ease-out), color var(--t-fast) var(--ease); }
.slink__d { margin-top: 12px; font-size: 17px; line-height: 24px; letter-spacing: -0.003em; color: var(--t3); transition: color var(--t-fast) var(--ease); }
.slink:focus-visible .slink__t .i { transform: translateX(3px); color: var(--t1); }
@media (hover: hover) and (pointer: fine) { .slink:hover .slink__t .i { transform: translateX(3px); color: var(--t1); } }
.slink:focus-visible .slink__d { color: var(--t2); }
@media (hover: hover) and (pointer: fine) { .slink:hover .slink__d { color: var(--t2); } }

/* the dimmed page under an open dropdown: black 62 % over a background blur (Figma BACKGROUND_BLUR 30 ≈ CSS blur 12.5 px:
   fitted against the Figma menu frames, mean |Δ| 0.4). backdrop-filter, not filter: it blurs what is behind the veil. */
.veil { position: fixed; inset: 0; z-index: var(--z-veil); background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(12.5px); backdrop-filter: blur(12.5px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 240ms var(--ease), visibility 0s linear 240ms; }
.veil.is-on { opacity: 1; visibility: visible; transition: opacity 240ms var(--ease), visibility 0s; }

/* ------------------------------------------------------------------ phone / tablet bar (60 px) */
.mbar { display: none; }
.mmenu { display: none; }

@media (max-width: 1179px) {
  .hdr__strip, .hdr__bar, .dd, .veil { display: none; }
  .mbar { display: flex; align-items: center; justify-content: space-between; height: calc(var(--mbar-h) + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) max(var(--M), env(safe-area-inset-right, 0px)) 0 max(var(--M), env(safe-area-inset-left, 0px)); background: var(--black); }
  .brand--m .brand__logo { width: 32px; height: 32px; border-radius: 8px; }
  .brand--m .brand__wm { font-size: 18px; line-height: 24px; }
  .brand--m { min-height: 44px; }   /* a 44 px tap target; the logo and the wordmark stay centred in the bar */
  .mbtn { position: relative; width: 44px; height: 44px; border-radius: 22px; background: var(--btn-dark); flex: none; transition: background-color var(--t-fast) var(--ease); }
  .mbtn:focus-visible { background: #252528; }
  @media (hover: hover) and (pointer: fine) { .mbtn:hover { background: #252528; } }
  .mbtn__bar { position: absolute; left: 14px; width: 16px; height: 1.5px; border-radius: 0.75px; background: var(--t1);
    transition: transform 380ms cubic-bezier(0.3, 0.9, 0.3, 1); }
  .mbtn__bar:first-child { top: 17.5px; }
  .mbtn__bar:last-child { top: 25px; }
  /* open: the two bars turn into the × of the menu frames (lucide x 18 px, 1.8 px round-capped stroke: 12.7 px diagonals + caps = 14.5 px) */
  .mm-open .mbtn__bar:first-child { transform: translateY(3.75px) rotate(45deg) scale(0.908, 1.2); }
  .mm-open .mbtn__bar:last-child { transform: translateY(-3.75px) rotate(-45deg) scale(0.908, 1.2); }

  /* ---------------------------------------------------------------- the full-screen menu (black sheet under the bar) */
  .mmenu { display: block; position: fixed; inset: 0; z-index: calc(var(--z-header) - 1); background: var(--black);
    padding-top: calc(var(--mbar-h) + env(safe-area-inset-top, 0px));
    opacity: 0; visibility: hidden; transition: opacity 260ms var(--ease), visibility 0s linear 260ms; }
  .mm-open .mmenu { opacity: 1; visibility: visible; transition: opacity 260ms var(--ease), visibility 0s; }
  .mmenu__scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .mmenu__in { display: flex; flex-direction: column; min-height: 100%;
    padding: 12px max(var(--M), env(safe-area-inset-right, 0px)) calc(34px + env(safe-area-inset-bottom, 0px)) max(var(--M), env(safe-area-inset-left, 0px)); }
  .mm { display: block; }
  .mm__row { position: relative; }
  .mm__row + .mm__row::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--hl-10); transition: opacity 200ms var(--ease); }
  /* no hairline under an opened grey block */
  .mm__group.is-open + .mm__row::before { opacity: 0; }
  .mm__link { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 60px;
    font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.012em; color: var(--t1); text-align: left; }
  /* keyboard focus in the sheet: a quiet fill behind the row (no ring) */
  .mm__link:focus-visible::after { content: ''; position: absolute; inset: 6px -12px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); pointer-events: none; }
  .mm__link { position: relative; }
  .mm__link:focus-visible .mm__chev { color: var(--t1); }
  .mm-prod:focus-visible, .mm-sup__a:focus-visible { background: rgba(255, 255, 255, 0.04); }
  .mm-sup__a:focus-visible .mm-sup__chev { color: var(--t1); }
  .mm__chev { color: var(--t3); transition: transform 360ms var(--ease-out), color var(--t-fast) var(--ease); }
  .mm__trigger[aria-expanded="true"] .mm__chev { transform: rotate(180deg); color: var(--t1); }
  .mm__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 420ms cubic-bezier(0.25, 0.9, 0.3, 1); }
  .mm__panel > .mm__panel-in { min-height: 0; overflow: hidden; }
  .mm__group.is-open > .mm__panel { grid-template-rows: 1fr; }
  .mm__block { margin-bottom: 12px; border-radius: 20px; background: var(--grey-menu); overflow: hidden;
    opacity: 0; transform: translateY(-6px); transition: opacity 260ms var(--ease), transform 420ms var(--ease-out); }
  .mm__group.is-open .mm__block { opacity: 1; transform: none; transition-delay: 40ms; }

  /* «Продукты» rows: the render fitted into a 54 × 48 box at the left, text at 82 */
  .mm-prods > li { position: relative; }
  .mm-prods > li + li::before { content: ''; position: absolute; left: 16px; right: 16px; top: 0; height: 1px; background: var(--hl-08); }
  .mm-prod { position: relative; display: flex; flex-direction: column; padding: 16px 12px 16px 82px; min-height: 98px; color: var(--t1); }
  .mm-prod__r { position: absolute; left: calc(var(--x) * 1px); top: calc(var(--y) * 1px); width: calc(var(--w) * 1px); height: calc(var(--h) * 1px); max-width: none; }
  .mm-prod__t { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -0.008em; }
  .mm-prod__d { margin-top: 2px; font-size: 14px; line-height: 20px; letter-spacing: -0.002em; color: var(--t2); }
  .mm-prod__p { margin-top: 4px; font-size: 13px; line-height: 18px; font-weight: 500; letter-spacing: -0.001em; color: var(--t1); }
  /* «Поддержка» rows: text at 18, chevron 18 at the right (18 px in) */
  .mm-sup > li { position: relative; }
  .mm-sup > li + li::before { content: ''; position: absolute; left: 16px; right: 16px; top: 0; height: 1px; background: var(--hl-08); }
  .mm-sup__a { position: relative; display: flex; flex-direction: column; padding: 18px 52px 18px 18px; color: var(--t1); }
  .mm-sup__t { font-size: 17px; line-height: 22px; font-weight: 600; letter-spacing: -0.008em; }
  .mm-sup__d { margin-top: 2px; font-size: 14px; line-height: 20px; letter-spacing: -0.002em; color: var(--t2); }
  .mm-sup__chev { position: absolute; right: 18px; top: 31px; color: var(--t3); }

  /* «Язык»: the «Поддержка» block rows with a 24 px flag in front (text at 54), the check where the chevron is; the other
     language's title #8E8E93 */
  .mm-lang__a { padding-left: 54px; }
  .mm-lang__flag { position: absolute; left: 18px; top: 17px; }
  .mm-lang__a:not([aria-current="true"]) .mm-sup__t { color: var(--t3); }
  .mm-lang__check { color: var(--t1); }

  .mmenu__actions { display: flex; gap: 12px; margin-top: auto; padding-top: 24px; }
  .mmenu__actions .btn { flex: 1 1 0; padding: 0; }

  /* the rows arrive with a short stagger when the menu opens */
  .mm > .mm__row, .mmenu__actions { transform: translateY(-8px); opacity: 0; transition: transform 420ms var(--ease-out), opacity 300ms var(--ease); }
  .mm-open .mm > .mm__row, .mm-open .mmenu__actions { transform: none; opacity: 1; }
  .mm-open .mm > .mm__row:nth-child(1) { transition-delay: 40ms; }
  .mm-open .mm > .mm__row:nth-child(2) { transition-delay: 70ms; }
  .mm-open .mm > .mm__row:nth-child(3) { transition-delay: 100ms; }
  .mm-open .mm > .mm__row:nth-child(4) { transition-delay: 130ms; }
  .mm-open .mm > .mm__row:nth-child(5) { transition-delay: 160ms; }
  .mm-open .mm > .mm__row:nth-child(6) { transition-delay: 190ms; }
  .mm-open .mmenu__actions { transition-delay: 220ms; }
}
/* tablets (601–1179): the phone menu's column, centred (600 wide) on the same black sheet; the two actions follow the list
   instead of sinking to the bottom of a tall screen */
@media (min-width: 601px) and (max-width: 1179px) {
  .mmenu__in { width: 100%; max-width: calc(600px + 2 * var(--M)); min-height: 0; margin: 0 auto; padding-top: 24px; }
  .mmenu__actions { margin-top: 0; padding-top: 32px; }
}
/* the scroll lock while the phone menu is open (site.js pins the body at its scroll position) */
html.mm-lock, html.mm-lock body { overflow: hidden; }
html.mm-lock body { position: fixed; left: 0; right: 0; width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .dd, .veil, .mmenu, .mm__panel, .mm__block, .mm > .mm__row, .mmenu__actions, .mbtn__bar { transition-duration: 1ms !important; transition-delay: 0s !important; }
}

/* the phone «Язык» rows lost their second line (owner copy only): the check sits on the row centre again */
.mm-lang__check { top: 20px; }
