/* Tutorial Videos page — hero, topic chips, video card grid, and lightbox.
   Nav, drawer, footer, tokens, and buttons come from tokens.css + base.css + chrome.css. */

/* content links (base.css sets `a { color: inherit }` for the nav/footer chrome) */
a{ color: var(--magenta); }
a:hover{ color: var(--magenta-deep); }

/* Tutorials uses the same tighter type scale as the FAQ page */
h1{ font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2{ font-size: clamp(1.6rem, 2.6vw, 2.1rem); }

/* -------- hero -------- */
.vid-hero{
  position: relative; overflow: hidden;
  padding: clamp(44px, 6vw, 76px) 0 clamp(28px, 4vw, 44px);
  text-align: center;
}
.vid-hero::before{
  content:""; position:absolute; width: 360px; height:360px; border-radius:50%;
  background: radial-gradient(circle, var(--magenta-soft), transparent 70%);
  top: -160px; right: -80px; opacity:.6; pointer-events:none;
}
.vid-hero::after{
  content:""; position:absolute; width: 320px; height:320px; border-radius:50%;
  background: radial-gradient(circle, #FFE9C2, transparent 70%);
  bottom: -180px; left: -120px; opacity:.6; pointer-events:none;
}
.vid-hero-logo{
  position: relative;
  display: block;
  width: clamp(240px, 30vw, 360px);
  max-width: 100%;
  height: auto;
  margin: 0 auto 18px;
}
.vid-hero h1{ position: relative; margin-bottom: 14px; }
.vid-hero .sub{
  position: relative;
  max-width: 640px; margin: 0 auto; color: var(--ink-2);
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
}

/* -------- controls (topic filter chips) -------- */
.controls{
  position: relative;
  margin-top: 30px;
  display:flex; flex-direction: column; align-items: center; gap: 18px;
}
.filter-label{
  font-weight: 800; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3);
}
.chips{
  display:flex; flex-wrap:wrap; justify-content:center; gap: 10px; max-width: 900px;
}
.chip{
  background: var(--paper); border: 1.5px solid var(--line);
  color: var(--ink-2); font-weight: 700; font-size: .92rem;
  padding: 9px 18px; border-radius: var(--radius-pill);
  transition: border-color .2s ease, color .2s ease, background .2s ease, transform .15s ease;
}
.chip:hover{ border-color: var(--magenta); color: var(--magenta); transform: translateY(-1px); }
.chip.active{ background: var(--magenta); border-color: var(--magenta); color: white; box-shadow: 0 6px 16px rgba(233,30,118,.28); }
.chip .c-count{ opacity: .6; font-weight: 700; margin-left: 4px; }
.chip.active .c-count{ opacity: .85; }

/* -------- video grid -------- */
.grid-wrap{ padding-top: clamp(28px, 4vw, 44px); padding-bottom: clamp(64px, 8vw, 100px); }
.grid-count{ font-weight: 600; color: var(--ink-3); font-size: .92rem; margin-bottom: 20px; text-align:center; }
.video-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.6vw, 30px);
}
.video-card{
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm); text-align: left; padding: 0;
  display:flex; flex-direction: column;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.video-card:hover{ transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--magenta-soft); }
.thumb{
  position: relative; display:block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink);
}
.thumb img{ width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.video-card:hover .thumb img{ transform: scale(1.05); }
/* Branded gradient stand-in for videos with no youtubeId yet ("coming soon"). */
.thumb-ph{ position:absolute; inset:0; background: linear-gradient(135deg, #E91E76, #FF7AB0); }
.thumb-ph--classroom-tools{ background: linear-gradient(135deg, #5AA7FF, #8AC4FF); }
.thumb-ph--content-management{ background: linear-gradient(135deg, #2BCFA0, #76E2BD); }
.thumb-ph--features{ background: linear-gradient(135deg, #FFB627, #FFCE6A); }
.thumb-ph--tips-and-tricks{ background: linear-gradient(135deg, #8C6BFF, #B49CFF); }
.thumb .play{
  position:absolute; inset: 0; display:grid; place-items:center;
  background: linear-gradient(180deg, rgba(31,18,51,0) 40%, rgba(31,18,51,.35) 100%);
  transition: background .25s ease;
}
.video-card:hover .thumb .play{ background: linear-gradient(180deg, rgba(31,18,51,.1) 0%, rgba(31,18,51,.45) 100%); }
.thumb .play .pbtn{
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(233,30,118,.94); display:grid; place-items:center;
  box-shadow: 0 8px 20px rgba(0,0,0,.3); transition: transform .22s ease, background .2s ease;
}
.video-card:hover .thumb .play .pbtn{ transform: scale(1.1); background: var(--magenta); }
.thumb .play .pbtn svg{ margin-left: 3px; }
.thumb .dur{
  position:absolute; right: 10px; bottom: 10px;
  background: rgba(31,18,51,.85); color: white; font-weight: 700; font-size: .78rem;
  padding: 3px 8px; border-radius: 6px;
}
.video-card .meta{ padding: 16px 18px 18px; display:flex; flex-direction: column; gap: 8px; flex: 1; }
.video-card .topic-tag{
  align-self:flex-start; font-weight: 800; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--magenta); background: var(--magenta-soft); padding: 4px 10px; border-radius: var(--radius-pill);
}
/* card title is a <span> (not <h3>) so the card <button> stays valid HTML */
.video-card .card-title{
  font-family: var(--display); font-weight: 400; color: var(--ink);
  font-size: 1.14rem; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance;
}
.video-card .desc{ display:block; color: var(--ink-3); font-size: .92rem; margin: 0; line-height: 1.45; }

.no-results{
  display:none;
  text-align:center; padding: 60px 20px; color: var(--ink-3);
}
.no-results.show{ display:block; }
.no-results .big{ font-family: var(--display); font-size: 1.6rem; color: var(--ink); margin-bottom: 8px; }

.hidden{ display:none !important; }

/* -------- lightbox -------- */
.lightbox{
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15,8,26,.82); backdrop-filter: blur(6px);
  display:flex; align-items:center; justify-content:center; padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
}
.lightbox.open{ opacity: 1; visibility: visible; }
.lb-inner{
  width: min(960px, 100%); transform: translateY(12px) scale(.98);
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
}
.lightbox.open .lb-inner{ transform: none; }
.lb-frame{
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  background: #000; border-radius: var(--radius-md); overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.lb-frame iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
.lb-coming-soon{
  position:absolute; inset:0; display:grid; place-items:center;
  text-align:center; color:#fff; padding: 24px;
}
.lb-coming-soon .big{ font-family: var(--display); font-size: 1.6rem; margin-bottom: 8px; }
.lb-coming-soon p{ color: rgba(255,255,255,.8); margin: 0; }
.lb-bar{ display:flex; align-items:center; justify-content:space-between; gap: 16px; margin-top: 14px; }
.lb-title{ color: white; font-family: var(--display); font-size: 1.3rem; }
.lb-topic{ color: rgba(255,255,255,.7); font-weight: 700; font-size: .85rem; }
.lb-close{
  position: fixed; top: 20px; right: 24px;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.14); border: 1.5px solid rgba(255,255,255,.4); color: white;
  display:grid; place-items:center; font-size: 1.3rem; transition: background .2s ease, transform .2s ease;
}
.lb-close:hover{ background: rgba(255,255,255,.28); transform: rotate(90deg); }

/* back to top */
.to-top{
  position: fixed; right: 22px; bottom: 22px; z-index: 40;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--magenta); color: white; border: none;
  box-shadow: 0 8px 20px rgba(233,30,118,.4);
  display:grid; place-items:center;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease, background .2s ease;
}
.to-top.show{ opacity: 1; visibility: visible; transform: none; }
.to-top:hover{ background: var(--magenta-deep); }

/* demo help card */
.help-card{
  margin-top: 48px;
  background: var(--magenta);
  background-image: linear-gradient(135deg, var(--magenta) 0%, #FF6FA8 100%);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 44px);
  text-align: center; color: white;
  box-shadow: var(--shadow-md);
}
.help-card h3{ color: white; font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 10px; }
.help-card p{ color: rgba(255,255,255,.92); margin: 0 auto 22px; max-width: 480px; }
.help-card .btn{ background: white; color: var(--magenta); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.help-card .btn:hover{ background: var(--ink); color: white; }

/* -------- responsive -------- */
@media (max-width: 900px){
  .video-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px){
  .video-grid{ grid-template-columns: 1fr; }
  .lb-close{ top: 12px; right: 14px; }
}
