:root {
  color-scheme: dark;
  font-family: Arial, Helvetica, sans-serif;
  --ink: #20242a;
  --paper: #f7f7f4;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  overflow: hidden;
}

body {
  min-height: 100dvh;
  color: var(--paper);
  background: var(--ink);
}

.scene-backdrop,
.scene,
.scene-shade {
  position: fixed;
  inset: 0;
}

.scene-backdrop {
  z-index: 0;
  overflow: hidden;
}

.scene-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: blur(26px) brightness(0.72) saturate(0.9);
  transform: scale(1.08);
}

.scene {
  z-index: 1;
  overflow: hidden;
}

.scene img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.scene-shade {
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 42% 48% at 27% 50%, rgb(32 36 42 / 36%), rgb(32 36 42 / 4%) 72%, transparent 100%),
    linear-gradient(90deg, rgb(32 36 42 / 16%), transparent 58%),
    linear-gradient(180deg, rgb(32 36 42 / 10%), transparent 30%, rgb(32 36 42 / 12%));
}

.hero {
  position: relative;
  z-index: 3;
  display: flex;
  min-height: 100dvh;
  align-items: center;
  padding: clamp(2rem, 5vw, 5rem) clamp(1.5rem, 8vw, 8rem);
}

.hero-content {
  position: relative;
  display: flex;
  width: min(27rem, 38vw);
  align-items: center;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.hero-content::before {
  position: absolute;
  z-index: -1;
  width: 150%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(32 36 42 / 34%), transparent 68%);
  content: "";
  filter: blur(8px);
  pointer-events: none;
}

.logo {
  display: block;
  width: clamp(14rem, 22vw, 21rem);
  height: auto;
  filter: drop-shadow(0 8px 24px rgb(32 36 42 / 28%));
}

h1 {
  margin: 0;
  font-size: clamp(1.5rem, 2.6vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.09em;
  line-height: 1.1;
  text-shadow: 0 3px 20px rgb(32 36 42 / 55%);
}

.loader {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.15rem;
}

.hourglass {
  display: block;
  font-family: "Segoe UI Symbol", Arial, sans-serif;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--paper);
  text-shadow: 0 2px 10px rgb(32 36 42 / 55%);
  transform-origin: center;
}

.loader-track {
  display: block;
  width: 4.5rem;
  height: 2px;
  overflow: hidden;
  background: rgb(247 247 244 / 32%);
}

.loader-fill {
  display: block;
  width: 55%;
  height: 100%;
  background: var(--paper);
  transform: translateX(-115%);
}

@media (prefers-reduced-motion: no-preference) {
  .scene-backdrop img {
    animation: scene-breathe 18s ease-in-out infinite alternate;
  }

  .hero-content {
    animation: content-in 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hourglass {
    animation: turn-hourglass 2.4s ease-in-out infinite;
  }

  .loader-fill {
    animation: loader-sweep 2.4s ease-in-out infinite;
  }
}

@keyframes scene-breathe {
  from { transform: scale(1.08); }
  to { transform: scale(1.13); }
}

@keyframes content-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes turn-hourglass {
  0%, 38% { transform: rotate(0deg); }
  50%, 88% { transform: rotate(180deg); }
  100% { transform: rotate(360deg); }
}

@keyframes loader-sweep {
  0% { transform: translateX(-115%); }
  50% { transform: translateX(82%); }
  100% { transform: translateX(-115%); }
}

@media (min-width: 768px) and (max-width: 1099px) {
  .scene-shade {
    background:
      radial-gradient(circle at 19% 48%, rgb(32 36 42 / 42%), transparent 34%),
      linear-gradient(180deg, rgb(32 36 42 / 8%), transparent 62%, rgb(32 36 42 / 12%));
  }

  .hero {
    justify-content: flex-start;
    padding: 3rem 5vw;
  }

  .hero-content {
    width: min(18rem, 34vw);
  }

  .logo {
    width: clamp(12rem, 24vw, 16rem);
  }
}

@media (max-width: 767px) {
  .scene-shade {
    background:
      radial-gradient(circle at 50% 22%, rgb(32 36 42 / 44%), transparent 38%),
      linear-gradient(180deg, rgb(32 36 42 / 5%), transparent 58%, rgb(32 36 42 / 16%));
  }

  .hero {
    align-items: flex-start;
    justify-content: center;
    padding: max(4.5rem, 11vh) 1.25rem max(1.5rem, env(safe-area-inset-bottom));
  }

  .hero-content {
    width: min(100%, 19rem);
    gap: 0.75rem;
  }

  .hero-content::before {
    width: 132%;
  }

  .logo {
    width: clamp(11.5rem, 52vw, 14rem);
  }

  h1 {
    font-size: clamp(1.45rem, 7vw, 2rem);
  }
}

@media (max-width: 767px) and (orientation: landscape) {
  .scene img {
    object-position: center 46%;
  }

  .scene-shade {
    background: radial-gradient(circle at 23% 50%, rgb(32 36 42 / 42%), transparent 36%);
  }

  .hero {
    align-items: center;
    justify-content: flex-start;
    padding: 1.25rem 5vw;
  }

  .hero-content {
    width: min(18rem, 38vw);
    gap: 0.55rem;
  }

  .logo {
    width: clamp(10rem, 26vw, 14rem);
  }

  h1 {
    font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  }

  .loader {
    margin-top: 0;
  }
}
