/* ==========================================================================
   Oliver — страницы видеоуроков
   Один общий стиль для lesson-1 / lesson-2 / lesson-3
   ========================================================================== */

/* --- Шрифт Inter (локальные файлы, без обращения к внешним CDN) ---------- */
@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;
}
@font-face {
  font-family: "Inter Fallback";
  src: local(Arial);
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
  size-adjust: 107.12%;
}

/* --- Токены темы --------------------------------------------------------- */
:root {
  --font-inter: "Inter", "Inter Fallback", sans-serif;
  --background: #050505;
  --foreground: #fff;
  --accent: #efb166;
  --accent-rgb: 239, 177, 102;
  --accent-foreground: #1f1307;
  --accent-deep: #cc9b60;
  --card-border: #ffffff14;
  --text-secondary: #a1a1aa;
}

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

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

body {
  position: relative;
  min-height: 100vh;
  background: radial-gradient(circle at top, #111 0%, #050505 100%);
}

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

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

/* Фоновое свечение сверху страницы */
.background-image {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  display: block;
  width: 100vw;
  height: auto;
  opacity: 0.3;
  object-fit: contain;
  object-position: top center;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 0% 62%, #0000 100%);
  mask-image: linear-gradient(#000 0% 62%, #0000 100%);
}

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

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

.badge {
  position: relative;
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 14px;
  background: linear-gradient(var(--accent-deep), #cc9b60a6);
  color: var(--accent-foreground);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge::after {
  content: "";
  position: absolute;
  inset: 0 1px 1px;
  display: block;
  border-radius: 14px;
  box-shadow: inset 0 1px #eab36f;
}

.title {
  max-width: 700px;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
}

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

.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  box-shadow: 0 0 0 10px #ffffff0a;
  transition: transform 0.3s;
}

.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: 12px;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.2) 0%, #050505 100%);
  color: #ffffff80;
  font-size: 15px;
}

.play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border: 1px solid #ffffff1a;
  border-radius: 50%;
  background: #ffffff0d;
  color: #fff;
  transition: transform 0.2s, background 0.2s;
}

.video-container:hover .play-icon {
  background: #ffffff1a;
  transform: scale(1.1);
}

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

.section-title {
  max-width: 570px;
  margin-bottom: 24px;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
}

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

.list li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-secondary);
  line-height: 1.6;
  opacity: 0.8;
}

.number-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: var(--accent-deep);
  filter: drop-shadow(0 0 8px #cc9b6038);
}

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

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

.link-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 12px;
  padding: 16px 16px 16px 28px;
  border: none;
  border-radius: 14px;
  background: linear-gradient(#cc9b60d1, #cc9b6080);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-button::after {
  content: "";
  position: absolute;
  inset: 0 1px 1px;
  display: block;
  border-radius: 14px;
  box-shadow: inset 0 2px #eab36f59;
  pointer-events: none;
}

.link-button:active {
  transform: translateY(0);
}

/* Неактивные кнопки чуть притухают, когда наводишь на соседнюю */
body:has(.link-button:hover) .link-button:not(:hover) {
  opacity: 0.8;
}

.link-label {
  flex: 1;
  padding-right: 12px;
  color: #fff7ed;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
}

.link-icon {
  display: flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: #fff7ed1a;
  color: #fff7ed;
  transition: all 0.3s;
}

.link-button:hover .link-icon {
  background: var(--accent-foreground);
  color: var(--accent-deep);
}

/* --- Подвал -------------------------------------------------------------- */
.footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--card-border);
  color: #ffffff4d;
  font-size: 14px;
  text-align: center;
}

/* --- Адаптив ------------------------------------------------------------- */
@media (max-width: 768px) {
  .container {
    padding: 20px 16px;
  }
  .title {
    font-size: 26px;
  }
  .section-title {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .link-label {
    font-size: 15px;
  }
}
