/* ═══════════════════════════════════════════════
   Payment Gateway Platform — case study (pg)
   Rebuilt 1:1 from the Framer original (/case/pg)
═══════════════════════════════════════════════ */

body {
  background: #dcdee3;
  font-family: 'Inter', sans-serif;
  color: #141414;
}

/* The shared nav is white-on-white for other cases — tint it for this page */
.case-nav {
  background: rgba(220, 222, 227, 0.88);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

/* ── Page column ── */
.pg-page {
  max-width: 1128px;
  margin: 0 auto;
  padding: 96px 24px 0;
}

/* ── Hero ── */
.pg-hero {
  display: flex;
  flex-direction: column;
  gap: 96px;
  padding-bottom: 40px;
}

.pg-hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 400;
  font-size: clamp(44px, 6.6vw, 84px);
  line-height: 1.1;
  text-transform: capitalize;
  color: #000;
  max-width: 1072px;
}

.pg-stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.pg-stat {
  flex: 1 1 200px;
  min-width: 200px;
  height: 148px;
  background: #fff;
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow:
    3.9px 9.7px 8.4px rgba(0, 0, 0, 0.01),
    6.4px 16px 13.7px rgba(0, 0, 0, 0.01),
    11px 27.5px 23.7px rgba(0, 0, 0, 0.02),
    20px 50px 43px rgba(0, 0, 0, 0.03);
}

.pg-stat-num {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 50px;
  line-height: 1.2;
  color: #636363;
}

.pg-stat-label {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  color: #636363;
}

/* ── Timeline column ── */
.pg-timeline {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 64px;
}

/* Step node: line — pill — line */
.pg-node {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pg-node--start { padding-top: 24px; }

.pg-node-line {
  width: 3px;
  height: 64px;
  background: #141414;
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.pg-node.is-visible .pg-node-line { transform: scaleY(1); }

.pg-node-pill {
  background: #1c1c1c;
  color: #fff;
  font-size: 16px;
  line-height: 1.5;
  border-radius: 64px;
  padding: 8px 16px;
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.45s ease-out, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: 0.15s;
}

.pg-node.is-visible .pg-node-pill {
  opacity: 1;
  transform: scale(1);
}

/* line below pill draws after the pill lands */
.pg-node-pill + .pg-node-line { transition-delay: 0.35s; }

/* ── Section card ── */
.pg-card {
  width: 100%;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 20px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.pg-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.pg-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 24px;
  border-bottom: 1px solid rgba(34, 34, 34, 0.1);
}

.pg-card-title h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 24px;
  line-height: 2;
  color: #0f1728;
}

.pg-card-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
}

/* ── Media boxes ── */
.pg-media {
  position: relative;
  width: 100%;
  background: #f7f7f7;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 24px;
  overflow: hidden;
}

.pg-media img {
  max-width: 100%;
  height: auto;
  display: block;
}

.pg-media--tall img { max-height: 544px; width: auto; }

/* two images in one box (content audit) */
.pg-media--duo { overflow: visible; gap: 10px; align-items: flex-start; }

.pg-media--duo > * { flex: 1 1 0; min-width: 0; }

.pg-duo-right { position: relative; }

.pg-stat-badge {
  position: absolute;
  top: -60px;
  right: 0;
  width: 160px;
  height: 148px;
  background: #fff;
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow:
    6.4px 16px 13.7px rgba(0, 0, 0, 0.01),
    11px 27.5px 23.7px rgba(0, 0, 0, 0.02),
    20px 50px 43px rgba(0, 0, 0, 0.03);
}

.pg-stat-badge .pg-stat-num { font-size: 40px; }

/* side-by-side gray boxes (deconstructing) */
.pg-media-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pg-media-pair .pg-media { min-height: 364px; height: 100%; }

/* labelled columns (UX anatomy) */
.pg-media--cols { align-items: flex-start; gap: 16px; }

.pg-media-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pg-media-col p {
  font-size: 16px;
  line-height: 1.5;
  color: #141414;
}

/* video embeds */
.pg-video-frame {
  width: 100%;
  aspect-ratio: 864 / 592;
  border: 0;
  border-radius: 8px;
  display: block;
}

/* ── Need / Action / Result rows ── */
.pg-rows {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pg-row {
  display: flex;
  gap: 24px;
}

.pg-row h3 {
  flex: 0 0 80px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 2;
  color: #000;
}

.pg-row--full .pg-row-text { padding-top: 0; }

.pg-row-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 6px;
}

.pg-row-text p {
  font-size: 16px;
  line-height: 1.5;
  color: #141414;
}

.pg-row-text ul {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pg-row-text li {
  font-size: 16px;
  line-height: 1.5;
  color: #141414;
}

/* intro paragraph */
.pg-intro-text {
  font-size: 16px;
  line-height: 1.5;
  color: #141414;
}

/* ── Intro problem cards ── */
.pg-mini-cards {
  display: flex;
  gap: 24px;
}

.pg-mini-card {
  flex: 1 1 0;
  min-width: 0;
  background: #f7f7f7;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow:
    0 0.8px 0.7px rgba(0, 0, 0, 0.02),
    0 2.4px 2.2px rgba(0, 0, 0, 0.02),
    0 6.4px 5.7px rgba(0, 0, 0, 0.02),
    0 20px 18px rgba(0, 0, 0, 0.03);
}

.pg-mini-card h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.5;
  color: #000;
}

.pg-mini-card p {
  font-size: 15px;
  line-height: 1.8;
  color: #141414;
}

/* ── Before / After ── */
.pg-ba-head {
  cursor: pointer;
  background: none;
  border: 0;
  border-bottom: 1px solid rgba(34, 34, 34, 0.1);
  text-align: left;
  font: inherit;
}

.pg-switch {
  flex-shrink: 0;
  width: 60px;
  height: 32px;
  border-radius: 64px;
  background: rgba(0, 0, 0, 0.12);
  padding: 2px;
  display: flex;
  align-items: center;
  transition: background 0.3s ease-out;
}

.pg-switch-knob {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1c1c1c;
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.pg-ba-head[aria-pressed="true"] .pg-switch { background: rgba(0, 0, 0, 0.25); }
.pg-ba-head[aria-pressed="true"] .pg-switch-knob { transform: translateX(28px); }

.pg-ba-stage { aspect-ratio: 912 / 640; }

.pg-ba-stage img {
  position: absolute;
  inset: 24px;
  width: calc(100% - 48px);
  height: calc(100% - 48px);
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.45s ease-out;
}

.pg-ba-stage img.is-active { opacity: 1; }

/* ── Responsive ── */
@media (max-width: 1023px) {
  .pg-stats { gap: 20px; }
  .pg-stat { flex-basis: calc(50% - 10px); min-width: calc(50% - 10px); }
}

@media (max-width: 809px) {
  .pg-page { padding: 64px 16px 0; }
  .pg-hero { gap: 56px; }

  .pg-card-title { padding: 20px; }
  .pg-card-title h2 { font-size: 20px; }
  .pg-card-body { padding: 16px; gap: 16px; }
  .pg-media { padding: 16px; }

  .pg-node-line { height: 48px; }

  .pg-rows { gap: 20px; }
  .pg-row { flex-direction: column; gap: 4px; }
  .pg-row h3 { flex-basis: auto; }
  .pg-row-text { padding-top: 0; }

  .pg-mini-cards { flex-direction: column; }
  .pg-media--duo { flex-direction: column; align-items: stretch; }
  .pg-stat-badge { top: -24px; right: -4px; transform: scale(0.85); transform-origin: top right; }
  .pg-media-pair { grid-template-columns: 1fr; }
  .pg-media-pair .pg-media { min-height: 0; }
  .pg-media--cols { flex-direction: column; align-items: stretch; }
  .pg-ba-stage img { inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); }
}

/* ═══ Footer (mirrors homepage site-footer) ═══ */
.site-footer {
  background: #141211;
  width: calc(100% + 48px);
  margin: 0 -24px;
  border-radius: 24px 24px 0 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 64px 48px;
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.footer-cta {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.footer-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(56px, 8vw, 112px);
  font-weight: 700;
  line-height: 1.05;
  color: #fff;
  display: flex;
  flex-direction: column;
  text-transform: capitalize;
}

.footer-h-row {
  display: flex;
  align-items: flex-end;
}

.footer-cycle-wrap {
  overflow: hidden;
  display: inline-block;
  height: 1.05em;
  vertical-align: bottom;
}

.footer-cycle-track {
  display: flex;
  flex-direction: column;
}

.footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 10px 10px 10px 24px;
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 100px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  width: fit-content;
  transition: border-color 0.2s, background 0.2s;
}

.footer-btn:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.05);
}

.footer-btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transform: rotate(-45deg);
}

.footer-btn-icon svg {
  width: 16px;
  height: 16px;
  fill: #000;
}

.footer-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 8px;
}

.footer-email {
  font-size: 16px;
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s;
}

.footer-email:hover { opacity: 0.55; }

.footer-socials {
  display: flex;
  gap: 10px;
}

.footer-social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: border-color 0.2s;
}

.footer-social-btn:hover { border-color: #fff; }

.footer-social-btn svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.footer-copyright {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.footer-copyright p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 809px) {
  .site-footer { width: calc(100% + 32px); margin: 0 -16px; }
  .footer-inner { padding: 64px 20px 40px; gap: 48px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 28px; }
}
