/* ==========================================================================
   WallTune Landing v2 — Simulator CSS
   Based on the real landing-page/css/style.css simulator block.
   Liquid Glass is ONLY applied to .app-tabs (the tab bar inside the app).
   Monitors use the exact same sizing approach as the real landing.
   ========================================================================== */

/* ─── HERO LAYOUT ──────────────────────────────────────────────────────── */
.hero {
  padding-top: 120px;
  padding-bottom: 0;
  overflow: visible;
}

.hero-grid {
  width: min(100%, calc(100vw - 48px));
  margin-inline: auto;
}

.hero-grid--simulator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.hero-copy {
  max-width: 760px;
  text-align: center;
}

.hero-copy--center {
  align-items: center;
  display: flex;
  flex-direction: column;
}

/* ─── SIMULATOR OUTER WRAPPER ───────────────────────────────────────────── */
.hero-simulator {
  width: 100%;
  --active-wallpaper: url('../assets/w1.png');
  --monitor-left-wallpaper: url('../assets/w1.png');
  --monitor-right-wallpaper: url('../assets/w2.png');
  --app-progress: 0;
  --app-scale-progress: 0;
  --monitor-progress: 0;
}

/* ─── HEADER MOTION PROTOTYPE ────────────────────────────────────────────
   Phase 1 (0–52%): the app window rises from a flat perspective.
   Phase 2 (48–92%): two monitor placeholders emerge from behind it.
   No product imagery is used while the motion language is being approved.
   ---------------------------------------------------------------------- */
.simulator-workspace--legacy {
  display: none;
}

.hero-motion-track {
  position: relative;
  width: 100%;
  height: 210vh;
  min-height: 1320px;
}

.hero-motion-sticky {
  position: sticky;
  top: 64px;
  display: grid;
  place-items: center;
  height: calc(100vh - 64px);
  min-height: 620px;
  overflow: clip;
  perspective: 1600px;
}

.hero-motion-sticky::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2%;
  width: min(940px, 78vw);
  height: 38%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(240,131,74,.12), transparent 68%);
  opacity: calc(.36 - (var(--app-progress) * .36));
  transform: translateX(-50%);
  filter: blur(24px);
  pointer-events: none;
}

.hero-motion-scene {
  position: relative;
  width: min(1180px, calc(100vw - 48px));
  aspect-ratio: 16 / 9;
  transform-style: preserve-3d;
}

/* A temporary, atmospheric halo: it belongs to the app, not the page. */
.hero-motion-scene::before {
  content: '';
  position: absolute;
  z-index: 2;
  top: 16%;
  left: 7%;
  width: 86%;
  height: 80%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255, 204, 141, .38) 0%, rgba(246, 118, 87, .28) 30%, rgba(223, 74, 93, .1) 50%, transparent 74%);
  opacity: calc(.82 - (var(--app-progress) * .82));
  filter: blur(42px);
  transform: translateZ(10px);
  pointer-events: none;
}



.motion-app-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 9%;
  min-height: 24px;
  padding-inline: 14px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.035);
}

.motion-app-chrome span {
  width: clamp(7px, .8vw, 11px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
}

.motion-app-chrome i {
  width: 24%;
  height: 5px;
  margin-left: auto;
  border-radius: 99px;
  background: rgba(255,255,255,.08);
}

.motion-app-body {
  display: grid;
  grid-template-columns: 22% 1fr 1fr;
  grid-template-rows: 1.25fr .75fr;
  gap: clamp(10px, 1.4vw, 18px);
  height: 91%;
  padding: clamp(14px, 2vw, 26px);
}

.motion-app-sidebar,
.motion-app-panel {
  display: block;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: clamp(8px, 1vw, 13px);
  background: rgba(255,255,255,.035);
}

.motion-app-sidebar {
  grid-row: 1 / 3;
}

.motion-app-panel--wide {
  grid-column: 2 / 4;
}

.motion-monitor {
  position: absolute;
  z-index: 1;
  top: 8%;
  width: 47%;
  height: 49%;
  opacity: var(--monitor-progress);
  filter: brightness(calc(.55 + (var(--monitor-progress) * .45)));
}

.motion-monitor--left {
  left: 1%;
  transform:
    translate3d(
      calc(34% - (var(--monitor-progress) * 34%)),
      calc(150px - (var(--monitor-progress) * 150px)),
      0
    )
    rotateY(calc(8deg - (var(--monitor-progress) * 8deg)))
    scale(calc(.68 + (var(--monitor-progress) * .37)));
}

.motion-monitor--right {
  right: 1%;
  transform:
    translate3d(
      calc(-34% + (var(--monitor-progress) * 34%)),
      calc(150px - (var(--monitor-progress) * 150px)),
      0
    )
    rotateY(calc(-8deg + (var(--monitor-progress) * 8deg)))
    scale(calc(.68 + (var(--monitor-progress) * .37)));
}

.motion-monitor-screen {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: clamp(8px, 1vw, 14px);
  background: rgba(255,255,255,.035);
  box-shadow:
    0 26px 68px rgba(0,0,0,.5),
    inset 0 0 0 5px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.12);
}

.motion-monitor-neck,
.motion-monitor-foot {
  position: absolute;
  left: 50%;
  display: block;
  background: rgba(255,255,255,.12);
  transform: translateX(-50%);
}

.motion-monitor-neck {
  top: 100%;
  width: 7%;
  height: 14%;
}

.motion-monitor-foot {
  top: 113%;
  width: 24%;
  height: 3%;
  border-radius: 99px;
}

@media (max-width: 900px) {
  .hero-motion-track {
    height: 180vh;
    min-height: 1100px;
  }

  .hero-motion-sticky {
    top: 56px;
    height: calc(100vh - 56px);
    min-height: 520px;
  }

  .hero-motion-scene {
    width: min(920px, calc(100vw - 28px));
  }


  .motion-monitor {
    top: 5%;
    width: 52%;
    height: 52%;
  }

  .motion-monitor--left { left: -3%; }
  .motion-monitor--right { right: -3%; }
}

@media (max-width: 560px) {
  .hero-motion-track {
    height: 160vh;
    min-height: 900px;
  }

  .hero-motion-sticky {
    min-height: 440px;
  }

  .hero-motion-scene {
    width: calc(100vw - 20px);
    aspect-ratio: 4 / 5;
  }


  .motion-monitor {
    top: 16%;
    width: 54%;
    height: 33%;
  }

  .motion-monitor--left { left: -5%; }
  .motion-monitor--right { right: -5%; }

  .motion-app-body {
    gap: 8px;
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-simulator {
    --app-progress: 1 !important;
    --monitor-progress: 1 !important;
  }

  .hero-motion-track {
    height: auto;
    min-height: 0;
  }

  .hero-motion-sticky {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
  }
}

/* ─── WORKSPACE: positions the stage + app window ──────────────────────── */
.simulator-workspace {
  position: relative;
  width: 100%;
  height: clamp(880px, 60vw, 1160px);
  margin: 0 auto;
  /* These vars size both monitors and the spanning overlap */
  --desk-w: min(1800px, 105vw);
  --left-w:  calc(var(--desk-w) * .45);
  --right-w: calc(var(--desk-w) * .55);
  --right-h: calc(var(--right-w) * .5625);
  --left-h:  calc(var(--left-w)  * .5625);
  --left-offset: calc(var(--right-h) * .12);
  --span-h:  var(--right-h);
}

.monitor-showcase {
  position: relative;
  width: 100%;
  padding: 100px 0;
  overflow: hidden;
}

.monitor-showcase .simulator-workspace {
  height: clamp(520px, 44vw, 640px);
}

/* ─── MONITOR STAGE (absolute inside the new showcase) ──────────────────── */
.monitor-stage {
  position: relative;
  z-index: 1;
  top: 0;
  left: 50%;
  width: var(--desk-w);
  height: calc(var(--right-h) + var(--left-offset));
  transform: translateX(-50%);
}

/* ─── FAKE MONITOR: base ────────────────────────────────────────────────── */
.fake-monitor {
  position: absolute;
  padding: 2px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 5px;
  background: rgba(255,255,255,.055);
  box-shadow: 0 32px 82px rgba(0,0,0,.54);
  transition:
    border-color .18s var(--ease),
    box-shadow .18s var(--ease),
    transform .18s var(--ease);
}

.fake-monitor::after {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 8%;
  background-image: url('../assets/dock.png');
  background-size: contain;
  background-position: bottom center;
  background-repeat: no-repeat;
  z-index: 10;
  pointer-events: none;
  opacity: 0.95;
}

/* Monitor hover / selection highlight */
.fake-monitor:hover,
.fake-monitor.is-hovered,
.fake-monitor.is-selected {
  border-color: rgba(10,132,255,.96);
  box-shadow:
    0 32px 82px rgba(0,0,0,.54),
    0 0 0 2px rgba(10,132,255,.38),
    0 0 28px rgba(10,132,255,.34);
}

/* Highlight by monitor choice hover (from the detail view popover) */
.hero-simulator:has([data-monitor-choice="HDMI"]:hover)     [data-monitor-screen="HDMI"],
.hero-simulator:has([data-monitor-choice="LS24C31x"]:hover) [data-monitor-screen="LS24C31x"] {
  border-color: rgba(10,132,255,.96);
  box-shadow:
    0 32px 82px rgba(0,0,0,.54),
    0 0 0 2px rgba(10,132,255,.38),
    0 0 28px rgba(10,132,255,.34);
}

/* ─── Left monitor (smaller, offset down slightly) ──────────────────────── */
.fake-monitor--left {
  top: var(--left-offset);
  left: 0;
  width: var(--left-w);
  height: var(--left-h);
}

/* ─── Right monitor (larger, full height) ───────────────────────────────── */
.fake-monitor--right {
  top: 0;
  left: var(--left-w);
  width: var(--right-w);
  height: var(--right-h);
}

/* ─── Fake screen (inside monitor) ─────────────────────────────────────── */
.fake-screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 3px;
  background: #050505;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

/* ─── Wallpaper / video layers ──────────────────────────────────────────── */
.monitor-wallpaper,
.monitor-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.monitor-wallpaper {
  background-image: var(--monitor-left-wallpaper);
  background-size: cover;
  background-position: center;
}

.fake-monitor--right .monitor-wallpaper {
  background-image: var(--monitor-right-wallpaper);
}

.monitor-video {
  opacity: 0;
  pointer-events: none;
}

.fake-monitor.is-video .monitor-video   { opacity: 1; }
.fake-monitor.is-video .monitor-wallpaper { opacity: 0; }

/* ─── Spanned mode: shared wallpaper stretches across both monitors ─────── */
.hero-simulator[data-mode="spanned"] .monitor-wallpaper,
.hero-simulator[data-mode="spanned"] .monitor-video {
  width: var(--desk-w);
  height: var(--span-h);
}
.hero-simulator[data-mode="spanned"] .fake-monitor--left  .monitor-wallpaper,
.hero-simulator[data-mode="spanned"] .fake-monitor--left  .monitor-video {
  left: 0;
  top: calc(var(--left-offset) * -1);
}
.hero-simulator[data-mode="spanned"] .fake-monitor--right .monitor-wallpaper,
.hero-simulator[data-mode="spanned"] .fake-monitor--right .monitor-video {
  left: calc(var(--left-w) * -1);
  top: 0;
}

/* ─── macOS-style menu bar on each fake monitor ─────────────────────────── */
.screen-menu-bar {
  position: absolute;
  z-index: 4;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: clamp(4px, .5vw, 8px);
  height: clamp(10px, 1.2vw, 14px);
  padding: 0 clamp(4px, .6vw, 8px);
  color: #fff;
  background: rgba(0,0,0,.54);
  font-size: clamp(.28rem, .48vw, .44rem);
  font-weight: 800;
  white-space: nowrap;
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
}

/* ─── App window (overlaid in front of monitors) ────────────────────────── */
.app-simulator-window {
  position: relative;
  transform: perspective(1400px) rotateX(45deg) translateY(40px) scale(0.9);
  transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: preserve-3d;
  z-index: 5;
  margin: 0 auto;
  width: min(1000px, 92%);
  height: clamp(400px, 45vw, 600px);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 13px;
  background: #060606;
  box-shadow:
    0 38px 96px rgba(0,0,0,.58),
    inset 0 1px 0 rgba(255,255,255,.22);
  /* Start in 3D perspective */
  transform: perspective(1200px) rotateX(15deg) scale(0.92) translateY(20px);
  transition:
    transform .8s cubic-bezier(0.34, 1.2, 0.64, 1),
    opacity .8s cubic-bezier(0.34, 1.2, 0.64, 1),
    filter .8s var(--ease);
}

.hero-simulator.monitors-awake .app-simulator-window {
  transform: perspective(1400px) rotateX(0deg) scale(1) translateY(0);
}

.hero-simulator[data-view="detail"].monitors-awake .app-simulator-window {
  transform: translate(58%, 72px);
}

/* ─── Traffic lights ────────────────────────────────────────────────────── */
.app-window-chrome {
  position: absolute;
  z-index: 12;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  pointer-events: none;
}
.traffic {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.traffic-red    { background: #ff5f57; }
.traffic-yellow { background: #ffbd2e; }
.traffic-green  { background: #28c840; }

/* ─── Gallery / Detail view switch ─────────────────────────────────────── */
.app-gallery-view,
.app-detail-view {
  position: absolute;
  inset: 0;
  transition:
    opacity .28s var(--ease),
    transform .28s var(--ease);
}

.hero-simulator[data-view="gallery"] .app-gallery-view,
.hero-simulator[data-view="detail"]  .app-detail-view {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.hero-simulator[data-view="gallery"] .app-detail-view,
.hero-simulator[data-view="detail"]  .app-gallery-view {
  opacity: 0;
  transform: translateY(12px) scale(.985);
  pointer-events: none;
}

.hero-simulator[data-view="detail"] .app-tabs {
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s var(--ease);
}
.hero-simulator[data-view="gallery"] .app-tabs {
  opacity: 1;
  pointer-events: auto;
  transition: opacity .28s var(--ease);
}

.app-gallery-view {
  display: flex;
  flex-direction: column;
}

/* ─── Tab bar — LIQUID GLASS applied here ───────────────────────────────── */
.app-tabs {
  position: absolute !important;
  z-index: 20;
  top: calc(100% - 60px) !important;
  bottom: auto !important;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: min(460px, calc(100% - 112px));
  min-width: 0;
  padding: 4px;
  height: 44px;
  border-radius: 999px;
  /* Page navbar glass */
  background: rgba(14,14,14,0.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
}

.app-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  color: rgba(255,255,255,.68);
  font-size: .82rem;
  font-weight: 800;
  transition: color .18s, background .18s;
  font-family: var(--font-body);
  border: none;
  background: transparent;
  cursor: pointer;
}

.app-tab.active {
  background: #ffffff;
  color: #000000;
  font-weight: 600;
}

.app-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: rgba(255,255,255,.68);
  cursor: pointer;
  transition: all .2s ease;
}
.app-tab-icon:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

/* ─── Liquid Glass (used on .app-tabs and .monitor-popover) ─────────────── */
.liquid-glass {
  position: relative;
  border: 1px solid rgba(255,255,255,.18);
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.07) 46%, rgba(255,255,255,.13)),
    rgba(22,24,28,.46);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.38),
    inset 0 -1px 0 rgba(255,255,255,.08),
    0 24px 60px rgba(0,0,0,.42);
}

.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,.42), transparent 30%),
    linear-gradient(110deg, transparent, rgba(255,255,255,.16), transparent 58%);
  opacity: .55;
}

.liquid-glass > * {
  position: relative;
  z-index: 1;
}

.monitor-popover.liquid-glass {
  position: absolute;
}

/* ─── Main gallery banner ───────────────────────────────────────────────── */
.gallery-banner {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  background-image: var(--active-wallpaper);
  background-size: cover;
  background-position: center;
  text-align: left;
  transition: background-image .22s ease;
  top: -36px;
  border: none;
  cursor: pointer;
  display: block;
}

.gallery-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.1) 48%, rgba(0,0,0,.72)),
    radial-gradient(circle at 8% 70%, rgba(0,0,0,.42), transparent 28%);
}

.gallery-banner-copy {
  position: absolute;
  left: 70px;
  bottom: 80px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  color: #fff;
}

.gallery-banner-copy small,
.detail-copy small {
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.74);
}

.gallery-banner-copy strong {
  margin-top: 8px;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1;
  letter-spacing: -.04em;
  font-family: var(--font-sans);
}

.gallery-banner-copy em,
.detail-copy em {
  margin-top: 7px;
  color: rgba(255,255,255,.74);
  font-size: .88rem;
  font-style: normal;
  font-weight: 700;
}

/* Navigation arrows */
.gallery-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: rgba(0,0,0,.36);
  transform: translateY(-50%);
}

.gallery-arrow--left  { left: 18px; }
.gallery-arrow--right { right: 18px; }

/* Pagination dots */
.gallery-dots {
  position: absolute;
  z-index: 3;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  gap: 7px;
}

.gallery-dots i {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.52);
  font-style: normal;
}

.gallery-dots i:first-child { background: #fff; }

/* ─── Card grid ─────────────────────────────────────────────────────────── */
.app-gallery-view .gallery-card-grid {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.7vw, 22px);
  padding: 0 clamp(20px, 3vw, 38px) 72px;
  margin-top: clamp(-78px, -6vw, -48px);
}

.app-gallery-view .gallery-card {
  position: relative;
  width: auto;
  flex-shrink: initial;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: #111;
  box-shadow: 0 18px 36px rgba(0,0,0,.32);
  transition:
    transform .18s var(--ease),
    border-color .18s,
    box-shadow .18s;
  cursor: pointer;
  padding: 0;
}

.app-gallery-view .gallery-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.34);
}

.app-gallery-view .gallery-card.active {
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 18px 36px rgba(0,0,0,.32);
}

.app-gallery-view .gallery-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.app-gallery-view .gallery-card::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 56%;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.76));
}

.app-gallery-view .gallery-card-meta {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px 12px 10px;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.72));
  text-align: left;
}

.app-gallery-view .gallery-card-meta strong {
  font-size: .78rem;
  line-height: 1.2;
  font-family: var(--font-sans);
}

.app-gallery-view .gallery-card-meta small {
  margin-top: 2px;
  font-size: .68rem;
  color: rgba(255,255,255,.72);
}

.app-gallery-view .gallery-card-like {
  position: absolute;
  z-index: 3;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  border-radius: 999px;
  color: rgba(255,255,255,.86);
  background: rgba(0,0,0,.38);
  font-size: .68rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ─── Detail view ───────────────────────────────────────────────────────── */
.app-detail-view {
  overflow: hidden;
  background-image: var(--active-wallpaper);
  background-size: cover;
  background-position: center;
}

.detail-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}

.hero-simulator[data-media="video"] .detail-video      { opacity: 1; }
.hero-simulator[data-media="video"] .app-detail-view   { background-image: none; }

.app-detail-view::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.04) 42%, rgba(0,0,0,.76)),
    radial-gradient(circle at 50% 82%, rgba(0,0,0,.3), transparent 34%);
  z-index: 1;
}



/* ─── Detail Bottom Bar ────────────────────────────────────────── */
.detail-bottom-bar {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  white-space: nowrap;
  height: 44px;
  padding: 0 6px 0 12px;
  /* Page navbar glass */
  background: rgba(14,14,14,0.72);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  border-radius: 999px;
  z-index: 10;
  width: max-content !important;
  max-width: none !important;
  overflow: visible;
}

.detail-back-button {
  position: static !important;
  transform: none !important;
  top: auto !important;
  left: auto !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  transition: background .2s, color .2s;
  padding: 0;
  font-size: .85rem;
}
.detail-back-button:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.detail-copy {
  position: static !important;
  transform: none !important;
  bottom: auto !important;
  left: auto !important;
  width: auto !important;
  align-items: flex-start !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
  text-align: left;
  line-height: 1.2;
  margin-left: 8px;
}
.detail-copy strong {
  font-size: .85rem;
  font-weight: 800;
  color: #fff;
  margin-top: 0 !important;
  margin-bottom: 2px;
  font-family: var(--font-sans);
  letter-spacing: -.02em;
  line-height: 1.2 !important;
}
.detail-copy em {
  font-size: .7rem;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  font-style: normal;
  margin: 0;
}

.detail-bar-icons {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 16px;
}
.icon-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: rgba(255,255,255,.6);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all .2s;
  padding: 0;
  font-size: .9rem;
}
.icon-action:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}

.detail-bottom-bar .apply-control {
  background: #ffffff;
  box-shadow: none;
}
.detail-bottom-bar .apply-main {
  background: transparent;
  color: #000;
}
.detail-bottom-bar .apply-display {
  background: transparent;
  color: #000;
  border-left: 1px solid rgba(0,0,0,.15);
}
.detail-bottom-bar .apply-display:hover,
.detail-bottom-bar .apply-main:hover {
  background: rgba(0,0,0,.05);
}

.round-action,
.apply-main,
.apply-display {
  color: #fff;
  min-height: 34px;
  background: rgba(28,28,30,.38);
  border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition:
    transform .18s var(--ease),
    background .18s,
    border-color .18s;
  cursor: pointer;
  font-family: var(--font-body);
}

.round-action {
  display: grid;
  place-items: center;
  width: 42px;
  border-radius: 50%;
}

.round-action:hover,
.apply-main:hover,
.apply-display:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.34);
}

.round-action[data-like-toggle].active  { color: #ff6b8b; background: rgba(255,255,255,.18); }
.round-action[data-preview-toggle].active { color: #fff; background: rgba(10,132,255,.46); }

.apply-control {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  border-radius: 999px;
  background: #0a84ff;
  box-shadow: 0 14px 34px rgba(10,132,255,.28);
}

.apply-main {
  min-width: 128px;
  padding: 0 20px;
  border-radius: 999px 0 0 999px;
  border-color: transparent;
  background: #0a84ff;
  font-size: .78rem;
  font-weight: 900;
}

.apply-display {
  display: grid;
  place-items: center;
  width: 56px;
  border-radius: 0 999px 999px 0;
  border-color: transparent;
  border-left: 1px solid rgba(255,255,255,.3);
  background: #0a84ff;
  font-size: 1rem;
}

/* ─── Monitor popover ───────────────────────────────────────────────────── */
.monitor-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 12px) scale(.96);
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 6px;
  min-width: 264px;
  padding: 12px;
  border-radius: 11px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity .18s var(--ease),
    transform .18s var(--ease);
}

.monitor-popover::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 12px;
}

.apply-control.selector-open .monitor-popover,
.apply-control:has(.apply-display:hover) .monitor-popover,
.apply-display:hover + .monitor-popover,
.monitor-popover:hover {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  pointer-events: auto;
}

.monitor-choice {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 8px 10px;
  border-radius: 9px;
  color: rgba(255,255,255,.7);
  font-size: .72rem;
  font-weight: 900;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
}



.monitor-choice:hover,
.monitor-choice.active,
.monitor-choice.preview {
  color: #fff;
  background: rgba(255,255,255,.12);
}

.monitor-choice .fa-circle {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: .62rem;
  color: rgba(255,255,255,.6);
}

.monitor-choice.active .fa-circle { color: #0a84ff; font-weight: 900; }

.hero-simulator[data-mode="individual"] .apply-main span::after { content: ''; }
.hero-simulator[data-mode="individual"] .app-detail-view { background-position: 56% center; }

/* ─── Simulator hint ────────────────────────────────────────────────────── */
.simulator-hint {
  position: absolute;
  bottom: 20px;
  transform: translateX(-50%);
  max-width: 760px;
  text-align: center;
  color: rgba(255,255,255,.58);
  font-size: .9rem;
  line-height: 1.6;
}

@keyframes pulse-soft {
  0%, 100% { opacity: 0.5; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1); }
}

/* ─── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { padding-top: 96px; }
  .hero-grid {
    width: min(100%, calc(100% - 36px));
    min-height: 0;
  }
  .hero-copy { max-width: 100%; }
  .hero-actions { align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .simulator-workspace {
    height: 700px;
    --desk-w: min(820px, calc(100vw - 36px));
    --left-offset: calc(var(--right-h) * .1);
  }
  .monitor-stage { top: 0; }
  .app-simulator-window {
    right: 12px;
    bottom: 8px;
    width: min(680px, calc(100% - 24px));
    height: 520px;
  }
  .app-tabs {
    max-width: calc(100% - 72px);
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .app-tabs::-webkit-scrollbar { display: none; }
  .app-tab { flex: 0 0 auto; padding-inline: 12px; }
  .app-gallery-view .gallery-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: -48px;
  }
  .simulator-hint { max-width: 420px; margin-inline: auto; }
}

@media (max-width: 560px) {
  .simulator-workspace {
    height: 680px;
    --desk-w: min(540px, calc(100vw - 28px));
  }
  .fake-monitor { border-radius: 4px; }
  .app-simulator-window {
    right: 0;
    bottom: 0;
    width: 100%;
    height: 540px;
    border-radius: 11px;
  }
  .gallery-banner-copy {
    left: 20px;
    bottom: 60px;
  }
  .gallery-banner-copy strong {
    font-size: 1.4rem;
  }
}

/* ─── Monitor wake animation (for scroll trigger) ───────────────────────── */
.hero-simulator.monitors-awake .fake-monitor--left {
  animation: monitor-wake-left 1.0s cubic-bezier(0.34, 1.2, 0.64, 1) 0.6s both;
}
.hero-simulator.monitors-awake .fake-monitor--right {
  animation: monitor-wake-right 1.0s cubic-bezier(0.34, 1.2, 0.64, 1) 0.78s both;
}

/* Initially hide the monitors so only the app is visible */
.hero-simulator:not(.monitors-awake) .fake-monitor {
  opacity: 0;
  pointer-events: none;
  transform: perspective(1400px) rotateX(55deg) translateY(40px) scale(0.95);
}

@keyframes monitor-wake-left {
  from {
    opacity: 0.2;
    filter: brightness(0.1) saturate(0);
    transform: perspective(1400px) rotateX(55deg) rotateZ(-3deg) translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    filter: brightness(1) saturate(1);
    transform: none;
  }
}

@keyframes monitor-wake-right {
  from {
    opacity: 0.2;
    filter: brightness(0.1) saturate(0);
    transform: perspective(1400px) rotateX(55deg) rotateZ(3deg) translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    filter: brightness(1) saturate(1);
    transform: none;
  }
}

/* ─── Approved hero motion + interactive simulator ────────────────────────
   The original simulator is mounted inside the scroll scene. Its controls
   retain the existing Spanned / Individual behavior; only positioning is
   controlled by the hero's scroll variables. */
.hero-motion-scene > .motion-monitor,
.hero-motion-scene > .motion-app-window {
  display: none;
}

.hero-motion-scene .simulator-workspace--legacy {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: visible;
  transform-style: preserve-3d;
  /* Keep these as concrete lengths: percentage-derived heights would resolve
     against the stage height and flatten the monitor aspect ratio. */
  --desk-w: min(1180px, calc(100vw - 48px));
  --left-w:  calc(var(--desk-w) * .45);
  --right-w: calc(var(--desk-w) * .55);
  --right-h: calc(var(--right-w) * .5625);
  --left-h:  calc(var(--left-w)  * .5625);
  --left-offset: calc(var(--right-h) * .12);
  --span-h: var(--right-h);
}

.hero-motion-scene .simulator-workspace--legacy .monitor-stage {
  position: absolute;
  z-index: 1;
  top: 2%;
  left: 50%;
  width: var(--desk-w);
  height: calc(var(--right-h) + var(--left-offset));
  opacity: var(--monitor-progress);
  filter: brightness(calc(.55 + (var(--monitor-progress) * .45)));
  pointer-events: none;
  transform:
    translateX(-50%)
    translateY(calc(150px - (var(--monitor-progress) * 150px)))
    scale(calc(.68 + (var(--monitor-progress) * .37)));
  transform-origin: 50% 50%;
}

.hero-motion-scene .simulator-workspace--legacy .fake-monitor {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.hero-motion-scene .simulator-workspace--legacy .app-simulator-window {
  position: absolute;
  z-index: 3;
  top: calc(0% + (var(--monitor-progress) * 50%));
  left: calc(14% - (var(--app-progress) * 14%) + (var(--monitor-progress) * 14%));
  width: calc(72% + (var(--app-progress) * 28%) - (var(--monitor-progress) * 28%));
  height: calc(72% + (var(--app-progress) * 28%) - (var(--monitor-progress) * 28%));
  margin: 0;
  overflow: hidden;
  transform-origin: 50% 0%;
  transform-style: preserve-3d;
  transform:
    translate3d(0, calc(-80px + (var(--app-progress) * 80px)), 0)
    rotateX(calc(22deg - (var(--app-progress) * 22deg)))
    scale(calc(1.10 - (var(--app-scale-progress) * .36)));
  transition: none;
}

.hero-motion-scene .simulator-workspace--legacy .app-tabs {
  top: calc(100% - 60px) !important;
  bottom: auto !important;
}

@media (max-width: 900px) {
  .hero-motion-scene .simulator-workspace--legacy .monitor-stage {
    top: 5%;
  }

  .hero-motion-scene .simulator-workspace--legacy .app-simulator-window {
    top: calc(5% - (var(--app-progress) * 5%) + (var(--monitor-progress) * 5%));
    left: calc(6% - (var(--app-progress) * 6%) + (var(--monitor-progress) * 6%));
    width: calc(88% + (var(--app-progress) * 12%) - (var(--monitor-progress) * 12%));
    height: calc(88% + (var(--app-progress) * 12%) - (var(--monitor-progress) * 12%));
  }
}

@media (max-width: 560px) {
  .hero-motion-scene .simulator-workspace--legacy .monitor-stage {
    top: 16%;
  }

  .hero-motion-scene .simulator-workspace--legacy .app-simulator-window {
    top: calc(10% - (var(--app-progress) * 10%) + (var(--monitor-progress) * 5%));
    left: calc(3% - (var(--app-progress) * 3%));
    width: calc(94% + (var(--app-progress) * 6%));
    height: calc(66% + (var(--app-progress) * 34%));
  }
}

/* ─── Detail View: App width restore ──────────────── */
.hero-simulator[data-view="detail"] .hero-motion-scene .simulator-workspace--legacy .app-simulator-window {
  width: 72% !important;
  height: 72% !important;
  left: 14% !important;
}

@media (max-width: 900px) {
  .hero-simulator[data-view="detail"] .hero-motion-scene .simulator-workspace--legacy .app-simulator-window {
    width: 76% !important;
    height: 76% !important;
    left: 12% !important;
  }
}

@media (max-width: 560px) {
  .hero-simulator[data-view="detail"] .hero-motion-scene .simulator-workspace--legacy .app-simulator-window {
    width: 94% !important;
    height: 66% !important;
    left: 3% !important;
  }
}

@media (max-width: 560px) {
  /* Extra bottom bar overrides for mobile */
  .detail-bottom-bar {
    width: calc(100% - 24px);
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  .detail-bar-icons {
    margin: 0;
  }
  .detail-copy {
    text-align: center;
  }
}
