* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
}

#slideshow {
  position: fixed;
  inset: 0;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
}

.slide.visible {
  opacity: 1;
}

#caption {
  position: fixed;
  right: clamp(16px, 3vw, 48px);
  bottom: calc(clamp(64px, 9vh, 110px) + clamp(12px, 2vh, 24px));
  max-width: min(440px, 42vw);
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-radius: 10px;
  color: #fff;
  font-size: clamp(0.75rem, 1.1vw, 0.95rem);
  line-height: 1.45;
  text-align: right;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  z-index: 5;
}

#caption.visible {
  opacity: 1;
}

#bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(64px, 9vh, 110px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 3vw, 48px);
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.35) 70%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  z-index: 10;
}

#bar-left {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}

#clock {
  display: flex;
  align-items: baseline;
  gap: clamp(10px, 1.5vw, 20px);

  flex-direction: column;
  gap: 0;
}

#time {
  font-size: clamp(1.6rem, 3.4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;

  order: 1;
}

#date {
  font-size: clamp(0.85rem, 1.3vw, 1.15rem);
  font-weight: 400;
  opacity: 0.85;
  text-transform: capitalize;
  
  order: 2;
}

#weather {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.2vw, 16px);
}

#weather>div{
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: flex-end;
}

#weather:empty,
#weather.hidden {
  display: none;
}

#weather-icon {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
}

#weather-temp {
  font-size: clamp(1.6rem, 3.4vw, 2.8rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

#weather-range {
  font-size: clamp(0.85rem, 1.3vw, 1.15rem);
  opacity: 0.85;
  font-variant-numeric: tabular-nums;
}

#weather-attribution {
  font-size: clamp(0.7rem, 1vw, 0.85rem);
  font-weight: 500;
  color: #fff;
  opacity: 0.7;
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: opacity 0.2s ease-in-out;
}

#weather-attribution:hover,
#weather-attribution:focus-visible {
  opacity: 1;
}

#weather-attribution.hidden {
  display: none;
}
