/* ═══════════════════════════════════════════════════════════════
   PHONE MOCKUP & APP SHOWCASE — FlareSale
   3D transforms, scroll-driven animations, parallax
═══════════════════════════════════════════════════════════════ */

/* ── Scene & Showcase Section ─────────────────────────────── */
.app-showcase {
  position: relative;
  padding: 120px 0 140px;
  overflow: hidden;
  background: radial-gradient(ellipse 120% 80% at 50% 0%, rgba(99,102,241,0.08) 0%, transparent 60%),
              radial-gradient(ellipse 80% 60% at 80% 100%, rgba(6,182,212,0.06) 0%, transparent 60%);
}

.app-showcase::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(180deg, transparent 0%, rgba(5,8,22,0.4) 40%, rgba(5,8,22,0.4) 60%, transparent 100%);
  pointer-events: none;
}

/* ── Section Header ───────────────────────────────────────── */
.showcase-header {
  text-align: center;
  margin-bottom: 80px;
  position: relative;
  z-index: 2;
}

/* ── Phone Scene Container ────────────────────────────────── */
.phone-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 680px;
  z-index: 2;
  perspective: 1400px;
  transform-style: preserve-3d;
}

/* ── Individual Phone Wrapper ─────────────────────────────── */
.phone-wrapper {
  position: relative;
  flex-shrink: 0;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.phone-wrapper:hover {
  transform: var(--hover-transform) scale(1.04) !important;
  z-index: 10 !important;
}

/* Side phones */
.phone-wrapper.phone-left {
  --hover-transform: rotateY(-2deg) translateY(-8px);
  transform: rotateY(-28deg) translateX(60px) translateZ(-80px) scale(0.88);
  margin-right: -40px;
  z-index: 1;
  opacity: 0.85;
}

.phone-wrapper.phone-right {
  --hover-transform: rotateY(2deg) translateY(-8px);
  transform: rotateY(28deg) translateX(-60px) translateZ(-80px) scale(0.88);
  margin-left: -40px;
  z-index: 1;
  opacity: 0.85;
}

/* Center phone — hero */
.phone-wrapper.phone-center {
  --hover-transform: rotateY(0deg) translateY(-12px);
  transform: rotateY(0deg) translateZ(60px) scale(1.05);
  z-index: 5;
}

/* Far phones */
.phone-wrapper.phone-far-left {
  --hover-transform: rotateY(-4deg) translateY(-8px);
  transform: rotateY(-40deg) translateX(80px) translateZ(-180px) scale(0.74);
  margin-right: -70px;
  z-index: 0;
  opacity: 0.6;
}

.phone-wrapper.phone-far-right {
  --hover-transform: rotateY(4deg) translateY(-8px);
  transform: rotateY(40deg) translateX(-80px) translateZ(-180px) scale(0.74);
  margin-left: -70px;
  z-index: 0;
  opacity: 0.6;
}

/* ── Phone Frame ──────────────────────────────────────────── */
.phone-frame {
  position: relative;
  width: 260px;
  height: 530px;
  border-radius: 44px;
  background: linear-gradient(145deg, #1e2a3a 0%, #0d1520 40%, #141c2a 100%);
  box-shadow:
    /* outer depth */
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 0 2px rgba(0,0,0,0.8),
    /* rim lighting */
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -1px 0 rgba(0,0,0,0.6),
    /* ambient shadow */
    0 40px 100px -20px rgba(0,0,0,0.9),
    0 20px 60px -10px rgba(0,0,0,0.6),
    /* color glow */
    0 0 60px -15px rgba(99,102,241,0.3);
  transform-style: preserve-3d;
  cursor: pointer;
}

.phone-frame::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 45px;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.18) 0%,
    rgba(255,255,255,0.04) 30%,
    transparent 60%,
    rgba(255,255,255,0.06) 100%
  );
  pointer-events: none;
  z-index: 10;
}

/* Notch / Dynamic Island */
.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 30px;
  background: #050816;
  border-radius: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.phone-notch::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #1a2a3a, #0a1520);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 0 6px rgba(99,102,241,0.4);
}

/* Status bar */
.phone-status {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 54px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 8px 18px 0;
  z-index: 15;
  font-size: 9px;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  font-family: 'Inter', sans-serif;
  pointer-events: none;
}

/* Screen */
.phone-screen {
  position: absolute;
  inset: 10px;
  border-radius: 36px;
  overflow: hidden;
  background: #f0f2f5;
  z-index: 5;
}

.phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Side buttons */
.phone-button-right {
  position: absolute;
  right: -3px;
  top: 100px;
  width: 3px;
  height: 60px;
  background: linear-gradient(180deg, #2a3a4a, #1a2a3a);
  border-radius: 0 3px 3px 0;
  box-shadow: 2px 0 6px rgba(0,0,0,0.4);
}

.phone-button-left {
  position: absolute;
  left: -3px;
  top: 90px;
  width: 3px;
  height: 40px;
  background: linear-gradient(180deg, #2a3a4a, #1a2a3a);
  border-radius: 3px 0 0 3px;
  box-shadow: -2px 0 6px rgba(0,0,0,0.4);
}

.phone-button-left::before,
.phone-button-left::after {
  content: '';
  position: absolute;
  left: 0;
  width: 3px;
  height: 30px;
  background: linear-gradient(180deg, #2a3a4a, #1a2a3a);
  border-radius: 3px 0 0 3px;
  box-shadow: -2px 0 6px rgba(0,0,0,0.3);
}
.phone-button-left::before { top: 50px; }
.phone-button-left::after  { top: 90px; }

/* Reflection overlay */
.phone-reflection {
  position: absolute;
  inset: 10px;
  border-radius: 36px;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.12) 0%,
    transparent 40%,
    transparent 60%,
    rgba(255,255,255,0.04) 100%
  );
  z-index: 9;
  pointer-events: none;
}

/* ── Shadow under phones ──────────────────────────────────── */
.phone-shadow {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 24px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.55) 0%, transparent 70%);
  filter: blur(8px);
}

/* ── Floating Label / Caption ─────────────────────────────── */
.phone-label {
  position: absolute;
  bottom: -66px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  pointer-events: none;
}

/* ── Feature Callouts floating next to phones ─────────────── */
.feature-callout {
  position: absolute;
  background: rgba(13,17,35,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(99,102,241,0.1);
  z-index: 20;
  animation: calloutFloat 4s ease-in-out infinite;
  pointer-events: none;
}

.feature-callout:nth-child(even) {
  animation-delay: -2s;
}

@keyframes calloutFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

.callout-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.callout-icon.teal   { background: rgba(6,182,212,0.2);  }
.callout-icon.indigo { background: rgba(99,102,241,0.2); }
.callout-icon.green  { background: rgba(16,185,129,0.2); }
.callout-icon.orange { background: rgba(245,158,11,0.2); }

.callout-text { }
.callout-label { font-size: 10px; color: rgba(255,255,255,0.45); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.callout-value { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.2; }

/* callout positions */
.callout-top-left    { top: 60px;  left: -20px; }
.callout-top-right   { top: 40px;  right: -20px; }
.callout-mid-left    { top: 50%;   left: -10px;  transform: translateY(-50%); }
.callout-mid-right   { top: 50%;   right: -10px; transform: translateY(-50%); }
.callout-bot-left    { bottom: 80px; left: -10px; }
.callout-bot-right   { bottom: 60px; right: -10px; }

/* ── Scrolling Features Strip ─────────────────────────────── */
.features-strip {
  position: relative;
  margin-top: 100px;
  z-index: 2;
}

.strip-track {
  display: flex;
  gap: 24px;
  overflow: hidden;
  padding: 8px 0 20px;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.strip-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 40px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  white-space: nowrap;
  animation: stripScroll 28s linear infinite;
}

.strip-item .s-icon {
  font-size: 16px;
}

@keyframes stripScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ═══ PARALLAX SCROLL SHOWCASE ════════════════════════════ */
.scroll-showcase {
  position: relative;
  padding: 80px 0 120px;
  overflow: hidden;
}

.scroll-showcase-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  align-items: center;
}

.scroll-showcase-inner.reverse {
  direction: rtl;
}
.scroll-showcase-inner.reverse > * {
  direction: ltr;
}

/* Text side */
.scroll-text {
  padding: 40px;
  position: relative;
  z-index: 2;
}

.scroll-text .feature-num {
  font-size: 72px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(6,182,212,0.1));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: -10px;
  font-variant-numeric: tabular-nums;
}

.scroll-text h3 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.2;
}

.scroll-text p {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.75;
  margin-bottom: 24px;
}

.scroll-text .tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scroll-text .tag {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(99,102,241,0.3);
  color: rgba(99,102,241,0.9);
  background: rgba(99,102,241,0.08);
  letter-spacing: 0.04em;
}

.scroll-text .tag.teal {
  border-color: rgba(6,182,212,0.3);
  color: rgba(6,182,212,0.9);
  background: rgba(6,182,212,0.08);
}

.scroll-text .tag.green {
  border-color: rgba(16,185,129,0.3);
  color: rgba(16,185,129,0.9);
  background: rgba(16,185,129,0.08);
}

/* Phone side */
.scroll-phone-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  position: relative;
}

/* Single taller phone for scroll sections */
.phone-tall {
  position: relative;
  width: 240px;
  height: 490px;
  border-radius: 40px;
  background: linear-gradient(145deg, #1e2a3a 0%, #0d1520 50%, #141c2a 100%);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 0 2px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 60px 120px -20px rgba(0,0,0,0.95),
    0 30px 80px -10px rgba(0,0,0,0.7);
  transform-style: preserve-3d;
  will-change: transform;
  transition: box-shadow 0.4s ease;
}

.phone-tall::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 41px;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.18) 0%,
    rgba(255,255,255,0.04) 25%,
    transparent 55%,
    rgba(255,255,255,0.06) 100%
  );
  pointer-events: none;
  z-index: 10;
}

.phone-tall .phone-screen {
  position: absolute;
  inset: 9px;
  border-radius: 33px;
  overflow: hidden;
  background: #f0f2f5;
  z-index: 5;
}

.phone-tall .phone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

.phone-tall .phone-notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 95px;
  height: 26px;
  background: #050816;
  border-radius: 16px;
  z-index: 20;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.phone-tall .phone-reflection {
  position: absolute;
  inset: 9px;
  border-radius: 33px;
  background: linear-gradient(135deg,
    rgba(255,255,255,0.1) 0%,
    transparent 35%,
    transparent 65%,
    rgba(255,255,255,0.04) 100%
  );
  z-index: 9;
  pointer-events: none;
}

.phone-tall .phone-button-right {
  position: absolute;
  right: -3px;
  top: 90px;
  width: 3px;
  height: 55px;
  background: linear-gradient(180deg, #2a3a4a, #1a2a3a);
  border-radius: 0 3px 3px 0;
}

.phone-tall .phone-button-left {
  position: absolute;
  left: -3px;
  width: 3px;
  height: 34px;
  background: linear-gradient(180deg, #2a3a4a, #1a2a3a);
  border-radius: 3px 0 0 3px;
}

.phone-tall .phone-button-left.btn1 { top: 80px; }
.phone-tall .phone-button-left.btn2 { top: 124px; }
.phone-tall .phone-button-left.btn3 { top: 168px; }

/* Glow per phone */
.phone-tall.glow-teal {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 0 2px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 60px 120px -20px rgba(0,0,0,0.95),
    0 30px 80px -10px rgba(0,0,0,0.7),
    0 0 80px -10px rgba(6,182,212,0.35);
}

.phone-tall.glow-indigo {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 0 2px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 60px 120px -20px rgba(0,0,0,0.95),
    0 30px 80px -10px rgba(0,0,0,0.7),
    0 0 80px -10px rgba(99,102,241,0.35);
}

.phone-tall.glow-green {
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 0 0 2px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 60px 120px -20px rgba(0,0,0,0.95),
    0 30px 80px -10px rgba(0,0,0,0.7),
    0 0 80px -10px rgba(16,185,129,0.35);
}

/* Decorative blob behind phone */
.phone-blob {
  position: absolute;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  filter: blur(70px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}
.phone-blob.teal   { background: radial-gradient(circle, rgba(6,182,212,0.6), transparent 70%); }
.phone-blob.indigo { background: radial-gradient(circle, rgba(99,102,241,0.6), transparent 70%); }
.phone-blob.green  { background: radial-gradient(circle, rgba(16,185,129,0.6), transparent 70%); }

/* ── Scroll Reveal ────────────────────────────────────────── */
.reveal-up {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34,1.12,0.64,1);
}
.reveal-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px) rotateY(10deg);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.34,1.12,0.64,1);
}
.reveal-left.in-view {
  opacity: 1;
  transform: translateX(0) rotateY(0deg);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px) rotateY(-10deg);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.34,1.12,0.64,1);
}
.reveal-right.in-view {
  opacity: 1;
  transform: translateX(0) rotateY(0deg);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.85) translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.34,1.56,0.64,1);
}
.reveal-scale.in-view {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Stagger delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* ── Horizontal phone scroll carousel ───────────────────── */
.phones-carousel {
  position: relative;
  overflow: hidden;
  padding: 40px 0 60px;
}

.phones-track {
  display: flex;
  gap: 24px;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
  padding: 20px 60px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(13,17,35,0.8);
  backdrop-filter: blur(12px);
  color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.carousel-btn:hover {
  background: rgba(99,102,241,0.3);
  border-color: rgba(99,102,241,0.5);
  transform: translateY(-50%) scale(1.08);
}
.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }

/* ── Mouse-tilt 3D effect ─────────────────────────────────── */
.phone-tilt {
  transform-style: preserve-3d;
  transition: transform 0.1s ease;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1200px) {
  .phone-wrapper.phone-far-left,
  .phone-wrapper.phone-far-right {
    display: none;
  }
}

@media (max-width: 900px) {
  .phone-scene {
    perspective: 800px;
    min-height: 500px;
  }
  .phone-frame {
    width: 200px;
    height: 408px;
    border-radius: 36px;
  }
  .phone-wrapper.phone-left {
    transform: rotateY(-20deg) translateX(30px) translateZ(-40px) scale(0.85);
    margin-right: -30px;
  }
  .phone-wrapper.phone-right {
    transform: rotateY(20deg) translateX(-30px) translateZ(-40px) scale(0.85);
    margin-left: -30px;
  }
  .scroll-showcase-inner {
    grid-template-columns: 1fr;
    padding: 0 24px;
  }
  .scroll-showcase-inner.reverse {
    direction: ltr;
  }
  .scroll-text h3 {
    font-size: 1.6rem;
  }
  .feature-callout {
    display: none;
  }
}

@media (max-width: 640px) {
  .phone-wrapper.phone-left,
  .phone-wrapper.phone-right {
    display: none;
  }
  .phone-frame {
    width: 230px;
    height: 470px;
  }
  .app-showcase {
    padding: 80px 0 100px;
  }
}

/* ── Divider glow line ─────────────────────────────────────── */
.section-divider {
  position: relative;
  height: 1px;
  max-width: 800px;
  margin: 0 auto;
  background: linear-gradient(to right, transparent, rgba(99,102,241,0.4) 30%, rgba(6,182,212,0.4) 70%, transparent);
}

.section-divider::after {
  content: '';
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(to right, #6366f1, #06b6d4);
  filter: blur(4px);
}
