/* chatr's front page. It is loaded after chatr.css and takes its palette and
   its base rules from there; every rule here hangs off a class, so none of
   it reaches an admin page and an element rule there never outranks it. */
@font-face {
  font-family: "Archivo";
  src: url("/static/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

.site {
  --gutter: clamp(20px, 5vw, 56px);
  --key: #242424;
  font: 17px/1.55 "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

.top, .front, .foot { max-width: 1200px; margin: 0 auto; padding-inline: var(--gutter); }

.top { display: flex; align-items: center; justify-content: space-between; padding-block: 22px; }
.top a { color: var(--text); text-decoration: none; font-weight: 500; }
.top a:hover { color: var(--strong); }
.top .mark { display: flex; align-items: center; gap: 8px; color: var(--strong); font-size: 21px; font-weight: 700; font-stretch: 125%; }

.waves { width: 28px; height: 16px; flex: none; }
.waves circle { fill: var(--accent); }
.waves path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; }

.front { padding-block: 0 40px; }

.hero { display: grid; gap: 40px; align-items: center; padding-block: clamp(32px, 7vh, 88px) clamp(40px, 8vh, 96px); }
.hero h1 {
  margin: 0 0 28px;
  font-size: clamp(2.5rem, 6.4vw, 4.75rem);
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.96;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.whole { white-space: nowrap; }
.say { margin: 0; max-width: 32ch; font-size: 1.3rem; line-height: 1.4; }

.deck { justify-self: center; width: min(100%, 400px); text-align: center; }
.key { position: relative; display: grid; place-items: center; aspect-ratio: 1; }
.air { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.air path { fill: none; stroke: var(--line); stroke-width: 6; stroke-linecap: round; }

/* The app's circle (PTTCircle.swift): its greys, its ring and its 0.96 under
   a thumb. A press that becomes a scroll is let go by the browser, which is
   the price of a page that still scrolls from under the circle. */
.ptt {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  width: 60%;
  aspect-ratio: 1;
  margin: 0;
  padding: 0;
  cursor: pointer;
  background: var(--key);
  color: var(--strong);
  border: 6px solid #808080;
  border-radius: 50%;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.15s, background-color 0.15s, border-color 0.15s;
}
.ptt:hover { background: #2b2b2b; }
.ptt:focus-visible, .ptt:has(.press:focus-visible) { outline: 2px solid var(--accent); outline-offset: 6px; }
.ptt:active { transform: scale(0.96); }
.ptt.small { width: 96px; border-width: 4px; font-size: 11px; }

/* A button to hold where there is a pointer that hovers, a checkbox to tap
   where there is not: front.tmpl says why. */
.for-tap { display: none; }
.press { position: absolute; width: 1px; height: 1px; margin: 0; padding: 0; border: 0; opacity: 0; }
@media (hover: none) {
  .for-hold { display: none; }
  span.for-tap { display: inline; }
  label.for-tap { display: grid; }
}

.mic { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.here { display: flex; justify-content: center; gap: 20px; margin: 4px 0 18px; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.here li { display: grid; justify-items: center; gap: 6px; }
.here .away { opacity: 0.4; }
.face {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-weight: 600;
  transition: box-shadow 0.15s;
}

.aside { margin: 0; color: var(--muted); font-size: 15px; }

/* One press anywhere on the page is the whole page's: a Device has one PTT
   however many things press it. On air is a button held or the checkbox
   ticked, and only one of the two is ever on the page. */
.live { display: none; }
body:has(.ptt:active, .press:checked) .live { display: inline; }
body:has(.ptt:active, .press:checked) .idle { display: none; }
body:has(.ptt:active, .press:checked) .ptt { background: var(--accent); color: var(--on-accent); border-color: #404040; }
body:has(.ptt:active, .press:checked) .air path { stroke: var(--accent); }
body:has(.ptt:active, .press:checked) .you .face { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }

@media (prefers-reduced-motion: no-preference) {
  body:has(.ptt:active, .press:checked) .air path { animation: wave 1.2s ease-out infinite; }
  body:has(.ptt:active, .press:checked) .air .far { animation-delay: 0.25s; }
}
@keyframes wave {
  0%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

.row { display: grid; gap: 32px; align-items: start; padding-block: clamp(40px, 7vh, 72px); }
/* Two sections and no drawing: stacked, they need a section's gap. */
.row.pair { gap: 64px; }
.words h2 {
  margin: 0 0 20px;
  font-size: clamp(1.75rem, 3.4vw, 2.4rem);
  font-weight: 700;
  font-stretch: 118%;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.words p { margin: 0 0 16px; max-width: 58ch; }
.words p:last-child { margin-bottom: 0; }

.stage {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: 0.02em;
  line-height: 1.6;
  vertical-align: middle;
  white-space: nowrap;
}

.drawing { margin: 0; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.drawing figcaption { margin-top: 18px; color: var(--muted); font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; font-size: 14px; font-weight: 600; }
.chips li { padding: 6px 14px; background: var(--key); border-radius: 999px; }
.chips .active { background: var(--accent); color: var(--on-accent); }

.log { margin: 0; padding: 0; list-style: none; }
.log li { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); }
.who { color: var(--strong); font-weight: 600; }
.now .who { color: var(--muted); }
body:has(.ptt:active, .press:checked) .now .who, body:has(.ptt:active, .press:checked) .now .aside { color: var(--accent); }
.unheard .who::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--strong);
}

.ways { display: grid; gap: 26px; margin: 0; padding: 0; list-style: none; }
.ways li { display: grid; grid-template-columns: 32px 1fr; column-gap: 18px; }
.ways svg { grid-row: span 2; width: 32px; height: 32px; fill: none; stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ways h3 { margin: 0; font-size: 1.05rem; font-weight: 600; color: var(--strong); }
.ways p { margin: 2px 0 0; color: var(--muted); }

.wrist { display: grid; justify-items: center; gap: 22px; text-align: center; }
.watch {
  display: grid;
  justify-items: center;
  align-content: space-between;
  width: 190px;
  aspect-ratio: 0.82;
  padding: 20px 14px 18px;
  background: var(--bg);
  border: 6px solid #2a2a2a;
  border-radius: 46px;
}
.channel { margin: 0; color: var(--strong); font-size: 15px; font-weight: 600; }
.activity {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(100%, 320px);
  padding: 12px 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 22px;
  font-size: 14px;
  text-align: left;
}
.activity .aside { margin-left: auto; font-size: 14px; }
.wrist figcaption { margin-top: 0; }

.foot { padding-block: 24px 64px; color: var(--muted); font-size: 15px; }
.foot p { margin: 0 0 10px; max-width: 72ch; }

@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 56px; }
  .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; }
}
