/* Copyright (c) 2026 Ryvont. All rights reserved. This code is the proprietary property of Ryvont. Unauthorized copying or distribution is prohibited. */
/* White splash preloader (with the Ryvont logo) is the loader.
   Motion layer below only handles entrance, stagger, magnetic, cursor. */

/* shell entrance: proper fade, staggered */
body:not(.rv-ready) .site-head,
body:not(.rv-ready) main,
body:not(.rv-ready) .ryvont-top-wordmark,
body:not(.rv-ready) #ryvont-social-dock,
body:not(.rv-ready) footer { opacity: 0; }
body.rv-ready .site-head { animation: rv-rise .8s cubic-bezier(.22,1,.36,1) .15s both; }
body.rv-ready main { animation: rv-rise .9s cubic-bezier(.22,1,.36,1) .3s both; }
body.rv-ready .ryvont-top-wordmark { animation: rv-rise .8s cubic-bezier(.22,1,.36,1) .45s both; }
body.rv-ready #ryvont-social-dock { animation: rv-rise .8s cubic-bezier(.22,1,.36,1) .6s both; }
@keyframes rv-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* word-split stagger (JS adds .rv-w spans) */
.rv-w { display: inline-block; opacity: 0; transform: translateY(110%); }
.rv-w-mask { display: inline-block; overflow: hidden; vertical-align: bottom; }
body.rv-ready .rv-w { animation: rv-word .7s cubic-bezier(.22,1,.36,1) forwards; animation-delay: var(--rv-d, 0s); }
@keyframes rv-word { to { opacity: 1; transform: none; } }

/* scroll reveals */
[data-rv] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.22,1,.36,1); }
[data-rv].in { opacity: 1; transform: none; }

/* magnetic base */
.rv-mag { transition: transform .18s ease-out; will-change: transform; }

/* custom cursor ring (desktop fine pointers only) */
#rv-cursor { position: fixed; z-index: 2147483646; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border: 1px solid rgba(0,0,0,.55); border-radius: 50%; pointer-events: none; opacity: 0;
  transition: opacity .3s ease, width .25s ease, height .25s ease, margin .25s ease, background .25s ease; }
#rv-cursor.on { opacity: 1; }
#rv-cursor.big { width: 56px; height: 56px; margin: -28px 0 0 -28px; background: rgba(0,0,0,.06); }
@media (hover: none), (pointer: coarse) { #rv-cursor { display: none; } }

/* ---------- LITE MODE: small screens (Android) — normal + cheap ---------- */
/* Full version runs on tab / PC / bigger screens; lite keeps small screens smooth. */
.rv-lite header[data-module-header] { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
body.rv-ready.rv-lite main { animation-duration: .5s; }
.rv-lite .rv-w { animation-duration: .35s; }

/* ---------- FORCED DESKTOP MODE ON PHONES ---------- */
/* "Desktop site" checkbox: layout viewport is wide, but the device is a small
   touch phone — serve the readable mobile experience anyway (tablets unaffected). */
html.rv-force-mobile #ryvont-tree-bg canvas { transform: translate(0, -11%); }
html.rv-force-mobile #ryvont-social-dock { display: none !important; }
html.rv-force-mobile body .c-ryvont-choice-label { white-space: normal; }
html.rv-force-mobile body .c-ryvont_main,
html.rv-force-mobile body .c-ryvont_progress { display: none !important; }
html.rv-force-mobile #ryvont-mobile-intro {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  position: fixed; left: 0; right: 0; top: 70vh; top: 70svh; bottom: 0; z-index: 5;
  padding: 1rem 1.75rem 1.25rem;
  padding: 1rem 1.75rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  text-align: center; pointer-events: none; overflow-y: auto;
}
html.rv-force-mobile #ryvont-mobile-intro .ryvont-mobile-about {
  margin: 0; font-size: 1rem; line-height: 1.45; color: #1c1c22;
  max-width: 26rem; text-shadow: 0 0 12px #fff, 0 0 4px #fff;
}
html.rv-force-mobile #ryvont-mobile-intro .ryvont-mobile-copy {
  margin: auto 0 0; font-size: .72rem; letter-spacing: .06em; color: rgba(28,28,34,.55);
}
html.rv-force-mobile #ryvont-mobile-intro .ryvont-social {
  display: flex; gap: 12px; justify-content: center; margin-top: 1.1rem;
}
html.rv-force-mobile #ryvont-mobile-intro .ryvont-social a {
  pointer-events: auto; display: grid; place-items: center;
  width: 40px; height: 40px; background: transparent;
  border: 0; border-radius: 0; box-shadow: none;
}
html.rv-force-mobile #ryvont-mobile-intro .ryvont-social a:active { opacity: .7; }
html.rv-force-mobile #ryvont-mobile-intro .ryvont-social a.ryvont-soc-ig,
html.rv-force-mobile #ryvont-mobile-intro .ryvont-social a.ryvont-soc-li,
html.rv-force-mobile #ryvont-mobile-intro .ryvont-social a.ryvont-soc-fb,
html.rv-force-mobile #ryvont-mobile-intro .ryvont-social a.ryvont-soc-mail { background: transparent; }
html.rv-force-mobile #ryvont-mobile-intro .ryvont-social img { width: 40px; height: 40px; display: block; }

/* Social dock visuals live inline (#ryvont-dock-css, synced with the HTML);
   motion layer keeps only entrance timing for the dock (see below). */

@media (prefers-reduced-motion: reduce) {
  #ryvont-social-dock { opacity: 1; animation: none; }
  body:not(.rv-ready) .site-head, body:not(.rv-ready) main,
  body:not(.rv-ready) .ryvont-top-wordmark, body:not(.rv-ready) footer { opacity: 1; }
  .rv-w { opacity: 1; transform: none; }
  [data-rv] { opacity: 1; transform: none; }
}
