/* ============================================================
   ОТРАЖЕНИЯ — neo-medieval, тёмная палитра
   Структура и приёмы — по DESIGN.md (линии вместо теней, кресты «+»,
   готическая архитектура фоном), но зелёный canvas заменён на тёмный.
   ============================================================ */

:root {
  /* Colors */
  --ink:       #0a0b0b;   /* canvas — подобран по глубоким теням воды */
  --ink-2:     #101416;
  --stroke:    #6f797e;   /* декоративная линия (бывш. Cedar) */
  --parchment: #f2efe6;   /* основной текст */
  --tan:       #9d9789;   /* метаданные */

  /* Type */
  --display: 'Oswald', 'Arial Narrow', system-ui, sans-serif;   /* под логотип */
  --serif:   'Cormorant Garamond', Georgia, serif;              /* текст */

  --text-caption:   13px;
  --text-body-sm:   15px;
  --text-body:      19px;
  --text-heading-sm:21px;

  /* Spacing */
  --s-4: 4px;  --s-11: 11px; --s-13: 13px; --s-18: 18px;
  --s-22: 22px; --s-26: 26px; --s-32: 32px; --s-51: 51px;
  --s-64: 64px; --s-102: 102px; --s-138: 138px;

  --section-gap: var(--s-51);
  --radius: 4.8px;
  --edge: clamp(22px, 5vw, 51px);
}

/* ───────────────────────── base ───────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--ink);
  color: var(--parchment);
  font-family: var(--serif);
  font-weight: 300;
  font-size: var(--text-body);
  line-height: 1.5;
  letter-spacing: .004em;
  -webkit-font-smoothing: antialiased;
  /* clip, а не hidden: hidden создаёт скролл-контейнер и ломает position: sticky у меню */
  overflow-x: clip;
}

/* height: auto обязателен рядом с атрибутами width/height у картинок —
   иначе браузер примет высоту из атрибута буквально и растянет изображение */
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 var(--s-22); }
h1, h2, h3 { font-weight: 300; margin: 0; }
a { color: var(--parchment); }
::selection { background: var(--stroke); color: var(--ink); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 100;
  opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ───────────────────────── reveal ───────────────────────── */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ───────────────────────── nav ───────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(18px, 4vw, 51px);
  padding: var(--s-13) var(--edge);
  border-top: 1px solid rgba(242,239,230,.85);
  border-bottom: 1px solid rgba(242,239,230,.85);
  background: var(--ink);
  transition: background .45s ease, border-color .45s ease, backdrop-filter .45s ease;
}

/* как только страницу тронули — меню становится полупрозрачным */
.nav.is-scrolled {
  background: rgba(10,11,11,.45);
  border-top-color: rgba(242,239,230,.28);
  border-bottom-color: rgba(242,239,230,.32);
  -webkit-backdrop-filter: blur(12px) saturate(.9);
          backdrop-filter: blur(12px) saturate(.9);
}
.nav.is-scrolled a { opacity: .72; }
.nav.is-scrolled a:hover, .nav.is-scrolled a.is-current { opacity: 1; }

@media (prefers-reduced-motion: reduce) { .nav { transition: none; } }

.nav a {
  display: inline-flex; align-items: center; gap: var(--s-11);
  font-family: var(--display);
  font-weight: 300;
  font-size: 14px;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: .82; transition: opacity .3s ease;
}
.nav a:hover, .nav a.is-current { opacity: 1; }
.nav a:hover .chip { background: rgba(242,239,230,.12); }
.nav a.is-current .chip { background: rgba(242,239,230,.16); }

.chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 5px;
  border: 1px solid rgba(242,239,230,.75); border-radius: var(--radius);
  font-family: var(--display);
  font-size: 11px; font-weight: 400; line-height: 1; letter-spacing: 0;
  transition: background .3s ease;
}

/* ───────────────────────── hero ───────────────────────── */

.hero {
  position: relative;
  padding: clamp(72px, 15vh, 150px) var(--edge) clamp(150px, 26vh, 260px);
  overflow: hidden;
  isolation: isolate;
}

/* вода на всю ширину экрана: плотная у логотипа, к низу тает в --ink */
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background: url('assets/bg-hero.jpg') center center / cover no-repeat;
  opacity: .95;
  filter: grayscale(.55) contrast(1.12) brightness(1.04);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 34%, rgba(0,0,0,.55) 62%, rgba(0,0,0,.18) 82%, transparent 97%);
          mask-image: linear-gradient(180deg, #000 0%, #000 34%, rgba(0,0,0,.55) 62%, rgba(0,0,0,.18) 82%, transparent 97%);
}

/* мягкая виньетка по бокам, чтобы вода не обрывалась о края */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(ellipse 88% 82% at 50% 34%, transparent 42%, rgba(10,11,11,.75) 100%);
}

.arches {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: -1;
  width: 100%; height: clamp(220px, 38vh, 420px);
  color: var(--stroke); opacity: .15;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--s-26);
  max-width: 1400px; margin: 0 auto;
  text-align: center;
}

.wordmark { grid-column: 2; line-height: 0; }
.wordmark img {
  width: clamp(260px, 46vw, 660px);
  opacity: .96;
}

.hero-side {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(12px, 1.35vw, 17px);
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--parchment);
  /* лёгкая подложка — иначе подписи тонут в фактуре воды */
  text-shadow: 0 1px 10px rgba(10,11,11,.9), 0 0 26px rgba(10,11,11,.75);
  margin: 0;
}
.hero-side--l { grid-column: 1; text-align: right; padding-right: clamp(12px, 3vw, 51px); }
.hero-side--r { grid-column: 3; text-align: left;  padding-left:  clamp(12px, 3vw, 51px); }

@media (max-width: 780px) {
  .hero-inner { grid-template-columns: 1fr; }
  .wordmark { grid-column: 1; }
  .hero-side--l, .hero-side--r { grid-column: 1; text-align: center; padding: 0; }
  .hero-side--l { order: -1; margin-bottom: var(--s-22); }
  .hero-side--r { margin-top: var(--s-22); }
}

/* ───── шапка внутренней страницы ───── */

.page-head {
  text-align: center;
  padding: clamp(51px, 9vh, 102px) var(--edge) 0;
}
.page-logo { display: inline-block; }
.page-logo img { width: clamp(180px, 26vw, 300px); opacity: .9; margin: 0 auto var(--s-51); }

.page-title {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(32px, 6vw, 64px);
  letter-spacing: .2em;
  text-transform: uppercase;
}
.page-sub {
  font-family: var(--display);
  font-weight: 200;
  font-size: var(--text-caption);
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--tan);
  margin-top: var(--s-18);
}

/* ───────────────────────── divider rule ───────────────────────── */

.rule {
  position: relative;
  display: flex; align-items: center; gap: var(--s-18);
  padding: 0 var(--edge);
  margin: var(--s-102) 0 var(--section-gap);
  scroll-margin-top: 70px;
}
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: rgba(242,239,230,.8); }

.rule-label {
  font-family: var(--display);
  font-weight: 300;
  font-style: normal;
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
  white-space: nowrap;
}

.x { font-size: 15px; line-height: 1; color: var(--parchment); transform: translateY(-1px); }

/* ───────────────────────── sections ───────────────────────── */

.section { padding: 0 var(--edge) var(--s-102); }

.prose { max-width: 1100px; margin: 0 auto; }

.lede {
  font-size: clamp(20px, 2.1vw, 27px);
  line-height: 1.4;
  max-width: 40ch;
  margin: 0 auto var(--s-64);
  text-align: center;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s-51) var(--s-64);
}

.h-sm {
  font-family: var(--display);
  font-weight: 300;
  font-size: 15px;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: var(--s-22);
  padding-bottom: var(--s-11);
  border-bottom: 1px solid rgba(242,239,230,.26);
}

.two-col p { font-size: 17px; line-height: 1.65; }

/* ───────────────────────── releases ───────────────────────── */

.releases {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: var(--s-51) var(--s-26);
  max-width: 1400px; margin: 0 auto;
}

.release { text-align: center; display: flex; flex-direction: column; }

.cover {
  display: block; position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(242,239,230,.28);
  overflow: hidden;
  margin-bottom: var(--s-26);
}
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s ease, filter 1.2s ease; }
a.cover:hover img { transform: scale(1.04); filter: brightness(1.12); }
a.cover:focus-visible { outline: 1px solid var(--parchment); outline-offset: 3px; }

.cover--empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s-18);
  color: var(--stroke);
  border-style: dashed;
}
.cover--empty svg { width: 44%; opacity: .85; }
.cover--empty em {
  font-family: var(--display); font-weight: 200; font-style: normal;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--tan); line-height: 1.8;
}

.rel-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: 27px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: var(--s-13);
}

.meta {
  font-family: var(--display);
  font-weight: 200;
  font-size: 13px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--tan);
  margin: 0 0 var(--s-22);
}

.rel-text { font-size: 18px; line-height: 1.62; text-align: left; margin-bottom: var(--s-26); }

/* иконки сервисов */
.services {
  list-style: none; margin: auto 0 0; padding: var(--s-18) 0 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 9px;
  border-top: 1px solid rgba(242,239,230,.16);
}
.services a {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  color: var(--tan);
  border: 1px solid rgba(242,239,230,.18);
  border-radius: var(--radius);
  transition: color .3s ease, border-color .3s ease, background .3s ease, transform .3s ease;
}
.services a:hover {
  color: var(--parchment);
  border-color: rgba(242,239,230,.55);
  background: rgba(242,239,230,.07);
  transform: translateY(-2px);
}
.services svg { width: 26px; height: 26px; display: block; }
.services a:focus-visible { outline: 1px solid var(--parchment); outline-offset: 3px; }

/* ───────────────────────── buttons / links ───────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: var(--s-11);
  padding: var(--s-13) var(--s-26);
  border: 1px solid rgba(242,239,230,.8); border-radius: var(--radius);
  font-family: var(--display); font-weight: 300;
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: none;
  transition: background .35s ease;
}
.btn:hover { background: rgba(242,239,230,.09); }

.link { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }

/* ───────────────────────── видео ───────────────────────── */

.section--water { position: relative; isolation: isolate; }

/* вода на всю ширину, как в шапке: плотная в середине, к краям тает в --ink */
.section--water::before {
  content: ""; position: absolute; inset: -90px 0 -40px; z-index: -2;
  background: url('assets/bg-hero.jpg') center center / cover no-repeat;
  opacity: .95;
  filter: grayscale(.55) contrast(1.12) brightness(1.04);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.5) 16%, #000 38%, #000 62%, rgba(0,0,0,.45) 84%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.5) 16%, #000 38%, #000 62%, rgba(0,0,0,.45) 84%, transparent 100%);
}

/* та же боковая виньетка, что и в шапке */
.section--water::after {
  content: ""; position: absolute; inset: -90px 0 -40px; z-index: -2; pointer-events: none;
  background: radial-gradient(ellipse 88% 86% at 50% 50%, transparent 40%, rgba(10,11,11,.78) 100%);
}

.video-teaser, .videos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--s-51) var(--s-32);
  max-width: 1300px; margin: 0 auto;
}

.vt-item { text-decoration: none; display: block; }

.vt-thumb, .v-thumb {
  display: block; position: relative;
  width: 100%; aspect-ratio: 16 / 9;
  border: 1px solid rgba(242,239,230,.24);
  overflow: hidden;
  margin-bottom: var(--s-22);
  padding: 0; background: none; cursor: pointer;
}
.vt-thumb img, .v-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.5) brightness(.82);
  transition: transform 1.1s ease, filter .8s ease;
}
.vt-item:hover .vt-thumb img, .v-thumb:hover img { transform: scale(1.05); filter: grayscale(.15) brightness(1); }
.v-thumb:focus-visible, .vt-item:focus-visible { outline: 1px solid var(--parchment); outline-offset: 3px; }

.play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 58px; height: 58px;
  border: 1px solid rgba(242,239,230,.9); border-radius: 50%;
  transition: background .35s ease;
}
.play::after {
  content: ""; position: absolute; left: 54%; top: 50%; transform: translate(-50%, -50%);
  border-left: 15px solid var(--parchment);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
}
.vt-item:hover .play, .v-thumb:hover .play { background: rgba(242,239,230,.14); }

.vt-title, .v-title {
  display: block;
  font-family: var(--display); font-weight: 300;
  font-size: 15px; letter-spacing: .14em; text-transform: uppercase;
  text-align: center;
}
.v-title { margin-bottom: var(--s-11); }
.video .meta { text-align: center; margin: 0; }

.video-more { text-align: center; margin: var(--s-64) 0 0; }

/* лайтбокс */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(7,8,8,.95);
  display: flex; align-items: center; justify-content: center;
  padding: var(--edge);
}
.lightbox[hidden] { display: none; }

.lb-frame { width: min(1100px, 100%); }
.lb-slot { position: relative; width: 100%; aspect-ratio: 16 / 9; border: 1px solid rgba(242,239,230,.3); }
.lb-slot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.lb-close {
  position: absolute; top: var(--edge); right: var(--edge);
  width: 44px; height: 44px;
  background: none; color: var(--parchment);
  border: 1px solid rgba(242,239,230,.6); border-radius: var(--radius);
  font-size: 26px; line-height: 1; cursor: pointer;
  transition: background .3s ease;
}
.lb-close:hover { background: rgba(242,239,230,.1); }

/* ───────────────────────── footer ───────────────────────── */

.footer { text-align: center; padding: 0 var(--edge) var(--s-102); }

.socials {
  list-style: none; margin: 0 0 var(--s-51); padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-32);
}
.socials a {
  font-family: var(--display); font-weight: 300;
  font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
  text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px;
}
.socials a:hover { text-decoration-thickness: 2px; }

.footer-meta { margin-bottom: var(--s-11); }
.footer-meta a { color: var(--tan); }
.footer-meta--fine { margin-top: var(--s-32); opacity: .6; }

/* ───────────────────────── focus ───────────────────────── */

a:focus-visible, .btn:focus-visible, button:focus-visible {
  outline: 1px solid var(--parchment);
  outline-offset: 3px;
}

/* ───────────────────────── публикации ───────────────────────── */

.pubs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-64) var(--s-64);
  max-width: 1200px; margin: 0 auto;
}

@media (max-width: 860px) { .pubs { grid-template-columns: 1fr; } }

.pub {
  display: flex; flex-direction: column; align-items: flex-start;
  padding-top: var(--s-26);
  border-top: 1px solid rgba(242,239,230,.28);
}

.pub-title {
  font-family: var(--display);
  font-weight: 300;
  font-size: 27px;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.25;
  margin-bottom: var(--s-22);
}
.pub-title a { text-decoration: none; }
.pub-title a:hover { text-decoration: underline; text-underline-offset: 6px; }

.pub-excerpt {
  font-size: 18px; line-height: 1.62;
  color: rgba(242,239,230,.86);
  margin-bottom: var(--s-32);
}

/* ───────────────────────── страница текста ───────────────────────── */

.article { padding-bottom: var(--s-51); }

.article-head {
  text-align: center;
  padding: clamp(51px, 9vh, 102px) var(--edge) 0;
  max-width: 900px; margin: 0 auto;
}

.article-title {
  font-family: var(--display);
  font-weight: 200;
  font-size: clamp(28px, 4.6vw, 52px);
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.2;
  margin-top: var(--s-13);
}

.article-body {
  max-width: 90ch;
  margin: 0 auto;
  padding: 0 var(--edge);
  font-size: 20px;
  line-height: 1.72;
}
.article-body p { margin-bottom: var(--s-32); }

/* красивая буквица в первом абзаце */
.article-body > p:first-child::first-letter {
  float: left;
  font-family: var(--display);
  font-weight: 200;
  font-size: 3.6em;
  line-height: .84;
  padding: .06em .12em 0 0;
  color: var(--parchment);
}

.article-cta { text-align: center; margin-top: var(--s-51); }

.article-nav {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-22);
  max-width: 90ch; margin: var(--s-64) auto 0;
  padding: var(--s-26) var(--edge) 0;
  border-top: 1px solid rgba(242,239,230,.22);
}
.article-nav a {
  font-family: var(--display); font-weight: 300;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
}
