/* ==========================================================================
   ДИЗАЙН-КОНЦЕПЦИЯ И ПРАВИЛА СТИЛЯ (DESIGN GUIDELINES)
   
   СТРОГИЕ ОГРАНИЧЕНИЯ:
   - ЗАПРЕЩЁН Glassmorphism: никаких backdrop-filter blur, размытых полупрозрачных
     стеклянных плашек, имитации матового стекла.
   - ЗАПРЕЩЕНЫ неоновые эффекты: никаких светящихся теней (box-shadow glow),
     неоновых подсветок текста (text-shadow glow), кислотных оттенков.
   - ЗАПРЕЩЕНА визуальная перегруженность и китч.

   РАЗРЕШЁННЫЙ СТИЛЬ:
   - Чистая, теплая, журнальная (editorial) эстетика.
   - Натуральная палитра (теплый лен/молочный фон, мягкий графит для текста,
     приглушенные теплые терракотовые / пудровые акценты).
   - Четкие сплошные формы, деликатные тонкие границы (solid borders),
     аккуратная типографика с хорошим интервалом.
   ========================================================================== */

:root {
  /* Цветовая палитра: теплые, спокойные, естественные тона */
  --bg-primary: #FAF8F5;          /* Теплый молочно-льняной фон */
  --bg-card: #FFFFFF;             /* Чистый непрозрачный белый для карточек (без прозрачностей!) */
  --bg-muted: #F3EFEA;            /* Легкий бежевый акцент для плашек */
  
  --text-main: #2C2825;           /* Мягкий графитовый для чтения */
  --text-muted: #7E7771;          /* Спокойный серый для второстепенных подписей */
  --accent: #F9446A;              /* Фирменный клубничный роговой акцент (aespa style) */
  --accent-dark: #D82D52;
  --border-color: #E7E0D8;        /* Тонкие, строгие разделители */

  /* Токены редакционного постера */
  --poster-bg: #EAE7E1;           /* Теплая журнальная бумага */
  --poster-ink: #141414;          /* Глубокий типографский черный */
  --poster-pink: #F9446A;         /* Яркий клубничный роговый из референса */
  --poster-pink-dark: #D82D52;
  --poster-white: #FFFFFF;
  --poster-cream: #F4F1EB;

  /* Типографика */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Unbounded', 'Syne', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Grotesk', -apple-system, monospace;

  /* Простые физические тени без свечений */
  --shadow-subtle: 0 2px 8px rgba(44, 40, 37, 0.05);
}

/* Сброс базовых стилей */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  padding: 40px 20px;
  min-height: 100vh;
}

.page-container {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* ==========================================================================
   РЕДАКЦИОННЫЙ ПОСТЕР (K-POP / AESPA EDITORIAL COVER)
   ========================================================================== */
.poster-hero-section {
  width: 100%;
}

.poster-card {
  position: relative;
  background-color: var(--poster-bg);
  border: 2px solid var(--poster-ink);
  border-radius: 4px;
  padding: 30px 26px 22px;
  box-shadow: 0 4px 16px rgba(20, 20, 20, 0.08);
}

/* Угловые типографские крестики кадрирования */
.crop-mark {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--poster-ink);
  line-height: 1;
  user-select: none;
  opacity: 0.65;
}
.crop-mark.top-left { top: 8px; left: 10px; }
.crop-mark.top-right { top: 8px; right: 10px; }
.crop-mark.bottom-left { bottom: 8px; left: 10px; }
.crop-mark.bottom-right { bottom: 8px; right: 10px; }

/* Верхняя служебная плашка постера */
.poster-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--poster-ink);
  padding-bottom: 12px;
  margin-bottom: 18px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--poster-ink);
}

.meta-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.meta-tag {
  background: var(--poster-ink);
  color: #FFFFFF;
  padding: 3px 8px;
  border-radius: 2px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}
.meta-date {
  color: var(--text-muted);
}

.meta-center {
  display: block;
}
.meta-badge {
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--poster-pink);
}

.meta-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.barcode-graphic {
  letter-spacing: 0.2em;
  font-weight: 900;
  opacity: 0.7;
}
.meta-code {
  color: var(--text-muted);
}

/* Главный заголовок постера */
.poster-headline-wrap {
  margin-bottom: 18px;
}

.poster-main-title {
  font-family: var(--font-display);
  font-size: clamp(3.8rem, 11vw, 7.8rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: -0.05em;
  color: var(--poster-ink);
  text-transform: uppercase;
  margin: 0;
}

.poster-sub-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 0 2px;
}

.poster-kicker {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(0.95rem, 2.5vw, 1.25rem);
  color: var(--poster-pink);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.poster-edition {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Сцена постера (контейнер сетки и вырезанной фигуры) */
.poster-stage {
  position: relative;
  width: 100%;
  height: 520px;
  border: 2px solid var(--poster-ink);
  border-radius: 3px;
  overflow: hidden;
  background-color: #E2DFD9;
}

/* Сетка блоков с белыми просветами (чистые 6px белые gutters) */
.poster-grid-bg {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.3fr 1fr;
  grid-template-rows: 155px 175px 166px;
  gap: 6px;
  background-color: #FFFFFF;
  padding: 6px;
  height: 100%;
}

.grid-block {
  position: relative;
  overflow: hidden;
}

/* Блок 1: Розовая геометрическая плашка со счетчиком */
.block-pink-stat {
  grid-column: 1 / 3;
  grid-row: 1 / 2;
  background-color: var(--poster-pink);
  color: #FFFFFF;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stat-sup {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  opacity: 0.9;
}
.stat-number {
  font-family: var(--font-display);
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.stat-mini-stamp {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  opacity: 0.85;
}

/* Блок 2: Вертикальный фото-портрет */
.block-photo-portrait {
  grid-column: 3 / 5;
  grid-row: 1 / 3;
  background-color: #D5D1C8;
}
.block-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-caption {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background-color: var(--poster-ink);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 3px 6px;
  border-radius: 2px;
}

/* Блок-подложка по центру (ярко-розовый) */
.block-pink-mid {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
  background-color: var(--poster-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.mid-stamp-text {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 0.08em;
  text-align: center;
  line-height: 1.2;
  opacity: 0.95;
}

/* Блок 3: Розовая плашка с цитатой */
.block-pink-quote {
  grid-column: 1 / 2;
  grid-row: 2 / 4;
  background-color: var(--poster-pink-dark);
  color: #FFFFFF;
  padding: 18px 14px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.quote-content {
  display: flex;
  flex-direction: column;
}
.quote-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.22rem;
  line-height: 1.32;
  font-weight: 600;
  margin-bottom: 8px;
}
.quote-author {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  opacity: 0.9;
}
.quote-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  opacity: 0.7;
}

/* Блок 4: Горизонтальный кроп глаз */
.block-photo-eyes {
  grid-column: 2 / 4;
  grid-row: 3 / 4;
  background-color: #D5D1C8;
}

/* Блок 5: Розовая акцентная плашка */
.block-pink-accent {
  grid-column: 4 / 5;
  grid-row: 3 / 4;
  background-color: var(--poster-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
}
.accent-tag {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  color: #FFFFFF;
  text-align: center;
  line-height: 1.28;
}

/* Передний план: вырезанная фигура Лены */
.poster-cutout-wrap {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  width: 88%;
  max-width: 680px;
  z-index: 4;
  pointer-events: none;
}
.poster-cutout-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 16px 20px rgba(20, 20, 20, 0.4)) drop-shadow(0 4px 6px rgba(20, 20, 20, 0.2));
}

/* Нижняя служебная плашка постера */
.poster-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2px solid var(--poster-ink);
  padding-top: 12px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--poster-ink);
  text-transform: uppercase;
}
.footer-note {
  color: var(--poster-ink);
}
.footer-coords {
  color: var(--text-muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}
.footer-signature {
  color: var(--poster-pink);
}

/* Адаптивность постера */
@media (max-width: 768px) {
  .poster-card {
    padding: 24px 16px 18px;
  }
  .poster-main-title {
    font-size: clamp(2.8rem, 14vw, 4.5rem);
  }
  .poster-meta-bar {
    font-size: 0.65rem;
  }
  .poster-stage {
    height: 440px;
  }
  .poster-grid-bg {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 130px 140px 140px;
  }
  .block-pink-stat {
    grid-column: 1 / 3;
    grid-row: 1 / 2;
  }
  .block-photo-portrait {
    grid-column: 2 / 3;
    grid-row: 2 / 4;
  }
  .block-pink-quote {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
  }
  .block-photo-eyes {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
  }
  .block-pink-accent {
    display: none;
  }
  .poster-cutout-wrap {
    width: 95%;
  }
  .poster-footer-bar {
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    font-size: 0.65rem;
  }
}

/* Секция счетчика времени */
.counter-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px 24px;
  box-shadow: var(--shadow-subtle);
  text-align: center;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 20px;
}

.counter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.counter-card {
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.counter-number {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.counter-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: lowercase;
}

.counter-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-serif);
}

/* ==========================================================================
   БЛОК: СЛЕДУЮЩЕЕ ФОТО ИЗ ЗАГСА
   ========================================================================== */
.future-section {
  width: 100%;
}

.future-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
  text-align: center;
}

.future-image-wrap {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--bg-muted);
  border: 1px solid var(--border-color);
}

.future-img {
  width: 100%;
  height: auto;
  max-height: 680px;
  object-fit: cover;
  display: block;
}

.future-caption {
  padding-top: 20px;
}

.future-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

/* ==========================================================================
   ГАЛЕРЕЯ ФОТОГРАФИЙ
   ========================================================================== */
.gallery-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px 24px;
  box-shadow: var(--shadow-subtle);
}

.gallery-header {
  text-align: center;
  margin-bottom: 24px;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Кнопки фильтрации */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.filter-btn {
  background: var(--bg-muted);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-btn:hover {
  background: #EAE4DC;
  border-color: #D6CCC0;
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #FFFFFF;
}

.filter-count {
  font-size: 0.75rem;
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}

/* Сетка фотографий (Masonry-подобная адаптивная сетка) */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Карточка фотографии */
.photo-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.photo-card:hover {
  transform: translateY(-3px);
  border-color: #CFC5B8;
  box-shadow: 0 4px 12px rgba(44, 40, 37, 0.08);
}

.photo-card:focus-visible {
  border-color: var(--accent);
}

.photo-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-muted);
  overflow: hidden;
}

.photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.photo-card:hover .photo-img {
  transform: scale(1.03);
}

.photo-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #FFFFFF;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
}

.photo-info {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.photo-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
}

.photo-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==========================================================================
   LIGHTBOX (МОДАЛЬНОЕ ОКНО ПРОСМОТРА)
   Без backdrop blur и без свечений (строгий solid dark)
   ========================================================================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.is-open {
  display: flex;
}

/* Сплошной глубокий темный оверлей БЕЗ блюра */
.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #171513;
  opacity: 0.94;
}

.lightbox-content {
  position: relative;
  z-index: 1001;
  max-width: 90vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-image-wrap {
  max-width: 820px;
  max-height: 70vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #332F2B;
}

.lightbox-caption {
  text-align: center;
  color: #EDE8E1;
  margin-top: 14px;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.lightbox-category {
  font-size: 0.75rem;
  color: #CBB9A7;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.lightbox-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: #FFFFFF;
}

.lightbox-desc {
  font-size: 0.9rem;
  color: #B5ACA2;
  line-height: 1.4;
}

.lightbox-counter {
  font-size: 0.75rem;
  color: #8C847B;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* Кнопки управления в Lightbox */
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: #25221F;
  border: 1px solid #3D3833;
  color: #FFFFFF;
  font-size: 2rem;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 1002;
}

.lightbox-close:hover {
  background: #38332E;
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: #25221F;
  border: 1px solid #3D3833;
  color: #FFFFFF;
  font-size: 2.2rem;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  z-index: 1002;
}

.lightbox-nav:hover {
  background: #38332E;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

/* Каркасные блоки для будущего контента */
.content-block {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px 24px;
  box-shadow: var(--shadow-subtle);
}

.block-header {
  margin-bottom: 14px;
}

.block-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-muted);
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.placeholder-content {
  padding: 20px;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  background: #FCFBF9;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Подвал */
.page-footer {
  text-align: center;
  padding: 30px 0 20px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--accent);
  border-top: 1px solid var(--border-color);
}

/* Адаптивность для планшетов и мобильных устройств */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}

@media (max-width: 600px) {
  body {
    padding: 24px 14px;
  }

  .page-container {
    gap: 28px;
  }

  .hero-title {
    font-size: 2.3rem;
  }

  .counter-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .counter-number {
    font-size: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-filters {
    gap: 6px;
  }

  .filter-btn {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 1.6rem;
  }
}
