/* One transparent Kalimera coffee/Greek tile behind every route. The page and
   section surfaces keep their own colors; this layer is decorative only. */
:root {
  --kalimera-site-tile-size: 620px;
  --kalimera-site-tile-opacity: .2;
}

html,
body {
  min-height: 100%;
  background-color: transparent !important;
  background-image: none !important;
}

body {
  position: relative;
  isolation: isolate;
}

body::before {
  content: '';
  position: fixed;
  z-index: 0;
  inset: calc(var(--kalimera-site-tile-size) * -1) 0;
  pointer-events: none;
  background-image: url('/kalimera-tile.svg?v=20260918-global-tile-1');
  background-repeat: repeat;
  background-position: center top;
  background-size: var(--kalimera-site-tile-size) var(--kalimera-site-tile-size);
  opacity: var(--kalimera-site-tile-opacity);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

/* Profile pages already contain a dedicated pattern host in their document.
   Reuse that single layer instead of stacking the site pseudo-layer above it. */
body.profile-page::before {
  display: none;
}
body.profile-page > .profile-pattern-layer {
  position: fixed;
  z-index: 0;
  inset: calc(var(--kalimera-site-tile-size) * -1) 0;
  pointer-events: none;
  background-image: url('/kalimera-tile.svg?v=20260918-global-tile-1');
  background-repeat: repeat;
  background-position: center top;
  background-size: var(--kalimera-site-tile-size) var(--kalimera-site-tile-size);
  opacity: var(--kalimera-site-tile-opacity);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}
/* The older vector-parallax artwork is a second background layer on profile
   routes. The tiled pattern above is now the sole profile artwork layer. */
body.profile-page #profile > .kalimera-vector-parallax-layer {
  display: none !important;
}

/* Keep page content above the artwork without changing its stacking order
   relative to the sticky header or existing dialogs. */
body > * {
  position: relative;
  z-index: 1;
}

/* The private profile already owns an isolated, moving tile layer. Avoid
   painting a second copy there; public profiles still receive this layer. */
html:not([data-public-profile-route]) body.profile-page::before {
  display: none;
}

@media (max-width: 767px) {
  :root {
    --kalimera-site-tile-size: 540px;
  }

  body::before {
    position: absolute;
    inset: calc(var(--kalimera-site-tile-size) * -1) 0;
    transform: none;
    will-change: auto;
  }
  body.profile-page > .profile-pattern-layer {
    inset: -540px 0;
    background-size: 540px 540px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    transform: none;
    will-change: auto;
  }
}
