/* ============================================================
   RHI — Featured Projects (Before/After Slider) + Motion Hooks
   Ryan's palette: --rhi-gold:#FEB406  --rhi-gold-deep:#E0AD1C
                   --rhi-ink:#141414   --rhi-dark:#2A2A2A
   ============================================================ */

:root {
  --rhi-gold: #FEB406;
  --rhi-gold-deep: #E0AD1C;
  --rhi-ink: #141414;
  --rhi-dark: #2A2A2A;
  --rhi-cream: #F7F5F0;
  --rhi-muted: #6B6B6B;
  --rhi-line: rgba(254,180,6,0.18);
}

/* ---- section wrapper ---- */
.rhi-portfolio {
  background: var(--rhi-cream);
  padding: 80px 0 96px;
}

/* ---- section-title-block ---- */
.rhi-section-title-block {
  text-align: center;
  margin-bottom: 52px;
}
.rhi-eyebrow {
  font-family: 'Poppins', sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--rhi-gold-deep);
  display: block;
  margin-bottom: 10px;
}
.rhi-heading {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.1;
  color: var(--rhi-ink);
  font-size: clamp(28px, 3.5vw, 44px);
  margin: 0 0 14px;
}
.rhi-heading em {
  font-style: italic;
  color: var(--rhi-gold);
}
.rhi-lead {
  font-size: 16px;
  color: var(--rhi-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---- container ---- */
.rhi-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- portfolio grid ---- */
.rhi-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

/* ---- project card ---- */
.proj-card {
  background: #fff;
  border: 1px solid var(--rhi-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(20,20,20,0.07);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
  /* initial opacity for Motion animation */
  opacity: 0;
  transform: translateY(28px);
}
.proj-card.rhi-visible {
  opacity: 1;
  transform: translateY(0);
}
.proj-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(20,20,20,0.13);
}

/* ---- slider ---- */
.proj-slider {
  position: relative;
  aspect-ratio: 3 / 2;
  background: #000;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
}
.proj-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.proj-img.after  { z-index: 1; }
.proj-img.before { z-index: 2; clip-path: inset(0 calc(100% - var(--p, 50%)) 0 0); }

/* ---- drag handle ---- */
.proj-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--p, 50%);
  width: 3px;
  background: #fff;
  z-index: 3;
  transform: translateX(-1.5px);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
  pointer-events: none;
}
.proj-handle::after {
  content: "⟷";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--rhi-gold);
  color: var(--rhi-ink);
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* ---- badges ---- */
.proj-badge {
  position: absolute;
  top: 13px;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 4;
  pointer-events: none;
}
.proj-badge.before {
  left: 13px;
  background: rgba(0,0,0,0.72);
  color: #fff;
}
.proj-badge.after {
  right: 13px;
  background: rgba(20,20,20,0.80);
  color: var(--rhi-gold);
  border: 1px solid var(--rhi-gold);
}

/* ---- card meta ---- */
.proj-card__meta {
  padding: 20px 24px 24px;
  background: #fff;
}
.proj-cat {
  font-family: 'Poppins', sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--rhi-gold-deep);
  text-transform: uppercase;
  display: block;
}
.proj-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--rhi-ink);
  margin: 6px 0 5px;
  line-height: 1.3;
}
.proj-loc {
  font-size: 13px;
  color: var(--rhi-muted);
  font-family: 'Poppins', sans-serif;
}

/* ---- CTA row below grid ---- */
.rhi-portfolio__cta {
  text-align: center;
  margin-top: 44px;
}
.rhi-portfolio__cta a {
  display: inline-block;
  background: var(--rhi-gold);
  color: var(--rhi-ink);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 36px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.rhi-portfolio__cta a:hover {
  background: var(--rhi-gold-deep);
  transform: translateY(-2px);
}

/* ---- Motion animation base states ---- */
.rhi-hero-headline,
.rhi-hero-sub,
.rhi-hero-cta {
  opacity: 0;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .rhi-portfolio {
    padding: 56px 0 64px;
  }
  .rhi-portfolio-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}
@media (max-width: 480px) {
  .rhi-portfolio {
    padding: 44px 0 52px;
  }
  .rhi-container {
    padding: 0 16px;
  }
  .proj-card__meta {
    padding: 16px 18px 20px;
  }
  .proj-title {
    font-size: 16px;
  }
}

/* ---- prefers-reduced-motion ---- */
@media (prefers-reduced-motion: reduce) {
  .proj-card,
  .rhi-hero-headline,
  .rhi-hero-sub,
  .rhi-hero-cta {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
