/* ========================================
   Plush Media Player — dedicated product page
   Scoped to .plush-page so nothing leaks into the (light) homepage.
   Reuses the site design system (styles.css): DM Serif Display headings,
   SF Pro Display body, --color-primary #0097b2.
   ======================================== */

body.plush-page {
  background: #0a0a0a;
  color: #f5f5f7;
}

.plush {
  position: relative;
  /* NOTE: no overflow:hidden here — it would become the scroll container and
     break position:sticky on .plush-stage. Horizontal glow overflow is clipped
     by body{overflow-x:hidden}; the hero clips its own glow locally. */
}

/* ----------------------------------------
   Hero
   ---------------------------------------- */
.plush-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: clamp(7rem, 16vh, 11rem) var(--spacing-md) clamp(4rem, 10vh, 7rem);
  overflow: hidden;
}

/* radial blue glow behind the hero stack */
.plush-hero::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 40%;
  width: min(920px, 130vw);
  height: min(920px, 130vw);
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(0, 151, 178, 0.20), rgba(0, 151, 178, 0.06) 38%, transparent 66%);
  pointer-events: none;
  z-index: 0;
}

.plush-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 740px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.plush-hero__icon {
  height: clamp(112px, 14vw, 168px);
  width: auto;
  /* logo art is alpha-keyed (transparent background) so it sits cleanly on the page */
  filter: drop-shadow(0 8px 34px rgba(0, 151, 178, 0.45));
  opacity: 0;
  transform: translateY(14px) scale(0.92);
  transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
              transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.plush-hero__chip {
  margin-top: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  border: 1px solid rgba(0, 151, 178, 0.45);
  border-radius: 980px;
  padding: 0.5rem 1.3rem;
  background: rgba(0, 151, 178, 0.15);
  box-shadow: 0 0 12px rgba(0, 151, 178, 0.18), inset 0 0 8px rgba(0, 151, 178, 0.08);
  font-size: clamp(0.85rem, 1.1vw, 1.05rem);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease 0.08s, transform 0.6s ease 0.08s;
}

.plush-hero__title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.8rem, 6.6vw, 5rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: #f5f5f7;
  margin-top: 1.4rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease 0.16s, transform 0.6s ease 0.16s;
}

.plush-hero__title em {
  color: var(--color-primary);
  font-style: italic;
}

.plush-hero__sub {
  font-size: clamp(1.1rem, 1.45vw, 1.35rem);
  font-weight: 300;
  line-height: 1.65;
  color: #9a9a9f;
  max-width: 580px;
  margin-top: 1.3rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease 0.24s, transform 0.6s ease 0.24s;
}

.plush-hero__badge {
  display: inline-flex;
  margin-top: 2.2rem;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.6s ease 0.32s, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.plush-hero__badge img,
.plush-cta__badge img {
  display: block;
  height: 50px;
  width: auto;
}

.plush-hero__badge:focus-visible,
.plush-cta__badge:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

@media (hover: hover) {
  .plush-hero__badge:hover,
  .plush-cta__badge:hover {
    transform: translateY(-2px);
  }
}

.plush-hero__caption,
.plush-cta__caption {
  margin-top: 1.1rem;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: #9a9a9f;
}

.plush-hero__caption {
  opacity: 0;
  transition: opacity 0.6s ease 0.4s;
}

.plush-hero__dot,
.plush-cta__dot {
  color: rgba(255, 255, 255, 0.3);
  margin: 0 0.45rem;
}

.plush-hero__scroll {
  margin-top: clamp(2rem, 6vh, 3.5rem);
  opacity: 0;
  transition: opacity 0.6s ease 0.5s;
}

.plush-hero__scroll-dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  animation: plush-scroll-bounce 2s ease-in-out infinite;
}

@keyframes plush-scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(10px); opacity: 1; }
}

/* entrance reveal (added by js on load) */
body.plush-page.is-loaded .plush-hero__icon,
body.plush-page.is-loaded .plush-hero__chip,
body.plush-page.is-loaded .plush-hero__title,
body.plush-page.is-loaded .plush-hero__sub,
body.plush-page.is-loaded .plush-hero__badge,
body.plush-page.is-loaded .plush-hero__caption,
body.plush-page.is-loaded .plush-hero__scroll {
  opacity: 1;
  transform: none;
}

/* ----------------------------------------
   Scrollytelling showcase
   ---------------------------------------- */
.plush-scrolly {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1rem, 4vw, 4rem);
  align-items: start;
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

.plush-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 clamp(0.5rem, 2vw, 2.5rem);
}

.plush-stage__glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 112%;
  aspect-ratio: 16 / 10;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(0, 151, 178, 0.26), rgba(0, 151, 178, 0.05) 60%, transparent 75%);
  filter: blur(26px);
  pointer-events: none;
  z-index: 0;
}

.plush-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 800px;
  margin: 0;
  border-radius: 16px;
  border: 2px solid rgba(0, 151, 178, 0.65);
  background: #000;
  overflow: hidden;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.55),
    0 0 55px rgba(0, 151, 178, 0.30);
}

.plush-frame__screen {
  position: relative;
  width: 100%;
  aspect-ratio: 2200 / 1272; /* matches the flattened, cropped screenshots → zero layout shift */
  background: #000;
}

.plush-shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.plush-shot.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

/* progress rail */
.plush-rail {
  position: absolute;
  top: 50%;
  right: clamp(0.25rem, 1.5vw, 1rem);
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  z-index: 2;
}

.plush-rail__tick {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.plush-rail__tick.is-active {
  background: var(--color-primary);
  transform: scale(1.5);
  box-shadow: 0 0 10px rgba(0, 151, 178, 0.7);
}

/* copy column */
.plush-copy-track {
  position: relative;
}

.plush-panel {
  min-height: 92vh;
  min-height: 92svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.plush-panel:last-child {
  min-height: 96vh;
  min-height: 96svh;
  padding-bottom: 8vh;
}

/* per-panel screenshot: hidden on desktop (the shared sticky stage is used),
   shown as a stacked card on mobile */
.plush-panel__shot {
  display: none;
}

.plush-panel__copy {
  max-width: 460px;
  opacity: 0.16;
  transform: translateY(22px);
  transition: opacity 0.55s ease 0.12s, transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) 0.12s;
}

.plush-panel.is-active .plush-panel__copy {
  opacity: 1;
  transform: none;
}

.plush-panel__index {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 1.1rem;
}

.plush-panel__title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #f5f5f7;
}

.plush-panel__title em {
  color: var(--color-primary);
  font-style: italic;
}

.plush-panel__sub {
  margin-top: 1.1rem;
  font-size: clamp(1.08rem, 1.3vw, 1.3rem);
  font-weight: 300;
  line-height: 1.6;
  color: #9a9a9f;
  max-width: 480px;
}

/* ----------------------------------------
   Closing CTA
   ---------------------------------------- */
.plush-cta {
  position: relative;
  text-align: center;
  padding: clamp(5rem, 14vh, 9rem) var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.plush-cta__title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.9rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: #f5f5f7;
  max-width: 680px;
  margin: 0 auto;
}

.plush-cta__title em {
  color: var(--color-primary);
  font-style: italic;
}

.plush-cta__sub {
  color: #9a9a9f;
  font-weight: 300;
  font-size: clamp(1.08rem, 1.3vw, 1.3rem);
  line-height: 1.6;
  margin: 1.1rem auto 0;
  max-width: 540px;
}

.plush-cta__badge {
  display: inline-flex;
  margin-top: 2.2rem;
  border-radius: 10px;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ----------------------------------------
   Responsive — stacked layout on tablet/phone.
   Same shared-frame crossfade mechanism: the stage becomes a
   sticky media panel pinned near the top while copy scrolls beneath.
   ---------------------------------------- */
@media (max-width: 838px) {
  .plush-scrolly {
    display: block;
    max-width: 600px;
    padding: 0 clamp(1.25rem, 5vw, 2rem) 2rem;
  }

  /* On phones the shared sticky stage is abandoned for clean stacked cards —
     each feature is its own screenshot + copy, so copy never overlaps the image. */
  .plush-stage { display: none; }
  .plush-rail { display: none; }

  .plush-panel {
    min-height: 0;
    text-align: center;
    align-items: center;
    padding: 3vh 0 5.5vh;
  }

  .plush-panel:last-child {
    min-height: 0;
    padding-bottom: 2vh;
  }

  .plush-panel__shot {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 2200 / 1272;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid rgba(0, 151, 178, 0.65);
    background: #000;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 151, 178, 0.24);
    margin-bottom: 1.75rem;
    /* fade up as the card scrolls into view */
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  }

  .plush-panel.is-inview .plush-panel__shot {
    opacity: 1;
    transform: none;
  }

  .plush-panel__copy {
    max-width: 100%;
    opacity: 0;
    transform: translateY(24px);
    /* copy lands just after its screenshot settles */
    transition: opacity 0.6s ease 0.14s, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 0.14s;
  }

  .plush-panel.is-inview .plush-panel__copy {
    opacity: 1;
    transform: none;
  }

  .plush-panel__sub {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 480px) {
  .plush-panel__shot {
    border-radius: 10px;
  }

  .plush-hero__badge img,
  .plush-cta__badge img {
    height: 46px;
  }
}

/* ----------------------------------------
   Reduced motion — everything readable, no animation.
   ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .plush-hero__icon,
  .plush-hero__chip,
  .plush-hero__title,
  .plush-hero__sub,
  .plush-hero__badge,
  .plush-hero__caption,
  .plush-hero__scroll {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .plush-hero__scroll-dot {
    animation: none;
  }

  .plush-shot {
    transition: opacity 0.01s linear;
    transform: none;
  }

  .plush-shot.is-active {
    transform: none;
  }

  .plush-panel__copy,
  .plush-panel__shot {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
