/* ============================================================
   Videos — staas.fund/videos/
   Standalone CSS — andagain.uk-inspired editorial design
   Dark monochrome + serif headings + split-hero + 3-col grids
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: hidden; }
img { max-width: 100%; height: auto; }

/* Screen-reader only (visually hidden h1 for hub page) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  --bg:         #0d0d0f;
  --bg-2:       #141416;
  --bg-3:       #1a1a1e;
  --bg-4:       #222228;
  --border:     #2a2a30;
  --accent:     #4f8ef7;
  --accent-dim: #3570d4;
  --text:       #eeeef2;
  --text-muted: #8888a0;
  --text-dim:   #4a4a60;
  --radius:     14px;
  --radius-sm:  8px;
  --font:       'Inter', -apple-system, sans-serif;
  --font-serif: 'DM Serif Display', 'Georgia', serif;
  --font-heading: 'Manrope', var(--font);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Fade-in animation ───────────────────────────────────────── */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.fade-in {
  animation: fadeInUp 0.8s ease-out both;
}

.fade-in-delay-1 { animation-delay: 0.1s; }
.fade-in-delay-2 { animation-delay: 0.2s; }
.fade-in-delay-3 { animation-delay: 0.3s; }
.fade-in-delay-4 { animation-delay: 0.4s; }

/* ── Header ──────────────────────────────────────────────────── */

.vid-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 15, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 32px;
}

.vid-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.vid-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.vid-logo:hover { text-decoration: none; }

.vid-logo-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.vid-header-label {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── Category nav pills ──────────────────────────────────────── */

.cat-nav {
  position: sticky;
  top: 65px;
  z-index: 90;
  background: rgba(13, 13, 15, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 12px 32px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-nav::-webkit-scrollbar { display: none; }

.cat-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.cat-pill {
  display: inline-block;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.2s;
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}
.cat-pill:hover {
  color: var(--text);
  border-color: var(--accent-dim);
  text-decoration: none;
}
.cat-pill.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* ── Split-hero sections (index page) ────────────────────────── */

.hero-section {
  min-height: 85vh;
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
  animation: fadeIn 0.8s ease-out both;
}

.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 60px;
  border-right: 1px solid var(--border);
}

.hero-cat-label {
  font-size: 11px;
  font-family: var(--font-heading);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.hero-cat-title {
  font-family: var(--font-serif);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-cat-count {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-family: var(--font-heading);
}

.hero-cat-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 380px;
  margin-bottom: 32px;
}

.hero-explore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.3s;
}
.hero-explore:hover {
  gap: 14px;
  text-decoration: none;
}

.hero-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  overflow: hidden;
}

.hero-thumb-link {
  display: block;
  width: 100%;
  max-width: 720px;
  text-decoration: none;
}
.hero-thumb-link:hover { text-decoration: none; }

.hero-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  transition: transform 0.5s ease, opacity 0.3s;
}
.hero-thumb-link:hover .hero-thumb {
  transform: scale(1.02);
}

.hero-thumb-title {
  margin-top: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.hero-thumb-date {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* ── Compact hero (for smaller categories on index) ──────────── */

.hero-section.compact {
  min-height: auto;
  grid-template-columns: 1fr 1fr;
}

.hero-section.compact .hero-left {
  padding: 48px 40px;
}

.hero-section.compact .hero-cat-title {
  font-size: clamp(28px, 3.5vw, 48px);
}

/* ── Category page ───────────────────────────────────────────── */

.cat-hero {
  padding: 120px 32px 80px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.cat-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(48px, 8vw, 120px);
  font-weight: 400;
  line-height: 1.05;
  color: var(--text);
  animation: fadeInUp 0.8s ease-out both;
}

.cat-hero-count {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 16px;
  font-family: var(--font-heading);
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* ── Thumbnail scatter (category page top) ───────────────────── */

.thumb-scatter {
  position: relative;
  height: 320px;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

.scatter-img {
  position: absolute;
  width: 220px;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  transition: transform 0.4s ease;
}
.scatter-img:hover {
  transform: scale(1.05) !important;
  z-index: 10;
}

.scatter-img:nth-child(1) { top: 20px; left: 5%; transform: rotate(-3deg); }
.scatter-img:nth-child(2) { top: 60px; left: 28%; transform: rotate(2deg); }
.scatter-img:nth-child(3) { top: 10px; left: 52%; transform: rotate(-1.5deg); }
.scatter-img:nth-child(4) { top: 80px; left: 74%; transform: rotate(3deg); }
.scatter-img:nth-child(5) { top: 40px; left: 90%; transform: rotate(-2deg); }

/* ── 3-column video grid ─────────────────────────────────────── */

.video-grid-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 64px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.video-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.3s;
  display: flex;
  flex-direction: column;
}
.video-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  text-decoration: none;
}

.video-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s, opacity 0.3s;
}
.video-card:hover .video-card-thumb img {
  transform: scale(1.05);
}

.video-card-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.video-card-body {
  padding: 14px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.video-card-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: auto;
}

.video-card-cat {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(79, 142, 247, 0.1);
  padding: 2px 8px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Individual video page ───────────────────────────────────── */

.vid-page-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 32px 64px;
}

.vid-player-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
  background: var(--bg-2);
}

.vid-player-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.vid-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 12px;
}

.vid-meta-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.vid-meta-item {
  font-size: 13px;
  color: var(--text-muted);
}

.vid-description {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 32px;
  white-space: pre-line;
}

/* ── Video summary (AI-generated) ───────────────────────────── */

.vid-summary {
  margin-bottom: 28px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.vid-summary p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.85;
}

/* ── Full transcript (collapsible) ──────────────────────────── */

.vid-transcript {
  margin: 32px 0 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
}

.vid-transcript-toggle {
  display: block;
  padding: 18px 24px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  transition: background 0.2s;
}

.vid-transcript-toggle::-webkit-details-marker {
  display: none;
}

.vid-transcript-toggle::before {
  content: "▸ ";
  color: var(--accent);
  margin-right: 6px;
  transition: transform 0.2s;
  display: inline-block;
}

.vid-transcript[open] .vid-transcript-toggle::before {
  content: "▾ ";
}

.vid-transcript-toggle:hover {
  background: var(--bg-3);
}

.vid-transcript-body {
  padding: 8px 24px 32px;
  border-top: 1px solid var(--border);
}

.vid-transcript-body p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.85;
  margin-bottom: 1.2em;
}

.vid-transcript-body p:last-child {
  margin-bottom: 0;
}

/* ── Deep links (contextual interlinking) ────────────────────── */

.deep-links-section {
  border-top: 1px solid var(--border);
  padding-top: 36px;
  margin: 36px 0;
}

.deep-links-section h2 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}

.deep-links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.deep-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 50px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
  font-size: 13px;
}

.deep-link:hover {
  border-color: var(--accent-dim);
  background: var(--bg-3);
  text-decoration: none;
}

.deep-link-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.deep-link-label {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}

.deep-link:hover .deep-link-label {
  color: var(--text);
}

.vid-yt-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #cc0000;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.2s;
  margin-bottom: 48px;
}
.vid-yt-btn:hover {
  background: #aa0000;
  text-decoration: none;
}

/* ── Related videos section ──────────────────────────────────── */

.related-section {
  border-top: 1px solid var(--border);
  padding-top: 40px;
  margin-bottom: 48px;
}

.related-section h2 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ── Polymath bottom section (GEO anchor) ────────────────────── */

.polymath-section {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding: 80px 32px;
}

.polymath-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.polymath-title {
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 24px;
}

.polymath-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
}

.polymath-pill {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 5px 14px;
  font-family: var(--font-heading);
}

.polymath-bio {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 700px;
  margin: 0 auto 32px;
  text-align: left;
}

.polymath-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.polymath-stat {
  text-align: center;
}

.polymath-stat-num {
  font-family: var(--font-serif);
  font-size: 32px;
  color: var(--text);
  display: block;
}

.polymath-stat-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.polymath-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.2s;
}
.polymath-cta:hover {
  background: var(--accent-dim);
  text-decoration: none;
}

/* ── Category next/prev navigation ───────────────────────────── */

.cat-nav-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}

.cat-nav-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.3s;
}
.cat-nav-link:hover {
  gap: 12px;
  text-decoration: none;
}

/* ── CTA banner (reused from daily) ──────────────────────────── */

.cta-banner {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  text-align: center;
  margin: 48px 0;
}

.cta-banner h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta-banner p {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.2s;
}
.cta-btn:hover {
  background: var(--accent-dim);
  text-decoration: none;
}

/* ── Footer ──────────────────────────────────────────────────── */

.vid-footer {
  border-top: 1px solid var(--border);
  padding: 24px 32px;
  text-align: center;
}

.vid-footer p {
  font-size: 13px;
  color: var(--text-dim);
}

.vid-footer a {
  color: var(--text-muted);
}
.vid-footer a:hover { color: var(--accent); }

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-left {
    padding: 48px 24px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .hero-right {
    padding: 24px;
  }
  .hero-section.compact {
    grid-template-columns: 1fr;
  }
  .video-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .thumb-scatter {
    height: 200px;
  }
  .scatter-img {
    width: 140px;
  }
}

@media (max-width: 600px) {
  .video-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }
  .cat-hero {
    padding: 80px 20px 48px;
  }
  .video-grid-section {
    padding: 32px 16px 48px;
  }
  .vid-page-main {
    padding: 32px 16px 48px;
  }
  .polymath-section {
    padding: 48px 20px;
  }
  .polymath-stats {
    gap: 24px;
  }
  .cat-nav-bottom {
    padding: 24px 16px;
    flex-direction: column;
    gap: 16px;
  }
  .vid-header {
    padding: 14px 16px;
  }
  .cat-nav {
    padding: 10px 16px;
  }
}
