/* Antara Media Wall (vanilla)
   Cinematic but calm. No jump-scares.
*/

.mediaWallSection{
  margin-top: 10px;
  margin-bottom: 26px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(1200px 720px at 18% 10%, rgba(255,198,92,0.22), transparent 62%),
    radial-gradient(1100px 720px at 92% 86%, rgba(106,225,224,0.18), transparent 62%),
    radial-gradient(900px 560px at 72% 20%, rgba(188,120,255,0.18), transparent 62%),
    linear-gradient(180deg, rgba(12,10,26,0.88), rgba(6,6,12,0.96));
  box-shadow: 0 40px 120px rgba(0,0,0,0.68);
  position: relative;
}

.mediaWallSection::before{
  content:"";
  position:absolute;inset:0;
  pointer-events:none;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.05), transparent 28%, transparent 72%, rgba(255,255,255,0.05));
  opacity:.65;
}

/* Bottom scrim: prevents the phone stack from visually "bleeding" into the next section
   when cards use glass transparency (especially on mobile). */
.mediaWallSection::after{
  content:"";
  position:absolute;left:0;right:0;bottom:0;
  height: 150px;
  pointer-events:none;
  background: linear-gradient(to bottom, rgba(6,6,12,0) 0%, rgba(6,6,12,0.72) 55%, rgba(6,6,12,0.92) 100%);
}

.mediaWall{
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  padding: 28px;
  align-items: center;
}

@media(max-width: 900px){
  .mediaWall{ grid-template-columns: 1fr; }
}

.mediaWallText{ padding: 6px 4px; }

.mediaWallEyebrow{
  font-size: 12px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.64);
}

.mediaWallHeadline{
  margin-top: 10px;
  font-family: Fraunces, ui-serif, Georgia, serif;
  font-size: clamp(36px, 4.4vw, 52px);
  line-height: 1.04;
  font-weight: 600;
  color: rgba(255,255,255,0.98);
  letter-spacing: -0.02em;
}

.mediaWallBody{
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(255,255,255,0.74);
  max-width: 62ch;
}

/* Mobile polish: less crowding, cleaner type, chips behave */
@media (max-width: 520px){
  .mediaWallSection{ margin-bottom: 30px; }
  .mediaWall{padding: 18px; gap: 14px;}
  .mediaWallHeadline{font-size: clamp(30px, 8.4vw, 40px); line-height: 1.06;}
  .mediaWallBody{font-size: 15px;}
  .mediaWallChips{display:grid !important;grid-template-columns: 1fr 1fr 1fr; gap: 8px !important;}
  .mediaWallChip{min-width: 0 !important; padding: 10px 10px !important; border-radius: 16px !important;}
  .mediaWallChip b{font-size: 12px;}
  .mediaWallChip small{font-size: 11px;}
  .mediaWallHint{margin-top: 8px; text-align:center}
}

/* Very small devices: prioritise one hero phone for clarity */
@media (max-width: 420px){
  .mediaWallPhone.layer2,
  .mediaWallPhone.layer3{display:none;}
  .mediaWallStack{height: auto;}
  .mediaWallPhone.layer1{left: 50%; transform: translateX(-50%); width: min(320px, 92vw);}
}

/* Text transitions per slide */
.mwTick .mediaWallEyebrow,
.mwTick .mediaWallHeadline,
.mwTick .mediaWallBody{
  animation: mwText 560ms cubic-bezier(.2,.8,.2,1) both;
}

@keyframes mwText{
  from{ opacity:0; transform: translateY(6px); filter: blur(1px); }
  to{ opacity:1; transform: translateY(0); filter: blur(0); }
}

.mediaWallChips{
  margin-top: 16px;
  display:flex;
  gap:10px;
  flex-wrap: wrap;
}

.mediaWallChip{
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  padding: 10px 12px;
  border-radius: 14px;
  min-width: 150px;
  transition: transform .25s ease, border-color .25s ease, background .25s ease;
  cursor: pointer;
}

.mediaWallChip:hover{
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.06);
}

.mediaWallChip b{ display:block; font-size: 13px; color: rgba(255,255,255,0.92); }
.mediaWallChip small{ display:block; margin-top: 4px; font-size: 12px; color: rgba(255,255,255,0.62); }

.mediaWallChip[data-active="true"]{
  border-color: rgba(255,198,92,0.44);
  background: linear-gradient(180deg, rgba(255,198,92,0.10), rgba(255,255,255,0.03));
  transform: translateY(-1px);
}

/* Device area on the right: now a compact, swipeable carousel (native scroll) */
.mediaWallDeviceWrap{ display:flex; flex-direction:column; align-items:center; justify-content:center; }

/* =========================================================
   Fixed-slot carousel (mwTrack/mwSlide)
   Keeps the screen in ONE place and swaps slides in-place.
   ========================================================= */

.mediaWallStack{
  width: min(520px, 100%);
  margin: 0 auto;
}

/* Frame */
.mwTrack{
  position: relative;
  width: 100%;
  height: clamp(420px, 72vh, 720px); /* ✅ one rule */
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow:
    0 26px 70px rgba(0,0,0,0.62),
    0 0 0 1px rgba(0,0,0,0.22) inset;
  touch-action: pan-y; /* allow vertical scroll, we handle horizontal swipe */
  transform: translateZ(0);
  will-change: transform;
}

/* Slides are stacked, not laid out */
.mwSlide{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translateX(8%);
  transition: opacity 520ms ease, transform 620ms ease;
  pointer-events: none;
}

.mwSlide.isActive{
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.mwSlide.isPrev{
  opacity: 0;
  transform: translateX(-8%);
}

/* Device fills the frame */
.mwSlide .device.mediaWallPhone{
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.mwSlide .device.mediaWallPhone .screen{
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Dots container for mw */
.mwDots{
  display:flex;
  gap: 8px;
  justify-content:center;
  align-items:center;
  margin-top: 10px;
}

/* Small phones: slightly shorter frame */
@media (max-width: 520px){
  .mwTrack{
    height: clamp(420px, 64vh, 620px);
    border-radius: 28px;
  }
}

/* Very small devices: do NOT force stack height (it creates dead space) */
@media (max-width: 420px){
  .mediaWallStack{ height: auto; }
}

/* =========================================================
   (Legacy) Rail carousel styles kept intact
   ========================================================= */

.screenCarousel{ width: min(520px, 100%); }

.screenRail{
  display:flex;
  gap: 14px;
  padding: 10px 6px 2px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.screenRail::-webkit-scrollbar{ display:none; }

.screenItem{
  flex: 0 0 78%;
  scroll-snap-align: center;
}

.deviceFrame{
  width: 100%;
  aspect-ratio: 9 / 19.5;
  max-height: 520px;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.03);
  box-shadow:
    0 26px 70px rgba(0,0,0,0.62),
    0 0 0 1px rgba(0,0,0,0.22) inset;
  position: relative;
}

.deviceFrame::after{
  content:"";
  position:absolute; inset:-2px;
  pointer-events:none;
  background: radial-gradient(520px 420px at 50% 0%, rgba(255,198,92,0.20), transparent 62%);
  mix-blend-mode: screen;
  opacity: .55;
}

.deviceFrame img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

.screenDots{
  display:flex;
  gap: 8px;
  justify-content:center;
  align-items:center;
  margin-top: 10px;
}

.screenDot{
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  cursor: pointer;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.10);
  opacity: .8;
}

.screenDot:focus-visible{
  outline: 2px solid rgba(255,198,92,0.55);
  outline-offset: 4px;
}

.screenDot[data-active="true"]{
  width: 20px;
  background: rgba(255,198,92,0.34);
  border-color: rgba(255,198,92,0.44);
  opacity: 1;
}

/* Smaller, cleaner on phones */
@media (max-width: 520px){
  .screenItem{ flex-basis: 88%; }
  .deviceFrame{ max-height: 420px; border-radius: 28px; }
}

.mediaWallBaseline{
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  margin: 0 22px 16px;
}

.mediaWallHint{margin-top: 10px; opacity: .8}

@media (prefers-reduced-motion: reduce){
  .mediaWallChip{ transition: none !important; }
  .screenRail{ scroll-behavior: auto; }
}

/* =========================================================
   Surgical compatibility layer
   Makes your existing JS + data-attributes behave like the
   richer .screenRail/.screenItem carousel without touching
   left-side copy.
   ========================================================= */

/* If your HTML uses data-carousel-rail/items/dots, style them as the carousel */
[data-carousel-rail]{
  display:flex;
  gap: 14px;
  padding: 10px 6px 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
[data-carousel-rail]::-webkit-scrollbar{ display:none; }

[data-carousel-item]{
  flex: 0 0 78%;
  scroll-snap-align: center;
}

/* Match dot styling */
[data-carousel-dots]{
  display:flex;
  gap: 8px;
  justify-content:center;
  align-items:center;
  margin-top: 10px;
}

/* Ensure the frame always looks premium even if markup differs */
[data-carousel-item] .deviceFrame,
[data-carousel-item] .device,
[data-carousel-item] .mediaWallPhone,
[data-carousel-item] .deviceFrameLike{
  width: 100%;
  aspect-ratio: 9 / 19.5;
  max-height: 520px;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.03);
  box-shadow:
    0 26px 70px rgba(0,0,0,0.62),
    0 0 0 1px rgba(0,0,0,0.22) inset;
  position: relative;
}

/* If there isn't a .deviceFrame wrapper, still style the image nicely */
[data-carousel-item] img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

/* Mobile sizing tweak to avoid “too tall” */
@media (max-width: 520px){
  [data-carousel-item]{ flex-basis: 88%; }
  [data-carousel-item] .deviceFrame,
  [data-carousel-item] .device,
  [data-carousel-item] .mediaWallPhone,
  [data-carousel-item] .deviceFrameLike{
    max-height: 420px;
    border-radius: 28px;
  }
}

/* Ensure Antara screenshots fill the phone screen (fixes tiny image on mobile)
   PREMIUM default: cover (full-bleed). */
.mwTrack .mediaWallImg,
.mwTrack .mediaWallPhone img,
.mwTrack .screen img{
  width: 100%;
  height: 100%;
  display: block;
  object-position: center;
  object-fit: contain;              /* ✅ no cropping */
  background: rgba(0,0,0,0.18);     /* ✅ makes letterbox feel intentional */
}

/* === Fix first-run “starts off-centre” + restore premium feel === */
.mwNoAnim .mwSlide{
  transition: none !important;
}
/* Also remove the default slide offset on first paint */
.mwNoAnim .mwSlide{
  transform: none !important;
}

/* Premium frame treatment: only add the extra property here */
.mwTrack{
  isolation: isolate;
}

.mwTrack::before{
  content:"";
  position:absolute; inset:0;
  pointer-events:none;
  border-radius: inherit;
  background:
    radial-gradient(520px 420px at 50% 0%, rgba(255,198,92,0.18), transparent 62%),
    radial-gradient(520px 420px at 50% 100%, rgba(106,225,224,0.10), transparent 65%),
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.00));
  opacity: .55;
  z-index: 2;
}

.mwTrack::after{
  content:"";
  position:absolute; inset:0;
  pointer-events:none;
  border-radius: inherit;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08) inset,
    0 26px 70px rgba(0,0,0,0.62);
  z-index: 3;
}

/* Hard override any global .device sizing so the screen always fills the slot */
.mwTrack .device.mediaWallPhone{
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  border-radius: inherit;
}

.mwTrack .device.mediaWallPhone .screen{
  width: 100% !important;
  height: 100% !important;
}

/* Final image treatment (premium full-bleed + crisp) */
.mwTrack .mediaWallImg{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;              /* ✅ no cropping */
  background: rgba(0,0,0,0.18);     /* ✅ same as above */
  object-position: center;
  transform: translateZ(0);
  will-change: transform;
  filter: saturate(1.02) contrast(1.03);
}
