/* Critical page preloader — loaded in <head> on every page */

:root {
  --tse-scrollbar-thumb: #ae6442;
  --tse-scrollbar-thumb-hover: #95452d;
  --tse-scrollbar-thumb-border: #8a6155;
  --tse-scrollbar-track: #917c76;
}

/* Site-wide scrollbar — terracotta thumb, warm beige track (all pages, all viewports) */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--tse-scrollbar-thumb) var(--tse-scrollbar-track);
}

html::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html::-webkit-scrollbar-track {
  background: var(--tse-scrollbar-track);
}

html::-webkit-scrollbar-thumb {
  background-color: var(--tse-scrollbar-thumb);
  border-radius: 999px;
  border: 2px solid var(--tse-scrollbar-thumb-border);
}

html::-webkit-scrollbar-thumb:hover {
  background-color: var(--tse-scrollbar-thumb-hover);
}

@media (max-width: 991px) {
  html::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }

  html::-webkit-scrollbar-thumb {
    border-width: 1px;
  }
}

html.tse-page-loading {
  overflow: hidden;
  background: #1d2b22;
}

html.tse-page-loading #app {
  visibility: hidden;
}

html.tse-page-ready #app {
  visibility: visible;
}

/* Shared pulsing logo preloader (page + YouTube) */
.tse-preloader__spin {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transform-origin: center center;
  animation: tse-preloader-pulse 5.33s ease-in-out infinite;
}

.tse-preloader__logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

@keyframes tse-preloader-pulse {
  0%,
  100% {
    opacity: 0.35;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(2);
  }
}

.tse-page-preloader {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1d2b22;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.35s ease;
}

.tse-page-preloader--hidden {
  opacity: 0;
}

/* Block page scroll while navigation menu is open (all pages, all viewports) */
html.menu-open,
html.menu-open body,
body.menu-open {
  overflow: hidden !important;
  height: 100%;
  overscroll-behavior: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html.menu-open::-webkit-scrollbar,
html.menu-open body::-webkit-scrollbar,
body.menu-open::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html.menu-open #app,
html.menu-open .page {
  overflow: hidden;
}

/* Themed scrollbars on the menu overlay and its scrollable panel */
[class*="header--mobile"][class*="header--opened"],
[class*="header--mobile"][class*="header--opened"] [class*="header__inner--mobile"],
[class*="header__burger"] {
  scrollbar-width: thin;
  scrollbar-color: var(--tse-scrollbar-thumb) var(--tse-scrollbar-track);
  -ms-overflow-style: auto;
  overscroll-behavior: contain;
}

[class*="header--mobile"][class*="header--opened"]::-webkit-scrollbar,
[class*="header--mobile"][class*="header--opened"] [class*="header__inner--mobile"]::-webkit-scrollbar,
[class*="header__burger"]::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

[class*="header--mobile"][class*="header--opened"]::-webkit-scrollbar-track,
[class*="header--mobile"][class*="header--opened"] [class*="header__inner--mobile"]::-webkit-scrollbar-track,
[class*="header__burger"]::-webkit-scrollbar-track {
  background: var(--tse-scrollbar-track);
}

[class*="header--mobile"][class*="header--opened"]::-webkit-scrollbar-thumb,
[class*="header--mobile"][class*="header--opened"] [class*="header__inner--mobile"]::-webkit-scrollbar-thumb,
[class*="header__burger"]::-webkit-scrollbar-thumb {
  background-color: var(--tse-scrollbar-thumb);
  border-radius: 999px;
  border: 1px solid var(--tse-scrollbar-thumb-border);
}
