/* The window and its content share one proportional coordinate system. */
:root {
  --font-display: "Outfit", sans-serif;
  --font-text: "Inter", sans-serif;
  --color-ink: #182733;
  font-family: var(--font-text);
  font-synthesis: none;
  font-optical-sizing: auto;
}

html {
  min-height: 100%;
  overflow: hidden;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
}

.shape-definitions {
  position: absolute;
  inline-size: 0;
  block-size: 0;
  overflow: hidden;
  pointer-events: none;
}

.site-window {
  position: relative;
  z-index: 1;
  inline-size: min(92vw, calc(90svh * 32 / 17));
  aspect-ratio: 32 / 17;
  container-type: inline-size;
  timeline-scope: --site-scroll;
  /* One em is one percent of the window width, including height-limited views. */
  font-size: min(.92vw, calc(.9svh * 32 / 17));
}

.window-shadow {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  overflow: visible;
  pointer-events: none;
}

.window-surface {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgb(255 255 255 / .24), rgb(239 247 255 / .13));
  -webkit-backdrop-filter: saturate(1.12);
  backdrop-filter: saturate(1.12);
  clip-path: url("#site-window-clip");
  transition: background 600ms ease;
}

html[data-glass="dark"] .window-surface {
  background: linear-gradient(135deg, rgb(20 32 47 / .64), rgb(12 22 36 / .48));
}

html[data-glass="dark"] .window-content {
  color: #edf4fa;
}

.logo-track {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.window-logo {
  --brand-animation: brand-logo-travel, brand-logo-size;
  --brand-offset-x: 4.2cqw;
  --brand-offset-y: 14cqw;
  --brand-dock-scale: .1115384615;
  position: absolute;
  inset-block-start: 1cqw;
  inset-inline-start: 1.8cqw;
  inline-size: 26cqw;
  block-size: 26cqw;
  display: block;
  filter: url("#site-logo-ink");
  z-index: 1;
  pointer-events: none;
}

.window-brand-icon {
  position: absolute;
  inset-block-start: 1cqw;
  inset-inline-start: 1.8cqw;
  inline-size: 2.9cqw;
  block-size: 2.9cqw;
  filter: url("#site-logo-ink");
  z-index: 1;
  pointer-events: none;
}

/* The wordmark shares the about heading's typography and docks into the symbol. */
.window-wordmark {
  --wordmark-fade-phase: clamp(0, calc((var(--brand-progress, 0) - .3) / .35), 1);
  --brand-animation: brand-logo-travel, brand-logo-size, brand-wordmark-fade;
  display: grid;
  place-items: center;
  font: 750 26cqw/.8 var(--font-display);
  letter-spacing: -.07em;
  color: var(--color-ink);
  filter: none;
  will-change: transform, translate, opacity;
  opacity: calc(1 - var(--wordmark-fade-phase) * var(--wordmark-fade-phase) * (3 - 2 * var(--wordmark-fade-phase)));
}

.window-wordmark > span {
  position: relative;
  translate: 0 -4cqw;
}

/* Split uses full-strength theme ink at rest and retracts outward from its gap.
   The exit reverses naturally when scrolling back to the top. */
.intro-rule {
  --rule-phase: clamp(0, calc(var(--brand-progress, 0) / .45), 1);
  --rule-exit: calc(var(--rule-phase) * var(--rule-phase) * (3 - 2 * var(--rule-phase)));
  position: absolute;
  inset-inline-start: 6.8cqw;
  inset-block-start: 10cqw;
  inline-size: 61cqw;
  block-size: 30.5cqw;
  overflow: visible;
  pointer-events: none;
  opacity: calc(1 - var(--rule-exit));
  filter: url("#site-logo-ink");
}

.intro-rule.intro-split {
  /* The join is centered on Split's actual gap, at x=307 in its 720-unit view. */
  mask-image: linear-gradient(#000, #000), linear-gradient(#000, #000);
  mask-position: left center, right center;
  mask-repeat: no-repeat;
  mask-size: calc(42.639% * (1 - var(--rule-exit))) 100%, calc(57.361% * (1 - var(--rule-exit))) 100%;
}

html.logo-scroll-native .intro-rule {
  animation: hero-split-exit 1s cubic-bezier(.4, 0, .2, 1) both;
  animation-timeline: --site-scroll;
  animation-range: 0cqw 20cqw;
}

@keyframes hero-split-exit {
  from {
    opacity: 1;
    mask-size: 42.639% 100%, 57.361% 100%;
  }
  to {
    opacity: 0;
    mask-size: 0% 100%, 0% 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-rule, html.logo-scroll-native .intro-rule {
    animation: none;
    opacity: 1;
  }
  .intro-rule.intro-split {
    mask: none;
  }
}

.logo-caption {
  --caption-ink: var(--color-ink);
  --letter-rest: 300;
  --letter-peak: 700;
  --brand-animation: brand-caption-dock, brand-caption-sway;
  --brand-offset-x: 29cqw;
  --brand-offset-y: 18.95cqw;
  --brand-dock-scale: .2333333333;
  position: absolute;
  inset-block-start: 1.55cqw;
  inset-inline-start: 6cqw;
  inline-size: max-content;
  margin: 0;
  font: 300 6cqw/1 var(--font-text);
  letter-spacing: -.055em;
  color: var(--color-ink);
  z-index: 1;
  pointer-events: none;
  will-change: transform, translate;
}

.logo-caption > span {
  display: block;
}

/* The baseline glyph reserves its slot; only its painted copy changes weight.
   Static markup avoids font measurement and DOM replacement during startup. */
.caption-glyph {
  position: relative;
  display: inline-block;
  color: transparent;
}

.caption-glyph::after {
  content: attr(data-letter);
  position: absolute;
  inset: 0;
  color: var(--caption-ink);
  animation: caption-weight-wave 2700ms ease-in-out calc(var(--letter) * 45ms) infinite;
}

.is-docking .caption-glyph {
  color: var(--caption-ink);
}

.is-docking .caption-glyph::after {
  animation-play-state: paused;
  visibility: hidden;
}

@keyframes caption-weight-wave {
  0%, 32%, 100% {
    font-weight: var(--letter-rest);
  }
  14% {
    font-weight: var(--letter-peak);
  }
}

@media (prefers-reduced-motion: reduce) {
  .caption-glyph::after {
    animation: none;
  }
}

.logo-caption strong {
  --letter-rest: 600;
  --letter-peak: 200;
  --brand-animation: brand-word-slide, brand-word-rise;
  --word-slide-phase: clamp(0, calc(var(--brand-progress, 0) / .75), 1);
  --word-rise-phase: clamp(0, calc((var(--brand-progress, 0) - .55) / .45), 1);
  /* Overlap the sideways and upward stages so the final turn never stops. */
  --word-slide: calc(var(--word-slide-phase) * var(--word-slide-phase) * (3 - 2 * var(--word-slide-phase)));
  --word-rise: calc(var(--word-rise-phase) * var(--word-rise-phase) * (3 - 2 * var(--word-rise-phase)));
  position: absolute;
  inset-block-start: 1em;
  inset-inline-start: 0;
  inline-size: 100%;
  font-weight: 600;
  will-change: transform, translate;
  translate: calc((100% + .4em) * var(--word-slide)) 0;
  transform: translateY(calc(-1em * var(--word-rise)));
}

.window-logo, .logo-caption {
  --dock-phase: clamp(0, var(--brand-progress, 0), 1);
  --dock-progress: calc(var(--dock-phase) * var(--dock-phase) * (3 - 2 * var(--dock-phase)));
  transform-origin: top left;
}

.window-logo {
  translate: calc(var(--brand-offset-x) * (1 - var(--dock-progress)))
  calc(var(--brand-offset-y) * (1 - var(--dock-progress)));
  transform: scale(calc(1 - (1 - var(--brand-dock-scale)) * var(--dock-progress)));
}

/* Separate sideways travel from the continuous rise and shrink. */
.logo-caption {
  translate: calc(var(--brand-offset-x) * (1 - var(--dock-progress))) 0;
  transform: translateY(calc(var(--brand-offset-y) * (1 - var(--dock-progress))))
  scale(calc(1 - (1 - var(--brand-dock-scale)) * var(--dock-progress)));
}

/* A shared scroll timeline docks both parts without changing document layout. */
html.logo-scroll-native :is(.window-logo, .logo-caption, .logo-caption strong) {
  animation-name: var(--brand-animation);
  animation-duration: 1s;
  animation-timing-function: cubic-bezier(.333333, 0, .666667, 1);
  animation-fill-mode: both;
  animation-timeline: --site-scroll, --site-scroll;
  animation-range: 0cqw 44cqw, 0cqw 44cqw;
}

@keyframes brand-logo-travel {
  from {
    translate: var(--brand-offset-x) var(--brand-offset-y);
  }
  to {
    translate: 0 0;
  }
}

/* One continuous shrink keeps the departing wordmark from bouncing. */
@keyframes brand-logo-size {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(var(--brand-dock-scale));
  }
}

@keyframes brand-wordmark-fade {
  from, 30% {
    opacity: 1;
  }
  65%, to {
    opacity: 0;
  }
}

@keyframes brand-word-slide {
  from {
    translate: 0 0;
  }
  75%, to {
    translate: calc(100% + .4em) 0;
  }
}

@keyframes brand-word-rise {
  from, 55% {
    transform: translateY(0);
  }
  to {
    transform: translateY(-1em);
  }
}

@keyframes brand-caption-dock {
  from {
    transform: translateY(var(--brand-offset-y)) scale(1);
  }
  to {
    transform: translateY(0) scale(var(--brand-dock-scale));
  }
}

@keyframes brand-caption-sway {
  from {
    translate: var(--brand-offset-x) 0;
  }
  to {
    translate: 0 0;
  }
}

.logo-ink {
  flood-color: var(--color-ink);
}

html[data-glass="dark"] .logo-ink {
  flood-color: #edf4fa;
}

html[data-glass="dark"] .logo-caption {
  --caption-ink: #edf4fa;
  color: #edf4fa;
}

html[data-glass="dark"] .window-wordmark {
  color: #edf4fa;
}

@media (prefers-reduced-motion: reduce) {
  .logo-track, html.logo-scroll-native .logo-track {
    animation: none;
    transform: none;
  }
  .window-logo, .logo-caption,
  html.logo-scroll-native :is(.window-logo, .logo-caption) {
    animation: none;
    translate: none;
    transform: translate(0, 0) scale(var(--brand-dock-scale));
  }
  .logo-caption strong, html.logo-scroll-native .logo-caption strong {
    animation: none;
    translate: calc(100% + .4em) 0;
    transform: translateY(-1em);
  }
  .window-wordmark, html.logo-scroll-native .window-wordmark {
    opacity: 0;
  }
}

.scroll-hint {
  position: absolute;
  inset-inline-start: 50%;
  inset-block-end: 1.45cqw;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  inline-size: 2.3cqw;
  block-size: 3.2cqw;
  padding: 0;
  border: .09cqw solid currentColor;
  border-radius: 100vmax;
  background: transparent;
  color: var(--color-ink);
  opacity: .65;
  cursor: pointer;
  z-index: 2;
  transition: opacity 150ms ease;
}

.scroll-hint:hover {
  opacity: 1;
}

.scroll-hint.is-relocating {
  opacity: 0;
  pointer-events: none;
}

.scroll-hint:focus-visible {
  outline: .1cqw solid currentColor;
  outline-offset: .3cqw;
}

.scroll-hint svg {
  inline-size: 1.15cqw;
  block-size: 1.55cqw;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: scroll-nudge 1s ease-in-out infinite;
  transition: rotate 500ms cubic-bezier(.16,1,.3,1);
}

.scroll-hint.is-return {
  inset-block-start: 4.8cqw;
  inset-block-end: auto;
}

.scroll-hint.is-return svg {
  rotate: 180deg;
}

@keyframes scroll-nudge {
  0%, 100% {
    transform: translateY(-.15cqw);
  }
  50% {
    transform: translateY(.15cqw);
  }
}

html[data-glass="dark"] .scroll-hint {
  color: #edf4fa;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint, .scroll-hint svg {
    animation: none;
    transition: none;
  }
}

.window-menu {
  --menu-gap: 2.5cqw;
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: .55cqw;
  block-size: 3.564cqw;
  display: flex;
  align-items: center;
  gap: var(--menu-gap);
  font-family: var(--font-text);
  font-size: 1.25cqw;
  font-weight: 250;
  line-height: 1.2;
  letter-spacing: -.015em;
  color: var(--color-ink);
  z-index: 1;
}

.window-menu a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .55em;
  min-block-size: 100%;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
}

/* Two half-contours draw from opposite points and retract on exit. */
.menu-outline {
  position: absolute;
  inset-inline-start: -1.5cqw;
  inset-block-start: 50%;
  inline-size: calc(100% + 3cqw);
  block-size: 2.1cqw;
  transform: translateY(-50%);
  overflow: visible;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity .08s linear .44s;
}

.menu-outline rect {
  x: .06cqw;
  y: .06cqw;
  width: calc(100% - .12cqw);
  height: calc(100% - .12cqw);
  rx: .99cqw;
  ry: .99cqw;
  fill: none;
  stroke: currentColor;
  stroke-width: .065cqw;
  stroke-linecap: round;
  stroke-dasharray: 0 100;
  transition: stroke-dasharray .48s cubic-bezier(.22,.61,.36,1);
}

.menu-outline rect + rect {
  stroke-dashoffset: 50;
}

.window-menu a:is(:hover, :focus-visible) .menu-outline {
  opacity: 1;
  transition: opacity .08s linear;
}

.window-menu a:is(:hover, :focus-visible) .menu-outline rect {
  stroke-dasharray: 50 50;
}

/* Dark backgrounds require light chrome as well as light content ink. */
html[data-glass="dark"] .window-menu {
  color: #edf4fa;
}

.menu-label {
  position: relative;
  z-index: 1;
}

.window-menu a:focus-visible {
  outline: none;
}

.window-menu .menu-playground {
  gap: 0;
  font-weight: 800;
}

.menu-arrow {
  inline-size: .85em;
  block-size: .85em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The arrow invites interaction without shifting the label or menu layout. */
.menu-playground .menu-arrow {
  transform: translate(0, 0);
  animation: playground-arrow-nudge .9s ease-in-out 1.2s infinite;
  transition: transform 300ms cubic-bezier(.22,.61,.36,1);
}

.menu-playground:is(:hover, :focus-visible) .menu-arrow {
  animation: none;
  transform: translate(0, 0);
}

@keyframes playground-arrow-nudge {
  0%, 80%, 100% {
    transform: translate(0, 0);
  }
  34% {
    transform: translate(2.5px, -2.5px);
  }
}

.menu-tooltip {
  position: absolute;
  inset-block-start: calc(50% + 2.3cqw);
  inset-inline-start: 50%;
  inline-size: max-content;
  padding: .9cqw 1.2cqw;
  border: .05cqw solid var(--color-ink);
  border-radius: 1.1cqw;
  background: var(--color-ink);
  color: #fff;
  font-family: var(--font-text);
  font-size: .9cqw;
  font-weight: 400;
  line-height: 1.6;
  text-align: center;
  text-transform: none;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%);
  contain: layout style;
  will-change: opacity;
  transition: opacity .2s ease, visibility 0s .2s;
}

html[data-glass="dark"] .menu-tooltip {
  border-color: #edf4fa;
  background: #edf4fa;
  color: var(--color-ink);
}

.menu-playground .menu-tooltip {
  inset-inline-start: auto;
  inset-inline-end: 0;
  transform: none;
}

.window-menu a:is(:hover, :focus-visible) .menu-tooltip {
  opacity: 1;
  visibility: visible;
  transition-delay: 1s, 1s;
}

@media (prefers-reduced-motion: reduce) {
  .menu-playground .menu-arrow,
  .menu-playground:is(:hover, :focus-visible) .menu-arrow {
    animation: none;
    transform: none;
    transition: none;
  }
  .window-menu a .menu-outline,
  .menu-outline rect,
  .menu-tooltip {
    transition: none;
  }
}

/* The invisible inner viewport clips all scrolling content, including type. */
.window-viewport {
  position: absolute;
  inset: 4.314cqw .75cqw .75cqw;
  overflow: hidden;
  border-radius: 1cqw;
}

.window-content {
  --page-height: calc(100cqw * 17 / 32 - 3.564cqw);
  /* Keep the first glyph inside the scroll surface; the outer viewport crops it. */
  position: absolute;
  inset-block-start: -1.5cqw;
  box-sizing: border-box;
  inline-size: 100%;
  block-size: calc(100% + 1.5cqw);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: calc(44cqw + var(--page-height)) repeat(4, var(--page-height));
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-timeline: --site-scroll block;
  overscroll-behavior: contain;
  -ms-overflow-style: none;
  scrollbar-width: none;
  font-size: 1.25cqw;
  line-height: 1.5;
  font-weight: 300;
  color: var(--color-ink);
}

.window-content::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.intro-type {
  /* The word rail spans the pages without determining their height. */
  position: relative;
  grid-area: 1 / 1 / -1 / 2;
  display: flex;
  justify-content: flex-end;
  box-sizing: border-box;
  padding-block-start: 1cqw;
  min-block-size: 0;
  block-size: 100%;
  overflow: hidden;
  transition: opacity 600ms ease;
}

.intro-stop {
  grid-area: 1 / 1;
  align-self: start;
  block-size: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.vertical-word {
  position: relative;
  right: -4cqw;
  margin: 0;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-display);
  font-size: 13.5cqw;
  font-weight: 900;
  line-height: .85;
  letter-spacing: -.07em;
  white-space: nowrap;
}

.about-panel {
  /* Share the intro's scroll space, keeping the large words clear on the right. */
  box-sizing: border-box;
  grid-area: 1 / 1;
  align-self: start;
  inline-size: 84cqw;
  display: grid;
  grid-template-columns: 29cqw minmax(0, 1fr);
  column-gap: 2.5cqw;
  align-content: start;
  min-block-size: var(--page-height);
  margin-block-start: 44cqw;
  padding: 6cqw 0 5cqw 4.5cqw;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.about-panel h2 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: start;
  margin: 0;
  font: 250 9.5cqw/1 var(--font-display);
  letter-spacing: -.055em;
  white-space: nowrap;
}

.about-panel h2 span {
  display: block;
  inline-size: max-content;
  margin: 0;
}

.about-panel h2 strong {
  display: block;
  inline-size: max-content;
  margin-block-start: -7.3cqw;
  font-size: 28cqw;
  font-weight: 750;
  line-height: .8;
  letter-spacing: -.07em;
}

.about-panel h2 .about-question {
  align-self: center;
  margin-block-start: .4cqw;
  font-size: 18cqw;
  font-weight: 750;
  line-height: .75;
  letter-spacing: 0;
}

.about-copy {
  position: relative;
  align-self: start;
  min-inline-size: 0;
  margin-block-start: 4cqw;
  font: 200 1.45cqw/1.55 var(--font-text);
  letter-spacing: -.025em;
  text-wrap: pretty;
}

.about-copy::before,
.about-copy::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inline-size: calc(100% + 3cqw);
  block-size: .065cqw;
  background: linear-gradient(to right,
  currentColor 0 13%, transparent 13% 14.1%,
  currentColor 14.1% 72%, transparent 72% 73.1%, currentColor 73.1%);
  opacity: .35;
  pointer-events: none;
}

.about-copy::before {
  inset-block-start: -2.3cqw;
}

.about-copy::after {
  inset-block-end: -2.3cqw;
  transform: scaleX(-1);
}

.about-copy p {
  margin: 0;
  inline-size: calc(100% + 3cqw);
}

.about-copy p + p {
  margin-block-start: 3cqw;
}

.about-copy strong {
  font-weight: 600;
}

/* Timed stagger remains visible after a quick scroll or native page snap. */
.about-panel h2 {
  --entry-y: 16cqw;
  --entry-duration: 1200ms;
  --entry-delay: 550ms;
}

.about-copy p:first-child {
  --entry-y: -2.5cqw;
  --entry-delay: 200ms;
}

.about-copy p + p {
  --entry-y: 4cqw;
  --entry-delay: 370ms;
}

.about-copy::before {
  --entry-x: -4cqw;
  --entry-delay: 650ms;
}

.about-copy::after {
  --entry-x: 4cqw;
  --entry-delay: 850ms;
}

html.section-motion .about-panel :is(h2, .about-copy p),
html.section-motion .about-copy::before,
html.section-motion .about-copy::after {
  transition-duration: 420ms;
  transition-timing-function: cubic-bezier(.22, .61, .36, 1);
  transition-delay: 0ms;
}

html.section-motion .about-panel :is(h2, .about-copy p) {
  opacity: 0;
  translate: var(--entry-x, 0cqw) var(--entry-y, 1.5cqw);
  transition-property: opacity, translate;
}

html.section-motion .about-copy::before,
html.section-motion .about-copy::after {
  translate: var(--entry-x) 0;
  clip-path: inset(0 100% 0 0);
  transition-property: clip-path, translate;
}

html.section-motion .about-panel.is-visible :is(h2, .about-copy p),
html.section-motion .is-visible .about-copy::before,
html.section-motion .is-visible .about-copy::after {
  transition-duration: var(--entry-duration, 1100ms);
  transition-delay: var(--entry-delay);
}

html.section-motion .about-panel.is-visible :is(h2, .about-copy p) {
  opacity: 1;
  translate: 0 0;
}

html.section-motion .is-visible .about-copy::before,
html.section-motion .is-visible .about-copy::after {
  translate: 0 0;
  clip-path: inset(0);
}

/* The invitation and film share a page, clear of the vertical word rail. */
.film-panel {
  box-sizing: border-box;
  grid-area: 2 / 1;
  block-size: var(--page-height);
  display: grid;
  grid-template-columns: 14cqw 68cqw;
  column-gap: .5cqw;
  align-items: center;
  padding-inline-start: 3cqw;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.film-heading {
  margin: 0;
  font: 250 4.3cqw/.98 var(--font-text);
  letter-spacing: -.055em;
  transition: opacity 600ms ease;
}

.film-heading > .film-heading-line {
  margin-block-end: .65cqw;
}

.film-heading strong {
  display: block;
  font-size: .9em;
  font-weight: 650;
}

.film-heading-line {
  display: block;
  overflow: hidden;
  padding-block: .1em;
  margin-block: -.1em;
}

.film-heading-line > span {
  display: block;
}

.film-panel.is-enhanced .film-heading-line > span {
  opacity: .15;
  transform: translateY(120%);
  transition: transform 1100ms cubic-bezier(.22, .61, .36, 1), opacity 700ms ease;
  transition-delay: 250ms;
}

.film-panel.is-enhanced strong .film-heading-line:first-child > span {
  transition-delay: 430ms;
}

.film-panel.is-enhanced strong .film-heading-line:last-child > span {
  transition-delay: 610ms;
}

.film-panel.is-heading-visible .film-heading-line > span {
  opacity: 1;
  transform: translateY(0);
}

.film-player {
  box-sizing: border-box;
  position: relative;
  inline-size: 68cqw;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: 1.5cqw;
  color: #fff;
}

.film-panel.is-enhanced .film-player {
  opacity: 0;
  translate: 0 3cqw;
  scale: .96;
  transition: opacity 850ms ease, translate 1000ms cubic-bezier(.22, .61, .36, 1), scale 1000ms ease;
}

.film-panel.is-visible .film-player {
  opacity: 1;
  translate: 0 0;
  scale: 1;
}

.film-video {
  /* Trim the source's thin edge pixels beneath the rounded clip. */
  position: absolute;
  inset: -.2cqw;
  inline-size: calc(100% + .4cqw);
  block-size: calc(100% + .4cqw);
  object-fit: cover;
  filter: blur(.35cqw) saturate(.7);
  scale: 1.03;
  transition: filter 600ms ease, scale 600ms ease;
}

.film-player:is([data-state="playing"], [data-state="loading"]) .film-video {
  filter: none;
  scale: 1;
}

.film-player::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgb(5 10 17 / .78), rgb(5 10 17 / .66));
  pointer-events: none;
  transition: opacity 600ms ease;
}

.film-player[data-state="playing"]::after,
.film-player[data-state="loading"]::after {
  opacity: 0;
}

.film-toggle, .film-sound, .film-status {
  z-index: 1;
}

/* Dim the surroundings without placing a second frame around the film. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgb(3 8 14 / .78);
  opacity: 0;
  pointer-events: none;
  transition: opacity 600ms ease;
}

html.film-focused body::before {
  opacity: 1;
}

html.film-focused .film-player {
  z-index: 3;
}

html.film-focused .intro-type,
html.film-focused .film-panel .film-heading {
  opacity: .08;
}

html.film-focused :is(.logo-track, .logo-caption, .window-menu, .scroll-hint) {
  opacity: .18;
}

html.film-focused .window-surface {
  background: rgb(8 16 25 / .85);
}

.film-player button {
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.film-toggle {
  position: absolute;
  inset: 0;
  margin: auto;
  display: grid;
  place-items: center;
  inline-size: 5cqw;
  block-size: 5cqw;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / .15);
  transition: background 250ms ease, opacity 250ms ease, scale 250ms ease;
}

.film-toggle:hover {
  background: rgb(255 255 255 / .24);
  scale: 1.06;
}

.film-toggle:disabled {
  cursor: wait;
  scale: 1;
}

.film-player[data-progressing="true"] .film-play-icon {
  display: none;
}

.film-toggle:focus-visible, .film-sound:focus-visible {
  outline: .1cqw solid #fff;
  outline-offset: .35cqw;
}

.film-toggle > svg:not(.film-loader) {
  inline-size: 1.65cqw;
  block-size: 1.65cqw;
}

.film-play-icon {
  fill: currentColor;
  translate: .08cqw 0;
}

.film-close-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.film-player:not([data-state="playing"]):not([data-state="loading"]) .film-close-icon,
.film-player[data-state="loading"] .film-play-icon,
.film-player[data-state="playing"] .film-play-icon {
  display: none;
}

.film-player[data-state="playing"] .film-toggle {
  opacity: 0;
}

.film-player[data-state="playing"]:hover .film-toggle,
.film-player[data-state="playing"] .film-toggle:focus-visible {
  opacity: 1;
}

.film-loader {
  position: absolute;
  inset: -1cqw;
  inline-size: calc(100% + 2cqw);
  block-size: calc(100% + 2cqw);
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: round;
  rotate: -90deg;
  pointer-events: none;
}

.film-loader-track {
  opacity: .45;
}

.film-loader-progress {
  display: none;
  stroke: #c5e6ff;
  stroke-dasharray: 182.212;
  stroke-dashoffset: calc(182.212 * (1 - var(--film-progress, 0)));
  transition: stroke-dashoffset 100ms linear;
}

.film-player[data-progressing="true"] .film-loader-track {
  opacity: .2;
}

.film-player[data-progressing="true"] .film-loader-progress {
  display: initial;
}

.film-sound {
  position: absolute;
  inset-inline-end: 1cqw;
  inset-block-end: 1cqw;
  display: grid;
  place-items: center;
  inline-size: 2.6cqw;
  block-size: 2.6cqw;
  border: .06cqw solid rgb(255 255 255 / .35);
  border-radius: 50%;
  background: rgb(8 15 27 / .4);
  padding: .55cqw;
}

.film-sound[hidden] {
  display: none;
}

.film-sound svg {
  inline-size: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linejoin: round;
}

.film-mute-mark {
  display: none;
}

.film-sound[aria-pressed="true"] .film-mute-mark {
  display: initial;
}

.film-status {
  position: absolute;
  inset-inline: 1cqw;
  inset-block-end: 1.1cqw;
  text-align: center;
  font: 400 .85cqw/1.4 var(--font-text);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .film-panel.is-enhanced :is(.film-player, .film-heading) {
    opacity: 1;
    translate: none;
    scale: none;
    transition: none;
  }
  .film-panel.is-enhanced .film-heading-line > span {
    opacity: 1;
    transform: none;
    transition: none;
  }
  body::before, .film-player::after, .film-video {
    transition: none;
  }
  .film-toggle {
    transition: none;
  }
}

/* The large editor preview leaves the right-hand word rail unobstructed. */
.playground-panel {
  box-sizing: border-box;
  grid-area: 3 / 1;
  block-size: var(--page-height);
  display: grid;
  grid-template-columns: 24cqw 56cqw;
  column-gap: 3.5cqw;
  align-items: center;
  padding-inline-start: 3cqw;
  padding-block-end: 4cqw;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.playground-copy {
  min-inline-size: 0;
}

.playground-copy h2 {
  display: grid;
  row-gap: .08em;
  margin: 0;
  font: 300 6.2cqw/.88 var(--font-text);
  letter-spacing: -.06em;
}

.playground-copy h2 > span, .playground-copy h2 > strong {
  display: block;
}

.playground-copy h2 > span {
  margin-block-end: .14em;
}

.playground-copy h2 strong {
  font-weight: 650;
}

.playground-title-line {
  clip-path: inset(-.16em -.08em);
}

.playground-title-word {
  display: block;
}

/* The lowercase last line has no ascenders: close its optical gap slightly. */
.playground-copy h2 strong:last-child {
  margin-block-start: -.06em;
}

.playground-description {
  margin: 4.6cqw 0 0;
  font: 350 1.1cqw/1.55 var(--font-text);
  letter-spacing: -.025em;
}

.playground-entry {
  --entry-circle: #edf4f7;
  --entry-circle-hover: #fff;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.6cqw;
  position: relative;
  inset-block-start: 7cqw;
  inline-size: 24cqw;
  min-block-size: 4.8cqw;
  margin-block-start: 2.2cqw;
  padding: .5cqw .5cqw .5cqw 2.1cqw;
  border: .06cqw solid rgb(255 255 255 / .24);
  border-radius: 100vmax;
  background: var(--color-ink);
  box-shadow: 0 .5cqw 1.2cqw rgb(14 31 43 / .14), inset 0 .08cqw 0 rgb(255 255 255 / .12);
  color: #fff;
  font: 300 1.3cqw/1.2 var(--font-text);
  text-decoration: none;
}

.playground-entry > span {
  white-space: nowrap;
}

.playground-entry strong {
  font-weight: 750;
}

.playground-outline {
  position: absolute;
  inset: -.45cqw;
  inline-size: calc(100% + .9cqw);
  block-size: calc(100% + .9cqw);
  overflow: visible;
  color: var(--color-ink);
  pointer-events: none;
  opacity: 0;
  transition: opacity .08s linear .44s;
}

/* Match the menu's opposing half-strokes, outside the primary capsule. */
.playground-outline rect {
  x: .06cqw;
  y: .06cqw;
  width: calc(100% - .12cqw);
  height: calc(100% - .12cqw);
  rx: 3cqw;
  ry: 3cqw;
  fill: none;
  stroke: currentColor;
  stroke-width: .065cqw;
  stroke-linecap: round;
  stroke-dasharray: 0 100;
  transition: stroke-dasharray .48s cubic-bezier(.22, .61, .36, 1);
}

.playground-outline rect + rect {
  stroke-dashoffset: 50;
}

html[data-glass="dark"] .playground-outline {
  color: #edf4fa;
}

/* Reverse the capsule and its circular arrow together on the dark surface. */
html[data-glass="dark"] .playground-entry {
  --entry-circle: var(--color-ink);
  --entry-circle-hover: var(--color-ink);
  background: #fff;
  color: var(--color-ink);
  border-color: rgb(24 39 51 / .16);
}

html[data-glass="dark"] .playground-entry .playground-arrow {
  color: #fff;
}

.playground-entry .playground-arrow {
  box-sizing: border-box;
  flex: 0 0 auto;
  inline-size: 3.65cqw;
  block-size: 3.65cqw;
  padding: 1.05cqw;
  border-radius: 50%;
  background: var(--entry-circle);
  color: var(--color-ink);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  rotate: 45deg;
  transition: rotate 400ms cubic-bezier(.22, .61, .36, 1), background 300ms ease;
}

.playground-entry:is(:hover, :focus-visible) .playground-outline {
  opacity: 1;
  transition: opacity .08s linear;
}

.playground-entry:is(:hover, :focus-visible) .playground-outline rect {
  stroke-dasharray: 50 50;
}

.playground-entry:is(:hover, :focus-visible) .playground-arrow {
  rotate: 0deg;
  background: var(--entry-circle-hover);
}

.playground-shot {
  display: block;
  min-inline-size: 0;
}

.playground-shot img {
  display: block;
  inline-size: 100%;
  block-size: auto;
  border-radius: .7cqw;
  box-shadow: 1.1cqw 1.5cqw 2.7cqw rgb(24 39 51 / .25);
  transform: perspective(100cqw) rotateY(-5deg) rotateX(2deg);
  transition: transform 700ms cubic-bezier(.22, .61, .36, 1);
}

.playground-shot:is(:hover, :focus-visible) img {
  transform: perspective(100cqw) rotateY(0) rotateX(0);
}

.playground-panel a:focus-visible {
  outline: .12cqw solid currentColor;
  outline-offset: .4cqw;
}

.playground-panel .playground-entry:focus-visible {
  outline: none;
}

html.section-motion .playground-panel :is(.playground-description, .playground-entry, .playground-shot) {
  opacity: 0;
  transform: translateY(3cqw);
  transition: opacity 1000ms ease, transform 1100ms cubic-bezier(.22, .61, .36, 1);
  transition-delay: var(--entry-delay, 250ms);
}

.playground-description {
  --entry-delay: 400ms;
}

.playground-entry {
  --entry-delay: 550ms;
}

.playground-shot {
  --entry-delay: 350ms;
}

html.section-motion .playground-panel.is-visible :is(.playground-description, .playground-entry, .playground-shot) {
  opacity: 1;
  transform: translateY(0);
}

html.section-motion .playground-title-word {
  opacity: 0;
  translate: 0 115%;
  transition: translate 750ms cubic-bezier(.16,1,.3,1), opacity 450ms ease;
}

html.section-motion .playground-title-line:nth-child(2) .playground-title-word {
  transition-delay: 140ms;
}

html.section-motion .playground-title-line:nth-child(3) .playground-title-word {
  transition-delay: 280ms;
}

html.section-motion .playground-panel.is-visible .playground-title-word {
  opacity: 1;
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .playground-entry, .playground-outline, .playground-outline rect, .playground-arrow, .playground-shot img, .playground-title-word {
    transition: none;
  }
  .playground-entry:is(:hover, :focus-visible) .playground-arrow {
    rotate: 45deg;
  }
  .playground-shot:is(:hover, :focus-visible) img {
    transform: perspective(100cqw) rotateY(-5deg) rotateX(2deg);
  }
}

/* Resources form a final reading section, with the shared word rail beside it. */
.resources-panel {
  box-sizing: border-box;
  grid-area: 5 / 1;
  position: relative;
  inline-size: 84cqw;
  block-size: var(--page-height);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4cqw 1cqw 4cqw 4.5cqw;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.resources-panel h2 {
  flex-shrink: 0;
  margin: 0 0 2.3cqw;
  font: 300 4.6cqw/1.1 var(--font-text);
  letter-spacing: -.04em;
  clip-path: inset(-.15em -.1em);
}

.resources-panel h2 > * {
  display: inline-block;
}

.resources-panel h2 strong {
  font-weight: 650;
}

.resources-links {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 4cqw;
  row-gap: 1.9cqw;
}

.resources-links a {
  position: relative;
  display: block;
  padding-block-start: 1.05cqw;
  color: inherit;
  text-decoration: none;
}

/* The quiet rule draws on entry; a second stroke follows hover independently. */
.resources-links a::before, .resources-links a::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  block-size: 1px;
  background: currentColor;
  transform-origin: left;
}

.resources-links a::before {
  opacity: .3;
}

.resources-links a::after {
  block-size: max(2px, .2cqw);
  scale: 0 1;
  transition: scale 550ms cubic-bezier(.16,1,.3,1);
}

.resources-links h3 {
  display: flex;
  align-items: center;
  gap: 1cqw;
  margin: 0 0 .55cqw;
  font: 500 1.9cqw/1.2 var(--font-text);
  letter-spacing: -.025em;
  transition: translate 600ms cubic-bezier(.4,0,.2,1);
}

.resource-arrow {
  display: grid;
  flex-shrink: 0;
  margin-inline-start: auto;
  inline-size: 1.15em;
  block-size: 1.15em;
  overflow: hidden;
  font-size: 1.9cqw;
  font-weight: 300;
  line-height: 1;
}

.resource-arrow > span {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  transition: translate 600ms cubic-bezier(.4,0,.2,1);
}

.resource-arrow > span + span {
  translate: -115% 115%;
}

.resources-links p {
  margin: 0;
  max-inline-size: 34cqw;
  font: 350 1.25cqw/1.5 var(--font-text);
  opacity: .76;
  transition: translate 600ms cubic-bezier(.4,0,.2,1), opacity 450ms ease;
}

.resource-format {
  font: 450 .85cqw/1 var(--font-text);
  letter-spacing: .04em;
  opacity: .65;
}

.resources-links a:is(:hover, :focus-visible)::after {
  scale: 1 1;
}

.resources-links a:is(:hover, :focus-visible) h3 {
  translate: .3cqw 0;
}

.resources-links a:is(:hover, :focus-visible) p {
  translate: .3cqw 0;
  opacity: 1;
}

.resources-links a:is(:hover, :focus-visible) .resource-arrow > span:first-child {
  translate: 115% -115%;
}

.resources-links a:is(:hover, :focus-visible) .resource-arrow > span + span {
  translate: 0 0;
}

.resources-links a:focus-visible {
  outline: .15cqw solid currentColor;
  outline-offset: .5cqw;
  border-radius: .2cqw;
}

html.section-motion .resources-panel h2 > * {
  opacity: 0;
  translate: 0 115%;
  transition: opacity 450ms ease, translate 750ms cubic-bezier(.16,1,.3,1);
}

html.section-motion .resources-panel h2 strong {
  transition-delay: 110ms;
}

html.section-motion .resources-links a {
  opacity: 0;
  translate: 0 .8cqw;
  transition: opacity 600ms ease var(--resource-delay), translate 750ms cubic-bezier(.16,1,.3,1) var(--resource-delay);
}

html.section-motion .resources-links a::before {
  scale: 0 1;
  transition: scale 800ms cubic-bezier(.16,1,.3,1) var(--resource-delay);
}

html.section-motion .resources-panel.is-visible h2 > *,
html.section-motion .resources-panel.is-visible .resources-links a {
  opacity: 1;
  translate: 0 0;
}

html.section-motion .resources-panel.is-visible .resources-links a::before {
  scale: 1 1;
}

.resources-links a:nth-child(1) {
  --resource-delay: 160ms;
}

.resources-links a:nth-child(2) {
  --resource-delay: 220ms;
}

.resources-links a:nth-child(3) {
  --resource-delay: 280ms;
}

.resources-links a:nth-child(4) {
  --resource-delay: 340ms;
}

.resources-links a:nth-child(5) {
  --resource-delay: 400ms;
}

.resources-links a:nth-child(6) {
  --resource-delay: 460ms;
}

@media (prefers-reduced-motion: reduce) {
  html.section-motion .resources-panel h2 > *, html.section-motion .resources-links a {
    opacity: 1;
    translate: none;
    transition: none;
  }
  html.section-motion .resources-links a::before {
    scale: 1 1;
    transition: none;
  }
  .resources-links :is(h3, p), .resource-arrow > span, .resources-links a::after {
    transition: none;
  }
}

/* Cascade keeps seven content-only scenes around one featured application. */
.gallery-panel {
  box-sizing: border-box;
  grid-area: 4 / 1;
  block-size: var(--page-height);
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.gallery-stage {
  position: absolute;
  inset: 14% 10.5% 0 2%;
}

.gallery-heading {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  margin: 0;
  font: 300 4.2cqw/1.1 var(--font-text);
  letter-spacing: -.04em;
}

.gallery-heading strong {
  font-weight: 650;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1cqw;
  position: absolute;
  inset: 25% 0 20%;
}

.gallery-tile {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  min-inline-size: 0;
  min-block-size: 0;
  block-size: 100%;
  overflow: hidden;
  border: 0;
  padding: 0;
  cursor: pointer;
  border-radius: .65cqw;
  background: #14191e;
  box-shadow: .65cqw .8cqw 1.7cqw rgb(24 39 51 / .19);
  color: inherit;
  text-decoration: none;
}

.gallery-tile img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  min-block-size: 0;
  object-fit: cover;
  object-position: center top;
}

.gallery-tile:focus-visible {
  outline: .1cqw solid var(--color-ink);
  outline-offset: .45cqw;
}

.gallery-panel.is-enhanced .gallery-grid {
  display: block;
  inset: 0 0 13%;
  perspective: 1100px;
}

/* The selection frame stays centered while the cards rotate underneath it. */
.gallery-panel.is-enhanced .gallery-grid::after {
  content: "";
  position: absolute;
  top: 25%;
  left: 33.7%;
  width: 32.6%;
  aspect-ratio: 85.6 / 53.98;
  border-radius: 3.7% / 5.9%;
  outline: .1cqw solid var(--color-ink);
  outline-offset: .45cqw;
  pointer-events: none;
  z-index: 11;
}

.gallery-panel.is-enhanced .gallery-tile {
  position: absolute;
  width: 32.6%;
  block-size: auto;
  aspect-ratio: 85.6 / 53.98;
  top: 25%;
  left: 33.7%;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  border-radius: 3.7% / 5.9%;
  background: #18212b;
  box-shadow: 0 .4cqw .85cqw -.3cqw rgb(20 38 51 / .22);
  transform: translateX(-130%) scale(.5);
  filter: saturate(var(--saturation, 1));
  transition-property: transform, opacity, visibility, filter, box-shadow;
  transition-duration: 600ms, 350ms, 0s, 600ms, 600ms;
  transition-timing-function: cubic-bezier(.4,0,.2,1), ease, linear, ease, cubic-bezier(.4,0,.2,1);
  transition-delay: 0s, 0s, 600ms, 0s, 0s;
}

/* Each card face is one finished JPEG; only carousel presentation remains live. */
.gallery-panel.is-enhanced .gallery-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.gallery-panel.is-enhanced .gallery-tile:is([data-slot='0'],[data-slot='1'],[data-slot='-1'],[data-slot='2'],[data-slot='-2'],[data-slot='3'],[data-slot='-3']) {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition-delay: 0s;
}

/* Contact and diffuse shadows give the front card depth as the fan rotates. */
.gallery-panel.is-enhanced .gallery-tile[data-slot='0'] {
  transform: none;
  z-index: 10;
  box-shadow: 0 .35cqw .6cqw -.1cqw rgb(8 20 31 / .34),
  0 1.8cqw 2.8cqw -.65cqw rgb(8 20 31 / .44);
}

.gallery-panel.is-enhanced .gallery-tile:is([data-slot='1'], [data-slot='-1']) {
  box-shadow: 0 .25cqw .5cqw -.1cqw rgb(8 20 31 / .25),
  0 1cqw 1.8cqw -.45cqw rgb(8 20 31 / .3);
}

.gallery-panel.is-enhanced .gallery-tile[data-slot='1'] {
  transform: translateX(42%) scale(.86) rotate(2deg);
  z-index: 8;
  --saturation: .9;
}

.gallery-panel.is-enhanced .gallery-tile[data-slot='-1'] {
  transform: translateX(-42%) scale(.86) rotate(-2deg);
  z-index: 7;
  --saturation: .9;
}

.gallery-panel.is-enhanced .gallery-tile[data-slot='2'] {
  transform: translateX(76%) scale(.72) rotate(4deg);
  z-index: 5;
  --saturation: .6;
}

.gallery-panel.is-enhanced .gallery-tile[data-slot='-2'] {
  transform: translateX(-76%) scale(.72) rotate(-4deg);
  z-index: 4;
  --saturation: .6;
}

.gallery-panel.is-enhanced .gallery-tile[data-slot='3'] {
  transform: translateX(103%) scale(.58) rotate(6deg);
  z-index: 3;
  opacity: .45;
  --saturation: .85;
}

.gallery-panel.is-enhanced .gallery-tile[data-slot='-3'] {
  transform: translateX(-103%) scale(.58) rotate(-6deg);
  z-index: 2;
  opacity: .45;
  --saturation: .85;
}

.gallery-panel.is-enhanced .gallery-tile[data-slot='4'] {
  transform: translateX(130%) scale(.5);
}

.gallery-navigation {
  position: absolute;
  bottom: 13%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1cqw;
  align-items: center;
}

.gallery-navigation[hidden] {
  display: none;
}

.gallery-navigation > button {
  display: grid;
  place-items: center;
  flex: none;
  padding: .65cqw;
  border: 1px solid currentColor;
  border-radius: 50%;
  width: 3cqw;
  height: 3cqw;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: .65;
}

.gallery-navigation svg {
  width: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-index {
  display: flex;
  align-items: center;
  gap: .65cqw;
}

.gallery-index button {
  border: 0;
  border-radius: 5px;
  padding: 8px 0;
  width: 2cqw;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.gallery-index button::after {
  content: '';
  display: block;
  height: 2px;
  background: currentColor;
  opacity: .25;
}

.gallery-index button[aria-pressed=true]::after, .gallery-index button:hover::after {
  opacity: 1;
}

.gallery-navigation button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* The opening unfolds once: title, center-out cards, then the controls. */
.gallery-heading {
  overflow: hidden;
  padding-bottom: .08em;
}

.gallery-heading > * {
  display: inline-block;
}

.gallery-heading > span {
  margin-inline-end: .2em;
}

html.section-motion .gallery-heading > * {
  opacity: 0;
  translate: 0 115%;
  transition: translate 750ms cubic-bezier(.16,1,.3,1), opacity 450ms ease;
}

html.section-motion .gallery-heading strong {
  transition-delay: 140ms;
}

html.section-motion .gallery-grid {
  opacity: 0;
  transition: opacity 450ms ease;
}

html.section-motion .gallery-navigation {
  opacity: 0;
  translate: 0 .75cqw;
  transition: opacity 550ms ease, translate 650ms cubic-bezier(.16,1,.3,1);
}

html.section-motion .gallery-panel.is-visible .gallery-heading > * {
  opacity: 1;
  translate: 0 0;
}

html.section-motion .gallery-panel.is-visible .gallery-grid {
  opacity: 1;
  transition-delay: 160ms;
}

html.section-motion .gallery-panel.is-visible .gallery-navigation {
  opacity: 1;
  translate: 0 0;
  transition-delay: 650ms;
}

.gallery-tile[data-slot='0'] {
  --arrival-x: 0cqw;
  --arrival-delay: 160ms;
}

.gallery-tile[data-slot='-1'] {
  --arrival-x: 3cqw;
  --arrival-delay: 230ms;
}

.gallery-tile[data-slot='1'] {
  --arrival-x: -3cqw;
  --arrival-delay: 230ms;
}

.gallery-tile[data-slot='-2'] {
  --arrival-x: 5cqw;
  --arrival-delay: 300ms;
}

.gallery-tile[data-slot='2'] {
  --arrival-x: -5cqw;
  --arrival-delay: 300ms;
}

.gallery-tile[data-slot='-3'] {
  --arrival-x: 7cqw;
  --arrival-delay: 370ms;
}

.gallery-tile[data-slot='3'] {
  --arrival-x: -7cqw;
  --arrival-delay: 370ms;
}

.gallery-panel.is-entering .gallery-tile[aria-hidden='false'] {
  animation: gallery-card-arrive 800ms cubic-bezier(.16,1,.3,1) var(--arrival-delay) both;
}

@keyframes gallery-card-arrive {
  from {
    translate: var(--arrival-x) 1.25cqw;
    scale: .94;
  }
  to {
    translate: 0 0;
    scale: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-panel.is-enhanced .gallery-tile, .gallery-heading > *, .gallery-grid, .gallery-navigation {
    transition: none;
    animation: none;
  }
}

.window-content :where(button, input, select, textarea) {
  font: inherit;
}

.background-navigation {
  box-sizing: border-box;
  position: absolute;
  inset-inline-start: -.9cqw;
  inset-block-end: -2cqw;
  transform: translate(-1cqw, 50%);
  display: flex;
  align-items: center;
  gap: 0;
  color: var(--color-ink);
  z-index: 2;
}

.background-navigation button {
  position: relative;
  display: grid;
  place-items: center;
  inline-size: 2cqw;
  block-size: 3.3cqw;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 1;
}

.background-navigation svg {
  inline-size: 2cqw;
  block-size: 2cqw;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.background-navigation svg circle, .background-chevron {
  vector-effect: non-scaling-stroke;
}

.background-ring {
  fill: currentColor;
  fill-opacity: 0;
  stroke-opacity: .35;
  stroke-width: 1px;
  transition: fill-opacity 300ms ease, stroke-opacity 300ms ease;
}

.background-chevron {
  stroke-width: 1.5;
  transition: translate 300ms cubic-bezier(.2,.8,.2,1);
}

#background-previous {
  --arrow-shift: -.1cqw;
}

#background-next {
  --arrow-shift: .1cqw;
}

.background-navigation button:is(:hover, :focus-visible) .background-ring {
  stroke-opacity: .8;
  fill-opacity: .09;
}

.background-navigation button:is(:hover, :focus-visible) .background-chevron {
  translate: var(--arrow-shift) 0;
}

.background-navigation button:active .background-ring {
  fill-opacity: .16;
}

.background-navigation button:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: .2cqw;
}

html[data-glass="dark"] .background-navigation {
  color: #edf4fa;
}

.background-status {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.theme-toggle {
  position: absolute;
  inset-inline-end: -1.5cqw;
  inset-block-end: -1.5cqw;
  transform: translate(50%, 50%);
  display: grid;
  place-items: center;
  inline-size: 3.25rem;
  block-size: 3.25rem;
  padding: .25rem;
  border: 0;
  background: transparent;
  color: var(--color-ink);
  cursor: pointer;
  z-index: 2;
}

.theme-symbol {
  inline-size: 2.6cqw;
  block-size: 2.6cqw;
  fill: none;
  stroke: currentColor;
  stroke-width: 1px;
  transition: rotate 650ms cubic-bezier(.4,0,.2,1);
}

.theme-symbol circle {
  vector-effect: non-scaling-stroke;
}

.theme-symbol path, .theme-point {
  fill: currentColor;
  stroke: none;
}

.theme-orbit {
  opacity: .35;
  transition: opacity 300ms ease;
}

.theme-toggle[aria-pressed="true"] .theme-symbol {
  rotate: 180deg;
}

html[data-glass="dark"] .theme-toggle {
  color: #edf4fa;
}

.theme-toggle:is(:hover, :focus-visible) .theme-orbit {
  opacity: .8;
}

.theme-toggle:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: .2rem;
  border-radius: 50%;
}

@media (prefers-reduced-motion: reduce) {
  .theme-symbol, .theme-orbit, .background-navigation button,
  .background-navigation svg, .background-ring,
  .background-chevron {
    transition: none;
  }
}
