:root {
  --itour-loader-green: #08745b;
  --itour-loader-deep: #035344;
}

html.itour-page-loading,
html.itour-page-loading body {
  overflow: hidden !important;
}

.itour-page-loader {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 13px;
  min-height: 100dvh;
  padding: 24px;
  color: var(--itour-loader-deep);
  background: #fff;
  opacity: 1;
  visibility: visible;
  transition: opacity .3s ease, visibility .3s ease;
}

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

.itour-loader-scene {
  position: relative;
  width: clamp(154px, 20vw, 184px);
  height: clamp(154px, 20vw, 184px);
  display: grid;
  place-items: center;
}

.itour-loader-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: itour-route-drift 9s linear infinite;
}

.itour-loader-route circle {
  fill: none;
  stroke: rgba(69, 169, 145, .7);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 7 7;
  transform-origin: center;
}

.itour-loader-logo-halo {
  position: absolute;
  width: 104px;
  height: 104px;
  border: 1px solid rgba(8, 116, 91, .12);
  border-radius: 50%;
  background: rgba(240, 249, 246, .9);
  box-shadow: 0 10px 35px rgba(3, 83, 68, .12), inset 0 0 0 7px #fff;
  animation: itour-logo-breathe 2s ease-in-out infinite;
}

.itour-loader-logo {
  position: relative;
  z-index: 2;
  width: 86px;
  height: 86px;
  object-fit: contain;
  animation: itour-logo-bob 2s ease-in-out infinite;
}

.itour-loader-orbit {
  position: absolute;
  z-index: 3;
  inset: 0;
  border-radius: 50%;
  animation: itour-boat-orbit 1.75s linear infinite;
}

.itour-loader-boat {
  width: 43px;
  height: 31px;
  position: absolute;
  top: -1px;
  left: 50%;
  overflow: visible;
  filter: drop-shadow(0 4px 5px rgba(3, 83, 68, .2));
  transform: translateX(-50%) rotate(8deg);
  transform-origin: center;
  animation: itour-boat-upright 1.75s linear infinite;
}

.itour-loader-boat-sail { fill: #fff; stroke: var(--itour-loader-deep); stroke-width: 2.2; stroke-linejoin: round; }
.itour-loader-boat-sail-accent { fill: #7dc8b0; stroke: var(--itour-loader-deep); stroke-width: 2.2; stroke-linejoin: round; }
.itour-loader-boat-hull { fill: var(--itour-loader-green); stroke: var(--itour-loader-deep); stroke-width: 2; stroke-linejoin: round; }
.itour-loader-boat-detail { fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; }

.itour-loader-copy {
  display: grid;
  justify-items: center;
  gap: 5px;
}

.itour-loader-wordmark {
  position: relative;
  display: block;
  width: clamp(170px, 23vw, 215px);
}

.itour-loader-wordmark img {
  display: block;
  width: 100%;
  height: auto;
}

.itour-loader-wordmark-light {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 42%, rgba(202, 255, 237, .25) 46%, #eafff8 48.5%, #fff 50%, #eafff8 51.5%, rgba(202, 255, 237, .25) 54%, transparent 58%);
  background-position: 135% 0;
  background-size: 250% 100%;
  -webkit-mask: url("../img/textlogo2-transparent.png") center / contain no-repeat;
  mask: url("../img/textlogo2-transparent.png") center / contain no-repeat;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, .8));
  animation: itour-wordmark-write 2.4s ease-in-out infinite;
}

.itour-loader-caption {
  color: #688078;
  font: 600 10px/1.2 Inter, Poppins, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

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

@keyframes itour-boat-orbit {
  to { transform: rotate(360deg); }
}

@keyframes itour-boat-upright {
  from { transform: translateX(-50%) rotate(8deg); }
  to { transform: translateX(-50%) rotate(-352deg); }
}

@keyframes itour-route-drift {
  to { transform: rotate(-360deg); }
}

@keyframes itour-logo-breathe {
  0%, 100% { transform: scale(.98); opacity: .82; }
  50% { transform: scale(1.04); opacity: 1; }
}

@keyframes itour-logo-bob {
  0%, 100% { transform: translateY(1px); }
  50% { transform: translateY(-2px); }
}

@keyframes itour-wordmark-write {
  0% { background-position: 135% 0; opacity: .45; }
  8% { opacity: 1; }
  72% { background-position: -35% 0; opacity: 1; }
  84%, 100% { background-position: -35% 0; opacity: 0; }
}

@media (max-width: 600px) {
  .itour-page-loader { gap: 11px; }
  .itour-loader-scene { width: 148px; height: 148px; }
  .itour-loader-logo-halo { width: 96px; height: 96px; }
  .itour-loader-logo { width: 80px; height: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .itour-loader-orbit,
  .itour-loader-route,
  .itour-loader-boat,
  .itour-loader-logo-halo,
  .itour-loader-logo,
  .itour-loader-wordmark-light { animation: none; }
}
