/* The beta's page (M11.7): one column, the ghost on its disc or the preview above a few words and
   a button or two. Colours and shapes from the Halo board the owner chose for the beta, a reference
   rather than a spec. Syne, the headings' face, is under the SIL Open Font License 1.1, served
   beside it at /fonts/syne-ofl.txt; everything else is in the browser's own faces. */

@font-face {
  font-family: 'Syne';
  src: url('/fonts/syne.ttf') format('truetype');
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --void: #0b0c0e;
  --ink: #141518;
  --ink-2: #1c1d21;
  --ink-3: #26272c;
  --hair: rgba(242, 241, 238, 0.14);
  --edge: #6e7178;
  --bone: #f2f1ee;
  --ash: #b4b6bc;
  --smoke: #8e9198;
  --ghost: #ff1414;
  --ghost-hover: #ff3a33;
  --ghost-down: #f01212;
  --rec-ink: #0b0607;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Syne', var(--body);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--ink); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  background: var(--ink);
  color: var(--bone);
  font: 400 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }

.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; mix-blend-mode: overlay; opacity: 0.55; }

.head {
  position: relative;
  height: 64px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
}
.home { display: flex; align-items: center; color: inherit; }
.logo { display: block; height: 22px; width: auto; }
.chip {
  flex: none;
  padding: 4px 7px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  color: var(--ash);
  font: 500 11px/12px var(--mono);
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.name {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 420px);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 600 15px/20px var(--body);
  color: var(--ash);
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 16px 48px;
}
.picture { width: min(400px, 100%); }
.halo { display: block; width: 100%; height: auto; aspect-ratio: 1; }
body.playing .picture { width: min(960px, 100%); }
.player { width: 100%; aspect-ratio: 16 / 9; }
.player video {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: var(--void);
  accent-color: var(--ghost);
}

.words {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.title {
  margin: 0;
  font: 800 40px/48px var(--display);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.title:empty { display: none; }
.note { margin: 0; min-height: 20px; font-size: 14px; line-height: 20px; color: var(--smoke); }
.row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.key, .quiet {
  height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  font: 600 16px/20px var(--body);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.key {
  padding: 0 22px;
  border: 0;
  background: var(--ghost);
  color: var(--rec-ink);
}
.key:hover { background: var(--ghost-hover); }
.key:active { background: var(--ghost-down); }
.key:disabled { opacity: 0.4; cursor: default; background: var(--ghost); }
.key svg, .quiet svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.quiet {
  padding: 0 18px;
  border: 1px solid var(--hair);
  background: transparent;
  color: var(--bone);
}
.quiet:hover { background: var(--ink-2); border-color: var(--smoke); }
.quiet:disabled { opacity: 0.4; cursor: default; }
.quiet .tick { display: none; color: var(--ghost); }
.quiet.has { border-color: var(--edge); }
.quiet.has .tick { display: block; }
.count { color: var(--ghost); font-variant-numeric: tabular-nums; }
.count:empty { display: none; }

.foot {
  flex: none;
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 16px 16px 24px;
  font-size: 13px;
  line-height: 20px;
}
.foot a, .link { color: var(--smoke); text-decoration: none; }
.foot a:hover, .link:hover { color: var(--bone); }
.link { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }

.sheet {
  width: min(560px, calc(100% - 32px));
  padding: 20px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: var(--ink-2);
  color: var(--bone);
}
.sheet::backdrop { background: rgba(11, 12, 14, 0.72); }
.sheet form { display: flex; flex-direction: column; gap: 14px; }
.sheet-title { font: 700 20px/24px var(--display); }
.sheet textarea {
  width: 100%;
  min-height: 280px;
  padding: 12px 14px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  background: var(--void);
  color: var(--bone);
  font: 400 15px/22px var(--body);
  resize: vertical;
}
.sheet textarea:focus { outline: none; border-color: var(--bone); }
.sheet .row { justify-content: flex-end; }

body.dragging .halo .disc-ring { stroke: var(--ghost); }

/* The ghost: its eyes blink, it hovers, and while it listens it wears headphones and nods. The
   rings drift. The red dots fill as a wait goes on. */
@keyframes blink { 0%, 97.2%, 100% { transform: scaleY(1); } 98.6% { transform: scaleY(0.08); } }
@keyframes hover { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4%); } }
@keyframes nod { 0%, 100% { transform: rotate(0deg) translateY(0); } 16% { transform: rotate(3deg) translateY(1.5%); } }
@keyframes drift { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
.eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.hover { transform-box: fill-box; transform-origin: center; animation: hover 4s ease-in-out infinite; }
.nod { transform-box: fill-box; transform-origin: 50% 100%; animation: nod 0.508s cubic-bezier(0.3, 0, 0.3, 1) infinite; }
.drift { transform-box: view-box; transform-origin: 50% 50%; animation: drift 14s ease-in-out infinite; }
.drift-b { animation-delay: -7s; }
.halo:not(.listening) .ghost-listening, .halo.listening .ghost-still { display: none; }
#done-arc { transition: stroke-dasharray 1.2s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .eye, .hover, .nod, .drift { animation: none !important; }
  #done-arc { transition: none; }
}

@media (max-width: 600px) {
  .head { flex-wrap: wrap; height: auto; padding: 14px 16px 0; row-gap: 10px; }
  .name { position: static; transform: none; max-width: 100%; width: 100%; text-align: center; }
  .main { padding: 8px 16px 32px; }
  .title { font-size: 30px; line-height: 36px; }
  .key, .quiet { height: 46px; }
}

/* The notices: the terms and the privacy notice. */
.notice .home { font: 700 18px/24px var(--display); color: var(--bone); text-decoration: none; }
.text { width: min(680px, 100%); margin: 0 auto; padding: 16px 16px 64px; }
.text h1 { margin: 16px 0 20px; font: 800 36px/44px var(--display); }
.text h2 { margin: 32px 0 10px; font: 700 20px/26px var(--display); }
.text p, .text li { color: var(--ash); font-size: 16px; line-height: 1.6; }
.text p { margin: 0 0 12px; }
.text ul { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 8px; }
.text a { color: var(--bone); }
