/* Structural layout for the Piccolo Management site.
   Each page is a stack of full-width blocks (.sb). Inside each block is a fixed design
   canvas (.sc) 1200px wide on desktop and 320px wide on mobile; elements (.se) sit at
   absolute positions on that canvas. site.js picks the layout and scales the canvas. */

html, body { margin: 0; padding: 0; }
div, span, a, nav, p, b, i, em, strong, h1, h2, h3, h4, h5, h6, ul, ol, li, img, svg, iframe {
  border: 0; margin: 0; padding: 0; font-size: 100%; font: inherit; vertical-align: baseline;
}
body { position: relative; line-height: 1; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
*, *::before, *::after { box-sizing: border-box; }
h1, h2, h3, h4, h5, h6, p, nav, ul, ol, li, blockquote, figure { margin: 0; padding: 0; font: inherit; }
ul, ol { list-style: none; }
a, a:link, a:visited, a:hover, a:active, a:focus { color: inherit; text-decoration: none; }
b, strong { font-weight: 700; }
em, i { font-style: italic; }
img { border: 0; }

/* Page wrapper and blocks */
.sp { position: relative; width: 100%; min-width: 320px; overflow: hidden; }
.sb { position: relative; width: 100%; pointer-events: none; }
.sb.is-hidden { display: none; }
.ss-bg, .ss { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.sc { position: relative; height: 100%; margin: 0 auto; pointer-events: none; }

/* Block background media */
.sb-m { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; }
.pm-bg { position: absolute; background-repeat: no-repeat; background-size: 100% 100%; will-change: transform; }

/* Block states (slideshows / step views) */
.ss { display: none; }
.ss.is-active { display: block; }
.ss.is-fading-in { animation: pmFadeIn var(--state-in, 1s) both; }

/* Elements */
.se { position: absolute; display: block; box-sizing: border-box; outline: none; pointer-events: auto;
      transform-origin: 50% 50%; }
.se-t { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: transparent; border: 0; padding: 0; }
.se-rc a { text-decoration: underline; }
.se-rc a:hover { opacity: .8; }
.se-img, .se-gr { position: absolute; left: 0; top: 0; width: 100%; height: 100%;
                  background-repeat: no-repeat; background-size: cover; background-position: 50% 50%; }
.d .se-bd, .m .se-bm { overflow: hidden; }
.se-simple { width: 100%; height: 100%; border-style: solid; box-sizing: border-box; }
.se-icon, .se-icon svg { display: block; width: 100%; height: 100%; }
.se-embed, .si-embed { width: 100%; height: 100%; }
.se-t-list ul { list-style: disc; margin-left: 1.4em; }
.se-t-list ol { list-style: decimal; margin-left: 1.4em; }
.se-t-list li { margin-left: 1em; padding-left: .1em; }
a.se, .se a, [data-pc], [data-state] { cursor: pointer; }
a.se:focus-visible, .se a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Simple crossfade galleries */
.pm-gal { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.pm-gal > div { position: absolute; inset: 0; border-radius: inherit; background-size: cover; background-position: 50% 50%;
                background-repeat: no-repeat; opacity: 0; transition: opacity 1s ease; }
.pm-gal > div.is-on { opacity: 1; }

/* Instagram tiles (static, from the images Showit used as the feed fallback) */
.pm-insta { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; height: 100%; }
.pm-insta a { display: block; background-size: cover; background-position: 50% 50%; }

/* Fixed overlays and locked bars */
.sb.is-fixed { position: fixed; left: 0; top: 0; z-index: 30; }
.sb.is-overlay { position: fixed; left: 0; top: 0; z-index: 40; overflow-y: auto; }
.sb.is-overlay.slide-in-down { animation: pmSlideInDown .5s both; }
.sb.is-overlay.slide-in-right { animation: pmSlideInRight .5s both; }
.sb.is-overlay.slide-out-up { animation: pmSlideOutUp .5s both; }
.sb.is-overlay.slide-out-right { animation: pmSlideOutRight .5s both; }

/* Entrance animations (run once, when an element scrolls into view) */
.js .str-id.is-waiting > .se { visibility: hidden; }
.str-id.is-in { animation-fill-mode: both; }
.str-id.is-in.fadeIn { animation-name: pmFadeIn; }
.str-id.is-in.slideInUp { animation-name: pmSlideInUp; }
.str-id.is-in.bounceInUp { animation-name: pmBounceInUp; }

@keyframes pmFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pmSlideInUp { from { transform: translate3d(0, var(--h, 100px), 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes pmBounceInUp {
  0%, 60%, 75%, 90%, to { animation-timing-function: cubic-bezier(.215, .61, .355, 1); }
  0% { opacity: 0; transform: translate3d(0, 3000px, 0); }
  60% { opacity: 1; transform: translate3d(0, -20px, 0); }
  75% { transform: translate3d(0, 10px, 0); }
  90% { transform: translate3d(0, -5px, 0); }
  to { transform: translate3d(0, 0, 0); }
}
@keyframes pmSlideInDown { from { transform: translate3d(0, -100%, 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes pmSlideOutUp { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -100%, 0); } }
@keyframes pmSlideInRight { from { transform: translate3d(100%, 0, 0); } to { transform: translate3d(0, 0, 0); } }
@keyframes pmSlideOutRight { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(100%, 0, 0); } }

@media (prefers-reduced-motion: reduce) {
  .str-id.is-in, .ss.is-fading-in, .sb.is-overlay { animation: none !important; }
  .js .str-id.is-waiting > .se { visibility: visible; }
}
