/* The day sky behind the page and the timeline rail that runs through the four scenes. */
.sky {
  position: fixed; top: 0; left: 0; z-index: 0;
  width: 100%; height: 100vh; height: 100lvh;
  overflow: hidden; pointer-events: none;
  background: var(--night);
}
.sky__layer { position: absolute; inset: 0; opacity: 0; will-change: opacity; }
.sky__layer--morning { opacity: 1; }
.sky__layer.is-covered { visibility: hidden; }
.sky__layer img { width: 100%; height: 100%; object-fit: cover; max-width: none; }
.sky__layer--morning img { object-position: 60% 50%; }

.stars { position: absolute; inset: 0; width: 100%; height: 100%; }
.shooting-star {
  position: absolute; left: 0; top: 0; width: 140px; height: 2px; opacity: 0;
  border-radius: 2px; transform-origin: 100% 50%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.25) 40%, #fff);
  box-shadow: 0 0 8px rgb(255 255 255 / 0.6);
}

/* overflow-x: clip keeps any glow or pre-reveal offset from widening the page on phones. */
.day { position: relative; z-index: 1; display: block; overflow-x: clip; }
.scene { position: relative; }

/* Without JavaScript the sky stays on the morning plate, so each later scene paints its own sky colour
   and stays readable. The day-cycle script adds .fx and the fixed plates take over. */
html:not(.fx) .scene--noon { background: linear-gradient(180deg, #7fb5f0, var(--sky)); }
html:not(.fx) .scene--evening { background: linear-gradient(180deg, #9d8be0, var(--lavender) 70%, #d9a6d8); }
html:not(.fx) .scene--night,
html:not(.fx) .pricing,
html:not(.fx) .support { background: var(--night); }

/* Timeline rail, at --rail-x inside the centred 1200 px column. JS sets its top and height to span the
   first marker to the last; without JS it runs from the first marker (--rail-top-static) down the day. */
.rail {
  position: absolute; z-index: 2; pointer-events: none;
  left: calc((100% - min(1200px, 100%)) / 2 + var(--rail-x));
  top: var(--rail-top, var(--rail-top-static));
  height: var(--rail-height, calc(100% - var(--rail-top-static)));
  width: 0;
}
.rail__track, .rail__fill {
  position: absolute; left: -1.5px; top: 0; width: 3px; height: 100%; border-radius: 3px;
}
.rail__track { background: rgb(61 187 176 / 0.28); }
.rail__fill {
  background: linear-gradient(180deg, #8de6dc, var(--mint));
  box-shadow: 0 0 10px rgb(61 187 176 / 0.9), 0 0 2px #fff;
  transform-origin: 50% 0;
  transform: scaleY(var(--fill, 1));
}
.rail__clock {
  position: absolute; left: 0; top: 0; display: none;
  padding: 4px 10px; white-space: nowrap; border-radius: 999px;
  font: 600 0.82rem/1.2 var(--font-clock); font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
  color: #fff; background: rgb(19 117 102 / 0.92);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.4) inset, 0 0 18px rgb(61 187 176 / 0.8);
  opacity: var(--clock-opacity, 1);
  transform: translate(-50%, calc(var(--fill-px, 0px) - 50%));
}
.fx .rail__clock { display: block; }
.rail__clock span { display: inline-block; }

.time-label {
  position: relative;
  padding-left: calc(var(--rail-x) + 58px);
  font-size: 1.55rem; font-weight: 500; letter-spacing: -0.005em;
}
.time-label time { font-variant-numeric: tabular-nums; }
.marker {
  position: absolute; left: var(--rail-x); top: 50%; z-index: 3;
  width: 26px; height: 50px; border-radius: 999px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: linear-gradient(180deg, #d9dee3 0%, #b9c3c8 49%, #fdfbf7 51%, #e6e2da 100%);
  box-shadow: inset -3px -3px 6px rgb(0 0 0 / 0.12), inset 3px 3px 5px rgb(255 255 255 / 0.8),
    0 4px 10px rgb(28 36 51 / 0.18);
  transition: opacity 0.4s;
}
.marker::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, #8de6dc 0%, var(--mint) 49%, transparent 51%);
  opacity: 0; transition: opacity 0.35s;
}
.marker::after {
  content: ""; position: absolute; inset: -18px; border-radius: 999px;
  background: radial-gradient(closest-side, rgb(61 187 176 / 0.75), transparent);
  opacity: 0;
}
html:not(.fx) .marker::before, .marker.is-lit::before { opacity: 1; }
.marker::after { pointer-events: none; }
.time-label::after {
  content: ""; position: absolute; top: 50%;
  left: calc(var(--rail-x) + 20px); width: 26px; height: 1.5px;
  background: rgb(61 187 176 / 0.7);
}
