@import url("fonts.css");

/* DevFest İstanbul 2026 inspired: light poster grey, navy ink, sky-blue braces, outlined pills. */
:root {
  --bg: #f1f1ee;
  --surface: #ffffff;
  --ink: #14213d;
  --muted: #5b6475;
  --line: #14213d;
  --soft-line: #d9dbe2;
  --sky: #63c5f2;
  --sky-hover: #86d4f6;
  --sky-soft: #def2fc;
  --royal: #5179c1;
  --sea: #2b7bd6;
  --gold: #f2c14e;
  --red: #e30a17;
  --focus: #2257b5;
  --g-blue: #4285f4;
  --g-red: #ea4335;
  --g-yellow: #fbbc04;
  --g-green: #34a853;
  --radius: 22px;
  --pill: 999px;
  --shadow: 0 3px 0 var(--line);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: 16px;
  --sky-pad: 30px; /* sea below the skyline image; the search box overlaps it, not the ferry */
  --overlap: 40px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #061a3d;
    --surface: #0c2552;
    --ink: #eef3ff;
    --muted: #a9b6d3;
    --line: #8fb4ff;
    --soft-line: #1d3a6e;
    --sky-soft: #10335f;
    --shadow: 0 3px 0 #02102a;
    --focus: #63c5f2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #061a3d;
  --surface: #0c2552;
  --ink: #eef3ff;
  --muted: #a9b6d3;
  --line: #8fb4ff;
  --soft-line: #1d3a6e;
  --sky-soft: #10335f;
  --shadow: 0 3px 0 #02102a;
  --focus: #63c5f2;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--font);
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  touch-action: manipulation;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  max-width: 1080px;
  margin: 0 auto;
  font-size: 0.9rem;
  padding: max(14px, env(safe-area-inset-top)) max(var(--gutter), env(safe-area-inset-right)) 0
    max(var(--gutter), env(safe-area-inset-left));
}
.tag {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.6ch;
  min-width: 0;
  font-family: var(--mono);
  color: var(--muted);
}
.toggles {
  display: flex;
  gap: 8px;
  flex: none;
}
.mini {
  display: inline-flex;
  border: 2px solid var(--line);
  border-radius: var(--pill);
  overflow: hidden;
  background: var(--surface);
}
.mini button {
  border: 0;
  background: none;
  min-height: 34px;
  padding: 4px 12px;
  cursor: pointer;
  font-weight: 600;
}
/* docs and GitHub links: same pill as the toggles */
.mini a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 4px 12px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.mini a:hover {
  background: var(--sky);
  color: #14213d;
}
.mini a:focus-visible {
  outline-offset: -4px;
  border-radius: var(--pill);
}
.mini button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}
.mini button:focus-visible {
  outline-offset: -4px;
  border-radius: var(--pill);
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 28px 0 0;
  overflow: hidden;
}
.hero > p {
  padding: 0 var(--gutter);
}
.pix {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--sky);
  opacity: 0.55;
}
.pix.b {
  width: 8px;
  height: 8px;
  background: var(--sky-soft);
  opacity: 1;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: clamp(6px, 2vw, 18px);
  margin: 8px auto 0;
}
.brace {
  font-weight: 800;
  font-size: clamp(4rem, 14vw, 8.5rem);
  line-height: 0.8;
  color: var(--sky);
  -webkit-text-stroke: 3px var(--line);
  paint-order: stroke fill;
  transform: translateY(-0.04em);
}
.brand-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.brand h1 {
  margin: 0;
  font-size: clamp(3rem, 11vw, 6.6rem);
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.brand h1 span {
  color: var(--red);
  display: inline-block;
}
.city {
  border: 3px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  padding: 2px 34px;
  font-size: clamp(1.1rem, 3.4vw, 1.9rem);
  font-weight: 500;
}
.timeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px auto 6px;
}
.dots {
  display: flex;
}
.dots i {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--royal);
  border: 2px solid var(--line);
  margin-left: -8px;
}
.arrow {
  width: clamp(60px, 18vw, 200px);
  height: 2px;
  background: var(--line);
  position: relative;
  transform-origin: left;
}
.arrow::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -7px;
  width: 14px;
  height: 14px;
  border-top: 2px solid var(--line);
  border-right: 2px solid var(--line);
  transform: rotate(45deg);
}
.year {
  border: 2px solid var(--line);
  border-radius: var(--pill);
  background: var(--sky);
  color: #14213d;
  padding: 2px 18px;
  font-size: 1.4rem;
  font-weight: 500;
}
.subtitle {
  margin: 8px auto 0;
  max-width: 640px;
  color: var(--muted);
}
.event {
  margin: 4px 0 0;
  font-size: 0.95rem;
}
/* The scene is 480x110 and its middle 320 columns are the core picture. The height never goes below that core
   at full width, so narrow screens crop the sides (object-fit) and wide screens show more of them, up to 1470px. */
.skyline {
  display: block;
  width: min(100%, 1470px);
  height: min(100vw * 110 / 320, 337px);
  object-fit: cover;
  margin: 0 auto;
  image-rendering: pixelated;
}
/* the SVG's water is its bottom 18 of 110 rows; continue it edge to edge */
.sky {
  margin-top: 14px;
  padding-bottom: var(--sky-pad);
  background: linear-gradient(
    to top,
    var(--sea) calc(var(--sky-pad) + min(100vw, 980px) * 18 / 320 - 1px),
    transparent 0
  );
}

/* ---------- search ---------- */
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) max(56px, env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
}
.searchbox {
  position: relative;
  margin: calc(-1 * var(--overlap)) auto 0;
  max-width: 760px;
  z-index: 2;
}
.bar {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 6px;
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: var(--pill);
  box-shadow: var(--shadow);
}
.bar:focus-within {
  box-shadow:
    var(--shadow),
    0 0 0 5px color-mix(in srgb, var(--focus) 35%, transparent);
}
.bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding: 10px 16px;
  font-size: 1.05rem;
  -webkit-appearance: none;
  appearance: none;
  border-radius: var(--pill);
}
.bar input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}
.bar input::-webkit-search-cancel-button {
  cursor: pointer;
}
.bar input:focus {
  outline: none;
}
.bar button {
  border: 2px solid var(--line);
  border-radius: var(--pill);
  background: var(--sky);
  color: #14213d;
  min-height: 44px;
  padding: 0 22px;
  font-weight: 700;
  cursor: pointer;
  flex: none;
}
.bar button:disabled {
  opacity: 0.55;
  cursor: progress;
}
/* search by photo: a round camera button next to Search, the query photo in the status line, a drop overlay */
.bar .pic {
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  width: 44px;
  display: grid;
  place-items: center;
}
.bar .pic[hidden] {
  display: none;
}
.bar .pic:hover:not(:disabled) {
  background: var(--sky);
  color: #14213d;
}
/* the chosen photo, inside the bar, until removed */
.bar .chip {
  position: relative;
  flex: none;
  align-self: center;
  margin-left: 4px;
}
.bar .chip[hidden] {
  display: none;
}
.bar .chip img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid var(--line);
}
.bar .chip button {
  position: absolute;
  top: -8px;
  right: -8px;
  min-height: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border-width: 2px;
  font-size: 0.85rem;
  line-height: 1;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--ink);
}
.qthumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--line);
  vertical-align: middle;
  margin-right: 6px;
}
body.dropping::after {
  content: attr(data-drop);
  position: fixed;
  inset: 12px;
  z-index: 10;
  display: grid;
  place-items: center;
  border: 4px dashed var(--sky);
  border-radius: 28px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  pointer-events: none;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 14px;
  margin: 18px auto 0;
  font-size: 0.92rem;
  color: var(--muted);
}
.controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.tabs button {
  border: 2px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  min-height: 40px;
  padding: 6px 16px;
  cursor: pointer;
  font-weight: 600;
}
.tabs button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}
.tabs button[data-tab="all"] {
  border-style: dashed;
}
.tabs button[data-tab="all"][aria-pressed="true"] {
  border-style: solid;
}
.tabs button .n {
  font-family: var(--mono);
  font-size: 0.75em;
  opacity: 0.7;
  margin-left: 4px;
}
select {
  border: 2px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  min-height: 34px;
  padding: 3px 10px;
  cursor: pointer;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.chips button {
  border: 1.5px dashed var(--muted);
  border-radius: var(--pill);
  background: transparent;
  padding: 4px 14px;
  cursor: pointer;
  font-size: 0.9rem;
}
.chips button:hover,
.chips button:focus-visible {
  border-style: solid;
  border-color: var(--line);
  background: var(--sky-soft);
}

#status {
  min-height: 1.6em;
  margin: 26px 0 14px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}
#status b {
  color: var(--ink);
}
/* three poster dots while a search runs */
#status.busy::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 22px 1px 10px;
  vertical-align: middle;
  background: var(--royal);
  box-shadow:
    10px 0 var(--sky),
    20px 0 var(--gold);
}
.badge {
  display: inline-block;
  padding: 0 10px;
  border-radius: var(--pill);
  border: 1.5px solid var(--line);
  background: var(--gold);
  color: #14213d;
  font-weight: 600;
  font-size: 0.85em;
}
.progress {
  height: 8px;
  max-width: 360px;
  margin: 8px auto 0;
  border: 2px solid var(--line);
  border-radius: var(--pill);
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  transition: width 0.3s;
  background: repeating-linear-gradient(90deg, var(--sky) 0 8px, var(--royal) 8px 16px);
}

/* ---------- results ---------- */
.results {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card > img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  border-bottom: 2px solid var(--line);
  background: var(--sky-soft);
}
.card .body {
  padding: 14px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.card h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.25;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.78rem;
}
.meta span {
  border: 1.5px solid var(--soft-line);
  border-radius: var(--pill);
  padding: 0 8px;
  color: var(--muted);
}
.meta .lang {
  border-color: var(--line);
  color: var(--ink);
  font-family: var(--mono);
}
.meta .c-devfest {
  background: var(--gold);
  color: #14213d;
  border-color: var(--line);
}
.meta .c-devfest2025 {
  background: var(--surface);
  color: var(--ink);
  border: 2px dashed var(--gold);
}
.meta .c-gemma {
  background: var(--sky);
  color: #14213d;
  border-color: var(--line);
}
.card p {
  margin: 0;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
/* score on its own row, links below it: no awkward wrapping in narrow cards */
.foot {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  font-size: 0.8rem;
  color: var(--muted);
}
.foot .score {
  flex: 1 0 100%;
}
.score {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
}
.score i {
  flex: 0 0 90px;
  height: 8px;
  border: 1.5px solid var(--line);
  border-radius: 2px;
  background: var(--bg);
  overflow: hidden;
}
.score i::after {
  content: "";
  display: block;
  height: 100%;
  width: var(--w);
  background: var(--royal);
  transform-origin: left;
}
.foot a {
  position: relative;
  white-space: nowrap;
  text-decoration: none;
  border-bottom: 1.5px solid var(--sky);
}
.foot a:hover {
  color: var(--ink);
  border-bottom-color: var(--royal);
}
.foot a::after {
  content: "";
  position: absolute;
  inset: -12px -6px;
} /* bigger tap target, same layout */

/* a grid (not CSS columns) so ranks read left to right */
.strip {
  font-size: 1rem;
  margin: 22px 0 10px;
}
.photos {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}
.photo {
  margin: 0;
  border: 2px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  min-width: 0;
}
.photo > a {
  display: block;
  overflow: hidden;
  border-bottom: 2px solid var(--line);
  background: var(--sky-soft);
}
.photo img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.photo figcaption {
  padding: 8px 12px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.photo figcaption b {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.3;
}
.photo figcaption .score {
  font-size: 0.8em;
  color: var(--muted);
}
.photo small {
  display: block;
  padding: 0 12px 8px;
  color: var(--muted);
  font-size: 0.7rem;
  overflow-wrap: anywhere;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 30px 0;
}

/* placeholder cards while the first search runs (shown after a beat, so fast searches never flash) */
.skeleton .card {
  min-height: 280px;
  box-shadow: none;
  border-color: var(--soft-line);
}
.skeleton i {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--sky-soft);
}
.skeleton b {
  display: block;
  height: 12px;
  margin: 14px 18px 0;
  border-radius: 6px;
  background: var(--soft-line);
}
.skeleton b:first-of-type {
  width: 55%;
  height: 18px;
  margin-top: 18px;
}
.skeleton b:last-of-type {
  width: 70%;
}
#out.busy > :not(.skeleton) {
  opacity: 0.45;
  transition: opacity 0.2s 0.12s;
}

/* ---------- footer ---------- */
footer {
  margin-top: 48px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
footer .g {
  display: inline-flex;
  gap: 4px;
  vertical-align: middle;
  margin-right: 6px;
}
footer .g i {
  width: 8px;
  height: 8px;
  display: block;
}
footer p {
  margin: 6px 0;
}

/* ---------- touch: 44px targets ---------- */
@media (pointer: coarse), (max-width: 560px) {
  .mini button,
  .mini a {
    min-height: 44px;
    min-width: 44px;
    padding: 0 12px;
    justify-content: center;
  }
  .tabs button,
  .chips button,
  select {
    min-height: 44px;
  }
}

/* ---------- tablets ---------- */
@media (max-width: 860px) {
  .results {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  }
}

/* ---------- phones ---------- */
@media (max-width: 560px) {
  :root {
    --overlap: 26px;
    --radius: 18px;
  }
  body {
    font-size: 16px;
  }
  .topbar {
    font-size: 0.78rem;
    align-items: flex-start;
  }
  .tag {
    flex-direction: column;
    line-height: 1.35;
    padding-top: 4px;
  }
  .tag .sep {
    display: none;
  }
  .toggles {
    gap: 6px;
  }
  .mini a .label {
    display: none; /* icon only on phones, the link keeps its title */
  }
}
/* small phones: three pill groups fill the row, so the decorative #dfist26 tag steps aside */
@media (max-width: 430px) {
  .topbar .tag {
    display: none;
  }
  .topbar {
    justify-content: center;
  }
  .hero {
    padding-top: 20px;
  }
  .brace {
    -webkit-text-stroke-width: 2px;
  }
  .city {
    border-width: 2px;
    padding: 0 22px;
  }
  .dots i {
    width: 24px;
    height: 24px;
  }
  .timeline {
    margin-top: 14px;
  }
  .year {
    font-size: 1.2rem;
    padding: 0 14px;
  }
  .subtitle {
    font-size: 0.95rem;
    line-height: 1.5;
  }
  .event {
    font-size: 0.85rem;
  }
  .bar {
    padding: 4px;
  }
  .bar input {
    padding: 8px 12px;
    font-size: 1rem;
  } /* 16px+ so iOS does not zoom on focus */
  .bar button {
    padding: 0 16px;
  }
  .tabs {
    gap: 6px;
    margin-top: 16px;
  }
  .tabs button {
    padding: 4px 12px;
    font-size: 0.95rem;
  }
  /* example queries: one swipeable row instead of a tall stack */
  .chips {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    margin: 14px calc(-1 * var(--gutter)) 0;
    padding: 2px var(--gutter) 6px;
    scroll-padding-inline: var(--gutter);
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 var(--gutter), #000 calc(100% - 28px), transparent);
  }
  .chips::-webkit-scrollbar {
    display: none;
  }
  .chips button {
    flex: none;
    white-space: nowrap;
    scroll-snap-align: start;
  }
  #status {
    margin: 18px 0 12px;
  }
  .results {
    gap: 14px;
  }
  .card > img {
    aspect-ratio: 16 / 9;
  }
  .card .body {
    padding: 12px 14px 14px;
  }
  .card h2 {
    font-size: 1.08rem;
  }
  .photos {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .photo {
    border-radius: 14px;
  }
  .photo figcaption {
    flex-direction: column;
    gap: 0;
    padding: 6px 10px 2px;
    font-size: 0.8rem;
  }
  .photo small {
    padding: 0 10px 8px;
    font-size: 0.64rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  footer {
    margin-top: 36px;
  }
}
@media (max-width: 370px) {
  .city {
    padding: 0 16px;
  }
  .bar button {
    padding: 0 12px;
  }
}

/* ---------- motion: light, on brand, and only when wanted ---------- */
/* "I am here": while the search box is empty and not focused, a soft ring ripples out of it and the button
   hops, every few seconds. Typing, focusing or reduced motion stops it. While typing, every letter sends a
   small quick ring instead (app.js swaps .key-a / .key-b to restart it). */
@media (prefers-reduced-motion: no-preference) {
  .bar::before,
  .bar::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    pointer-events: none;
  }
  .bar.key-a::before {
    animation: key-a 0.45s ease-out;
  }
  .bar.key-b::before {
    animation: key-b 0.45s ease-out;
  }
  .bar.key-a button {
    animation: tap-a 0.3s var(--ease);
  }
  .bar.key-b button {
    animation: tap-b 0.3s var(--ease);
  }
  @keyframes key-a {
    from {
      box-shadow: 0 0 0 0 color-mix(in srgb, var(--sky) 75%, transparent);
    }
    to {
      box-shadow: 0 0 0 12px color-mix(in srgb, var(--sky) 0%, transparent);
    }
  }
  @keyframes key-b {
    from {
      box-shadow: 0 0 0 0 color-mix(in srgb, var(--sky) 75%, transparent);
    }
    to {
      box-shadow: 0 0 0 12px color-mix(in srgb, var(--sky) 0%, transparent);
    }
  }
  @keyframes tap-a {
    40% {
      transform: scale(1.06);
    }
  }
  @keyframes tap-b {
    40% {
      transform: scale(1.06);
    }
  }
  .bar:not(:focus-within):has(input:placeholder-shown)::after {
    animation: here 3.6s ease-out 1.2s infinite;
  }
  .bar:not(:focus-within):has(input:placeholder-shown) button {
    animation: hop 3.6s ease-in-out 1.2s infinite;
  }
  @keyframes here {
    0% {
      box-shadow: 0 0 0 0 color-mix(in srgb, var(--sky) 80%, transparent);
    }
    55%,
    100% {
      box-shadow: 0 0 0 18px color-mix(in srgb, var(--sky) 0%, transparent);
    }
  }
  @keyframes hop {
    0%,
    14%,
    100% {
      transform: none;
    }
    5% {
      transform: translateY(-4px);
    }
    10% {
      transform: translateY(1px);
    }
  }
}

@media (prefers-reduced-motion: no-preference) {
  .mini button,
  .tabs button,
  .chips button,
  .bar button,
  select,
  .card,
  .photo,
  .foot a {
    transition:
      background-color 0.2s,
      color 0.2s,
      border-color 0.2s,
      box-shadow 0.2s var(--ease),
      transform 0.2s var(--ease);
  }
  .card > img,
  .photo img {
    transition: transform 0.5s var(--ease);
  }
  .bar {
    transition: box-shadow 0.2s;
  }

  @media (hover: hover) {
    .tabs button:hover,
    .bar button:hover:not(:disabled) {
      transform: translateY(-2px);
      box-shadow: 0 3px 0 var(--line);
    }
    .bar button:hover:not(:disabled) {
      background: var(--sky-hover);
    }
    .tabs button:not([aria-pressed="true"]):hover {
      background: var(--sky-soft);
    }
    .chips button:hover {
      transform: translateY(-1px);
    }
    .card:hover,
    .photo:hover {
      transform: translateY(-3px);
      box-shadow: 0 6px 0 var(--line);
    }
    .card:hover > img,
    .photo:hover img {
      transform: scale(1.03);
    }
  }
  .tabs button:active,
  .bar button:active:not(:disabled),
  .chips button:active,
  .mini button:active {
    transform: translateY(1px);
    box-shadow: none;
    transition-duration: 0.05s;
  }

  /* hero: plays once on load */
  .brand-mid {
    animation: rise 0.6s var(--ease) both;
  }
  .brace:first-child {
    animation: brace-l 0.7s var(--ease) 0.05s both;
  }
  .brace:last-child {
    animation: brace-r 0.7s var(--ease) 0.05s both;
  }
  .brand h1 span {
    animation: nod 1.2s var(--ease) 0.7s both;
    transform-origin: 50% 90%;
  }
  .dots i {
    animation: pop 0.4s var(--ease) both;
  }
  .dots i:nth-child(1) {
    animation-delay: 0.25s;
  }
  .dots i:nth-child(2) {
    animation-delay: 0.32s;
  }
  .dots i:nth-child(3) {
    animation-delay: 0.39s;
  }
  .arrow {
    animation: draw 0.6s var(--ease) 0.45s both;
  }
  .year {
    animation: pop 0.45s var(--ease) 0.95s both;
  }
  .pix {
    animation: twinkle 5s steps(1) infinite;
  }
  .pix:nth-of-type(2n) {
    animation-duration: 7s;
    animation-delay: -2s;
  }
  .pix:nth-of-type(3n) {
    animation-duration: 6s;
    animation-delay: -4s;
  }

  /* results: fade up with a small stagger, then the score bars fill */
  .card,
  .photo {
    animation: rise 0.45s var(--ease) backwards;
    animation-delay: calc(var(--i, 0) * 55ms);
  }
  .score i::after {
    animation: grow 0.8s var(--ease) backwards;
    animation-delay: calc(var(--i, 0) * 55ms + 0.2s);
  }
  .skeleton .card {
    animation:
      fade 0.2s 0.15s backwards,
      pulse 1.1s ease-in-out 0.35s infinite alternate;
  }
  #status.busy::after {
    animation: dots 1.2s steps(1) infinite;
  }
  .progress i {
    animation: stripes 0.8s linear infinite;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}
@keyframes draw {
  from {
    transform: scaleX(0);
  }
}
@keyframes grow {
  from {
    transform: scaleX(0);
  }
}
@keyframes brace-l {
  from {
    opacity: 0;
    transform: translate(18px, -0.04em);
  }
}
@keyframes brace-r {
  from {
    opacity: 0;
    transform: translate(-18px, -0.04em);
  }
}
@keyframes nod {
  0%,
  100% {
    transform: none;
  }
  30% {
    transform: rotate(-12deg);
  }
  60% {
    transform: rotate(6deg);
  }
}
@keyframes twinkle {
  50% {
    opacity: 0.15;
  }
}
@keyframes pulse {
  to {
    opacity: 0.45;
  }
}
@keyframes stripes {
  to {
    background-position: 16px 0;
  }
}
@keyframes dots {
  33% {
    box-shadow:
      10px 0 var(--royal),
      20px 0 var(--sky);
    background: var(--gold);
  }
  66% {
    box-shadow:
      10px 0 var(--gold),
      20px 0 var(--royal);
    background: var(--sky);
  }
}
