/* The whole waitlist stylesheet — public landing page and admin list.

   Brand tokens are Orion's space palette from the logo/animation canvas:
   #0F0E22 deep-space ground, #5A52A3 → #B377B2 planet gradient,
   #E2DCFA star lavender, Archivo / IBM Plex Mono.
   No build step, no framework — plain CSS. */

:root {
  color-scheme: dark;
  --bg: #0F0E22;
  --surface: #16142C;
  --surface-2: #1D1A38;
  --surface-3: #262243;
  --border: rgba(226, 220, 250, 0.10);
  --border-strong: rgba(226, 220, 250, 0.18);
  --text: #EDEBFB;
  --text-soft: rgba(237, 235, 251, 0.74);
  --text-mute: rgba(237, 235, 251, 0.52);
  --text-faint: rgba(237, 235, 251, 0.32);
  --accent: #B377B2;         /* planet-edge pink */
  --accent-deep: #5A52A3;    /* gradient indigo */
  --accent-soft: rgba(179, 119, 178, 0.14);
  --accent-border: rgba(179, 119, 178, 0.42);
  --lav: #B9B0E8;            /* links, kickers */
  --star: #E2DCFA;
  --grad: linear-gradient(100deg, #5A52A3 0%, #B377B2 100%);
  --red: oklch(72% 0.16 30);
  --red-border: oklch(72% 0.16 30 / 0.40);
  --red-soft: oklch(72% 0.16 30 / 0.14);
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Soft planet glows behind everything, like the animation canvas. */
.glow {
  min-height: 100vh;
  background:
    radial-gradient(55% 40% at 8% 4%, rgba(90, 82, 163, 0.30), transparent 70%),
    radial-gradient(42% 38% at 100% 22%, rgba(179, 119, 178, 0.16), transparent 70%),
    linear-gradient(180deg, rgba(22, 20, 44, 0.6), rgba(15, 14, 34, 0) 55%);
}

.page {
  max-width: 660px;
  margin: 0 auto;
  padding: 40px 20px 28px;
}
.page-wide { max-width: 960px; }

@media (min-width: 640px) {
  .page { padding-top: 56px; }
}

/* --- brand lockup: Eclipse mark + wordmark -------------------------------- */

.lockup { display: flex; align-items: center; gap: 9px; }
.lockup-center { justify-content: center; }
.lockup-small { gap: 7px; }
.mark { flex-shrink: 0; }
.wordmark {
  font-family: 'Archivo', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.lockup-small .wordmark { font-size: 13px; }

/* --- splash visual: the Totality·orbit mark in motion ---------------------- */

.brand-visual {
  width: min(230px, 62vw);
  margin: 26px auto 0;
  aspect-ratio: 1;
}
.brand-visual svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* --- hero ----------------------------------------------------------------- */

.hero {
  margin: 18px 0 0;
  text-align: center;
  font-size: clamp(34px, 7vw, 48px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  max-width: 30rem;
  margin: 20px auto 0;
  text-align: center;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-soft);
}

/* --- countdown -------------------------------------------------------------- */

.countdown {
  max-width: 36rem;
  margin: 34px auto 0;
  text-align: center;
}
.countdown-kicker {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lav);
}
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.countdown-tile {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 6px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.countdown-num {
  font-family: var(--mono);
  font-size: clamp(24px, 6vw, 34px);
  font-weight: 600;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.countdown-label {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* --- signup form ----------------------------------------------------------- */

.form-wrap { max-width: 36rem; margin: 32px auto 0; }

.join {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(226, 220, 250, 0.04);
}

@media (min-width: 640px) {
  .join { flex-direction: row; align-items: stretch; }
}

.join input,
.join select {
  min-width: 0;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.join input { flex: 1; }
.join input::placeholder { color: var(--text-faint); }
.join select {
  color: var(--text-soft);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  border: 1px solid var(--border-strong);
  background-color: var(--surface-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23B9B0E8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition: border-color 120ms ease;
}
.join select:hover,
.join select:focus { border-color: var(--accent-border); }
/* The open list is drawn by the browser: give it an explicit dark surface so it is readable. */
.join select option {
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 12px;
}
.join select option[value=""] { color: var(--text-mute); }
@media (min-width: 640px) {
  .join select { min-width: 15rem; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: filter 120ms ease, opacity 120ms ease;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: 0.6; cursor: default; filter: none; }

.btn-secondary {
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--accent-border); color: var(--lav); filter: none; }

/* Focus: pink ring everywhere, but white on the gradient button so it shows. */
.join input:focus-visible,
.join select:focus-visible,
summary:focus-visible,
a:focus-visible,
input:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn:focus-visible { outline-color: var(--text); }

.msg {
  min-height: 1.5rem;
  margin: 12px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-soft);
}
.msg.is-error { color: var(--red); }

.fineprint {
  margin: 4px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}

/* --- confirmation ---------------------------------------------------------- */

.confirm {
  max-width: 36rem;
  margin: 32px auto 0;
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(226, 220, 250, 0.04);
  text-align: center;
}
.confirm:focus { outline: none; }
.confirm-title { margin: 0; font-size: 18px; font-weight: 600; }
.position {
  margin: 18px 0 0;
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
}
.position-label { margin: 6px 0 0; font-size: 14px; color: var(--text-mute); }
.confirm-note { margin: 18px 0 0; font-size: 14px; color: var(--text-mute); }
.confirm-email { color: var(--text); }

/* --- FAQ ------------------------------------------------------------------- */

.faq { margin-top: 64px; }
.faq-title {
  margin: 0;
  text-align: center;
  font-weight: 600;
  font-size: 26px;
}
.faq-list {
  max-width: 36rem;
  margin: 24px auto 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  border-radius: 4px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .plus {
  font-size: 20px;
  line-height: 1;
  color: var(--text-soft);
  transition: transform 200ms ease;
}
.faq-item[open] .plus { transform: rotate(45deg); }
.faq-item p {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-mute);
}

/* --- footer ----------------------------------------------------------------- */

.footer {
  margin-top: 72px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer .lockup { margin-bottom: 8px; }
.footer-mono {
  margin: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
.footer-copy { margin: 6px 0 0; font-size: 12px; color: var(--text-faint); }

/* --- admin list ------------------------------------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
}

.admin-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 32px 0 22px;
}
.admin-head h1 {
  margin: 0 0 4px;
  font-size: 26px;
  letter-spacing: -0.02em;
}
.count { margin: 0; font-size: 14px; color: var(--text-mute); }

.search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 340px;
  margin-bottom: 18px;
}
.search label { font-size: 13px; font-weight: 600; color: var(--text-soft); }
.search input {
  padding: 11px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.search input::placeholder { color: var(--text-faint); }

.error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid var(--red-border);
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 14px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}
table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14px;
}
th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
}
tbody tr:last-child td { border-bottom: 0; }
td.pos { font-family: var(--mono); color: var(--text-mute); white-space: nowrap; }
td.email { font-family: var(--mono); color: var(--text); word-break: break-all; }
tr.empty-row td {
  padding: 30px 16px;
  text-align: center;
  color: var(--text-mute);
}

/* --- small utilities --------------------------------------------------------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .faq-item .plus, .btn { transition: none; }
  .brand-visual { display: none; }
}
