/* PairGoal static site — shared styles.
 *
 * Palette source of truth (copied by hand; this site has no build step):
 *   --pg-bg          mobile/src/theme/colors.ts ink "#161210" (pg-ink, the app runtime background; the splash is the cooler #0F0F1E)
 *   every other var  mobile/src/theme/colors.ts RAW_COLORS / ALPHA_COLORS
 * Keep these in sync by hand if the app palette moves.
 */

:root {
  --pg-bg: #161210; /* colors.ts ink (pg-ink) — the app runtime background */
  --pg-card: #231b16; /* card */
  --pg-card-alt: #211a15; /* cardAlt */
  --pg-accent: #e8845a; /* accent */
  --pg-accent-deep: #d2693c; /* THEME_GRADIENTS.orange end stop */
  --pg-gold: #f0b45a; /* gold */
  --pg-green: #66c98a; /* green */
  /* muted — carried for palette parity. Deliberately NOT used for text on --pg-bg:
   * #6E6258 on #0F0F1E is 3.3:1, under the 4.5:1 body-text floor. Use --pg-p2. */
  --pg-muted: #6e6258;
  --pg-p1: #f8efe7; /* text primary */
  --pg-p2: #b8a99b; /* text secondary */

  /* mobile/src/theme/colors.ts → ALPHA_COLORS */
  --pg-hairline: rgba(245, 235, 226, 0.08); /* p1Alpha08 */
  --pg-accent-a34: rgba(232, 132, 90, 0.34); /* accentAlpha34 */
  --pg-gold-a10: rgba(240, 180, 90, 0.1); /* goldAlpha10 */
  --pg-gold-a35: rgba(240, 180, 90, 0.35); /* goldAlpha35 */

  /* Layout */
  --pg-shell: 32rem;
  --pg-radius: 14px;
  --pg-tap: 48px; /* minimum tap target (>= 44px) */

  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--pg-bg);
  color: var(--pg-p1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.shell {
  display: flex;
  flex-direction: column;
  gap: 28px;
  width: 100%;
  max-width: var(--pg-shell);
  margin: 0 auto;
  padding: 40px 20px 32px;
}

/* One-screen pages (apex, 404): vertically centred instead of top-aligned. */
.shell--centered {
  min-height: 100vh;
  justify-content: center;
}

/* ---------- brand ---------- */

.mark {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--pg-p1);
}

.mark__accent { color: var(--pg-accent); }

.mark__dot {
  width: 6px;
  height: 6px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--pg-gold);
  align-self: center;
}

/* ---------- type ---------- */

h1 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lede {
  margin: 12px 0 0;
  color: var(--pg-p2);
}

.note {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--pg-p2);
}

.note--muted { font-size: 0.85rem; }

.instruction {
  margin: 0;
  font-weight: 600;
  color: var(--pg-p1);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- notice (invalid / incomplete code) ---------- */

.notice {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--pg-gold-a35);
  border-radius: var(--pg-radius);
  background: var(--pg-gold-a10);
  color: var(--pg-p1);
  font-size: 0.95rem;
}

/* ---------- buttons ---------- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 20px;
  border: 0;
  border-radius: var(--pg-radius);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn--primary {
  background-image: linear-gradient(135deg, var(--pg-accent), var(--pg-accent-deep));
  color: #1c1109;
  font-size: 1.05rem;
}

.btn--secondary {
  min-height: var(--pg-tap);
  background: transparent;
  border: 1px solid var(--pg-accent-a34);
  color: var(--pg-accent);
}

.btn--secondary[data-copied="true"] {
  border-color: var(--pg-green);
  color: var(--pg-green);
}

.link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--pg-accent);
  font-weight: 600;
  text-decoration: none;
}

.link:hover,
.link:focus-visible { text-decoration: underline; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--pg-gold);
  outline-offset: 3px;
}

/* ---------- invite code block ---------- */

.code-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--pg-hairline);
  border-radius: 18px;
  background: var(--pg-card);
}

.code-card__label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pg-p2);
}

.code {
  margin: 0;
  padding: 16px 12px;
  border: 1px solid var(--pg-accent-a34);
  border-radius: 12px;
  background: var(--pg-card-alt);
  color: var(--pg-p1);
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-align: center;
  word-break: break-all;
  overflow-wrap: anywhere;
  -webkit-user-select: all;
  user-select: all;
}

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

.site-footer {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--pg-hairline);
  font-size: 0.9rem;
  color: var(--pg-p2);
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--pg-p2);
  text-decoration: none;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible {
  color: var(--pg-p1);
  text-decoration: underline;
}

.site-footer__legal { margin: 0; }

/* ---------- wider viewports ---------- */

@media (min-width: 480px) {
  .shell {
    gap: 32px;
    padding: 64px 24px 40px;
  }

  h1 {
    font-size: 2rem;
  }

  .code {
    font-size: 2.1rem;
  }
}
