/* Shared by every client layout: reset, accessibility helpers, demo bar, entrance motion. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, figure, ul, ol, dl, dd, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-underline-offset: 0.2em; touch-action: manipulation; }
button, input { font: inherit; color: inherit; touch-action: manipulation; }
table { border-collapse: collapse; }
h1, h2, h3 { text-wrap: balance; }

:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 50; background: #000; color: #fff; padding: 0.75rem 1rem; }
.skip:focus { top: 0.5rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Preview header: in the studio's own colours, so it reads as separate from the client's design */
.preview-bar {
  position: relative; z-index: 40; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem;
  padding: 0.5rem clamp(0.75rem, 0.4rem + 1.5vw, 1.5rem); background: #1f3a2c; color: #f3ebda;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 0.9375rem; line-height: 1.3;
}
.preview-back {
  display: inline-flex; align-items: center; gap: 0.375rem; min-height: 2.75rem; padding: 0 1rem 0 0.75rem;
  background: #b9d39a; color: #1f3a2c; border-radius: 999px; font-weight: 700; text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.preview-back:hover { background: #a7c784; }
.preview-back:active { transform: scale(0.97); }
.preview-back:focus-visible { outline-color: #f3ebda; }
.preview-note { opacity: 0.9; }

.open-status[data-state="open"]::before { background: var(--open); }
.map { width: 100%; aspect-ratio: 4 / 3; border: 0; }

[data-reveal] { transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
[data-reveal]:not(.is-in) { opacity: 0; transform: translateY(1.5rem); }

/* Back to top: fixed bottom-right, shown once the visitor has scrolled. Each layout sets --to-top-bg / --to-top-ink. */
.to-top {
  position: fixed; right: clamp(0.75rem, 0.5rem + 1vw, 1.5rem); bottom: clamp(0.75rem, 0.5rem + 1vw, 1.5rem); z-index: 45;
  display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%;
  background: var(--to-top-bg, #1f3a2c); color: var(--to-top-ink, #f3ebda); text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.15s ease;
}
.to-top:hover { filter: brightness(1.15); transform: translateY(-2px); }
.to-top:active { transform: scale(0.94); }
.to-top:focus-visible { outline: 3px solid var(--to-top-bg, #1f3a2c); outline-offset: 3px; }
.js-to-top .to-top:not(.is-shown) { opacity: 0; transform: translateY(0.75rem); pointer-events: none; visibility: hidden; transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0.25s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
