/* Header styles for DARJA ARTEMJEVA */

.csg-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(5, 8, 20, 0.96), rgba(5, 8, 20, 0.88));
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.csg-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
  gap: var(--space-4);
}

.csg-header__brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.csg-header__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.csg-header__logo::after {
  display: none;
}

.csg-header__logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #ffffff, #f97373, #f44336);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.85), 0 0 25px rgba(244, 67, 54, 0.8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.csg-header__chip {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #0f172a, #020617);
  box-shadow: inset 0 0 0 2px rgba(248, 250, 252, 0.6);
}

.csg-header__logo-text {
  display: flex;
  flex-direction: column;
}

.csg-header__logo-title {
  font-family: var(--font-display);
  font-size: var(--font-size-lg);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.csg-header__logo-subtitle {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
}

/* Navigation */

.csg-header__nav {
  display: flex;
}

.csg-header__nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.csg-header__nav-link {
  font-size: var(--font-size-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding-block: var(--space-1);
  position: relative;
}

.csg-header__nav-link::after {
  bottom: -6px;
}

.csg-header__nav-link:hover,
.csg-header__nav-link:focus-visible {
  color: #fff !important;
}

.csg-header__nav-item--cta {
  margin-left: var(--space-2);
}

.csg-header__nav-link--cta {
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--color-primary), var(--color-danger));
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.csg-header__nav-link--cta::after {
  display: none;
}

.csg-header__nav-link--cta:hover {
  box-shadow: var(--shadow-strong);
}

/* Mobile toggle */

.csg-header__toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.6);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  background: rgba(15, 23, 42, 0.85);
}

.csg-header__toggle-bar {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--color-gray-100);
  transition: transform var(--transition-base), opacity var(--transition-base), width var(--transition-base);
}

.csg-header__toggle:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.csg-header__toggle[aria-expanded="true"] .csg-header__toggle-bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.csg-header__toggle[aria-expanded="true"] .csg-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.csg-header__toggle[aria-expanded="true"] .csg-header__toggle-bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Mobile layout */

@media (max-width: 768px) {
  .csg-header__inner {
    padding-block: var(--space-3);
  }

  .csg-header__toggle {
    display: inline-flex;
  }

  .csg-header__nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    background: radial-gradient(circle at top, #151a2b, #050814 65%, #020309 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    transform-origin: top;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height var(--transition-slow), opacity var(--transition-base);
  }

  .csg-header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-4);
    gap: var(--space-3);
  }

  .csg-header__nav-link {
    width: 100%;
  }

  .csg-header__nav-item--cta {
    width: 100%;
  }

  .csg-header__nav-link--cta {
    justify-content: center;
    width: 100%;
    text-align: center;
  }

  .csg-header__nav--open {
    max-height: 400px;
    opacity: 1;
  }
}

@media (max-width: 520px) {
  .csg-header__logo-title {
    font-size: var(--font-size-base);
  }

  .csg-header__logo-subtitle {
    display: none;
  }
}
