/* ==========================================================================
   PahanFX — страницы видеоуроков
   Айдентика: чёрный фон как база, белый текст, пурпурный — единственный
   акцент и работает точечно (CTA, цифры, иконки), а не заливкой.
   Шрифты: Helvetica для текста, Playfair Display для заголовков.
   ========================================================================== */

/* --- Playfair Display: только заголовки, поэтому один вес ---------------- */
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/playfair-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../fonts/playfair-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Inter — подстраховка там, где нет Helvetica (Windows, Android) */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-cyrillic.woff2) format("woff2");
  unicode-range: U+301, U+400-45F, U+490-491, U+4B0-4B1, U+2116;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(../fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+??, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304,
    U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

/* --- Токены -------------------------------------------------------------- */
:root {
  --font-body: "Helvetica Neue", Helvetica, Inter, Arial, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;

  --bg: #000;
  --fg: #fff;
  --fg-muted: #8f8f96;

  --accent: #a855f7;
  --accent-strong: #7e22ce;
  --accent-ink: #fff;
  --accent-tint: rgba(168, 85, 247, 0.1);
  --accent-line: rgba(168, 85, 247, 0.3);

  --hairline: rgba(255, 255, 255, 0.09);
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
}

/* --- База ---------------------------------------------------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  max-width: 100vw;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  position: relative;
  min-height: 100vh;
}

body > * {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Пурпурное свечение вверху страницы — единственная «атмосфера» на макете */
.background-image {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  display: block;
  width: 100vw;
  height: auto;
  opacity: 0.38;
  object-fit: contain;
  object-position: top center;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 0% 58%, transparent 100%);
  mask-image: linear-gradient(#000 0% 58%, transparent 100%);
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 20px 40px;
}

/* --- Шапка урока --------------------------------------------------------- */
.header {
  margin-bottom: 32px;
}

.badge {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 14px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.title {
  max-width: 700px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.4vw, 44px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--fg);
}

/* --- Видео --------------------------------------------------------------- */
.video-wrapper {
  width: 100%;
  margin: 28px 0;
}

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: #000;
}

.video-container video,
.video-container iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

/* Заглушка, пока видео не залито */
.video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  background: radial-gradient(70% 70% at 50% 45%, rgba(168, 85, 247, 0.14), #000 70%);
  color: var(--fg-muted);
  font-size: 14px;
}

.play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  color: var(--accent);
  transition: transform 0.25s ease, background 0.25s ease;
}

.video-container:hover .play-icon {
  background: var(--accent-tint);
  transform: scale(1.06);
}

/* --- Контент урока ------------------------------------------------------- */
.content {
  margin: 44px 0;
}

.section-title {
  max-width: 570px;
  margin-bottom: 24px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--fg);
}

.list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
}

.list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: var(--fg-muted);
  font-size: 16px;
  line-height: 1.6;
}

/* Порядок пунктов — содержательный, поэтому цифры остаются акцентными */
.number-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--accent);
}

/* --- Кнопки-ссылки ------------------------------------------------------- */
.links {
  margin: 44px 0;
}

.links-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 18px 18px 22px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--surface);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.link-button:hover {
  background: var(--surface-hover);
  border-color: var(--accent-line);
}

.link-label {
  flex: 1;
  color: var(--fg);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
}

.link-icon {
  display: flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  color: var(--accent);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.link-button:hover .link-icon {
  border-color: var(--accent-line);
  background: var(--accent-tint);
}

/* Главное действие урока — единственная сплошная заливка акцентом */
.link-button--cta {
  border-color: transparent;
  background: var(--accent-strong);
}

.link-button--cta:hover {
  border-color: transparent;
  background: var(--accent);
}

.link-button--cta .link-label {
  color: var(--accent-ink);
  font-weight: 500;
}

.link-button--cta .link-icon {
  border-color: rgba(255, 255, 255, 0.25);
  color: var(--accent-ink);
}

.link-button--cta:hover .link-icon {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

/* --- Подвал -------------------------------------------------------------- */
.footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  color: rgba(255, 255, 255, 0.35);
  font-size: 13px;
  text-align: center;
}

/* --- Адаптив ------------------------------------------------------------- */
@media (max-width: 768px) {
  .container {
    padding: 32px 16px 32px;
  }
  .section-title {
    font-size: 19px;
  }
  .content,
  .links {
    margin: 36px 0;
  }
}

@media (max-width: 480px) {
  .link-label {
    font-size: 14px;
  }
  .link-button {
    padding: 16px 16px 16px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
