:root {
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --band: #f5f5f7;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --green: #34c759;
  --red: #ff3b30;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(20px, 5vw, 48px);
  --h1: clamp(40px, 4.45vw, 64px);
  --h2: clamp(32px, 3.33vw, 48px);
  --lede: clamp(19px, 1.46vw, 21px);
  --section: clamp(72px, 7.8vw, 112px);
  --panel-inset: max(var(--gutter), calc((100% - 1320px) / 2));
  --wide: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--text); font: 400 17px/1.47 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
:focus-visible { outline: 3px solid rgb(0 113 227 / 0.55); outline-offset: 2px; }
[hidden] { display: none !important; }

.nav { display: flex; justify-content: space-between; align-items: center; max-width: var(--wide); height: 64px; margin: 0 auto; padding: 0 var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-size: 18px; font-weight: 600; text-decoration: none; }
.brand img { display: block; width: 20px; height: 22px; max-width: none; }

.pill { transition: background 120ms ease, transform 120ms ease; display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px; border: 0; border-radius: 980px; background: var(--blue); color: #fff; font: 500 17px/1 var(--font); text-decoration: none; cursor: pointer; }
.pill:hover { background: var(--blue-hover); }
.pill-small { min-height: 34px; padding: 0 16px; font-size: 14px; }
.pill-soft, .pill-soft:hover { background: #f5f5f7; color: var(--text); cursor: default; }

.hero { max-width: 1340px; margin: 0 auto; padding: clamp(40px, 6vw, 76px) var(--gutter) clamp(36px, 4.5vw, 60px); text-align: center; }
.stage { padding: 0 var(--gutter) var(--section); }
.stage .try { color: var(--muted); }
h1 { font-size: var(--h1); line-height: 1.07; font-weight: 600; letter-spacing: -0.015em; text-wrap: balance; }
.lede { max-width: 38em; margin: 16px auto 0; text-wrap: balance; font-size: var(--lede); line-height: 1.38; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.fine { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* App window */
.window { position: relative; --w-bar: #f6f6f7; --w-side: #f1f1f3; --w-main: #fff; --w-raised: #fff; --w-line: rgb(0 0 0 / 0.11); --w-muted: #6e6e73; max-width: 1240px; margin: 0 auto; border-radius: 12px; overflow: hidden; background: var(--w-main); color: var(--text); text-align: left; box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.2), 0 24px 70px rgb(20 40 80 / 0.2); font-size: 13px; line-height: 1.2; }
.window button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
.bar { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 18px; height: 52px; padding: 0 16px; background: var(--w-bar); border-bottom: 0.5px solid var(--w-line); }
.lights { display: flex; gap: 8px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.title strong { display: block; font-weight: 600; }
.title span { color: var(--w-muted); font-size: 11px; }
.segmented { display: inline-flex; padding: 2px; border-radius: 7px; background: rgb(0 0 0 / 0.07); }
.window .segmented button { padding: 4px 16px; border-radius: 5px; }
.window .segmented button[aria-pressed="true"] { background: var(--w-raised); box-shadow: 0 0.5px 2px rgb(0 0 0 / 0.25); }
.window .picked-count { padding: 5px 11px; border-radius: 6px; background: var(--w-raised); box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.16); }

.body { display: grid; grid-template-columns: 172px minmax(0, 1fr); height: 452px; }
.side { padding: 14px 10px; background: var(--w-side); border-right: 0.5px solid var(--w-line); }
.side p { padding: 0 8px 6px; color: var(--w-muted); font-size: 11px; font-weight: 600; }
.window .side button { display: flex; justify-content: space-between; width: 100%; padding: 6px 8px; border-radius: 6px; text-align: left; }
.window .side button:hover { background: rgb(0 0 0 / 0.04); }
.window .side button[aria-pressed="true"] { background: rgb(0 0 0 / 0.08); }
.side b { font-weight: 400; color: var(--w-muted); }
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }

.grid { --rows: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(var(--rows), minmax(0, 1fr)); gap: 10px; padding: 14px; flex: 1; min-height: 0; }
.window .tile { position: relative; display: block; min-height: 0; overflow: hidden; border-radius: 5px; background: var(--band); }
.tile.rejected img, .slot.rejected .photo img, .strip-thumb.rejected img { opacity: 0.32; }
.tile.selected::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgb(0 113 227 / 0.26); }
.tile.focus, .strip-thumb.focus { box-shadow: 0 0 0 3px var(--blue); }
.badge { position: absolute; z-index: 2; left: 6px; bottom: 6px; padding: 2px 5px; border-radius: 3px; background: rgb(0 0 0 / 0.58); color: #fff; font-size: 9px; font-weight: 600; }
.mark { position: absolute; z-index: 2; top: 6px; right: 6px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 700 11px/1 var(--font); }
.mark.ok { background: var(--green); }
.mark.no { background: var(--red); }
.mark.small { position: static; width: 14px; height: 14px; font-size: 8px; flex: none; }
.empty { margin: auto; padding: 24px; text-align: center; color: var(--w-muted); font-size: 14px; }
.empty strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 16px; font-weight: 600; }

.canvas { flex: 1; min-height: 0; display: flex; justify-content: center; align-items: center; padding: 10px; background: var(--band); }
.photo { position: relative; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; background: #e8e8ed; }
.photo.zoomed { cursor: grab; touch-action: none; }
.photo.dragging { cursor: grabbing; }
.photo img { -webkit-user-drag: none; transition: transform 200ms ease; }
.photo.dragging img { transition: none; }
.canvas .photo { height: 100%; aspect-ratio: 3 / 2; max-width: 100%; }

.info { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px; border-top: 0.5px solid var(--w-line); background: var(--w-bar); }
.info strong { font-weight: 600; margin-right: auto; }
.window .toggle { padding: 5px 10px; border-radius: 6px; background: var(--w-raised); box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.16); }
.window .toggle[aria-pressed="true"] { background: var(--blue); color: #fff; }
.window .segmented.small button { padding: 3px 9px; font-size: 12px; }
.strip { display: flex; gap: 4px; height: 58px; padding: 6px 10px; overflow-x: auto; border-top: 0.5px solid var(--w-line); background: var(--w-bar); }
.window .strip-thumb { position: relative; flex: none; width: 66px; height: 100%; overflow: hidden; border-radius: 3px; }

.slots { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 6px; padding: 8px; background: var(--band); }
.window .slot { display: flex; flex-direction: column; min-height: 0; border-radius: 5px; overflow: hidden; background: #fff; box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.14); text-align: left; }
.window .slot.focus { box-shadow: 0 0 0 3px var(--blue); }
.slot-head { display: flex; align-items: center; gap: 5px; height: 24px; padding: 0 7px; font-size: 11px; font-weight: 500; }
.slot .photo { flex: 1; min-height: 0; }
.compare-tools { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; border-top: 0.5px solid var(--w-line); background: var(--w-bar); color: var(--w-muted); }
.compare-tools span { margin-right: auto; }
.compare-tools .toggle { color: var(--text); }

.foot-bar { display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 32px; padding: 6px 14px; border-top: 0.5px solid var(--w-line); background: var(--w-bar); color: var(--w-muted); font-size: 12px; }
#hints { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; }
#hints kbd { min-width: 18px; height: 18px; margin-right: 3px; padding: 0 4px; font-size: 10px; color: var(--text); background: var(--w-raised); box-shadow: 0 0 0 0.5px rgb(0 0 0 / 0.16); }
.flash { position: absolute; left: 50%; top: 66px; z-index: 5; display: flex; align-items: center; gap: 9px; padding: 8px 14px 8px 8px; border-radius: 11px; background: rgb(255 255 255 / 0.96); color: var(--text); box-shadow: 0 4px 18px rgb(20 40 80 / 0.22); font-size: 14px; opacity: 0; transform: translate(-50%, 4px); transition: opacity 140ms ease, transform 140ms ease; pointer-events: none; }
.flash.show { opacity: 1; transform: translate(-50%, 0); }
.flash kbd { min-width: 30px; height: 30px; color: var(--text); background: var(--band); box-shadow: none; font-size: 15px; }
.try { margin-top: 18px; font-size: 15px; color: #a1a1a6; text-align: center; }

/* Sections */
h2 { font-size: var(--h2); line-height: 1.1; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 17px; font-weight: 600; }
kbd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 6px; background: var(--band); box-shadow: inset 0 0 0 0.5px var(--line), 0 1px 0 var(--line); font: 500 13px/1 var(--font); }

/* Soft panels with pieces of the app floating on them */
.tint { border-radius: 24px; padding: clamp(18px, 3vw, 40px); }
.tint-blue, .tint-peach, .tint-mint, .tint-lilac, .tint-gray { background: var(--band); }
.float { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgb(20 40 80 / 0.07), 0 14px 36px rgb(20 40 80 / 0.13); }

.feature { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 88px); align-items: center; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter) var(--section); }
.feature.flip { grid-template-columns: 7fr 5fr; }
.feature.flip .feature-copy { order: 2; }
.feature h2, .features h2 { font-size: clamp(30px, 2.8vw, 40px); }
.feature-copy p { margin-top: 14px; color: var(--muted); }
.feature-copy .hint { color: var(--blue); font-size: 15px; }

.compare { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 6px; }
.compare .shot { position: relative; }
.compare.drifting .photo img { transition: none; }
.compare .photo { aspect-ratio: 4 / 3; border-radius: 9px; cursor: grab; touch-action: none; }
.compare .shot.chosen .photo { box-shadow: 0 0 0 3px var(--blue); }
.compare .mark { top: 10px; right: 10px; width: 24px; height: 24px; font-size: 13px; }
.compare .shot-name { margin: 7px 0 3px; text-align: center; font-size: 12px; color: var(--muted); }

.features { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter) var(--section); }
.features-lede { margin-top: 10px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.card { display: flex; flex-direction: column; min-height: 248px; padding: 24px 24px 0; border-radius: 22px; overflow: hidden; }
.card.wide { grid-column: span 2; }
.card h3 { font-size: 19px; }
.card > p { margin-top: 4px; font-size: 15px; line-height: 1.4; color: var(--muted); }
.vis { margin-top: auto; border-radius: 12px 12px 0 0; }
.strip-vis { display: flex; gap: 6px; padding: 10px 10px 0; }
.v-thumb { position: relative; flex: 1; aspect-ratio: 3 / 2; border-radius: 7px 7px 0 0; overflow: hidden; }
.v-thumb.no img { opacity: 0.38; }
.zoom-vis { position: relative; height: 150px; overflow: hidden; }
.zoom-vis::before { content: ""; position: absolute; inset: 0; background: url(img/frame-18.jpg) 50% 50% / cover no-repeat; transform: scale(2.7); transform-origin: 71% 33%; }
.zoom-vis .pill-tag { z-index: 1; }
.pill-tag { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 980px; background: rgb(255 255 255 / 0.92); font-size: 12px; font-weight: 600; }
.rows { padding: 6px 14px 8px; font-size: 14px; }
.rows > div { display: flex; align-items: center; gap: 10px; min-height: 42px; border-top: 0.5px solid var(--line); }
.rows > div:first-child { border-top: 0; }
.rows span:not(.mark) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows em { margin-left: auto; font-style: normal; color: var(--muted); }
.ext { display: grid; place-items: center; flex: none; width: 34px; height: 24px; border-radius: 6px; background: #ececf1; color: var(--text); font-size: 11px; }

.get { margin: 0 var(--panel-inset) var(--section); padding: clamp(48px, 5.5vw, 80px) clamp(20px, 3vw, 44px); border-radius: 20px; background: var(--band); text-align: center; }
.get > * { max-width: 560px; margin-left: auto; margin-right: auto; }
.get > p:not(.fine, .hero-actions) { margin-top: 14px; color: var(--muted); }

.foot { padding: 24px var(--gutter) 40px; border-top: 0.5px solid var(--line); text-align: center; font-size: 13px; color: var(--muted); }

@media (max-width: 760px) {
  .body { grid-template-columns: minmax(0, 1fr); height: 430px; }
  .side, .window .picked-count, #hints { display: none; }
  .bar { grid-template-columns: auto 1fr auto; gap: 12px; }
  .window .segmented button { padding: 4px 9px; }
  .grid { --rows: 3; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px; }
  .info { flex-wrap: wrap; height: auto; padding: 8px 10px; }
  .info strong { width: 100%; }
  .slots { --cols: 2 !important; }
  .feature, .feature.flip, .cards { grid-template-columns: minmax(0, 1fr); }
  .feature.flip .feature-copy { order: 0; }
  .card.wide { grid-column: auto; }
  .card { min-height: 0; }
  .vis { margin-top: 22px; }
}
@media (max-width: 440px) {
  .title span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .photo img, .flash { transition: none; }
}

/* Motion. Everything here is off under prefers-reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
  .pill:active { transform: scale(0.97); }
  .hero h1, .lede, .hero-actions, .fine, .window, .stage .try { animation: rise 760ms cubic-bezier(0.2, 0.75, 0.2, 1) both; }
  .lede { animation-delay: 90ms; }
  .hero-actions { animation-delay: 170ms; }
  .fine { animation-delay: 230ms; }
  .window { animation-delay: 300ms; animation-name: rise-window; animation-duration: 950ms; }
  .stage .try { animation-delay: 720ms; }

  html.motion .reveal { opacity: 0; transform: translateY(22px); transition: opacity 620ms ease, transform 760ms cubic-bezier(0.2, 0.75, 0.2, 1); transition-delay: calc(var(--i, 0) * 75ms); }
  html.motion .reveal.in { opacity: 1; transform: none; }

  .vis { transition: transform 260ms cubic-bezier(0.2, 0.75, 0.2, 1); }
  .card:hover .vis { transform: translateY(-5px); }

  /* Each card quietly demonstrates its feature while it's on screen. */
  html.motion .card.play .v-thumb .mark, html.motion .card.play .ticks .mark { animation: mark-in 6.4s infinite both; }
  html.motion .card.play .v-thumb.no img { animation: dim 6.4s infinite both; }
  html.motion .card.play .v-thumb:nth-child(2) .mark, html.motion .card.play .ticks div:nth-child(2) .mark { animation-delay: 480ms; }
  html.motion .card.play .v-thumb:nth-child(3) .mark, html.motion .card.play .v-thumb:nth-child(3) img { animation-delay: 960ms; }
  html.motion .card.play .v-thumb:nth-child(4) .mark { animation-delay: 1440ms; }
  html.motion .card.play .zoom-vis::before { animation: focus-in 7.5s ease-in-out infinite both; }
  html.motion .card.play .zoom-vis .pill-tag { animation: tag-in 7.5s ease-in-out infinite both; }
  html.motion .card.play .swap > div { animation: row-on 6s infinite both; border-radius: 8px; }
  html.motion .card.play .swap > div:nth-child(2) { animation-delay: 3s; }
  .rows.sweep { position: relative; }
  .rows.sweep::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 3px; border-radius: 3px; background: var(--blue); transform: scaleX(0); transform-origin: left; }
  html.motion .card.play .rows.sweep::after { animation: sweep 3.6s ease-in-out infinite; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes rise-window { from { opacity: 0; transform: translateY(40px) scale(0.975); } to { opacity: 1; transform: none; } }
@keyframes mark-in { 0%, 6% { transform: scale(0); opacity: 0; } 12% { transform: scale(1.22); opacity: 1; } 17%, 86% { transform: scale(1); opacity: 1; } 94%, 100% { transform: scale(0); opacity: 0; } }
@keyframes dim { 0%, 8% { opacity: 1; } 16%, 86% { opacity: 0.38; } 94%, 100% { opacity: 1; } }
@keyframes focus-in { 0%, 12% { transform: scale(1); } 46%, 84% { transform: scale(2.7); } 100% { transform: scale(1); } }
@keyframes tag-in { 0%, 34% { opacity: 0; } 46%, 84% { opacity: 1; } 92%, 100% { opacity: 0; } }
@keyframes row-on { 0%, 46%, 100% { background: transparent; } 8%, 38% { background: rgb(0 113 227 / 0.1); } }
@keyframes sweep { 0% { transform: scaleX(0); opacity: 1; } 70% { transform: scaleX(1); opacity: 1; } 88%, 100% { transform: scaleX(1); opacity: 0; } }
