/* Motion kit (hand builds): the starting states the kit animates from.
   Everything here sits under html.kit-on, which only the head snippet adds,
   and only when the visitor has not asked for reduced motion. kit-failed
   (the snippet's backstop) or no JavaScript at all leaves every element
   visible and still. */

.kit-on:not(.kit-failed) [data-kit="split-lines"],
.kit-on:not(.kit-failed) [data-kit="fade-up"] > *,
.kit-on:not(.kit-failed) [data-kit="fit-word"] {
  visibility: hidden;
}

/* Mask reveal: the frame clips, the image inside can scale without spilling. */
[data-kit="mask-reveal"] {
  overflow: hidden;
}
[data-kit="mask-reveal"] img,
[data-kit="mask-reveal"] video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Parallax: a layer that moves needs room to move inside its frame. */
[data-kit-parallax-frame] {
  overflow: hidden;
}
[data-kit-parallax-frame] > [data-kit="parallax"] {
  height: 120%;
  margin-top: -10%;
}

/* Pinned story: stacked steps by default (phones, reduced motion, no JS);
   the kit layers them only while it pins. */
[data-kit="pin-story"].kit-pinned {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
[data-kit="pin-story"].kit-pinned [data-kit-step] {
  position: absolute;
  inset: 0;
}

/* Camera and zoom-through. Without JS or with reduced motion: the images
   and captions simply stack. kit-on (before the kit starts) already frames
   the section as the first shot will, so nothing jumps when kit-cam takes
   over and sizes the images itself. */
[data-kit="camera"] > img,
[data-kit="zoom-through"] > img {
  display: block;
  width: 100%;
  height: auto;
}
.kit-cam,
.kit-on:not(.kit-failed) [data-kit="camera"],
.kit-on:not(.kit-failed) [data-kit="zoom-through"] {
  position: relative;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.kit-on:not(.kit-failed) [data-kit="camera"] > img,
.kit-on:not(.kit-failed) [data-kit="zoom-through"] > img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
}
.kit-on:not(.kit-failed) [data-kit-fit="contain"] > img {
  object-fit: contain;
}
.kit-on:not(.kit-failed) [data-kit="zoom-through"] > img + img,
.kit-on:not(.kit-failed) [data-kit-caption]:not([data-kit-at="1"]) {
  visibility: hidden;
}
.kit-cam > img {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  object-fit: fill;
}
.kit-cam > [data-kit-caption],
.kit-on:not(.kit-failed) [data-kit-caption] {
  position: absolute;
  z-index: 1;
  left: clamp(16px, 5vw, 64px);
  bottom: clamp(24px, 8vh, 80px);
  max-width: min(34rem, 100% - 32px);
}

/* Explore: an image with hotspots. Without explore.js the notes list is the
   content and the hotspots stay hidden. */
[data-kit="explore"] [data-kit-view] {
  position: relative;
  overflow: hidden;
}
[data-kit="explore"] [data-kit-view] img {
  display: block;
  width: 100%;
  height: auto;
}
[data-kit="explore"] [data-kit-spot] {
  display: none;
}
.kit-explore [data-kit-view] {
  cursor: zoom-out;
}
.kit-explore [data-kit-layer] {
  position: relative;
}
.kit-explore [data-kit-spot] {
  display: block;
  position: absolute;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: zoom-in;
}
/* The visible ring is smaller than the 44px tap target. */
.kit-explore [data-kit-spot]::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), 0 0 12px rgba(0, 0, 0, 0.35);
  background: rgba(255, 255, 255, 0.18);
}
.kit-explore [data-kit-spot][aria-expanded="true"]::before {
  background: #fff;
}
.kit-explore [data-kit-spot]:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
/* Its name: hidden but read out, shown beside the ring on hover or focus. */
.kit-explore [data-kit-spot] > span {
  position: absolute;
  left: 100%;
  top: 50%;
  translate: 4px -50%;
  white-space: nowrap;
  padding: 4px 8px;
  font-size: 0.8125rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  clip-path: inset(50%);
}
.kit-explore [data-kit-spot]:hover > span,
.kit-explore [data-kit-spot]:focus-visible > span {
  clip-path: none;
}
.kit-explore [data-kit-notes] {
  list-style: none;
  padding: 0;
}
.kit-explore [data-kit-notes] > * {
  display: none;
}
.kit-explore [data-kit-notes] > .is-active {
  display: block;
}

/* Hover float: the image that follows the cursor over a list. */
.kit-float {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: min(22vw, 280px);
  aspect-ratio: 4 / 5;
  pointer-events: none;
  overflow: hidden;
  border-radius: 2px;
  opacity: 0;
  visibility: hidden;
}
.kit-float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fit word: one line of type sized to fill its box (the giant footer word). */
[data-kit="fit-word"] {
  display: block;
  white-space: nowrap;
  line-height: 0.85;
}
