html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

html:has(body.lotus-page) {
  background-color: #000;
}

body.lotus-page {
  background-color: #000;
  color: #f5f5f5;
  display: flex;
  flex-direction: column;
  height: 100vh;
  margin-bottom: 0;
  overflow: hidden;
}

body.lotus-page header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
}

body.lotus-page .navbar {
  background-color: transparent !important;
  border-bottom: none !important;
  box-shadow: none;
}

body.lotus-page .navbar-brand {
  color: rgba(255, 255, 255, 0.72);
}

body.lotus-page > .container {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: none;
  width: 100%;
  min-height: 0;
  padding: 0;
  margin: 0;
}

body.lotus-page main {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
}

body.lotus-page .footer {
  display: none;
}

.lotus-scene {
  --lotus-frame: max(4vw, 72px);
  position: relative;
  isolation: isolate;
  width: min(calc(100vw - 2 * var(--lotus-frame)), calc((100vh - 2 * var(--lotus-frame)) * 3 / 4));
  aspect-ratio: 3 / 4;
  min-height: 0;
  background: white;
}

.lotus-layer {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
}

.lotus-layer-background {
  z-index: 1;
  inset: auto 0 0 0;
  width: 100%;
  height: auto;
}

.lotus-layer-background img,
.lotus-layer-house img,
.lotus-layer-foreground img,
.lotus-layer-bud img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.lotus-layer-background img {
  mask-image: linear-gradient(to bottom, transparent 0%, black 28%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 28%);
}

.lotus-layer-house {
  z-index: 1;
  inset: 7% auto auto 73%;
  width: 85%;
  height: auto;
  will-change: transform;
  transform: translateX(-50%) translate3d(0, calc(var(--lotus-y, 0) * 1px), 0);
}

.lotus-layer-foreground {
  z-index: 4;
  inset: auto auto -2% 50%;
  width: 106%;
  height: auto;
  will-change: transform;
  transform: translateX(-50%) translate3d(0, calc(var(--lotus-y, 0) * 1px), 0);
}

.lotus-layer-leaves {
  transition: opacity 0.7s ease;
}

.lotus-layer-leaves-rain {
  z-index: 1;
  inset: auto auto 17% 70%;
  width: 120%;
  height: auto;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
}

.lotus-layer-leaves-rain video {
  display: block;
  width: 100%;
  height: auto;
}

.lotus-scene[data-weather="rain"] .lotus-layer-leaves-cloud {
  opacity: 0;
}

.lotus-scene[data-weather="rain"] .lotus-layer-leaves-rain {
  opacity: 1;
}

.lotus-scene[data-weather="rain"] .lotus-layer-leaves-rain.is-finished {
  opacity: 0;
  transition: opacity 0.9s ease;
}

.lotus-layer-sway,
.lotus-layer-fish {
  z-index: 3;
  height: auto;
  pointer-events: none;
  will-change: transform;
  transform: translate3d(0, calc(var(--lotus-y, 0) * 1px), 0);
}

.lotus-layer-sway {
  z-index: 4;
  transition: opacity 0.7s ease;
}

.lotus-layer-sway-cloud {
  inset: auto auto 29.5% 22%;
  width: 30%;
}

.lotus-layer-sway-rain {
  inset: auto auto 30% 20%;
  width: 30%;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.lotus-layer-sway-rain video {
  translate: 0 8%;
  transition: translate 1s ease;
}

.lotus-scene[data-weather="rain"] .lotus-layer-sway-cloud {
  opacity: 0;
}

.lotus-scene[data-weather="rain"] .lotus-layer-sway-rain {
  opacity: 1;
}

.lotus-scene[data-weather="rain"] .lotus-layer-sway-rain video {
  translate: 0 0;
}

.lotus-layer-fish {
  inset: auto auto 25% 64%;
  width: 20%;
  opacity: 0.85;
  transition: opacity 0.7s ease;
}

.lotus-scene[data-weather="rain"] .lotus-layer-fish {
  opacity: 0;
}

.lotus-layer-bud {
  z-index: 3;
  
  height: auto;
  transition: opacity 0.7s ease;
  /* pointer-events: none;
  will-change: transform;
  transform: translate3d(0, calc(var(--lotus-y, 0) * 1px), 0); */
}

/* Both buds share a 1024x1536 canvas, but the bended stem meets the water
   further right, so shift the layer to keep the stem base in place. */
.lotus-layer-bud-rain {
  inset: auto auto 5% 45%;
  width: 20%;
  left: 45%;
  opacity: 0;
}

.lotus-layer-bud-cloud {
  inset: auto auto -1% 40%;
  width: 25%;
}

.lotus-scene[data-weather="rain"] .lotus-layer-bud-cloud {
  opacity: 0;
}

.lotus-scene[data-weather="rain"] .lotus-layer-bud-rain {
  opacity: 1;
}

.lotus-layer-foreground-sway {
  z-index:5;
  opacity: 0.30;
}

.lotus-layer-clouds {
  z-index: 7;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.lotus-layer-clouds img {
  display: block;
  position: relative;
  width: 150%;
  max-width: none;
  height: auto;
  left: -25%;
  top: -35%;
  translate: 0 -8%;
  transition: translate 0.8s ease;
}

.lotus-scene[data-weather="rain"] .lotus-layer-clouds {
  opacity: 1;
}

.lotus-scene[data-weather="rain"] .lotus-layer-clouds img {
  translate: 0 0;
  animation: lotus-clouds-drift 1s cubic-bezier(0.37, 0, 0.63, 1) 1 forwards;
}

@keyframes lotus-clouds-drift {
  from {
    transform: translate3d(3%, 0, 0);
  }

  to {
    transform: translate3d(-1.5%, 1.5%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lotus-layer-clouds {
    transition: opacity 0.2s ease;
  }

  .lotus-layer-clouds img {
    translate: none;
    transition: none;
  }

  .lotus-scene[data-weather="rain"] .lotus-layer-clouds img {
    animation: none;
  }

  .lotus-layer-sway-rain,
  .lotus-layer-sway-rain video {
    transition: opacity 0.2s ease;
    translate: none;
  }
}

.lotus-layer-sway video,
.lotus-layer-fish video {
  display: block;
  width: 100%;
  height: auto;
}

.lotus-weather {
  position: absolute;
  top: 0;
  left: -8.5%;
  z-index: 8;
  display: flex;
  flex-direction: column;
  width: max(2.75rem, 5%);
  pointer-events: auto;
}

.lotus-weather-option {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  margin: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.lotus-weather-option:hover {
  transform: scale(1.12);
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

.lotus-weather-option:active {
  transform: scale(0.94);
  filter: none;
}

.lotus-weather-option:focus-visible {
  outline: 2px solid rgba(160, 28, 28, 0.7);
  outline-offset: 2px;
}

.lotus-weather-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  transform: scale(1.45);
  transition: opacity 0.16s ease;
}

.lotus-weather-icon-on {
  opacity: 0;
}

.lotus-weather-option[aria-pressed="true"] .lotus-weather-icon-on {
  opacity: 1;
}

.lotus-weather-option[aria-pressed="true"] .lotus-weather-icon-off {
  opacity: 0;
}

@media (max-width: 575.98px) {
  .lotus-weather {
    left: 0;
  }

  .lotus-weather-option {
    width: 70%;
    margin: 2px 0;
  }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}