/* ==========================================================================
   Wiztra Chat — Resources / knowledge hub
   Converted from src/pages/resources/page.tsx + src/mocks/resources.ts.

   All 18 cards and all four tab states ship as markup. js/resources.js only
   sets .is-active on a tab and toggles the hidden attribute on cards; it never
   builds a card and never assigns a style rule.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Dark hero
   -------------------------------------------------------------------------- */

.res-hero {
  position: relative;
  overflow: hidden;
  padding-block: 128px 56px;
  background: linear-gradient(180deg, #1a1f3c 0%, #232942 55%, #1e2440 100%);
}
@media (min-width: 1024px) { .res-hero { padding-block: 160px 80px; } }

/* Faint dot field. Decorative. */
.res-hero-dots {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgb(255 255 255 / 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
}

.res-hero-inner {
  position: relative;
  z-index: 10;
  max-width: 860px;
  margin-inline: auto;
  padding-inline: 24px;
  text-align: center;
}
@media (min-width: 768px) { .res-hero-inner { padding-inline: 40px; } }

.res-hero-eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgb(255 255 255 / 0.5);
  margin-bottom: 16px;
}

.res-hero-title {
  font-size: 38px;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 20px;
}
@media (min-width: 768px)  { .res-hero-title { font-size: 52px; } }
@media (min-width: 1024px) { .res-hero-title { font-size: 62px; } }

.res-hero-sub {
  font-size: 16px;
  line-height: 1.65;
  color: rgb(255 255 255 / 0.65);
  max-width: 620px;
  margin-inline: auto;
}
@media (min-width: 768px) { .res-hero-sub { font-size: 18px; } }

/* --------------------------------------------------------------------------
   2. Sticky tab bar
   -------------------------------------------------------------------------- */

.res-tabs {
  position: sticky;
  top: var(--nav-height);
  z-index: 30;
  background: oklch(var(--background-50c) / 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid oklch(var(--background-200c) / 0.5);
}

.res-tabs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-block: 12px;
  overflow-x: auto;
}

.res-tab {
  flex-shrink: 0;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  background: var(--background-100);
  color: var(--foreground-600);
  transition: background-color .2s ease, color .2s ease;
}
.res-tab:hover {
  background: var(--background-200);
  color: var(--foreground-800);
}
.res-tab.is-active {
  background: var(--primary-500);
  color: #fff;
}

/* --------------------------------------------------------------------------
   3. Card grid
   -------------------------------------------------------------------------- */

.res-body {
  padding-block: 48px;
  background: var(--background-50);
}
@media (min-width: 1024px) { .res-body { padding-block: 64px; } }

.res-featured-wrap { margin-bottom: 32px; }
.res-featured-wrap:empty { margin-bottom: 0; }

.res-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 640px)  { .res-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .res-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---- Shared card chrome ---- */

.res-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: var(--background-50);
  border: 1px solid oklch(var(--background-200c) / 0.5);
  transition: border-color .3s ease, box-shadow .3s ease;
}
.res-card[hidden] { display: none; }

.res-card:hover {
  border-color: oklch(var(--primary-200c) / 0.6);
  box-shadow: 0 10px 15px -3px oklch(var(--primary-500c) / 0.05),
              0 4px 6px -4px oklch(var(--primary-500c) / 0.05);
}

.res-thumb {
  position: relative;
  overflow: hidden;
  background: var(--background-100);
  aspect-ratio: 16 / 9;
}

.res-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.res-card:hover .res-thumb img { transform: scale(1.05); }

/* Play affordance on video cards */
.res-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.res-play span {
  width: 56px; height: 56px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(255 255 255 / 0.9);
  transition: transform .3s ease;
}
.res-card:hover .res-play span { transform: scale(1.1); }
.res-play i {
  font-size: 20px;
  color: var(--primary-600);
  margin-left: 2px;
}

.res-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: oklch(var(--foreground-950c) / 0.6);
  backdrop-filter: blur(4px);
}

.res-body-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px;
}

.res-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--foreground-500);
}
.res-dot {
  width: 4px; height: 4px;
  border-radius: 999px;
  background: var(--foreground-300);
}

.res-card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--foreground-900);
  margin-bottom: 8px;
  transition: color .2s ease;
}
.res-card:hover .res-card-title { color: var(--primary-600); }

.res-excerpt {
  flex: 1;
  font-size: 13px;
  line-height: 1.65;
  color: var(--foreground-500);
  margin-bottom: 16px;
}

.res-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--foreground-950);
  background: oklch(0.88 0.20 125);
  transition: background-color .2s ease;
}
.res-card:hover .res-more { background: oklch(0.82 0.21 125); }

/* ---- Featured card: horizontal on desktop ---- */

.res-feat { display: flex; flex-direction: column; }
@media (min-width: 1024px) { .res-feat { flex-direction: row; } }

.res-feat .res-thumb { flex-shrink: 0; }
@media (min-width: 1024px) {
  .res-feat .res-thumb { width: 55%; aspect-ratio: auto; }
}

.res-feat .res-play span { width: 64px; height: 64px; }
.res-feat .res-play i { font-size: 24px; }

.res-feat .res-tag {
  top: 16px;
  left: 16px;
  padding: 6px 12px;
  font-size: 12px;
}

.res-feat .res-body-copy { justify-content: center; padding: 24px; }
@media (min-width: 1024px) { .res-feat .res-body-copy { padding: 32px; } }

.res-feat .res-meta { font-size: 13px; margin-bottom: 16px; }

.res-feat .res-card-title {
  font-size: 20px;
  margin-bottom: 12px;
}
@media (min-width: 768px) { .res-feat .res-card-title { font-size: 24px; } }

.res-feat .res-excerpt {
  flex: 0 1 auto;
  font-size: 14px;
  color: var(--foreground-600);
  margin-bottom: 24px;
}
@media (min-width: 768px) { .res-feat .res-excerpt { font-size: 15px; } }

.res-feat .res-more { padding: 12px 24px; font-size: 14px; }

/* --------------------------------------------------------------------------
   4. Empty state
   -------------------------------------------------------------------------- */

.res-empty { text-align: center; padding-block: 80px; }
.res-empty[hidden] { display: none; }

.res-empty-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  margin-bottom: 16px;
  background: var(--background-100);
}
.res-empty-icon i { font-size: 24px; color: var(--foreground-400); }

.res-empty h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground-800);
  margin-bottom: 8px;
}
.res-empty p { font-size: 14px; color: var(--foreground-500); }

/* --------------------------------------------------------------------------
   5. Closing CTA band
   -------------------------------------------------------------------------- */

.cta-on-tint {
  padding-block: 64px;
  background: oklch(var(--background-100c) / 0.6);
}
@media (min-width: 1024px) { .cta-on-tint { padding-block: 80px; } }
