/* ==========================================================================
   Lilith After Dark — design tokens
   ========================================================================== */
:root {
  --bg:            #080707;   /* почти чёрный основной фон */
  --bg-alt:        #12090B;   /* тёмный бордовый */
  --wine:          #3A080D;   /* глубокий wine/red */
  --accent:        #8E1723;   /* акцентный красный */
  --gold:          #B89252;   /* приглушённое золото */

  --text:          #E5D4B0;   /* тёплый светлый текст */
  --text-muted:    #777070;   /* второстепенный текст */
  --text-dim:      #4d4747;

  --border:        rgba(229, 212, 176, 0.10);
  --border-strong: rgba(184, 146, 82, 0.32);

  --font-display: 'Cinzel', serif;
  --font-body:    'Manrope', sans-serif;

  --radius: 4px;      /* общий, для кнопок/полей */
  --radius-sm: 3px;

  --container-w: 1180px;
  --container-pad: 40px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Единая направляющая — все секции выравниваются по одному контейнеру,
   поэтому шапка, сетка и подвал остаются на одной вертикальной линии
   независимо от ширины экрана. */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 16px;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, backdrop-filter 0.2s ease;
}

/* "Получить доступ" — сначала залита цветом, при наведении становится
   полупрозрачной с размытием фона под ней */
.btn--solid {
  background: var(--accent);
  color: var(--text);
  border: 1px solid var(--accent);
}

.btn--solid:hover {
  background: rgba(142, 23, 35, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateY(-1px);
}

/* "Смотреть коллекцию" — наоборот: сначала полупрозрачная с размытием,
   при наведении заливается цветом */
.btn--glass {
  background: rgba(142, 23, 35, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  border: 1px solid var(--accent);
}

.btn--glass:hover {
  background: var(--accent);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--border-strong);
}

.btn--outline:hover {
  border-color: var(--gold);
  background: rgba(184, 146, 82, 0.08);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 84vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
  padding: 120px 0 80px;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center 22%;
  opacity: 0.28;
  filter: saturate(1.05) contrast(1.05) brightness(1.37); /* +40% к прежним 0.98 */
  -webkit-mask-image: linear-gradient(-40deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.55) 38%, rgba(0,0,0,0) 75%);
  mask-image: linear-gradient(-40deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.55) 38%, rgba(0,0,0,0) 75%);
}

/* Плавный переход нижнего края шапки в основной фон страницы —
   растушёвывает фото/глоу так, чтобы не было чёткой границы со
   следующей секцией. */
.hero__fade-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  min-height: 180px;
  background: linear-gradient(180deg, rgba(8, 7, 7, 0) 0%, var(--bg) 92%);
  pointer-events: none;
}

.hero__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(46% 60% at 82% 68%, rgba(142, 23, 35, 0.38), transparent 70%),
    radial-gradient(38% 50% at 100% 100%, rgba(58, 8, 13, 0.55), transparent 70%),
    linear-gradient(180deg, rgba(8, 7, 7, 0) 0%, rgba(8, 7, 7, 0.35) 82%, var(--bg) 100%);
  animation: flicker 10s ease-in-out infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 0.9; }
  50%      { opacity: 1; }
}

.hero__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__vertical {
  position: absolute;
  top: 50%;
  right: 34px;
  transform: translateY(-50%) rotate(90deg);
  transform-origin: center;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

.hero__vertical::before,
.hero__vertical::after {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--border-strong);
  flex-shrink: 0;
}

/* Раньше .hero__inner нёс класс .container на себе же — из-за max-width:640px
   на том же элементе, что и margin:0 auto, блок центрировался по всей ширине
   экрана, а не по направляющей грида. Теперь .container — это внешняя
   обёртка (сама направляющая), а .hero__inner — просто узкая колонка текста
   внутри неё, прижатая к её левому краю. */
.hero > .container { width: 100%; }

.hero__inner { position: relative; max-width: 640px; }

.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  letter-spacing: 0.03em;
  margin: 0 0 20px;
  line-height: 1.12;
  color: var(--text);
}

.wordmark__accent {
  display: block;
  color: var(--accent);
}

/* Логотип на месте прежней текстовой надписи — та же позиция в блоке
   и адаптивная ширина, привязанная к тем же брейкпоинтам, что и текст. */
.wordmark-logo {
  display: block;
  width: clamp(220px, 34vw, 420px);
  height: auto;
  max-width: 100%;
}

.hero__tagline {
  color: var(--gold);
  font-size: 1.02rem;
  margin: 0 0 36px;
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.hero__social {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(184, 146, 82, 0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.social-pill:hover {
  color: var(--text);
  border-color: var(--gold);
  background: rgba(184, 146, 82, 0.18);
}

/* ==========================================================================
   Section heading
   ========================================================================== */
.section-head {
  padding: 8px var(--container-pad) 0;
  margin: 0 auto;
}

/* ==========================================================================
   Content grid — bento: 1 крупная карточка + 4 поменьше
   ========================================================================== */
.grid-wrap {
  position: relative;
  padding: 24px 0 8px;
  overflow: hidden;
}

.grid-bg {
  position: absolute;
  inset: -10% -10%;
  z-index: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  will-change: transform;
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.blob--a {
  width: 46vw;
  height: 46vw;
  top: 8%;
  left: 4%;
  background: radial-gradient(circle, var(--accent), transparent 68%);
  opacity: 0.16;
  transform: translate3d(calc(var(--mx, 0) * 1px), calc(var(--my, 0) * 1px), 0);
}

.blob--b {
  width: 40vw;
  height: 40vw;
  bottom: 4%;
  right: 6%;
  background: radial-gradient(circle, var(--wine), transparent 70%);
  opacity: 0.28;
  transform: translate3d(calc(var(--mx, 0) * -1.2px), calc(var(--my, 0) * -1.2px), 0);
}

.grid-wrap > .container { position: relative; z-index: 1; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, minmax(150px, 1fr));
  gap: 20px;
}

.card--extra { display: none; }
.card--extra.is-visible { display: block; }

.card {
  border: 1px solid var(--border);
  background: var(--bg-alt);
  transition: border-color 0.25s ease;
}

.card--featured {
  grid-column: 1;
  grid-row: 1 / 3;
}

.card:hover { border-color: var(--border-strong); }

.card__media {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;      /* без скруглений */
  background: var(--bg-alt);
  cursor: pointer;
  overflow: hidden;
  text-align: left;
}

.card--featured .card__media { min-height: 460px; }

.card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.85) brightness(0.72) contrast(1.1);
  transform: scale(1.02);
  transition: filter 0.5s ease, transform 0.6s ease;
}

.card__media:hover .card__img,
.card__media:focus-visible .card__img {
  filter: grayscale(0) brightness(0.8) contrast(1.03);
  transform: scale(1.06);
}

.card__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(8,7,7,0.92) 0%, rgba(8,7,7,0.35) 42%, rgba(8,7,7,0.15) 100%),
    linear-gradient(120deg, rgba(58,8,13,0.35), transparent 60%);
}

.seal {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 7, 7, 0.55);
  border: 1px solid var(--border-strong);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  backdrop-filter: blur(3px);
}

.card__tag {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 2;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.card__text {
  position: absolute;
  left: 20px;
  right: 60px;
  bottom: 18px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card__author {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.card__title {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--text);
}

.card--featured .card__title { font-size: 1.7rem; }
.card--featured .card__text { right: 100px; bottom: 26px; left: 26px; gap: 8px; }
.card--featured .card__author { font-size: 0.78rem; }

.card__play {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(8, 7, 7, 0.4);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.card--featured .card__play {
  width: 56px;
  height: 56px;
  right: 28px;
  bottom: 30px;
}

.card__play svg { margin-left: 2px; }

.card__media:hover .card__play,
.card__media:focus-visible .card__play {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--bg);
  transform: scale(1.06);
}

/* ==========================================================================
   Показать все
   ========================================================================== */
.grid-more {
  display: flex;
  justify-content: flex-start;
  padding: 20px 0 40px;
}

.more-link {
  background: none;
  border: none;
  padding: 0 0 4px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  transition: color 0.2s ease, border-color 0.2s ease;
}

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

/* ==========================================================================
   Subscribe CTA
   ========================================================================== */
.cta {
  position: relative;
  overflow: hidden;
  background: var(--bg-alt);
  padding: 88px 0;
  margin-top: 24px;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--cta-image);
  background-size: cover;
  background-position: center 30%;
  opacity: 0.4;
  filter: saturate(1.1) contrast(1.05) brightness(1.23); /* +35% к прежним 0.91 */
}

.cta__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(8,7,7,0.95) 0%, rgba(8,7,7,0.72) 42%, rgba(58,8,13,0.55) 100%);
}

/* Верхний край секции плавно "проявляется" из фона предыдущей секции —
   без резкой границы между сеткой видео и этим блоком. */
.cta__fade-top {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 42%;
  min-height: 160px;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(8, 7, 7, 0) 100%);
  pointer-events: none;
}

.cta__inner {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.cta__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--text-muted);
  margin: 0 0 20px;
}

.cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  margin: 0 0 28px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cta__features {
  list-style: none;
  margin: 0 0 34px;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
}

.cta__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
}

.cta__features svg { color: var(--gold); flex-shrink: 0; }

.cta__hint {
  margin: 14px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border);
  padding: 26px 0;
  background: var(--bg);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 14px 36px;
}

.footer__mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--text);
}

.footer__mark span {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 2px;
}

.footer__links {
  display: flex;
  gap: 22px;
}

.footer__links a {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer__links a:hover { color: var(--gold); }

.footer__tag {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ==========================================================================
   Modal — email gate
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

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

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 2, 2, 0.82);
  backdrop-filter: blur(3px);
}

.modal__box {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: var(--bg-alt);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 32px 28px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

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

.eyebrow--modal { margin-bottom: 8px; }

.modal__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 10px;
}

.modal__hint {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0 0 22px;
}

.field-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.field-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.field-input::placeholder { color: var(--text-dim); }

.field-input:focus { border-color: var(--gold); }

.submit-btn {
  width: 100%;
  background: var(--accent);
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s ease;
}

.submit-btn:hover { background: #a51f2c; }
.submit-btn:disabled { opacity: 0.6; cursor: wait; }

.modal__status {
  margin-top: 16px;
  font-size: 0.88rem;
  min-height: 1.4em;
}

.modal__status[data-state="error"] { color: #e5837e; }
.modal__status[data-state="success"] { color: var(--gold); }
.modal__status[data-state="loading"] { color: var(--text-muted); }

.modal__status a { color: var(--gold); font-weight: 600; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  :root { --container-pad: 28px; }

  .grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

  .card--featured {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .card--featured .card__media { min-height: 320px; }
  .card__media { min-height: 200px; }
}

@media (max-width: 640px) {
  :root { --container-pad: 20px; }

  .hero { min-height: auto; padding: 96px 0 56px; }
  .hero__vertical { display: none; }

  .grid { grid-template-columns: 1fr; gap: 16px; }
  .card--featured .card__media { min-height: 280px; }
  .card__media { min-height: 220px; }

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

  .hero__actions { flex-direction: column; align-items: stretch; }
  .btn { text-align: center; }

  .footer__inner { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__glow { animation: none; }
  .blob { transition: none; }
  .card__img { transition: none; }
}
