/* Meet Luni (Lunille 1.3): the little moon from the notch, big, in a show of its day. The sky,
   the weather and the ground are this page's; Luni is the app's own moon, clip by clip
   (luni.js), drawn with its alpha so the sky can change colour behind it. Under the show, the
   loops of what it does: those clips are on black, screened over a dark tile. Scoped to .luni. */

.luni {
  position: relative;
  isolation: isolate;
  overflow: hidden; overflow: clip;
  padding: clamp(4.75rem, 6vw, 5.5rem) var(--sc-gutter) clamp(3.5rem, 6vw, 5.5rem);
  background: var(--sc-canvas);
  /* The words on the sky: light at night, dark by day (luni.js sets data-ink with the sky). */
  --luni-ink: var(--sc-ink); --luni-ink-soft: #B7BED2; --luni-ink-accent: var(--sc-accent);
}
.luni[data-ink="dark"] { --luni-ink: #14202C; --luni-ink-soft: #33485A; --luni-ink-accent: #5A3A12; }

/* The world: this page's own scenery around Luni (the app draws Luni; the page draws the sky).
   Two gradients that hand over to one another as the sky changes, the stars, and one canvas for
   what falls and flies. It ends under the ridge and fades in from the night above.
   Stacking, bottom up: the sky, the stars, the weather, Luni, the ground, everything else. */
.luni__world {
  position: absolute; left: 0; top: 0; width: 100%; height: var(--luni-world, 760px); z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(#0000 0, #000 4.5rem); mask-image: linear-gradient(#0000 0, #000 4.5rem);
}
.luni__skyfill { position: absolute; inset: 0; opacity: 0; transition: opacity 1100ms cubic-bezier(0.4, 0, 0.2, 1); will-change: opacity; }
.luni__skyfill.is-on { opacity: 1; }
.luni__sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: var(--luni-stars, 0.85); transition: opacity 1100ms ease; }
.luni__fx { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* The ground: a ridge across the whole act with a dip where Luni stands (luni.js draws it from
   where Luni is). It hides the moon before it rises, and the words under it sit on it. */
.luni__ground { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: visible; }
.luni__ground-rim { fill: none; stroke: url(#luniRim); stroke-width: 1.2; }
.luni__head, .luni__bill, .luni__acts, .luni__try, .luni__facts, .luni__does, .luni__credit { position: relative; z-index: 2; }

.luni__inner { max-width: 76rem; margin: 0 auto; display: grid; justify-items: center; }
.luni__head { display: grid; gap: 14px; justify-items: center; text-align: center; }
.luni__head .section-title { color: var(--luni-ink); transition: color 900ms ease; }
.luni__eyebrow { margin: 0; font-size: 14px; font-weight: 600; color: var(--luni-ink-accent); letter-spacing: 0.01em; transition: color 900ms ease; }
.luni__lede { max-width: 58ch; font-size: var(--sc-t-base); line-height: 1.55; color: var(--luni-ink-soft); transition: color 900ms ease; }

/* The stage: Luni, a button, on the sky. Its disc is --disc across; its clips are drawn on a
   canvas around it (luni.js), with their own alpha, so the sky shows through. */
.luni__stage { position: relative; width: 100%; height: clamp(340px, 28vw, 390px); --disc: 168px; --cy: 57%; }
.luni__figure {
  position: absolute; left: 50%; top: var(--cy); width: var(--disc); height: var(--disc);
  margin: calc(var(--disc) / -2) 0 0 calc(var(--disc) / -2);
  padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit;
  cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
.luni__figure:focus-visible { outline: 2px solid var(--luni-ink-accent); outline-offset: 12px; border-radius: 50%; }
.luni-screen, .luni-shot { position: absolute; display: block; max-width: none; pointer-events: none; }
.luni-shot { opacity: 0; transition: opacity 260ms ease; -webkit-user-drag: none; }
.luni-shot.is-on { opacity: 1; }

/* Under the ridge, on the ground: what the act is, the acts, and the things to try. */
.luni__bill { display: grid; gap: 6px; justify-items: center; text-align: center; min-height: 5.4rem; margin-top: 1.5rem; align-content: start; }
.luni__kicker { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--sc-accent); }
.luni__line { margin: 0; max-width: 34ch; font-family: var(--sc-font-display); font-weight: 500; font-size: var(--sc-t-xl); line-height: 1.15; letter-spacing: -0.015em; color: var(--sc-ink); text-wrap: balance; }
.luni__kicker, .luni__line { transition: opacity 260ms ease, transform 260ms var(--sc-ease-out, ease-out); }
.luni__bill.is-changing .luni__kicker, .luni__bill.is-changing .luni__line { opacity: 0; transform: translateY(6px); }

.luni__acts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: var(--sc-5); max-width: 100%; }
.luni__chip, .luni__play, .luni__try button {
  appearance: none; -webkit-appearance: none; font: inherit; font-size: 14px; font-weight: 500; line-height: 1; color: #C9CFE0;
  min-height: 36px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgb(255 255 255 / 0.06); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms var(--sc-ease-out, ease-out);
}
.luni__chip:hover, .luni__play:hover, .luni__try button:hover { background: rgb(255 255 255 / 0.11); color: var(--sc-ink); }
.luni__chip:active, .luni__play:active, .luni__try button:active { transform: scale(0.97); }
.luni__chip:focus-visible, .luni__play:focus-visible, .luni__try button:focus-visible { outline: 2px solid var(--sc-accent); outline-offset: 2px; }
.luni__chip[aria-pressed="true"] { background: var(--sc-accent); color: var(--sc-accent-ink); box-shadow: none; font-weight: 600; }
.luni__play { display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; padding: 0 14px 0 12px; color: var(--sc-ink); }
.luni__play i { font-size: 15px; color: var(--sc-accent); }

.luni__try { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: var(--sc-4); }
.luni__try-label { margin: 0 4px 0 0; font-size: 14px; color: var(--sc-ink-soft); }
.luni__try button { background: transparent; box-shadow: inset 0 0 0 1px rgb(255 211 161 / 0.38); color: var(--sc-accent); }
.luni__try button:hover { background: rgb(255 211 161 / 0.1); color: var(--sc-accent); }
.luni__hint { position: relative; z-index: 2; margin: var(--sc-4) 0 0; text-align: center; font-size: var(--sc-t-sm); color: rgb(183 190 210 / 0.86); max-width: 80ch; text-wrap: balance; }
.luni__credit { margin: 10px 0 0; text-align: center; font-size: 13px; color: rgb(163 171 194 / 0.72); max-width: 80ch; text-wrap: balance; }

.luni__facts {
  list-style: none; margin: clamp(2.5rem, 5vw, 4rem) 0 0; padding: 0; width: 100%;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sc-5) clamp(1.5rem, 3vw, 3rem);
}
.luni__facts li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; font-size: var(--sc-t-base); line-height: 1.5; color: #B7BED2; }
.luni__facts i { color: var(--sc-accent); font-size: 18px; line-height: 1.5; }
.luni__facts b { color: var(--sc-ink); font-weight: 600; }

/* What Luni does: small night windows, each with one loop. */
.luni__does { max-width: 76rem; margin: clamp(3rem, 6vw, 5rem) auto 0; }
.luni__does-title { margin: 0 0 var(--sc-5); font-family: var(--sc-font-display); font-weight: 500; font-size: var(--sc-t-xl); letter-spacing: -0.015em; }
.luni__tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.luni-tile {
  position: relative; display: grid; align-content: start; overflow: hidden;
  padding: 0 22px 22px; border-radius: 16px;
  background: #04050A;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.06), inset 0 1px 0 rgb(255 255 255 / 0.05);
}
/* The art shows a window of the clip's 320-point canvas, the disc's centre at (160, 160). */
.luni-tile__art {
  --art-view: 320; --art-top: 34;
  position: relative; overflow: hidden; justify-self: center;
  width: min(100% + 44px, 340px); margin: 0 -22px 6px;
  aspect-ratio: var(--art-view) / 228;
}
.luni-tile h4 { margin: 0 0 6px; font-size: 16px; font-weight: 600; line-height: 1.3; color: var(--sc-ink); }
.luni-tile p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--sc-ink-soft); }
.luni__note { margin: var(--sc-5) 0 0; font-size: var(--sc-t-sm); color: var(--sc-ink-soft); }
.luni__note b { color: var(--sc-ink); font-weight: 600; }

@media (max-width: 1000px) {
  .luni__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .luni__stage { height: 310px; --disc: 132px; }
  .luni__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .luni-tile { padding: 0 14px 16px; border-radius: 14px; }
  .luni-tile__art { --art-view: 230; --art-top: 40; width: calc(100% + 28px); margin: 0 -14px 4px; aspect-ratio: 230 / 212; }
  .luni-tile h4 { font-size: 14px; }
  .luni-tile p { font-size: 13px; }
}
@media (max-width: 560px) {
  .luni__stage { height: 280px; --disc: 118px; }
  .luni__facts { grid-template-columns: 1fr; gap: var(--sc-4); }
  .luni__bill { min-height: 8.2rem; }
  .luni__play { margin-left: 0; }
  .luni__try-label { flex-basis: 100%; text-align: center; margin: 0 0 2px; }
}
@media (max-width: 380px) {
  .luni__tiles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .luni__skyfill, .luni__sky, .luni__kicker, .luni__line, .luni__head .section-title, .luni__eyebrow, .luni__lede { transition: none; }
}
