.project-page { background: #000; }
.project-main { padding: 132rem var(--margin) 32rem; }
.project-header { padding-bottom: 64rem; }
.project-icon { display: block; width: 96px; height: 96px; object-fit: contain; margin-bottom: 32rem; }
.ios-icon { border-radius: 22px; }
.project-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24rem; text-transform: uppercase; letter-spacing: .02em; }
.project-heading > .serial { flex-shrink: 0; }
.project-outcome { max-width: 34ch; margin-top: 40rem; font-size: clamp(22px, 2vw, 26px); line-height: 1.3; text-wrap: pretty; }
.project-actions { margin-top: 28rem; }
.project-actions .bar-button { display: inline-flex; align-items: center; min-height: 44px; padding: 18px 24px; font-size: 16px; text-transform: none; letter-spacing: 0; }
.project-visuals { min-width: 0; margin: 0 0 88rem; }
.project-visuals video { display: block; width: 100%; height: auto; background: #000; }
.dearest-demo video { grid-column: 4 / 9; display: block; width: 100%; max-width: 360px; height: auto; object-fit: contain; object-position: 50% 0; }
.project-section { padding-block: 48rem 88rem; border-top: 1px solid #333; }
.project-section-title { text-transform: uppercase; letter-spacing: .02em; font-size: 15px; }
.project-section > h2 { grid-column: 1 / 3; }
.project-facts, .project-features { grid-column: 4 / 9; min-width: 0; max-width: 65ch; font-size: 17px; line-height: 1.6; }
.project-facts > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; padding-block: 12px; border-bottom: 1px solid #262626; }
.project-facts > div:first-child { padding-top: 0; }
.project-facts dt { color: var(--muted); text-transform: uppercase; letter-spacing: .02em; font-size: 12px; }
.project-facts a { text-decoration: underline; text-underline-offset: 4px; }
.project-features { padding-left: 1.2em; }
.project-features li + li { margin-top: 12px; }
.project-page :is(h1, h2, p, dd, li, a) { overflow-wrap: anywhere; }
.project-pagination { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20rem; padding-top: 24rem; border-top: 1px solid #333; text-transform: uppercase; letter-spacing: .02em; }
.project-pagination a { display: inline-flex; align-items: center; min-height: 44px; }
@media (hover: hover) and (pointer: fine) {
  .project-pagination a:hover { text-decoration: underline; text-underline-offset: 4px; }
}

.mapper-panel { display: grid; place-items: center; min-height: 360px; background: #111; }
.mapper-panel img { width: min(60%, 280px); height: auto; }
.mapper-panel + h2 { margin-top: 40rem; }
.mapper-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-left: 24px; margin-top: 24px; font-size: 17px; }
.loreai-media { display: grid; gap: 64rem; }
.loreai-media h2 { margin-bottom: 24px; }
.launch-films { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.media-caption { margin-top: 16px; color: var(--muted); }
.social-carousel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; }
.social-carousel img { display: block; width: 100%; height: auto; scroll-snap-align: start; }
/* Reserve room for fixed navigation, captions, the scrollbar and controls. Cap at 2x source resolution. */
.screen-flow { --screen-width: min(100%, 1032px, max(1px, calc((100dvh - 240px) * .75))); position: relative; display: flex; gap: 24px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-color: var(--muted) transparent; padding-bottom: 16px; }
.screen-flow::after { content: ""; flex: 0 0 max(0px, calc(100% - var(--screen-width) - 24px)); }
.screen-flow figure { margin: 0; min-width: 0; flex: 0 0 var(--screen-width); scroll-snap-align: start; }
.screen-flow img { display: block; width: 100%; height: auto; }
.screen-flow figcaption { margin-top: 12px; font-size: 15px; line-height: 1.45; }
.screen-flow:focus-visible { outline: 1px solid #fff; outline-offset: 5px; }
.flow-controls { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 16px; }
.flow-controls button { min-width: 44px; min-height: 44px; }
.flow-controls [aria-disabled="true"] { color: var(--muted); cursor: default; }
.flow-status { position: relative; overflow: hidden; font-variant-numeric: tabular-nums; }
.flow-number { display: inline-block; }
.flow-number-old { position: absolute; top: 0; left: 0; }
.motion-page .project-heading { text-transform: none; }
.motion-meta { display: flex; gap: 20px; margin-bottom: 24px; color: var(--muted); font-size: 12px; }
.motion-page .project-outcome { max-width: 75ch; font-size: 17px; line-height: 1.6; }
.motion-hero { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; background: var(--empty); overflow: hidden; }
.motion-hero > img, .motion-hero > iframe { display: block; width: 100%; height: 100%; position: absolute; inset: 0; border: 0; object-fit: contain; }
.motion-hero .bar-button { position: relative; min-height: 44px; padding: 14px 24px; text-transform: none; letter-spacing: 0; }
.motion-watch { display: inline-flex; align-items: center; min-height: 44px; margin-top: 16px; text-decoration: underline; text-underline-offset: 4px; }
.motion-stills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px var(--gutter); margin-bottom: 64rem; }
.motion-stills > h2 { grid-column: 1 / -1; }
.motion-still { display: block; min-width: 0; }
.motion-still img { display: block; width: 100%; height: auto; }
.motion-still:active { transform: scale(.97); }
.motion-still { transition: transform 160ms var(--ease-out); }
#motion-still-dialog { position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 88px var(--margin) 32px; border: 0; color: var(--text); background: rgba(1, 1, 1, .8); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); overflow: auto; }
#motion-still-dialog[open] { display: grid; place-items: center; }
#motion-still-dialog::backdrop { background: transparent; }
.motion-still-detail { width: 100%; max-width: 1400px; }
.motion-still-detail img { display: block; width: 100%; height: calc(100dvh - 180px); object-fit: contain; }
.motion-still-detail h2 { margin-top: 20px; font-size: 15px; }
@media (prefers-reduced-motion: reduce) {
  .motion-still:active { transform: none; }
}
html[data-input="keyboard"] .motion-still { transition: none; }
@media (max-width: 479px) {
  .project-main { padding-top: 112px; }
  .project-header { padding-bottom: 40px; }
  .project-outcome { margin-top: 28px; }
  .project-section { gap: 24px; padding-block: 32px 48px; }
  .project-section > h2, .project-facts, .project-features, .dearest-demo video { grid-column: 1 / -1; }
  .project-facts > div { grid-template-columns: 88px minmax(0, 1fr); gap: 16px; }
  .project-pagination { font-size: 12px; }
  .mapper-panel { min-height: 280px; }
  .mapper-steps { grid-template-columns: minmax(0, 1fr); }
  .launch-films { grid-template-columns: minmax(0, 1fr); }
  .social-carousel { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 85%; }
  .motion-stills { grid-template-columns: minmax(0, 1fr); }
}
