/* Page-by-page landing: each top-level section is a "page" (see pager.js). Progressive enhancement:
   without JS or with reduced motion the page is an ordinary long page. */

html { scroll-behavior: smooth; scroll-padding-top: 56px; }
/* No scroll snapping: free, native scrolling (snapping fought the finger on phones). Pages still fill a screen. */
[data-page] { scroll-margin-top: 56px; }
/* Every page fills at least one screen; short ones centre their content. */
html.pg-on [data-page] { min-height: calc(100svh - 56px); }
html.pg-on [data-page].pg-short { display: flex; flex-direction: column; justify-content: center; }
html.pg-on [data-page="top"] { min-height: calc(100svh - 56px); }

/* ---- Entrance: content of a page rises in, staggered, the first time the page is reached. ---- */
@media (prefers-reduced-motion: no-preference) {
  html.pg-on .pg-item { opacity: 0; transform: translateY(20px); }
  html.pg-on .pg-seen .pg-item {
    opacity: 1; transform: none;
    transition: opacity .6s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1);
    transition-delay: calc(var(--pg-i, 0) * 80ms);
  }
}

/* ---- Exit: dark card pages recede as the next page slides over them (where scroll timelines exist). ---- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (pointer: fine) {
    @keyframes pgRecede { to { transform: scale(.96); opacity: .5; } }
    html.pg-on [data-page].fx-dark > :first-child {
      animation: pgRecede linear both;
      animation-timeline: view();
      animation-range: exit 10% exit 100%;
      transform-origin: 50% 0;
    }
  }
}

/* ---- Progress line under the header. ---- */
.pg-progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 40; pointer-events: none; transform-origin: 0 50%; transform: scaleX(var(--pg-p, 0)); background: #1D1D1F; transition: transform .12s linear; }
.pg-dark .pg-progress { background: #C8E06A; }

/* ---- Desktop page dots. ---- */
.pg-dots { position: fixed; right: max(12px, env(safe-area-inset-right)); top: 50%; transform: translateY(-50%); z-index: 30; display: none; flex-direction: column; gap: 6px; margin: 0; padding: 8px 6px; list-style: none; border-radius: 999px; background: rgba(245,243,239,.66); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border: 1px solid rgba(26,26,26,.08); }
@media (min-width: 900px) and (hover: hover) { html.pg-on .pg-dots { display: flex; } }
.pg-dots a { position: relative; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 999px; text-decoration: none; }
.pg-dots a::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: rgba(26,26,26,.28); transition: height .35s cubic-bezier(.2,.8,.2,1), background-color .25s; }
.pg-dots a[aria-current="true"]::before { height: 20px; background: #1D1D1F; }
.pg-dots a:hover::before { background: #1D1D1F; }
.pg-dots a span { position: absolute; right: 38px; top: 50%; transform: translate(6px, -50%); white-space: nowrap; font: 600 13px/1 'Geist', system-ui, sans-serif; color: #F7F6F3; background: #1D1D1F; padding: 7px 11px; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s cubic-bezier(.2,.8,.2,1); }
.pg-dots a:hover span, .pg-dots a:focus-visible span { opacity: 1; transform: translate(0, -50%); }

/* ---- Phone page pill: where am I, previous / next, and the list of pages. ---- */
.pg-pill { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translate(-50%, 0); z-index: 30; display: none; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(26,26,26,.86); color: #F7F6F3; backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); box-shadow: 0 12px 32px -12px rgba(0,0,0,.45); font: 600 14px/1 'Geist', system-ui, sans-serif; transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .3s; }
@media (max-width: 899px), (hover: none) { html.pg-on .pg-pill { display: flex; } }
.pg-pill.pg-hide, .pg-pill.pg-away { transform: translate(-50%, 140%); opacity: 0; }
.pg-pill button { appearance: none; border: 0; background: transparent; color: inherit; font: inherit; min-width: 44px; min-height: 44px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; cursor: pointer; transition: background-color .2s, transform .18s cubic-bezier(.2,.8,.2,1); }
.pg-pill button:active { transform: scale(.94); }
.pg-pill button:disabled { opacity: .35; }
.pg-pill .pg-now { min-width: 150px; }
.pg-pill .pg-num { font-family: 'Geist Mono', ui-monospace, monospace; font-weight: 500; opacity: .6; }
.pg-pill button:focus-visible { outline: 2px solid #C8E06A; outline-offset: 2px; }
.pg-menu { position: fixed; left: 50%; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 60px); transform: translate(-50%, 12px) scale(.98); opacity: 0; pointer-events: none; z-index: 31; width: min(320px, calc(100vw - 32px)); margin: 0; padding: 6px; list-style: none; border-radius: 24px; background: rgba(26,26,26,.92); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); box-shadow: 0 20px 48px -16px rgba(0,0,0,.5); transition: opacity .25s, transform .35s cubic-bezier(.2,.8,.2,1); }
.pg-menu.pg-open { opacity: 1; transform: translate(-50%, 0) scale(1); pointer-events: auto; }
.pg-menu a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: 18px; color: #F7F6F3; text-decoration: none; font: 600 16px/1.2 'Geist', system-ui, sans-serif; }
.pg-menu a .pg-num { font: 500 12px/1 'Geist Mono', ui-monospace, monospace; opacity: .55; }
.pg-menu a[aria-current="true"] { background: #C8E06A; color: #1D1D1F; }
.pg-menu a[aria-current="true"] .pg-num { opacity: .7; }

/* ---- "Scroll on" cue on the first page. ---- */
.pg-cue { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: inline-flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: #6E6B66; font: 500 12px/1 'Geist Mono', ui-monospace, monospace; letter-spacing: .06em; text-transform: uppercase; transition: color .2s, opacity .4s; }
.pg-cue:hover { color: #1D1D1F; }
.pg-cue svg { animation: pgNudge 1.8s cubic-bezier(.5,0,.5,1) infinite; }
@keyframes pgNudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
html.pg-scrolled .pg-cue { opacity: 0; pointer-events: none; }

/* Header links: only the current page stands out (the design made one link bold for good). */
html.pg-on .fx-nav-links a { color: #3A3A3C !important; font-weight: 500 !important; padding: 10px 0; transition: color .2s, box-shadow .3s cubic-bezier(.2,.8,.2,1); }
html.pg-on .fx-nav-links a:hover { color: #1D1D1F !important; }
html.pg-on .fx-nav-links a[aria-current="true"] { color: #1D1D1F !important; font-weight: 600 !important; box-shadow: inset 0 -2px 0 #1D1D1F; }
/* On phones the page pill already offers "next page". */
@media (max-width: 899px), (hover: none) { .pg-cue { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pg-progress, .pg-pill, .pg-menu, .pg-dots a::before, .pg-cue svg { transition: none !important; animation: none !important; }
}

/* Language switch added by i18n.js next to the Apply button. */
#vard-lang{display:inline-flex;gap:2px;padding:2px;margin-right:10px;border-radius:999px;background:#EFEDE8;font:600 12px/1 Geist,system-ui,sans-serif;vertical-align:middle}
#vard-lang button{border:0;background:transparent;color:#6E6B66;padding:7px 10px;border-radius:999px;cursor:pointer;font:inherit}
#vard-lang button[aria-pressed="true"]{background:#FFFFFF;color:#1D1D1F;box-shadow:0 1px 2px rgba(29,29,31,.08)}
#vard-lang button:focus-visible{outline:2px solid #1D1D1F;outline-offset:2px}

/* Russian words are longer: let headlines shrink further on phones and break by syllables instead of overflowing. */
html[lang="ru"] h1{font-size:clamp(32px,8vw,100px) !important;max-width:none !important;overflow-wrap:break-word}
html[lang="ru"] h2{font-size:clamp(28px,6vw,80px) !important;overflow-wrap:break-word}
@media (max-width: 600px) { html[lang="ru"] h1, html[lang="ru"] h2, html[lang="ru"] h3, html[lang="ru"] p { hyphens: auto; } }

/* ---- Smooth scrolling on every device ----
   Solid bars instead of live blur behind fixed elements (blur re-renders on every scrolled frame), and the generated
   landing's decorative endless animations that move elements with left/top (relayout each frame) or pulse a shadow
   are calmed: on phones they stop; scroll-linked reveals run only where a mouse is used. */
header { background: rgba(247,246,243,.94) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.pg-dots, .pg-pill, .pg-menu { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.pg-dots { background: rgba(247,246,243,.96) !important; }
.pg-pill { background: rgba(29,29,31,.96) !important; }
.pg-menu { background: rgba(29,29,31,.98) !important; }
@media (pointer: coarse) {
  .fx-rv { animation: none !important; }
  .fx-flow, .fx-dot, .fx-shield-icon, .fx-glow, .fx-ring, .fx-ring-r, .fx-ring-f { animation: none !important; }
  .fx-dot { opacity: 1; left: 50%; }
  html.pg-on .pg-item { transform: none; }
}
/* Desktop keeps the motion, but moves with transforms only. */
@keyframes fxShieldPulse { 0% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1.2); opacity: .7; } }
#vard-cabinet{display:inline-flex;align-items:center;min-height:34px;padding:0 12px;margin-right:6px;border-radius:999px;color:#1D1D1F;font:600 13px/1 Geist,system-ui,sans-serif;text-decoration:none}
#vard-cabinet:hover{background:#EFEDE8}
@media (max-width: 520px){#vard-cabinet{padding:0 8px;font-size:12px}#vard-lang{margin-right:4px}}
