/* =========================================================
   goad.se — Neon UI for header (navbar + search + hover)
   Работает с твоим HTML:
   <header class="header"> … <div class="brand"> … </div>
                           <div class="search"><input type="search"></div>
                           <nav class="right"><a class="btn">…</a> … </nav>
   ========================================================= */

/* ---- Шапка: неоновая линия и мягкая тень ---- */
.header {
  position: relative;
  z-index: 50;
  border-bottom: 1px solid rgba(80,120,255,0.22);
  box-shadow: 0 2px 10px rgba(0,60,255,0.28);
}

/* Тонкая акцентная линия под шапкой */
.header::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, rgba(59,130,246,0), rgba(59,130,246,.45), rgba(59,130,246,0));
  pointer-events: none;
}

/* ---- Поле поиска: спокойный вид + glow при фокусе ---- */
.header .search input[type="search"] {
  transition: box-shadow .25s ease, border-color .25s ease, background-color .25s ease;
  background-color: rgba(10, 16, 32, 0.8);
  border: 1px solid rgba(80,120,255,0.25);
  border-radius: 10px;
  padding: 10px 12px;
  color: #e6eefc;
}
.header .search input[type="search"]::placeholder { color: #98a6c0; }
.header .search input[type="search"]:focus {
  outline: none;
  border-color: rgba(59,130,246,.75);
  box-shadow:
    0 0 0 3px rgba(59,130,246,.18),
    0 0 14px rgba(59,130,246,.45);
  background-color: rgba(10,16,32,0.92);
}

/* ---- Кнопки справа (Войти / Регистрация): hover ---- */
.header .right .btn {
  transition: .25s ease;
}
.header .right .btn:hover {
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  box-shadow: 0 0 12px rgba(59,130,246,0.5);
  border-color: transparent;
  color: #fff;
}

/* ---- Glow при скролле ---- */
.header.scrolled {
  box-shadow: 0 4px 20px rgba(59,130,246,0.45);
  border-bottom-color: rgba(80,120,255,0.4);
  transition: box-shadow .3s ease, border-color .3s ease;
}

/* =========================================================
   Безопасная интро-анимация шапки
   Ничего не скрываем без .will-intro на .header
   ========================================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

/* Скрываем ТОЛЬКО если JS включил .will-intro */
.header.will-intro .brand,
.header.will-intro .search input[type="search"],
.header.will-intro .right .btn {
  opacity: 0;
  transform: translateY(-6px);
}

/* Запускаем анимации, когда .header получает .is-ready */
.header.is-ready .brand { animation: fadeUp .8s ease forwards; }
.header.is-ready .search input[type="search"] { animation: fadeUp .9s ease forwards; }
.header.is-ready .right .btn:nth-child(1) { animation: fadeUp 1.0s ease forwards; }
.header.is-ready .right .btn:nth-child(2) { animation: fadeUp 1.1s ease forwards; }

/* Уважение к сниженным анимациям */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .header .brand,
  .header .search input[type="search"],
  .header .right .btn {
    opacity: 1 !important; transform: none !important;
  }
}

