/* Motion layer (round 3, motion designer). Loaded after site.css and product.css.
   Spec: pazarlama/tasarim/04_hareket.md, rulings in 05_KARAR.md "Motion".
   Rules: content is visible without JS and at load. Every hidden state below needs a class that motion.js only adds
   after the visitor's first scroll, to elements still below the viewport. Only transform and opacity are animated
   (plus short colour changes). Curves and durations come from the tokens in site.css (--ease-land, --ease-swap, --d-*). */

/* ---------- Header: transparent over the home hero at the top, opaque surface + hairline after scrolling ---------- */
.site-header { transition: background-color var(--d-state) var(--ease-land), border-color var(--d-state) var(--ease-land); }
.site-header.mo-instant, .site-header.mo-instant * { transition: none !important; }
.site-header[data-hdr="top"] { background-color: transparent; border-bottom-color: transparent; }
.mo-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }

/* The hero footage runs under the header (CSS only; without JS the opaque header simply sits on its top edge) */
.page-home .hero { margin-top: calc(-1 * var(--header-h) - 1px); }

/* ---------- Product footage slot (data-video-slot): still screenshot until a real loop is supplied ---------- */
[data-video-slot] > video { display: none; } /* a <video> written into the slot only shows once motion.js has wired it */
.vs-frame { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-md); box-shadow: 0 0 0 1px var(--line-strong); background: #1B2330; }
.vs-frame > picture, .vs-frame > img { display: block; border-radius: 0; box-shadow: none; }
.vs-frame > .vs-video { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 400ms linear; }
.vs-frame.vs-on > .vs-video { opacity: 1; }
.vs-btn { position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 36px; height: 36px; display: grid; place-items: center; padding: 0;
  border: 0; border-radius: var(--r-sm); background: rgba(11, 21, 36, .72); color: #EEF2F7; cursor: pointer;
  transition: background-color var(--d-ui) var(--ease-land); }
.vs-btn:hover { background: rgba(11, 21, 36, .92); }
.vs-btn:focus-visible { outline: 2px solid var(--fb-lift); outline-offset: 2px; }
.vs-btn svg { width: 14px; height: 14px; fill: currentColor; }
.vs-btn[data-state="paused"] .vs-i-pause, .vs-btn[data-state="playing"] .vs-i-play { display: none; }
@media (max-width: 600px) { .vs-frame { border-radius: var(--r-sm); } .vs-btn { right: 8px; bottom: 8px; } }

@media (prefers-reduced-motion: no-preference) {
  /* ---------- Light reveals ("arm ahead"): section heads, product frames, the three cards ---------- */
  /* Transitions are declared on the .mo-in state only, so arming (hiding while off-screen) is instant and only the
     reveal is animated. */
  .mo-rv:not(.mo-in) { opacity: 0; transform: translate3d(0, 12px, 0); }
  .mo-rv.mo-media:not(.mo-in) { transform: translate3d(0, 24px, 0); }
  .mo-rv.mo-in { transition: opacity 640ms var(--ease-land) var(--mo-d, 0ms), transform 640ms var(--ease-land) var(--mo-d, 0ms); }
  .mo-rv.mo-media.mo-in { transition-duration: 800ms; }
  /* the aircraft strip: the list stays put, its cells rise in order (30 ms apart, at most 240 ms) */

  /* ---------- Comparison table: the Fly Before column fills down, ✓ scale in, ✗ and partial marks fade.
     The text is never hidden; only the column fill and the marks (aria-hidden) animate. ---------- */
  .cmp.mo-cmp .cmp-us { position: relative; isolation: isolate; background-color: transparent; }
  .cmp.mo-cmp .cmp-us::after { content: ""; position: absolute; inset: 0 1px; z-index: -1; border-radius: inherit; background: var(--step);
    transform-origin: 50% 0; transform: scaleY(0); }
  .cmp.mo-cmp.mo-in .cmp-us::after { transform: none; transition: transform 300ms var(--ease-land) calc(var(--r, 0) * 50ms); }
  .cmp.mo-cmp .mk { transform-box: fill-box; transform-origin: 50% 50%; }
  .cmp.mo-cmp.mo-in .mk { transition: opacity 200ms linear calc(120ms + var(--r, 0) * 50ms), transform 260ms var(--ease-land) calc(120ms + var(--r, 0) * 50ms); }
  .cmp.mo-cmp:not(.mo-in) .mk { opacity: 0; }
  .cmp.mo-cmp:not(.mo-in) .mk-y { transform: scale(.4); }

  /* ---------- Page to page: cross-document View Transitions (Safari 18.2+, Chrome 126+); others load normally ---------- */
  @view-transition { navigation: auto; }
  .site-header { view-transition-name: fb-header; }
  .nav-list > li > a[aria-current="page"], .nav-list .dd.is-current > summary { view-transition-name: fb-nav-current; }
  ::view-transition-group(fb-header) { animation: none; }
  ::view-transition-old(root) { animation: 140ms var(--ease-swap) both fb-page-out; }
  ::view-transition-new(root) { animation: 320ms var(--ease-land) 40ms both fb-page-in; }
  ::view-transition-group(fb-nav-current) { animation-duration: 320ms; animation-timing-function: var(--ease-land); }
}
@keyframes fb-page-out { to { opacity: 0; } }
@keyframes fb-page-in { from { opacity: 0; transform: translate3d(0, 8px, 0); } }

@media print {
  .mo-rv, .mo-rv > li, .cmp.mo-cmp .mk { opacity: 1 !important; transform: none !important; }
  .vs-btn, .vs-video { display: none !important; }
}
@media (max-width: 760px), (pointer: coarse) { .vs-btn { width: 44px; height: 44px; } }
