/* flymethat page. The look approved on 25 November: black, fuchsia, the fly. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("fonts/instrument-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --ground: #0a0a0a;
  --panel: #1b181f;
  --panel-2: #141217;
  --line: #4a4352;
  --text: #fafafa;
  --muted: #b9b2c2;
  --accent: #c026d3;
  --accent-bright: #d946ef;
  --accent-soft: #f0abfc;
  --ok: #22c55e;
  --ok-text: #86efac;
  --bad: #f04452;
  --bad-text: #fda4af;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ground); color: var(--text); }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
[hidden] { display: none !important; }
a { color: var(--accent-soft); }
a:hover { color: #fff; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 3px; }

/* Header */
.top {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
}
.brand { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--text); }
.brand img { width: 44px; height: 44px; }
.brand span { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.035em; }
.who { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; color: var(--muted); }
.who strong { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

main {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.column { width: 100%; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 20px; }

h1, h2 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
  text-align: center;
  text-wrap: balance;
}
h1 { font-size: clamp(30px, 4.4vw, 46px); }
h2 { font-size: clamp(22px, 3vw, 30px); }
p { margin: 0; }
.lead { color: var(--muted); text-align: center; max-width: 58ch; text-wrap: pretty; }
.small { color: var(--muted); font-size: 14px; }

/* Buttons */
.btn {
  min-height: 52px;
  padding: 0 26px;
  border-radius: 14px;
  border: 0;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn:hover { background: #a21caf; color: #fff; }
.btn.quiet { background: transparent; border: 2px solid var(--line); color: var(--text); }
.btn.quiet:hover { border-color: var(--accent-bright); }
.btn.small { min-height: 44px; padding: 0 18px; font-size: 15px; border-radius: 12px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; align-items: center; }

/* The flight: you, them, and the fly between */
.stage { position: relative; height: 300px; width: 100%; }
.stage svg.path { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage .trail-base { fill: none; stroke: var(--line); stroke-width: 3; stroke-dasharray: 2 12; stroke-linecap: round; }
.stage .trail { fill: none; stroke: var(--accent-bright); stroke-width: 4; stroke-linecap: round; transition: stroke-dasharray 0.2s linear; }
.spot {
  position: absolute;
  top: 178px;
  width: clamp(96px, 15vw, 160px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid var(--line);
  background: var(--panel);
}
.spot.home { left: 15%; }
.spot.away { left: 85%; border-style: dashed; background: transparent; }
.spot.away.linked { border-color: var(--accent-bright); background: var(--panel); }
.spot-label { position: absolute; top: 270px; transform: translateX(-50%); white-space: nowrap; font-weight: 600; }
.spot-label.home { left: 15%; }
.spot-label.away { left: 85%; }
.fly {
  position: absolute;
  width: clamp(96px, 15vw, 160px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  left: 15%;
  top: 178px;
}
.fly img { width: 100%; height: 100%; display: block; }
.fly.buzzing { animation: buzz 0.28s linear infinite; }
@keyframes buzz {
  0%, 100% { transform: translate(-50%, -50%) rotate(-2deg); }
  50% { transform: translate(-50%, -54%) rotate(2deg); }
}
@keyframes land { 0% { transform: scale(0.6); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Forms */
.ask { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; max-width: 560px; }
.field {
  flex: 1 1 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel);
  border-radius: 14px;
  padding: 0 18px;
  min-height: 56px;
}
.field span { color: var(--muted); }
.field input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  font-size: 19px;
  font-weight: 600;
  outline: none;
  min-height: 52px;
}
.field:focus-within { outline: 3px solid var(--accent-soft); outline-offset: 3px; }

/* Cards and lists */
.card {
  width: 100%;
  background: var(--panel-2);
  border-radius: 22px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card h3 { margin: 0; font-size: 18px; font-weight: 600; }
.card.alert { background: #2a1015; border: 1px solid var(--bad); margin-bottom: 16px; }
.card.alert h3 { color: var(--bad-text); }
.list { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 10px; }
.knock {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: space-between;
  background: var(--panel);
  border-radius: 16px;
  padding: 14px 18px;
}
.knock .what { display: flex; flex-direction: column; min-width: 0; }
.knock .what strong { font-variant-numeric: tabular-nums; }
.knock .what span { color: var(--muted); font-size: 14px; }

/* The four words, and the safety number */
.code {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.02em;
  text-align: center;
  background: var(--panel);
  border-radius: 22px;
  padding: 18px 30px;
}
.number {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 22px;
  font-size: clamp(18px, 2.4vw, 24px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  background: var(--panel);
  border-radius: 18px;
  padding: 16px 22px;
}

/* Drop zone */
.drop {
  width: 100%;
  border-radius: 32px;
  border: 3px dashed var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 34px 28px;
  text-align: center;
}
.drop.compact { flex-direction: row; flex-wrap: wrap; justify-content: space-between; padding: 14px 22px; }
.drop.compact h2 { font-size: 24px; }
.drop.over { border-color: var(--accent-bright); background: #2a1030; }
.uploading { width: 100%; color: var(--muted); text-align: center; }

/* Items and receipts */
.item { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; padding: 8px 0; }
.item .mark { display: flex; gap: 10px; align-items: center; min-width: 138px; }
.receipt { width: 88px; height: 88px; border-radius: 50%; background: #f7f7f7; display: block; animation: land 0.45s ease-out; }
.receipt img { width: 88px; height: 88px; display: block; }
.pct {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 3px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.item .text { flex: 1 1 220px; min-width: 0; }
.item .name { font-weight: 600; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .state { color: var(--muted); }
.item .state.ok { color: var(--ok-text); }
.item .state.bad { color: var(--bad-text); }
.dir { font-size: 13px; color: var(--muted); text-transform: none; }

/* Offers from the other side */
.offer {
  width: 100%;
  background: var(--panel);
  border: 2px solid var(--accent-bright);
  border-radius: 22px;
  padding: 18px 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
  justify-content: space-between;
}

/* Pairing */
.qr { background: #fafafa; border-radius: 18px; padding: 14px; width: 268px; height: 268px; }
.qr img { width: 240px; height: 240px; display: block; }

/* Messages */
.notice {
  width: 100%;
  border-radius: 14px;
  padding: 12px 18px;
  background: var(--panel);
  color: var(--text);
}
.notice.bad { background: #2a1015; color: var(--bad-text); }
.notices { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; max-width: min(440px, calc(100vw - 36px)); z-index: 5; }
.notices .notice { box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5); }

/* Settings */
dialog {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  width: min(520px, calc(100vw - 32px));
}
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
dialog h2 { text-align: left; font-size: 26px; margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 18px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

footer { padding: 18px 28px 26px; color: var(--muted); font-size: 14px; text-align: center; }

@media (max-width: 640px) {
  .top { padding: 14px 18px; }
  main { padding: 0 16px 32px; }
  .stage { height: 230px; }
  /* 178 of 300 in the arc's own drawing, at this height */
  .spot { top: 136px; }
  .fly { top: 136px; }
  .spot-label { top: 205px; }
  .ask .btn { flex: 1 1 100%; }
  .number { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
