/* =========================================================
   Light Years Apart case study
   Figma "MacBook Pro 14" - 2" (5675:5451), 1512px frame.
   Builds on case-study.css (intro, labels, back button, rhythm).
   ========================================================= */

/* Page background: same grey → blue gradient as the home page */
html.lya-page {
  background-color: #e2e6e6;
}

.lya-page body {
  background: linear-gradient(180deg, #e2e6e6 70.37%, #5b787f 123.58%);
}

.lya {
  margin-top: 85.72px;           /* content starts at y=154.72 */
}

.lya + .footer {
  margin-top: 152.3px;
}

/* ---------- Intro ---------- */

.lya-intro {
  gap: 60.612px;
}

.lya-intro .case-intro__head {
  width: min(1435.643px, calc(100% - 76px));
}

.lya-intro .case-intro__title {
  width: 470.539px;
  font-size: 73.783px;
  letter-spacing: -2.2135px;
  white-space: normal;
}

.lya-intro .case-intro__info {
  gap: 69.271px;
}

.lya-intro .case-intro__meta {
  width: 111.7px;
  gap: 32.038px;
}

.lya-intro .meta-block,
.lya-intro .case-intro__overview {
  gap: 11.257px;
}

.lya-intro .case-intro__overview {
  width: 592.268px;
}

.lya-hero {
  display: block;
  width: 100%;
  aspect-ratio: 1511.794 / 621.436;
  object-fit: cover;
}

/* ---------- Gallery (positions from Figma group 5675:6101) ---------- */

.lya-gallery-wrap {
  margin-top: 51.95px;
  display: flex;
  justify-content: center;
}

.lya-gallery {
  position: relative;
  width: min(1444.1px, calc(100% - 67.7px));
  aspect-ratio: 1444.1 / 1267.02;
}

.lya-gallery > img {
  position: absolute;
  display: block;
  object-fit: cover;
}

/* ---------- Problem ---------- */

.lya-problem {
  margin-top: 103.99px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lya-label {
  width: min(1440.14px, calc(100% - 71.7px));
  border-top-width: 0.875px;
  padding-top: 8.739px;
}

.lya-label p {
  font-size: 12.234px;
  letter-spacing: -0.1223px;
}

.lya-problem__row {
  margin-top: 92.63px;
  width: min(1232.156px, calc(100% - 60px));
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-family: var(--font-sans);
  font-weight: 400;
}

.lya-problem__title {
  width: 397.611px;
  flex: none;
  font-size: 36px;
  line-height: 1.3;
  color: #000;
}

.lya-problem__body {
  width: 709.582px;
  display: flex;
  flex-direction: column;
  gap: 44.567px;
  font-size: 21px;
  line-height: 1.3;
  color: #373737;
}

.lya-quote {
  margin-top: 101.369px;
  display: block;
  width: 649.285px;
  aspect-ratio: 649.285 / 463.121;
}

.lya-stat {
  margin-top: 101.369px;
  width: min(1236.525px, calc(100% - 60px));
  display: flex;
  flex-direction: column;
  gap: 21.847px;
}

.lya-stat__text {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 34.955px;
  line-height: 1.5;
  letter-spacing: 0.6991px;
  color: #000;
}

.lya-stat__text strong {
  font-weight: 700;
}

.lya-stat__cite {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 13.456px;
  line-height: 1.5;
  letter-spacing: 0.2691px;
  color: #5f5f5f;
  white-space: nowrap;
}

/* ---------- Solution ---------- */

.lya-solution {
  margin-top: 205.08px;
}

.lya-label--solution {
  width: min(1444.38px, calc(100% - 67.6px));
  margin-left: 37.59px;
}

.lya-steps {
  margin-top: 112.83px;
  padding-left: 113.05px;        /* steps run to the right edge so the tiles can scroll off-screen */
  display: flex;
  flex-direction: column;
  gap: 283.092px;
}

.lya-step {
  display: flex;
  align-items: center;
}

.lya-step__text {
  flex: none;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  color: #000;
}

.lya-step__title {
  font-size: 21.035px;
  letter-spacing: 0.4207px;
}

.lya-step__body {
  font-size: 24.54px;
  letter-spacing: 0.4908px;
}

.lya-visual {
  display: block;
  flex: none;
  object-fit: cover;
}

/* Kiosk / pad mockups: the screen recording plays under a device frame with a cut-out */
.lya-device {
  position: relative;
  flex: none;
}

.lya-device__screen,
.lya-device__frame {
  position: absolute;
  display: block;
  max-width: none;
}

.lya-device__screen {
  object-fit: cover;
}

.lya-using {
  position: relative;
  flex: none;
}

.lya-using__pad {
  position: absolute;
  overflow: hidden;
  border-radius: 12.15px;
}

.lya-using__pad video {
  position: absolute;
  max-width: none;
  object-fit: cover;
}

.lya-stack {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 16.652px;
}

.lya-rounded {
  display: block;
  width: 100%;
  border-radius: 11.394px;
  object-fit: cover;
}

/* ---------- Tiles: sideways-scrolling row of flip cards ---------- */

.lya-step--tiles {
  align-items: center;
}

.lya-tiles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 41.193px;
}

.lya-tiles__scroller {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
  outline: none;
  overscroll-behavior-x: contain;
}

.lya-tiles__scroller::-webkit-scrollbar {
  display: none;
}

.lya-tiles__scroller.is-dragging {
  cursor: grabbing;
}

.lya-tiles__track {
  display: flex;
  align-items: flex-end;
  gap: 33.305px;
  width: max-content;
  margin: 0;
  padding: 4px 40px 4px 0;       /* room for the soft card shadow */
  list-style: none;
}

.lya-tiles__hint {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 12.27px;
  line-height: 1.5;
  letter-spacing: 0.2454px;
  color: #555;
}

.flip-card {
  flex: none;
  width: 265.902px;
  height: 390.018px;
  perspective: 1400px;
}

.flip-card__inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: inherit;
  transform-style: preserve-3d;
  transition: transform 700ms var(--ease);
}

.flip-card__face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  filter: drop-shadow(0 0 1.486px rgba(0, 0, 0, 0.25));
  -webkit-user-drag: none;
  user-select: none;
}

.flip-card__back {
  transform: rotateY(180deg);
}

/* hover flips on mouse/trackpad; a tap or Enter/Space flips on touch screens and keyboards */
@media (hover: hover) {
  .flip-card:hover .flip-card__inner {
    transform: rotateY(180deg);
  }
}

.flip-card.is-flipped .flip-card__inner {
  transform: rotateY(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .flip-card__inner { transition-duration: 1ms; }
}
