/* ============================================
   YOU1S — Homepage 3D Tablet Scroll
   ============================================ */

/* — Hero section with scroll trigger — */
.tablet-hero {
  height: 200vh;
  position: relative;
}

.tablet-hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  perspective: 1000px;
}

/* — Title — */
.tablet-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: var(--sp-4);
  will-change: transform, opacity;
  transition: none;
  line-height: 1.1;
}

.tablet-hero__subtitle {
  font-family: var(--font-body);
  font-size: var(--fs-16);
  color: var(--c-text-secondary);
  text-align: center;
  margin-bottom: var(--sp-24);
  will-change: transform, opacity;
  transition: none;
}

/* — 3D Tablet frame — */
.tablet {
  width: 90%;
  max-width: 900px;
  aspect-ratio: 16/10;
  background: var(--c-white);
  border: 4px solid var(--c-border);
  border-radius: 24px;
  padding: 8px;
  position: relative;
  will-change: transform;
  transition: none;
  box-shadow:
    0 0 #0000004d,
    0 9px 20px #0000004a,
    0 37px 37px #00000042,
    0 84px 50px #00000026,
    0 149px 60px #0000000a,
    0 233px 65px #00000003;
}

@media (min-width: 768px) {
  .tablet {
    padding: 12px;
    border-radius: 30px;
  }
}

/* — Tablet screen — */
.tablet__screen {
  width: 100%;
  height: 100%;
  background: var(--c-bg-alt);
  overflow: hidden;
  position: relative;
  cursor: grab;
  border-radius: 16px;
}

@media (min-width: 768px) {
  .tablet__screen {
    border-radius: 20px;
  }
}

.tablet__screen:active {
  cursor: grabbing;
}

/* — Gallery track inside tablet — */
.tablet__gallery {
  display: flex;
  gap: 12px;
  height: 100%;
  align-items: center;
  padding: 16px;
  will-change: transform;
  user-select: none;
}

@media (min-width: 768px) {
  .tablet__gallery {
    gap: 16px;
    padding: 24px;
  }
}

/* — Gallery card — */
.tablet__card {
  flex-shrink: 0;
  width: 240px;
  height: calc(100% - 32px);
  overflow: hidden;
  background: var(--c-white);
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
  border-radius: 12px;
}

@media (min-width: 768px) {
  .tablet__card {
    width: 320px;
    height: calc(100% - 48px);
  }
}

.tablet__card:hover {
  transform: scale(1.02);
}

.tablet__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* — Card overlay on hover — */
.tablet__card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.tablet__card:hover .tablet__card-overlay {
  opacity: 1;
}

.tablet__card-name {
  font-family: var(--font-display);
  font-size: var(--fs-13);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--ls-nav);
  color: white;
}

.tablet__card-price {
  font-size: var(--fs-12);
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}

/* — Fade edges inside tablet — */
.tablet__fade-left,
.tablet__fade-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}

.tablet__fade-left {
  left: 0;
  background: linear-gradient(to right, var(--c-bg-alt), transparent);
}

.tablet__fade-right {
  right: 0;
  background: linear-gradient(to left, var(--c-bg-alt), transparent);
}

/* — Tablet bottom bar (home indicator) — */
.tablet__home {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--c-border);
  border-radius: 2px;
}

@media (max-width: 767px) {
  .tablet__card {
    width: 200px;
  }
  .tablet__gallery {
    gap: 8px;
    padding: 8px;
  }
  .tablet {
    padding: 8px;
    border-width: 3px;
  }
}
