/* The Spectrum — demo inbox: sending a demo (index.html) and the artist's own demo page (status.html).
   One question at a time, like a conversation: Enter (or OK) goes on. The same look as the site:
   black, chrome and blue, with the question's subject written huge and faint far behind. */

@font-face {
  font-family: "Herokid Expanded";
  src: url("../fonts/Herokid-Expanded-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Herokid Expanded";
  src: url("../fonts/Herokid-Expanded-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ice: #9ad1ff;
  --sky: #48b4ff;
  --blue: #2a6cff;
  --deep: #1a3dff;
  --mute: #8d97a8;
  --error: #ff8f8f;
  --ease: cubic-bezier(.2, .78, .18, 1);
  --font-display: "Herokid Expanded", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-text: Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: #000; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  background: #000; color: #fff;
  font-family: var(--font-text); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- background: blue light, a faint dot grid, and a huge faint word ---------- */

.bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(55% 45% at 18% 8%, rgba(42, 108, 255, .3), transparent 70%),
    radial-gradient(50% 45% at 88% 92%, rgba(63, 208, 255, .18), transparent 70%),
    #000;
}
.bg::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1.6px) 0 0 / 26px 26px;
  -webkit-mask: radial-gradient(70% 60% at 50% 50%, #000 20%, transparent 100%);
          mask: radial-gradient(70% 60% at 50% 50%, #000 20%, transparent 100%);
  opacity: .5;
}
.bg-word {
  position: absolute; left: 50%; top: 14%;
  width: 120vw; translate: -50% 0;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(3.4rem, 14vw, 11rem); line-height: .92; letter-spacing: -.04em;
  text-align: center; text-transform: lowercase;
  color: rgba(255, 255, 255, .045);
  filter: blur(1.5px);
  transition: opacity .5s ease;
}

/* ---------- top: the logo, and a bar per question ---------- */

.top {
  position: fixed; z-index: 3; left: 0; right: 0; top: 0;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 5% 14px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .75), rgba(0, 0, 0, 0));
}
.top-logo img { display: block; width: 112px; height: auto; }
.top-back { justify-self: end; color: var(--mute); font-size: .82rem; text-decoration: none; }
.top-back:hover { color: #fff; }
.progress { display: flex; gap: 6px; max-width: 560px; width: 100%; justify-self: center; list-style: none; margin: 0; padding: 0; }
.progress li { flex: 1; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .16); transition: background-color .4s ease, box-shadow .4s ease; }
.progress li.is-done { background: rgba(72, 180, 255, .55); }
.progress li.is-now { background: linear-gradient(90deg, var(--blue), var(--sky)); box-shadow: 0 0 12px rgba(72, 180, 255, .7); }

/* ---------- a question ---------- */

main { position: relative; z-index: 1; }
.flow {
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  padding: calc(96px + env(safe-area-inset-top, 0px)) 6% calc(90px + env(safe-area-inset-bottom, 0px));
}
.step { width: min(100%, 580px); }
.step:not(.is-on) { display: none; }
.step.is-on { animation: step-in .55s var(--ease) both; }
.step.is-on.from-above { animation-name: step-in-above; }
@keyframes step-in { from { opacity: 0; translate: 0 40px; } }
@keyframes step-in-above { from { opacity: 0; translate: 0 -40px; } }

.q {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.55rem, 5.6vw, 2.3rem); line-height: 1.1; letter-spacing: -.02em;
  text-align: center;
  text-shadow: 0 0 26px rgba(255, 255, 255, .25), 0 0 60px rgba(72, 180, 255, .35);
}
.q-sub { margin-top: 10px; color: var(--mute); font-size: .92rem; text-align: center; }
.q-optional { color: var(--mute); font-family: var(--font-text); font-weight: 400; font-size: .9rem; letter-spacing: 0; }
.fields { display: grid; gap: 12px; margin-top: 26px; }
.fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fields-row.wide-first { grid-template-columns: 1fr 1.4fr; }
.field-label { display: block; margin: 0 0 6px 4px; color: var(--mute); font-size: .78rem; }

.input {
  width: 100%;
  padding: 16px 18px;
  border: 1.5px solid rgba(72, 180, 255, .45); border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  color: #fff; font: inherit; font-size: 1.05rem;
  transition: border-color .2s ease, box-shadow .25s ease, background-color .2s ease;
}
.input::placeholder { color: rgba(255, 255, 255, .38); }
.input:focus { outline: none; border-color: var(--sky); background: rgba(72, 180, 255, .06); box-shadow: 0 0 0 4px rgba(72, 180, 255, .16), 0 0 40px -12px var(--sky); }
.input.is-wrong { border-color: var(--error); }
textarea.input { min-height: 140px; resize: vertical; line-height: 1.5; }
input[type="date"].input { color-scheme: dark; }

/* choices: big rows with a letter you can press */
.choices { display: grid; gap: 10px; margin-top: 26px; }
.choices.two { grid-template-columns: 1fr 1fr; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px;
  border: 1.5px solid rgba(72, 180, 255, .35); border-radius: 14px;
  background: rgba(72, 180, 255, .05);
  font-size: 1rem;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.choice kbd {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 7px;
  border: 1px solid rgba(72, 180, 255, .5);
  color: var(--ice); font: 600 .75rem/1 var(--font-text);
}
.choice span::after { content: "✓"; margin-left: auto; color: var(--sky); font-weight: 700; opacity: 0; transition: opacity .2s ease; }
.choice:hover span { border-color: rgba(72, 180, 255, .7); background: rgba(72, 180, 255, .1); }
.choice input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }
.choice input:checked + span { border-color: var(--sky); background: rgba(72, 180, 255, .18); box-shadow: 0 0 30px -12px var(--sky); }
.choice input:checked + span kbd { background: var(--sky); border-color: var(--sky); color: #001; }
.choice input:checked + span::after { opacity: 1; }

/* a box to tick */
.tick { display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; cursor: pointer; }
.tick:first-child { margin-top: 26px; }
.tick input { position: absolute; opacity: 0; pointer-events: none; }
.tick-box {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; margin-top: 1px; border-radius: 8px;
  border: 1.5px solid rgba(72, 180, 255, .55); background: rgba(72, 180, 255, .05);
  transition: background-color .2s ease, border-color .2s ease;
}
.tick-box::after { content: "✓"; color: #001; font-weight: 800; font-size: .85rem; opacity: 0; }
.tick input:checked + .tick-box { background: var(--sky); border-color: var(--sky); }
.tick input:checked + .tick-box::after { opacity: 1; }
.tick input:focus-visible + .tick-box { outline: 2px solid #fff; outline-offset: 2px; }
.tick-text { color: #d6dce6; font-size: .95rem; }

/* picking a picture */
.drop {
  display: grid; justify-items: center; gap: 6px;
  padding: 26px 18px;
  border: 1.5px dashed rgba(72, 180, 255, .5); border-radius: 16px;
  background: rgba(72, 180, 255, .04);
  text-align: center; cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.drop:hover, .drop.is-over { border-color: var(--sky); background: rgba(72, 180, 255, .1); }
.drop input { position: absolute; opacity: 0; pointer-events: none; width: 1px; }
.drop:focus-within { outline: 2px solid #fff; outline-offset: 3px; }
.drop [data-drop-face] { display: grid; justify-items: center; gap: 6px; }
.drop b { font-family: var(--font-display); font-size: .95rem; }
.drop small { color: var(--mute); font-size: .78rem; }
.drop img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; box-shadow: 0 12px 30px -10px #000; }

.error { min-height: 1.4em; margin-top: 10px; color: var(--error); font-size: .88rem; }

/* OK, and how to go on with the keyboard */
.go { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.ok {
  display: inline-flex; align-items: center; gap: 10px;
  height: 54px; padding: 0 30px;
  border: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  color: #fff; font: 700 1rem/1 var(--font-display);
  box-shadow: 0 12px 34px -12px var(--blue), inset 0 1px 0 rgba(255, 255, 255, .35);
  cursor: pointer;
  transition: scale .3s var(--ease), box-shadow .3s ease, opacity .2s ease;
}
.ok:hover { scale: 1.04; box-shadow: 0 14px 40px -10px var(--sky), inset 0 1px 0 rgba(255, 255, 255, .4); }
.ok:disabled { opacity: .6; cursor: wait; scale: 1; }
.ok i { font-style: normal; transition: translate .3s var(--ease); }
.ok:hover i { translate: 4px 0; }
.hint { color: var(--mute); font-size: .82rem; }
.hint kbd { margin-left: 4px; padding: 2px 7px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, .22); font: .72rem/1.4 ui-monospace, Consolas, monospace; color: #cfd6e2; }

/* the arrows, bottom right: back and on */
.arrows { position: fixed; z-index: 3; right: 5%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 2px; }
.arrows button {
  width: 44px; height: 40px; border: 0;
  background: rgba(72, 180, 255, .16); color: #fff; font-size: 1.05rem; cursor: pointer;
  transition: background-color .2s ease;
}
.arrows button:first-child { border-radius: 10px 0 0 10px; }
.arrows button:last-child { border-radius: 0 10px 10px 0; }
.arrows button:hover:not(:disabled) { background: rgba(72, 180, 255, .35); }
.arrows button:disabled { opacity: .35; cursor: default; }

/* the bots' field: off screen, nobody sees it */
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- after sending ---------- */

.done { width: min(100%, 560px); text-align: center; animation: step-in .6s var(--ease) both; }
.done-mark {
  display: grid; place-items: center;
  width: 84px; height: 84px; margin: 0 auto 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 0 0 10px rgba(72, 180, 255, .1), 0 20px 60px -14px var(--sky);
  font-size: 2.2rem; font-weight: 800;
}
.done .q-sub { font-size: 1rem; line-height: 1.6; }
.done .ok { margin-top: 22px; text-decoration: none; }
/* the link to their demo's page: to copy, and to open */
.done-save { margin-top: 26px; color: #dbe3ee; font-size: .92rem; }
.done-save b { color: var(--ice); }
.done-url { display: flex; gap: 8px; margin-top: 12px; }
.done-url .input { flex: 1; min-width: 0; padding: 13px 15px; font-size: .85rem; color: var(--ice); text-overflow: ellipsis; }
.copy {
  flex: none; padding: 0 18px;
  border: 1.5px solid rgba(72, 180, 255, .45); border-radius: 14px;
  background: rgba(72, 180, 255, .1); color: #fff;
  font: 600 .88rem/1 var(--font-text); cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}
.copy:hover { background: rgba(72, 180, 255, .22); border-color: var(--sky); }
.done-back { display: block; width: max-content; margin: 22px auto 0; color: var(--mute); font-size: .88rem; }
.done-back:hover { color: #fff; }

/* ---------- the artist's demo page ---------- */

.card {
  width: min(100%, 640px);
  padding: 30px 26px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02) 50%), rgba(10, 14, 26, .6);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 80px -30px #000, 0 30px 90px -40px var(--blue);
  animation: step-in .6s var(--ease) both;
}
.card-eyebrow { color: var(--sky); font: .7rem/1 ui-monospace, Consolas, monospace; letter-spacing: .2em; text-transform: uppercase; }
.card-title { margin-top: 12px; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 6vw, 2.6rem); line-height: 1.05; letter-spacing: -.03em; text-transform: lowercase; }
.card-track { margin-top: 10px; color: #c6cedb; }
.card-track a { color: var(--ice); }

.timeline { display: grid; gap: 0; margin: 28px 0 6px; list-style: none; padding: 0; }
.timeline li { position: relative; display: grid; grid-template-columns: 26px 1fr; gap: 14px; padding-bottom: 18px; color: var(--mute); }
.timeline li::before {
  content: ""; grid-row: 1 / 3; width: 14px; height: 14px; margin: 4px 6px;
  border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25);
}
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 22px; bottom: 0; width: 2px; background: rgba(255, 255, 255, .12); }
.timeline b { color: inherit; font-weight: 600; }
.timeline small { display: block; font-size: .8rem; }
.timeline li.is-done { color: #fff; }
.timeline li.is-done::before { background: var(--sky); border-color: var(--sky); box-shadow: 0 0 12px rgba(72, 180, 255, .8); }
.timeline li.is-done:not(:last-child)::after { background: rgba(72, 180, 255, .5); }
.timeline li.is-no::before { background: #5b6476; border-color: #5b6476; box-shadow: none; }

.note { margin-top: 10px; padding: 16px 18px; border-radius: 16px; background: rgba(72, 180, 255, .08); box-shadow: inset 0 0 0 1px rgba(72, 180, 255, .25); }
.note p { white-space: pre-line; color: #dbe3ee; }
.note small { display: block; margin-bottom: 6px; color: var(--sky); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; }
.card-text { margin-top: 18px; color: #c6cedb; line-height: 1.6; }
.card .ok { margin-top: 22px; text-decoration: none; }
.summary { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin-top: 18px; font-size: .92rem; }
.summary dt { color: var(--mute); }
.summary dd { margin: 0; }

@media (min-width: 900px) {
  .top { padding: 20px 4% 16px; }
  .top-logo img { width: 128px; }
  .card { padding: 40px 42px; }
}
@media (max-width: 560px) {
  .top { grid-template-columns: auto 1fr; }
  .top-back { display: none; }
  .top-back.is-mine { display: block; color: var(--ice); } /* the way back to their demo's page stays */
  .top { grid-template-columns: auto 1fr auto; }
  .fields-row, .fields-row.wide-first { grid-template-columns: 1fr; }
  .hint { display: none; } /* phones have no Enter key to speak of */
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .001s !important; }
}
