/* FindIt website. System fonts only, so nothing is loaded from other origins. */

:root {
  --font: "Segoe UI Variable Display", "Segoe UI Variable Text", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;

  --ink: #1d1d1f;
  --ink-2: #424245;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: #e3e3e8;
  --soft: #f5f5f7;
  --white: #ffffff;
  --blue: #0a66d8;
  --blue-hover: #0857ba;
  --mark: #fff1a8;

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
@media (prefers-reduced-motion: no-preference) { html:focus-within { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 17px/1.5 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 0.9em; }
mark { color: inherit; background: var(--mark); border-radius: 3px; padding: 0 0.1em; }
:focus-visible { outline: 3px solid rgba(10, 102, 216, 0.45); outline-offset: 2px; border-radius: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(760px + 2 * var(--gutter)); text-align: center; }

/* Controls */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 26px; border-radius: 999px;
  font: 500 17px/1 var(--font); color: #fff; background: var(--blue);
  transition: background-color 0.15s ease;
}
.pill:hover { background: var(--blue-hover); text-decoration: none; }
.textlink { padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: var(--blue); }
.textlink:hover { text-decoration: underline; }

/* Top bar: a floating pill */
.bar { position: fixed; top: 14px; left: 0; right: 0; z-index: 20; display: flex; justify-content: center; padding: 0 12px; pointer-events: none; }
.bar__pill {
  display: flex; align-items: center; gap: 2px; max-width: 100%;
  padding: 6px 6px 6px 16px; border-radius: 999px; pointer-events: auto;
  background: rgba(255, 255, 255, 0.72); backdrop-filter: saturate(1.8) blur(20px); -webkit-backdrop-filter: saturate(1.8) blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.07);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 30px -14px rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}
.bar.is-scrolled .bar__pill { background: rgba(255, 255, 255, 0.86); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 14px 40px -14px rgba(0, 0, 0, 0.28); }
.brand { display: inline-flex; align-items: center; gap: 8px; margin-right: 14px; color: var(--ink); font-weight: 600; font-size: 15px; }
.brand:hover { text-decoration: none; }
.brand img { width: 22px; height: 22px; }
.bar__links { display: flex; margin-right: 6px; }
.bar__links a { padding: 7px 13px; border-radius: 999px; font-size: 14px; color: var(--ink-2); transition: background-color 0.15s, color 0.15s; }
.bar__links a:hover { color: var(--ink); background: rgba(0, 0, 0, 0.05); text-decoration: none; }
.bar .pill--small { min-height: 34px; padding: 0 16px; font-size: 14px; }

/* Type */
h1, .heading { font-weight: 600; letter-spacing: -0.03em; text-wrap: balance; }
h1 { font-size: clamp(40px, 6.4vw, 72px); line-height: 1.04; }
.heading { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.08; text-align: center; }
.sub { max-width: 34em; margin: 14px auto 0; font-size: clamp(18px, 1.8vw, 21px); line-height: 1.4; color: var(--muted); text-align: center; }
.fine { max-width: 44em; margin: 28px auto 0; font-size: 13px; line-height: 1.5; color: var(--faint); text-align: center; }

/* ---- Hero: a search over a sample drive ---------------------------------------------------------- */
.hero { padding: calc(64px + clamp(40px, 6vw, 80px)) 0 clamp(72px, 9vw, 120px); }
.hero__icon { width: 84px; height: 84px; margin: 0 auto 28px; }
.hero__sub { max-width: 34em; margin: 18px auto 0; font-size: clamp(19px, 2vw, 23px); line-height: 1.4; color: var(--muted); }
.hero .textlink { margin-top: 18px; font-size: 17px; }
.hero__note { margin-top: 36px; font-size: 13px; color: var(--faint); text-align: center; }

.drive { max-width: 960px; margin: clamp(40px, 6vw, 64px) auto 0; }
.seek {
  position: relative; display: flex; align-items: center; gap: 14px;
  max-width: 680px; margin: 0 auto; padding: 0 20px;
  height: 60px; border-radius: 16px;
  background: var(--white); border: 1px solid #d2d2d7;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -12px rgba(0, 0, 0, 0.12);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.seek:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(10, 102, 216, 0.14), 0 12px 32px -12px rgba(0, 0, 0, 0.12); }
.seek__icon { width: 20px; height: 20px; color: var(--faint); flex: none; }
.seek input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; font: 400 19px/1.2 var(--font); color: var(--ink); letter-spacing: -0.01em; }
.seek input::placeholder { color: var(--faint); }
.seek__busy { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--blue); opacity: 0; flex: none; }
.drive.is-thinking .seek__busy { opacity: 1; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hints { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 960px; margin: 18px auto 0; }
.hint {
  padding: 8px 15px; border: 0; border-radius: 999px; cursor: pointer;
  font: 400 14px/1.2 var(--font); color: var(--ink-2); background: var(--soft);
  transition: background-color 0.15s, color 0.15s;
}
.hint:hover { background: #ebebef; color: var(--ink); }
.hint[aria-pressed="true"] { background: var(--ink); color: #fff; }

.readout { min-height: 1.5em; margin: 28px 0 22px; font-size: 14px; color: var(--muted); text-align: center; }
.readout strong { color: var(--ink); font-weight: 600; }

/* Before a search: the drive as a computer sees it */
.peek { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; }
.peek__item { min-width: 0; }
.peek__media { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--soft) center / cover no-repeat; filter: saturate(0.55); opacity: 0.85; }
.peek__media img { width: 100%; height: 100%; object-fit: cover; }
.peek__name { display: block; margin-top: 6px; font: 400 11px/1.3 var(--mono); color: var(--faint); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Results */
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 224px)); justify-content: center; gap: 28px 20px; }
.card { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; animation-delay: calc(var(--i) * 50ms); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.card__open { display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; }
.card__media {
  position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden;
  border-radius: 14px; background: var(--soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card__open:hover .card__media { transform: translateY(-3px); box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.35); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__frame { position: absolute; inset: 0; background-repeat: no-repeat; }
.card__time { position: absolute; left: 10px; bottom: 10px; padding: 3px 9px; border-radius: 999px; font: 600 12px/1.4 var(--font); color: #fff; background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(8px); }
.card__paper {
  position: absolute; inset: 0; padding: 16px 18px; overflow: hidden;
  font-size: 13px; line-height: 1.5; color: var(--ink-2); white-space: pre-line;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  -webkit-mask-image: linear-gradient(#000 75%, transparent); mask-image: linear-gradient(#000 75%, transparent);
}
.card__paper mark.is-passage { background: rgba(10, 102, 216, 0.08); border-radius: 0; }
.card__body { display: block; padding: 12px 2px 0; }
.card__name { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__why { display: block; margin-top: 2px; font-size: 13px; color: var(--blue); }

/* ---- Sections ------------------------------------------------------------------------------------ */
.section { padding: clamp(88px, 11vw, 140px) 0; }
.section--soft { background: var(--soft); }

/* Features */
.bento { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: auto auto; gap: 20px; margin-top: clamp(40px, 6vw, 64px); }
.tile { display: flex; flex-direction: column; overflow: hidden; border-radius: 28px; background: var(--soft); }
.tile figcaption { padding: 24px 28px 28px; font-size: 17px; line-height: 1.45; color: var(--muted); }
.tile figcaption strong { color: var(--ink); font-weight: 600; }
.tile--photo { grid-row: span 2; }
/* The photo fills whatever height the tiles beside it give the row, rather than setting it. */
.tile--photo img { flex: 1 1 0; width: 100%; height: 0; min-height: 0; object-fit: cover; }
.tile__still { position: relative; }
.tile__still img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.tile__bar { position: absolute; left: 20px; right: 20px; bottom: 18px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.45); }
.tile__bar span { position: absolute; left: 33%; width: 34%; top: 0; bottom: 0; border-radius: 3px; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25); }
.tile__paper { display: grid; gap: 8px; margin: 28px 28px 0; padding: 26px 28px; border-radius: 16px; background: var(--white); font-size: 17px; line-height: 1.5; color: var(--ink-2); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
.tile__paper-title { font-weight: 600; color: var(--ink); }

/* The app */
.shot { position: relative; margin-top: clamp(40px, 6vw, 64px); border-radius: 20px; overflow: hidden; background: #f9f9f9; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 40px 80px -40px rgba(0, 0, 0, 0.35); }
.shot img { width: 100%; height: auto; }
.shot__play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  color: var(--ink); background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.4); transition: transform 0.15s ease;
}
.shot__play:hover { transform: scale(1.06); }
.shot__play svg { width: 26px; height: 26px; margin-left: 4px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: clamp(48px, 6vw, 72px); text-align: center; }
.facts strong { display: block; font-size: 17px; font-weight: 600; }
.facts span { display: block; margin-top: 4px; font-size: 15px; color: var(--muted); }

/* Download */
.download { text-align: center; }
.download__icon { width: 96px; height: 96px; margin: 0 auto 24px; }
.download .pill { margin-top: 32px; }
.download__meta { margin-top: 12px; font-size: 13px; color: var(--muted); }
.download__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin-top: 28px; font-size: 15px; }

/* Footer */
.foot { padding: 22px 0 30px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* Viewer */
.viewer {
  width: min(1100px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); padding: 0;
  color: var(--ink); background: var(--white); border: 0; border-radius: 20px;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.45);
}
.viewer[open] { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); }
.viewer::backdrop { background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(8px); }
.viewer__media { display: grid; place-items: center; align-content: center; gap: 12px; min-height: 320px; padding: 20px; background: var(--soft); }
.viewer__media img, .viewer__media video { max-height: calc(100vh - 140px); width: auto; max-width: 100%; border-radius: 10px; }
.viewer__media video { width: 100%; background: #000; }
.viewer__timeline { position: relative; width: 100%; height: 6px; border-radius: 3px; background: var(--line); }
.viewer__moment { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--blue); }
.viewer__head { position: absolute; top: -4px; width: 2px; height: 14px; margin-left: -1px; background: var(--ink); }
.viewer__paper mark.is-passage { background: rgba(10, 102, 216, 0.08); }
.viewer__paper { width: 100%; max-height: calc(100vh - 100px); overflow: auto; padding: 32px 36px; border-radius: 12px; background: var(--white); font-size: 16px; line-height: 1.6; white-space: pre-line; }
.viewer__info { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 28px; overflow: auto; }
.viewer__close, .tour__close {
  width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  font: 400 22px/1 var(--font); color: var(--ink-2); background: var(--soft);
}
.viewer__close { position: absolute; right: 18px; top: 18px; }
.viewer__name { margin-right: 44px; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.viewer__meta { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.viewer__why li { display: grid; gap: 2px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.viewer__why strong { color: var(--ink); font-weight: 600; }
.viewer__original { margin-top: auto; padding-top: 14px; font-size: 15px; }

.tour { width: min(1120px, calc(100vw - 32px)); max-width: none; padding: 0; border: 0; border-radius: 16px; overflow: visible; background: #000; }
.tour::backdrop { background: rgba(0, 0, 0, 0.75); }
.tour video { width: 100%; height: auto; border-radius: 16px; }
.tour form { position: absolute; right: 0; top: -44px; }
.tour__close { color: #fff; background: rgba(255, 255, 255, 0.18); }

/* 404 */
.missing { min-height: 100vh; display: grid; place-items: center; text-align: center; }
.missing .sub { margin-bottom: 32px; }

/* Credits */
.credits { padding: calc(64px + clamp(56px, 8vw, 96px)) 0 clamp(72px, 9vw, 120px); }
.credits__body { max-width: calc(760px + 2 * var(--gutter)); }
.credits section { margin-top: clamp(48px, 6vw, 64px); }
.credits h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.credits p, .credits ul { margin-top: 12px; color: var(--ink-2); }
.credits ul { padding-left: 1.2em; display: grid; gap: 8px; }
.credits table { width: 100%; margin-top: 20px; border-collapse: collapse; font-size: 14px; }
.credits th { padding: 0 12px 8px 0; text-align: left; font-weight: 600; color: var(--muted); }
.credits td { padding: 9px 12px 9px 0; border-top: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.credits td:first-child { font-family: var(--mono); font-size: 13px; white-space: nowrap; }

/* Narrow screens */
@media (max-width: 900px) {
  .peek { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .peek__item:nth-child(n + 7) { display: none; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile--photo { grid-row: auto; }
  .tile--photo img { flex: none; height: auto; aspect-ratio: 4 / 3; object-position: 50% 70%; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viewer[open] { grid-template-columns: minmax(0, 1fr); overflow: auto; }
  .viewer__media img, .viewer__media video { max-height: 55vh; }
}
@media (max-width: 600px) {
  .bar__links a:nth-child(2) { display: none; }
  .bar__links a { padding: 7px 10px; }
  .brand { margin-right: 6px; }
  .peek { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .peek__item:nth-child(n + 5) { display: none; }
  .results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .card__paper { padding: 12px; font-size: 12px; }
  .hints { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter); scrollbar-width: none; }
  .hints::-webkit-scrollbar { display: none; }
  .hint { flex: none; }
  .seek { height: 54px; padding: 0 16px; }
  .seek input { font-size: 17px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .tile figcaption { padding: 20px 22px 24px; }
  .tile__paper { margin: 22px 22px 0; padding: 20px; font-size: 16px; }
  .viewer__paper { padding: 20px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
}
