/* ===== CSS VARIABLES (MUST BE FIRST) ===== */
:root{
  --brand-blue: #08009D;
  --brand-blue-hover: #06007D;
  --brand-red: #C21F3A;
  --brand-red-hover: #A81830;

  --sansi-radius: 22px;         /* большие кнопки / карточки */
  --sansi-radius-square: 16px;  /* 44x44 бургер */
  --sansi-card-radius: 22px;    /* карточки */
}

/* ===== Base / reset ===== */
html, body {
  margin: 0;
  padding: 0;
  /* !!! ВАЖНОЕ ИСПРАВЛЕНИЕ !!! */
  /* Убирает горизонтальный скролл на мобильных */
  overflow-x: hidden; 
  width: 100%;
  max-width: 100vw;
}

html {
  font-family: "Outfit", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, Arial, sans-serif;
  scroll-behavior: smooth;
}

body {
  font-family: inherit;
  background: #08009D; /* чтобы не было белого фона вокруг layout */
  position: relative; /* Важно для работы overflow-x: hidden */
}

/* ===== Checkbox ===== */
#checkbox{ display: none; }

/* ===== Burger (logo-style) ===== */
.toggle{
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--sansi-radius-square);
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--brand-blue);
  box-shadow: 0 10px 26px rgba(8,0,157,0.22);

  transition: background-color .2s ease, box-shadow .2s ease, transform .15s ease;
  will-change: transform;
}

.toggle:hover{
  background: var(--brand-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(8,0,157,0.30);
}

.bar{
  position: absolute;
  left: 11px;
  right: 11px;
  height: 3px;
  background: #fff;
  border-radius: 2px;

  transition: transform .25s ease, top .25s ease, opacity .2s ease;
}

.bar--top{ top: 14px; }
.bar--middle{ top: 20.5px; }
.bar--bottom{ top: 27px; }

#checkbox:checked + .toggle .bar--top{
  top: 20.5px;
  transform: rotate(45deg);
}
#checkbox:checked + .toggle .bar--middle{ opacity: 0; }
#checkbox:checked + .toggle .bar--bottom{
  top: 20.5px;
  transform: rotate(-45deg);
}

/* ===== Buttons ===== */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;

  padding: 14px 28px;
  min-height: 48px;

  border-radius: var(--sansi-radius);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;

  cursor: pointer;
  border: none;

  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
  will-change: transform;
}

.btn-primary{
  background: var(--brand-blue);
  color: #fff;
  box-shadow: 0 14px 32px rgba(8,0,157,.22);
}

.btn-primary:hover{
  background: var(--brand-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(8,0,157,.32);
}

.btn-square{
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--sansi-radius-square);
}

.btn-danger{
  background: var(--brand-red);
  color: #fff;
  box-shadow: 0 10px 26px rgba(194,31,58,0.22);
}

.btn-danger:hover{
  background: var(--brand-red-hover);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(194,31,58,0.30);
}

.btn-mini{
  padding: 10px 16px;
  min-height: 40px;
  border-radius: 18px;
  font-size: .92rem;
}

.btn:focus-visible,
.toggle:focus-visible{
  outline: 3px solid rgba(8,0,157,.35);
  outline-offset: 3px;
}

/* text link (hero etc) */
.btn-link{
  color: var(--brand-blue);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
  transition: color .2s ease;
}
.btn-link:hover{ color: var(--brand-blue-hover); }

/* ===== Cards (equip + feature) ===== */
.equip-card,
.feature-card,
.card-sansi{
  border-radius: var(--sansi-card-radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(8,0,157,0.10);
  box-shadow: 0 14px 40px rgba(10,10,40,0.10);

  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.equip-card:hover,
.feature-card:hover,
.card-sansi:hover{
  transform: translateY(-2px);
  border-color: rgba(8,0,157,0.22);
  box-shadow: 0 18px 55px rgba(10,10,40,0.14);
}

.equip-card:active,
.feature-card:active,
.card-sansi:active{
  transform: translateY(0);
}

.equip-card:focus-visible{
  outline: none;
  box-shadow:
    0 18px 55px rgba(10,10,40,0.14),
    0 0 0 4px rgba(8,0,157,0.25);
}

.equip-card .equip-caption{
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(8,0,157,0.08);
}

/* ===== Small logo squares (dots) ===== */
.sansi-dot{
  display: inline-block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border-radius: 6px;
  background: var(--brand-blue);

  box-shadow:
    0 6px 16px rgba(0,0,0,0.12),
    inset 0 0 0 1px rgba(255,255,255,0.28);

  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.sansi-dot--red{ background: var(--brand-red); }

/* ===== HERO decor responsive ===== */
.hero-decor{ pointer-events: none; }

@media (max-width: 640px){
  .hero-squares{ display: none !important; }
  .hero-bg{ opacity: .35; transform: scale(.85); }
}

@media (min-width: 641px) and (max-width: 1024px){
  .hero-squares{ transform: scale(.75) translate(40px, -10px); opacity: .5; }
}

/* ===== Sidebar (scroll but hidden scrollbar) ===== */
#sidebar{
  scrollbar-width: none;     /* Firefox */
  -ms-overflow-style: none;  /* old Edge/IE */
}
#sidebar::-webkit-scrollbar{
  width: 0;
  height: 0;
}

/* (остальное sidebar-меню — если используешь эти классы) */
.sansi-sidebar-nav{ display:flex; flex-direction:column; gap:6px; font-size:18px; font-weight:600; }
.sansi-side-link{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 14px; border-radius:16px;
  color:rgba(255,255,255,.92); text-decoration:none;
  transition: background-color .18s ease, transform .12s ease, color .18s ease;
}
.sansi-side-link:hover{ background: rgba(255,255,255,.10); color:#fff; }
.sansi-side-link.is-active{ background: rgba(255,255,255,.14); color:#fff; }

.sansi-side-toggle{ background: transparent; border:0; cursor:pointer; }
.sansi-side-toggle:hover{ background: rgba(255,255,255,.10); }
.sansi-side-toggle[aria-expanded="true"],
.sansi-side-toggle.is-active{
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
}

.sansi-submenu{
  margin: 4px 0 6px 8px;
  padding-left: 10px;
  border-left: 1px solid rgba(255,255,255,.18);
  display:flex; flex-direction:column; gap:6px;
}
.sansi-sub-link{
  display:flex; align-items:center; gap:10px;
  padding: 10px 12px; border-radius: 14px;
  color: rgba(255,255,255,.85);
  text-decoration:none;
  font-weight:500; font-size:16px;
  transition: background-color .18s ease, color .18s ease;
}
.sansi-sub-link:hover{ background: rgba(255,255,255,.10); color:#fff; }
.sansi-sub-link.is-active{ background: rgba(255,255,255,.14); color:#fff; }

.sansi-side-divider{ height:1px; background: rgba(255,255,255,.18); margin:14px 0 10px; }
.sansi-side-section-title{ font-size:12px; letter-spacing:.14em; color: rgba(255,255,255,.55); margin:4px 2px 6px; }

.dot{ width:14px; height:14px; border-radius:4px; flex:0 0 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,.14), inset 0 0 0 1px rgba(255,255,255,.22);
}
.dot-blue{ background: var(--brand-blue); }
.dot-red{ background: var(--brand-red); }

/* ===== Footer (brand) ===== */
.sansi-footer{ background: var(--brand-blue); }

.footer-link{
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  transition: color .18s ease;
}
.footer-link:hover{ color:#fff; }
.footer-link:focus-visible{
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* footer squares (ONE version) */
.footer-square{
  width: 72px;
  height: 72px;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  opacity: .95;
}
.footer-square--blue{ background: var(--brand-blue); }
.footer-square--red { background: var(--brand-red); }

@media (max-width: 1024px){
  .footer-square{ width: 60px; height: 60px; }
}
@media (max-width: 640px){
  .footer-squares{ display:none !important; }
}

/* footer CTA */
.btn-footer-primary{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 22px; border-radius: 22px;
  background:#fff; color: var(--brand-blue);
  font-weight:600; text-decoration:none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-footer-primary:hover{
  background:#f2f4ff;
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

.btn-footer-outline{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 22px; border-radius:22px;
  border:1px solid rgba(255,255,255,0.6);
  color:#fff; font-weight:500; text-decoration:none;
  transition: background .15s ease, transform .15s ease;
}
.btn-footer-outline:hover{
  background: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}