/* Дополнительные стили, которые сложно/неудобно выразить через Tailwind utility-классы */

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

/* Honeypot-поле антиспам-защиты: скрыто от людей, но видно ботам,
   заполняющим все поля формы подряд (не display:none — некоторые боты
   его игнорируют, поэтому используем visually-hidden паттерн) */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Skip-link для доступности: скрыт визуально, появляется при фокусе с клавиатуры */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: #d4af6a;
  color: #050b14;
  padding: 0.6rem 1.2rem;
  border-radius: 0 0 0.5rem 0;
  font-weight: 600;
  font-size: 0.9rem;
}
.skip-link:focus {
  left: 0;
}

/* Тонкая золотая полоса-разделитель */
.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4af6a, transparent);
}

/* Текстура шума для тёмных секций (премиальный эффект) */
.texture-noise {
  position: relative;
}
.texture-noise::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Плавное появление при скролле */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Скроллбар в премиальном стиле */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #0a1626;
}
::-webkit-scrollbar-thumb {
  background: #96753a;
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: #d4af6a;
}

/* Prose-стили для статей и форумных сообщений */
.prose-fish h3 {
  color: #e8c987;
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}
.prose-fish p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: #cbd5e1;
}
.prose-fish ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
  color: #cbd5e1;
}
.prose-fish li {
  margin-bottom: 0.4rem;
}

/* Форма — стилизация нативных элементов внутри тёмной темы */
.form-input,
.form-textarea,
.form-select {
  background-color: #0a1626;
  border: 1px solid rgba(212, 175, 106, 0.25);
  color: #e2e8f0;
  border-radius: 0.6rem;
  padding: 0.75rem 1rem;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #d4af6a;
  box-shadow: 0 0 0 3px rgba(212, 175, 106, 0.12);
}
.form-input::placeholder,
.form-textarea::placeholder {
  color: #64748b;
}

.form-checkbox {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  appearance: none;
  background-color: #0a1626;
  border: 1px solid rgba(212, 175, 106, 0.4);
  border-radius: 0.3rem;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, background-color 0.2s;
}
.form-checkbox:checked {
  background-color: #d4af6a;
  border-color: #d4af6a;
}
.form-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #050b14;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.form-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(212, 175, 106, 0.15);
}

/* Прозаический текст юридических страниц */
.prose-legal a {
  text-decoration: underline;
  text-decoration-color: rgba(212, 175, 106, 0.4);
}

/* =========================================================
   ВИЗУАЛЬНЫЕ УЛУЧШЕНИЯ — декоративные элементы, микроанимации
   ========================================================= */

/* Выделение текста в золотых тонах */
::selection {
  background: rgba(212, 175, 106, 0.35);
  color: #fff;
}

/* Доступность: заметный фокус вместо стандартного синего */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #d4af6a;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Декоративные размытые "сферы" света — создают глубину на тёмном фоне */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
}
.gradient-orb-gold {
  background: radial-gradient(circle, rgba(212, 175, 106, 0.35) 0%, rgba(212, 175, 106, 0) 70%);
}
.gradient-orb-blue {
  background: radial-gradient(circle, rgba(35, 66, 104, 0.55) 0%, rgba(35, 66, 104, 0) 70%);
}

/* Золотая точка-разделитель под мини-заголовками секций */
.eyebrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4af6a);
}

/* Эффект "блика", проходящего по золотой кнопке при наведении */
.btn-shine {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s ease;
  z-index: 1;
}
.btn-shine:hover::after {
  left: 130%;
}

/* Карточки — более выразительный hover: лёгкое сияние снизу + подъём (translate уже задаётся в Tailwind) */
.card-glow {
  transition: box-shadow 0.35s ease, border-color 0.35s ease, transform 0.35s ease;
}
.card-glow:hover {
  box-shadow: 0 20px 50px -20px rgba(212, 175, 106, 0.25), 0 0 0 1px rgba(212, 175, 106, 0.15) inset;
}

/* Кнопка "наверх" */
#back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 55;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #b8924f, #e8c987);
  color: #050b14;
  box-shadow: 0 10px 25px -8px rgba(212, 175, 106, 0.5);
  opacity: 0;
  transform: translateY(12px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#back-to-top:hover {
  box-shadow: 0 14px 30px -6px rgba(212, 175, 106, 0.65);
  transform: translateY(-3px) scale(1.05);
}

/* Мягкая анимация раскрытия мобильного меню */
#mobile-menu {
  transition: max-height 0.35s ease, opacity 0.3s ease;
}

/* Логотип — лёгкое вращение кольца при наведении на "ЕЧ" */
.brand-mark {
  transition: transform 0.5s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
a:hover .brand-mark {
  transform: rotate(8deg) scale(1.05);
  box-shadow: 0 0 0 4px rgba(212, 175, 106, 0.12);
}

/* Волнистый декоративный разделитель над футером */
.footer-wave {
  display: block;
  width: 100%;
  height: 48px;
  color: #0a1626;
}

/* Точки-разделители в футере/шапке (мобильные версии) */
.dot-divider::before {
  content: '•';
  color: rgba(212, 175, 106, 0.5);
  margin: 0 0.5rem;
}

/* Плавное увеличение изображений в карточках при наведении уже есть — добавим лёгкое затемнение виньеткой */
.img-vignette {
  position: relative;
}
.img-vignette::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 11, 20, 0) 40%, rgba(5, 11, 20, 0.25) 100%);
  pointer-events: none;
}

/* Скелетон-заглушка для изображений до загрузки (мягкое мерцание) */
img {
  background-color: rgba(255, 255, 255, 0.03);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  #back-to-top,
  .brand-mark,
  .btn-shine::after {
    transition: none !important;
  }
}
