/* Fermata — HelloWorld product page cinematic scroll hero.
   All selectors scoped under #cine so nothing leaks into other pages. */

/* pulled up under the (transparent / hidden) header so it's full-bleed to
   the very top — no cream seam. JS refines the exact header height. */
#cine { height: 2700vh; position: relative; margin-top: -60px; }
#cine .pin { position: sticky; top: 0; height: 100vh; overflow: hidden; background: #1a1411; }
#cine .stage { position: relative; width: 100%; height: 100%; }

#cine .bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  /* fuji.jpg is cropped so the summit sits at (58%, 26%); this pins that
     point to the same spot of the viewport at every aspect ratio */
  object-position: 58% 26%; will-change: transform; }

/* backdrop darkens once the story moves into the app-screen acts */
#cine .dim { position: absolute; inset: 0; background: #0c0a07; opacity: 0; will-change: opacity; z-index: 1; }

/* soft vignette + top/bottom gradient: warms the photo and dissolves the
   hard edge where the header meets the sky */
#cine .scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(28,20,12,.42) 0%, rgba(28,20,12,0) 16%, rgba(28,20,12,0) 80%, rgba(28,20,12,.34) 100%),
    radial-gradient(125% 80% at 50% 42%, rgba(28,20,12,0) 55%, rgba(28,20,12,.34) 100%); }

/* header fades away while the cinematic plays (product page only) */
header.site { transition: transform .4s ease, opacity .4s ease; }
html.cine-hideheader header.site { transform: translateY(-100%); opacity: 0; pointer-events: none; }

#cine .c-head {
  position: absolute; left: 0; right: 0; top: 13%; text-align: center; color: #fff;
  padding: 0 24px; z-index: 6; text-shadow: 0 2px 18px rgba(0,0,0,.45); will-change: opacity, transform;
}
#cine .c-head h2 { font-size: clamp(2rem, 6.2vw, 3.8rem); font-weight: 800; letter-spacing: .04em; line-height: 1.25; }
#cine .c-head p { margin-top: 14px; font-size: clamp(.9rem, 2.3vw, 1.2rem); font-weight: 500; opacity: .92; letter-spacing: .14em; }
#cine .c-cue { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: #fff;
  font-size: .72rem; letter-spacing: .35em; z-index: 7; text-transform: uppercase; will-change: opacity; }

/* see-through phone */
#cine .phone {
  position: absolute; top: 50%; left: 50%;
  width: min(90vw, calc(85vh * 0.462));
  aspect-ratio: 0.462;
  transform: translate(-50%, -50%) scale(1.10);
  border: 8px solid #060606; border-radius: 54px; overflow: hidden;
  z-index: 5; opacity: 0; will-change: transform, box-shadow, opacity;
  box-shadow: 0 30px 90px rgba(0,0,0,0), 0 0 0 9999px rgba(0,0,0,0);
}
#cine .chrome { position: absolute; inset: 0; opacity: 0; will-change: opacity; z-index: 3; pointer-events: none; }

/* the transparent viewfinder card; its huge box-shadow paints the rest of
   the phone body cream, so Mt. Fuji shows through only here. JS animates it
   from full-screen camera down to a small card focused on the summit. */
#cine .vf { position: absolute; left: 1.5%; right: 1.5%; top: 5.8%; height: 73.5%;
  border-radius: 22px; box-shadow: 0 0 0 9999px #f6efe4, inset 0 0 0 1px rgba(60,40,20,.18); }
#cine .vflash { position: absolute; inset: 0; border-radius: inherit; background: #fff; opacity: 0; will-change: opacity; }
#cine .vzooms { position: absolute; left: 4.5%; bottom: 4%; display: flex; gap: 5px; will-change: opacity; }
#cine .vzooms b { background: rgba(0,0,0,.38); color: rgba(255,255,255,.75); font-weight: 700;
  border-radius: 999px; font-size: clamp(.52rem, 1.3vh, .74rem); padding: .4em .85em; }
#cine .vzooms b.on { background: rgba(0,0,0,.55); color: #ffd60a; }
#cine .vsnap { position: absolute; right: 4%; bottom: 4%; width: 12.5%; aspect-ratio: 1;
  background: rgba(20,14,8,.45); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.3); will-change: transform; }
#cine .vsnap svg { width: 58%; height: 58%; fill: #fff; }

/* "your guide is looking at the photo…" status line under the shrunk card */
#cine .looking { position: absolute; left: 8%; right: 8%; top: 42.5%; text-align: center;
  color: #7a6146; font-weight: 600; font-size: clamp(.62rem, 1.6vh, .9rem);
  opacity: 0; will-change: opacity; }

#cine .statusbar { position: absolute; top: 0; left: 0; right: 0; height: 5.6%;
  display: flex; align-items: center; justify-content: space-between; padding: 0 7.5%;
  color: #2a1f14; font-weight: 600; font-size: clamp(.6rem, 1.9vw, .92rem); }
#cine .island { position: absolute; top: 1.4%; left: 50%; transform: translateX(-50%);
  width: 30%; height: 3.1%; background: #000; border-radius: 999px; }
#cine .sb-right { display: flex; align-items: center; gap: 5px; }
#cine .sb-right svg { height: .78em; width: auto; fill: currentColor; }
#cine .sb-right .bat { width: 1.5em; height: .74em; border: 1.4px solid currentColor; border-radius: 3px; position: relative; }
#cine .sb-right .bat::before { content: ""; position: absolute; right: -3px; top: 30%; height: 40%; width: 2px; background: currentColor; border-radius: 0 1px 1px 0; }
#cine .sb-right .bat::after { content: ""; position: absolute; inset: 1.6px; right: 38%; background: currentColor; border-radius: 1px; }

/* guide narration area (matches the app's answer stream) */
#cine .narrbox { position: absolute; left: 6.5%; right: 6.5%; top: 42.5%; bottom: 20.5%;
  display: flex; flex-direction: column; gap: 2.5%; overflow: hidden; }
#cine .narr { color: #43301f; font-size: clamp(.9rem, 2.4vh, 1.42rem); line-height: 1.58;
  flex: 1 1 auto; min-height: 0; overflow: hidden; }
#cine .ppills { flex: 0 0 auto; display: flex; gap: 8px; opacity: 0; will-change: opacity; }
#cine .ppills b { display: inline-flex; align-items: center; gap: 5px;
  background: #fff; border: 1px solid #e5d7c2; color: #6b543c; font-weight: 600;
  font-size: clamp(.58rem, 1.5vh, .82rem); border-radius: 999px; padding: .45em 1em; }

#cine .ch { opacity: 0; }

/* bottom toolbar + mic + corner buttons (matches the app's control cluster) */
#cine .toolbar { position: absolute; left: 8%; right: 8%; bottom: 12.5%; height: 6.2%;
  background: #fff; border: 1px solid #eadcc6; border-radius: 999px;
  display: flex; align-items: center; justify-content: space-around; padding: 0 4%;
  box-shadow: 0 6px 18px rgba(90,60,30,.10); color: #6b543c; }
#cine .toolbar .tb { display: flex; align-items: center; justify-content: center;
  width: 12%; aspect-ratio: 1; }
#cine .toolbar .tb svg { width: 78%; height: 78%; }
#cine .toolbar .tb-live { background: #b3541e; border-radius: 50%; width: 13.5%; }
#cine .micbtn { position: absolute; left: 50%; bottom: 2.6%; transform: translateX(-50%);
  width: 19%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7a4a28, #3f2312 70%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(0,0,0,.25), inset 0 1px 2px rgba(255,255,255,.25); }
#cine .micbtn svg { width: 44%; height: 44%; }
#cine .cornerbtn { position: absolute; bottom: 2.8%; width: 21%; text-align: center; color: #6b543c; }
#cine .cornerbtn.left { left: 3.5%; }
#cine .cornerbtn.right { right: 3.5%; }
#cine .cornerbtn .cbtn { display: flex; align-items: center; justify-content: center;
  width: 62%; aspect-ratio: 1; margin: 0 auto; background: #fff;
  border: 1px solid #e0b48e; border-radius: 50%; box-shadow: 0 3px 10px rgba(90,60,30,.12); }
#cine .cornerbtn .cbtn svg { width: 55%; height: 55%; }
#cine .cornerbtn i { display: block; font-style: normal; margin-top: 4px;
  font-size: clamp(.44rem, 1.15vh, .62rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* phones: shrink the phone so it never crowds the top/bottom of the frame */
@media (max-width: 640px) {
  #cine .c-head { top: 16%; }
}

/* ---- acts 2–3: real app screenshots, second phone, overlays ---- */

#cine .phoneB { z-index: 4; opacity: 0; }
#cine .phone .shot { position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; will-change: opacity; z-index: 2; }
#cine .phoneB .shot { opacity: 1; }

/* who's-phone pill, top-center inside each phone */
#cine .tagpill { position: absolute; top: 2.4%; left: 50%; transform: translateX(-50%);
  z-index: 6; color: #fff; font-weight: 600; font-size: clamp(.72rem, 1.9vh, 1rem);
  border-radius: 999px; padding: .45em 1.1em; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,.35); opacity: 0; will-change: opacity; }
#cine .tagpill.orange { background: rgba(179,84,30,.94); }
#cine .tagpill.blue { background: rgba(59,125,216,.94); }

/* incoming notification banners (overlaid on screenshots) */
#cine .notif { position: absolute; left: 4.5%; right: 4.5%; top: 9%;
  background: rgba(46,160,67,.96); color: #fff; border-radius: 14px;
  padding: 4% 4.5%; font-weight: 600; font-size: clamp(.72rem, 1.9vh, 1.02rem);
  line-height: 1.45; z-index: 6; opacity: 0; will-change: opacity, transform;
  box-shadow: 0 8px 22px rgba(0,0,0,.3); }
#cine .notif.amber { background: rgba(212,151,43,.97); }

/* big chapter intros beside the phone (top band on small screens) */
#cine .chap { position: absolute; z-index: 6; opacity: 0; max-width: 33vw;
  will-change: opacity; pointer-events: none; }
#cine .chap .k { font-size: clamp(.72rem, 1.3vw, .95rem); letter-spacing: 3px;
  color: #e08a52; font-weight: 700; margin-bottom: 10px; }
#cine .chap h3 { font-size: clamp(1.7rem, 3.4vw, 2.9rem); font-weight: 800; color: #fff;
  line-height: 1.22; margin: 0 0 12px; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
#cine .chap p { font-size: clamp(.95rem, 1.5vw, 1.25rem); color: rgba(255,255,255,.85);
  line-height: 1.6; margin: 0; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
#cine .chap.side-l { left: 6vw; top: 50%; transform: translateY(-50%); }
#cine .chap.side-r { right: 6vw; top: 50%; transform: translateY(-50%); }
#cine .chap.top { left: 50%; top: 5%; transform: translateX(-50%); text-align: center; max-width: 84vw; }
#cine .chap.top .k { margin-bottom: 6px; }
#cine .chap.top h3 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); margin-bottom: 6px; }
#cine .chap.top p { font-size: clamp(.9rem, 1.3vw, 1.1rem); }

/* small screens: chapter intro moves to a band above the phone */
@media (max-width: 899px) {
  #cine .phone { width: min(84vw, calc(64vh * 0.462)); }
  #cine .chap, #cine .chap.side-l, #cine .chap.side-r, #cine .chap.top {
    left: 50%; right: auto; top: 2.4vh; transform: translateX(-50%);
    text-align: center; max-width: 94vw; width: 94vw; }
  #cine .chap .k { display: none; }
  #cine .chap h3 { display: block; font-size: clamp(1.3rem, 6vw, 1.75rem); margin: 0 0 4px; }
  #cine .chap p { display: block; font-size: clamp(.82rem, 3.7vw, .98rem); line-height: 1.45; }
}

/* act-2: "language auto-detected" tag, overlaid above the language pill */
#cine .dtag { position: absolute; left: 4.5%; top: 34.5%; z-index: 6;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(46,160,67,.97); color: #fff; border-radius: 999px;
  font-weight: 700; font-size: clamp(.6rem, 1.6vh, .9rem); padding: .5em 1.05em;
  box-shadow: 0 6px 18px rgba(0,0,0,.28); opacity: 0; will-change: opacity, transform; }

/* pulsing rings: family-map pin (act 2) and "take me there" button (act 3) */
#cine .pulse { position: absolute; width: 15%; aspect-ratio: 1; border-radius: 50%;
  transform: translate(-50%,-50%); z-index: 5; opacity: 0; pointer-events: none; }
#cine .pulse.pulse-pin { border: 3px solid #ff4d42; }
#cine .pulse.pulse-cta { border: 3px solid #fff; width: 19%; }
#cine .pulse.on { opacity: 1; animation: c-pulse 1.5s ease-out infinite; }
@keyframes c-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,.55); }
  70% { box-shadow: 0 0 0 18px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
/* per-language anchor points (screenshots differ slightly) */
#c-pinpulse { left: 49.2%; top: 29.7%; }
html[data-lang="zh"] #c-pinpulse { left: 25%; top: 51.4%; }
#c-ctapulse { left: 51.9%; top: 82%; width: 26%; }
#c-transpulse { left: 16%; top: 41.2%; width: 24%; }
html[data-lang="zh"] #c-transpulse { left: 17%; top: 41.2%; }
#c-meetpulse { left: 73.1%; top: 47.2%; }
html[data-lang="zh"] #c-meetpulse { left: 78.4%; top: 57.3%; }
#c-parentpulse { left: 49.6%; top: 63.7%; width: 24%; }
html[data-lang="zh"] #c-parentpulse { left: 49.5%; top: 60.5%; }

/* grandma flies from the parent phone to the family map */
#cine .flyer { position: absolute; top: 50%; left: 50%; z-index: 8;
  font-size: clamp(26px, 5vh, 40px); opacity: 0; will-change: opacity, transform;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.45)); }

/* act-3 spoken question, floating above the phone */
#cine .ask2 { position: absolute; top: 8%; left: 50%; transform: translateX(-50%);
  z-index: 7; display: inline-flex; align-items: center; gap: 9px; max-width: 92vw;
  background: rgba(0,0,0,.68); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; border-radius: 999px; padding: 12px 22px; font-weight: 600;
  font-size: clamp(.92rem, 2.3vh, 1.3rem); opacity: 0; will-change: opacity, transform; }
#cine .ask2 svg { width: 1em; height: 1em; flex: 0 0 auto; }

/* act chips: value proposition on screen one, progress indicator after */
#cine .acts { position: absolute; left: 0; right: 0; bottom: 52px; z-index: 7;
  display: flex; justify-content: center; gap: 9px; flex-wrap: wrap; padding: 0 12px; }
#cine .acts b { font-weight: 500; font-size: clamp(.68rem, 1.7vh, .88rem); white-space: nowrap;
  color: rgba(255,255,255,.72); background: rgba(255,255,255,.13); border-radius: 999px;
  padding: 6px 13px; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  transition: color .3s, background .3s, transform .15s; cursor: pointer; }
#cine .acts b:hover { transform: translateY(-2px); color: #fff; }
#cine .acts b.on { color: #fff; }
#cine #c-act1.on { background: rgba(179,84,30,.92); }
#cine #c-act2.on { background: rgba(123,92,196,.92); }
#cine #c-act3.on { background: rgba(46,160,67,.92); }
#cine #c-act4.on { background: rgba(212,151,43,.92); }
#cine #c-act5.on { background: rgba(59,125,216,.92); }

/* resolve: the dignity line — fades to solid black, text slowly grows */
#cine .resolve { position: absolute; inset: 0; z-index: 9; background: #070503;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; padding: 0 28px; opacity: 0; pointer-events: none;
  will-change: opacity, transform; }
#cine .resolve .k { font-size: clamp(.85rem, 3.4vw, 1.05rem); letter-spacing: 2px; color: #d97a3e; }
#cine .resolve .big { font-size: clamp(1.6rem, 6vw, 2.6rem); font-weight: 800; color: #fff; line-height: 1.4; }
#cine .resolve .sub { font-size: clamp(1rem, 3.6vw, 1.3rem); color: rgba(255,255,255,.75); }

@media (max-width: 640px) {
  #cine .acts { bottom: 46px; gap: 7px; }
  #cine .acts b { padding: 5px 10px; }
}

@media (prefers-reduced-motion: reduce) { #cine .bg { transform: none !important; } }
