* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

/* ---- background: fixed full viewport; layer styles live in /shared/background/background.css ---- */
.bg {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 0;
  pointer-events: none;
}

/* ---- foreground ---- */
/* First screen: the greeting layer sits over the background, under the content. */
.hero {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
}

/* Reduced-motion visitors: play / pause the background (public/motion-button.js). In the first screen under
   its blocks (.first-screen is z-index 2), so it scrolls away with it and never covers page content. */
.motion-btn {
  position: absolute;
  z-index: 1;
  right: calc(12px + env(safe-area-inset-right, 0px));
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font: 500 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  opacity: 0.85;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.2s;
}
.motion-btn[hidden] { display: none; }
.motion-btn[data-corner$="left"] { right: auto; left: calc(12px + env(safe-area-inset-left, 0px)); }
.motion-btn[data-corner^="top"] { bottom: auto; top: calc(12px + env(safe-area-inset-top, 0px)); }
.motion-btn:hover, .motion-btn:focus-visible { opacity: 1; }
/* White ring with a dark halo on both sides: visible over light and dark backgrounds. */
.motion-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 7px rgba(0, 0, 0, 0.6); }
/* Play triangle; pressed (animating) = pause bars. */
.motion-btn::before {
  content: "";
  flex: none;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5.5px 0 5.5px 9px;
  border-color: transparent transparent transparent currentColor;
}
.motion-btn[aria-pressed="true"]::before { width: 3px; height: 11px; border-width: 0 3px; border-color: currentColor; }

/* Admin preview (embedded): briefly outline the block selected in the editor. */
.is-embedded .block.is-highlighted { outline: 2px solid #c9a96e; outline-offset: 4px; transition: outline-color 0.6s; }
