/* fclass.by shared layer — loaded AFTER each page's inline <style>, so it only
   overrides what the whole site should share. Wave 1 of .plans/site-top-2026-10.md:
   focus, reduced motion, readable gold, lining numerals, one floating contact button. */

:root {
  --fc-navy: #0c1825;
  --fc-gold: #c9a962;
  --fc-gold-ink: #7a5e1f; /* gold for small text on light surfaces: 5.9:1 on white */
  --fc-ring: 0 0 0 1px rgba(201, 169, 98, .55);
  --fc-ease-out: cubic-bezier(.23, 1, .32, 1);
}

/* Numerals: Playfair defaults to old-style figures, "30 BYN" read as "3O". */
body { font-variant-numeric: lining-nums; }

/* Visible keyboard focus everywhere (pages only had outline:0 on inputs). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--fc-gold);
  outline-offset: 3px;
}

/* Small gold labels on light sections are unreadable (2.2:1) — darken them;
   keep the bright gold where the section is dark. */
.eyebrow,
.section-eyebrow { color: var(--fc-gold-ink); }
.hero .eyebrow, .hero-inner .eyebrow, .hero .hero-eyebrow,
.section-dark .eyebrow, .section-dark .section-eyebrow,
.tickets-teaser .section-eyebrow, .philosophy .section-eyebrow,
.cta-section .eyebrow, .cta-section .section-eyebrow { color: var(--fc-gold); }

/* White text on gold fails contrast — navy text, like the main buttons. */
.sticky-mobile-cta .smc-call { color: var(--fc-navy); }

/* One floating contact button for the whole site: navy circle, gold hairline ring. */
.tg-bubble { right: 24px; bottom: 24px; }
.tg-bubble a,
.floating-buttons .floating-btn {
  width: 56px;
  height: 56px;
  padding: 0;
  gap: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--fc-navy);
  color: #fff;
  box-shadow: var(--fc-ring), 0 10px 28px rgba(12, 24, 37, .28);
  transition: transform .18s var(--fc-ease-out), box-shadow .18s var(--fc-ease-out);
}
.tg-bubble a svg,
.floating-buttons .floating-btn svg { width: 24px; height: 24px; }
.tg-bubble a span {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translate(6px, -50%);
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--fc-navy);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--fc-ring);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s var(--fc-ease-out), transform .18s var(--fc-ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .tg-bubble a:hover,
  .floating-buttons .floating-btn:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--fc-gold), 0 14px 32px rgba(12, 24, 37, .32); }
  .tg-bubble a:hover span { opacity: 1; transform: translate(0, -50%); }
}
.tg-bubble a:active,
.floating-buttons .floating-btn:active { transform: scale(.97); transition-duration: .1s; }

/* Respect "reduce motion": stop looping/entrance animations, show revealed content. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .tg-bubble a:hover, .tg-bubble a:active,
  .floating-buttons .floating-btn:hover, .floating-buttons .floating-btn:active { transform: none; }
  .reveal, .reveal-up, .reveal-left, .reveal-right, [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Unstyled inline links inside hero copy and cards rendered as browser-blue. */
.hero p a:not([class]),
.card p a:not([class]) {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--fc-gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.hero p a:not([class]):hover,
.card p a:not([class]):hover { text-decoration-thickness: 2px; }

@media (max-width: 768px) {
  .floating-buttons { right: 16px; bottom: 16px; gap: 10px; }
  .floating-buttons .floating-btn,
  .tg-bubble a { width: 48px; height: 48px; }
  .floating-buttons .floating-btn svg,
  .tg-bubble a svg { width: 21px; height: 21px; }
}

/* Section hero photos (wave 2): subject sits on the right, headline over the dark left. */
.hero-bg img.hero-photo { opacity: 1; object-position: right center; }
/* one veil only: dark under the headline on the left, clear over the subject on the right */
.hero-bg:has(img.hero-photo)::after,
.hero-bg:has(img.hero-photo) .hero-overlay {
  background: linear-gradient(90deg, rgba(12,24,37,.94) 0%, rgba(12,24,37,.82) 30%, rgba(12,24,37,.35) 58%, rgba(12,24,37,0) 80%);
}
@media (max-width: 768px) {
  .hero-bg img.hero-photo { opacity: .75; object-position: 72% center; }
  .hero-bg:has(img.hero-photo)::after,
  .hero-bg:has(img.hero-photo) .hero-overlay {
    background: linear-gradient(180deg, rgba(12,24,37,.78) 0%, rgba(12,24,37,.7) 55%, rgba(12,24,37,.86) 100%);
  }
}

/* 3D service icons (wave 2): raster webp on transparent ground, no tile behind them. */
.service-icon-wrap.icon-3d,
.service-icon.icon-3d,
.step-icon.icon-3d { width: 88px; height: 88px; background: none; border: 0; border-radius: 0; padding: 0; }
.step-icon.icon-3d { margin: 0 auto 16px; }
.feeling-card:hover .step-icon.icon-3d { background: none; }
.icon-3d img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* navy card: the navy object needs a light plate to stay visible */
.service-card-premium .service-icon-wrap.icon-3d { background: #f8f9fa; border-radius: 50%; padding: 8px; }

/* First Class column header in comparison tables: highlighted, readable. */
.compare-table th.fc-col { background: var(--fc-gold); color: var(--fc-navy); }
/* Unstyled links inside card lists (e.g. certificates on /komandirovki/). */
.card li a:not([class]) {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--fc-gold);
  text-underline-offset: 4px;
}

/* ============================================================
   Shared layout (wave 2): header / footer / mobile bar.
   Markup lives in /partials/*.html, inserted by scripts/build_partials.py.
   fc-* classes never collide with legacy inline page CSS (.nav, .footer).
   ============================================================ */
.fc-legacy { display: none !important; }
.fc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 28px; border-radius: 6px;
  background: var(--fc-gold); color: var(--fc-navy) !important;
  font: 700 13px/1 var(--font-sans, 'DM Sans', system-ui, sans-serif);
  letter-spacing: 1.2px; text-transform: uppercase; text-decoration: none;
  transition: background-color .2s var(--fc-ease-out), transform .2s var(--fc-ease-out);
}
.fc-btn:hover { background: #d8bb7a; }
.fc-btn:active { transform: scale(.98); }

/* shared chrome renders the same on every page, whatever the page's body smoothing */
.fc-header, .fc-prefooter, .fc-footer, .fc-mobilebar { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

header.fc-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 76px; padding: 0 clamp(20px, 4vw, 60px); margin: 0;
  display: flex; align-items: center; gap: 32px;
  background: rgba(12, 24, 37, .97); color: #fff; text-align: left;
  border-bottom: 1px solid rgba(201, 169, 98, .14);
  transition: background-color .3s var(--fc-ease-out), height .3s var(--fc-ease-out);
}
header.fc-header.fc-header--overlay:not(.is-scrolled) { background: transparent; border-bottom-color: transparent; }
header.fc-header.is-scrolled { height: 66px; }
.fc-header__logo { display: flex; flex: none; }
.fc-header__logo img { height: 48px; width: auto; display: block; }
.fc-header__nav { flex: 1; display: flex; align-items: center; justify-content: flex-end; }
.fc-header__nav ul { display: flex; gap: clamp(18px, 2.2vw, 36px); list-style: none; margin: 0; padding: 0; }
.fc-header__nav ul a {
  color: rgba(255, 255, 255, .88); text-decoration: none;
  font: 500 14px/1 var(--font-sans, 'DM Sans', system-ui, sans-serif); letter-spacing: .3px;
  padding: 14px 0; display: inline-block; transition: color .2s;
}
.fc-header__nav ul a:hover, .fc-header__nav ul a[aria-current="page"] { color: var(--fc-gold); }
.fc-header__close, .fc-header__menu-cta, .fc-header__menu-phone, .fc-header__burger { display: none; }
.fc-header__cta { flex: none; min-height: 44px; padding: 0 22px; font-size: 12px; }

@media (max-width: 1100px) {
  header.fc-header { height: 66px; justify-content: space-between; }
  .fc-header__logo img { height: 42px; }
  .fc-header__cta { display: none; }
  .fc-header__burger {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 46px; height: 46px; border-radius: 10px; background: rgba(255, 255, 255, .08);
    -webkit-tap-highlight-color: transparent;
  }
  .fc-header__burger span { display: block; width: 22px; height: 2px; border-radius: 2px; background: #fff; }
  .fc-header__nav { display: none; }
  /* Full-screen overlay; header has no transform/filter so fixed maps to the viewport on iOS. */
  .fc-header__nav.is-open, .fc-header__nav:target {
    display: flex; position: fixed; inset: 0; z-index: 1100;
    flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 0;
    padding: 84px 24px 32px; background: var(--fc-navy); overflow-y: auto;
  }
  .fc-header__nav.is-open ul, .fc-header__nav:target ul { flex-direction: column; gap: 0; }
  .fc-header__nav.is-open ul a, .fc-header__nav:target ul a {
    display: block; padding: 14px 0; font-size: 20px; color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
  }
  .fc-header__nav.is-open ul a[aria-current="page"], .fc-header__nav:target ul a[aria-current="page"] { color: var(--fc-gold); }
  .fc-header__nav.is-open .fc-header__close, .fc-header__nav:target .fc-header__close {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 10px; right: 16px; width: 46px; height: 46px;
    color: #fff; font-size: 30px; text-decoration: none;
  }
  .fc-header__nav.is-open .fc-header__menu-cta, .fc-header__nav:target .fc-header__menu-cta { display: flex; margin-top: 28px; }
  .fc-header__nav.is-open .fc-header__menu-phone, .fc-header__nav:target .fc-header__menu-phone {
    display: block; margin-top: 18px; text-align: center; color: var(--fc-gold);
    font: 600 17px/1.4 var(--font-sans, 'DM Sans', system-ui, sans-serif); text-decoration: none;
  }
}
html.fc-menu-open, html.fc-menu-open body { overflow: hidden; }

.fc-prefooter { background: #f3efe6; padding: clamp(40px, 6vw, 64px) 20px; text-align: center; }
.fc-prefooter__inner { max-width: 760px; margin: 0 auto; }
.fc-prefooter__title {
  margin: 0 0 10px; color: var(--fc-navy);
  font: 600 clamp(24px, 3.2vw, 34px)/1.2 var(--font-serif, 'Playfair Display', Georgia, serif);
  font-variant-numeric: lining-nums;
}
.fc-prefooter__sub { margin: 0 0 24px; color: #3d4b5c; font-size: 16px; line-height: 1.6; }
.fc-prefooter__actions { display: flex; gap: 14px 28px; justify-content: center; align-items: center; flex-wrap: wrap; }
.fc-prefooter__phone { color: var(--fc-navy); font-weight: 700; font-size: 17px; text-decoration: none; border-bottom: 1px solid rgba(12, 24, 37, .25); }

footer.fc-footer {
  background: var(--fc-navy); color: rgba(255, 255, 255, .72); text-align: left;
  padding: 64px clamp(20px, 4vw, 60px) 28px; margin: 0;
  font: 400 14px/1.6 var(--font-sans, 'DM Sans', system-ui, sans-serif);
}
.fc-footer__grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 40px;
}
.fc-footer__brand img { height: 52px; width: auto; display: block; margin-bottom: 16px; }
.fc-footer__brand p { margin: 0; max-width: 300px; }
footer.fc-footer .fc-footer__h {
  margin: 0 0 16px; color: #fff;
  font: 600 12px/1.4 var(--font-sans, 'DM Sans', system-ui, sans-serif); letter-spacing: 2px; text-transform: uppercase;
}
.fc-footer__col ul { list-style: none; margin: 0; padding: 0; }
.fc-footer__col li { margin: 0 0 10px; }
footer.fc-footer a { color: rgba(255, 255, 255, .72); text-decoration: none; transition: color .2s; }
footer.fc-footer a:hover { color: var(--fc-gold); }
.fc-footer__certs {
  max-width: 1200px; margin: 40px auto 0; padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, .08); border-bottom: 1px solid rgba(255, 255, 255, .08);
  display: flex; gap: 12px 32px; justify-content: center; flex-wrap: wrap; font-size: 12.5px;
}
.fc-footer__legal {
  max-width: 1200px; margin: 20px auto 0; display: flex; gap: 8px 24px;
  justify-content: space-between; flex-wrap: wrap; font-size: 12.5px; color: rgba(255, 255, 255, .5);
}
@media (max-width: 1024px) { .fc-footer__grid { grid-template-columns: 1fr 1fr 1fr; } .fc-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 768px) {
  footer.fc-footer { padding: 32px 20px calc(24px + 64px + env(safe-area-inset-bottom, 0px)); }
  .fc-footer__grid { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .fc-footer__brand p { display: none; }
  .fc-footer__brand img { height: 40px; margin: 0; }
  .fc-footer__col li { margin-bottom: 4px; }
  footer.fc-footer .fc-footer__h { margin-bottom: 8px; }
  footer.fc-footer { font-size: 13.5px; line-height: 1.5; }
  .fc-footer__col--extra { display: none; }
  .fc-footer__certs { margin-top: 24px; justify-content: flex-start; flex-direction: column; gap: 8px; }
  .fc-footer__legal { flex-direction: column; }
}

.fc-mobilebar { display: none; }
@media (max-width: 768px) {
  .fc-mobilebar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 990;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(12, 24, 37, .97); border-top: 1px solid rgba(201, 169, 98, .2);
  }
  .fc-mobilebar a {
    display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 6px;
    font: 700 14px/1 var(--font-sans, 'DM Sans', system-ui, sans-serif); letter-spacing: .5px; text-decoration: none;
  }
  .fc-mobilebar__call { color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
  .fc-mobilebar__tg { background: var(--fc-gold); color: var(--fc-navy); }
  html.fc-menu-open .fc-mobilebar { display: none; }
}
