/* ═══════════════════════════════════════════
   ЛЕНДИНГ ЭНЕРГОПРАКТИКА — МАГИЧЕСКАЯ ТЕМА
   ═══════════════════════════════════════════ */

/* ── Переменные ── */
:root {
  --bg-deep: #0a0612;
  --bg-dark: #110b1f;
  --bg-card: #1a1230;
  --bg-card-hover: #221845;
  --purple: #7c5cbf;
  --purple-light: #a78bfa;
  --purple-glow: rgba(124, 92, 191, 0.3);
  --gold: #d4a853;
  --gold-light: #f0d48a;
  --gold-glow: rgba(212, 168, 83, 0.25);
  --text: #e8e0f0;
  --text-muted: #9a8fb5;
  --text-dim: #6b5f85;
  --white: #f5f0ff;
  --border: rgba(124, 92, 191, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Raleway', 'Segoe UI', sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.7;
  font-weight: 300;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Утилиты ── */
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; position: relative; }
.section__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--white);
  text-align: center;
  margin-bottom: 12px;
}
.section__subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 56px;
  font-weight: 300;
}

/* ── Reveal-анимация ── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Кнопки ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  text-decoration: none;
}
.btn--primary {
  background: linear-gradient(135deg, var(--purple), #9b6dd7);
  color: var(--white);
  box-shadow: 0 4px 24px var(--purple-glow);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124, 92, 191, 0.5);
}
.btn--gold {
  background: linear-gradient(135deg, var(--gold), #e8c470);
  color: #1a0f00;
  box-shadow: 0 4px 24px var(--gold-glow);
  font-weight: 600;
}
.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(212, 168, 83, 0.5);
}
.btn--ghost {
  background: transparent;
  color: var(--purple-light);
  border: 1px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--purple-light);
  background: rgba(124, 92, 191, 0.08);
}
.btn--small { padding: 10px 24px; font-size: 0.85rem; }
.btn--large { padding: 18px 44px; font-size: 1.1rem; }

/* ── Glow-текст ── */
.glow-text {
  color: var(--gold-light);
  text-shadow: 0 0 20px var(--gold-glow), 0 0 60px rgba(212, 168, 83, 0.15);
}

/* ═══════════ ЧАСТИЦЫ ═══════════ */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.particle {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  background: var(--purple-light);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat var(--d) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
@keyframes particleFloat {
  0%, 100% { opacity: 0; transform: translateY(0) scale(1); }
  25% { opacity: 0.6; }
  50% { opacity: 0.3; transform: translateY(-40px) scale(1.3); }
  75% { opacity: 0.5; }
}

/* ── Stars canvas ── */
.stars-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(124, 92, 191, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(212, 168, 83, 0.06) 0%, transparent 50%);
}

/* ═══════════ HEADER / NAV ═══════════ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: var(--transition);
  background: transparent;
}
.header.scrolled {
  background: rgba(10, 6, 18, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header__logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--white);
  letter-spacing: 0.02em;
}
.header__logo span { color: var(--gold-light); }
.header__nav {
  display: flex;
  gap: 32px;
  align-items: center;
}
.header__nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--transition);
}
.header__nav a:hover,
.header__nav a.active {
  color: var(--purple-light);
}

/* ═══════════ HERO (главная страница) ═══════════ */
.hero-main {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  padding: 120px 0 80px;
  position: relative;
  z-index: 1;
}
.hero-main__left { }
.hero-main__eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  display: block;
}
.hero-main__name {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 8px;
}
.hero-main__name em {
  font-style: italic;
  color: var(--gold-light);
  text-shadow: 0 0 40px var(--gold-glow);
}
.hero-main__role {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.8rem);
  font-weight: 300;
  color: var(--purple-light);
  margin-bottom: 28px;
}
.hero-main__text {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 480px;
  line-height: 1.8;
  margin-bottom: 40px;
}
.hero-main__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-main__right {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-orb {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%,
    rgba(167, 139, 250, 0.2) 0%,
    rgba(124, 92, 191, 0.15) 40%,
    rgba(212, 168, 83, 0.08) 70%,
    transparent 100%);
  border: 1px solid rgba(124, 92, 191, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: orbPulse 4s ease-in-out infinite;
  position: relative;
}
.hero-orb::before {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 1px solid rgba(124, 92, 191, 0.1);
  animation: orbRing 4s ease-in-out infinite reverse;
}
.hero-orb__symbol {
  font-size: 6rem;
  filter: drop-shadow(0 0 30px rgba(167, 139, 250, 0.5));
  animation: symbolFloat 3s ease-in-out infinite;
}
@keyframes orbPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 60px rgba(124, 92, 191, 0.2); }
  50% { transform: scale(1.03); box-shadow: 0 0 100px rgba(124, 92, 191, 0.35); }
}
@keyframes orbRing {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
  50% { transform: scale(1.05) rotate(180deg); opacity: 1; }
}
@keyframes symbolFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ═══════════ СЕКЦИИ-КАРТОЧКИ НА ГЛАВНОЙ ═══════════ */
.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  position: relative;
  z-index: 1;
}
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-decoration: none;
  color: var(--text);
  display: block;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.section-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 92, 191, 0.05), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.section-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124, 92, 191, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(124, 92, 191, 0.2);
}
.section-card:hover::before { opacity: 1; }
.section-card__icon { font-size: 2.5rem; margin-bottom: 16px; }
.section-card__title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 8px;
}
.section-card__text {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.section-card__arrow {
  position: absolute;
  bottom: 20px;
  right: 24px;
  color: var(--purple-light);
  opacity: 0;
  transform: translateX(-8px);
  transition: var(--transition);
  font-size: 1.2rem;
}
.section-card:hover .section-card__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* ═══════════ HERO СТРАНИЦА РАЗДЕЛА ═══════════ */
.hero-section {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(124, 92, 191, 0.08) 0%, transparent 100%);
}
.hero-section__inner { max-width: 700px; }
.hero-section__tag {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: 50px;
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-section__title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  line-height: 1.1;
}
.hero-section__subtitle {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--purple-light);
  margin-bottom: 20px;
  font-weight: 300;
  font-style: italic;
}
.hero-section__text {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 36px;
  max-width: 600px;
}

/* ═══════════ СЕТКА КАРТОЧЕК ═══════════ */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  position: relative;
  z-index: 1;
}
.item-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.item-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--purple), var(--gold));
  opacity: 0;
  transition: opacity var(--transition);
}
.item-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(124, 92, 191, 0.35);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(124, 92, 191, 0.2),
              0 0 0 1px rgba(212, 168, 83, 0.1);
}
.item-card:hover::after { opacity: 1; }

.item-card__emoji {
  font-size: 3rem;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(167, 139, 250, 0.3));
}
.item-card__title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}
.item-card__desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
  flex: 1;
}
.item-card__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.badge {
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.badge--duration {
  background: rgba(124, 92, 191, 0.15);
  color: var(--purple-light);
  border: 1px solid rgba(124, 92, 191, 0.2);
}
.badge--level {
  background: rgba(212, 168, 83, 0.12);
  color: var(--gold);
  border: 1px solid rgba(212, 168, 83, 0.2);
}
.item-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.item-card__price {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-light);
  text-shadow: 0 0 20px var(--gold-glow);
}
.item-card__price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 2px;
}

/* ═══════════ ДЕКОРАТИВНЫЙ РАЗДЕЛИТЕЛЬ ═══════════ */
.divider {
  text-align: center;
  color: var(--gold);
  font-size: 1.2rem;
  letter-spacing: 0.4em;
  margin: 0 0 64px;
  opacity: 0.6;
}

/* ═══════════ FOOTER ═══════════ */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}
.footer a { color: var(--text-muted); transition: color var(--transition); }
.footer a:hover { color: var(--purple-light); }

/* ═══════════ EDITOR ═══════════ */
.editor-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 0;
  padding-top: 70px;
}
.editor-sidebar {
  background: var(--bg-dark);
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  overflow-y: auto;
}
.editor-sidebar__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding: 0 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.editor-page-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  margin-bottom: 4px;
}
.editor-page-btn:hover { background: rgba(124, 92, 191, 0.1); color: var(--purple-light); }
.editor-page-btn.active { background: rgba(124, 92, 191, 0.2); color: var(--purple-light); border-left: 2px solid var(--purple-light); }
.editor-main {
  padding: 32px;
  overflow-y: auto;
  background: var(--bg-deep);
}
.editor-preview {
  background: var(--bg-dark);
  border-left: 1px solid var(--border);
  padding: 24px;
  overflow-y: auto;
}
.editor-preview__title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.editor-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.editor-section__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 20px;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--purple); }
textarea.form-control { resize: vertical; min-height: 80px; }
.item-editor-card {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
}
.item-editor-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  cursor: pointer;
}
.item-editor-card__name { color: var(--text); font-weight: 500; }
.item-editor-card__actions { display: flex; gap: 6px; }
.btn-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 6px;
  background: rgba(124, 92, 191, 0.1);
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
}
.btn-icon:hover { background: rgba(124, 92, 191, 0.25); color: var(--purple-light); }
.btn-icon.danger:hover { background: rgba(220, 60, 60, 0.2); color: #ff6b6b; }

.preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 12px;
}
.preview-card__emoji { font-size: 2rem; margin-bottom: 8px; }
.preview-card__title { font-family: var(--font-heading); font-size: 1.1rem; color: var(--white); margin-bottom: 4px; }
.preview-card__price { color: var(--gold-light); font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.preview-card__link { font-size: 0.75rem; color: var(--text-dim); word-break: break-all; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 900px) {
  .hero-main {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-main__text { margin: 0 auto 40px; }
  .hero-main__actions { justify-content: center; }
  .hero-main__right { display: none; }
  .editor-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }
  .editor-preview { border-left: none; border-top: 1px solid var(--border); }
}
@media (max-width: 600px) {
  .items-grid { grid-template-columns: 1fr; }
  .sections-grid { grid-template-columns: 1fr; }
  .header__nav { display: none; }
}
