/* ================================================================
   Japan Prime · black-gold landing
   Design dials: DESIGN_VARIANCE 8 / MOTION_INTENSITY 7 / VISUAL_DENSITY 4
   No pure black. Desaturated gold. Hardware-accelerated transforms only.
   =============================================================== */

/* ---------- TOKENS ---------- */
:root {
  /* surfaces — no #000 per anti-slop rules */
  --bg-0: #09090b;
  --bg-1: #0f0f12;
  --bg-2: #16161a;
  --bg-3: #1f1f25;
  --line: rgba(255, 255, 255, 0.04);
  --line-strong: rgba(255, 255, 255, 0.07);

  /* text */
  --fg-0: #f5f3ec;
  --fg-1: #c8c4b6;
  --fg-2: #8b867a;
  --fg-3: #5c584f;

  /* accent — refined antique gold, warm but soft */
  --gold: #c6a861;
  --gold-warm: #e0c187;
  --gold-deep: #80612e;
  --gold-ink: #1a1408;
  --gold-glow: rgba(224, 193, 135, 0.5);

  /* liquid-glass specular rim — light catches all four edges for a refractive look */
  --glass-edge:
    inset 0 1.5px 0.5px rgba(255, 255, 255, 0.28),
    inset 1.5px 0 0.5px rgba(255, 255, 255, 0.10),
    inset -1.5px 0 0.5px rgba(255, 255, 255, 0.06),
    inset 0 -1.5px 0.5px rgba(0, 0, 0, 0.35);

  /* rgb helper values for opacity calculations */
  --gold-rgb: 198, 168, 97;
  --gold-warm-rgb: 224, 193, 135;
  --gold-deep-rgb: 128, 97, 46;

  /* type */
  --ff-display: "Montserrat", "Manrope", system-ui, sans-serif;
  --ff-body: "Manrope", "Satoshi", "Geist", system-ui, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-hover: cubic-bezier(0.25, 0.8, 0.25, 1);
  --ease-spring-hover: cubic-bezier(0.25, 1.1, 0.5, 1);

  --shell: clamp(1.25rem, 4vw, 4rem);
  --max: 1440px;
}

/* ---------- RESET ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  /* kill the default blue/grey flash when tapping buttons & links on mobile */
  -webkit-tap-highlight-color: transparent;
}

/* ---------- LENIS SMOOTH SCROLL ---------- */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body {
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg-1);
  background: #000000;
  overflow-x: hidden;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Dark-gray grainy-gradient background: subtle light-center depth + fine
   grain. Fixed pseudo-element = viewport-anchored and GPU-composited, so it
   never repaints on scroll (no jank). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: #000000;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0.06'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"),
    radial-gradient(circle at 50% 30%, #070709 0%, #000000 75%);
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

::selection {
  background: var(--gold);
  color: var(--gold-ink);
}

/* ---------- TYPOGRAPHY BALANCE ---------- */
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* ---------- ANCHOR OFFSET ---------- */
section[id],
main[id] {
  scroll-margin-top: 120px;
}

/* ---------- PREMIUM FOCUS INDICATORS ---------- */
:focus {
  outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}

/* Custom rounded focus-visible indicators for specific elements */
.btn:focus-visible,
.nav__dropdown-trigger:focus-visible,
.nav__brand:focus-visible,
.nav__burger:focus-visible,
.foot__social:focus-visible {
  outline: 2px solid var(--gold-warm);
  outline-offset: 2px;
  border-radius: 999px;
}

/* ---------- SCROLL PROGRESS BAR (vertical, left side) ---------- */
.scroll-progress {
  position: fixed;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.scroll-progress__track {
  width: 2px;
  height: 140px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.scroll-progress__bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: scaleY(0);
  transform-origin: top;
  background: linear-gradient(180deg,
      var(--gold-deep) 0%,
      var(--gold) 40%,
      var(--gold-warm) 70%,
      rgba(255, 220, 150, 0.9) 100%);
  box-shadow:
    0 0 8px rgba(var(--gold-warm-rgb), 0.7),
    0 0 20px rgba(var(--gold-warm-rgb), 0.3);
  border-radius: 0 0 2px 2px;
  will-change: transform;
}

.scroll-progress__pct {
  font-family: var(--ff-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--gold);
  opacity: 0.7;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  transition: opacity 0.2s ease;
}

.scroll-progress:hover .scroll-progress__pct {
  opacity: 1;
}

/* ---------- UTILITY ---------- */

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.9rem 1.4rem;
  font-family: var(--ff-body);
  font-size: 0.94rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform 0.45s var(--ease-spring-hover), box-shadow 0.45s var(--ease-hover), background 0.45s var(--ease-hover), color 0.45s var(--ease-hover), border-color 0.45s var(--ease-hover);
  will-change: transform;
  position: relative;
  isolation: isolate;
  white-space: nowrap;
}

/* will-change promotes a permanent compositor layer — worth it only for things
   that actually animate often. Buttons and trust cards only transform on :hover,
   which phones don't have, so the promotion is pure GPU-memory waste there. Drop
   it on mobile (desktop keeps it for the hover lift / cursor tilt). */
@media (max-width: 960px) {

  .btn,
  .trust__card {
    will-change: auto;
  }
}

.btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.btn:active {
  transform: translateY(1px) scale(0.985);
}

.btn--sm {
  padding: 0.6rem 1rem;
  font-size: 0.84rem;
}

.btn--md {
  padding: 0.8rem 1.25rem;
  font-size: 0.9rem;
}

.btn--lg {
  padding: 1.05rem 1.7rem;
  font-size: 1rem;
}

.btn--block {
  display: flex;
  width: 100%;
  justify-content: center;
}

.btn--gold {
  background: var(--gold-warm);
  color: var(--gold-ink);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 -1px 0 rgba(0, 0, 0, 0.18),
    0 10px 30px -14px var(--gold-glow);
  position: relative;
  overflow: hidden;
}

.btn--gold::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 0.35) 50%,
      rgba(255, 255, 255, 0) 100%);
  transform: skewX(-25deg);
  transition: 0.75s;
}

.btn--gold:hover::after {
  left: 150%;
  transition: 0.75s ease-in-out;
}

.btn--gold:hover {
  background: var(--gold);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 20px 44px -14px var(--gold-glow);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--fg-0);
  /* ring drawn with an inset shadow, not border: on a 999px pill in a
     GPU-composited layer a 1px border rasterises thin/aliased at the round
     caps. An inset box-shadow keeps a uniform thickness with clean AA.
     Opaque gold (#7a6841) matches the active step card's border. */
  box-shadow:
    inset 0 0 0 1px #7a6841,
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  box-shadow:
    inset 0 0 0 1px var(--gold),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: var(--fg-0);
}

/* ============================================================
   NAV — floating glass pill (per skill: mac-dock / glass-pill nav)
   =========================================================== */
/* ---------- LIQUID GLASS (iOS-style refraction) ---------- */
.lg-svg {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Reusable material: a ::before layer blurs AND refracts the backdrop behind
   the element, while the element keeps its tint, border and specular shine. */
.lg-glass {
  position: relative;
  isolation: isolate;
}

.lg-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  backdrop-filter: blur(12px) saturate(100%);
  -webkit-backdrop-filter: blur(12px) saturate(100%);
  pointer-events: none;
}

.nav {
  position: fixed;
  top: clamp(0.75rem, 1.6vw, 1.4rem);
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  z-index: 60;
  width: min(calc(100% - 1.5rem), 1280px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 0.55rem 0.55rem 0.55rem 1.1rem;
  background: rgba(17, 19, 22, 0.32);
  /* Blur the backdrop directly on the nav, NOT via the shared .lg-glass::after.
     On iOS Safari that pseudo-element (z-index:-1, backdrop-filter) composites
     ABOVE the nav's own content regardless of z-index, which hid the burger
     lines — two z-index lifts on the button/spans couldn't beat it. Putting the
     filter on the element itself removes the offending layer (the ::after is
     disabled for .nav just below). */
  backdrop-filter: blur(12px) saturate(100%);
  -webkit-backdrop-filter: blur(12px) saturate(100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow: var(--glass-edge), 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: transform 0.4s var(--ease), background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

/* Disable the shared glass pseudo-element on the nav — its backdrop-filter is
   the layer iOS Safari paints over the burger. The blur now lives on .nav
   itself (above) and on .nav--open (its own backdrop-filter), so no frost is
   lost. Scoped to .nav so every other .lg-glass element keeps its ::after. */
.nav.lg-glass::after {
  display: none;
}

.nav--solid {
  background: rgba(17, 19, 22, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.7);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--fg-0);
}

.nav__mark {
  width: 28px;
  height: 28px;
  color: var(--gold);
  flex-shrink: 0;
}

.nav__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
  transform: translateY(2px);
}

.nav__wordmark span {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.12em;
}

.nav__wordmark em {
  font-style: normal;
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  color: var(--fg-2);
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.nav__links {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
}

.nav__links a {
  position: relative;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--fg-1);
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  transition: color 0.4s var(--ease-hover), background 0.4s var(--ease-hover);
}

.nav__links a:hover {
  color: var(--fg-0);
  background: rgba(255, 255, 255, 0.04);
}

.nav__side {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.nav__dropdown {
  position: relative;
  display: inline-block;
}

.nav__dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ff-mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg-1);
  background: transparent;
  border: 0;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.4s var(--ease-hover), background 0.4s var(--ease-hover);
}

.nav__dropdown-trigger:hover {
  color: var(--fg-0);
  background: rgba(255, 255, 255, 0.04);
}

.nav__dropdown-chevron {
  width: 12px;
  height: 12px;
  color: var(--fg-3);
  transition: transform 0.45s var(--ease-hover), color 0.45s var(--ease-hover);
}

.nav__dropdown-trigger:hover .nav__dropdown-chevron {
  color: var(--fg-1);
}

.nav__dropdown.is-active .nav__dropdown-chevron {
  transform: rotate(180deg);
  color: var(--gold-warm);
}

.nav__dropdown-content {
  position: absolute;
  top: 100%;
  right: 50%;
  transform: translate3d(50%, 8px, 0) scale(0.95);
  transform-origin: top center;
  z-index: 70;
  width: 240px;
  padding: 0.5rem;
  background: rgba(30, 30, 33, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: var(--glass-edge), 0 16px 36px -8px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(50%, 0, 0) scale(0.94);
}

.nav__dropdown.is-active .nav__dropdown-content {
  opacity: 1;
  pointer-events: auto;
}

.nav__dropdown.is-closed-unused .nav__dropdown-content {
  opacity: 0 !important;
  pointer-events: none !important;
}

.nav__dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  color: var(--fg-1);
  transition: background 0.35s var(--ease-hover), color 0.35s var(--ease-hover);
  text-align: left;
}

.nav__dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--fg-0);
}

.nav__dropdown-icon {
  width: 18px;
  height: 18px;
  color: var(--gold);
  flex-shrink: 0;
  opacity: 0.85;
  transition: transform 0.35s var(--ease-hover), color 0.35s var(--ease-hover);
}

.nav__dropdown-item:hover .nav__dropdown-icon {
  color: var(--gold-warm);
  opacity: 1;
  transform: scale(1.05);
}

.nav__dropdown-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.nav__dropdown-label {
  font-family: var(--ff-mono);
  font-size: 0.62rem;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav__dropdown-item:hover .nav__dropdown-label {
  color: var(--fg-2);
}

.nav__dropdown-value {
  font-size: 0.82rem;
  font-weight: 500;
}

.nav__burger {
  display: none;
}

@media (max-width: 960px) {
  .nav {
    grid-template-columns: 1fr auto;
    gap: 0.5rem;
    padding: 0.55rem 0.55rem 0.55rem 0.9rem;
  }

  .nav__links,
  .nav__side {
    display: none;
  }

  .nav__burger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: var(--bg-2);
    border: 1px solid var(--line);
    padding: 0;
    /* Lift above the .nav.lg-glass ::after (z-index:-1 backdrop-filter). Older
       iOS Safari (e.g. iPhone 11) mis-composites that glass layer ABOVE
       non-positioned siblings, which hid the burger entirely. Every other nav
       child is already position:relative — that's why only the burger vanished. */
    position: relative;
    z-index: 1;
  }

  .nav__burger svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: block;
    position: relative;
    z-index: 1;
  }

  .nav__burger path {
    stroke: var(--fg-0);
    stroke-width: 2;
    stroke-linecap: round;
    fill: none;
  }
}

/* Matte nav on phones — the fixed bar re-samples its backdrop-filter on every
   scroll frame, a constant cost while scrolling. Drop the blur and use an opaque
   background so the bar stays readable over the hero without the per-frame
   re-blur. (.nav--solid still layers its scrolled shadow on top.) */
@media (max-width: 960px) {

  .nav,
  .nav.nav--open {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .nav {
    background: rgba(15, 17, 20, 0.9);
  }
}

/* Mobile Menu Open State */
@media (max-width: 960px) {
  .nav.nav--open {
    border-radius: 28px;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    align-items: start;
    padding: 1.1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 100%) rgba(20, 20, 25, 0.95);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    box-shadow: 0 24px 60px -15px rgba(0, 0, 0, 0.85);
  }
  
  .nav.nav--open .nav__links {
    display: flex;
    flex-direction: column;
    grid-column: 1 / -1;
    gap: 1.25rem;
    padding: 1.5rem 0 1rem 0;
    border-top: 1px solid var(--line);
  }
  
  .nav.nav--open .nav__side {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    grid-column: 1 / -1;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
  }
  
  .nav.nav--open .nav__side .btn {
    width: 100%;
  }
  
  .nav.nav--open .nav__dropdown {
    width: 100%;
  }

  /* Level the wordmark with the X. The nav's align-items:start (above)
     top-aligns row-1 items, but the burger box is taller than the brand, so the
     centered X sat lower than the wordmark. Centering the brand in its row track
     matches them — same as the closed bar's align-items:center. */
  .nav.nav--open .nav__brand {
    align-self: center;
  }

  /* keep the close (X) in the top-right next to the logo — without this it
     auto-flows into an implicit row at the bottom of the open menu */
  .nav.nav--open .nav__burger {
    grid-row: 1;
    grid-column: 2;
    justify-self: end;
    align-self: center;
    /* shrink the whole X uniformly so its proportions stay correct and it isn't
       larger than the JAPAN PRIME wordmark (scaling the box + padding instead
       would distort the cross arms) */
    transform: scale(0.72);
    transform-origin: center;
  }
  
  .nav.nav--open .nav__dropdown-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
  }
  
  .nav.nav--open .nav__dropdown-content {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    width: 100%;
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--line);
    box-shadow: none;
    display: none;
  }

  /* The lg-glass backdrop-filter on the open panel blurs the "Контакты" trigger
     above it (it sits inside the nav, which already blurs blur(40px)) — drop the
     redundant glass blur so the trigger label stays crisp. */
  .nav.nav--open .nav__dropdown-content.lg-glass::after {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  
  .nav.nav--open .nav__dropdown.is-active .nav__dropdown-content {
    display: block;
  }
  
  /* Hamburger <-> X is a cross-fade between the two stroked paths — no transform
     math, and nothing depends on thin bars painting. */
  .nav__burger path {
    transition: opacity 0.25s var(--ease);
  }

  .nav__burger-cross {
    opacity: 0;
  }

  .nav--open.nav .nav__burger-lines {
    opacity: 0;
  }

  .nav--open.nav .nav__burger-cross {
    opacity: 1;
  }
}

/* ============================================================
   HERO
   Artistic asymmetry · Left-aligned text · Video background
   Headlight glow emanates from the car in the video
   =========================================================== */
.hero {
  position: relative;
  min-height: 100dvh;
  padding: clamp(6.5rem, 9vw, 8.5rem) var(--shell) clamp(2rem, 5vw, 5rem);
  overflow: hidden;
  isolation: isolate;
  background: var(--bg-0);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  --hero-video-blur: 0px;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  background: var(--bg-1);
  filter:
    brightness(0.45) contrast(1.08) saturate(1.05) blur(var(--hero-video-blur));
  transition: filter 0.18s linear;
}

/* Minimal vignette — subtle bottom fade + soft edge for cinematic framing.
   Video stays the hero of the hero. */
.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, var(--bg-0) 0%, rgba(9, 9, 11, 0.92) 14%, rgba(9, 9, 11, 0.45) 32%, transparent 56%),
    radial-gradient(ellipse 130% 110% at 50% 50%, transparent 60%, rgba(9, 9, 11, 0.4) 100%);
  pointer-events: none;
}



.hero__inner {
  position: relative;
  z-index: 2;
  max-width: min(var(--max), 100%);
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(1.25rem, 2.2vw, 2rem);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 1rem 0.55rem 0.8rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 100%) rgba(15, 15, 18, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  backdrop-filter: blur(24px) saturate(185%);
  -webkit-backdrop-filter: blur(24px) saturate(185%);
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--fg-0);
  letter-spacing: 0.04em;
  width: fit-content;
  margin-bottom: clamp(2.5rem, 7vw, 6.5rem);
  box-shadow:
    var(--glass-edge),
    0 10px 25px -10px rgba(0, 0, 0, 0.45);
  transition: border-color 0.4s var(--ease-hover), box-shadow 0.4s var(--ease-hover), transform 0.4s var(--ease-hover);
}

.hero__eyebrow:hover {
  border-color: rgba(var(--gold-rgb), 0.35);
  box-shadow:
    inset 0 1.5px 2px rgba(255, 255, 255, 0.3),
    inset 0 -1px 2px rgba(0, 0, 0, 0.15),
    0 12px 30px -8px rgba(var(--gold-rgb), 0.18);
  transform: translateY(-1px);
}

/* === CURSOR BEACON — soft gold light following the cursor === */
.beacon {
  position: fixed;
  top: 0;
  left: 0;
  width: 140px;
  height: 140px;
  /* center the glow on the cursor (JS sets transform to clientX/clientY) */
  margin: -70px 0 0 -70px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(
    circle,
    rgba(var(--gold-warm-rgb), 0.16) 0%,
    rgba(var(--gold-warm-rgb), 0.07) 35%,
    transparent 70%
  );
  mix-blend-mode: screen;
  will-change: transform;
}

/* Touch devices have no cursor — hide the beacon so it doesn't paint a static
   gold glow in the top-left corner (JS also skips its rAF loop on coarse pointers). */
@media (pointer: coarse) {
  .beacon {
    display: none;
  }
}

/* === GLOWING HEADLINE (the user's explicit request) === */
.hero__title {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 6.8vw, 6.2rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--fg-0);
  max-width: 16ch;
  margin-left: 0;
}

.hero__title-line {
  display: block;
  position: relative;
  overflow: visible;
  padding-right: 0.4em;
  transform-origin: left center;
}

.hero__title-line--glow {
  color: var(--gold-warm);
  text-shadow: 0 0 20px var(--gold-glow), 0 0 40px rgba(var(--gold-warm-rgb), 0.2);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

/* ============================================================
   SECTION HEAD (shared)
   =========================================================== */
.section-head {
  max-width: var(--max);
  margin: 0 auto clamp(2.5rem, 5vw, 4.5rem);
  padding: 0 var(--shell);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.section-head__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--fg-2);
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

.section-head__hash {
  color: var(--gold);
  font-weight: 500;
}

.section-head__line {
  display: inline-block;
  width: 52px;
  height: 1px;
  background: linear-gradient(to right, var(--gold), transparent);
}

.section-head__tag {
  color: var(--fg-1);
  text-transform: uppercase;
}

.section-head__title {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.8vw, 3.2rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--fg-0);
  max-width: 22ch;
}

.section-head__title em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold-warm);
  font-family: var(--ff-display);
}

/* ============================================================
   PROCESS — sticky left title, scrolling right stack
   =========================================================== */
.process,
.process__stage {
  color: var(--fg-1) !important;
}

/* both the section and its inner stage are transparent (same colour as the
   body bg, so the page looks identical) — this lets ambient glows bleed
   across the seam with no hard edge. The section is not pinned, so nothing
   shows through. */
.process,
.process__stage {
  background-color: transparent !important;
}

.process {
  position: relative;
  padding: clamp(5rem, 10vw, 10rem) 0 !important; /* No horizontal padding on section to allow full bleed */
}

.process__stage {
  width: 100% !important;
  max-width: 100vw !important;
  margin: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) !important;
  gap: clamp(2rem, 4vw, 4rem) !important;
  align-items: start !important;
  /* Align left column with page grid margins */
  padding-left: calc(max(var(--shell), (100vw - var(--max)) / 2 + var(--shell))) !important;
  padding-right: 0 !important;
}

@media (max-width: 960px) {
  .process__stage {
    display: flex !important;
    flex-direction: column !important;
    padding-left: var(--shell) !important;
    padding-right: var(--shell) !important;
  }
}

.process__side-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

@media (min-width: 961px) {
  .process__btn {
    align-self: start;
  }
}

/* The section's warm ambient glow passes behind this button and the glass
   ::after blurs it upward, washing out the gold ring. A solid dark backing
   (same panel the "Назад" button sits on) gives the ring even contrast. */
.process__btn,
.process__btn:hover {
  background: var(--bg-1);
}

/* The .lg-glass ::after (z-index:-1, backdrop-filter) paints OVER the inset
   ring — within a stacking context, negative-z children draw above the root's
   background/box-shadow. Inset the glass so it stops overlapping the 1px ring,
   leaving it crisp and opaque like the "Назад" button. */
.process__btn::after,
.hero__cta .lg-glass::after,
.quiz-nav .btn--ghost.lg-glass::after {
  inset: 1.5px;
}

.process__meta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--fg-2);
  letter-spacing: 0.06em;
}

.process__meta .section-head__hash {
  color: var(--gold);
}

.process__meta .section-head__line {
  display: inline-block;
  width: 52px;
  height: 1px;
  background: linear-gradient(to right, var(--gold), transparent);
}

.process__title {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.8vw, 3.2rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--fg-0) !important;
}

.process__title em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold-warm);
  display: block;
}

.process__lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--fg-1);
  max-width: 42ch;
  line-height: 1.5;
}

@media (min-width: 961px) {
  .process__lead {
    margin-top: 2.5rem !important;
  }
}

.process__nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 961px) {
  .process__nav {
    padding-right: var(--shell);
  }
}

@media (max-width: 960px) {
  .process__side-info {
    order: 1;
  }
  .process__stack-wrap {
    order: 2;
  }
  .process__btn {
    order: 3;
    width: 100%;
    margin-top: 2rem !important;
  }
  .process__nav {
    display: none !important;
  }
}

.process__nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--fg-1);
  cursor: pointer;
  transition: border-color 0.35s var(--ease), color 0.35s var(--ease), background 0.35s var(--ease);
}

.process__nav-btn:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--fg-0);
  background: rgba(var(--gold-rgb), 0.05);
  transform: scale(1.05);
}

.process__nav-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.process__nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.process__nav-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.35s var(--ease);
}

.process__nav-btn:hover:not(:disabled) svg {
  transform: scale(1.15);
}

.process__nav-counter {
  font-family: var(--ff-mono);
  font-size: 0.9rem;
  color: var(--fg-1);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 60px;
  justify-content: center;
  user-select: none;
}

.process__nav-current {
  color: var(--gold-warm);
  font-weight: 600;
}

.process__nav-separator {
  color: var(--fg-3);
}

.process__nav-total {
  color: var(--fg-2);
}

.process__stack-wrap {
  width: 100%;
  overflow: hidden;
}

.process__stack {
  display: flex;
  flex-direction: column;
  gap: 0;
}

@media (min-width: 961px) {
  .process__stack-wrap {
    padding: 2.5rem 0;
  }

  .process__stack {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 2rem !important;
    width: max-content !important;
    padding-left: 0 !important;
    padding-right: var(--shell) !important;
    will-change: transform;
    /* GSAP writes transform inline every frame to slide the cards. The default
       transition-property:all + the reduced-motion `transition-duration:0.01ms
       !important` make the browser run a 0.01ms CSS transition on EACH of those
       per-frame transform writes — GSAP and CSS then fight over the same
       property, which stutters the slide ("smooth yet stuttery" / ~30fps).
       Forbid CSS transitions here so GSAP's updates apply directly. */
    transition: none !important;
  }

  .step {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    width: 380px !important;
    flex-shrink: 0 !important;
    padding: 3rem 2.2rem !important;
    border-bottom: none !important;
    border-top: none !important;
    /* OPAQUE background: these cards slide over the page's fixed grain layer
       (body::before feTurbulence). A translucent card lets that grain show
       through and, because the grain is viewport-anchored while the card
       moves, it crawls/shimmers inside the card during the slide. A solid
       dark panel blocks it. No backdrop-filter for the same perf reason. */
    background: #15171c !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    border-radius: 24px !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.03),
      0 15px 35px -5px rgba(0, 0, 0, 0.2);
    transition: background 0.6s var(--ease), border-color 0.6s var(--ease), box-shadow 0.6s var(--ease) !important;
    /* force fully opaque — overrides the base .step opacity:0.45 (which would
       make the card translucent and re-expose the grain). Dim via ::after. */
    opacity: 1 !important;
  }

  /* Dim inactive cards with a flat dark veil, NOT opacity or filter:
     opacity would make the card translucent and re-expose the grain mid-slide;
     filter:brightness re-rasterises every filtered card each frame while the
     stack slides (the "15fps" jank). A static overlay just composites with the
     card as it moves — cheap. */
  .step::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: #070809;
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.6s var(--ease);
  }

  .step.is-active::after {
    opacity: 0 !important;
  }

  .step:first-child {
    /* keep the same full border as every other card (was border-top: none,
       a leftover from the old vertical-list layout that removed card 1's top edge) */
    border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
  }

  .step.is-active {
    /* OPAQUE gold border: identical on every card. A semi-transparent border
       gets washed out where the ambient glow passes behind card 1 — an opaque
       colour renders the same no matter what is behind the card. */
    border-color: #7a6841 !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.05),
      0 25px 50px -15px rgba(0, 0, 0, 0.5),
      0 0 40px -15px rgba(243, 208, 130, 0.1);
  }

  .step__num {
    margin-bottom: 2rem !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    color: var(--gold-warm) !important;
    display: inline-flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
  }

  .step__num svg {
    width: 38px !important;
    height: 38px !important;
    fill: currentColor !important;
    transform: none !important;
  }

  .step.is-active .step__num svg {
    transform: scale(1.08) !important;
  }

  .step__body {
    display: flex;
    flex-direction: column;
  }

  .step__body h3 {
    font-size: 1.45rem !important;
    font-weight: 700 !important;
    color: var(--fg-0) !important;
    margin-bottom: 0.7rem !important;
    text-transform: uppercase !important;
  }

  .step__body p {
    font-size: 0.95rem !important;
    line-height: 1.55 !important;
    color: var(--fg-1) !important;
  }

}

.step {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1rem, 2vw, 2rem);
  padding: clamp(1.8rem, 3vw, 2.6rem) 0;
  border-bottom: 1px solid var(--line);
  opacity: 0.45;
  transition: opacity 0.6s var(--ease);
}

.step:first-child {
  border-top: 1px solid var(--line);
}

.step.is-active {
  opacity: 1;
}

.step__num {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-mono);
  font-size: 0.84rem;
  color: var(--fg-2);
  background: var(--bg-1);
  transition: all 0.5s var(--ease-spring);
  position: relative;
}

.step.is-active .step__num {
  border-color: var(--gold);
  color: var(--gold-ink);
  background: var(--gold-warm);
  box-shadow: 0 0 0 4px rgba(var(--gold-warm-rgb), 0.12), 0 10px 30px -10px var(--gold-glow);
}

.step__num svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  transition: transform 0.5s var(--ease-spring-hover);
}

.step.is-active .step__num svg {
  transform: scale(1.08);
}

.step__body h3 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  color: var(--fg-0);
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
  line-height: 1.1;
  text-transform: uppercase;
}

.step__body p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--fg-1);
  max-width: 54ch;
  margin-bottom: 0;
}

/* ============================================================
   FAQ — accordion
   =========================================================== */
.faq {
  padding: clamp(5rem, 10vw, 10rem) var(--shell);
}

.faq__list {
  max-width: 960px;
  margin: 0 auto;
}

.faq__item {
  position: relative;
}

.faq__item::before {
  content: "";
  position: absolute;
  inset: 2px 20px;
  background: radial-gradient(ellipse 60% 50% at 0% 50%, rgba(var(--gold-rgb), 0.08), transparent);
  filter: blur(25px);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  pointer-events: none;
  z-index: 0;
}

.faq__item::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 15%, var(--line) 85%, transparent);
  transition: background 0.4s var(--ease);
  pointer-events: none;
  z-index: 1;
}

.faq__item.is-expanded::before {
  opacity: 1;
  background: radial-gradient(ellipse 70% 60% at 0% 50%, rgba(var(--gold-rgb), 0.12), transparent);
}

.faq__item:hover::before {
  opacity: 0.55;
}

.faq__item:hover::after {
  background: linear-gradient(90deg, transparent, rgba(var(--gold-rgb), 0.3) 15%, rgba(var(--gold-rgb), 0.3) 85%, transparent);
}

.faq__summary {
  position: relative;
  z-index: 1;
  width: 100%;
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.4rem, 2.5vw, 1.9rem) 0;
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  color: var(--fg-0);
  letter-spacing: -0.01em;
  transition: color 0.5s var(--ease-hover);
}

.faq__summary:hover {
  color: var(--gold-warm);
}

.faq__plus {
  width: 24px;
  height: 24px;
  position: relative;
  flex-shrink: 0;
}

.faq__plus::before,
.faq__plus::after {
  content: "";
  position: absolute;
  background: var(--gold-warm);
  transition: transform 0.5s var(--ease-spring-hover);
}

.faq__plus::before {
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  transform: translateY(-50%);
}

.faq__plus::after {
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
}

.faq__item.is-expanded .faq__plus::after {
  transform: translateX(-50%) rotate(90deg);
  opacity: 0;
}

.faq__content {
  position: relative;
  z-index: 1;
  max-width: 72ch;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--fg-1);
  /* Smooth open/close: JS measures the panel and animates `height` between
     0 and its natural pixel height (then sets `auto`). overflow:hidden clips
     the content while collapsed so nothing leaks out. */
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: height 0.7s var(--ease), opacity 0.5s var(--ease);
}

.faq__item.is-expanded .faq__content {
  opacity: 1;
}

.faq__content strong {
  color: var(--fg-0);
  font-weight: 500;
}

.faq__content ul {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 0;
  padding-top: 0.2rem;
  padding-bottom: clamp(1.4rem, 2.5vw, 1.9rem);
}

.faq__content li {
  list-style-type: disc;
  margin-left: 1.4rem;
}

/* The ::before glow is anchored to the item (inset: 2px 20px), so it grows
   frame-by-frame as the panel's height animates open — re-rendering a 25px
   gaussian blur over a resizing box every frame, which tanks the open to ~10fps
   on phones. Drop the blurred layer on mobile (it's barely visible there) so the
   height/opacity reveal stays smooth. */
@media (max-width: 960px) {
  .faq__item::before {
    display: none;
  }

  /* `height` is a layout property — it can't be GPU-composited, so every frame
     of the open/close reflows the page below (calculator, form, footer — all
     backdrop-filter panels that re-blur on each shift). A 0.7s morph = ~40
     stuttering frames; cut it to 0.2s so the reflow is over before it's felt.
     The opacity fade carries the "reveal" feel. */
  .faq__content {
    transition: height 0.2s var(--ease), opacity 0.3s var(--ease);
  }
}

/* ============================================================
   REQUEST FORM
   =========================================================== */
.request {
  --request-spacing: clamp(5rem, 10vw, 10rem);
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: var(--request-spacing) var(--shell);
}

.request > .glow-container {
  display: none;
}

.request__spotlight-glow {
  position: absolute;
  inset: -20% 60% 50% -10%;
  background: radial-gradient(circle, rgba(var(--gold-rgb), 0.06), transparent 80%);
  filter: blur(180px);
  pointer-events: none;
}

/* === AMBIENT WARM GLOW — Aston-Martin-style gold bloom behind the glass === */
.glow-container {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.glow-sphere {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(
    circle,
    rgba(var(--gold-warm-rgb), 0.2) 0%,
    rgba(var(--gold-rgb), 0.08) 42%,
    transparent 72%
  );
  filter: blur(90px);
}

/* trust → sits low-left and bleeds down across the seam into the process block */
.glow-sphere--1 {
  width: 480px;
  height: 480px;
  top: 120px;
  left: -260px;
  /* softer feather + center pulled to the left wall of the landing */
  filter: blur(110px);
}

/* calculator → near the top, bleeds up toward the faq block (LEFT edge) */
.glow-sphere--2 {
  width: 460px;
  height: 460px;
  top: -130px;
  left: -160px;
}

/* request */
.glow-sphere--3 {
  width: 420px;
  height: 420px;
  bottom: -120px;
  left: -120px;
}

.glow-sphere--4 {
  width: 360px;
  height: 360px;
  top: -100px;
  right: -80px;
  opacity: 0.7;
}

/* faq → bridges the process and calculator seams (RIGHT edge) */
.glow-sphere--5 {
  width: 460px;
  height: 460px;
  top: -150px;
  right: -200px;
}

/* On phones the spheres are offset wider than the viewport (left/right negative),
   and overflow-x:hidden on body does not reliably contain absolutely-positioned
   descendants (notably iOS Safari) — clip them horizontally to kill the
   horizontal scroll. overflow-y stays visible so the glow still bleeds across
   section seams (overflow:hidden here would harden those seams into visible
   lines on mobile). */
@media (max-width: 960px) {
  .glow-container {
    overflow-x: clip;
    overflow-y: visible;
  }

  /* The ambient glows are decorative radial gradients that are already soft;
     the big runtime blur (90–180px) is a heavy mobile rasterization for almost
     no visible gain. Cut the radius hard on phones — the gradient feather keeps
     the look, the paint cost drops ~10–20x. */
  .glow-sphere,
  .glow-sphere--1 {
    filter: blur(40px);
  }

  .request__spotlight-glow {
    filter: blur(50px);
  }
}

.request__wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
  grid-template-areas: "intro form" "photo form";
  grid-template-rows: auto 1fr;
  gap: 0 clamp(2rem, 4vw, 5rem);
  align-items: start;
}

.request__intro {
  grid-area: intro;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.request__title {
  font-family: var(--ff-display);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.8vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--fg-0);
  padding-top: 0.05em;
}

.request__title em {
  font-style: italic;
  font-weight: 300;
  color: var(--gold-warm);
  display: block;
}

.request__lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.5;
  color: var(--fg-1);
  max-width: 48ch;
}

.request__image-wrap {
  grid-area: photo;
  position: relative;
  width: 100%;
  max-width: 820px;
  aspect-ratio: 16 / 9;
  margin-top: 1.5rem;
  overflow: hidden;
  user-select: none;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 24%, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 24%, #000 70%, transparent 100%);
}

.request__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transform: scaleX(-1);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 22%, #000 78%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000 22%, #000 78%, transparent 100%);
}

@media (max-width: 960px) {
  .request__wrap {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .request__image-wrap {
    margin-top: 0;
  }

  /* the wrap is now a flex column with align-items:start, so the form shrinks to
     its content width and left-aligns — stretch it to fill like the other blocks */
  .request__form {
    width: 100%;
  }

}

.request__consent {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--fg-2);
  margin-top: -0.2rem;
  cursor: pointer;
}

.request__consent input {
  margin-top: 0.15rem;
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.request__consent a {
  color: var(--fg-1);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
  transition: color 0.45s var(--ease-hover), text-decoration-color 0.45s var(--ease-hover);
}

.request__consent a:hover {
  color: var(--gold);
  text-decoration-color: var(--gold-deep);
}

/* .field.* — outrank the `.field { display:flex }` rule below, otherwise the
   grid-rows collapse never applies and the hidden field keeps its full height. */
.field.f-telegram-wrap {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
  transition: grid-template-rows 0.5s var(--ease), opacity 0.4s var(--ease), margin 0.5s var(--ease);
  /* collapsed: absorb the full container gap (1.5rem) so the hidden field
     leaves only one normal gap between the select and the consent — no void */
  margin-top: -1.5rem;
}

.field.f-telegram-wrap.is-visible {
  grid-template-rows: 1fr;
  opacity: 1;
  pointer-events: auto;
  margin-top: 0;
}

.f-telegram-inner {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.f-telegram-inner input {
  width: 100%;
}

.request__form {
  grid-area: form;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 40px 80px -40px rgba(0, 0, 0, 0.9);
  isolation: isolate;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.field label {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--fg-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.field input,
.field select {
  font-family: var(--ff-body);
  font-size: 1rem;
  color: var(--fg-0);
  padding: 0.9rem 1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23c9a870' stroke-width='1.6'><path d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1.1rem center;
  background-size: 12px 8px;
  padding-right: 2.6rem;
  cursor: pointer;
}

.field input::placeholder {
  color: var(--fg-3);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--bg-3);
  box-shadow: 0 0 0 4px rgba(var(--gold-rgb), 0.08);
}

.request__success {
  position: absolute;
  inset: 0;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  background: var(--bg-1);
  border-radius: 26px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.9rem;
  color: var(--fg-0);
  z-index: 2;
}

.request__success.is-visible {
  display: flex;
  animation: fade-in 0.5s var(--ease);
}

.request__success-mark {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gold-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-ink);
  box-shadow: 0 0 0 6px rgba(var(--gold-warm-rgb), 0.15), 0 20px 40px -10px var(--gold-glow);
  animation: mark-pop 0.6s var(--ease-spring);
}

.request__success-mark svg {
  width: 36px;
  height: 36px;
}

.request__success strong {
  font-family: var(--ff-display);
  font-size: 1.6rem;
  color: var(--fg-0);
  font-weight: 500;
}

.request__success span {
  color: var(--fg-1);
  max-width: 36ch;
  line-height: 1.55;
}

.request__error {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1rem;
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.42);
  color: #fca5a5;
  font-size: 0.9rem;
  line-height: 1.45;
}

.request__error[hidden] {
  display: none;
}

.request__error svg {
  flex-shrink: 0;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mark-pop {
  0% {
    transform: scale(0);
  }

  60% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

/* ============================================================
   FOOTER
   =========================================================== */
.foot {
  padding: clamp(3rem, 6vw, 5rem) var(--shell) 2rem;
  position: relative;
  overflow: hidden;
}

.foot__particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.foot__top,
.foot__bottom {
  position: relative;
  z-index: 2;
}

.foot__top {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 960px) {
  .foot__top {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.foot__left {
  display: flex;
  justify-content: flex-start;
}

@media (max-width: 960px) {
  .foot__left {
    justify-content: center;
  }
}

.foot__center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.foot__right {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 960px) {
  .foot__right {
    justify-content: center;
  }
}

.foot__brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1.2rem;
  color: var(--fg-0);
  text-decoration: none;
  transition: opacity 0.3s var(--ease);
}

.foot__brand:hover {
  opacity: 0.85;
}

.foot__brand .nav__mark {
  width: 64px;
  height: 64px;
}

.foot__brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

@media (max-width: 960px) {
  .foot__brand-text {
    align-items: center;
  }
}

.foot__brand-text strong {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 2.2rem;
  letter-spacing: 0.14em;
  line-height: 1;
  margin-bottom: 0.2rem;
}

.foot__brand-text span {
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  color: var(--gold-warm);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.foot__socials {
  display: flex;
  gap: 1rem;
}

.foot__social {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gold-ink);
  color: var(--bg-0);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}

.foot__social:hover {
  transform: scale(1.1);
  background: var(--gold);
}

.foot__social svg {
  width: 20px;
  height: 20px;
}

.foot__contacts {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.foot__contacts a {
  font-size: 0.88rem;
  color: var(--fg-1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.foot__bottom {
  max-width: var(--max);
  margin: 2rem auto 0;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--fg-3);
  letter-spacing: 0.02em;
}

@media (max-width: 720px) {
  .foot__bottom {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
  }
}



/* ============================================================
   REVEAL / ANIMATION STATES
   =========================================================== */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

[data-reveal].is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero__headlight {
    animation: none;
  }

  /* Keep the FAQ expand/collapse — a gentle, functional reveal — animated
     even under reduced motion, since the global rule above would freeze it. */
  .faq__content {
    transition-duration: 0.7s !important;
  }

  /* Same rationale for the Telegram field's expand — a soft vertical reveal,
     not vestibular motion. Without this the global rule freezes it and it
     pops in instantly. */
  .field.f-telegram-wrap {
    transition-duration: 0.5s !important;
  }

  /* And the quiz steps wrapper — its height is FLIP-animated in JS on
     Далее/Назад. The global freeze clamps the duration to 0.01ms, making the
     resize snap (the "дёрганье"). Gentle vertical reveal, so keep it — synced
     to the 0.5s step slide below. */
  .quiz-steps {
    transition-duration: 0.5s !important;
  }

  /* The new step's directional slide+fade (quizStepInFwd/Back). The global
     freeze clamps it to 0.01ms, so the content pops in instantly while the
     height slides. Keep it animated, matched to the 0.5s height morph. */
  .quiz-step.is-active {
    animation-duration: 0.5s !important;
  }

  /* Inner-content cascade (quizChildIn). Keep it alive under reduced motion —
     the global freeze clamps only *-duration, not animation-delay, so the
     staggered timing survives once the duration is restored here. */
  .quiz-step.is-active>* {
    animation-duration: 0.45s !important;
  }
}

/* On phones the reduced-motion block above re-inflates these height morphs to
   their desktop durations (0.7s / 0.5s) — exactly the long, layout-thrashing
   reveals that stutter on a phone CPU. Keep a gentle reveal, but at the mobile
   0.2s so reduced-motion users get the same smooth open as everyone else. Later
   in source + same specificity → wins over the !important above. */
@media (prefers-reduced-motion: reduce) and (max-width: 960px) {
  .faq__content {
    transition-duration: 0.2s !important;
  }

  .quiz-steps {
    transition-duration: 0.2s !important;
  }
}

/* ============================================================
   TRUST — "Почему нам доверяют"
   =========================================================== */


.trust {
  position: relative;
  padding: clamp(3rem, 6vw, 4.5rem) var(--shell);
  /* top edge starts on the exact same colour the hero fades into, then
     dissolves to the page background — makes the hero seam invisible */
  background: linear-gradient(to bottom, var(--bg-0) 0, rgba(9, 9, 11, 0) 260px);
}

.trust__title {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--fg-0);
  text-align: left;
  text-transform: uppercase;
  max-width: var(--max);
  margin: 0 auto clamp(1.8rem, 3vw, 2.2rem);
}

.trust__grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2vw, 1.6rem);
}

@media (max-width: 780px) {
  .trust__grid {
    grid-template-columns: 1fr;
  }
}

.trust__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  padding: clamp(1.5rem, 2.5vw, 2.2rem) clamp(1.2rem, 2vw, 1.8rem);
  background: rgba(30, 30, 32, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: var(--glass-edge);
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.6s var(--ease), border-color 0.6s var(--ease), box-shadow 0.6s var(--ease);
  will-change: transform;
}

.trust__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(var(--gold-rgb), 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.trust__card:hover {
  border-color: var(--gold-deep);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 30px 70px -30px rgba(0, 0, 0, 0.8);
}

.trust__icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(var(--gold-rgb), 0.08);
  border: 1px solid rgba(var(--gold-rgb), 0.15);
  flex-shrink: 0;
}

.trust__icon svg {
  width: 32px;
  height: 32px;
}

.trust__card h3 {
  font-family: var(--ff-display);
  font-weight: 500;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  letter-spacing: 0.04em;
  color: var(--fg-0);
  text-transform: uppercase;
}

.trust__card p {
  font-size: clamp(0.92rem, 1.1vw, 1rem);
  color: var(--fg-1);
  line-height: 1.55;
  max-width: 28ch;
}

/* ============================================================
   PRIVACY BTN & MODAL
   =========================================================== */
.foot__privacy-btn {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  color: var(--fg-3);
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
  transition: color 0.45s var(--ease-hover), text-decoration-color 0.45s var(--ease-hover);
}

.foot__privacy-btn:hover {
  color: var(--fg-1);
  text-decoration-color: var(--fg-2);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-hover);
  padding: clamp(1rem, 3vw, 2rem);
}

.modal-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 20px;
  width: 100%;
  max-width: 800px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.5s var(--ease-spring-hover);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}

.modal-overlay.is-active .modal {
  transform: translateY(0);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  border-bottom: 1px solid var(--line);
}

.modal__title {
  font-family: var(--ff-display);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  color: var(--fg-0);
  font-weight: 500;
  letter-spacing: -0.01em;
}

.modal__close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--fg-1);
  border: 1px solid var(--line);
  transition: background 0.4s var(--ease-hover), color 0.4s var(--ease-hover);
  flex-shrink: 0;
}

.modal__close:hover {
  background: var(--bg-3);
  color: var(--fg-0);
  transform: scale(1.05);
}

.modal__content {
  padding: clamp(1.2rem, 3vw, 1.8rem);
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--fg-1);
}

.modal__content h3 {
  font-family: var(--ff-display);
  color: var(--fg-0);
  font-size: 1.1rem;
  margin: 1.5rem 0 0.8rem;
  font-weight: 500;
}

.modal__content h3:first-child {
  margin-top: 0;
}

.modal__content p,
.modal__content ul {
  margin-bottom: 0.8rem;
}

.modal__content ul {
  padding-left: 1.5rem;
  list-style: disc;
}

.modal__footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 1.5rem);
  border-top: 1px solid var(--line);
  background: var(--bg-1);
  border-radius: 0 0 20px 20px;
  min-height: 80px;
}

.modal__read-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--fg-2);
  font-size: 0.9rem;
}

.modal__read-arrows {
  width: 24px;
  height: 24px;
  color: var(--gold-ink);
  animation: modalBounce 1.5s infinite;
}

@keyframes modalBounce {

  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }

  40% {
    transform: translateY(5px);
  }

  60% {
    transform: translateY(3px);
  }
}

.modal__buttons {
  display: none;
  gap: 1rem;
  width: 100%;
  justify-content: center;
}

.modal__footer.is-scrolled .modal__read-more {
  display: none;
}

.modal__footer.is-scrolled .modal__buttons {
  display: flex;
  animation: fadeIn 0.4s var(--ease);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Duplicate hover rule removed for Liquid Glass compatibility */

/* ============================================================
   CALCULATOR SECTION
   =========================================================== */
.calculator {
  padding: clamp(4rem, 8vw, 8rem) var(--shell);
  position: relative;
}

.calc__wrap {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: stretch;
}

@media (max-width: 960px) {
  .calc__wrap {
    grid-template-columns: 1fr;
  }
  /* grid items default to min-width:auto (= min-content) and refuse to shrink,
     blowing the column out past the viewport — let them shrink to the column */
  .calc__left,
  .calc__right {
    min-width: 0;
  }
}

.calc__left {
  background: rgba(30, 30, 32, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.calc__right {
  position: sticky;
  top: 100px;
  background: rgba(30, 30, 32, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-radius: 24px;
  box-shadow: var(--glass-edge), 0 20px 40px -15px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.calc__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 640px) {
  .calc__grid {
    grid-template-columns: 1fr;
  }
  /* inline `grid-column: span 2` would force an implicit 2nd column even at 1fr — collapse it */
  .calc__grid > .calc__field[style*="span 2"] {
    grid-column: 1 / -1 !important;
  }
}

.calc__field {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.calc__field label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--fg-1);
}

.calc__input-wrap {
  position: relative;
  display: flex;
  width: 100%;
}

.calc__input-wrap input[type="text"],
.calc__input-wrap input[type="number"],
.calc__input-wrap select {
  width: 100%;
  padding: 0.9rem 1.2rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--fg-0);
  font-family: var(--ff-body);
  font-size: 0.94rem;
  outline: none;
  transition: border-color 0.35s var(--ease);
}

.calc__input-wrap input[type="text"]:focus,
.calc__input-wrap input[type="number"]:focus,
.calc__input-wrap select:focus {
  border-color: var(--gold);
}

/* remove native number-input spinner arrows */
.calc__input-wrap input[type="number"]::-webkit-outer-spin-button,
.calc__input-wrap input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.calc__input-wrap input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.calc__input-wrap select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'><path d='M6 9l6 6 6-6' stroke='%23c9a870' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1.2rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

/* recolour native dropdown options (removes the default blue highlight) */
.calc__input-wrap select,
.field select {
  accent-color: var(--gold);
}
.calc__input-wrap select option,
.field select option {
  background: var(--bg-2);
  color: var(--fg-0);
}
.calc__input-wrap select option:checked,
.field select option:checked {
  background: var(--bg-3);
  color: var(--gold-warm);
}

/* ---- custom dropdown (replaces the native <select> popup so there is
   no browser-blue option highlight; native select stays hidden for value) ---- */
.cselect { position: relative; width: 100%; }
.cselect > select {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; pointer-events: none; margin: 0;
}
.cselect__trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.9rem 1.2rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px;
  color: var(--fg-0); font-family: var(--ff-body); font-size: 0.94rem; text-align: left; cursor: pointer;
  transition: border-color 0.35s var(--ease);
}
.cselect__trigger:hover,
.cselect.open .cselect__trigger { border-color: var(--gold); }
.cselect__trigger svg { width: 1rem; height: 1rem; flex: 0 0 auto; color: var(--gold-warm); transition: transform 0.3s var(--ease); }
.cselect.open .cselect__trigger svg { transform: rotate(180deg); }
.cselect__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect__menu {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.7);
  max-height: 260px; overflow-y: auto;
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.cselect.open .cselect__menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cselect__option {
  padding: 0.7rem 1rem; border-radius: 8px; cursor: pointer; color: var(--fg-1); font-size: 0.92rem;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.cselect__option:hover { background: var(--bg-3); color: var(--gold-warm); }
.cselect__option[aria-selected="true"] { color: var(--gold-warm); }
.cselect__option.is-disabled { opacity: 0.5; cursor: default; }

/* Custom range slider styling */
.calc__slider-wrap {
  margin-top: 0.5rem;
}

.calc__slider-val {
  font-family: var(--ff-mono);
  font-size: 0.88rem;
  color: var(--gold-warm);
  margin-left: auto;
}

.calc__field-header {
  display: flex;
  align-items: center;
  width: 100%;
}

.calc__range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: var(--bg-3);
  outline: none;
  margin: 1rem 0;
}

.calc__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold-warm);
  cursor: pointer;
  border: 2px solid var(--bg-1);
  box-shadow: 0 0 10px var(--gold-glow);
  transition: transform 0.2s var(--ease);
}

.calc__range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Button groups */
.calc__btn-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  background: var(--bg-2);
  padding: 0.25rem;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.calc__btn-group button {
  padding: 0.65rem 0.5rem;
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
  color: var(--fg-2);
  transition: all 0.35s var(--ease);
}

.calc__btn-group button:hover {
  color: var(--fg-0);
}

.calc__btn-group button.is-active {
  background: var(--bg-3);
  color: var(--gold-warm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Results section styling */
.calc__summary-title {
  font-family: var(--ff-display);
  font-size: 1.25rem;
  color: var(--fg-0);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.calc__rates-badge {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin-top: -0.4rem;
  margin-bottom: 1.4rem;
  font-family: var(--ff-mono);
  font-size: 0.66rem;
  color: var(--fg-1);
  overflow-x: auto;
  scrollbar-width: none;
}
.calc__rates-badge::-webkit-scrollbar { display: none; }
.calc__rates-badge .fxr__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
  background: rgba(200, 166, 98, 0.09);
  border: 1px solid rgba(200, 166, 98, 0.24);
}
.calc__rates-badge .fxr__chip b {
  color: var(--gold-warm);
  font-weight: 500;
}
.calc__rates-badge .fxr__chip span {
  color: var(--fg-0);
}

.calc__results {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.calc__line-item {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.94rem;
}

.calc__line-item:last-of-type {
  border-bottom: none;
}

.calc__line-label {
  color: var(--fg-2);
}

.calc__line-val {
  color: var(--fg-0);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.calc__total {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(var(--gold-rgb), 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.calc__total-label {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fg-2);
}

.calc__total-val {
  font-family: var(--ff-display);
  font-size: clamp(1.8rem, 2.8vw, 2.2rem);
  font-weight: 700;
  color: var(--gold-warm);
  text-shadow: 0 0 20px rgba(var(--gold-warm-rgb), 0.2);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.calc__total-info {
  font-size: 0.75rem;
  color: var(--fg-3);
}

.calc__action-btn {
  margin-top: 2rem;
}

/* ============================================================
   QUIZ STYLING
   =========================================================== */
/* steps sit in normal flow (height = active step, no empty space).
   The wrapper height is FLIP-animated in JS on step change so the
   resize is smooth instead of an abrupt jump. */
.quiz-steps {
  overflow: hidden;
}

.quiz-step {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
}

.quiz-step.is-active {
  display: flex;
  animation: quizStepInFwd 0.5s var(--ease);
}

/* Direction-aware step reveal: "Далее" slides the new step in from the right,
   "Назад" from the left (set via data-dir on .quiz-steps in JS). Synced to the
   0.5s height morph so content + panel resolve together. */
.quiz-steps[data-dir="back"] .quiz-step.is-active {
  animation-name: quizStepInBack;
}

@keyframes quizStepInFwd {
  from {
    opacity: 0;
    transform: translateX(26px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes quizStepInBack {
  from {
    opacity: 0;
    transform: translateX(-26px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Inner content cascades up while the panel glides in — title, then each
   field, then the nav land in sequence instead of the whole step arriving as
   one rigid block. `backwards` holds each child hidden during its delay (no
   pre-flash) but leaves NO lingering transform once done — a persistent
   transform would make every .field its own stacking context and trap the
   custom dropdown's z-index, so it can't overlay later fields. */
.quiz-step.is-active>* {
  animation: quizChildIn 0.45s var(--ease) backwards;
}

.quiz-step.is-active>*:nth-child(1) {
  animation-delay: 0.06s;
}

.quiz-step.is-active>*:nth-child(2) {
  animation-delay: 0.12s;
}

.quiz-step.is-active>*:nth-child(3) {
  animation-delay: 0.18s;
}

.quiz-step.is-active>*:nth-child(4) {
  animation-delay: 0.24s;
}

.quiz-step.is-active>*:nth-child(5) {
  animation-delay: 0.30s;
}

.quiz-step.is-active>*:nth-child(6) {
  animation-delay: 0.36s;
}

@keyframes quizChildIn {
  from {
    opacity: 0;
    transform: translateY(9px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quiz-step__title {
  font-family: var(--ff-display);
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  color: var(--fg-0);
  margin-bottom: 2rem;
  font-weight: 500;
}

/* Progress bar */
.quiz-progress-wrap {
  width: 100%;
  height: 3px;
  background: var(--bg-2);
  border-radius: 999px;
  margin-bottom: 2rem;
  overflow: hidden;
  position: relative;
}

.quiz-progress {
  height: 100%;
  background: var(--gold-warm);
  width: 33.3%;
  transition: width 0.4s var(--ease);
  transform-origin: left center;
}

/* Quiz Option Cards */
.quiz-options {
  display: grid;
  gap: 0.85rem;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-4 .quiz-card__box {
  padding: 0.7rem 0.6rem;
  gap: 0;
}

@media (max-width: 640px) {

  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

.quiz-card {
  cursor: pointer;
  position: relative;
  display: block;
}

.quiz-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.quiz-card__box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.25rem 0.6rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 100%) rgba(30, 30, 32, 0.4);
  backdrop-filter: blur(24px) saturate(100%);
  -webkit-backdrop-filter: blur(24px) saturate(100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  transition: all 0.45s var(--ease-hover);
  text-align: center;
  color: var(--fg-1);
  box-shadow:
    var(--glass-edge),
    0 10px 25px -12px rgba(0, 0, 0, 0.65);
}

.quiz-card:hover .quiz-card__box {
  border-color: rgba(var(--gold-rgb), 0.5);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0) 100%) rgba(31, 31, 37, 0.55);
  color: var(--fg-0);
  transform: translateY(-3px);
  box-shadow:
    0 16px 36px -10px rgba(0, 0, 0, 0.7);
}

.quiz-card input:checked+.quiz-card__box {
  border-color: rgba(var(--gold-rgb), 0.7);
  background: linear-gradient(135deg, rgba(var(--gold-rgb), 0.18) 0%, rgba(var(--gold-rgb), 0.04) 100%) rgba(15, 15, 18, 0.7);
  box-shadow:
    inset 0 1.5px 2.5px rgba(255, 255, 255, 0.25),
    inset 0 -1px 2px rgba(0, 0, 0, 0.1),
    0 12px 32px -8px rgba(var(--gold-rgb), 0.35);
  color: var(--gold-warm);
}

.quiz-card__flag {
  font-size: 1.8rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-card__flag-svg {
  width: 32px;
  height: 32px;
  display: block;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.quiz-card:hover .quiz-card__flag-svg {
  transform: scale(1.1);
}

.quiz-card__label {
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.01em;
}

.quiz-nav {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.5rem;
}

.quiz-nav button,
.quiz-nav .btn {
  flex: 1;
}

/* On phones the row is too narrow for two pills side by side: "Получить расчет"
   + arrow + "Назад" exceeds the row (~267px at 360px wide), so the flex:1 halves
   shrink and .btn--gold's overflow:hidden (for the shine sweep) clips the leading
   "П". Stack them full-width instead — bulletproof at any phone width. Placed
   after the flex:1 rule above to win on source order at equal specificity. */
@media (max-width: 480px) {

  .quiz-nav {
    flex-direction: column;
  }

  .quiz-nav button,
  .quiz-nav .btn {
    flex: 0 0 auto;
    width: 100%;
  }
}

/* ============================================================
   PREMIUM DESIGN UPGRADES
   =========================================================== */

/* Ensure sections have relative positioning for glows (no overflow:hidden to let glows bleed into adjacent blocks) */
.trust,
.process,
.faq,
.calculator,
.request,
.foot {
  position: relative;
}

.trust__grid,
.process__stage,
.faq__list,
.calc__wrap,
.request__wrap {
  position: relative;
  z-index: 2;
}

/* Card Border Hover - Sophisticated Soft Accent */
.trust__card:hover,
.quiz-card__box:hover {
  border-color: rgba(var(--gold-rgb), 0.35) !important;
  box-shadow:
    0 15px 35px -10px rgba(0, 0, 0, 0.4),
    0 1px 0 rgba(255, 255, 255, 0.04) !important;
  transform: translateY(-3px) !important;
}

.calc__left:hover,
.calc__right:hover {
  border-color: rgba(var(--gold-rgb), 0.35) !important;
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

/* SOFT/MINIMALIST FIXES */
.quiz-card__flag-svg {
  filter: saturate(1.25) opacity(1);
  transition: filter 0.3s var(--ease);
}

.quiz-card:hover .quiz-card__flag-svg {
  filter: saturate(1.5) opacity(1);
}

/* Mobile quiz perf — kill per-frame backdrop re-blur on step change.
   On Далее/Назад the .quiz-step (an lg-glass panel) is translateY-animated
   while .quiz-steps reflows its height, so every frame re-samples the moving
   panel's backdrop-filter AND each nested card's blur(24px) — ~10fps on phones.
   The step/cards sit on the OPAQUE form panel (--bg-1), so the frost barely
   shows anyway: drop the blurs and give cards a flat opaque tile instead. */
@media (max-width: 960px) {
  .quiz-step.lg-glass::after {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .quiz-card__box {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 100%) #1c1c20;
  }
}

