/* Spolu — getspolu.com
   Palette and type per branding-v0.3.md / branding-v0.2.md (BR-B-001…005, 020…023, 040…042).
   Outfit is self-hosted (site/fonts); the EmailOctopus embed on index.html is
   the only third-party resource on the site. */

@font-face {
  font-family: 'Outfit';
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/Outfit_400Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Outfit';
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/Outfit_500Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'Outfit';
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/Outfit_600SemiBold.ttf') format('truetype');
}

:root {
  --lavender: #5b54a8;
  --lavender-deep: #433c8f;
  --mist: #eeebf7;
  --fog: #f5f3fa;
  --card: #ffffff;
  --ink: #1c1b22;
  --violet-slate: #4b4670;
  --slate: #6e6a82;
  --hairline: #f0edf7;
  --border: #e7e3f1;
  --radius-card: 16px;
}

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

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

body {
  margin: 0;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  background: var(--fog);
  color: var(--ink);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  font-variant-numeric: tabular-nums lining-nums;
}

/* --- Wordmark (BR-B-001/002): "spolu", the o replaced by the shared-o glyph --- */

.wordmark {
  display: inline-flex;
  align-items: baseline;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
  user-select: none;
}

.wordmark-lg {
  font-size: 44px;
}

.wordmark-sm {
  font-size: 32px;
}

.wordmark .sharedo {
  /* viewBox height (60) is the circle diameter (52) plus the stroke (8), so an
     x-height of ~0.5em means a glyph height of 0.5em × 60/52. */
  height: 0.577em;
  width: auto;
  margin: 0 0.03em;
  vertical-align: baseline;
}

.wordmark .sharedo .ring {
  fill: none;
  stroke: var(--ink);
  stroke-width: 8;
}

.wordmark .sharedo .overlap {
  fill: var(--lavender);
}

/* --- Card --- */

.card {
  width: 100%;
  max-width: 460px;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 40px 32px;
  text-align: center;
}

.card > * + * {
  margin-top: 20px;
}

h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.tagline {
  margin: 0;
  font-size: 20px;
  font-weight: 500;
  color: var(--lavender);
}

p {
  margin: 0;
  color: var(--violet-slate);
}

p.muted {
  color: var(--slate);
  font-size: 14px;
}

/* --- Invite code --- */

.code-well {
  background: var(--mist);
  border-radius: 14px;
  padding: 24px 16px;
}

.code {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--lavender);
  word-break: break-all;
}

.code-meta {
  margin: 6px 0 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--slate);
  text-transform: uppercase;
}

/* --- Steps --- */

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
  counter-reset: step;
}

.steps li {
  position: relative;
  counter-increment: step;
  padding: 10px 0 10px 40px;
  color: var(--violet-slate);
}

.steps li + li {
  border-top: 1px solid var(--hairline);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--mist);
  color: var(--lavender);
  font-size: 14px;
  font-weight: 600;
  line-height: 26px;
  text-align: center;
}

/* --- Actions (BR-B-042: ≥44px targets) --- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--lavender);
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover,
.btn:active {
  background: var(--lavender-deep);
}

.btn[aria-disabled='true'],
.btn:disabled {
  background: var(--mist);
  color: var(--violet-slate);
  cursor: default;
  pointer-events: none;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--lavender);
}

.btn-secondary:hover,
.btn-secondary:active {
  background: var(--mist);
  color: var(--lavender-deep);
}

.btn svg {
  flex: none;
}

/* BR-B-041 — 2px Deep Lavender focus ring, 2px offset. */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--lavender-deep);
  outline-offset: 2px;
}

/* --- Subscribe block (EmailOctopus embed lives inside) --- */

.subscribe {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  text-align: left;
}

.subscribe .field-label {
  display: block;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}

.subscribe .consent {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--slate);
}

.subscribe .consent a {
  color: var(--slate);
}

/* The embed injects its own markup into .eo-form; keep it inside the card and
   stop iOS zooming the page when its input takes focus. */
.eo-form {
  margin-top: 12px;
}

.eo-form input,
.eo-form iframe,
.eo-form img {
  max-width: 100%;
}

.eo-form input,
.eo-form button {
  font-size: 16px;
}

/* --- Long-form document (privacy policy) --- */

body.doc {
  display: block;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

body.doc .wordmark {
  display: inline-flex;
}

.doc-body {
  margin-top: 32px;
}

.doc-body h1 {
  font-size: 32px;
  margin-bottom: 8px;
}

.doc-body h2 {
  margin: 36px 0 8px;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}

.doc-body p {
  margin: 0 0 12px;
  color: var(--violet-slate);
}

.doc-body ul {
  margin: 0 0 12px;
  padding-left: 20px;
  color: var(--violet-slate);
}

.doc-body li {
  margin-bottom: 6px;
}

.doc-body .updated {
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate);
}

.doc-body a {
  color: var(--lavender);
}

.doc-body hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--hairline);
}

/* revoke.html is the first doc page with a button and numbered steps in
   its body: .doc-body a would otherwise repaint the button's label lavender on
   lavender, and .steps carries margin: 0 for its use inside a .card. */
.doc-body .btn {
  color: #ffffff;
  margin: 4px 0 20px;
}

.doc-body .steps {
  margin: 0 0 20px;
}

/* --- Footer --- */

footer {
  font-size: 13px;
  color: var(--slate);
  text-align: center;
}

footer a {
  color: var(--slate);
}

footer a:hover {
  color: var(--lavender);
}

@media (max-width: 420px) {
  body {
    padding: 24px 16px;
  }
  .card {
    padding: 32px 20px;
  }
  h1 {
    font-size: 26px;
  }
  .code {
    font-size: 26px;
  }
}
