:root {
  color-scheme: dark;
  --ground: #0b0c0e;
  --ink: #e9e6df;
  --ink-muted: #8f8b82;
  --rule: #24262a;
  --field: #131518;
  --field-edge: #34373c;
  --card: #18233a;
  --card-ink: #e9e2cf;
  --accent: #e9e2cf;
  --accent-ink: #0b0c0e;
  --ok: #b9d3a8;
  --error: #e8a493;
  --label: "Barlow Semi Condensed", "DIN Alternate", "Arial Narrow", system-ui, sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 40px);
  padding-inline: var(--gutter);
  padding-block: clamp(20px, 3vw, 32px);
  background: var(--ground);
  color: var(--ink);
  font-family: var(--text);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 0.2em; }

.masthead,
main,
.colophon {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
}

/* Small uppercase labels: wordmark, section labels, field labels. */
.wordmark,
.masthead-link,
.label,
.colophon {
  font-family: var(--label);
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.masthead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px 24px;
}

.wordmark { font-size: 15px; letter-spacing: 0.24em; text-decoration: none; }

.masthead-link { color: var(--ink-muted); text-decoration: none; }
.masthead-link:hover { color: var(--ink); }

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 5vw, 64px);
}

h1, h2, p { margin: 0; }

/* The broadcast */

.screen {
  position: relative;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--rule);
  overflow: hidden;
}

.screen iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.standby {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--card);
  color: var(--card-ink);
  font-family: var(--label);
  font-weight: 500;
  font-size: clamp(14px, 2.6vw, 30px);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-align: center;
  padding-inline: 16px;
}

.screen.is-live .standby { display: none; }

.statement {
  max-width: 34ch;
  font-weight: 400;
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.25;
  text-wrap: balance;
}

/* What it is */

.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 24px clamp(24px, 4vw, 48px);
  padding-top: 24px;
  border-top: 1px solid var(--rule);
}

.about > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.about .label { color: var(--ink-muted); }

.about p { max-width: 36ch; }

/* Join the beta */

.join {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 24px clamp(32px, 6vw, 96px);
  padding: clamp(24px, 4vw, 48px);
  background: var(--card);
  color: var(--card-ink);
  scroll-margin-top: 24px;
}

.join-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.join-title {
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
}

.join-copy p { max-width: 34ch; }

.join-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.optional {
  margin-left: 6px;
  color: color-mix(in srgb, var(--card-ink) 55%, transparent);
  letter-spacing: 0.12em;
}

input,
textarea {
  width: 100%;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--field-edge);
  border-radius: 2px;
  padding: 12px 14px;
}

textarea { resize: vertical; min-height: 96px; }

input:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.join-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

button {
  font-family: var(--label);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  border: 0;
  border-radius: 2px;
  padding: 14px 22px;
  cursor: pointer;
}

button:disabled { opacity: 0.6; cursor: progress; }

.fine {
  font-size: 14px;
  color: var(--ink-muted);
}

.join .fine { color: color-mix(in srgb, var(--card-ink) 65%, transparent); }

.join-status { font-size: 17px; }
.join-status[data-outcome="joined"] { color: var(--ok); }
.join-status[data-outcome="error"] { color: var(--error); }

.join-form.is-joined .field,
.join-form.is-joined .join-actions { display: none; }

/* Plain text pages */

.document {
  max-width: 680px;
  gap: 12px;
}

.document-title {
  font-weight: 400;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  margin-bottom: 16px;
}

.document .label {
  margin-top: 20px;
  color: var(--ink-muted);
}

.colophon {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--ink-muted);
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}

.colophon a { text-decoration: none; }
.colophon a:hover { color: var(--ink); }
