/* ═══════════════════════════════════════════════════════════════
   resources.css — /resources page
   Loads after: themes.css → base.css → nav.css → footer.css
   Target: 200–350 lines. base.css provides: .card, .card:hover,
   .grid-3, .eyebrow, .section, .section--inverse, .btn variants
   ═══════════════════════════════════════════════════════════════ */

/* Shared dark-teal gradient — used by ROI card + case study card */
:root { --res-dark-gradient: linear-gradient(140deg, #071e27, #0b2f3e, #0d3a4d); }

body.resources-page { padding-top: var(--nav-height); }

/* ═══ S1 — HERO ═══ */
.res-hero {
  background: var(--bg-hero);
  padding: var(--space-16) 0 var(--space-12);
  position: relative;
  overflow: hidden;
}
.res-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-hero) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-hero) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.res-hero__eyebrow {
  margin-bottom: var(--space-4);
}
.res-hero h1 {
  color: var(--text-hero-color);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-4);
  position: relative;
}
.res-hero__sub {
  color: var(--text-hero-dim);
  font-size: var(--text-lg);
  max-width: 600px;
  position: relative;
}

/* ═══ S2 — ROI CARD ═══ */
.res-roi { padding: var(--space-10) 0 0; }
.res-roi__card {
  background: var(--res-dark-gradient);
  border: 1px solid var(--dv-teal-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: center;
  position: relative;
  overflow: hidden;
}
.res-roi__card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border-hero) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-hero) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.res-roi__copy { position: relative; }
.res-roi__chip {
  display: inline-block;
  padding: 4px var(--space-3);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--dv-teal-dim);
  color: var(--dv-teal);
  margin-bottom: var(--space-4);
}
.res-roi__copy h2 {
  color: var(--text-hero-color);
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-bottom: var(--space-3);
}
.res-roi__copy p {
  color: var(--text-hero-dim);
  font-size: var(--text-base);
  line-height: 1.6;
  margin-bottom: var(--space-5);
}
.res-roi__inputs { position: relative; display: flex; flex-direction: column; gap: var(--space-3); }
.res-roi__input-preview {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--dv-teal-border);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.res-roi__input-label   { font-size: var(--text-sm); color: var(--text-hero-dim); }
.res-roi__input-placeholder { font-size: var(--text-sm); color: var(--text-hero-mute); font-family: 'Courier New', monospace; }

/* ═══ S3 — NEWSLETTER STRIP ═══ */
.res-newsletter { padding: var(--space-8) 0; border-bottom: 1px solid var(--border); }
.res-newsletter__inner {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-8);
  align-items: center;
}
.res-newsletter__eyebrow {
  margin-bottom: var(--space-2);
}
.res-newsletter__copy h2 { font-size: var(--text-xl); font-weight: 700; margin-bottom: var(--space-2); }
.res-newsletter__copy p  { color: var(--text-secondary); font-size: var(--text-sm); margin: 0; }
.res-newsletter__form { display: flex; gap: var(--space-3); min-width: 320px; }
.res-newsletter__input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.res-newsletter__input:focus       { border-color: var(--dv-orange); }
.res-newsletter__input::placeholder{ color: var(--text-muted); }
.res-newsletter__confirm { display: none; color: var(--dv-teal); font-size: var(--text-sm); font-weight: 600; align-items: center; gap: var(--space-2); }
.res-newsletter__confirm.is-visible{ display: flex; }

/* ═══ S4 — FILTER TABS ═══ */
.res-filters { padding: var(--space-8) 0 var(--space-4); }
.res-filters__tabs {
  display: flex; gap: var(--space-2); overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px;
}
.res-filters__tabs::-webkit-scrollbar { display: none; }
.res-filter-tab {
  padding: var(--space-2) var(--space-5);
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--text-sm); font-weight: 500; font-family: inherit;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: all 0.18s;
}
.res-filter-tab:hover   { border-color: var(--dv-orange); color: var(--dv-orange); }
.res-filter-tab.is-active { background: var(--dv-orange); border-color: var(--dv-orange); color: var(--text-hero-color); }

/* ═══ S5 — CONTENT GRID ═══ */
.res-grid-section { padding-bottom: var(--space-10); }
.res-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

/* res-card extends .card from base — adds image, pill, body layout */
.res-card {
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.res-card__image {
  aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--bg-surface); position: relative;
  margin: calc(-1 * var(--space-5)); /* pull to card edges */
  margin-bottom: 0;
}
.res-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.res-card__play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.35);
}
.res-card__play svg { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)); }
.res-card__duration {
  position: absolute; bottom: var(--space-2); right: var(--space-2);
  background: rgba(0,0,0,0.7); color: var(--text-hero-color);
  font-size: var(--text-xs); font-weight: 600;
  padding: 2px 6px; border-radius: var(--radius-sm);
}
.res-card__body { padding-top: var(--space-4); display: flex; flex-direction: column; flex: 1; }
.res-card__pill {
  display: inline-block; padding: 3px var(--space-2); border-radius: 999px;
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: var(--space-3); background: var(--dv-orange-dim); color: var(--dv-orange);
}
.res-card__pill--teal { background: var(--dv-teal-dim); color: var(--dv-teal); }
.res-card__title {
  font-size: var(--text-base); font-weight: 700; line-height: 1.4; color: var(--text-primary);
  margin-bottom: var(--space-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.res-card__excerpt {
  font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.5; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: var(--space-3);
}
.res-card__meta { font-size: var(--text-xs); color: var(--text-muted); margin-top: auto; }

/* Case study card */
.res-cs-card {
  grid-column: 1 / -1;
  background: var(--res-dark-gradient);
  border: 1px solid var(--dv-teal-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-8);
  align-items: center;
  text-decoration: none;
  transition: border-color 0.2s;
}
.res-cs-card:hover { border-color: var(--dv-teal); }
.res-cs-card__left { display: flex; flex-direction: column; gap: var(--space-3); }
.res-cs-card__eyebrow {
  display: inline-block; padding: 4px var(--space-3); border-radius: 999px;
  font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--dv-teal-dim); color: var(--dv-teal);
}
.res-cs-card__logo { max-height: 28px; opacity: 0.85; filter: brightness(0) invert(1); }
.res-cs-card__center h3 { color: var(--text-hero-color); font-size: var(--text-xl); font-weight: 700; margin-bottom: var(--space-5); line-height: 1.3; }
.res-cs-stats { display: flex; gap: var(--space-6); }
.res-cs-stat__value { font-size: var(--text-2xl); font-weight: 800; color: var(--dv-teal); line-height: 1; margin-bottom: 4px; }
.res-cs-stat__label { font-size: var(--text-sm); color: var(--text-hero-dim); font-weight: 500; }
.res-cs-stat__scope { font-size: var(--text-xs); color: var(--text-hero-mute); margin-top: 2px; line-height: 1.4; }

/* Downloads */
.res-downloads-list { display: flex; flex-direction: column; gap: var(--space-3); grid-column: 1 / -1; }
.res-download-item {
  display: flex; align-items: center; gap: var(--space-5); padding: var(--space-5);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.res-download-item__icon { color: var(--dv-orange); flex-shrink: 0; }
.res-download-item__copy { flex: 1; }
.res-download-item__title { font-weight: 600; font-size: var(--text-base); color: var(--text-primary); margin-bottom: 4px; }
.res-download-item__desc  { font-size: var(--text-sm); color: var(--text-secondary); }

/* Empty state */
.res-empty { grid-column: 1 / -1; text-align: center; padding: var(--space-10) 0; color: var(--text-muted); font-size: var(--text-sm); }

/* Lightbox */
.video-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.88);
  display: flex; align-items: center; justify-content: center; padding: var(--space-5);
}
.video-lightbox__frame {
  width: 100%; max-width: 960px; aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg); overflow: hidden; position: relative;
}
.video-lightbox__frame iframe { width: 100%; height: 100%; border: none; display: block; }
.video-lightbox__close {
  position: absolute; top: calc(-1 * var(--space-5)); right: 0;
  background: none; border: none; color: var(--text-hero-color); font-size: 1.5rem;
  cursor: pointer; padding: var(--space-2); line-height: 1;
}

/* ═══ S6 — BOTTOM CTA ═══ */
.res-cta {
  background: var(--bg-hero); padding: var(--space-16) 0; text-align: center;
  position: relative; overflow: hidden;
}
.res-cta::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border-hero) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-hero) 1px, transparent 1px);
  background-size: 48px 48px; pointer-events: none;
}
.res-cta__inner { position: relative; }
.res-cta h2 { color: var(--text-hero-color); font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; margin-bottom: var(--space-5); }
.res-cta__actions { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }

/* ═══ S7 — FAQ ═══ */
.res-faq { padding: var(--space-12) 0; border-top: 1px solid var(--border); }
.res-faq__header { text-align: center; margin-bottom: var(--space-8); }
.res-faq__header h2 { font-size: var(--text-2xl); font-weight: 700; }
.res-faq__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
.res-faq__item { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-5); }
.res-faq__q { font-weight: 700; font-size: var(--text-base); color: var(--text-primary); margin-bottom: var(--space-2); }
.res-faq__a { font-size: var(--text-sm); color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
  .res-grid { grid-template-columns: repeat(2, 1fr); }
  .res-faq__grid { grid-template-columns: 1fr; }
  .res-roi__card { grid-template-columns: 1fr; }
  .res-newsletter__inner { grid-template-columns: 1fr; }
  .res-newsletter__form { min-width: 0; }
  .res-cs-card { grid-template-columns: 1fr; gap: var(--space-5); }
  .res-cs-card__left { flex-direction: row; align-items: center; }
}
@media (max-width: 640px) {
  .res-grid { grid-template-columns: 1fr; }
  .res-cs-stats { flex-direction: column; gap: var(--space-4); }
  .res-hero { padding: var(--space-12) 0 var(--space-8); }
  .res-roi__card, .res-cs-card { padding: var(--space-6); }
}

/* View all posts link */
.res-view-all {
  text-align: center;
  margin-top: var(--space-6);
  display: none;
}
