/* ---------- tokens (matches Gio app dark theme) ---------- */
:root {
  --bg: #0f172a;
  --bg-elev: #1e293b;
  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --indigo: #6366f1;
  --indigo-soft: #a5b4fc;
  --indigo-bg: rgba(99, 102, 241, 0.12);
  --border: rgba(241, 245, 249, 0.08);
  --radius: 14px;
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100svh;
  min-height: 100vh;
  line-height: 1.4;
  text-rendering: optimizeLegibility;
}

/* subtle vignette */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at top,
    rgba(99, 102, 241, 0.08),
    transparent 60%
  );
  z-index: 0;
}

/* ---------- layout ---------- */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: 56px 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-height: 100svh;
  min-height: 100vh;
}

@media (min-width: 600px) {
  .wrap {
    padding-top: 88px;
    gap: 48px;
  }
}

/* ---------- masthead ---------- */
.masthead {
  text-align: center;
}
.wordmark {
  font-family: "DM Sans", sans-serif;
  font-weight: 900;
  font-size: 32px;
  letter-spacing: 4px;
  color: var(--text);
  line-height: 1;
}
.tagline {
  margin: 14px 0 0;
  font-family: "Newsreader", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 18px;
  color: var(--text-dim);
}

/* ---------- invite block ---------- */
.invite {
  text-align: center;
  background: var(--indigo-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 20px 28px;
}
.eyebrow {
  margin: 0 0 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--indigo-soft);
}
.code {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-weight: 700;
  font-size: 64px;
  letter-spacing: 8px;
  color: var(--indigo-soft);
  line-height: 1;
  /* nudge optical centering with letter-spacing */
  padding-left: 8px;
  user-select: all;
  -webkit-user-select: all;
  word-break: break-all;
}
@media (min-width: 380px) {
  .code {
    font-size: 76px;
    letter-spacing: 10px;
    padding-left: 10px;
  }
}
.code.invalid {
  font-size: 22px;
  letter-spacing: 1px;
  color: #fca5a5;
  padding-left: 0;
}
.instructions {
  margin: 18px 0 22px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
}
.instructions.muted {
  opacity: 0.6;
}

/* ---------- copy button ---------- */
.copy-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--indigo);
  background: transparent;
  color: var(--indigo-soft);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 80ms ease;
}
.copy-btn:hover {
  background: var(--indigo);
  color: white;
}
.copy-btn:active {
  transform: scale(0.97);
}
.copy-btn.copied {
  background: var(--indigo);
  color: white;
  border-color: var(--indigo);
}
.copy-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- install buttons ---------- */
.install {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.btn {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  font-family: inherit;
  border: 0;
  border-radius: var(--radius);
  padding: 18px 20px;
  cursor: pointer;
  transition: transform 80ms ease, opacity 120ms ease, background 120ms ease;
  text-align: center;
}
.btn:active {
  transform: scale(0.99);
}
.btn-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.7;
}
.btn-label {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.btn-primary {
  background: var(--indigo);
  color: white;
}
.btn-primary:hover {
  background: #4f46e5;
}
.btn-disabled {
  background: var(--bg-elev);
  color: var(--text-dim);
  cursor: not-allowed;
  border: 1px solid var(--border);
}

/* ---------- footer ---------- */
.foot {
  margin-top: auto;
  text-align: center;
  padding-top: 16px;
}
.foot p {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-style: italic;
  font-size: 14px;
  color: var(--text-dim);
}
.foot a {
  color: var(--indigo-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(165, 180, 252, 0.3);
}
.foot a:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* ---------- a11y ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
:focus-visible {
  outline: 2px solid var(--indigo-soft);
  outline-offset: 3px;
  border-radius: 6px;
}
