@charset "UTF-8";

/* ==========================================================================
   УКРАЇНСЬКА МІСТИКА
   Aesthetic: Occult Luxury — forbidden manuscript room at midnight
   ========================================================================== */

:root {
  --void: #0a0806;
  --surface: #110f0b;
  --surface-up: #18150f;
  --edge: #2a2218;
  --parchment: #e8dfd0;
  --parchment-dim: #b8ad9c;
  --ash: #7a7068;
  --gold: #c4a35a;
  --gold-faint: rgba(196, 163, 90, 0.12);
  --blood: #8b1a1a;
  --blood-bright: #b22a2a;
  --blood-glow: rgba(139, 26, 26, 0.35);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--parchment);
  font-family: 'Spectral', 'Georgia', serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* Full-page radial vignette — darker edges, slightly warmer center */
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(20, 16, 10, 0.6) 0%, var(--void) 100%);
  background-attachment: fixed;
}

/* ===== HEADER ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 25vh;
  min-height: 120px;
  max-height: 280px;
  padding: 16px 10%;
}

.header-img {
  display: block;
  max-width: 80%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ===== BOOKS ===== */
.books-section {
  max-width: 1000px;
  margin: 64px auto;
  padding: 0 40px;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px;
}

/* --- Book Item --- */
.book-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Cover — the hero. Deep shadow, 3D tilt on hover */
.book-cover {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
  perspective: 800px;
}

.book-cover img {
  max-height: 340px;
  max-width: 100%;
  object-fit: contain;
  border: 1px solid rgba(42, 34, 24, 0.6);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.4),
    0 12px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1),
              box-shadow 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  transform-origin: center center;
}

.book-cover img:hover {
  transform: rotateY(-5deg) scale(1.02);
  box-shadow:
    6px 6px 16px rgba(0, 0, 0, 0.5),
    12px 24px 56px rgba(0, 0, 0, 0.4),
    -2px 0 40px var(--blood-glow);
}

/* Title — refined italic */
.book-title {
  font-family: 'Spectral', serif;
  font-size: 20px;
  color: var(--parchment);
  font-weight: 600;
  font-style: italic;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

/* Description */
.book-desc {
  font-size: 15px;
  color: var(--ash);
  line-height: 1.7;
  margin-bottom: 18px;
  max-width: 260px;
  flex-grow: 1;
  margin-left: auto;
  margin-right: auto;
}

/* Price */
.book-price {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.03em;
}
.book-price span {
  font-size: 14px;
  color: var(--ash);
  font-weight: 400;
  margin-left: 3px;
}

/* Button — outlined, transforms to filled on hover */
.btn-order {
  display: inline-block;
  padding: 11px 36px;
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(196, 163, 90, 0.3);
  font-family: 'Spectral', serif;
  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: color 0.4s ease, border-color 0.4s ease;
}

/* Fill sweep from left */
.btn-order::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--blood);
  transition: width 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: -1;
}

.btn-order:hover {
  color: var(--parchment);
  border-color: var(--blood);
}
.btn-order:hover::before {
  width: 100%;
}

/* ===== SECTION DIVIDER ===== */
.section-divider {
  text-align: center;
  padding: 48px 0;
}
.section-divider span {
  font-size: 16px;
  letter-spacing: 12px;
  color: var(--ash);
  opacity: 0.4;
}

/* ===== ABOUT ===== */
.about-section {
  max-width: 640px;
  margin: 0 auto 64px;
  padding: 0 32px;
  text-align: center;
}

.about-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  color: var(--gold);
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 20px;
  font-weight: 700;
}

.about-text {
  font-size: 17px;
  line-height: 1.9;
  color: var(--parchment-dim);
  font-style: italic;
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  padding: 36px 32px;
  font-size: 14px;
  color: var(--ash);
}
.footer::before {
  content: '';
  display: block;
  width: 80px;
  height: 1px;
  background: var(--gold-faint);
  margin: 0 auto 24px;
}
.footer .fop {
  margin-top: 6px;
}

/* ===== SOCIAL LINKS ===== */
.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 20px;
}

.social-link {
  font-family: 'Playfair Display', serif;
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--ash);
  text-decoration: none;
  padding: 4px 18px;
  transition: color 0.3s ease;
  position: relative;
}

.social-link + .social-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 12px;
  background: var(--edge);
}

.social-link:hover {
  color: var(--gold);
}

/* ===== SCROLL-TRIGGERED REVEALS ===== */
/* Elements start visible — JS adds .reveal class for intersection observer */
.book-item,
.about-section {
  opacity: 1; /* no animation by default — content is always accessible */
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .books-grid { grid-template-columns: repeat(2, 1fr); gap: 48px; }
  .books-section { max-width: 660px; }
  .header { padding: 12px 5%; }
}

@media (max-width: 600px) {
  .header { padding: 12px 5%; height: 20vh; }

  .books-grid { grid-template-columns: 1fr; gap: 56px; max-width: 280px; margin: 0 auto; }
  .books-section { padding: 0 24px; margin: 48px auto; }
  .book-cover img { max-height: 280px; }
  .book-desc { max-width: 100%; }

  .about-section { padding: 0 24px; }
  .about-section h2 { font-size: 20px; letter-spacing: 3px; }

  .section-divider { padding: 36px 0; }
}
