:root {
  /*
   * Single source of truth for font sizes: define values here only; feature CSS uses `var(--token)`.
   * `--ng-type-scale` is 1 for EN; fa/hy/ru set on `html` in locale-fonts.css (fa 0.75, hy 0.65, ru 0.6).
   */
  --ng-type-scale: 1;
  --brand-red: #fa0001;
  --brand-navy: #000000;
  /* Legacy token: wordmark secondary / tagline accent in lockups */
  --brand-bronze: var(--brand-red);
  --bg: #f8f9fc;
  --ink: #121326;
  --compact-scale: 0.5;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --radius: 10px;
  --section-y: clamp(36px, 5vw, 52px);
  --hero-y: clamp(48px, 7vw, 72px);
  --btn-min-h: 44px;

  /* --- Core scale (inner routes + chrome) --- */
  --text-body: 14px;
  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-xl: 16px;
  --text-2xl: 18px;
  --text-3xl: 20px;
  --text-4xl: 24px;
  --text-5xl: 28px;
  --text-heading-page: clamp(22px, 2.6vw, 28px);
  --text-heading-hero: clamp(32px, 5vw, 42px);
  --text-nav-pill: clamp(0.875rem, 1.1vw, 1rem);
  /* Site banner: vw/em ctx matches EN; locale blocks do not scale these tokens. */
  --text-header-root-vw: 1vw;
  --text-header-nav-sm: 13px;
  --text-header-nav-xs: 12px;
  --text-preloader-bracket: clamp(1.125rem, 5vw, 2.5rem);
  /* Header language links: pinned step (~0.78×16px) so fa/hy/ru `--text-locale-html-font-size` does not shrink them on mobile or desktop */
  --text-lang-link: max(11px, 12.48px);
  --text-locale-html-font-size: 100%;

  /*
   * Homepage marketing scale: `body.neogym-route-home` uses `--text-tpl-root-vw` (≈1vw); tokens below use `em` on that root.
   * Small multipliers (e.g. 2.5em) become ~2.5vw px — illegible on phones (e.g. 9px). Use clamp(rem, em, rem) for floors/ceilings.
   */
  --text-tpl-root-vw: calc(1vw * var(--ng-type-scale, 1));
  --text-tpl-heading-display: 11em;
  --text-tpl-heading-mobile: 17.2em;
  --text-tpl-marquee-heading: 11em;
  --text-tpl-marquee-heading-mobile: 17.2em;
  --text-tpl-map-headline: 4.6em;
  --text-tpl-map-headline-mobile: 18em;
  --text-tpl-map-card-title: clamp(1.875rem, 2.5em, 3rem);
  --text-tpl-map-card-title-mobile: 8em;
  /* Map meta strip + tab panel address/phone/link: plain `em` on 1vw root was ~3.75px on phones */
  --text-tpl-map-tab-mobile: clamp(0.984375rem, 2.6em, 2rem);
  /* Location card body (`.tab-content-txt .txt-classes`): floor 15.75px */
  --text-tpl-location-detail: clamp(0.984375rem, 1em, 2rem);
  --text-tpl-card-title: clamp(1.875rem, 2.5em, 3rem);
  --text-tpl-card-title-mobile: 8em;
  --text-tpl-body-em: 1em;
  --text-tpl-caption-em: clamp(0.875rem, 1.56em, 2rem);
  --text-tpl-bonus-link: clamp(0.875rem, 1.56em, 2rem);
  --text-tpl-bonus-link-mobile: 5.3em;
  --text-tpl-class-row: 4.7em;
  /* Class group label (e.g. “Exclusive studio”): `txt-classes` was 1×1vw (~3.75px); floor 11.25px */
  --text-tpl-classes-group-title: clamp(0.703125rem, 1em, 1.5rem);
  /* Class row column labels (goal / duration / membership) + values: `.caps.small` was 0.85em on 1vw */
  --text-tpl-classes-column-value: clamp(0.703125rem, 0.85em, 1.25rem);
  --text-tpl-class-name-mobile: 10em;
  --text-tpl-classes-rail-mobile: 4.2em;
  --text-tpl-classes-rail-caps-mobile: 3em;
  /* Mobile classes accordion (≤479px): image column shares width 50%; min height when `.is-open` + flex fill (`object-fit: cover`). */
  --text-tpl-classes-drop-thumb-h-mobile: min(56vw, 16rem);
  --text-tpl-micro-currency: clamp(0.625rem, 0.4em, 1rem);
  --text-tpl-micro-currency-mobile: clamp(0.625rem, 0.5em, 1rem);
  --text-tpl-price-btn: clamp(1.875rem, 2.5em, 3rem);
  --text-tpl-price-btn-mobile: 8em;
  /* Membership: `.sec-membership` uses `--text-tpl-root-vw`; `.price-wrapper` counter-scales (see `home.css`). */
  --text-tpl-price-card-title: clamp(0.875rem, 1.56em, 2rem);
  --text-tpl-price-card-title-mobile: 6em;
  --text-tpl-price-body: clamp(1.875rem, 2.5em, 3rem);
  --text-tpl-price-body-mobile: 8em;
  /* Membership tier bullet list (`.txt-classes`) — was 1em vs 2.5em title; bump for readability */
  --text-tpl-membership-copy: clamp(0.8125rem, 1.38em, 2rem);
  --text-tpl-membership-copy-mobile: 7em;
  /* CTA “50% off trial / training” — floor 30px at 16px root (was ~2.5vw ≈ 9px) */
  --text-tpl-cta-offer: clamp(1.875rem, 2.5em, 3rem);
  --text-tpl-about-circle: clamp(0.875rem, 1.56em, 2.75rem);
  --text-tpl-about-circle-mobile: 8em;
  --text-tpl-menu-label: clamp(0.75rem, 1.1vw, 1.25rem);
  --text-tpl-preloader-display: 12em;
  --text-tpl-preloader-mobile: 15em;
  --text-tpl-form-field-mobile: clamp(0.875rem, 4em, 2rem);

  /* Footer root vw: matches English; subtree does not use `--ng-type-scale` for sizes. */
  --text-footer-root-vw: 1vw;
  --text-footer-root-max: 19.2px;
  --text-footer-body-em: 1em;
  --text-footer-nav-em: 1.1em;
  --text-footer-meta-em: 0.8em;
  --text-footer-class-name-em: 4.7em;
  --text-footer-mobile-nav-em: 4em;
  --text-footer-mobile-meta-em: 2.5em;
  /* Alias: phone/email use same `--text-footer-*-meta-em` via `.txt-16`; locales must not counter-scale. */
  --text-footer-contact-em: var(--text-footer-meta-em);
  --text-footer-contact-mobile-em: var(--text-footer-mobile-meta-em);
  --text-footer-mobile-heading-em: 11em;
  --text-footer-mobile-heading-footer-em: 14.1em;
  --text-footer-credit-clamp: clamp(1.85em, 4.5vw, 2.5em);

  /* Relative multipliers (parent font-size context) */
  --text-em-full: 1em;
  --text-em-085: 0.85em;
  --text-em-040: 0.4em;

  /*
   * Circle CTA labels: match EN disk typography on fa/hy/ru — `rem` floors/ceilings follow scaled `html`;
   * middle term uses full `vw` (not `* --ng-type-scale`). See `circle-btn.css` disk diameter too.
   */
  --text-btn-circle-default: clamp(
    calc(1.1rem / var(--ng-type-scale, 1)),
    2.2vw,
    calc(2.5rem / var(--ng-type-scale, 1))
  );
  --text-btn-circle-rail-lang: clamp(
    calc(0.4rem / var(--ng-type-scale, 1)),
    1.2vw,
    calc(0.55rem / var(--ng-type-scale, 1))
  );
  --text-btn-circle-home-640: clamp(
    calc(1.25rem / var(--ng-type-scale, 1)),
    6vw,
    calc(2.5rem / var(--ng-type-scale, 1))
  );
  --text-btn-circle-home-479: clamp(
    calc(1.3rem / var(--ng-type-scale, 1)),
    5.6vw,
    calc(2.3rem / var(--ng-type-scale, 1))
  );

  /*
   * Classes zone fluid scale (homepage). Kept for `--text-home-classes-zone-scale` / tooling.
   */
  --text-home-classes-zone-scale: min(
    1.125rem,
    max(0.5625rem, calc((100vw - 3.5rem) / 97.35))
  );
}

html {
  font-size: var(--text-locale-html-font-size);
  overflow-x: hidden;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Sora", Inter, Arial, sans-serif;
  font-size: var(--text-body);
  color: var(--ink);
  background: var(--bg);
  /* Match html: some engines scroll the body for horizontal overflow; without this, wide flex rows can still show a sideways gap. */
  overflow-x: hidden;
}

/* Marketing homepage: 1vw root + 130% line-height */
body.neogym-route-home {
  font-size: var(--text-tpl-root-vw);
  line-height: 1.3;
}

/* No transform on #page-root: translateY painted content off the layout top (wrong “scroll”) and fights scroll anchoring. */
.page-root {
  max-width: 100%;
  min-width: 0;
  opacity: 0;
  transition: opacity 0.42s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: opacity;
}
.page-root.is-page-visible {
  opacity: 1;
}
.page-root.is-page-leaving {
  opacity: 0;
  transition-duration: 0.28s;
}

.container { width: min(1040px, 92%); margin: 0 auto; }
h1 { font-size: var(--text-5xl); margin: 0 0 var(--space-2); }
h2 { font-size: var(--text-3xl); margin: 0 0 var(--space-1); }
h3 { font-size: var(--text-2xl); margin: 0 0 var(--space-1); }
p { margin: 0 0 var(--space-2); line-height: 1.5; }
a { color: inherit; }

.ng-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.contact-flash {
  margin: 0 0 var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  font-weight: 600;
}
.contact-flash--ok {
  background: #e8f5e9;
  color: #1b5e20;
}
.contact-flash--err {
  background: #ffebee;
  color: #b71c1c;
}

/* Inline validation (forms use `novalidate` + site-chrome.js; avoids unstoppable native bubbles). */
.ng-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: stretch;
}
.ng-field-error {
  margin: 0;
  padding: 0;
  font-family: Sora, Inter, Arial, sans-serif;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.35;
  color: var(--brand-red);
}
.ng-field-error[hidden] {
  display: none !important;
}

/* Latin phone numbers in RTL pages (e.g. fa): Unicode bidi otherwise shows +374 last. */
.ng-bidi-ltr {
  direction: ltr;
  unicode-bidi: isolate;
}
