/* Joy on Wendy Way — placeholder page.
   Hand-editable: no build step, no preprocessor. Colors and fonts live in :root. */

:root {
  --bg-deep:   #05131c;  /* near-black navy */
  --bg-green:  #0b2f26;  /* deep christmas green */
  --gold:      #e8c66a;
  --red:       #c8353b;
  --text:      #f3efe6;
  --muted:     rgba(243, 239, 230, 0.86);

  /* Heading typeface. To swap it, change this AND the Google Fonts
     <link> in index.html to the new family name. */
  --heading-font: "Mountains of Christmas", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

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

body {
  /* Shows through only until the photo loads, and behind any letterboxing. */
  background: var(--bg-deep);
  background-image: linear-gradient(180deg, var(--bg-green) 0%, var(--bg-deep) 62%, #030b12 100%);
  color: var(--text);
  font-family: "Lato", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---- Layering: photo (back) < scrim < snow < text (front) ---- */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.scene img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Favours the lower two-thirds of the photo, where the village sits. */
  object-position: center 58%;
}

/* Dark scrim over the photo so the gold heading stays legible.
   Lower the alpha values to let more of the photo through. */
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 88% 50% at 50% 26%,
      rgba(3, 11, 18, 0.82), rgba(3, 11, 18, 0.34) 60%, rgba(3, 11, 18, 0) 84%),
    linear-gradient(180deg,
      rgba(3, 11, 18, 0.72) 0%, rgba(3, 11, 18, 0.30) 40%,
      rgba(3, 11, 18, 0.10) 64%, rgba(3, 11, 18, 0.48) 100%);
}

/* Snow canvas sits in front of the photo, behind the text. */
#snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.stage {
  position: relative;
  z-index: 2;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  /* Sits the text in the clear night sky above the village. */
  padding-bottom: 38vh;
}

.title {
  font-family: var(--heading-font);
  font-weight: 700;
  font-size: clamp(2.6rem, 10.5vw, 6.5rem);
  line-height: 1.05;
  margin: 0;
  color: var(--gold);
  text-shadow:
    0 2px 18px rgba(3, 11, 18, 0.95),
    0 0 26px rgba(232, 198, 106, 0.40),
    0 0 60px rgba(200, 53, 59, 0.22);
  animation: glow 6s ease-in-out infinite;
}

/* Thin red/gold rule under the heading. */
.title::after {
  content: "";
  display: block;
  width: min(220px, 55vw);
  height: 2px;
  margin: 1.4rem auto 0;
  background: linear-gradient(90deg, transparent, var(--red) 25%, var(--gold) 50%, var(--red) 75%, transparent);
  opacity: 0.9;
}

.subtitle {
  margin: 1.5rem 0 0;
  font-weight: 300;
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  letter-spacing: 0.02em;
  color: var(--muted);
  max-width: 34ch;
  text-shadow: 0 2px 14px rgba(3, 11, 18, 0.95);
}

@keyframes glow {
  0%, 100% {
    text-shadow: 0 2px 18px rgba(3, 11, 18, 0.95), 0 0 26px rgba(232, 198, 106, 0.34), 0 0 60px rgba(200, 53, 59, 0.18);
  }
  50% {
    text-shadow: 0 2px 18px rgba(3, 11, 18, 0.95), 0 0 34px rgba(232, 198, 106, 0.54), 0 0 74px rgba(200, 53, 59, 0.28);
  }
}

/* Respect users who ask for less motion: no pulse (snow.js also stops itself). */
@media (prefers-reduced-motion: reduce) {
  .title { animation: none; }
}

/* On a phone the photo crops hard, so pull focus toward the village and
   give the text a little more room. */
@media (max-width: 700px) {
  .scene img { object-position: 62% 56%; }
  .stage { padding-bottom: 30vh; }
}
