/* ---------- tokens (matches Gio app sgraffito cream theme) ---------- */
:root {
  --bg: #efe7d2;
  --bg-elev: #f6efde;
  --text: #2b231a;
  --text-dim: #6b5c45;
  --accent: #9a6b3a;
  --accent-soft: #b75c1a;
  --accent-bg: rgba(154, 107, 58, 0.10);
  --border: rgba(60, 47, 30, 0.18);
  --radius: 14px;
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -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(154, 107, 58, 0.07),
    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: "Roboto Slab", Georgia, serif;
  font-weight: 800;
  font-size: 44px;
  letter-spacing: -1.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(--accent-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(--accent-soft);
}
.code {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-weight: 700;
  font-size: 64px;
  letter-spacing: 8px;
  color: var(--accent-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(--accent);
  background: transparent;
  color: var(--accent-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(--accent);
  color: white;
}
.copy-btn:active {
  transform: scale(0.97);
}
.copy-btn.copied {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.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(--accent);
  color: white;
}
.btn-primary:hover {
  background: #8b5a2b;
}
.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(--accent-soft);
  text-decoration: none;
  border-bottom: 1px solid rgba(154, 107, 58, 0.35);
}
.foot a:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* ---------- policy pages (privacy, terms) ---------- */
.policy {
  max-width: 720px;
  padding: 56px 24px 48px;
}
@media (min-width: 600px) {
  .policy {
    padding-top: 88px;
  }
}
.policy .masthead {
  margin-bottom: 24px;
}
.policy h1 {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: 0.5px;
  color: var(--text);
  margin: 0 0 8px;
  text-align: center;
}
.policy .last-updated {
  margin: 0 0 32px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
}
.policy h2 {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin: 36px 0 12px;
}
.policy h3 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin: 20px 0 8px;
}
.policy p,
.policy li {
  font-family: "Newsreader", Georgia, serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
}
.policy p {
  margin: 0 0 14px;
}
.policy ul {
  margin: 0 0 14px;
  padding-left: 24px;
}
.policy li {
  margin-bottom: 6px;
}
.policy .legal {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-dim);
}
.policy .contact {
  margin-top: 36px;
  padding: 20px;
  background: var(--accent-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.policy .contact p {
  margin: 0 0 4px;
  font-size: 15px;
}
.policy .contact .label {
  font-family: "Inter", sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin-bottom: 8px;
}

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