/* Yawa House: phone experience and scroll-linked motion that works with touch as well as a mouse */

/* the phone booking bar */
.m-bar { display: none; }
@media (max-width: 760px) {
  .m-bar {
    position: fixed; z-index: 40; inset-inline: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 999px;
    background: rgba(35, 17, 34, 0.9); border: 1px solid rgba(230, 200, 173, 0.2);
    backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
    box-shadow: 0 18px 40px -16px rgba(35, 17, 34, 0.7);
    transform: translateY(calc(100% + 24px)); opacity: 0;
    transition: transform 500ms var(--ease-drawer), opacity 300ms ease;
  }
  .m-bar[data-on] { transform: none; opacity: 1; }
  .m-bar__book { flex: 1; min-height: 50px; }
  .m-bar__wa { display: grid; place-items: center; width: 50px; height: 50px; flex: none; border-radius: 50%; background: rgba(230, 200, 173, 0.14); color: var(--beige); transition: transform 160ms var(--ease-out); }
  .m-bar__wa:active { transform: scale(0.92); }
  body.is-home { padding-bottom: 0; }
  .made-by-rekaz { padding-bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
}

/* phones: the method keeps its photo pinned while the steps pass, as on a laptop */
@media (max-width: 900px) {
  .method__media { position: sticky; top: 0; z-index: 2; padding-top: 14px; padding-bottom: 6px; background: var(--paper); }
  .method__media::after { content: ""; position: absolute; inset-inline: 0; top: 100%; height: 28px; background: linear-gradient(var(--paper), transparent); pointer-events: none; }
  .method__frame { aspect-ratio: 16 / 10; max-width: none; border-radius: 160px 160px 24px 24px; box-shadow: 0 20px 40px -24px rgba(35, 17, 34, 0.55); }
  .method__body { position: relative; z-index: 1; }
  .step { opacity: 0.4; padding-bottom: 56px; }
  .step.is-active { opacity: 1; }
  .method__steps { margin-top: 28px; }
}

/* press feedback on every card a finger can tap */
.person:active, .pk__head:active .pk__plus, .tile:active, .qa summary:active { transform: scale(0.98); }
.qa summary { transition: transform 160ms var(--ease-out); }

/* scroll-linked depth, driven by the scroll itself so phones get it too */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .panel__media img, .team__photo img, .method__frame, .cta__arch img {
      animation: depth linear both; animation-timeline: view(); animation-range: entry 0% exit 100%;
    }
    @keyframes depth { from { transform: scale(1.14) translateY(-3%); } to { transform: scale(1.02) translateY(3%); } }
    .method__frame { animation-name: frame-depth; }
    @keyframes frame-depth { from { transform: translateY(16px) scale(0.97); } 40%, to { transform: none; } }
    .hero__copy, .hero__art {
      animation: hero-out linear both; animation-timeline: scroll(root); animation-range: 0 90vh;
    }
    @keyframes hero-out { to { transform: translateY(-60px) scale(0.96); opacity: 0.35; } }
    .marquee__group span { animation: tint linear both; animation-timeline: view(); animation-range: cover 10% cover 60%; }
    @keyframes tint { from { color: var(--beige); } to { color: var(--mauve); } }
    .site-footer__signature span { animation: sign-sheen 7s ease-in-out infinite, sign-rise linear both; animation-timeline: auto, view(); animation-range: normal, entry 0% cover 45%; }
    @keyframes sign-rise { from { transform: translateY(40%); opacity: 0.2; } to { transform: none; opacity: 1; } }
  }
}

/* phones: the hero photo breathes slowly, standing in for the pointer depth of a laptop */
@media (hover: none), (pointer: coarse) {
  @media (prefers-reduced-motion: no-preference) {
    .hero__detail { animation: pop 900ms var(--ease-out) 1300ms both, float 6s ease-in-out 2.2s infinite; }
    .hero__hours { animation: pop 900ms var(--ease-out) 1500ms both, float 7s ease-in-out 2.6s infinite reverse; }
    @keyframes float { 50% { translate: 0 -8px; } }
  }
}
