/* =========================================================
   AniLog — шапка, бренд и поиск
   ========================================================= */

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 8, 14, 0.68);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
}

.header-inner {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  border-radius: 12px;
}

.brand__mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  background: linear-gradient(145deg, #8b5cf6 0%, #6d5df6 52%, #38bdf8 120%);
  box-shadow:
    0 10px 28px rgba(113, 87, 246, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
  color: #fff;
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.brand:hover .brand__mark {
  transform: rotate(-8deg) scale(1.04);
  box-shadow:
    0 12px 34px rgba(113, 87, 246, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.brand__mark .icon {
  width: 21px;
  height: 21px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.brand__caption {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.header-tools {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
}

.search-field {
  position: relative;
  display: flex;
  width: 100%;
  min-width: 0;
  height: 46px;
  flex: 1;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.3s ease;
}

.search-field:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
}

.search-field:focus-within {
  border-color: rgba(167, 139, 250, 0.52);
  background: rgba(255, 255, 255, 0.055);
  box-shadow:
    0 0 0 4px rgba(139, 92, 246, 0.09),
    0 12px 30px rgba(0, 0, 0, 0.18);
}

.search-field__icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: var(--muted-2);
  pointer-events: none;
  transition: color 0.2s ease;
}

.search-field:focus-within .search-field__icon {
  color: var(--violet-light);
}

.search-field input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 72px 0 42px;
  font-size: 13.5px;
}

.search-field input::-webkit-search-cancel-button {
  display: none;
}

.search-field input::placeholder {
  color: var(--muted-2);
}

.search-field__clear {
  position: absolute;
  right: 11px;
  display: grid;
  width: 26px;
  height: 26px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.search-field__clear:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.search-field__clear .icon {
  width: 13px;
  height: 13px;
}

.search-field__kbd {
  position: absolute;
  right: 12px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-2);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.search-field.has-value .search-field__kbd {
  opacity: 0;
  pointer-events: none;
}
