/* ══════════════════════════════════════════════════
   PORTFOLIO TEASER — Section 5
   Single-card carousel, 4 featured projects.
   Depends on: tokens.css, hero.css (bgs keyframe)
   ══════════════════════════════════════════════════ */

.site-portfolio {
  background: var(--c0);
  padding: 10rem 0;
}

.site-portfolio__inner {
  width: min(calc(100% - 2 * var(--content-inset)), var(--container-max));
  margin-inline: auto;
}

/* ── LABEL + HEADING ─────────────────────────────── */

.site-portfolio__head {
  max-width: 64rem;
  margin-bottom: var(--space-7);
}

.site-portfolio__label {
  display: block;
  font-family: var(--fm);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--t3);
  margin: 0 0 var(--space-3);
}

.site-portfolio__heading {
  font-family: var(--fd);
  font-size: clamp(3.2rem, 4vw, 5.6rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0;
  padding-bottom: 0.08em;
  max-width: 72rem;
  background: var(--gr);
  background-size: 200% 200%;
  animation: bgs 6s ease infinite;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── CAROUSEL WRAPPER ────────────────────────────── */

.pf-carousel {
  position: relative;
}

.pf-carousel__track-wrap {
  overflow: hidden;
  border-radius: 1.6rem;
}

.pf-carousel__track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  cursor: grab;
}

.pf-carousel__track:active {
  cursor: grabbing;
}

/* ── PROJECT CARD ────────────────────────────────── */
/* Split card: text content left, photo right — mirrors the same
   text+image pairing used on What We Do / Services, adapted for a
   fixed-height carousel slide (media stretches full card height with
   object-fit: cover, rather than top-aligning to the text like those
   flowing sections do). */

.pf-card {
  flex: 0 0 100%;
  min-width: 0;
  min-height: 44rem;
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.6rem;
  padding: var(--space-7);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-8);
  align-items: stretch;
}

/* Left gradient accent bar */
.pf-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--gr);
  z-index: 1;
}

/* ── CONTENT COLUMN ───────────────────────────────── */

.pf-card__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ── MEDIA COLUMN ─────────────────────────────────── */

.pf-card__media {
  position: relative;
  min-width: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pf-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Bottom scrim so the ghost number stays legible over any photo */
.pf-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent 45%);
  pointer-events: none;
}

/* ── GHOST NUMBER — now an impact-stat badge on the photo ────────── */

.pf-card__ghost {
  position: absolute;
  z-index: 1;
  bottom: var(--space-4);
  right: var(--space-4);
  font-family: var(--fd);
  font-size: clamp(3.2rem, 4vw, 5.2rem);
  font-weight: 900;
  line-height: 1;
  color: #fff;
  user-select: none;
  pointer-events: none;
  letter-spacing: -0.02em;
}

/* ── CARD META — location + year ─────────────────── */

.pf-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.pf-card__location {
  font-family: var(--fm);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--t3);
}

.pf-card__meta-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--t3);
  opacity: 0.4;
}

.pf-card__year {
  font-family: var(--fm);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--t3);
  opacity: 0.6;
}

/* ── CARD TITLE ──────────────────────────────────── */

.pf-card__title {
  font-family: var(--fd);
  font-size: clamp(2.8rem, 3.5vw, 4.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  padding-bottom: 0.06em;
  background: var(--gr);
  background-size: 200% 200%;
  animation: bgs 6s ease infinite;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ── CARD SCOPE ──────────────────────────────────── */

.pf-card__scope {
  font-family: var(--fm);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--t2);
  margin: 0;
  max-width: 72rem;
}

/* ── SERVICE TAGS ────────────────────────────────── */

.pf-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.pf-tag {
  font-family: var(--fm);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--t3);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10rem;
  padding: 0.5rem 1.2rem;
  white-space: nowrap;
}

/* ── CAROUSEL NAV — overlaid top-right of the slide ──────────────── */

.pf-carousel__nav {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.6rem;
  background: rgba(10, 8, 16, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10rem;
}

.pf-carousel__arrow {
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--t2);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}

.pf-carousel__arrow:hover {
  background: rgba(255,255,255,0.1);
  color: var(--txt);
  border-color: rgba(255,255,255,0.22);
}

.pf-carousel__arrow svg {
  width: 1.5rem;
  height: 1.5rem;
  display: block;
}

.pf-carousel__dots {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.pf-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--t3);
  opacity: 0.3;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.pf-dot.is-active {
  opacity: 1;
  background: var(--a);
  transform: scale(1.4);
}

/* ── CTA ─────────────────────────────────────────── */

.site-portfolio__cta-wrap {
  display: flex;
  justify-content: flex-start;
  margin-top: var(--space-6);
}

.site-portfolio__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--fm);
  font-size: clamp(1.1rem, 1.3vw, 1.3rem);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--txt);
  text-decoration: none;
  padding: clamp(1.1rem, 1.3vw, 1.4rem) clamp(2.2rem, 2.6vw, 3.2rem);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.site-portfolio__cta:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.05);
}

.site-portfolio__cta svg {
  width: 1.6rem;
  height: 1.6rem;
  transition: transform 0.2s ease;
}

.site-portfolio__cta:hover svg {
  transform: translateX(4px);
}

/* ── MOBILE ──────────────────────────────────────── */

@media (max-width: 768px) {
  .site-portfolio {
    padding: 7rem 0;
  }

  .pf-card {
    grid-template-columns: 1fr;
    padding: var(--space-6);
    min-height: 0;
  }

  .pf-card__media {
    order: -1;
    aspect-ratio: 16 / 10;
  }

  .pf-carousel__nav {
    top: var(--space-4);
    right: var(--space-4);
    gap: var(--space-2);
  }
}

/* ── REDUCED MOTION ──────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .site-portfolio__heading,
  .pf-card__title { animation: none; }
  .pf-carousel__track { transition: none; }
  .pf-dot,
  .pf-carousel__arrow,
  .site-portfolio__cta { transition: none; }
}
