/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background: linear-gradient(180deg, var(--bg-solid), var(--bg-solid-2));
  transition: background .35s ease, backdrop-filter .35s ease, border-color .35s ease;
  z-index: 1000;
}

.header.scrolled {
  background: linear-gradient(180deg, var(--bg-glass), var(--bg-glass-2));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-glass);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ===== LOGO ===== */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* ===== CLEAN LOGO (NO BACKGROUND) ===== */
.bbc {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  background: none !important;
  box-shadow: none !important;
  padding: 0;
  border-radius: 0;
  transition: transform .2s ease, opacity .2s ease;
}

/* сама картинка */
.bbc img {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25));
}

/* hover — аккуратно */
.bbc:hover {
  transform: scale(1.04);
  opacity: .95;
}


.logo .name {
  display: block;
  min-width: 0;
  max-width: 200px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.1;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none !important;
  word-break: keep-all;
}

/* мобилка */
@media (max-width: 520px) {
  .logo .name {
    max-width: 165px;
    /* чтобы перенос точно случился */
    font-size: 15px;
  }
}

/* ===== NAV ===== */
.nav {
  display: flex;
  gap: 36px;
  margin-left: 40px;
  margin-right: auto;
}

.nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color .25s ease;
}

.nav a:hover,
.nav a.active {
  color: #fff;
}

/* ===== ACTIONS ===== */
.actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* reset */
.actions button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* shared button size */
/* ===== LANGUAGE + THEME BUTTONS (UNIFIED) ===== */
.lang__btn,
.theme-switch {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
}

/* ===== FLAG IMAGE ===== */
.lang__btn img {
  width: 26px;
  /* ⬅️ правильный размер */
  height: auto;
  display: block;
  position: relative;
  z-index: 2;
  border-radius: 4px;
  /* мягкие углы как на скрине */
}

/* ===== THEME ICONS ===== */
.theme-switch svg,
.theme-switch .icon {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: block;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base states for DARK mode (default) */
.theme-switch .moon {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(0deg);
}

.theme-switch .sun {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

/* ===== RING HOVER EFFECT ===== */
/* container must be relative */
/* wrapper */
.lang {
  position: relative;
}

/* current flag button stays same size */
.lang__btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
}

.lang__btn>img {
  width: 24px;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* MENU (vertical card like screenshot #2) */
.lang__menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;

  width: 170px;
  padding: 10px;
  border-radius: 16px;

  background: rgba(7, 14, 26, .92);
  border: 1px solid rgba(255, 255, 255, .10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .45);

  display: none;
  z-index: 5000;

  transform-origin: top right;
  transform: translateY(-6px) scale(.98);
  opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
}

.lang__menu.open {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* items */
.lang__item {
  width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;

  padding: 0 12px;
  border-radius: 12px;

  background: transparent;
  border: none;
  cursor: pointer;

  color: rgba(234, 241, 255, .88);
  font-weight: 700;
  letter-spacing: .2px;

  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.lang__item img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: block;
}

.lang__item span {
  font-size: 18px;
}

/* ===== LANGUAGE DROPDOWN — LIGHT THEME FIX ===== */

html[data-theme="light"] .lang__menu {
  background: rgba(255, 255, 255, .96);
  border-color: rgba(17, 24, 39, .12);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .18);
}

/* текст */
html[data-theme="light"] .lang__item {
  color: #111827;
}

/* hover */
html[data-theme="light"] .lang__item:hover {
  background: rgba(59, 130, 246, .12);
}

/* active */
html[data-theme="light"] .lang__item.is-active {
  background: rgba(59, 130, 246, .18);
}

/* флаги — без затемнения */
html[data-theme="light"] .lang__item img,
html[data-theme="light"] .lang__btn img {
  filter: none;
}

/* hover-ring на кнопке языка в light */
html[data-theme="light"] .lang__btn::before {
  background: rgba(59, 130, 246, .12);
}

html[data-theme="light"] .lang__btn::after {
  border-color: rgba(59, 130, 246, .55);
}

/* hover */
.lang__item:hover {
  background: rgba(59, 130, 246, .14);
}

/* active highlight (pill inside card like screenshot) */
.lang__item.is-active {
  background: rgba(59, 130, 246, .22);
}

/* optional: tiny divider spacing */
.lang__item+.lang__item {
  margin-top: 6px;
}

/* ===== HOVER FOR LANGUAGE BUTTON ===== */

/* inner soft glow */
.lang__btn::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: rgba(59, 130, 246, .18);
  opacity: 0;
  transform: scale(.9);
  transition: opacity .22s ease, transform .22s ease;
}

/* outer ring */
.lang__btn::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 2px solid rgba(59, 130, 246, .95);
  opacity: 0;
  transform: scale(.92);
  transition: opacity .22s ease, transform .22s ease;
}

/* DARK */
html[data-theme="dark"] .lang__btn:hover::before,
html[data-theme="dark"] .lang__btn:hover::after {
  opacity: 1;
  transform: scale(1);
}

html[data-theme="dark"] .lang__btn:hover {
  transform: scale(1.04);
}

/* LIGHT (softer but visible) */
html[data-theme="light"] .lang__btn::before {
  background: rgba(246, 248, 250, 0.12);
}

html[data-theme="light"] .lang__btn::after {
  border-color: rgba(59, 130, 246, .55);
}

html[data-theme="light"] .lang__btn:hover::before,
html[data-theme="light"] .lang__btn:hover::after {
  opacity: 1;
  transform: scale(1);
}

html[data-theme="light"] .lang__btn:hover {
  transform: scale(1.02);
}

/* ===== THEME SWITCH (PILL WITH EMOJI) ===== */
.theme-switch {
  width: 64px;
  height: 32px;
  border-radius: 16px;
  background: rgba(30, 41, 59, 1);
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
  transition: background 0.3s ease, border-color 0.3s ease;
  padding: 0;
  display: flex;
  align-items: center;
}

/* Hide original SVGs */
.theme-switch svg,
.theme-switch .icon {
  display: none !important;
}

/* The sliding thumb (Dark mode default) */
.theme-switch::after {
  content: "🌙";
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%) translateX(34px);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.4s ease, box-shadow 0.4s ease;
}

.theme-switch:hover::after {
  transform: translateY(-50%) translateX(34px) scale(1.08);
}

/* make sure actions keep right alignment */
.actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}




/* light header look */
html[data-theme="light"] .header {
  background: rgba(248, 250, 252, .92);
}

html[data-theme="light"] .header.scrolled {
  background: rgba(248, 250, 252, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
}

/* light text */
html[data-theme="light"] .name {
  color: var(--text-light)
}

/* ===== NAV: LIGHT THEME FIX (как на 1 картинке) ===== */
html[data-theme="light"] .nav a {
  color: #111827;
  /* чёрный текст */
  opacity: 1;
  /* лёгкая мягкость (можно 1 если хочешь совсем чёрный) */
  font-weight: 500;
}

html[data-theme="light"] .nav a:hover {
  opacity: 1;
  color: #2560e0;
  /* на hover чётче */
}

html[data-theme="light"] .nav a.active {
  opacity: 1;
  color: #3b82f6;
  /* синий активный */
  font-weight: 600;
}

/* light theme toggle states */
html[data-theme="light"] .theme-switch {
  background: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.3);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

html[data-theme="light"] .theme-switch::after {
  content: "☀️";
  transform: translateY(-50%) translateX(0);
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0,0,0,0.05);
}

html[data-theme="light"] .theme-switch:hover::after {
  transform: translateY(-50%) translateX(0) scale(1.08);
}

/* ===== CONTENT (demo) ===== */
.content {
  padding-top: var(--header-height)
}

.hero {
  height: 100vh;
  background: #0c1120;
}

.block {
  height: 80vh;
  background: #0f172a;
  border-top: 1px solid rgba(148, 163, 184, .08);
}

/* content in light mode (optional) */
html[data-theme="light"] .hero {
  background: #f3f5f8;
}

html[data-theme="light"] .block {
  background: #f1f5f9;
  border-top: 1px solid rgba(148, 163, 184, .15);
}

.hero-slider {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-slider__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1), transform 6s linear;
  transform: scale(1.05);
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
}

.hero-slider__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 500px at 50% 40%,
      rgba(0, 0, 0, .10),
      rgba(0, 0, 0, .50)),
    linear-gradient(180deg,
      rgba(10, 15, 26, .20) 0%,
      rgba(10, 15, 26, .65) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-slider__content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 0 24px;
  text-align: center;
  pointer-events: none;
}

.hero-slider__content a,
.hero-slider__content button {
  pointer-events: auto;
}

.hero-slider__content h1 {
  font-size: var(--fs-hero);
  line-height: 1.05;
  font-weight: var(--fw-black);
  color: #fff;
  letter-spacing: var(--tracking-tight);
  margin-bottom: 16px;
}

.hero-slider__content p {
  max-width: 600px;
  margin: 0 auto 32px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, .65);
  font-weight: 400;
}

.hero-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 32px;
  border-radius: 999px;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: none;
  box-shadow:
    0 6px 20px rgba(29, 78, 216, .30),
    0 2px 6px rgba(0, 0, 0, .15);
  transition:
    transform .25s ease,
    box-shadow .25s ease;
}

.hero-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 30px rgba(29, 78, 216, .40),
    0 4px 10px rgba(0, 0, 0, .15);
}

.hero-btn:active {
  transform: translateY(0);
  box-shadow:
    0 4px 12px rgba(29, 78, 216, .25);
}

.hero-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(29, 78, 216, .40),
    0 8px 24px rgba(29, 78, 216, .35);
}


/* чтобы видео не перекрывало header */
.content {
  padding-top: var(--header-height);
}

/* ===== HERO LIGHT THEME SOFT BOTTOM GLOW ===== */
html[data-theme="light"] .hero-slider__overlay {
  background:
    /* мягкий белый туман снизу */
    linear-gradient(180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, .18) 60%,
      rgba(255, 255, 255, .45) 100%),
    /* лёгкое затемнение для читаемости текста */
    radial-gradient(1200px 600px at 50% 35%,
      rgba(0, 0, 0, .06),
      rgba(0, 0, 0, .18));
}

/* ===== ABOUT SECTION (match screenshot) ===== */
.about {
  position: relative;
  padding: 100px 24px;
  background: #0c1120;
}

.about__wrap {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.about__badge {
  width: 94px;
  height: 94px;
  margin: 0 auto 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;

  color: var(--accent);
  background: rgba(29, 78, 216, .06);
  border: 1px solid rgba(29, 78, 216, .12);

  box-shadow:
    0 12px 40px rgba(0, 0, 0, .25),
    inset 0 1px 0 rgba(148, 163, 184, .06);
}

/* subtle inner ring */
.about__badge::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(37, 99, 235, .22);
}

.about__badge-icon {
  width: 60px;
  height: 60px;
  filter: drop-shadow(0 10px 28px rgba(59, 130, 246, .35));
}

.about__title {
  font-size: var(--fs-section);
  line-height: 1.08;
  font-weight: var(--fw-black);
  letter-spacing: var(--tracking-tight);
  color: var(--text);
  margin-bottom: 14px;
}

.about__lead {
  font-size: 16px;
  font-weight: 600;
  color: rgba(241, 245, 249, .75);
  margin-bottom: 18px;
}

.about__text {
  max-width: 820px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.75;
  color: rgba(241, 245, 249, .60);
}

/* ===== ABOUT SECTION — LIGHT THEME ===== */
html[data-theme="light"] .about {
  background: #f3f5f8;
}


html[data-theme="light"] .about__title {
  color: #0f172a;
}

html[data-theme="light"] .about__lead {
  color: rgba(51, 65, 85, .70);
}

html[data-theme="light"] .about__text {
  color: rgba(51, 65, 85, .60);
}

/* icon badge in light mode */
html[data-theme="light"] .about__badge {
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(148, 163, 184, .20);
  box-shadow:
    0 18px 55px rgba(15, 23, 42, .10),
    inset 0 1px 0 rgb(255, 255, 255);
}

/* inner ring */
html[data-theme="light"] .about__badge::after {
  border-color: rgba(37, 99, 235, .22);
}

/* icon color */
html[data-theme="light"] .about__badge {
  color: #2563eb;
}

html[data-theme="light"] .about {
  background: #f3f5f8;
}