/* Motion kit: CSS. Transform and opacity only. Used with motion.js.
   Reveal states apply only while <html> has class "mo" (set by the head snippet or motion.js),
   so a page without JS, or a visitor who prefers reduced motion, sees the static page. */

/* Count-up digits keep their width while they change, so neighbours do not shift. Motion only, so the static page is unchanged. */
.mo [data-mo-count] { font-variant-numeric: tabular-nums; display: inline-block; }

/* Scroll reveal and hover lift share one transition list. --mo-d is the stagger delay. */
[data-mo-reveal],
[data-mo-lift] {
  transition: opacity .6s ease var(--mo-d, 0ms),
              transform .6s cubic-bezier(.2, .7, .2, 1) var(--mo-d, 0ms),
              translate .2s ease;
}

.mo [data-mo-reveal]:not(.mo-in) {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  [data-mo-lift]:hover { translate: 0 -3px; }
}

/* Hero drift: motion.js inserts .mo-drift into any [data-mo-drift] element. */
.mo [data-mo-drift] { position: relative; isolation: isolate; }

.mo-drift {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
}

.mo-drift i {
  position: absolute;
  display: block;
  width: 60%;
  aspect-ratio: 1;
  left: -12%;
  top: -30%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--mo-glow, rgba(249, 115, 22, .14)), transparent);
}

.mo-drift i + i {
  width: 50%;
  left: auto;
  top: auto;
  right: -14%;
  bottom: -30%;
  background: radial-gradient(closest-side, var(--mo-glow-2, rgba(13, 35, 64, .09)), transparent);
}

/* One gentle nudge, three times, on the main call to action (motion.js adds .mo-cue-on). */
@keyframes mo-nudge {
  0%, 100% { transform: translate3d(0, 0, 0); }
  40% { transform: translate3d(0, -4px, 0); }
  70% { transform: translate3d(0, 0, 0); }
}

@keyframes mo-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(18%, 12%, 0) scale(1.1); }
}

@media (prefers-reduced-motion: no-preference) {
  .mo-drift i { animation: mo-drift 24s ease-in-out infinite alternate; }
  .mo-drift i + i { animation-duration: 30s; animation-delay: -8s; }
  .mo-cue-on { animation: mo-nudge 1.4s ease-in-out 3; }
}

@media print {
  .mo [data-mo-reveal]:not(.mo-in) { opacity: 1 !important; transform: none !important; }
  .mo-drift { display: none; }
}

/* Play kit: small interactive art. Decor only: aria-hidden, no text, fixed proportions so nothing shifts.
   The static picture (no JS, or reduced motion) is the finished drawing. Motion rules sit behind .is-on,
   which play.js adds only when the visitor has not asked for reduced motion. */

:root { --play-ink: #17352c; --play-brass: #b8872f; --play-paper: #fffdf8; --play-soft: #d9d2c0; }

.play-band { display: grid; gap: 28px; align-items: center; }
@media (min-width: 760px) { .play-band { grid-template-columns: 1fr 1fr; } }
.play-band-3 { grid-template-columns: 1fr; }
@media (min-width: 900px) { .play-band-3 { grid-template-columns: 1fr 1fr; } }

.play { margin: 0; width: 100%; }
.play svg { display: block; width: 100%; height: auto; overflow: visible; }

/* Blueprint: 4 to 3, the plan draws itself as the section scrolls past. */
.play-blue { aspect-ratio: 4 / 3; }
.play-blue [data-draw] { fill: none; stroke: var(--play-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.play-blue .dim { stroke: var(--play-brass); stroke-width: 1.4; }

/* Window: a wall with a cover that lifts off the glass, and a frame that draws. */
.play-win { aspect-ratio: 4 / 3; }
.play-win [data-draw] { fill: none; stroke: var(--play-ink); stroke-width: 4; stroke-linecap: square; }
.play-win .cover { opacity: 0; }
.play-win .glass { fill: #cfe0e2; }

/* Ranking line: 2 to 1 proportions, the line climbs and the arrow lands last. */
.play-rank { aspect-ratio: 2 / 1; }
.play-rank [data-draw] { fill: none; stroke: var(--play-brass); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.play-rank .grid line { stroke: var(--play-soft); stroke-width: 1; }
.play-rank .tip { fill: var(--play-brass); opacity: 1; }

/* Tiles: nine squares. Hover (or a tap on the grid) turns them over; the backs join into one pattern. */
.play-tiles {
  position: relative; width: 100%; max-width: 300px; margin: 0 auto; aspect-ratio: 1; cursor: pointer;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; perspective: 900px;
}
.play-tile { position: relative; display: block; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.play-tile:nth-child(1) { --c: 0; --r: 0; transition-delay: 0ms; }
.play-tile:nth-child(2) { --c: 1; --r: 0; transition-delay: 55ms; }
.play-tile:nth-child(3) { --c: 2; --r: 0; transition-delay: 110ms; }
.play-tile:nth-child(4) { --c: 0; --r: 1; transition-delay: 55ms; }
.play-tile:nth-child(5) { --c: 1; --r: 1; transition-delay: 110ms; }
.play-tile:nth-child(6) { --c: 2; --r: 1; transition-delay: 165ms; }
.play-tile:nth-child(7) { --c: 0; --r: 2; transition-delay: 110ms; }
.play-tile:nth-child(8) { --c: 1; --r: 2; transition-delay: 165ms; }
.play-tile:nth-child(9) { --c: 2; --r: 2; transition-delay: 220ms; }
.play-tile .f, .play-tile .b { position: absolute; inset: 0; border-radius: 6px; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.play-tile .f { background: var(--play-paper); border: 1px solid var(--play-soft); }
.play-tile .b {
  transform: rotateY(180deg);
  background-color: var(--play-ink);
  /* One pattern drawn across all nine backs: each tile shows its own slice (see --c and --r). */
  background-image: repeating-linear-gradient(45deg, var(--play-ink) 0 14px, var(--play-brass) 14px 18px, var(--play-ink) 18px 30px);
  background-size: 300% 300%;
  background-position: calc(var(--c, 0) * 50%) calc(var(--r, 0) * 50%);
}
.play-tile { transform: rotateY(180deg); }
.play-tiles.is-on .play-tile { transform: none; }
.play-tiles.is-on.is-flipped .play-tile { transform: rotateY(180deg); }
@media (hover: hover) { .play-tiles.is-on:not(.is-flipped):hover .play-tile { transform: rotateY(180deg); } }

/* Level: a tube with a bubble. Off centre once it is on; a tap settles it. Still picture is centred. */
.play-level { position: relative; height: 56px; width: 100%; max-width: 360px; margin: 0 auto 24px; border-radius: 999px; background: var(--play-paper); border: 1px solid var(--play-soft); overflow: hidden; cursor: pointer; }
.play-level .tick { position: absolute; left: 50%; top: 10px; bottom: 10px; width: 2px; margin-left: -1px; background: var(--play-ink); opacity: .5; }
.play-level .bub { position: absolute; top: 12px; left: 50%; width: 32px; height: 32px; margin-left: -16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--play-brass) 70%); box-shadow: 0 1px 2px rgba(23, 53, 44, .25); }
.play-level.is-on .bub { left: 22%; transition: left .9s cubic-bezier(.2, .8, .2, 1); }
.play-level.is-on.is-settled .bub { left: 50%; }

@media (prefers-reduced-motion: no-preference) {
  .play.is-on [data-draw] { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p, 0)); }
  .play-win.is-on .cover { opacity: calc(1 - var(--p, 0)); }
  .play-rank.is-on .tip { opacity: var(--p, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .play-tile, .play-level .bub { transition: none; }
}

@media print { .play-tile { transform: rotateY(0) !important; } .play-tile .f { display: block; } .play-tile .b { display: none; } }
