/* DYNVOID — shared look: a soft dusk sky over sleepy hills. */
:root {
  --night: #15132a;
  --dusk: #2a2344;
  --plum: #4a3657;
  --rose: #8a6070;
  --peach: #f2c49b;
  --peach-soft: #f7dcc0;
  --sage: #a3b8a0;
  --ink: #6e3434;
  --ink-soft: #8a5550;
  --cream: #fbf1e3;
  --pink: #f4b6c2;
  --gold: #ffd9a8;
  --text: #f7ece0;
  --muted: rgba(247, 236, 224, 0.62);

  --font-ui: "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --font-hand: "Caveat", "Segoe Print", cursive;
  --font-letter: "Kalam", "Segoe Print", cursive;

  --ease-soft: cubic-bezier(.22, .8, .24, 1);
  --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  font-family: var(--font-ui);
  background:
    radial-gradient(120% 60% at 50% 115%, rgba(242, 196, 155, 0.38), transparent 60%),
    linear-gradient(180deg, var(--night) 0%, var(--dusk) 42%, var(--plum) 74%, var(--rose) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.horizon {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: min(30vh, 240px);
  background: url("/assets/hills.svg") center bottom / cover no-repeat;
  z-index: 0;
  pointer-events: none;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible {
  outline: 2px dashed var(--gold);
  outline-offset: 4px;
}

/* ---------- homepage ---------- */

.home {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 6vh 20px 22vh;
}

.shelf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 6vw, 72px);
}

.slot {
  --size: clamp(84px, 16vw, 132px);
  width: var(--size);
  height: var(--size);
  border-radius: 26px;
  border: 1.5px dashed rgba(255, 228, 200, 0.22);
  background: rgba(255, 240, 225, 0.03);
  display: grid;
  place-items: center;
  opacity: 0.75;
  animation: float 7s ease-in-out infinite;
}
.slot:last-child { animation-delay: -3.5s; }
.slot::before {
  content: "";
  width: 9px; height: 9px;
  background: var(--gold);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0.35;
  animation: twinkle 4s ease-in-out infinite;
}

.letterbox-link {
  --size: clamp(150px, 30vw, 230px);
  display: grid;
  justify-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  animation: float 6s ease-in-out infinite;
  animation-delay: -1.5s;
}
.letterbox-link img {
  width: var(--size);
  height: var(--size);
  border-radius: 34px;
  display: block;
  box-shadow:
    0 0 0 1px rgba(255, 230, 205, 0.25),
    0 18px 40px -12px rgba(10, 6, 25, 0.7),
    0 0 60px -6px rgba(255, 205, 160, 0.35);
  transition: transform .45s var(--ease-bounce), box-shadow .45s var(--ease-soft);
}
.letterbox-link span {
  font-family: var(--font-hand);
  font-size: clamp(1.4rem, 3.4vw, 1.8rem);
  letter-spacing: .02em;
  color: var(--peach-soft);
  opacity: .85;
  transition: opacity .3s;
}
.letterbox-link:hover img,
.letterbox-link:focus-visible img {
  transform: translateY(-6px) rotate(-2deg) scale(1.03);
  box-shadow:
    0 0 0 1px rgba(255, 230, 205, 0.4),
    0 26px 50px -14px rgba(10, 6, 25, 0.75),
    0 0 90px 0 rgba(255, 205, 160, 0.55);
}
.letterbox-link:hover span { opacity: 1; }
.letterbox-link:focus-visible { outline: none; }

body.leaving .slot { opacity: 0; transition: opacity .35s; }
body.leaving .letterbox-link { animation: none; }
body.leaving .letterbox-link img { transform: scale(1.18); opacity: 0; transition: transform .6s var(--ease-soft), opacity .6s; }
body.leaving .letterbox-link span { opacity: 0; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@keyframes twinkle {
  0%, 100% { opacity: .2; transform: scale(.8); }
  50% { opacity: .55; transform: scale(1.1); }
}

@media (max-width: 520px) {
  .shelf { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}
