/* Integration defaults. Set --tt-motion-ink to a contrasting brand color. */
[data-tt-intro] { position: relative; isolation: isolate; }
[data-tt-plane] {
  position: absolute;
  inset-block-start: var(--tt-plane-top, 20%);
  inset-inline-start: var(--tt-plane-left, 22%);
  inline-size: var(--tt-plane-width, 12%);
  block-size: var(--tt-plane-height, 56%);
  background: var(--tt-motion-ink, currentColor);
  opacity: 0;
  pointer-events: none;
}
[data-tt-plane]:nth-of-type(2) { --tt-plane-left: 44%; --tt-plane-top: 10%; --tt-plane-height: 64%; }
[data-tt-plane]:nth-of-type(3) { --tt-plane-left: 66%; --tt-plane-top: 27%; --tt-plane-height: 48%; }

[data-tt-strip] {
  --tt-card-width: min(72%, 48rem);
  --tt-strip-gap: clamp(12px, 2.5vw, 32px);
  display: flex;
  gap: var(--tt-strip-gap);
  inline-size: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  direction: ltr;
}
[data-tt-strip]::before, [data-tt-strip]::after {
  content: "";
  flex: 0 0 max(0px, calc((100% - var(--tt-card-width)) / 2 - var(--tt-strip-gap)));
}
[data-tt-card] {
  flex: 0 0 var(--tt-card-width);
  min-inline-size: 0;
  scroll-snap-align: center;
}
[data-tt-card] [data-tt-open] { display: block; overflow: hidden; }
[data-tt-thumb] {
  display: block;
  width: 100%;
  aspect-ratio: 1.42;
  object-fit: cover;
}
@media (max-width: 767px) {
  [data-tt-strip] { --tt-card-width: 86%; }
  [data-tt-thumb] { aspect-ratio: 1.06; }
}
@media (hover: hover) and (pointer: fine) {
  [data-tt-strip] { cursor: grab; }
  [data-tt-strip] [data-tt-open] { cursor: inherit; }
}
[data-tt-strip][data-tt-dragging] {
  scroll-snap-type: none;
  scroll-behavior: auto;
  cursor: grabbing;
  user-select: none;
}
[data-tt-strip] :focus-visible { outline-offset: -4px; }

dialog[data-tt-dialog] {
  max-inline-size: min(66rem, 94vw);
  max-block-size: 92dvh;
  overflow: auto;
  overscroll-behavior: contain;
  /* A transform or paint containment here would change the flight coordinates. */
}
dialog[data-tt-dialog]::backdrop { background: rgb(13 17 13 / .74); }
[data-tt-detail-photo] {
  display: block;
  inline-size: min(60rem, 86vw);
  aspect-ratio: 1.42;
  max-block-size: 62dvh;
  object-fit: cover;
}
.tt-motion-photo-in-flight { visibility: hidden; }
.tt-motion-flight {
  position: fixed;
  z-index: 2;
  max-width: none;
  max-height: none;
  margin: 0;
  object-fit: cover;
  transform-origin: top left;
  pointer-events: none;
}

[data-tt-photo-frame] { overflow: hidden; }
[data-tt-photo-frame] > img { display: block; width: 100%; height: 100%; object-fit: cover; }
[data-tt-story-stage] { position: relative; }
[data-tt-story-backdrop] { position: sticky; inset-block-start: var(--tt-story-top, 0px); }
[data-tt-story-foreground] { position: relative; z-index: 1; }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    html:not([data-motion-paused="true"]) [data-tt-depth] {
      animation: tt-story-depth linear both;
      animation-timeline: view();
      animation-range: entry 0% exit 100%;
    }
  }
}
@keyframes tt-story-depth {
  from { transform: translateY(5%) scale(1.14); }
  to { transform: translateY(-5%) scale(1.14); }
}
@media (prefers-reduced-motion: reduce) {
  [data-tt-story-backdrop] { position: static; }
  [data-tt-strip] { scroll-behavior: auto; }
}
html[data-motion-paused="true"] [data-tt-story-backdrop] { position: static; }
html[data-motion-paused="true"] [data-tt-strip] { scroll-behavior: auto; }

/* Keyboard-opened viewer: the Back button shows the site focus ring even when
   a programmatic focus does not match :focus-visible. */
[data-tt-close][data-tt-focus-ring]:focus { outline: 2px solid var(--accent); outline-offset: 4px; }
