/* ==========================================================================
   BOOST — Portfolio page
   Reuses tokens + .ig-video / .vertical / .horizontal / .play-overlay
   + video modals from style.css / main.js
   ========================================================================== */

/* ---------- Hero ---------- */
.pf-hero {
  position: relative;
  background: linear-gradient(160deg, #4736c1 0%, #3a2ba0 100%);
  color: #fff;
  text-align: center;
  padding: 6rem 1.5rem;
  overflow: hidden;
}

.pf-hero .pf-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #cfc7f5;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.4rem;
}

.pf-hero h1 {
  font-family: 'THICCCBOI', 'Poppins', sans-serif;
  font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  max-width: 900px;
  margin: 0 auto 1.2rem;
}

.pf-hero p {
  max-width: 640px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  color: #e8e4fb;
}

.pf-hero .pf-hero-btn {
  display: inline-block;
  background: #fff;
  color: var(--purple-blast);
  font-weight: 700;
  text-decoration: none;
  padding: 0.85rem 2.2rem;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pf-hero .pf-hero-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

/* Split hero: text + vertical video */
.pf-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.pf-hero-text {
  text-align: left;
}

.pf-hero-text h1 {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
}

.pf-hero-text p {
  margin-left: 0;
  margin-right: 0;
}

.pf-hero-media {
  display: flex;
  justify-content: center;
}

/* .hero-video-frame / .hero-video are defined in style.css (shared) */

/* Stack on tablet / mobile */
@media (max-width: 860px) {
  .pf-hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    justify-items: center;
  }
  .pf-hero-text {
    text-align: center;
  }
  .pf-hero-text h1,
  .pf-hero-text p {
    margin-left: auto;
    margin-right: auto;
  }
  .pf-hero-media {
    order: 2;
  }
  .hero-video-frame {
    max-width: 240px;
  }
}

/* ---------- Intro ---------- */
.pf-intro {
  text-align: center;
  padding: 4rem 1.5rem 1rem;
}

.pf-intro h2 {
  font-family: 'THICCCBOI', 'Poppins', sans-serif;
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
  color: var(--deep-gray);
  margin-bottom: 0.6rem;
}

.pf-intro p {
  color: #6b6b70;
  max-width: 560px;
  margin: 0 auto;
}

/* ---------- Cases ---------- */
.pf-cases {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.case-study {
  border: 1px solid #ece9f7;
  border-radius: 24px;
  padding: 2rem;
  background: #fff;
  box-shadow: 0 10px 30px rgba(71, 54, 193, 0.06);
}

.case-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.case-head-main {
  max-width: 640px;
}

.case-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--purple-blast);
  background: rgba(71, 54, 193, 0.1);
  border: 1px solid rgba(71, 54, 193, 0.25);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}

.case-name {
  font-family: 'THICCCBOI', 'Poppins', sans-serif;
  font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  font-weight: 800;
  color: var(--deep-gray);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.case-desc {
  color: #6b6b70;
  font-size: 0.98rem;
}

.case-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-content: flex-start;
}

.case-metric {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: var(--purple-blast);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* Media inside a case — horizontals and verticals kept in separate rows */
.case-media {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Images fill their fixed aspect-ratio box exactly (prevents overflow/overlap) */
.media-row .ig-video {
  overflow: hidden;
}

.media-row .ig-video img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Media boxes — horizontals and verticals live in separate boxes */
.media-box {
  background: #fff;
  border: 1px solid #ece9f7;
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: 0 10px 30px rgba(71, 54, 193, 0.06);
}

.media-box + .media-box {
  margin-top: 1.5rem;
}

.media-box-title {
  font-family: 'THICCCBOI', 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--purple-blast);
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Horizontal videos (16:9) — centered symmetric grid */
.media-row.is-horizontal {
  display: grid;
  grid-template-columns: repeat(auto-fill, 340px);
  justify-content: center;
  gap: 1.25rem;
}

.media-row.is-horizontal .ig-video {
  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 9;
}

/* Vertical videos / reels (9:16) — centered symmetric grid */
.media-row.is-vertical {
  display: grid;
  grid-template-columns: repeat(auto-fill, 240px);
  justify-content: center;
  gap: 1.25rem;
}

.media-row.is-vertical .ig-video {
  width: 100%;
  max-width: none;
  aspect-ratio: 9 / 16;
}

/* Mobile: 1 horizontal per row, 2 reels per row — kept symmetric */
@media (max-width: 760px) {
  .media-box {
    padding: 1.1rem;
    border-radius: 16px;
  }
  .media-row.is-horizontal {
    grid-template-columns: 1fr;
  }
  .media-row.is-vertical {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.9rem;
  }
}

/* ---------- Generic section wrapper ---------- */
.pf-section {
  padding: 3rem 1.5rem;
}

.pf-container {
  max-width: 1180px;
  margin: 0 auto;
}

.pf-section-title {
  font-family: 'THICCCBOI', 'Poppins', sans-serif;
  font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.2rem);
  font-weight: 800;
  color: var(--deep-gray);
  text-align: center;
  margin-bottom: 0.5rem;
}

.pf-section-sub {
  text-align: center;
  color: #6b6b70;
  max-width: 560px;
  margin: 0 auto 2rem;
}

/* Portfolio intro (light header, replaces the purple hero at the top) */
.pf-intro-head {
  text-align: center;
}

.pf-intro-head .pf-section-sub {
  margin-bottom: 0;
}

.pf-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--purple-blast);
  background: rgba(71, 54, 193, 0.1);
  border: 1px solid rgba(71, 54, 193, 0.25);
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* Portfolio closer (video hero at the end) */
.pf-hero-closer .pf-hero-text h2 {
  font-family: 'THICCCBOI', 'Poppins', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem);
  line-height: 1.1;
  margin: 0 0 0.8rem;
}

/* ---------- Featured brands (light logo wall) ---------- */
.brand-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem 1.25rem;
  margin-top: 2rem;
}

.brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  width: 128px;
}

.brand-logo {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  overflow: hidden;
  background: #f0eef9;
  border: 1px solid #ece9f7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'THICCCBOI', 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--purple-blast);
  transition-property: transform, box-shadow;
  transition-duration: 0.22s;
  transition-timing-function: ease-out;
}

.brand-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}

.brand-card:hover .brand-logo {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(71, 54, 193, 0.18);
}

.brand-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--deep-gray);
  text-align: center;
  line-height: 1.25;
  text-wrap: balance;
}

@media (prefers-reduced-motion: reduce) {
  .brand-card:hover .brand-logo {
    transform: none;
  }
}

/* ---------- Instagram embed grid (reels + posts) ---------- */
.reels-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.reel-embed {
  flex: 0 0 auto;
  width: 328px;
  max-width: 100%;
}

.reel-embed .instagram-media {
  min-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
}

@media (max-width: 380px) {
  .reel-embed {
    width: 100%;
  }
}

/* ---------- Final CTA ---------- */
.pf-cta {
  background: var(--deep-gray);
  color: #fff;
  text-align: center;
  padding: 4rem 1.5rem;
}

.pf-cta h2 {
  font-family: 'THICCCBOI', 'Poppins', sans-serif;
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
  margin-bottom: 0.6rem;
}

.pf-cta p {
  color: #cfcfd3;
  margin-bottom: 1.8rem;
}

.pf-cta .pf-cta-btn {
  display: inline-block;
  background: var(--purple-blast);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 0.85rem 2.2rem;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pf-cta .pf-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(71, 54, 193, 0.45);
}

/* Mobile breathing room for portfolio sections */
@media (max-width: 760px) {
  .pf-section {
    padding: 2.5rem 1rem;
  }
}
