/* =====================================================================
   APP WALKTHROUGHS — video device showcase for NOTFIT V2.
   Reusable titanium phone (.nfx-device) + cinematic sticky bands +
   device gallery. Motion states (.nfx-reveal, 3D tilt) are driven by
   notfit-v2-motion.js; everything degrades to a clean static layout
   with JS off or reduced-motion on.
   ===================================================================== */

/* Hero phone now holds the homepage-scroll clip (frame styling lives in
   notfit-v2.css; this just makes the <video> behave like the old <img>). */
/* ---------------------------------------------------------------------
   Reusable device — iPhone 16 Pro Max (Desert Titanium). NO drawn notch:
   the recording carries the real Dynamic Island. Built from nested layers:
   body (titanium rail) > bezel (black) > screen (the video). Edge buttons
   are the Action / Volume / Power / Camera Control of the 16 Pro Max.
   --------------------------------------------------------------------- */
.nfx-device {
  --dev-w: clamp(244px, 27vw, 322px);
  --dev-r: clamp(34px, 3.6vw, 50px);   /* outer corner radius */
  --rail: 3px;                          /* titanium rim thickness */
  --bezel: 7px;                         /* black bezel inside the rim */
  --rail-a: #f3e6cd; --rail-b: #cdb795; --rail-c: #7c6a4f; --rail-d: #e6d5b4; /* Desert Titanium */
  position: relative;
  margin: 0;
  width: var(--dev-w);
  transform: rotateY(0deg);             /* JS scrubs rotateY/translate on scroll */
  transform-style: preserve-3d;
  will-change: transform;
}
.nfx-device--sm { --dev-w: 100%; --dev-r: clamp(26px, 7vw, 40px); --bezel: 6px; }
.nfx-device--black   { --rail-a: #8b8d90; --rail-b: #3c3e40; --rail-c: #141516; --rail-d: #6c6e71; }
.nfx-device--natural { --rail-a: #e7e8ea; --rail-b: #b9bcc0; --rail-c: #6f7378; --rail-d: #d6d8db; }

.nfx-device__body {
  position: relative;
  border-radius: var(--dev-r);
  padding: var(--rail);
  background: linear-gradient(135deg,
    var(--rail-a) 0%, var(--rail-b) 22%, var(--rail-c) 50%, var(--rail-b) 72%, var(--rail-d) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.30),
    inset 0 0 3px rgba(255, 255, 255, 0.25),
    0 60px 120px -42px rgba(0, 0, 0, 0.92);
}
.nfx-device__bezel {
  border-radius: calc(var(--dev-r) - var(--rail));
  padding: var(--bezel);
  background: #050506;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.9);
}
.nfx-device__screen {
  position: relative;
  border-radius: calc(var(--dev-r) - var(--rail) - var(--bezel));
  overflow: hidden;
  background: #0b0c0c;
}
.nfx-device__video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 384 / 848;
  object-fit: cover;
}
/* glass reflection sweeping the screen */
.nfx-device__glare {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(125deg,
    rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 26%,
    rgba(255, 255, 255, 0) 74%, rgba(255, 255, 255, 0.06) 100%);
  /* mix-blend-mode removed: it forced a re-composite on every video frame
     behind the glass. A plain translucent sheen reads the same, far cheaper. */
  z-index: 2;
}
/* edge buttons (machined titanium nubs) */
.nfx-device__btn {
  position: absolute;
  width: 3px;
  background: linear-gradient(180deg, var(--rail-a), var(--rail-c));
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  z-index: 1;
}
.nfx-device__btn--action { left: -2px; top: 19%; height: 4.5%; border-radius: 2px 0 0 2px; }
.nfx-device__btn--volup  { left: -2px; top: 27%; height: 7.5%; border-radius: 2px 0 0 2px; }
.nfx-device__btn--voldn  { left: -2px; top: 37%; height: 7.5%; border-radius: 2px 0 0 2px; }
.nfx-device__btn--power  { right: -2px; top: 30%; height: 12%; border-radius: 0 2px 2px 0; }
.nfx-device__btn--cam    { right: -2px; top: 47%; height: 6.5%; border-radius: 0 2px 2px 0; }
/* warm halo behind the device */
.nfx-device__glow {
  position: absolute;
  inset: -18% -22%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(209, 187, 154, 0.22) 0%, rgba(255, 152, 3, 0.08) 38%, transparent 66%);
  filter: blur(14px);
  pointer-events: none;
}
/* soft contact shadow on the floor */
.nfx-device__contact {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -7%;
  height: 12%;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.62), transparent 70%);
  filter: blur(14px);
}

/* ---------------------------------------------------------------------
   Section shell
   --------------------------------------------------------------------- */
.nfx-walk {
  position: relative;
  padding: clamp(4rem, 3rem + 5vw, 7.5rem) 0 clamp(3rem, 2rem + 4vw, 6rem);
  background:
    radial-gradient(1100px circle at 50% 0%, rgba(209, 187, 154, 0.07), transparent 55%),
    var(--nfx-ink);
}
.nfx-walk-head {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}
.nfx-walk-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  background: rgba(209, 187, 154, 0.10);
  border: 1px solid rgba(226, 211, 188, 0.30);
  color: var(--nfx-gold);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.nfx-walk-title {
  margin: 1.2rem 0 0;
  font-weight: 700;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: #fff;
}
.nfx-walk-title em { font-style: normal; color: var(--nfx-gold); }
.nfx-walk-sub {
  margin: 1.1rem auto 0;
  max-width: 560px;
  color: var(--nfx-muted);
  font-size: 1.04rem;
  line-height: 1.6;
}

/* ---------------------------------------------------------------------
   Cinematic sticky-device bands
   --------------------------------------------------------------------- */
.nfx-walk-bands { margin-top: clamp(2.5rem, 1.5rem + 4vw, 5rem); }

.nfx-band {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 6rem);
  align-items: center;
  padding: clamp(2rem, 5vh, 4.5rem) 0;
}
.nfx-band + .nfx-band { border-top: 1px solid var(--nfx-line); }

.nfx-band__media {
  position: sticky;
  top: clamp(84px, 15vh, 150px);
  align-self: start;
  display: flex;
  justify-content: center;
  perspective: 1500px;
}
.nfx-band__copy { max-width: 480px; }

.nfx-band__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  color: var(--nfx-gold);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nfx-band__tag i { font-size: 1.1em; }
.nfx-band__title {
  margin: 1rem 0 0;
  font-weight: 700;
  font-size: clamp(1.7rem, 1.1rem + 2.2vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
}
.nfx-band__title em { font-style: normal; color: var(--nfx-gold); }
.nfx-band__lead {
  margin: 1.1rem 0 0;
  color: var(--nfx-muted);
  font-size: 1.06rem;
  line-height: 1.62;
}
.nfx-band__points {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.nfx-band__points li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
}
.nfx-band__points i { color: var(--nfx-gold); font-size: 1.2rem; }

.nfx-walk-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.9rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--nfx-gold-bright), var(--nfx-gold));
  color: #1a1407;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 240ms var(--nfx-ease), box-shadow 240ms var(--nfx-ease);
  box-shadow: 0 18px 40px -22px rgba(209, 187, 154, 0.8);
}
.nfx-walk-cta:hover { transform: translateY(-2px); box-shadow: 0 26px 56px -22px rgba(209, 187, 154, 0.95); }
.nfx-walk-cta i { transition: transform 240ms var(--nfx-ease); }
.nfx-walk-cta:hover i { transform: translateX(3px); }

/* ---------------------------------------------------------------------
   Device gallery
   --------------------------------------------------------------------- */
.nfx-walk-galhead {
  margin: clamp(3rem, 2rem + 4vw, 6rem) 0 0;
  text-align: center;
  font-weight: 700;
  font-size: clamp(1.5rem, 1rem + 1.6vw, 2.2rem);
  letter-spacing: -0.01em;
  color: #fff;
}
.nfx-walk-gallery {
  margin-top: clamp(2rem, 1rem + 3vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 1rem + 1.4vw, 2.4rem);
}
.nfx-gcard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
  padding: clamp(1.6rem, 1.2rem + 1.5vw, 2.6rem) clamp(1.2rem, 1rem + 1vw, 2rem);
  border-radius: var(--nfx-radius);
  background: linear-gradient(180deg, var(--nfx-card), var(--nfx-ink));
  border: 1px solid var(--nfx-line);
  transition: border-color 240ms var(--nfx-ease), transform 240ms var(--nfx-ease);
}
.nfx-gcard:hover { border-color: var(--nfx-line-2); transform: translateY(-4px); }
.nfx-gcard .nfx-device { width: min(220px, 64%); perspective: 1200px; }
.nfx-gcard__cap { text-align: center; }
.nfx-gcard__cap h4 {
  margin: 0;
  font-weight: 700;
  font-size: 1.12rem;
  color: #fff;
}
.nfx-gcard__cap p {
  margin: 0.5rem 0 0;
  color: var(--nfx-muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.nfx-walk-foot {
  margin-top: clamp(3rem, 2rem + 3vw, 5rem);
  text-align: center;
}
.nfx-walk-foot p {
  margin: 0 0 1.4rem;
  color: var(--nfx-muted);
  font-size: 1.06rem;
}

/* ---------------------------------------------------------------------
   Reveal animation — OPT-IN. Default state is fully visible so the page
   is correct with JS off or if the motion script fails to load. The
   motion engine adds `nfx-motion` to <body>, which arms the hidden start.
   --------------------------------------------------------------------- */
.nfx-reveal { opacity: 1; transform: none; }
body.nfx-motion .nfx-reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.986);
  filter: blur(5px);
  transition: opacity 0.8s var(--nfx-ease), transform 0.8s var(--nfx-ease), filter 0.8s var(--nfx-ease);
  transition-delay: calc(var(--i, 0) * 80ms);
}
body.nfx-motion .nfx-reveal.is-in { opacity: 1; transform: none; filter: none; }
@media (max-width: 860px) {
  body.nfx-motion .nfx-reveal { filter: none; transform: translateY(24px); } /* lighter on mobile */
}

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 980px) {
  .nfx-walk-gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .nfx-band {
    grid-template-columns: 1fr;
    gap: 2rem;
    justify-items: center;
    text-align: center;
  }
  .nfx-band__media {
    position: static;
    order: -1;          /* device above copy on mobile, every band */
    perspective: none;
  }
  .nfx-band__copy { max-width: 540px; }
  .nfx-band__points { align-items: center; text-align: left; display: inline-flex; }
  .nfx-band__tag { justify-content: center; }
  .nfx-device { --dev-w: clamp(220px, 64vw, 300px); }
}
@media (max-width: 560px) {
  .nfx-walk-gallery { grid-template-columns: 1fr; max-width: 360px; margin-inline: auto; }
  .nfx-gcard .nfx-device { width: min(240px, 70%); }
}

/* Reduced motion → no transforms, nothing hidden */
@media (prefers-reduced-motion: reduce) {
  body.nfx-motion .nfx-reveal { opacity: 1; transform: none; transition: none; }
  .nfx-device { transform: none !important; }
}
