/* Three real screens, presented without enclosing cards. The main product
   scene carries the motion; this gallery stays still and uses native scroll. */
.cristal-gallery {
  padding: 105px 0 64px;
  background: #fff;
}

.cristal-gallery-heading {
  text-align: center;
}

.cristal-gallery-heading h2 {
  max-width: 1000px;
  margin: 0 auto;
  font-size: clamp(36px, 4.2vw, 58px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -2.5px;
}

.cristal-gallery-heading p {
  max-width: 680px;
  margin: 23px auto 12px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.cristal-gallery-heading .text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  font-size: 16px;
}

.cristal-gallery-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  width: min(1056px, calc(100% - 72px));
  margin: 62px auto 0;
  padding: 10px 10px 24px;
}

.cristal-gallery-track:focus-visible {
  outline: 3px solid #2589d5;
  outline-offset: 5px;
  border-radius: 12px;
}

.cristal-gallery-item {
  min-width: 0;
  margin: 0;
  text-align: center;
}

.cristal-gallery-phone {
  position: relative;
  width: min(100%, 296px);
  margin: 0 auto;
  padding: 7px;
  border: 1px solid #6e706f;
  border-radius: 44px;
  background: #171918;
  box-shadow: inset 0 0 0 2px #353836, 0 16px 25px -14px #151c214d,
    0 3px 7px #131c2114;
}

.cristal-gallery-phone::before,
.cristal-gallery-phone::after {
  content: "";
  position: absolute;
  width: 2px;
  border-radius: 1px;
  background: #515553;
}

.cristal-gallery-phone::before {
  left: -3px;
  top: 112px;
  height: 40px;
  box-shadow: 0 47px #515553;
}

.cristal-gallery-phone::after {
  right: -3px;
  top: 140px;
  height: 60px;
}

.cristal-gallery-screen {
  overflow: hidden;
  border-radius: 36px;
  background: #fff;
}

.cristal-gallery-status {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  padding: 2px 15px 0 21px;
  color: #151716;
  background: #fff;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: -.2px;
}

.cristal-gallery-status i {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 69px;
  height: 19px;
  transform: translateX(-50%);
  border-radius: 16px;
  background: #101211;
}

.cristal-gallery-status svg {
  width: 37px;
  height: 11px;
}

.cristal-gallery-capture {
  position: relative;
  aspect-ratio: 842 / 1722;
  overflow: hidden;
  background: #fff;
}

/* Original captures are 842 × 1782. Crop only the 60px PWA toolbar. */
.cristal-gallery-capture img {
  position: absolute;
  top: -3.48432056%;
  left: 0;
  width: 100%;
  height: auto;
  max-width: none;
}

.cristal-gallery-home {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 17px;
  background: #fff;
}

.cristal-gallery-home::after {
  content: "";
  width: 35%;
  height: 4px;
  border-radius: 4px;
  background: #151716;
}

.cristal-gallery-item figcaption {
  margin-top: 30px;
}

.cristal-gallery-item h3 {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -.5px;
  line-height: 1.3;
}

.cristal-gallery-item figcaption p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 15px;
}

.cristal-gallery-hint {
  display: none;
}

.cristal-gallery-source {
  width: calc(100% - 36px);
  margin: 18px auto 0;
  color: #737975;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}

.cristal-gallery-source a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  margin-left: 4px;
  color: #0868bc;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 800px) {
  .cristal-gallery {
    padding: 76px 0 45px;
  }

  .cristal-gallery-heading h2 {
    max-width: 560px;
    letter-spacing: -1.8px;
  }

  .cristal-gallery-heading p {
    max-width: 520px;
    font-size: 16px;
  }

  .cristal-gallery-heading p br {
    display: none;
  }

  .cristal-gallery-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 33px 0 15px;
    color: #737975;
    font-size: 12px;
  }

  .cristal-gallery-track {
    /* Leave room for the floating nav and caption even on a short phone. */
    --gallery-width: min(76vw, 296px, calc(65svh * .465));
    --gallery-gutter: calc((100vw - var(--gallery-width)) / 2);
    display: flex;
    gap: 22px;
    width: 100%;
    margin-top: 0;
    padding: 10px var(--gallery-gutter) 26px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gallery-gutter);
    scrollbar-width: thin;
    scrollbar-color: #c5cac7 transparent;
    -webkit-overflow-scrolling: touch;
  }

  .cristal-gallery-track:focus-visible {
    outline-offset: -4px;
    border-radius: 0;
  }

  .cristal-gallery-item {
    flex: 0 0 var(--gallery-width);
    scroll-snap-align: center;
  }

  .cristal-gallery-phone { width: 100%; border-radius: clamp(30px, 8vw, 44px); }
  .cristal-gallery-screen { border-radius: clamp(22px, 6vw, 36px); }
  .cristal-gallery-status { height: clamp(26px, 7vw, 34px); padding-inline: clamp(12px, 4vw, 21px) clamp(9px, 3vw, 15px); font-size: clamp(8px, 2.5vw, 10px); }
  .cristal-gallery-status i { width: 26%; height: clamp(13px, 3.8vw, 19px); }
  .cristal-gallery-status svg { width: clamp(26px, 8vw, 37px); }

  .cristal-gallery-item figcaption {
    margin-top: 20px;
  }

  .cristal-gallery-source {
    max-width: 330px;
    margin-top: 22px;
  }
}

@media (orientation: landscape) and (max-height: 550px) and (max-width: 1000px) {
  .cristal-gallery-track { width: calc(100% - 48px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-inline: 8px; }
  .cristal-gallery-phone { width: min(100%, calc(54svh * .465)); padding: 4px; border-radius: 22px; }
  .cristal-gallery-screen { border-radius: 17px; }
  .cristal-gallery-status { height: 20px; padding: 0 7px; font-size: 6px; }
  .cristal-gallery-status i { top: 3px; width: 28%; height: 10px; }
  .cristal-gallery-status svg { width: 20px; height: 7px; }
  .cristal-gallery-home { height: 10px; }
  .cristal-gallery-home::after { height: 2px; }
  .cristal-gallery-phone::before, .cristal-gallery-phone::after { display: none; }
  .cristal-gallery-item figcaption { margin-top: 14px; }
  .cristal-gallery-item h3 { font-size: 17px; }
  .cristal-gallery-item figcaption p { font-size: 12px; }
  .cristal-gallery-hint { display: none; }
}

@media (max-width: 350px) {
  .cristal-gallery-heading h2 {
    font-size: 34px;
  }

  .cristal-gallery-status {
    padding-right: 13px;
    padding-left: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cristal-gallery-track {
    scroll-behavior: auto;
  }
}
