/* SkillMagnet · Видео - страница ленты видео с YouTube-канала.
   Палитра и фон - Cosmic Premium, как на главной и в разделе «Статьи». */

:root {
  --bg: #060706;
  --panel: #141414;
  --surface: rgba(27, 27, 27, 0.55);
  --border: rgba(198, 244, 81, 0.16);
  --border-strong: rgba(198, 244, 81, 0.42);
  --hairline: rgba(255, 255, 255, 0.07);
  --text: #F2F0E8;
  --muted: #A8A8A0;
  --dim: #777A70;
  --accent: #C6F451;
  --accent-2: #CDF85A;
  --warm: 182, 180, 90;
  --maxw: 1200px;
  --serif: "Inter", ui-sans-serif, system-ui, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-card: 0 30px 80px -42px rgba(0, 0, 0, 0.9), 0 8px 24px -18px rgba(0, 0, 0, 0.7);
}

html[data-theme="light"] {
  --bg: #f4f5f1;
  --panel: #ffffff;
  --surface: rgba(255, 255, 255, 0.72);
  --border: rgba(92, 153, 0, 0.20);
  --border-strong: rgba(92, 153, 0, 0.42);
  --hairline: rgba(20, 20, 20, 0.08);
  --text: #16180f;
  --muted: #565a4c;
  --dim: #7c8070;
  --accent: #8bc700;
  --accent-2: #5c9900;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0; min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1200px 620px at 78% -14%, rgba(198, 244, 81, 0.10), transparent 60%),
    radial-gradient(960px 560px at 2% 4%, rgba(var(--warm), 0.07), transparent 56%),
    var(--bg);
  font-family: var(--serif); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background .3s ease, color .3s ease;
}
html[data-theme="light"] body {
  background:
    radial-gradient(1200px 620px at 78% -14%, rgba(139, 199, 0, 0.10), transparent 60%),
    var(--bg);
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

a { color: inherit; }

/* ---------- HERO ---------- */
.hero { position: relative; z-index: 1; padding: 54px 0 26px; }
.hero .wrap { display: grid; grid-template-columns: 1.35fr .9fr; gap: 40px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent-2);
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px 2px rgba(198, 244, 81, .6); }

.hero h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(34px, 5vw, 56px); line-height: 1.04; letter-spacing: -.02em;
  margin: 16px 0 14px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lead { color: var(--muted); font-size: 17px; max-width: 560px; margin: 0 0 22px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 13px 22px; border-radius: 13px; font-weight: 800; font-size: 15px;
  text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #131603; box-shadow: 0 14px 34px -12px rgba(198, 244, 81, .5); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 20px 44px -12px rgba(198, 244, 81, .6); }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--text); border: 1px solid var(--hairline); }
html[data-theme="light"] .btn-ghost { background: rgba(20,20,20,.03); }
.btn-ghost:hover { border-color: var(--border-strong); transform: translateY(-2px); }

/* Карточка автора канала */
.host-card {
  position: relative;
  display: flex; gap: 16px; align-items: center;
  padding: 20px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}
.host-avatar {
  width: 78px; height: 78px; flex: 0 0 auto; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border-strong);
}
.host-info .host-name { font-weight: 800; font-size: 18px; margin: 0 0 3px; }
.host-info .host-role { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.host-yt {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 700; color: var(--accent-2); text-decoration: none;
}
.host-yt svg { width: 18px; height: 18px; }
.host-yt:hover { text-decoration: underline; }

/* ---------- Заголовок секции ---------- */
.section-head { padding: 26px 0 10px; }
.section-head h2 { font-family: var(--display); font-weight: 500; font-size: clamp(24px, 3.4vw, 34px); margin: 12px 0 8px; letter-spacing: -.01em; }
.section-head p { color: var(--muted); margin: 0; max-width: 640px; }

/* ---------- СЕТКА ВИДЕО ---------- */
.video-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  padding: 22px 0 10px;
}

.vid-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .18s ease, border-color .2s ease, box-shadow .2s ease;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.vid-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-card); }

.vid-frame {
  position: relative; display: block; width: 100%; padding: 0; margin: 0;
  aspect-ratio: 16 / 9; border: 0; cursor: pointer; background: #000; overflow: hidden;
}
.vid-thumb {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s ease, filter .2s ease;
}
.vid-card:hover .vid-thumb { transform: scale(1.05); }
.vid-frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.45), transparent 42%);
}
.vid-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; z-index: 2;
  background: rgba(198, 244, 81, .92); color: #0c0f04;
  box-shadow: 0 10px 30px -8px rgba(0,0,0,.6);
  transition: transform .18s ease, background .2s ease;
}
.vid-play svg { width: 26px; height: 26px; margin-left: 2px; }
.vid-frame:hover .vid-play { transform: translate(-50%, -50%) scale(1.08); }
.vid-dur {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  font-size: 12px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.78); padding: 3px 7px; border-radius: 6px; letter-spacing: .02em;
}
.vid-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.vid-body { padding: 14px 15px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.vid-title { font-size: 15.5px; line-height: 1.34; margin: 0; font-weight: 700; }
.vid-title a { color: var(--text); text-decoration: none; }
.vid-title a:hover { color: var(--accent-2); }
.vid-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--dim); font-size: 13px; margin-top: auto; }
.vid-dot { opacity: .6; }

/* ---------- ВОРОНКА ---------- */
.funnel {
  margin: 40px 0 10px; padding: 34px; border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(198,244,81,.10), transparent 55%),
    var(--surface);
  border: 1px solid var(--border); text-align: center;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.funnel h3 { font-family: var(--display); font-weight: 500; font-size: clamp(22px, 3vw, 30px); margin: 12px 0 10px; }
.funnel p { color: var(--muted); max-width: 620px; margin: 0 auto 20px; }
.funnel .note { display: block; color: var(--dim); font-size: 12.5px; margin-top: 12px; }

/* ---------- ПОДВАЛ ---------- */
.site-footer { margin-top: 56px; border-top: 1px solid var(--hairline); padding: 40px 0 60px; position: relative; z-index: 1; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.site-footer .f-brand p { color: var(--muted); font-size: 14px; max-width: 320px; margin: 12px 0 0; }
.site-footer .brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.site-footer .brand .mark svg { width: 30px; height: 30px; color: var(--accent); }
.site-footer .wordmark { font-weight: 900; font-size: 13px; line-height: 1.02; letter-spacing: .06em; }
.site-footer .f-col h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); margin: 0 0 12px; }
.site-footer .f-col a { display: block; color: var(--muted); text-decoration: none; font-size: 14px; padding: 5px 0; }
.site-footer .f-col a:hover { color: var(--accent-2); }
.site-footer .copy { grid-column: 1 / -1; color: var(--dim); font-size: 12.5px; border-top: 1px solid var(--hairline); padding-top: 20px; margin-top: 8px; }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 26px; }
  .host-card { max-width: 460px; }
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .hero { padding: 30px 0 12px; }
  .video-grid { grid-template-columns: 1fr; gap: 16px; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
}


/* ---------- Состояние «видео играет» ---------- */
/* Пока показано превью, поверх лежит затемняющий градиент .vid-frame::after.
   Если его не убрать, он перекрывает плеер и съедает клики - тогда видео
   невозможно поставить на паузу. Поэтому при запуске гасим оверлей. */
.vid-card.is-playing .vid-frame { cursor: default; }
.vid-card.is-playing .vid-frame::after { content: none; }
.vid-card.is-playing .vid-thumb,
.vid-card.is-playing .vid-play { display: none; }
.vid-card.is-playing .vid-frame:hover .vid-thumb { transform: none; }

/* Кнопка возврата к превью */
.vid-close {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, .62); color: #fff; cursor: pointer;
  transition: background .18s ease;
}
.vid-card.is-playing .vid-close { display: flex; }
.vid-close:hover { background: rgba(0, 0, 0, .85); }
.vid-close svg { width: 15px; height: 15px; }
