/* ============================================================
   Riparazioni-Elettrodomestici-Hogas — shared demo foundation
   Only structural rules live here. Every demo owns its look.
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #080808;
  color: #f4f1ea;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.is-loading {
  overflow: hidden;
}

img,
canvas,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
}

::selection {
  background: #d4af37;
  color: #080808;
}

/* ---------- fixed scroll-scrubbing canvas ---------- */

.hero-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100svh;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

/* ---------- page shell ---------- */

.site-main {
  position: relative;
  z-index: 1;
  min-height: 400vh;
}

/* ---------- loader ---------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: #080808;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__inner {
  width: min(320px, calc(100vw - 48px));
}

.loader__eyebrow {
  display: block;
  margin-bottom: 18px;
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  opacity: 0.6;
}

.loader__bar {
  position: relative;
  height: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
}

.loader__bar > span {
  display: block;
  width: 0%;
  height: 100%;
  background: currentColor;
  transition: width 0.25s ease;
}

.loader__meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.58;
}

/* ---------- accessibility helpers ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
