/* ═══════════════════════════════════════════════════════════
   DESIGN SYSTEM — HASLAS CRIMINAL GOLD
   Style: Dark OLED + Exaggerated Minimalism + Heavy Gold
   Fonts: Bebas Neue (display) · Cinzel (accent) · Montserrat (body)
   Palette: #000 base · #D4AF37 gold · #FFD700 gold-light
═══════════════════════════════════════════════════════════ */

/* === DESIGN TOKENS === */
:root {
  /* Gold */
  --gold:          #D4AF37;
  --gold-light:    #FFD700;
  --gold-bright:   #FFDD00;
  --gold-dark:     #8B6914;
  --gold-mid:      #B8900A;
  --glow-sm:       rgba(212, 175, 55, 0.35);
  --glow-md:       rgba(212, 175, 55, 0.60);
  --glow-lg:       rgba(212, 175, 55, 0.88);

  /* Blacks */
  --bg:            #000000;
  --bg-900:        #080808;
  --bg-800:        #111111;
  --bg-700:        #1A1A1A;
  --card-bg:       rgba(6, 6, 6, 0.94);

  /* Text */
  --text:          #FFFFFF;
  --text-muted:    #AAAAAA;
  --text-dim:      #666666;

  /* Layout */
  --nav-h:         78px;
  --max-w:         1100px;
  --radius:        8px;

  /* Transitions */
  --t1:  0.20s ease;
  --t2:  0.35s ease;
  --t3:  0.50s ease;

  /* Z-index scale */
  --z-bg:      0;
  --z-overlay: 1;
  --z-content: 10;
  --z-nav:     50;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}
body  {
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img   { display: block; max-width: 100%; }
a     { text-decoration: none; color: inherit; }
ul    { list-style: none; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   PAGE BACKGROUND (shared — index + work)
═══════════════════════════════════════════════════════════ */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: var(--z-bg);
  background: url('background.jpg') center / cover no-repeat;
  background-attachment: fixed;
}

/* iOS Safari — fixed attachment causes blank on scroll */
@supports (-webkit-touch-callout: none) {
  .page-bg { background-attachment: scroll; }
}

.page-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: linear-gradient(
    160deg,
    rgba(0,0,0,0.80) 0%,
    rgba(0,0,0,0.60) 45%,
    rgba(0,0,0,0.82) 100%
  );
}

/* ═══════════════════════════════════════════════════════════
   NAVBAR
═══════════════════════════════════════════════════════════ */
.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-nav);
  height: var(--nav-h);
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.20);
  transition: background var(--t2), border-color var(--t2);
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.97);
  border-bottom-color: rgba(212, 175, 55, 0.40);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Logo brand ─────────────────────────────────────────── */
.logo-link { display: flex; align-items: center; }

.logo-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform var(--t2);
}

.logo-link:hover .logo-brand,
.logo-link:focus-visible .logo-brand {
  transform: scale(1.04);
  outline: none;
}

/* Crown SVG icon */
.logo-crown {
  flex-shrink: 0;
  width: 48px;
  height: auto;
  animation: crownPulse 3s ease-in-out infinite;
  transition: transform var(--t2);
}

.logo-link:hover .logo-crown,
.logo-link:focus-visible .logo-crown {
  transform: translateY(-2px) scale(1.1);
}

@keyframes crownPulse {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(212,175,55,0.5))
                     drop-shadow(0 0 1px rgba(255,215,0,0.3)); }
  50%       { filter: drop-shadow(0 0 10px rgba(212,175,55,0.95))
                     drop-shadow(0 0 20px rgba(212,175,55,0.40)); }
}

/* Text stack */
.logo-text-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  gap: 4px;
}

.logo-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.15rem;
  letter-spacing: 0.06em;
  line-height: 1;
  background: linear-gradient(
    180deg,
    #FFFFFF  0%,
    #FFE55C 10%,
    #FFD700 25%,
    #D4AF37 44%,
    #FFE44D 56%,
    #B8860B 73%,
    #FFD700 87%,
    #8B6914 100%
  );
  background-size: 100% 300%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldDrip 3.5s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.40));
}

.logo-tagline {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  animation: taglineFade 4s ease-in-out infinite;
}

@keyframes taglineFade {
  0%, 100% { opacity: 0.75; }
  50%       { opacity: 1.00; }
}

/* Nav links list */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  transition: color var(--t2), border-color var(--t2), background var(--t2), text-shadow var(--t2);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--gold-light);
  border-color: rgba(212, 175, 55, 0.35);
  background: rgba(212, 175, 55, 0.05);
  text-shadow: 0 0 14px var(--glow-sm);
  outline: none;
}

/* "Работа" highlighted */
.nav-link--work {
  color: var(--gold-dark);
  border-color: rgba(212, 175, 55, 0.28);
}
.nav-link--work:hover,
.nav-link--work:focus-visible {
  color: var(--gold-light);
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.10);
}

/* "Веди себя как смертный" blinking/glowing link */
.nav-link--mortal {
  color: var(--gold-light);
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.05);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.15);
  animation: mortalPulse 2.2s infinite ease-in-out;
}
.nav-link--mortal:hover,
.nav-link--mortal:focus-visible {
  border-color: var(--gold-light);
  background: rgba(212, 175, 55, 0.15);
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.5);
  text-shadow: 0 0 10px var(--gold-light);
  animation-play-state: paused;
}

@keyframes mortalPulse {
  0%, 100% {
    border-color: rgba(212, 175, 55, 0.35);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.12);
    text-shadow: 0 0 2px rgba(212, 175, 55, 0.25);
  }
  50% {
    border-color: var(--gold-light);
    box-shadow: 0 0 18px rgba(212, 175, 55, 0.6);
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.85);
  }
}

/* ═══════════════════════════════════════════════════════════
   HAMBURGER
═══════════════════════════════════════════════════════════ */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: 5px;
  cursor: pointer;
  transition: border-color var(--t2);
}
.hamburger:hover { border-color: var(--gold); }

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: transform var(--t2), opacity var(--t2);
}

.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px)  rotate(45deg);  }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  z-index: var(--z-content);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--nav-h) 24px 60px;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 680px;
}

/* ═══════════════════════════════════════════════════════════
   CHARACTER CROSSFADE
   Structure:  .char-wrap (entrance anim + interaction)
               └── .char-float (float anim)
                   ├── .char-img--default (z-index 2, opacity 1)
                   └── .char-img--alt    (z-index 3, opacity 0, abs)
═══════════════════════════════════════════════════════════ */
.char-wrap {
  position: relative;
  width: clamp(220px, 60vw, 370px); /* Limit to native resolution to prevent blurry upscaling */
  margin-bottom: 22px;
  cursor: pointer;
}

.char-float {
  position: relative;
  animation: charFloat 6s ease-in-out 0.9s infinite;
  will-change: transform;
  transform: translate3d(0, 0, 0); /* Forces GPU rendering to eliminate pixel jittering during float */
}

.char-img {
  user-select: none;
  -webkit-user-drag: none;
  transition: opacity 0.40s ease;
  will-change: opacity;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden; /* Stops image edges from shivering/shimmering during crossfade transition */
  transform: translateZ(0); /* Extra GPU promotion to keep the image edges sharp and stable */
}

.char-img--default {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
  opacity: 1;
}

.char-img--alt {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 3;
  opacity: 0;
}

/* Desktop — CSS hover crossfade */
@media (hover: hover) {
  .char-wrap:hover .char-img--default { opacity: 0; }
  .char-wrap:hover .char-img--alt     { opacity: 1; }
}

/* Mobile — JS adds .tapped class */
.char-wrap.tapped .char-img--default { opacity: 0; }
.char-wrap.tapped .char-img--alt     { opacity: 1; }

@keyframes charFloat {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(-14px); }
}

/* ═══════════════════════════════════════════════════════════
   HERO TYPOGRAPHY
═══════════════════════════════════════════════════════════ */
.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(5rem, 14vw, 11rem);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

/* ── GOLD DRIP EFFECT ────────────────────────────────────── */
.gold-drip {
  background: linear-gradient(
    180deg,
    #FFFFFF  0%,
    #FFE55C 10%,
    #FFD700 25%,
    #D4AF37 44%,
    #FFE44D 56%,
    #B8860B 73%,
    #FFD700 87%,
    #8B6914 100%
  );
  background-size: 100% 300%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldDrip 4s ease-in-out infinite;
  filter: drop-shadow(0 0 22px rgba(212, 175, 55, 0.45));
}

@keyframes goldDrip {
  0%   { background-position: 0% 0%;   }
  50%  { background-position: 0% 100%; }
  100% { background-position: 0% 0%;   }
}

.hero-sub {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.90rem, 2.4vw, 1.15rem);
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #FFFFFF;
  margin-bottom: 42px;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 255, 255, 0.15);
}

/* ═══════════════════════════════════════════════════════════
   GOLD BUTTONS
═══════════════════════════════════════════════════════════ */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 28px;
  min-height: 56px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gold-light);
  background: rgba(0, 0, 0, 0.82);
  border: 2.5px solid var(--gold);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  animation: btnGlow 2.5s ease-in-out infinite;
  transition:
    transform    var(--t2),
    background   var(--t2),
    color        var(--t2),
    box-shadow   var(--t2),
    border-color var(--t2);
}

/* Shimmer sweep on hover */
.btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 25%,
    rgba(255, 215, 0, 0.14) 50%,
    transparent 75%
  );
  transform: translateX(-100%);
  transition: transform 0.55s ease;
}
.btn-gold:hover::after,
.btn-gold:focus-visible::after { transform: translateX(100%); }

.btn-gold:hover,
.btn-gold:focus-visible {
  transform: scale(1.06) translateY(-3px);
  background: rgba(212, 175, 55, 0.10);
  color: var(--gold-bright);
  border-color: var(--gold-light);
  box-shadow:
    0 0 18px var(--glow-md),
    0 0 36px var(--glow-sm),
    0 12px 32px rgba(0, 0, 0, 0.65);
  outline: none;
  animation-play-state: paused;
}

.btn-gold:active { transform: scale(0.97); }

/* Staggered pulse for hero row */
.btn-row .btn-gold:nth-child(1) { animation-delay: 0.0s; }
.btn-row .btn-gold:nth-child(2) { animation-delay: 0.5s; }
.btn-row .btn-gold:nth-child(3) { animation-delay: 1.0s; }

@keyframes btnGlow {
  0%, 100% {
    box-shadow: 0 0 8px rgba(212,175,55,0.25), 0 0 16px rgba(212,175,55,0.10);
  }
  50% {
    box-shadow: 0 0 18px rgba(212,175,55,0.55), 0 0 36px rgba(212,175,55,0.25), 0 0 54px rgba(212,175,55,0.12);
  }
}

/* ═══════════════════════════════════════════════════════════
   ENTRANCE ANIMATIONS
═══════════════════════════════════════════════════════════ */
.animate-up {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.animate-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   WORK PAGE
═══════════════════════════════════════════════════════════ */
.work-section {
  position: relative;
  z-index: var(--z-content);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 52px) 24px 80px;
}

.work-card {
  background: var(--card-bg);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 14px;
  padding: 52px 44px;
  max-width: 820px;
  width: 100%;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 0 60px rgba(212, 175, 55, 0.06),
    inset 0 1px 0 rgba(212, 175, 55, 0.12),
    0 28px 80px rgba(0, 0, 0, 0.92);
}

.work-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.8rem, 8vw, 5rem);
  line-height: 0.92;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.work-tagline {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.20);
  text-shadow: 0 0 20px var(--glow-sm);
}

.job-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.job-card {
  background: rgba(16, 16, 16, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 24px 26px;
  cursor: default;
  transition: border-color var(--t2), box-shadow var(--t2), background var(--t2);
}

.job-card:hover {
  border-color: rgba(212, 175, 55, 0.38);
  border-left-color: var(--gold-light);
  background: rgba(22, 22, 22, 0.95);
  box-shadow: 0 0 24px rgba(212, 175, 55, 0.07);
}

.job-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--gold);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.job-title {
  font-family: 'Cinzel', serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 10px;
}

.job-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.70;
  margin-bottom: 14px;
}

.job-reqs {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.job-reqs li {
  font-size: 13px;
  color: #777777;
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}

.job-reqs li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--gold-dark);
}

.work-cta {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid rgba(212, 175, 55, 0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.work-cta p {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hamburger { display: flex; }

  .navbar-inner {
    padding: 0 16px;
  }
  .logo-brand {
    gap: 8px;
  }
  .logo-crown {
    width: 40px;
  }
  .logo-name {
    font-size: 1.85rem;
  }
  .logo-tagline {
    font-size: 0.55rem;
    letter-spacing: 0.14em;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.97);
    border-bottom: 1px solid rgba(212, 175, 55, 0.22);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 0 16px;
    gap: 0;
  }

  .nav-links.open { display: flex; }

  .nav-link {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(212, 175, 55, 0.08);
    padding: 15px 24px;
    font-size: 13px;
    justify-content: flex-start;
    letter-spacing: 0.10em;
  }

  .nav-links li:last-child .nav-link { border-bottom: none; }

  .btn-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-gold {
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
  }

  .work-card { padding: 32px 20px; }
}

@media (max-width: 480px) {
  .char-wrap { width: clamp(180px, 82vw, 310px); }
  .hero { padding-top: calc(var(--nav-h) + 16px); }
  .work-section { padding-top: calc(var(--nav-h) + 32px); }
}

/* ═══════════════════════════════════════════════════════════
   WORK PAGE v2 — JOB CONTENT
═══════════════════════════════════════════════════════════ */
.cities-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 32px;
}

.city-tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.30);
  padding: 6px 14px;
  border-radius: 20px;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.work-box {
  background: rgba(14, 14, 14, 0.86);
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 22px 20px;
}

.work-box-title {
  font-family: 'Cinzel', serif;
  font-size: 0.80rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.pos-list,
.req-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pos-item {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding-left: 18px;
  position: relative;
  line-height: 1.4;
}

.pos-item::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--gold);
}

.pos-note {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 3px;
  font-style: italic;
}

.pos-individ {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(212, 175, 55, 0.18);
  font-size: 13px;
  color: var(--text-dim);
  font-style: italic;
  line-height: 1.5;
}

.req-item {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.45;
}

.req-item::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--gold-dark);
}

.req-sub {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 22px;
}

.benefit-item {
  background: rgba(14, 14, 14, 0.82);
  border: 1px solid rgba(212, 175, 55, 0.14);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.work-highlight {
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.38);
  border-radius: var(--radius);
  padding: 18px 24px;
  text-align: center;
  margin-bottom: 22px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  letter-spacing: 0.08em;
  color: var(--gold-light);
  text-shadow: 0 0 22px var(--glow-sm);
}

.work-extra {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
  padding: 14px 18px;
  background: rgba(10, 10, 10, 0.7);
  border-left: 2px solid rgba(212, 175, 55, 0.25);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 8px;
}

@media (max-width: 600px) {
  .work-grid     { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   DOLLAR RAIN
═══════════════════════════════════════════════════════════ */
.dollar-rain {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  overflow: hidden;
  perspective: 800px;
}

.dollar-bill {
  position: absolute;
  top: 0;
  left: 0;
  width: 80px;
  height: auto;
  will-change: transform, opacity;
  transform-origin: center center;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.55));
}

@media (prefers-reduced-motion: reduce) {
  .dollar-rain { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   TABLE PAGE
═══════════════════════════════════════════════════════════ */
.table-section {
  position: relative;
  z-index: var(--z-content);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 52px) 24px 80px;
}

.table-card {
  background: var(--card-bg);
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 14px;
  padding: 52px 44px;
  max-width: 1300px;
  width: 100%;
  min-width: 0;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 0 60px rgba(212, 175, 55, 0.06),
    inset 0 1px 0 rgba(212, 175, 55, 0.12),
    0 28px 80px rgba(0, 0, 0, 0.92);
}

/* Disclaimer */
.disclaimer {
  background: rgba(239, 68, 68, 0.08);
  border-left: 4px solid #ef4444;
  padding: 18px 24px;
  border-radius: var(--radius);
  margin-bottom: 32px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}
.disclaimer strong {
  color: #ef4444;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.05em;
}

/* Interactive compatibility check */
.interactive-selector {
  background: rgba(14, 14, 14, 0.86);
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 32px;
}

.selector-title {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--gold-light);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.grid-selects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.select-wrapper label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

select {
  width: 100%;
  padding: 12px 16px;
  background-color: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.28);
  color: #fff;
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  font-family: 'Montserrat', sans-serif;
  transition: border-color var(--t2), box-shadow var(--t2);
}
select:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 10px var(--glow-sm);
}
/* Style option tags for dark theme */
select option {
  background-color: #0c0c0c;
  color: #fff;
}

.result-box {
  padding: 18px;
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-weight: 700;
  letter-spacing: 0.06em;
  display: none;
  border: 1px solid rgba(212, 175, 55, 0.2);
  margin-top: 15px;
  animation: pulseLight 2s infinite ease-in-out;
}

.result-names {
  font-size: 1.05rem;
}

.result-arrow {
  color: var(--gold-light);
  font-weight: 900;
}

.result-status {
  font-size: 1.1rem;
}

@keyframes pulseLight {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.15); }
}

/* Legend styling */
.legend {
  background: rgba(14, 14, 14, 0.86);
  border: 1px solid rgba(212, 175, 55, 0.16);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 32px;
}

.legend-title {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--gold-light);
  margin-bottom: 20px;
  text-transform: uppercase;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 14px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.color-badge {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Table layout */
.table-container {
  width: 100%;
  overflow-x: auto;
  background: rgba(10, 10, 10, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 8px;
  margin-bottom: 32px;
}

/* Premium Scrollbars */
.table-container::-webkit-scrollbar {
  height: 10px;
  width: 10px;
}
.table-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 0 0 8px 8px;
}
.table-container::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.35);
  border-radius: 5px;
  border: 2px solid rgba(0, 0, 0, 0.5);
}
.table-container::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 175, 55, 0.6);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  text-align: center;
}

th, td {
  padding: 10px 8px;
  border: 1px solid rgba(212, 175, 55, 0.12);
  min-width: 80px;
  font-weight: 500;
  transition: filter var(--t1), transform var(--t1);
}

th {
  background-color: #0c0c0c;
  color: var(--gold-light);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  font-weight: 400;
}

.row-header {
  text-align: left;
  font-weight: 600;
  background-color: #0c0c0c;
  color: #fff;
  position: sticky;
  left: 0;
  min-width: 110px;
  z-index: 5;
  border-right: 2px solid rgba(212, 175, 55, 0.3);
}

/* Custom Table status styles with premium feel */
.c-syn {
  background-color: rgba(16, 185, 129, 0.2);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.c-nosyn {
  background-color: rgba(71, 85, 105, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(71, 85, 105, 0.25);
}
.c-dec {
  background-color: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
  border: 1px solid rgba(59, 130, 246, 0.35);
}
.c-cau {
  background-color: rgba(245, 158, 11, 0.2);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.c-uns {
  background-color: rgba(234, 88, 12, 0.22);
  color: #fed7aa;
  border: 1px solid rgba(234, 88, 12, 0.4);
}
.c-dan {
  background-color: rgba(239, 68, 68, 0.25);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, 0.45);
  font-weight: 700;
}

/* Tooltip cells hover */
td:not(.row-header):hover {
  filter: brightness(1.35) contrast(1.1);
  cursor: help;
}

@media (max-width: 768px) {
  .table-card {
    padding: 32px 20px;
  }

  /* 1. Поворот заголовков таблицы для узких колонок */
  th:not(:first-child) {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    padding: 12px 4px;
    min-width: 32px;
    height: 120px;
    vertical-align: middle;
    text-align: center;
  }

  /* 2. Компактные ячейки совместимости */
  td:not(.row-header) {
    min-width: 32px;
    padding: 8px 4px;
    font-size: 0.75rem;
  }

  /* 3. Оптимизация левой sticky колонки */
  .row-header {
    min-width: 85px;
    font-size: 0.72rem;
    padding: 8px 4px;
    word-break: break-all;
    hyphens: auto;
    border-right: 2px solid rgba(212, 175, 55, 0.35);
  }

  /* 4. Вертикальный стек элементов результата сравнения */
  .result-box {
    flex-direction: column;
    gap: 6px;
    padding: 14px;
  }
  .result-names {
    font-size: 0.95rem;
  }
  .result-arrow {
    transform: rotate(90deg);
    margin: 2px 0;
  }
  .result-status {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  /* 5. Уменьшение отступов и размеров логотипа для предотвращения горизонтального сдвига */
  .navbar-inner {
    padding: 0 10px;
  }
  .logo-brand {
    gap: 4px;
  }
  .logo-crown {
    width: 32px;
  }
  .logo-name {
    font-size: 1.55rem;
  }
  .logo-tagline {
    font-size: 0.46rem;
    letter-spacing: 0.06em;
  }
  .table-section {
    padding-left: 10px;
    padding-right: 10px;
  }
  .table-card {
    padding: 24px 10px;
  }
}


/* ═══════════════════════════════════════════════════════════
   MEPHEDRONE INFO BLOCK
═══════════════════════════════════════════════════════════ */

.mef-info-block {
  margin-top: 48px;
  border: 1px solid rgba(212, 175, 55, 0.30);
  border-top: 3px solid var(--gold);
  border-radius: 12px;
  background: rgba(8, 8, 8, 0.94);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.05), inset 0 1px 0 rgba(212, 175, 55, 0.10);
}

.mef-info-header {
  padding: 32px 36px 28px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  background: rgba(212, 175, 55, 0.03);
}

.mef-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  color: var(--bg);
  background: linear-gradient(135deg, #D4AF37, #FFD700);
  padding: 5px 16px 5px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.mef-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  letter-spacing: 0.05em;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.30));
}

.mef-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ── Grid of cards ───────────────────────────────────────── */
.mef-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.mef-card {
  padding: 28px 32px;
  border-right: 1px solid rgba(212, 175, 55, 0.12);
  border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

.mef-card:nth-child(2n) { border-right: none; }
.mef-card:nth-last-child(-n+2) { border-bottom: none; }

.mef-card--doses    { border-top: 2px solid #60a5fa; }
.mef-card--overdose { border-top: 2px solid #ef4444; }
.mef-card--firstaid { border-top: 2px solid #10b981; }
.mef-card--combo    { border-top: 2px solid #f97316; }

.mef-card-title {
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mef-card-icon { font-size: 1.1rem; }

/* ── Dose table ──────────────────────────────────────────── */
.mef-dose-table {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.mef-dose-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  background: rgba(212, 175, 55, 0.08);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--gold);
}

.mef-dose-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 9px 12px;
  font-size: 13px;
  border-top: 1px solid rgba(255,255,255,0.05);
  transition: background var(--t1);
}
.mef-dose-row:hover { background: rgba(255,255,255,0.03); }

.mef-dose-label { font-weight: 600; color: var(--text-muted); }

.mef-dose--threshold { color: #94a3b8; }
.mef-dose--low       { color: #86efac; }
.mef-dose--moderate  { color: #fde68a; }
.mef-dose--high      { color: #fed7aa; }
.mef-dose--heavy     {
  color: #fca5a5;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.06);
}

/* ── Timing ──────────────────────────────────────────────── */
.mef-timing {
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.mef-timing-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--text-muted);
}
.mef-timing-row:last-child { border-bottom: none; }
.mef-timing-label { color: var(--text-dim); }

/* ── Compulsive warning ──────────────────────────────────── */
.mef-compulsive-warn {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #fde68a;
  line-height: 1.5;
}

.mef-warn-icon { font-size: 1.15rem; flex-shrink: 0; margin-top: 1px; }

/* ── Symptom groups ──────────────────────────────────────── */
.mef-symptom-group { margin-bottom: 18px; }
.mef-symptom-group:last-child { margin-bottom: 0; }

.mef-symptom-group-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.mef-sgt--cau {
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.mef-sgt--dan {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.30);
}

.mef-symptom-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mef-symptom-list li {
  font-size: 13px;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.45;
}

.mef-symptom-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--gold-dark);
  font-size: 11px;
  top: 2px;
}

.mef-symptom-list li strong { color: #fca5a5; }

/* ── First Aid Steps ─────────────────────────────────────── */
.mef-aid-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mef-aid-step {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

.mef-step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #065f46);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.30);
}

.mef-aid-step strong { color: #86efac; }

/* ── Combo cards ─────────────────────────────────────────── */
.mef-combo-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mef-combo-item {
  border-radius: 8px;
  padding: 14px 16px;
}

.mef-combo--dan {
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.mef-combo--uns {
  background: rgba(234, 88, 12, 0.10);
  border: 1px solid rgba(234, 88, 12, 0.35);
}

.mef-combo--special {
  background: rgba(168, 85, 247, 0.10);
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.mef-combo-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  background: rgba(239, 68, 68, 0.85);
  color: #fff;
}

.mef-combo-badge--uns     { background: rgba(234, 88, 12, 0.85); }
.mef-combo-badge--special { background: rgba(168, 85, 247, 0.85); }

.mef-combo-substances {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.mef-combo-substances span {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 3px 10px;
  border-radius: 20px;
}

.mef-combo-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
}

/* ── Extra combo levels ──────────────────────────────────── */
.mef-combo--cau {
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.mef-combo--syn {
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.mef-combo-badge--cau { background: rgba(245, 158, 11, 0.85); }
.mef-combo-badge--syn { background: rgba(16, 185, 129, 0.85); }

/* ── HR Tabs block ───────────────────────────────────────── */
.hr-block {
  margin-top: 48px;
  border: 1px solid rgba(212, 175, 55, 0.30);
  border-top: 3px solid var(--gold);
  border-radius: 12px;
  background: rgba(8, 8, 8, 0.94);
  overflow: hidden;
  box-shadow: 0 0 60px rgba(212, 175, 55, 0.05), inset 0 1px 0 rgba(212, 175, 55, 0.10);
}

.hr-header {
  padding: 32px 36px 28px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  background: rgba(212, 175, 55, 0.03);
}

.hr-tabs-wrapper {
  overflow-x: auto;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  background: rgba(0, 0, 0, 0.40);
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.35) transparent;
}

.hr-tabs-wrapper::-webkit-scrollbar { height: 4px; }
.hr-tabs-wrapper::-webkit-scrollbar-track { background: transparent; }
.hr-tabs-wrapper::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.35);
  border-radius: 4px;
}

.hr-tabs {
  display: flex;
  padding: 0 12px;
  gap: 2px;
  min-width: max-content;
}

.hr-tab {
  flex-shrink: 0;
  padding: 13px 16px;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--t2), border-color var(--t2), background var(--t2);
}

.hr-tab:hover {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border-bottom-color: rgba(212, 175, 55, 0.30);
}

.hr-tab.active {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
  background: rgba(212, 175, 55, 0.04);
}

.hr-content { padding: 0; }

.hr-select-wrapper {
  display: none;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  background: rgba(0, 0, 0, 0.40);
}

.hr-select-wrapper select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.80);
  border: 1px solid rgba(212, 175, 55, 0.40);
  border-radius: var(--radius);
  color: var(--gold-light);
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  outline: none;
  transition: border-color var(--t2), box-shadow var(--t2);
}

.hr-select-wrapper select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 10px var(--glow-sm);
}

@media (max-width: 768px) {
  .hr-tabs-wrapper  { display: none; }
  .hr-select-wrapper { display: block; }
}

/* ── HR block responsive ─────────────────────────────────── */
@media (max-width: 900px) {
  .mef-grid { grid-template-columns: 1fr; }
  .mef-card { border-right: none; }
  .mef-card:nth-last-child(-n+2) { border-bottom: 1px solid rgba(212, 175, 55, 0.12); }
  .mef-card:last-child { border-bottom: none; }
}

@media (max-width: 600px) {
  .hr-header { padding: 22px 20px 18px; }
  .mef-card { padding: 20px 18px; }
  .mef-dose-header,
  .mef-dose-row { font-size: 11px; padding: 7px 8px; }
}
