/* ==========================================================================
   CyberX site theme — every page in the /cyberracing design.
   cx-shell.css (generated from racing.css) brings fonts, tokens, header, drawer,
   buttons, footer and booking dialog. This file maps the older page styles
   (redesign / brand / subpages / home / promo) onto those tokens.
   ========================================================================== */

/* ── Token bridge: old variables → racing tokens ───────────────────────── */
body.cx-theme {
  --bg: var(--void);
  --ink: var(--light);
  --muted: var(--text-muted);
  --accent: var(--crimson);
  --paper: var(--void);
  --paper-ink: var(--light);
  --paper-muted: var(--text-body);
  --brand-gradient: linear-gradient(135deg, #f32d43 0%, #c8172c 100%);
  --brand-orange: linear-gradient(135deg, #f32d43 0%, #c8172c 100%);
  --corner: none;
  --mono: var(--body);
  --radius: 16px;
  --radius-sm: 12px;
  --card: linear-gradient(160deg, rgba(19, 23, 38, 0.92) 0%, rgba(11, 13, 22, 0.92) 100%);
  --card-line: rgba(242, 244, 248, 0.1);
  --header: 82px;
  background: var(--void);
  color: var(--text-body);
}

body.cx-theme ::selection { background: var(--crimson); color: #fff; }
body.cx-theme:not(.page-certificate) { font-size: 17px; line-height: 1.6; }

/* Ambient club light behind every page, the same crimson/cobalt glow as the racing stage. */
body.cx-theme::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 8% 0%, rgba(232, 37, 58, 0.1), transparent 70%),
    radial-gradient(55vw 45vh at 100% 30%, rgba(46, 107, 255, 0.08), transparent 70%);
}

body.cx-theme:not(.page-certificate) main#main { padding-top: 0; }

/* ── Typography ────────────────────────────────────────────────────────── */
body.cx-theme:not(.page-certificate) h1,
body.cx-theme:not(.page-certificate) h2,
body.cx-theme:not(.page-certificate) h3,
body.cx-theme:not(.page-certificate) h4 {
  font-family: var(--display);
  color: var(--light);
  letter-spacing: 0.015em;
  word-spacing: 0.06em;
}

body.cx-theme:not(.page-certificate) h2,
body.cx-theme:not(.page-certificate) .home-seo-heading,
body.cx-theme:not(.page-certificate) .pg-h2 {
  font: 700 clamp(26px, 3.1vw, 46px)/1.1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.015em;
}

body.cx-theme:not(.page-certificate) h3 { font-weight: 600; letter-spacing: 0.01em; }

body.cx-theme:not(.page-certificate) p,
body.cx-theme:not(.page-certificate) li,
body.cx-theme:not(.page-certificate) dd,
body.cx-theme:not(.page-certificate) blockquote { font-family: var(--body); }

body.cx-theme .eyebrow,
body.cx-theme .pg-eyebrow,
body.cx-theme .zone-ordinal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 600 12px/1.3 var(--body);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--crimson-hi);
}

body.cx-theme .eyebrow::before,
body.cx-theme .pg-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--crimson), var(--cobalt));
  box-shadow: 0 0 12px rgba(232, 37, 58, 0.6);
}

body.cx-theme .muted,
body.cx-theme .home-section-lead,
body.cx-theme .pg-lead { color: var(--text-muted); }

/* Section titles get the racing underline bar: crimson → cobalt light strip. */
body.cx-theme .section-heading h2::after,
body.cx-theme .home-seo-heading::after,
body.cx-theme .pg-h2::after {
  content: "";
  display: block;
  width: clamp(72px, 9vw, 140px);
  height: 3px;
  margin-top: clamp(12px, 1.2vw, 18px);
  border-radius: 999px;
  background: linear-gradient(90deg, #ff3a50 0%, #e8253a 42%, #2e6bff 84%, transparent 100%);
  box-shadow: 0 0 20px rgba(232, 37, 58, 0.6), 0 0 36px rgba(46, 107, 255, 0.28);
}

body.cx-theme .full-zones .section-heading h2::after { margin-inline: auto; }

/* ── Links & buttons ───────────────────────────────────────────────────── */
body.cx-theme:not(.page-certificate) a { color: inherit; }
body.cx-theme .text-link,
body.cx-theme .pg-link,
body.cx-theme .pg-inline { color: var(--light); text-decoration-color: rgba(46, 107, 255, 0.6); transition: color 0.25s ease; }
body.cx-theme .text-link:hover,
body.cx-theme .pg-link:hover,
body.cx-theme .pg-inline:hover { color: var(--cobalt-hi); }

body.cx-theme .button,
body.cx-theme .pg-pill,
body.cx-theme .glass-pill,
body.cx-theme .hero .button,
body.cx-theme .booking-dialog .button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  clip-path: none;
  border: 1px solid rgba(255, 118, 134, 0.45);
  background: linear-gradient(135deg, #f32d43 0%, #c8172c 100%);
  color: #fff;
  font: 600 13px/1.2 var(--body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 12px 28px rgba(232, 37, 58, 0.3);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s ease, filter 0.25s ease;
}

body.cx-theme .button:hover,
body.cx-theme .pg-pill:hover,
body.cx-theme .glass-pill:hover,
body.cx-theme .hero .button:hover {
  background: linear-gradient(135deg, #ff3a50 0%, #d01a30 100%);
  transform: translateY(-2px);
  filter: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.36), 0 16px 36px rgba(232, 37, 58, 0.44);
}

body.cx-theme .brand-button-outline,
body.cx-theme .hero .brand-button-outline,
body.cx-theme .button.secondary,
body.cx-theme .zone-jump a,
body.cx-theme .hero-bottom a {
  clip-path: none;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(242, 244, 248, 0.2);
  background: rgba(16, 20, 34, 0.72);
  backdrop-filter: blur(12px);
  color: var(--light);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.cx-theme .brand-button-outline:hover,
body.cx-theme .hero .brand-button-outline:hover,
body.cx-theme .zone-jump a:hover,
body.cx-theme .hero-bottom a:hover {
  border-color: rgba(46, 107, 255, 0.65);
  background: rgba(46, 107, 255, 0.16);
  color: var(--light);
  box-shadow: 0 12px 28px rgba(46, 107, 255, 0.2);
}

/* ── Surfaces: cards, panels, tables ───────────────────────────────────── */
body.cx-theme .full-zones,
body.cx-theme .prices-section,
body.cx-theme .faq-section,
body.cx-theme .hardware,
body.cx-theme .contact-section,
body.cx-theme .guest-reviews,
body.cx-theme .full-promotions {
  background: transparent;
  box-shadow: none;
  --ink: var(--light);
  --muted: var(--text-muted);
  --line: var(--line-strong);
}

body.cx-theme .hardware > div,
body.cx-theme .club-zone,
body.cx-theme .guest-review,
body.cx-theme .promo-card,
body.cx-theme .faq-list details,
body.cx-theme .price-panel,
body.cx-theme .price-card,
body.cx-theme .contact-card,
body.cx-theme .pg-level,
body.cx-theme .pg-steps-list > li,
body.cx-theme .pg-faq-list details,
body.cx-theme .pg-gift-card,
body.cx-theme .server-price-snapshot {
  clip-path: none;
  border-radius: var(--radius);
  border: 1px solid var(--card-line);
  background: var(--card);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 50px rgba(0, 0, 0, 0.28);
}

body.cx-theme .club-zone { overflow: hidden; }

body.cx-theme .server-price-table,
body.cx-theme .compact-rate-table { border-color: var(--line); }
body.cx-theme .server-price-table th,
body.cx-theme .server-price-table td,
body.cx-theme .compact-rate-table th,
body.cx-theme .compact-rate-table td { border-color: var(--line); }

body.cx-theme:not(.page-certificate) details summary { font-family: var(--display); font-weight: 600; letter-spacing: 0.01em; }

/* ── Homepage ──────────────────────────────────────────────────────────── */
/* Hero title: no red frame, corner square or plus; the racing light bar instead. */
body.cx-theme .hero-copy h1 {
  border: 0;
  padding: 0;
  margin-bottom: clamp(24px, 3vw, 38px);
  font: 700 clamp(28px, 3.4vw, 52px)/1.08 var(--display);
  text-transform: uppercase;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
}
body.cx-theme .hero-copy h1::before { display: none; }
body.cx-theme .hero-copy h1::after {
  content: "";
  position: static;
  display: block;
  width: clamp(84px, 10vw, 150px);
  height: 3px;
  margin-top: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff3a50 0%, #e8253a 42%, #2e6bff 84%, transparent 100%);
  box-shadow: 0 0 20px rgba(232, 37, 58, 0.68), 0 0 36px rgba(46, 107, 255, 0.3);
}
body.cx-theme .hero-brand-tagline { font-weight: 600; text-transform: uppercase; letter-spacing: 0.01em; }
body.cx-theme .hero .eyebrow { color: var(--text-cap); }
body.cx-theme .hero-backdrop {
  background:
    linear-gradient(90deg, rgba(7, 8, 13, 0.94) 0%, rgba(7, 8, 13, 0.62) 46%, rgba(7, 8, 13, 0.08) 80%),
    linear-gradient(0deg, var(--void) 0%, rgba(7, 8, 13, 0) 38%);
}
body.cx-theme .hero::before,
body.cx-theme .hero::after { display: none; }
body.cx-theme .hero-app-note a { border-radius: var(--radius-sm); border-color: var(--line-strong); background: rgba(16, 20, 34, 0.6); }

/* Secondary actions (“Забронировать онлайн ↗”, “Цены на …”) become racing glass buttons. */
body.cx-theme.page-home main .text-link {
  min-height: 44px;
  padding: 7px 8px 7px 16px;
  border: 1px solid rgba(242, 244, 248, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(16, 20, 34, 0.72);
  backdrop-filter: blur(10px);
  color: var(--light);
  font: 600 12px/1.3 var(--body);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
body.cx-theme.page-home main .text-link:hover {
  border-color: rgba(46, 107, 255, 0.65);
  background: rgba(46, 107, 255, 0.16);
  box-shadow: 0 12px 28px rgba(46, 107, 255, 0.2);
}
body.cx-theme.page-home main .text-link span[aria-hidden] {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(242, 244, 248, 0.08);
  color: var(--cobalt-hi);
}
body.cx-theme.page-home .club-zone-actions .text-link:first-child {
  border-color: rgba(255, 118, 134, 0.45);
  background: linear-gradient(135deg, #f32d43 0%, #c8172c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 10px 24px rgba(232, 37, 58, 0.28);
}
body.cx-theme.page-home .club-zone-actions .text-link:first-child span[aria-hidden] { background: rgba(255, 255, 255, 0.16); color: #fff; }
body.cx-theme.page-home .club-zone-actions { border-color: var(--line); }

body.cx-theme .club-zone h3 { font: 700 clamp(22px, 2.2vw, 32px)/1.1 var(--display); text-transform: uppercase; }
body.cx-theme .zone-caption { color: var(--text-muted); }
body.cx-theme .club-zone-specs > div { border-color: var(--line); }
body.cx-theme .club-zone-specs dt { font-family: var(--display); font-weight: 600; color: var(--light); }
body.cx-theme .club-zone-specs dd { color: var(--text-muted); }
body.cx-theme .club-gallery-controls { background: rgba(7, 8, 13, 0.78); backdrop-filter: blur(8px); }
body.cx-theme .club-gallery-controls button { border-radius: 8px; background: rgba(242, 244, 248, 0.1); border: 1px solid var(--line-strong); }
body.cx-theme .club-gallery-zoom { clip-path: none; border-radius: 8px; border-color: var(--line-strong); background: rgba(7, 8, 13, 0.7); }
body.cx-theme .club-gallery-thumbs { background: rgba(7, 8, 13, 0.6); }
body.cx-theme .club-gallery-thumbs button { border-radius: 6px; overflow: hidden; }
body.cx-theme.page-home .club-gallery-thumbs button[aria-pressed=true] { border-color: var(--crimson); box-shadow: 0 0 0 1px var(--crimson), 0 0 16px rgba(232, 37, 58, 0.5); }

/* Race banner CTA: the racing primary button, not the orange slanted bar. */
body.cx-theme.page-home .race-cta {
  align-items: center;
  min-height: 56px;
  padding: 0 8px 0 0;
  border: 1px solid rgba(255, 118, 134, 0.45);
  border-radius: var(--radius-sm);
  clip-path: none;
  background: linear-gradient(135deg, #f32d43 0%, #c8172c 100%);
  color: #fff;
  font: 600 14px/1 var(--body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 14px 32px rgba(232, 37, 58, 0.38);
}
body.cx-theme.page-home .race-cta > span:first-child { border-left: 0; padding: 0 22px; }
body.cx-theme.page-home .race-cta-arrow { width: 38px; height: 38px; margin: 0; border-radius: 9px; background: rgba(255, 255, 255, 0.16); font: 500 18px/1 var(--body); }
body.cx-theme.page-home .race-cta:hover { color: #fff; filter: none; transform: translateY(-2px); }
body.cx-theme .race-banner { border-top: 1px solid var(--line); }

/* Prices */
body.cx-theme .prices-shell { clip-path: none; border-radius: 20px; border: 1px solid var(--card-line); background: var(--card); }
body.cx-theme.page-home .price-zone-tab,
body.cx-theme .price-zone-tab {
  clip-path: none;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(242, 244, 248, 0.04);
  color: var(--text-body);
  font: 600 13px/1.2 var(--body);
  letter-spacing: 0.04em;
}
body.cx-theme.page-home .price-zone-tab:hover { background: rgba(46, 107, 255, 0.14); border-color: rgba(46, 107, 255, 0.55); color: #fff; }
body.cx-theme.page-home .price-zone-tab[aria-selected=true],
body.cx-theme.page-home .compact-price-switch button[aria-pressed=true] {
  border-color: rgba(255, 118, 134, 0.45);
  background: linear-gradient(135deg, #f32d43 0%, #c8172c 100%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(232, 37, 58, 0.3);
}
body.cx-theme .compact-price-switch { border-radius: 12px; overflow: hidden; border-color: var(--line-strong); }
body.cx-theme .compact-rate-table td { font-family: var(--display); font-weight: 600; color: var(--light); }
body.cx-theme .price-status { clip-path: none; border-radius: 999px; border-color: var(--line-strong); background: rgba(242, 244, 248, 0.05); }

/* Promotions & gift strip */
body.cx-theme .gift-strip {
  clip-path: none;
  border-radius: 20px;
  border: 1px solid rgba(255, 118, 134, 0.35);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(232, 37, 58, 0.28) 0%, transparent 55%),
    radial-gradient(90% 120% at 100% 100%, rgba(46, 107, 255, 0.22) 0%, transparent 60%),
    var(--card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
body.cx-theme .gift-strip-mark {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #f32d43 0%, #2e6bff 100%);
  color: #fff;
  box-shadow: 0 14px 40px rgba(232, 37, 58, 0.35);
}
body.cx-theme .gift-strip .eyebrow { color: var(--crimson-hi); }
body.cx-theme .gift-strip-arrow { color: var(--cobalt-hi); }
body.cx-theme .promo-art { border-radius: 12px; }
body.cx-theme .review-score { border-radius: var(--radius-sm); border-color: var(--line-strong); background: rgba(16, 20, 34, 0.72); }
body.cx-theme .guest-review dl { border-color: var(--line); }
body.cx-theme .contact-map iframe { border-radius: var(--radius); }

/* ── /akcii: glass hero and promo sections on racing tokens ────────────── */
body.cx-theme.page-promo {
  --g-bg: var(--void);
  --g-font: var(--body);
  --g-green: var(--crimson-hi);
  --g-lav: var(--cobalt-hi);
  --g-red: var(--crimson-hi);
}
/* The header is fixed now: the glass stage starts below it. */
body.cx-theme.page-promo .glass-hero { padding-top: max(62px, calc(82 * var(--u))); }
body.cx-theme.page-promo .glass-stage { height: calc(100svh - max(62px, calc(82 * var(--u)))); }
body.cx-theme.page-promo .glass-hero {
  background:
    radial-gradient(60% 55% at 18% 20%, rgba(232, 37, 58, 0.16), transparent 70%),
    radial-gradient(50% 50% at 90% 80%, rgba(46, 107, 255, 0.14), transparent 70%),
    var(--void);
}
body.cx-theme.page-promo .glass-title {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: min(5.6vw, 11svh);
  text-transform: none;
}
body.cx-theme.page-promo .glass-stats strong { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }
body.cx-theme.page-promo .glass-eyebrow { font-family: var(--body); }
body.cx-theme.page-promo .pg-num { font-family: var(--display); color: var(--crimson-hi); }
body.cx-theme.page-promo .pg-steps-list h3,
body.cx-theme.page-promo .pg-level h3 { font-family: var(--display); font-weight: 600; text-transform: uppercase; font-size: clamp(16px, 1.4vw, 20px); }
body.cx-theme.page-promo .pg-level-rate strong { font-family: var(--display); color: var(--light); }
body.cx-theme.page-promo .pg-level { padding: 20px; }
body.cx-theme.page-promo .pg-gift-card strong { font-family: var(--display); font-weight: 600; }
body.cx-theme.page-promo .pg-notice .pg-wrap > p { border-left: 3px solid var(--crimson); padding-left: 18px; }
body.cx-theme.page-promo .pg-photo img { border-radius: var(--radius); }

/* Wide display type needs smaller steps on phones. */
@media (max-width: 640px) {
  :root body.cx-theme main h2,
  :root body.cx-theme main .home-seo-heading { font-size: clamp(21px, 6.3vw, 30px); line-height: 1.12; overflow-wrap: break-word; }
  :root body.cx-theme .club-zone h3 { font-size: clamp(19px, 5.9vw, 26px); }
  :root body.cx-theme .hero-copy h1 { font-size: clamp(24px, 7vw, 32px); }
  :root body.cx-theme .hero-brand-tagline { font-size: clamp(20px, 5.8vw, 28px); }
  :root body.cx-theme .race-content h2 { font-size: clamp(30px, 10vw, 44px); }
  :root body.cx-theme.page-promo .glass-hero { padding-top: 52px; }
  :root body.cx-theme.page-promo .glass-stage { height: auto; }
  :root body.cx-theme.page-promo .glass-title { font-size: min(10.4vw, 46px); }
}

/* ── Footer extras the racing footer does not style ────────────────────── */
body.cx-theme .site-footer .brand { width: 200px; }
body.cx-theme .site-footer .footer-links a { font: 500 14px/1.4 var(--body); letter-spacing: 0.02em; }
body.cx-theme .site-footer .footer-bottom { border-color: var(--line); color: var(--text-muted); font-size: 13px; }

/* ── Legal pages & 404 ─────────────────────────────────────────────────── */
body.cx-theme .legal-document { padding-top: calc(var(--header) + 48px); padding-bottom: 96px; max-width: 920px; }
body.cx-theme .legal-document h1 { font: 700 clamp(28px, 4vw, 52px)/1.08 var(--display); text-transform: uppercase; margin: 18px 0 32px; }
body.cx-theme .legal-body { color: var(--text-body); }
body.cx-theme .legal-body h2,
body.cx-theme .legal-body h3 { font-size: clamp(18px, 1.8vw, 24px); text-transform: none; margin-top: 2em; }
body.cx-theme .legal-body h2::after { display: none; }

body.cx-theme .error-page { min-height: 78vh; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding-top: var(--header); text-align: center; }
body.cx-theme .error-page > div { min-width: 0; max-width: 100%; }
body.cx-theme .error-page p,
body.cx-theme .error-page .text-link { white-space: normal; overflow-wrap: break-word; }
@media (max-width: 640px) {
  :root body.cx-theme .legal-document h1 { font-size: clamp(19px, 5.4vw, 28px); line-height: 1.15; }
  :root body.cx-theme .legal-document { padding-top: 88px; }
}
body.cx-theme .error-page h1 {
  font: 700 clamp(96px, 18vw, 220px)/0.9 var(--display);
  background: linear-gradient(108deg, #c9d6ee 0%, #ffffff 40%, #ff8b98 60%, #2e6bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 40px rgba(232, 37, 58, 0.3));
}
body.cx-theme .error-page h2 { font-size: clamp(22px, 3vw, 36px); }
body.cx-theme .error-page h2::after { margin-inline: auto; }

/* ── /certificate (React gift builder): racing fonts through its own variables ── */
body.cx-theme.page-certificate {
  --font-tactic: "Unbounded";
  --font-inter: "Onest";
  --font-chakra: "Onest";
  font-family: var(--body);
}
/* Keyboard skip link: hidden until focused (the certificate page does not load redesign.css). */
body.cx-theme .skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--crimson);
  color: #fff;
  font: 600 13px/1 var(--body);
  transform: translateY(-180%);
  transition: transform 0.2s ease;
}
body.cx-theme .skip-link:focus { transform: none; }
/* The gift builder hides the header while its sticky preview fills a phone screen. */
body.cx-theme .site-header.ef-nav[hidden] { display: none; }
