/* Case study templates — requires css/base.css first */
/* Case study pages: main column padding (see css/base.css for shared nav) */
.site-main {
  min-height: 100vh;
  padding: 120px 24px 80px;
}

/* =============================================
   CASE PAGE
============================================= */
.case-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
}

.case-kicker {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.case-title {
  font-family: var(--font-head);
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  font-weight: 900;
  line-height: 0.98;
  color: var(--white);
  margin-bottom: 18px;
  letter-spacing: -0.02em;
}

.case-lede {
  color: rgba(245,240,232,0.7);
  font-size: 1rem;
  line-height: 1.9;
  max-width: 820px;
  margin-bottom: 28px;
}

/* Purple gradient shell + iPhone carousel */
.case-hero {
  margin: 48px 0 32px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(201,168,76,0.22);
  background: radial-gradient(ellipse 85% 120% at 50% 20%, #5b21b6 0%, #3b0764 42%, #0f0628 78%, #06030f 100%);
  display: flex;
  flex-direction: column;
  min-height: min(720px, 82vh);
}

.pp-sample-heading {
  margin: 0;
  padding: 28px 24px 10px;
  text-align: center;
  font-family: var(--font-head);
  font-size: clamp(1.05rem, 2.8vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  flex-shrink: 0;
  position: relative;
  z-index: 6;
}

.pp-sample-heading::after {
  content: '';
  display: block;
  width: min(160px, 36vw);
  height: 2px;
  margin: 16px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold-light), var(--gold), var(--gold-light), transparent);
  opacity: 0.95;
}

.pp-carousel {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding-bottom: 4px;
}

.pp-carousel-viewport {
  overflow: hidden;
  width: 100%;
  flex: 1;
  min-height: min(520px, 58vh);
  padding: 10px clamp(12px, 4vw, 28px) 20px;
  box-sizing: border-box;
  perspective: clamp(800px, 110vw, 1400px);
  perspective-origin: 50% 48%;
}

.pp-carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: min(480px, 54vh);
  transform-style: preserve-3d;
}

.pp-slide {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 8px 28px;
  opacity: 0;
  visibility: hidden;
  transform-origin: 50% 50%;
  transition:
    transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
    opacity 0.35s ease,
    visibility 0s linear 0.35s;
  will-change: transform;
}

.pp-slide.is-on {
  opacity: 1;
  visibility: visible;
  transition:
    transform 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
    opacity 0.35s ease,
    visibility 0s;
}

@media (prefers-reduced-motion: reduce) {
  .pp-slide {
    transition:
      opacity 0.2s ease,
      visibility 0s linear 0.2s;
  }
  .pp-slide.is-on {
    transition:
      opacity 0.2s ease,
      visibility 0s;
  }
}

/* iPhone-style device frame */
.phone-shell {
  width: clamp(142px, 26vw, 210px);
  flex-shrink: 0;
  max-height: 100%;
  border-radius: clamp(24px, 4.2vw, 36px);
  padding: 9px;
  background: linear-gradient(152deg, #3a3a40 0%, #121214 42%, #0c0c0e 100%);
  box-shadow:
    0 24px 48px rgba(0,0,0,0.55),
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 -1px 0 rgba(0,0,0,0.4) inset;
}

.phone-bezel {
  position: relative;
  border-radius: clamp(22px, 4vw, 32px);
  background: #000;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

.phone-screen {
  border-radius: clamp(18px, 3.2vw, 28px);
  overflow: hidden;
  background: #000;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: min(52vh, 500px);
}

.phone-screen img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(50vh, 480px);
  object-fit: contain;
}

@supports (image-rendering: high-quality) {
  .phone-screen img {
    image-rendering: high-quality;
  }
}

.pp-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px 22px;
  flex-shrink: 0;
  position: relative;
  z-index: 8;
  padding: 8px 16px 26px;
  flex-wrap: nowrap;
}

.pp-carousel-controls .pp-nav {
  align-self: center;
}

.pp-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.45);
  background: rgba(9,9,15,0.45);
  color: var(--gold);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.pp-nav:hover:not(:disabled) {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

.pp-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pp-nav:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.pp-nav svg {
  width: 20px;
  height: 20px;
}

.pp-carousel-controls .pp-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  align-content: center;
  gap: 8px;
  flex: 0 1 auto;
  max-width: min(100%, calc(100vw - 120px));
  padding: 0;
  margin: 0;
}

.pp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  padding: 0;
  border: 1px solid rgba(201,168,76,0.35);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.pp-dot[aria-current='true'] {
  background: var(--gold);
  border-color: var(--gold);
  transform: scale(1.15);
}

.pp-dot:hover {
  border-color: var(--gold-light);
}

.pp-dot:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.case-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  border: 1px solid var(--border);
  color: var(--gold);
  padding: 10px 16px;
  border-radius: 2px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}

.case-back:hover {
  background: var(--gold);
  color: var(--black);
}

.case-section {
  margin-top: 42px;
  background: rgba(17,24,39,0.6);
  border: 1px solid rgba(201,168,76,0.18);
  border-radius: 4px;
  padding: 26px 22px;
  max-width: 900px;
}

.case-section h2 {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.case-section p {
  color: rgba(245,240,232,0.7);
  line-height: 1.9;
  margin-bottom: 0;
}
/* =============================================
   RESPONSIVE — case study layout
============================================= */
@media (max-width: 900px) {
  .case-hero {
    min-height: min(640px, 78vh);
  }

  .pp-carousel-viewport {
    min-height: min(460px, 52vh);
  }

  .pp-carousel-track {
    min-height: min(420px, 48vh);
  }

  .pp-carousel-controls {
    gap: 10px 14px;
    padding: 6px 12px 22px;
  }

  .pp-carousel-controls .pp-dots {
    max-width: min(100%, calc(100vw - 108px));
    gap: 6px;
  }
}
