/* Phone / portrait layout. Active when story.js tags <html class="is-mobile"> (portrait viewport), which is also
   when the 9:16 footage and stills load, so layout and imagery always match.
   Composition of the 9:16 frames: open sky in the top ~38%, face and held product in the middle,
   tank top and rooftop wall in the bottom third (room for the info sheet). */
.is-mobile {
  --gutter: 18px;
  --sheet-top: 60%;
}

/* ---------- header ---------- */
.is-mobile .top { padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
.is-mobile .top .logo { height: 28px; }
.is-mobile .top nav { gap: 8px; }
.is-mobile .pill.hide-sm { display: none; }
.is-mobile .pill { height: 36px; padding: 0 14px; font-size: 13px; }
.is-mobile .icon-btn { width: 36px; height: 36px; }
.is-mobile .icon-btn svg { width: 18px; height: 18px; }

/* ---------- camera ---------- */
.is-mobile .cam, .is-mobile .detail .scene { transform-origin: 50% 46%; }
.is-mobile .layer, .is-mobile .cam video { object-position: 50% 50%; }

/* ---------- intro: headline in the sky, cue at the bottom ---------- */
.is-mobile .intro {
  justify-content: flex-start; align-items: flex-start;
  padding-top: calc(96px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
}
.is-mobile .intro::before {
  background: linear-gradient(180deg, rgb(255 250 240 / 0.82) 0%, rgb(255 250 240 / 0.55) 30%, transparent 46%);
}
.is-mobile .kicker { font-size: 11px; }
.is-mobile .intro h1 { margin-top: 12px; max-width: none; font-size: clamp(54px, 16.5vw, 84px); }
.is-mobile .ticker { margin-top: 18px; height: 52px; width: 100%; max-width: 360px; }
.is-mobile .ticker li { font-size: 15px; }
.is-mobile .ticker li b { width: 30px; height: 30px; font-size: 12px; }
.is-mobile .cue { position: absolute; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); margin: 0; font-size: 11px; white-space: nowrap; color: #fff; text-shadow: 0 1px 8px rgb(0 0 0 / 0.35); }

/* ---------- product checkpoint ---------- */
/* giant word sits in the sky band and dips behind her head */
.is-mobile .detail .word {
  top: 21%; font-size: clamp(52px, 16vw, 100px); line-height: 0.86;
  white-space: normal; padding: 0 12px; text-wrap: balance;
}
.is-mobile .detail .product {
  height: var(--mp-height, 28%); top: var(--mp-top, 44%); right: var(--mp-right, -2%);
}
.is-mobile .detail.on .product {
  transform: translateY(calc(-50% - var(--t) * 24px)) rotate(calc(var(--p-rot, -1deg) + var(--t) * -3deg));
}
/* info as a bottom sheet over the tank top / rooftop wall */
.is-mobile .detail .info {
  left: 0; right: 0; top: auto; bottom: 0; width: auto;
  padding: 26px max(18px, env(safe-area-inset-right, 0px)) calc(64px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
  background: linear-gradient(0deg, rgb(255 255 255 / 0.95) 0%, rgb(255 255 255 / 0.9) 70%, rgb(255 255 255 / 0) 100%);
  border-radius: 26px 26px 0 0;
}
.is-mobile .eyebrow { font-size: 11px; }
.is-mobile .info h2 { margin-top: 8px; font-size: clamp(28px, 8.4vw, 36px); }
.is-mobile .lead { margin-top: 8px; font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.is-mobile .chips { margin-top: 12px; gap: 6px; }
.is-mobile .chip { padding: 5px 10px; font-size: 12px; }
.is-mobile .facts, .is-mobile .note { display: none; }
.is-mobile .buy { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.is-mobile .btn { justify-content: center; height: 44px; padding: 0 10px; font-size: 14px; box-shadow: 0 6px 18px rgb(var(--shadow) / 0.14); }
.is-mobile .btn svg { width: 18px; height: 18px; }

/* routine steps: small, centred under the header */
.is-mobile .rail {
  left: 50%; bottom: auto; top: calc(64px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); gap: 10px;
}
.is-mobile .rail.hidden { transform: translate(-50%, -8px); }
.is-mobile .rail-step { font-size: 10px; gap: 5px; }
.is-mobile .rail-step b { width: 16px; height: 5px; }
.is-mobile .rail-step.on b { width: 28px; }

/* ---------- outro: compact 2x2 product grid ---------- */
.is-mobile .outro { justify-content: flex-start; padding-top: calc(84px + env(safe-area-inset-top, 0px)); padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
.is-mobile .outro h2 { font-size: clamp(32px, 10vw, 44px); }
.is-mobile .outro p { font-size: 14px; margin-top: 8px; }
.is-mobile .outro-grid { margin-top: 18px; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.is-mobile .card { padding: 12px 8px 12px; border-radius: 18px; }
.is-mobile .card img { height: 64px; margin-bottom: 4px; }
.is-mobile .card-step { font-size: 9px; }
.is-mobile .card h3 { font-size: 13px; }
.is-mobile .card-size { font-size: 11px; }
.is-mobile .card-buy { margin-top: 8px; gap: 4px; flex-wrap: wrap; justify-content: center; }
.is-mobile .card-buy a { font-size: 11px; padding: 5px 8px 5px 6px; }
.is-mobile .card-buy svg { width: 13px; height: 13px; }
.is-mobile .stores { margin-top: 16px; flex-direction: column; width: 100%; gap: 8px; }
.is-mobile .pill.store { justify-content: center; width: 100%; height: 44px; }

/* ---------- contact ---------- */
.is-mobile .contact { padding-top: 64px; }
.is-mobile .contact-inner, .is-mobile .contact-grid { grid-template-columns: 1fr; }
.is-mobile .contact h2 { font-size: 44px; }
.is-mobile .contact-card { padding: 14px; }
.is-mobile .contact-card > svg { width: 40px; height: 40px; }

/* ---------- scroll feel: flicks settle on checkpoints, a progress line shows every swipe counts ---------- */
html.is-mobile { scroll-snap-type: y proximity; }
.is-mobile .snap { position: absolute; left: 0; width: 1px; height: 1px; scroll-snap-align: start; pointer-events: none; }
.is-mobile .progress {
  position: absolute; z-index: 30; left: 0; right: 0; top: 0; height: 3px;
  background: var(--sun); transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
  pointer-events: none;
}
.is-mobile .stage[data-beat="intro"] .progress { opacity: 0; }
