/* ═══════════════════════════════════════════════════
   Saddle — beta join page (/join)
   Self-contained, same-origin only (no inline / no remote)
   so it renders cleanly under the site's strict CSP. Reuses
   the marketing palette + self-hosted fonts to feel native.
   ═══════════════════════════════════════════════════ */

@font-face {
  font-family: 'Clash Grotesk';
  src: url('/assets/fonts/clash-grotesk-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Clash Grotesk';
  src: url('/assets/fonts/clash-grotesk-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('/assets/fonts/satoshi-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('/assets/fonts/satoshi-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #F8F3EA;
  --surface: #FFFDF8;
  --ink: #1B1915;
  --muted: #70685C;
  --line: rgba(45, 36, 24, 0.12);
  --brass: #B8860B;
  --brass-deep: #8D6816;
  --brass-tint: rgba(184, 134, 11, 0.10);
  --oxblood: #9E3B2E;
  --shadow: 0 24px 60px -34px rgba(43, 34, 22, 0.42);
  --display: 'Clash Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sans: 'Satoshi', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101316;
    --surface: #181C20;
    --ink: #F1ECE2;
    --muted: #A49C8E;
    --line: rgba(255, 250, 240, 0.12);
    --brass: #D7B756;
    --brass-deep: #B8860B;
    --brass-tint: rgba(215, 183, 86, 0.12);
    --oxblood: #C9604F;
    --shadow: 0 28px 70px -34px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.join {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: clamp(1.25rem, 5vw, 2.5rem);
}

.card {
  width: 100%;
  max-width: 27rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
  padding: clamp(1.75rem, 6vw, 2.75rem);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand img { border-radius: 0.7rem; display: block; }

.eyebrow {
  margin: 1.5rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-deep);
}

/* Invite context callout (shown when arriving from an app invite link). */
.invite {
  margin: 1.5rem 0 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--brass-tint);
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
}
.invite strong { color: var(--brass-deep); font-weight: 700; }
/* When the callout is present, the following eyebrow sits closer to it. */
.invite + .eyebrow { margin-top: 1rem; }
.invite-code + .eyebrow { margin-top: 1rem; }

/* Invite code surfaced for the post-install "join by code" path. */
.invite-code {
  margin: 0.7rem 0 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--surface);
  text-align: center;
}
.invite-code__label {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-deep);
}
.invite-code__value {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 8vw, 2.1rem);
  letter-spacing: 0.22em;
  color: var(--ink);
  /* The code is meant to be selected/copied. */
  -webkit-user-select: all;
  user-select: all;
}
.invite-code__hint {
  margin: 0.6rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
}
.invite-code__hint a { color: var(--brass-deep); font-weight: 500; }

h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 6vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.85rem;
}

p { color: var(--muted); line-height: 1.55; margin: 0 0 1.25rem; }
.fine { font-size: 0.82rem; margin: 0.9rem 0 0; }

.steps {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 0 0 0.95rem 2.4rem;
  color: var(--ink);
  line-height: 1.45;
}
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.05rem;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brass-tint);
  color: var(--brass-deep);
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.85rem;
}
.steps strong { color: var(--ink); font-weight: 700; }

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.95rem 1.25rem;
  border-radius: 0.9rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.cta + .cta { margin-top: 0.7rem; }
.cta svg { width: 1.05rem; height: 1.05rem; }
.cta:active { transform: translateY(1px); }

.cta--primary {
  background: var(--brass);
  color: #211706;
}
.cta--primary:hover { filter: brightness(1.04); }

.cta--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.cta--ghost:hover { border-color: var(--brass); color: var(--brass-deep); }

.foot {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  text-align: center;
}
.foot a { color: inherit; }
