/* ===============================
   BOSPHORUS BREWLINE — GLOBAL
   УНИКАЛЬНАЯ ПАЛИТРА & ХЕДДЕР
   =============================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* Ночная палитра: фиолетовый Босфор + неоновая лазурь + теплый янтарь */
  --bb-bg-deep: #050016;
  --bb-bg-ink: #090322;
  --bb-bg-card: #140a35;
  --bb-bg-pill: rgba(255, 250, 244, 0.04);

  --bb-accent-azure: #46f1ff;
  --bb-accent-amber: #ffb451;
  --bb-accent-magenta: #f059b8;

  --bb-foam: #fff7ee;

  --bb-text-main: #fdf7f4;
  --bb-text-muted: #cec5d9;
  --bb-text-soft: #a696b6;

  --bb-border-subtle: rgba(255, 244, 233, 0.24);

  --bb-radius-sm: 12px;
  --bb-radius-md: 20px;
  --bb-radius-lg: 28px;
  --bb-radius-xl: 40px;

  --bb-shadow-soft: 0 18px 60px rgba(4, 0, 20, 0.9);
  --bb-shadow-soft-alt: 0 18px 70px rgba(3, 0, 17, 0.98);

  --bb-header-height: 86px;
  --bb-container-width: 1140px;
  --bb-gutter: 22px;

  --bb-font-ui: "BBText", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bb-font-display: "BBDisplay", "Times New Roman", serif;

  --bb-transition-fast: 180ms ease-out;
  --bb-transition-medium: 260ms ease-out;
}

/* Local Google Fonts (TTF из /fonts) */
/* Например: Space Grotesk & Fraunces */
@font-face {
  font-family: "BBText";
  src: url("../fonts/SpaceGrotesk-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BBText";
  src: url("../fonts/SpaceGrotesk-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BBDisplay";
  src: url("../fonts/Fraunces-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* Body & base */

html {
  scroll-behavior: smooth;
}

body.bb-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--bb-font-ui);
  background:
    radial-gradient(circle at 8% 0%, #291560 0, transparent 56%),
    radial-gradient(circle at 100% 6%, #2f144f 0, transparent 55%),
    radial-gradient(circle at 12% 100%, #3f1040 0, transparent 52%),
    linear-gradient(135deg, #050016, #040019);
  color: var(--bb-text-main);
  overflow-x: hidden;
}

/* Typography */

.bb-main {
  padding-top: var(--bb-header-height);
}

h1,
h2,
h3,
h4 {
  font-family: var(--bb-font-display);
  letter-spacing: 0.02em;
  margin: 0;
}

p {
  margin: 0;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Max width for content images (<= 350px) */

.bb-image,
.bb-hero-image,
.bb-content-image {
  max-width: 320px;
}

/* Layout utils */

.bb-shell {
  max-width: var(--bb-container-width);
  margin: 0 auto;
  padding: 0 var(--bb-gutter);
}

/* ===============================
   HEADER — УНИКАЛЬНЫЙ ДИЗАЙН
   =============================== */

.bb-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: var(--bb-header-height);
  z-index: 40;
  backdrop-filter: blur(22px);
  background:
    linear-gradient(
      90deg,
      rgba(9, 2, 40, 0.97),
      rgba(8, 3, 55, 0.96),
      rgba(6, 5, 46, 0.97)
    );
  border-bottom: 1px solid rgba(255, 244, 233, 0.18);
}

.bb-header::after {
  /* неоновая «линиия парома» под хеддером */
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 2px;
  background:
    linear-gradient(
      90deg,
      rgba(70, 241, 255, 0.1),
      rgba(70, 241, 255, 0.85),
      rgba(240, 89, 184, 0.9),
      rgba(255, 180, 81, 0.95),
      rgba(70, 241, 255, 0.65)
    );
  box-shadow:
    0 0 16px rgba(70, 241, 255, 0.6),
    0 0 26px rgba(240, 89, 184, 0.4);
}

.bb-header-inner {
  max-width: var(--bb-container-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--bb-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.bb-header-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.bb-header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Logo */

.bb-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bb-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 40% 60% 55% 45%;
  background:
    radial-gradient(circle at 0 0, #ffb451, transparent 55%),
    radial-gradient(circle at 60% 100%, #f059b8, #ff6b79);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #2b0a02;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.8),
    0 0 18px rgba(240, 89, 184, 0.8);
}

.bb-logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bb-logo-main {
  font-size: 18px;
  font-weight: 600;
}

.bb-logo-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--bb-text-soft);
}

/* Header tagline pill */

.bb-header-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--bb-text-muted);
  background:
    linear-gradient(120deg, rgba(15, 6, 56, 0.98), rgba(27, 8, 64, 0.9));
  border: 1px solid rgba(255, 244, 233, 0.18);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.65);
  white-space: nowrap;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bb-header-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 0 0, var(--bb-accent-azure), #3ac7ff);
  box-shadow:
    0 0 10px rgba(70, 241, 255, 0.9),
    0 0 18px rgba(70, 241, 255, 0.5);
}

/* Header status */

.bb-header-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--bb-text-muted);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 244, 233, 0.3);
  background: rgba(10, 4, 46, 0.8);
}

.bb-header-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #43ff9d;
  box-shadow:
    0 0 10px rgba(67, 255, 157, 0.8),
    0 0 18px rgba(67, 255, 157, 0.4);
}

/* Nav */

.bb-nav {
  position: relative;
}

.bb-nav-list {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.bb-nav-link {
  position: relative;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  color: var(--bb-text-muted);
  transition:
    color var(--bb-transition-fast),
    border-color var(--bb-transition-fast),
    background var(--bb-transition-fast),
    transform var(--bb-transition-fast);
}

.bb-nav-link::after {
  content: "";
  position: absolute;
  inset-inline-start: 12px;
  bottom: 5px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bb-accent-azure), var(--bb-accent-amber));
  transition: width var(--bb-transition-fast);
}

.bb-nav-link:hover,
.bb-nav-link:focus-visible {
  color: var(--bb-foam);
  border-color: rgba(255, 244, 233, 0.2);
  background: rgba(12, 7, 52, 0.96);
  transform: translateY(-1px);
}

.bb-nav-link:hover::after,
.bb-nav-link:focus-visible::after {
  width: 60%;
}

.bb-nav-link--active {
  color: #14091c;
  border-color: rgba(0, 0, 0, 0.7);
  background:
    radial-gradient(circle at 0 0, rgba(70, 241, 255, 0.5), transparent 55%),
    linear-gradient(120deg, var(--bb-accent-amber), var(--bb-accent-magenta));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.95);
}

.bb-nav-link--active::after {
  display: none;
}

/* Burger */

.bb-burger {
  display: none;
  position: relative;
  width: 40px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 244, 233, 0.32);
  background: radial-gradient(circle at 0 0, #23104c, #0b062f);
  cursor: pointer;
  padding: 0 9px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
}

.bb-burger-line {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: var(--bb-foam);
  transition:
    transform var(--bb-transition-medium),
    opacity var(--bb-transition-medium),
    background var(--bb-transition-medium);
}

.bb-nav--open .bb-burger-line:nth-child(1) {
  transform: translateY(4px) rotate(38deg);
}

.bb-nav--open .bb-burger-line:nth-child(2) {
  opacity: 0;
}

bb-nav--open .bb-burger-line:nth-child(3) {
  transform: translateY(-4px) rotate(-38deg);
}

/* поправа: правильный селектор */
.bb-nav--open .bb-burger-line:nth-child(3) {
  transform: translateY(-4px) rotate(-38deg);
}

/* Mobile nav overlay */

.bb-nav-overlay {
  position: fixed;
  inset: var(--bb-header-height) 0 0;
  background:
    radial-gradient(circle at 0 0, #2a134f, transparent 70%),
    linear-gradient(180deg, #060023, #040017);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--bb-transition-medium);
  z-index: 35;
}

.bb-nav-overlay--active {
  opacity: 1;
  pointer-events: auto;
}

.bb-nav-overlay-list {
  list-style: none;
  padding: 26px 22px 32px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bb-nav-overlay-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 244, 233, 0.18);
  background: rgba(13, 6, 56, 0.96);
  font-size: 14px;
}

/* ===============================
   BUTTONS
   =============================== */

.bb-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--bb-text-main);
  transition:
    transform var(--bb-transition-medium),
    box-shadow var(--bb-transition-medium),
    background var(--bb-transition-medium),
    border-color var(--bb-transition-medium),
    color var(--bb-transition-medium);
}

.bb-btn--primary {
  background:
    radial-gradient(circle at 0 0, rgba(70, 241, 255, 0.6), transparent 55%),
    linear-gradient(120deg, var(--bb-accent-amber), var(--bb-accent-magenta));
  border-color: rgba(0, 0, 0, 0.85);
  box-shadow: var(--bb-shadow-soft);
  color: #150612;
}

.bb-btn--primary:hover,
.bb-btn--primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.96);
  background:
    radial-gradient(circle at 0 0, rgba(70, 241, 255, 0.9), transparent 60%),
    linear-gradient(120deg, #ffd080, #ff7ebb);
}

.bb-btn--ghost {
  border-color: rgba(255, 244, 233, 0.32);
  background: rgba(12, 5, 50, 0.94);
  color: var(--bb-foam);
}

.bb-btn--ghost:hover,
.bb-btn--ghost:focus-visible {
  background: rgba(19, 7, 70, 0.98);
  border-color: rgba(255, 244, 233, 0.6);
  transform: translateY(-1px);
}

/* ===============================
   FOOTER
   =============================== */

.bb-footer {
  border-top: 1px solid rgba(255, 244, 233, 0.14);
  margin-top: 70px;
  padding: 32px 0 20px;
  background:
    radial-gradient(circle at 0 0, #29144f, transparent 65%),
    radial-gradient(circle at 100% 100%, #311041, transparent 60%);
}

.bb-footer-inner {
  max-width: var(--bb-container-width);
  margin: 0 auto;
  padding: 0 var(--bb-gutter) 14px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 24px;
}

.bb-footer-heading {
  font-size: 20px;
  margin-bottom: 8px;
}

.bb-footer-subheading {
  font-size: 15px;
  margin-bottom: 8px;
}

.bb-footer-text {
  font-size: 13px;
  color: var(--bb-text-muted);
}

.bb-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.bb-footer-link {
  font-size: 13px;
  color: var(--bb-text-muted);
  position: relative;
}

.bb-footer-link::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--bb-accent-azure), var(--bb-accent-amber));
  transition: width var(--bb-transition-fast);
}

.bb-footer-link:hover::after,
.bb-footer-link:focus-visible::after {
  width: 100%;
}

.bb-footer-bottom {
  max-width: var(--bb-container-width);
  margin: 0 auto;
  padding: 10px var(--bb-gutter) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 244, 233, 0.16);
}

.bb-footer-small {
  margin: 0;
  font-size: 12px;
  color: var(--bb-text-soft);
}

.bb-footer-toplink {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 244, 233, 0.28);
  background: rgba(13, 5, 52, 0.96);
}

/* ===============================
   SCROLL ANIMATIONS
   =============================== */

[data-bb-animate] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 420ms ease-out,
    transform 420ms ease-out;
}

[data-bb-animate="fade-left"] {
  transform: translateX(26px);
}

[data-bb-animate="fade-right"] {
  transform: translateX(-26px);
}

.bb-in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ===============================
   RESPONSIVE
   =============================== */

@media (max-width: 1120px) {
  :root {
    --bb-container-width: 1000px;
  }

  .bb-header-pill {
    max-width: 220px;
  }

  .bb-footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .bb-header-inner {
    gap: 12px;
  }

  .bb-header-pill {
    display: none;
  }

  .bb-footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 840px) {
  .bb-nav-list {
    display: none;
  }

  .bb-burger {
    display: inline-flex;
  }

  .bb-header-right {
    gap: 10px;
  }
}

@media (max-width: 640px) {
  :root {
    --bb-header-height: 78px;
  }

  .bb-header-inner {
    padding-inline: 14px;
  }

  .bb-header-left {
    gap: 10px;
  }

  .bb-header-right {
    gap: 8px;
  }

  .bb-header-status {
    display: none;
  }

  .bb-footer-inner {
    grid-template-columns: 1fr;
  }

  .bb-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}
html,
body {
  max-width: 100%;
  overflow-x: hidden; /* отрубаем горизонтальный скролл в принципе */
}
