/* ================= БАЗА ================= */
:root {
  --bg: #fdfbf7;
  --bg-cream: #f7f0e6;
  --bg-dark: #12222e;
  --accent: #3498db;
  --accent-dark: #2980b9;
  --accent-light: #eaf4fb;
  --gold: #e2a33c;
  --coral: #e76f51;
  --text: #1f2d3a;
  --text-light: #5a6b7b;
  --white: #ffffff;
  --border: #e8e2d8;
  --shadow: 0 10px 30px rgba(31, 45, 58, 0.08);
  --shadow-hover: 0 20px 44px rgba(31, 45, 58, 0.16);
  --radius: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; display: block; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ================= ДЕКОР ================= */
.deco { position: fixed; border-radius: 50%; filter: blur(80px); opacity: .35; pointer-events: none; z-index: 0; }
.deco--1 { width: 380px; height: 380px; background: #cfe6f7; top: 10%; left: -140px; animation: float1 18s ease-in-out infinite; }
.deco--2 { width: 320px; height: 320px; background: #f6dfb5; top: 45%; right: -120px; animation: float2 22s ease-in-out infinite; }
@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(30px,-30px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-30px,30px); } }

/* ================= КНОПКИ ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  border: 2px solid transparent; cursor: pointer;
  transition: all .25s ease; white-space: nowrap;
}
.btn--sm { padding: 8px 18px; font-size: 14px; }
.btn--lg { padding: 15px 34px; font-size: 16px; }
.btn--full { width: 100%; }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(52,152,219,.35); }
.btn--primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-2px); }
.btn--ghost { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #fff; }
.btn--accent { background: var(--gold); color: #1f2d3a; box-shadow: 0 8px 24px rgba(226,163,60,.4); }
.btn--accent:hover { background: #d4912a; color: #1f2d3a; transform: translateY(-2px); }
.btn--outline-light { background: transparent; border-color: rgba(255,255,255,.75); color: #fff; }
.btn--outline-light:hover { background: #fff; color: var(--accent-dark); }
.btn--white { background: #fff; color: var(--accent-dark); }
.btn--white:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.18); }

/* ================= ШАПКА ================= */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(253,251,247,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all .3s ease;
}
.header.scrolled { background: rgba(253,251,247,.97); border-bottom-color: var(--border); box-shadow: 0 4px 20px rgba(31,45,58,.06); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 74px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo__mark { color: var(--gold); font-size: 22px; }
.logo__text { font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: -.3px; }
.nav { display: flex; gap: 26px; }
.nav__link { color: var(--text-light); font-weight: 500; font-size: 15px; position: relative; padding: 4px 0; }
.nav__link::after { content: ""; position: absolute; left: 0; bottom: 0; width: 0; height: 2px; background: var(--gold); transition: width .25s ease; }
.nav__link:hover { color: var(--text); }
.nav__link:hover::after { width: 100%; }
.header__actions { display: flex; gap: 10px; }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.burger span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu { display: none; flex-direction: column; gap: 4px; padding: 12px 22px 20px; background: var(--bg); border-top: 1px solid var(--border); }
.mobile-menu.open { display: flex; }
.mobile-menu__link { padding: 12px 0; font-weight: 500; color: var(--text); border-bottom: 1px solid var(--border); }

/* ================= HERO ================= */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; padding-top: 74px; }
.hero__bg {
  position: absolute; inset: -10% 0;
  background-size: cover; background-position: center;
  will-change: transform;
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(12,24,34,.9) 0%, rgba(18,34,46,.72) 45%, rgba(18,34,46,.25) 100%);
}
.hero__glow {
  position: absolute; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(226,163,60,.35), transparent 70%);
  top: 10%; right: -120px; filter: blur(20px); z-index: 1;
  animation: glowPulse 8s ease-in-out infinite;
}
@keyframes glowPulse { 0%,100% { opacity: .5; transform: scale(1); } 50% { opacity: .9; transform: scale(1.1); } }
.hero__content { position: relative; z-index: 2; max-width: 680px; color: #fff; }
.hero__badge {
  display: inline-block; padding: 8px 18px;
  background: rgba(226,163,60,.18);
  border: 1px solid rgba(226,163,60,.5);
  color: #f4d29a; border-radius: 999px; font-size: 13px; font-weight: 600;
  letter-spacing: .4px; margin-bottom: 22px;
  animation: fadeUp .8s ease both;
}
.hero__title {
  font-family: 'Playfair Display', serif;
  font-size: 76px; line-height: 1.02; font-weight: 700;
  letter-spacing: -1.5px; margin-bottom: 20px;
  animation: fadeUp .8s .1s ease both;
}
.hero__subtitle { font-size: 20px; color: rgba(255,255,255,.85); margin-bottom: 32px; max-width: 540px; animation: fadeUp .8s .2s ease both; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; animation: fadeUp .8s .3s ease both; }
.hero__scroll {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px;
  color: rgba(255,255,255,.6); z-index: 2;
}
.hero__scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--gold), transparent); animation: scrollLine 2s ease-in-out infinite; }
@keyframes scrollLine { 0%,100% { opacity: .3; transform: scaleY(.6); } 50% { opacity: 1; transform: scaleY(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

/* ================= БЕГУЩАЯ СТРОКА ================= */
.marquee { background: var(--gold); color: #1f2d3a; overflow: hidden; padding: 14px 0; white-space: nowrap; position: relative; z-index: 2; }
.marquee__track { display: inline-flex; gap: 48px; animation: marquee 42s linear infinite; will-change: transform; }
.marquee__item { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 12px; }
.marquee__item::before { content: "✦"; opacity: .6; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ================= СЕКЦИИ ================= */
.section { padding: 100px 0; position: relative; z-index: 1; }
.section--cream { background: var(--bg-cream); }
.section--dark { background: var(--bg-dark); color: #fff; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--coral); margin-bottom: 12px; }
.eyebrow--light { color: var(--gold); }
.section__title { font-family: 'Playfair Display', serif; font-size: 44px; font-weight: 700; letter-spacing: -1px; margin-bottom: 12px; line-height: 1.15; }
.section__title--light { color: #fff; }
.section__subtitle { color: var(--text-light); font-size: 17px; max-width: 560px; }
.section__subtitle--light { color: rgba(255,255,255,.7); }

/* ================= О ПРОЕКТЕ ================= */
.about { display: grid; grid-template-columns: 1.05fr 1fr; gap: 70px; align-items: center; }
.about__desc { color: var(--text-light); font-size: 16px; margin: 18px 0 26px; max-width: 540px; }
.about__list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.about__list li { display: flex; align-items: center; gap: 14px; font-weight: 500; }
.about__icon { font-size: 22px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--accent-light); border-radius: 12px; }
.about__media { position: relative; min-height: 460px; }
.about__img-wrap { position: absolute; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-hover); }
.about__img-wrap:first-child { top: 0; left: 0; width: 68%; height: 300px; z-index: 1; }
.about__img-wrap--offset { bottom: 0; right: 0; width: 60%; height: 260px; z-index: 2; border: 6px solid var(--bg); }
.about__img { width: 100%; height: 100%; object-fit: cover; }
.about__quote-card {
  position: absolute; bottom: 40px; left: 0;
  background: var(--gold); color: #1f2d3a;
  padding: 22px 26px; border-radius: var(--radius);
  max-width: 260px; box-shadow: var(--shadow-hover); z-index: 3;
}
.about__quote-card p { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 600; line-height: 1.3; margin-bottom: 6px; }
.about__quote-card span { font-size: 13px; opacity: .8; }

/* ================= КНИГИ (одна ссылка) ================= */
.books-single {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: center;
  background: var(--white);
  border-radius: 24px;
  padding: 54px;
  box-shadow: var(--shadow);
}
.books-single__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-hover); }
.books-single__img { width: 100%; height: 100%; max-height: 380px; object-fit: cover; display: block; }
.books-single__desc { color: var(--text-light); font-size: 16px; margin: 18px 0 20px; max-width: 540px; }
.books-single__list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.books-single__list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.books-single__list span { font-size: 20px; }

/* ================= ФОРУМ ================= */
.forum-cta { display: block; }
.forum-cta__desc { color: rgba(255,255,255,.75); margin: 18px 0 28px; max-width: 560px; }
.forum-articles__head { margin: 70px 0 30px; }
.forum-articles__title { font-family: 'Playfair Display', serif; font-size: 30px; font-weight: 700; color: #fff; letter-spacing: -.5px; }
.forum-articles { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; }
.forum-article {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .35s ease, background .35s ease;
}
.forum-article:hover { transform: translateY(-8px); background: rgba(255,255,255,.1); }
.forum-article__img-link { position: relative; display: block; }
.forum-article__img { width: 100%; height: 200px; object-fit: cover; display: block; transition: transform .6s ease; }
.forum-article:hover .forum-article__img { transform: scale(1.06); }
.forum-article__cat {
  position: absolute; top: 14px; left: 14px;
  background: var(--gold); color: #1f2d3a;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
  padding: 6px 12px; border-radius: 999px;
}
.forum-article__body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.forum-article__title { font-family: 'Playfair Display', serif; font-size: 19px; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.forum-article__title a { color: #fff; }
.forum-article__title a:hover { color: var(--gold); }
.forum-article__desc { color: rgba(255,255,255,.65); font-size: 14px; flex: 1; margin-bottom: 16px; }
.forum-article__link { font-weight: 600; font-size: 14px; color: var(--gold); margin-top: auto; }
.forum-article__link:hover { color: #f4d29a; }
.forum-articles__more { text-align: center; margin-top: 40px; }

/* ================= CTA ================= */
.cta { background-size: cover; background-position: center; color: #fff; padding: 100px 0; position: relative; }
.cta__inner { text-align: center; max-width: 740px; margin: 0 auto; }
.cta__title { font-family: 'Playfair Display', serif; font-size: 46px; font-weight: 700; letter-spacing: -1px; margin-bottom: 14px; }
.cta__subtitle { font-size: 18px; opacity: .9; margin-bottom: 34px; }
.cta__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ================= ПОДВАЛ ================= */
.footer { background: var(--bg-dark); color: rgba(255,255,255,.7); padding: 42px 0; position: relative; z-index: 1; }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer__brand { display: flex; flex-direction: column; gap: 6px; }
.footer__brand .logo__text { color: #fff; }
.footer__copy { font-size: 13px; }
.footer__nav { display: flex; gap: 24px; font-size: 14px; }
.footer__nav a { color: rgba(255,255,255,.7); }
.footer__nav a:hover { color: var(--gold); }
.footer__login { font-size: 12px; color: rgba(255,255,255,.3); letter-spacing: .5px; }
.footer__login:hover { color: var(--gold); }

/* ================= МОДАЛКИ ================= */
.modal, .admin { position: fixed; inset: 0; display: none; z-index: 1200; }
.modal.is-open, .admin.is-open { display: block; }
.modal__overlay, .admin__overlay { position: absolute; inset: 0; background: rgba(18,34,46,.55); backdrop-filter: blur(4px); }
.modal__window, .admin__window {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(440px, 92vw); background: #fff;
  border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0,0,0,.3);
  overflow: hidden; animation: modalIn .25s ease;
}
.admin__window { width: min(780px, 94vw); max-height: 88vh; display: flex; flex-direction: column; }
@keyframes modalIn { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
.modal__header, .admin__header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal__header h3, .admin__header h3 { font-size: 18px; }
.modal__close, .admin__close { background: none; border: none; font-size: 26px; cursor: pointer; color: var(--text-light); line-height: 1; }
.modal__close:hover, .admin__close:hover { color: var(--text); }
.modal__body { padding: 24px; }
.admin__body { padding: 24px; overflow-y: auto; flex: 1; }
.admin__footer { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--border); }

.login-form .admin-field { margin-bottom: 18px; }
.login-error { color: #e74c3c; font-size: 14px; margin-bottom: 12px; min-height: 20px; }

.admin-field { margin-bottom: 18px; }
.admin-field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-light); }
.admin-field input, .admin-field textarea {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  font-family: inherit; font-size: 14px; background: var(--bg-cream);
  transition: border-color .2s ease;
}
.admin-field input:focus, .admin-field textarea:focus { outline: none; border-color: var(--accent); }
.admin-field textarea { min-height: 70px; resize: vertical; }
.admin h4 { margin: 22px 0 12px; font-size: 15px; color: var(--coral); border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.admin h4:first-child { margin-top: 0; }

/* ================= REVEAL ================= */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ================= АДАПТИВ ================= */
@media (max-width: 992px) {
  .about { grid-template-columns: 1fr; gap: 40px; }
  .about__media { min-height: 380px; max-width: 560px; }
  .hero__title { font-size: 54px; }
  .section__title { font-size: 34px; }
  .cta__title { font-size: 34px; }
  .books-single { grid-template-columns: 1fr; padding: 36px; gap: 30px; }
}
@media (max-width: 768px) {
  .nav, .header__actions { display: none; }
  .burger { display: flex; }
  .hero { min-height: 92vh; }
  .hero__title { font-size: 42px; }
  .hero__subtitle { font-size: 17px; }
  .section { padding: 70px 0; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
  .about__media { min-height: 340px; }
}
@media (max-width: 480px) {
  .hero__title { font-size: 34px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .cta__actions { flex-direction: column; }
  .about__media { min-height: 420px; }
  .about__img-wrap:first-child { width: 78%; height: 240px; }
  .about__img-wrap--offset { width: 70%; height: 220px; }
}