/* ==========================================================================
   global.css — базовый слой дизайна (общий для всех страниц)
   Дополняет Tailwind CDN: токены, типографика, кнопки, glass-шапка,
   reveal-анимации, bento-сетка. Палитра/шрифты/скругления заданы в
   tailwind.config внутри base.html.
   ========================================================================== */

:root {
  --maxw: 1280px;
  --glass: rgba(251, 248, 240, 0.65);
  --glass-border: rgba(255, 255, 255, 0.4);
  --soft-shadow: 0 10px 40px -15px rgba(30, 42, 35, 0.12);
  --deep-shadow: 0 20px 80px -30px rgba(30, 42, 35, 0.2);
}

body {
  font-family: 'Onest', sans-serif;
  color: #23302A;
  background: #FBF8F0;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Spectral', serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #B5793F;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::after { content: ""; width: 40px; height: 1px; background: currentColor; opacity: 0.4; }

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 1rem 2rem;
  border-radius: 999px;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.btn-primary {
  background: #BE5A35;
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(190, 90, 53, 0.4);
}
.btn-primary:hover {
  background: #A14826;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -8px rgba(190, 90, 53, 0.5);
}
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(30, 42, 35, 0.2);
  color: #1E2A23;
}
.btn-ghost:hover {
  background: #1E2A23;
  color: #F2ECDF;
  border-color: #1E2A23;
}

/* Glassmorphism Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--glass-border);
}

/* Reveal Animation */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.9s cubic-bezier(0.2, 1, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Custom bento grid */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 16px;
}
.bento-item { border-radius: 24px; overflow: hidden; position: relative; }
.bento-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.bento-item:hover img { transform: scale(1.05); }

@media (max-width: 768px) {
  .wrap { padding: 0 20px; }
  .bento { grid-template-columns: repeat(4, 1fr); }
}

/* Lightbox (просмотр фото по клику) */
.lb-item { cursor: pointer; }
.lb-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 24px; background: rgba(30, 42, 35, 0.92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.lb-overlay.open { display: flex; }
.lb-figure {
  margin: 0; max-width: min(1100px, 92vw); max-height: 88vh;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.lb-img {
  max-width: 100%; max-height: 82vh; object-fit: contain;
  border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6); background: #000;
}
.lb-cap { color: var(--birch); font-size: 0.95rem; font-weight: 500; text-align: center; }
.lb-close, .lb-nav {
  position: absolute; border: none; border-radius: 999px;
  background: rgba(251, 248, 240, 0.12); color: var(--birch);
  line-height: 1; cursor: pointer; transition: background 0.2s ease;
}
.lb-close:hover, .lb-nav:hover { background: rgba(251, 248, 240, 0.24); }
.lb-close { top: 20px; right: 24px; width: 48px; height: 48px; font-size: 1.8rem; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2rem; }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
@media (max-width: 680px) {
  .lb-nav { width: 42px; height: 42px; font-size: 1.6rem; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

/* Оформление HTML из редактора (описания, текстовые страницы) */
.rich h2 { font-family: 'Spectral', serif; font-weight: 400; color: var(--pine); font-size: 1.6rem; line-height: 1.2; margin: 1.6em 0 .6em; }
.rich h3 { font-family: 'Spectral', serif; font-weight: 400; color: var(--pine); font-size: 1.3rem; margin: 1.4em 0 .5em; }
.rich p { margin: 0 0 1em; }
.rich ul, .rich ol { padding-left: 1.4em; margin: 0 0 1em; display: flex; flex-direction: column; gap: .4em; }
.rich ul { list-style: disc; }
.rich ol { list-style: decimal; }
.rich a { color: var(--wood); text-decoration: underline; text-underline-offset: 3px; }
.rich blockquote { border-left: 3px solid var(--wood-soft); padding-left: 1em; color: var(--ink-soft); font-style: italic; margin: 0 0 1em; }
.rich em { font-style: italic; }
.rich strong { font-weight: 600; color: var(--pine); }
.rich > :first-child { margin-top: 0; }
