:root {
  --color-text-primary: #f7f9fc;
  --color-text-muted: rgba(247, 249, 252, 0.85);
  --color-glass-bg: rgba(20, 24, 35, 0.28);
  --color-glass-border: rgba(255, 255, 255, 0.22);
  --color-shadow: rgba(10, 12, 20, 0.35);
  --color-overlay: rgba(10, 12, 22, 0.45);

  --radius-xl: 26px;
  --blur-strength: 16px;

  --card-width: min(92vw, 680px);
  --space-card-y: clamp(1.5rem, 3.5vw, 2.5rem);
  --space-card-x: clamp(1.25rem, 4vw, 3rem);

  --transition-fast: 250ms ease;
  --transition-medium: 700ms ease;
  --transition-slow: 1200ms ease;
}

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

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

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-text-primary);
  overflow: hidden;
  background: #06080f;
}

/* Full-page slider stack */
.background-slider {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity var(--transition-slow), transform 5.5s linear;
  will-change: opacity, transform;
}

.slide.active {
  opacity: 1;
  transform: scale(1);
}

/* Readability overlay */
.page-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.08), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.06), transparent 40%),
    var(--color-overlay);
}

.domain {
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  background: linear-gradient(120deg, rgba(255, 255, 255, 1), rgba(224, 242, 255, 0.92));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 3px 10px rgba(0, 0, 0, 0.42),
    0 0 20px rgba(210, 236, 255, 0.45);
}

h1 {
  font-size: clamp(2.8rem, 11vw, 6.8rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: linear-gradient(120deg, rgba(255, 255, 255, 1), rgba(220, 241, 255, 0.92));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow:
    0 4px 16px rgba(0, 0, 0, 0.42),
    0 0 28px rgba(210, 236, 255, 0.35);
}

.date {
  font-size: clamp(1.08rem, 2.6vw, 1.5rem);
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Floating glassy text (no box/frame) */
.floating-datetime {
  position: fixed;
  z-index: 2;
  display: grid;
  gap: 0.65rem;
  text-align: center;
  justify-items: center;
  max-width: min(90vw, 760px);
  transition: all var(--transition-slow);
  pointer-events: none;
  animation: fadeInUp 1100ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.floating-datetime .date {
  color: rgba(255, 255, 255, 0.96);
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.45),
    0 8px 30px rgba(255, 255, 255, 0.2);
}

/* Glass-like text sheen */
.floating-datetime .domain,
.floating-datetime h1 {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.98), rgba(210, 236, 255, 0.85));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.floating-datetime .date {
  color: rgba(245, 250, 255, 0.96);
}

/* Glossy analog clock */
.analog-clock {
  width: clamp(180px, 24vw, 290px);
  aspect-ratio: 1 / 1;
  position: relative;
  margin: 0.4rem 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.46), rgba(255, 255, 255, 0.12) 38%, rgba(15, 20, 34, 0.24) 70%),
    rgba(20, 28, 44, 0.24);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow:
    inset 0 2px 12px rgba(255, 255, 255, 0.26),
    0 16px 45px rgba(0, 0, 0, 0.42),
    0 0 36px rgba(210, 236, 255, 0.25);
}

.clock-mark {
  position: absolute;
  background: rgba(245, 250, 255, 0.9);
  border-radius: 999px;
}

.mark-12,
.mark-6 {
  width: 2px;
  height: 14px;
  left: 50%;
  transform: translateX(-50%);
}

.mark-12 { top: 10px; }
.mark-6 { bottom: 10px; }

.mark-3,
.mark-9 {
  width: 14px;
  height: 2px;
  top: 50%;
  transform: translateY(-50%);
}

.mark-3 { right: 10px; }
.mark-9 { left: 10px; }

.clock-hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(0deg);
  border-radius: 999px;
}

.hour-hand {
  width: 6px;
  height: 28%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(220, 235, 255, 0.78));
}

.minute-hand {
  width: 4px;
  height: 37%;
  background: linear-gradient(180deg, rgba(245, 251, 255, 0.98), rgba(190, 221, 252, 0.75));
}

.second-hand {
  width: 2px;
  height: 41%;
  background: linear-gradient(180deg, rgba(255, 214, 168, 1), rgba(255, 181, 125, 0.95));
}

.clock-center-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 1), rgba(234, 245, 255, 0.75));
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.7);
}

/* Position presets (JS swaps these classes) */
.pos-top-left { top: 10%; left: 6%; }
.pos-top-right { top: 12%; right: 6%; }
.pos-center-left { top: 50%; left: 6%; transform: translateY(-50%); }
.pos-center-right { top: 50%; right: 6%; transform: translateY(-50%); }
.pos-bottom-left { bottom: 11%; left: 6%; }
.pos-bottom-right { bottom: 12%; right: 6%; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive refinements */
@media (max-width: 768px) {
  .domain {
    letter-spacing: 0.1em;
  }

  .pos-top-left,
  .pos-top-right { top: 9%; }

  .pos-bottom-left,
  .pos-bottom-right { bottom: 9%; }
}

@media (max-width: 480px) {
  .floating-datetime {
    max-width: 82vw;
    gap: 0.4rem;
  }

  .analog-clock {
    width: clamp(150px, 42vw, 210px);
  }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
