/* A touch of depth (proposal, 27 Oct): CSS 3D only, no WebGL, no third-party files.
   Pointer-following tilt comes from depth.js on mouse/trackpad devices only; with reduced motion everything is still. */

/* Hero rota card: set at a gentle angle, as if lying on a desk, and follows the pointer slightly */
.hero .rota{transform-origin:60% 50%;--rx:4deg;--ry:-9deg;--gx:20%;--gy:0%;
  box-shadow:28px 50px 90px -38px rgba(23,62,96,.42),8px 14px 30px -18px rgba(23,62,96,.18),0 0 0 1px rgba(223,231,236,.9)}
.hero .rota.reveal{transform:perspective(1600px) rotateX(12deg) rotateY(-22deg) translateY(34px)}
.hero .rota.reveal.in{transform:perspective(1600px) rotateX(var(--rx)) rotateY(var(--ry))}
.hero .rota.live{transition:transform .35s var(--ease),opacity 1.1s var(--ease);transition-delay:0s}
.hero .rota::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  background:radial-gradient(520px circle at var(--gx) var(--gy),rgba(255,255,255,.3),rgba(255,255,255,0) 55%)}
.hero .toast{box-shadow:0 26px 50px -18px rgba(23,62,96,.5),0 6px 14px -8px rgba(23,62,96,.25)}
/* Phones and tablets: no tilt (it softens small text); the card keeps its raised shading */
@media (max-width:960px){.hero .rota.reveal.in{transform:none}.hero .rota::after{display:none}}

/* Shift bars: soft and raised, like the app; the empty cells are gently sunken */
.cell{box-shadow:inset 0 1px 2px rgba(23,62,96,.09)}
.bar{box-shadow:inset 0 1px 0 rgba(255,255,255,.7),inset 0 -2px 0 rgba(23,62,96,.08),0 3px 6px -3px rgba(23,62,96,.3)}
.cover-bars span{background:linear-gradient(90deg,rgba(255,255,255,.55),rgba(255,255,255,0) 45%,rgba(23,62,96,.06)),linear-gradient(180deg,var(--p-sky),var(--p-sage));
  box-shadow:0 4px 8px -5px rgba(23,62,96,.35)}
.rib-track i{box-shadow:inset 0 1px 0 rgba(255,255,255,.6),0 2px 4px -2px rgba(23,62,96,.25)}
.tog::after{box-shadow:0 2px 6px rgba(23,62,96,.25),inset 0 -1px 1px rgba(23,62,96,.08)}
.tog{box-shadow:inset 0 1px 3px rgba(23,62,96,.15)}
.pill{box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 2px 5px -3px rgba(23,62,96,.3)}

/* Feature cards: raised icon tiles; on hover the card tips towards the pointer with a soft light */
.feature{position:relative;transform-style:flat}
.feature .ic{box-shadow:inset 0 1px 0 rgba(255,255,255,.75),inset 0 -2px 0 rgba(23,62,96,.06),0 8px 16px -10px rgba(23,62,96,.35)}
.feature::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity .5s var(--ease);
  background:radial-gradient(360px circle at var(--gx,50%) var(--gy,0%),rgba(114,184,231,.13),rgba(255,255,255,0) 60%)}
.feature.reveal.in.tilt{transform:perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateY(-4px);
  transition:transform .2s linear,box-shadow .5s var(--ease);transition-delay:0s;
  box-shadow:calc(var(--sx,0px)) 34px 60px -34px rgba(23,62,96,.38),0 0 0 1px var(--line)}
.feature.tilt::after{opacity:1}
.step::before{text-shadow:0 1px 0 #fff,0 3px 6px rgba(23,62,96,.15)}

/* Security: two orbits circle the lock in 3D. Each orbit is drawn twice, the far half behind the lock and the near half in front */
.vault > svg{position:relative;z-index:1}
.orbits{position:absolute;inset:6%;pointer-events:none;perspective:900px}
.orbits.back{z-index:0}.orbits.front{z-index:2}
.orbit{position:absolute;inset:0;transform-style:preserve-3d}
.orbit.o1{transform:rotateX(74deg) rotateY(-14deg)}
.orbit.o2{inset:9%;transform:rotateX(70deg) rotateY(26deg)}
.orbits.back .orbit{clip-path:inset(0 0 50% 0)}
.orbits.front .orbit{clip-path:inset(50% 0 0 0)}
.orbit i{position:absolute;inset:0;border-radius:50%;border:1.5px solid rgba(156,203,233,.55);animation:orbit 28s linear infinite}
.orbit.o2 i{border-color:rgba(169,211,191,.5);animation-duration:40s;animation-direction:reverse}
.orbit i::before{content:"";position:absolute;left:50%;top:-6px;width:11px;height:11px;margin-left:-5.5px;border-radius:50%;
  background:radial-gradient(circle at 35% 35%,#fff,#9ccbe9 60%,#4f8fbd);box-shadow:0 0 14px rgba(156,203,233,.8)}
.orbit.o2 i::before{background:radial-gradient(circle at 35% 35%,#fff,#a9d3bf 60%,#5f8f78);box-shadow:0 0 14px rgba(169,211,191,.8)}
@keyframes orbit{to{transform:rotate(360deg)}}

/* Install guide: the phones stand slightly off the page */
.istep figure{transition:transform .7s var(--ease)}
.istep:hover figure{transform:perspective(900px) rotateY(-8deg) translateY(-6px)}

/* Reduced motion: keep the gentle angle and shading, remove all movement */
@media (prefers-reduced-motion:reduce){
  .hero .rota.reveal,.hero .rota.reveal.in{transform:perspective(1600px) rotateX(4deg) rotateY(-9deg)}
  .feature.reveal.in.tilt,.istep:hover figure{transform:none}
}
@media (prefers-reduced-motion:reduce) and (max-width:960px){.hero .rota.reveal,.hero .rota.reveal.in{transform:none}}

/* Fixes to the existing security picture (found 27 Oct): the small OneRota mark inside the lock was being stretched to
   the full picture size, and the install guide's tap-ring animation was also catching the lock's rings and fading them out */
.vault svg svg{width:40px;height:40px}
.vault .ring{transform-box:view-box;transform-origin:50% 50%;animation:spin 60s linear infinite}
.vault .ring.r2{animation-duration:90s;animation-direction:reverse}
.vault .ring.r3{animation-duration:140s}
