body {
  --day: #f0eeeb;
  --evening: #e9cfaf;
  --dusk: #b98d63;
  --night: #232730;
  --dawn: #31333d;
  --morning: #c0c5c0;
  --light: var(--day);
  --dark: #262510;
  --shadow: #0f0d0b;
  --bounce-light: #dcc7a8;
  --timing-fn: cubic-bezier(0.455, 0.19, 0, 0.985);
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background-color: var(--light);
  animation-duration: 0s;
  animation-fill-mode: forwards;
  animation-timing-function: linear;
  overflow: hidden;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.animation-ready {
  animation-play-state: running;
  animation-duration: 1s;
  animation-name: sunrise;
}

body.animation-ready.dark {
  animation-duration: 1.7s;
  animation-name: sunset;
}

body.dark {
  --light: var(--night);
  --dark: #f7f1e8;
  --shadow: #000000;
  --bounce-light: #1d2835;
}

@keyframes sunrise {
  0% { background-color: var(--night); }
  10% { background-color: var(--dawn); }
  35% { background-color: var(--morning); }
  100% { background-color: var(--day); }
}

@keyframes sunset {
  0% { background-color: var(--day); }
  30% { background-color: var(--evening); }
  60% { background-color: var(--dusk); }
  90% { background-color: var(--dawn); }
  100% { background-color: var(--night); }
}

#dappled-light {
  pointer-events: none;
  position: fixed;
  height: 100vh;
  width: 100vw;
  inset: 0;
}

#progressive-blur {
  position: absolute;
  height: 100%;
  width: 100%;
}

#progressive-blur > div {
  position: absolute;
  height: 100%;
  width: 100%;
  inset: 0;
  backdrop-filter: blur(var(--blur-amount));
  mask-image: linear-gradient(252deg, transparent, transparent var(--stop1), black var(--stop2), black);
}

#progressive-blur > div:nth-child(1) {
  --blur-amount: 8px;
  --stop1: 0%;
  --stop2: 0%;
}

#progressive-blur > div:nth-child(2) {
  --blur-amount: 18px;
  --stop1: 54%;
  --stop2: 82%;
}

#progressive-blur > div:nth-child(3) {
  --blur-amount: 64px;
  --stop1: 58%;
  --stop2: 78%;
}

#progressive-blur > div:nth-child(4) {
  --blur-amount: 128px;
  --stop1: 72%;
  --stop2: 84%;
}

#glow {
  position: absolute;
  background: linear-gradient(302deg, var(--bounce-light), var(--bounce-light) 16%, transparent 48%);
  transition: background 1s var(--timing-fn);
  height: 100%;
  width: 100%;
  opacity: 0.18;
}

#glow-bounce {
  position: absolute;
  background: linear-gradient(356deg, rgba(232, 214, 187, 0.72) 0%, transparent 24%, transparent 100%);
  transition: background 1s var(--timing-fn);
  opacity: 0.12;
  height: 100%;
  width: 100%;
  bottom: 0;
}

.perspective {
  position: absolute;
  transition: transform 1.7s var(--timing-fn), opacity 4s ease;
  top: -38vh;
  right: -22vw;
  width: 92vw;
  height: 145vh;
  opacity: 0.2;
  background-blend-mode: darken;
  transform-origin: top right;
  transform-style: preserve-3d;
  transform: matrix3d(0.66, -0.118, 0, 0.0012, 0.012, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
}

.dark .perspective {
  opacity: 0.42;
  transform: matrix3d(0.74, 0.052, 0, 0.0004, 0.01, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
}

#leaves {
  position: absolute;
  background-size: cover;
  background-repeat: no-repeat;
  bottom: 110px;
  right: -120px;
  width: 1230px;
  height: 1230px;
  background-image: url("./leaves.png");
  filter: url(#wind) brightness(0.58) contrast(1.42);
  animation: billow 18s ease-in-out infinite;
  opacity: 1;
  mix-blend-mode: multiply;
}

#blinds {
  position: relative;
  width: 100%;
}

#blinds .shutter,
#blinds .bar {
  background-color: var(--shadow);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
}

#blinds > .shutters {
  display: flex;
  flex-direction: column;
  align-items: end;
  gap: 74px;
  transition: gap 1s var(--timing-fn);
}

.dark #blinds > .shutters {
  gap: 28px;
}

#blinds > .vertical {
  top: 0;
  position: absolute;
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: space-around;
}

.vertical > .bar {
  width: 4px;
  height: 100%;
  opacity: 1;
}

.shutter {
  width: 100%;
  height: 34px;
  transition: height 1s var(--timing-fn);
  opacity: 1;
}

.dark .shutter {
  height: 64px;
  opacity: 1;
}

@keyframes billow {
  0% {
    transform: perspective(420px) rotateX(0deg) rotateY(0deg) scale(1);
  }
  25% {
    transform: perspective(420px) rotateX(0.6deg) rotateY(1.5deg) scale(1.01);
  }
  50% {
    transform: perspective(420px) rotateX(-2.4deg) rotateY(-1.4deg) scale(0.985);
  }
  75% {
    transform: perspective(420px) rotateX(0.8deg) rotateY(-0.8deg) scale(1.018);
  }
  100% {
    transform: perspective(420px) rotateX(0deg) rotateY(0deg) scale(1);
  }
}

.overlay {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 18px 20px;
  pointer-events: none;
}

.footer-block {
  pointer-events: none;
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.brand-mark {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  font-size: clamp(48px, 8vw, 112px);
  line-height: 1;
  letter-spacing: 0.22em;
  text-indent: 0.22em;
  font-weight: 400;
  text-align: center;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2),
    0 18px 52px rgba(247, 241, 232, 0.18);
}

.footer-note {
  color: rgba(38, 37, 16, 0.26);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-align: center;
}

.footer-year {
  color: rgba(38, 37, 16, 0.22);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-align: center;
}

.footer-year a {
  color: inherit;
  text-decoration: none;
}

.footer-year a:hover {
  text-decoration: underline;
}

.dark .brand-mark {
  color: rgba(247, 241, 232, 0.82);
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.12),
    0 18px 52px rgba(0, 0, 0, 0.24);
}

.dark .footer-note {
  color: rgba(247, 241, 232, 0.24);
}

.dark .footer-year {
  color: rgba(247, 241, 232, 0.2);
}

@media (max-width: 640px) {
  .footer-block {
    bottom: 12px;
  }

  .brand-mark {
    font-size: clamp(36px, 12vw, 64px);
    letter-spacing: 0.16em;
    text-indent: 0.16em;
    padding: 0 20px;
  }

  .perspective {
    width: 140vw;
    right: -54vw;
    top: -34vh;
    opacity: 0.22;
  }
}
