:root {
  color-scheme: light;
  --page-background: #f7f1ea;
  --footer-color: #536070;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--page-background);
  color: #071d36;
  font-family: Arial, Helvetica, sans-serif;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100dvh - 3.5rem);
  padding: clamp(2.5rem, 7vw, 7rem) clamp(1.25rem, 5vw, 5rem);
}

.waiting-visual {
  position: relative;
  display: block;
  width: min(100%, 1280px);
}

.waiting-visual::after {
  position: absolute;
  top: 51.66015625%;
  left: 50%;
  width: 4.8177083333%;
  aspect-ratio: 1;
  content: "";
  background: url("../assets/images/mecabli-waiting.webp") 50% 51.7889% / 2075.6756757% auto no-repeat;
  transform: translate(-50%, -50%) rotate(0deg);
  transform-origin: 50% 50%;
  animation: gearRotation 10s linear infinite;
  pointer-events: none;
}

@keyframes gearRotation {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.waiting-visual img {
  display: block;
  width: 100%;
  height: auto;
}

.intro {
  width: min(100%, 700px);
  margin: 32px 0;
  color: #2d3e50;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}

footer {
  padding: 0.9rem 1.25rem 1.35rem;
  color: var(--footer-color);
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  text-align: center;
}

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

@media (max-width: 600px) {
  main {
    min-height: calc(100dvh - 3.2rem);
    padding: clamp(1.5rem, 6vh, 3rem) clamp(0.75rem, 3vw, 1.25rem);
  }

  .waiting-visual {
    width: min(100%, 32rem);
  }

  .waiting-visual::after {
    top: 46.0611979167%;
    left: 48.681640625%;
    width: 7.2265625%;
    background-image: url("../assets/images/mecabli-waiting-mobile.webp");
    background-position: 48.5794% 45.8616%;
    background-size: 1383.7837838% auto;
  }

  .intro {
    width: 90%;
    margin: 24px 0;
    font-size: 18px;
  }

  footer {
    padding-bottom: 1rem;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  main {
    min-height: calc(100dvh - 2.7rem);
    padding-block: 1.25rem;
  }

  .waiting-visual {
    width: min(100%, 68vh);
  }

  footer {
    padding: 0.45rem 1rem 0.75rem;
  }
}
