/* Pay by Link (LEGO) case study only */

/* LEGO Typewell: only for UI recreated from the LEGO app (Pay via Email card) */
@font-face {
  font-family: "LEGO Typewell";
  src: url("../assets/lego-lisa/LEGO%20Font/LEGOTypewell-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "LEGO Typewell";
  src: url("../assets/lego-lisa/LEGO%20Font/LEGOTypewell-Bold.otf") format("opentype");
  font-weight: 700;
  font-display: swap;
}

.lisa-sections { gap: 80px; }

/* Overview card */
.lisa-overview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  padding: 24px 48px;
  overflow: clip;
  background: var(--surface-lightbluegradient);
  backdrop-filter: blur(72px);
}
.lisa-overview__rows { display: flex; flex-direction: column; width: 100%; }
.lisa-row {
  display: flex;
  align-items: center;
  gap: 120px;
  width: 100%;
}
.lisa-row--first { height: 400px; }
.lisa-row--first .text-box { flex: 1 0 0; gap: 48px; }
.lisa-row--second .text-box { width: 322px; gap: 40px; }
.lisa-row__img--browse { flex-shrink: 0; width: 238px; height: 372px; }
.lisa-row__img--browse img { display: block; height: 372px; width: auto; }
.lisa-row__img--qr { position: relative; flex-shrink: 0; width: 225px; height: 487px; }
.lisa-row__img--qr img {
  position: absolute;
  left: -48px; /* runs to the card edge, as in Figma */
  top: 0;
  width: 273px;
  height: 511px;
  max-width: none;
}
.lisa-closing {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 48px 10px;
}
.lisa-closing .cs-heading { width: 628px; max-width: 100%; text-align: center; }

/* Shared block layouts */
.lisa-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}
.lisa-block--12 { gap: 12px; }
.lisa-block--48 { gap: 48px; }
.lisa-block--64 { gap: 64px; }
.lisa-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.lisa-col { width: 322px; flex-shrink: 0; }
.lisa-figure img { display: block; width: 100%; height: auto; }

/* Mid-fidelity prototype (looping video) */
.lisa-midfi {
  display: flex;
  align-items: center;
  gap: 120px;
  width: 100%;
  margin-top: -32px; /* sits directly under the user flow image, as in Figma */
  padding-left: 67px;
}
.lisa-midfi .text-box { width: 341px; }
.proto {
  position: relative;
  flex-shrink: 0;
  width: 205px;
  height: 443.641px;
  overflow: hidden;
  background: var(--text-white);
  border-radius: 17.73px;
  box-shadow: 0 4.432px 8.865px 0 rgba(0, 0, 0, 0.25);
}
.proto video { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Addressing concerns */
.lisa-email-cols { display: flex; gap: 20px; }
.lisa-email-cols .body-text { width: 389px; }
.lisa-instructions { display: flex; align-items: center; gap: 88px; width: 100%; }
.lisa-instructions img { display: block; width: 389px; height: auto; }

/* Pay via Email card: the Figma frame rebuilt live, with the pulsing expiry line */
.pay-card {
  position: relative;
  flex-shrink: 0;
  width: 429.92px;
  height: 286.613px;
  overflow: hidden;
  border-radius: 13.228px 13.228px 50.708px 50.708px;
  box-shadow: 0 4.409px 13.228px 0 rgba(0, 0, 0, 0.25);
  font-family: "LEGO Typewell", var(--font-inter);
  color: var(--lego-text);
}
/* The phone screen ("Component 4"), shifted up so only the email block shows */
.pay-card__screen {
  position: absolute;
  left: 0;
  top: -643.778px;
  width: 429.92px;
  height: 930.391px;
  overflow: hidden;
  border-radius: 50.708px;
  background: var(--lego-surface);
  mix-blend-mode: luminosity;
}
.pay-card__details {
  position: absolute;
  left: 13.228px;
  top: 650.392px;
  width: 403.463px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26.457px;
  padding: 17.638px;
  border-radius: 8.819px;
  background: var(--lego-surface);
}
.pay-card__copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4.409px;
  width: 100%;
  text-align: center;
  letter-spacing: 0.2205px;
}
.pay-card__title { font-size: 19.842px; font-weight: 700; line-height: 1.5; }
.pay-card__text { font-size: 17.638px; line-height: 1.5; }
.pay-card__text b { font-weight: 700; }
.pay-card__button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8.819px;
  width: 368.188px;
  height: 56.457px;
  padding: 13.228px 52.913px;
  border-radius: 48.504px;
  background: var(--lego-action-secondary);
  font-size: 19.84px;
  line-height: 1.5;
  letter-spacing: 0.2px;
  color: var(--lego-blue);
}
.pay-card__button img { width: 26.457px; height: 26.457px; }
.pay-card__expiry {
  position: absolute;
  left: 50%;
  top: 222.68px;
  width: 368.188px;
  translate: -50% 0;
  font-size: 15.676px;
  line-height: 1.5;
  letter-spacing: 0.2205px;
  text-align: center;
  color: var(--text-lightgrey);
  animation: expiry-pulse 4s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
/* Grey is the default; it eases to blue and back, 2s each way */
@keyframes expiry-pulse {
  0%, 100% { color: var(--text-lightgrey); }
  50% { color: var(--lego-blue); }
}

/* Final design: Figma's iPhone frame with the screen recording cropped into the screen */
.lisa-final { height: 622.418px; }
.lisa-final .lisa-col { display: flex; flex-direction: column; gap: 32px; }
.lisa-phone { position: relative; flex-shrink: 0; width: 302.76px; height: 622.418px; }
.lisa-phone__frame {
  position: absolute;
  left: -2.816px; /* side buttons stick out of the frame */
  top: 0;
  width: 308.667px;
  height: 622.667px;
  max-width: none;
}
.lisa-phone__screen {
  position: absolute;
  left: 14.082px;
  top: 16.195px;
  width: 274.596px;
  height: 594.254px;
  overflow: hidden;
  border-radius: 32.388px;
  background: var(--text-white);
}
/* Figma video crop: x 38.02%, y 10.89%, w 23.78%, h 82.44% of the 2880×1800 recording */
.lisa-phone__screen video {
  position: absolute;
  left: -438.96px;
  top: -78.49px;
  width: 1154.51px;
  height: 720.79px;
  max-width: none;
}
/* Notch and camera sit on top of the video (cropped from the frame image) */
.lisa-phone__notch {
  position: absolute;
  left: 82.379px;
  top: 11.264px;
  width: 137.298px;
  height: 26.051px;
  border-radius: 0 0 15px 15px;
  background: url("../assets/lego-lisa/final-design-phone.png") -85.195px -11.264px / 308.667px 622.667px no-repeat;
}

/* Validation: mock store video with minifigures in front */
.lisa-mockstore { position: relative; flex-shrink: 0; width: 334.733px; height: 439px; }
.lisa-video--store {
  position: absolute;
  left: 11.866px;
  top: 0;
  width: 320px;
  height: 401px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.25);
}
/* Figma video crop: full width, y from 12.84%, 70.49% of the height */
.lisa-video--store video {
  position: absolute;
  left: 0;
  top: -73.04px;
  width: 320px;
  height: 568.89px;
  max-width: none;
}
/* Figma overlay: 40% black gradient fading upward, plus the 4px inside border */
.lisa-video--store::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 4px solid var(--border-paleblue);
  border-radius: 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4) 12.02%, rgba(102, 102, 102, 0) 100%);
}
.lisa-mockstore__figs {
  position: absolute;
  left: -8px;
  top: 256px;
  width: 351px;
  max-width: none;
  pointer-events: none;
}
.lisa-validation { display: flex; flex-direction: column; gap: 32px; }
.lisa-validation .section-heading { width: auto; }

@media (prefers-reduced-motion: reduce) {
  .pay-card__expiry { animation: none; color: var(--lego-blue); }
}

@media (max-width: 900px) {
  .lisa-overview { padding: 24px; }
  .lisa-row,
  .lisa-split,
  .lisa-midfi,
  .lisa-instructions {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    gap: 32px;
    padding-left: 0;
  }
  .lisa-row--second { flex-direction: column-reverse; }
  .lisa-row .text-box,
  .lisa-row--second .text-box,
  .lisa-midfi .text-box,
  .lisa-col { width: 100%; }
  .lisa-row__img--qr { margin-left: 24px; }
  .lisa-email-cols { flex-direction: column; gap: 12px; }
  .lisa-email-cols .body-text { width: 100%; }
  .lisa-instructions img { width: 100%; max-width: 389px; height: auto; }

  .lisa-final { height: auto; }
  .lisa-mockstore { align-self: center; }
}
@media (max-width: 560px) {
  .pay-card { zoom: 0.72; }
}
@media (max-width: 400px) {
  .lisa-mockstore { transform: scale(0.85); transform-origin: top center; margin-bottom: -66px; }
}
