/* Color Hunt — shared styles. Matches the app: dark ground, the nine colours
   carrying the identity, frosted surfaces. No build step, no dependencies. */

:root {
  --bg: #0b0b0f;
  --bg-raised: rgba(255, 255, 255, 0.055);
  --hairline: rgba(255, 255, 255, 0.10);
  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.62);
  --text-3: rgba(255, 255, 255, 0.38);
  --accent: #4a67d9;
  --radius: 22px;
  --measure: 46rem;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 ui-rounded, -apple-system, BlinkMacSystemFont, "SF Pro Rounded",
        "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* A wash of colour behind everything, the way the app tints its screens. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60rem 40rem at 12% -10%, rgba(226, 59, 59, 0.16), transparent 60%),
    radial-gradient(55rem 38rem at 88% 4%, rgba(242, 194, 48, 0.11), transparent 60%),
    radial-gradient(60rem 44rem at 50% 108%, rgba(122, 79, 208, 0.16), transparent 60%);
}

.wrap {
  position: relative;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 24px 96px;
}

/* ---------------------------------------------------------------- header */

header.site {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 28px 0 0;
}

header.site img { width: 44px; height: 44px; border-radius: 11px; display: block; }
header.site .name { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
header.site nav { margin-left: auto; display: flex; gap: 22px; }

header.site nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
header.site nav a:hover { color: var(--text); }

/* ------------------------------------------------------------------ hero */

.hero { padding: 76px 0 60px; }

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 20px;
}

.hero p.lede {
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  color: var(--text-2);
  max-width: 34rem;
  margin: 0 0 34px;
}

/* The nine-cell mark, same one the app uses. */
.grid-mark {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 156px;
  margin-bottom: 34px;
}
.grid-mark span { aspect-ratio: 1; border-radius: 12px; }
/* The palette, as classes: inline style="" is blocked by the site's CSP, which
   left this mark as nine invisible squares on the live homepage. */
.grid-mark .c1 { background: #E23B3B; }
.grid-mark .c2 { background: #F07B22; }
.grid-mark .c3 { background: #F2C230; }
.grid-mark .c4 { background: #3FA34D; }
.grid-mark .c5 { background: #2AA3A3; }
.grid-mark .c6 { background: #2F6FD0; }
.grid-mark .c7 { background: #7A4FD0; }
.grid-mark .c8 { background: #E066A6; }
.grid-mark .c9 { background: #8A5A34; }
/* Frosted, not absent. At 0.3 opacity these read as missing squares, which is
   the opposite of the point — the colour should still come through, washed. */
.grid-mark span.frosted {
  filter: saturate(0.3) brightness(1.5) contrast(0.75);
  opacity: 0.7;
}

.badge {
  display: inline-block;
  text-decoration: none;
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(74, 103, 217, 0.16);
  color: #93a6ef;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* ----------------------------------------------------------------- cards */

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }

.card {
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px;
  backdrop-filter: blur(20px);
}

.card h3 { margin: 0 0 8px; font-size: 1.06rem; font-weight: 700; }
.card p { margin: 0; color: var(--text-2); font-size: 0.95rem; }

/* -------------------------------------------------------------- sections */

section { padding: 44px 0; }
section > h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.1rem);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  font-weight: 750;
}
section > p.sub { color: var(--text-2); margin: 0 0 26px; max-width: 36rem; }

.steps { counter-reset: step; display: grid; gap: 18px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step .n {
  counter-increment: step;
  flex: none;
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(255,255,255,0.08);
  font-weight: 800; font-size: 14px;
  color: var(--text-2);
}
.step .n::before { content: counter(step); }
.step h4 { margin: 3px 0 3px; font-size: 1rem; font-weight: 700; }
.step p { margin: 0; color: var(--text-2); font-size: 0.95rem; }

/* -------------------------------------------------------------- document */

.doc { padding-top: 40px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.7rem); letter-spacing: -0.03em; margin: 0 0 6px; }
.doc .updated { color: var(--text-3); font-size: 0.9rem; margin: 0 0 40px; }
.doc h2 {
  font-size: 1.22rem;
  margin: 40px 0 12px;
  letter-spacing: -0.01em;
  font-weight: 750;
}
.doc p, .doc li { color: var(--text-2); }
.doc li { margin-bottom: 9px; }
.doc strong { color: var(--text); font-weight: 650; }
.doc ul { padding-left: 1.15rem; }

.note {
  border-left: 3px solid var(--accent);
  background: rgba(74, 103, 217, 0.08);
  padding: 16px 20px;
  border-radius: 0 12px 12px 0;
  margin: 26px 0;
}
.note p { margin: 0; }

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

footer.site {
  border-top: 1px solid var(--hairline);
  margin-top: 64px;
  padding: 30px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  color: var(--text-3);
  font-size: 0.88rem;
}
footer.site a { color: var(--text-2); text-decoration: none; }
footer.site a:hover { color: var(--text); }
footer.site .spacer { margin-left: auto; }

a.cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  padding: 15px 28px;
  border-radius: 15px;
}
a.cta:hover { filter: brightness(1.08); }

@media (max-width: 560px) {
  header.site nav { gap: 15px; }
  .hero { padding: 48px 0 40px; }
}

/* --- invite page (/j/CODE) ---------------------------------------------- */

.invite { padding: 44px 0 56px; max-width: 30rem; margin: 0 auto; text-align: center; }
.invite h1 { font-size: clamp(1.9rem, 6vw, 2.5rem); letter-spacing: -0.03em; margin: 0 0 28px; }
.invite-card {
  background: var(--bg-raised);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px 20px;
  margin: 0 0 28px;
}
.invite-card p { margin: 0; color: var(--text-2); }
.invite-card .label {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-3);
}
.invite-card .code {
  font: 800 clamp(2.4rem, 12vw, 3.2rem)/1.15 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.14em; color: var(--text);
  margin: 10px 0 20px;
  -webkit-user-select: all; user-select: all;
}
.invite-card .hint { margin-top: 12px; font-size: 0.9rem; }
.invite-card .hint:empty { display: none; }
.invite-steps {
  text-align: left; color: var(--text-2);
  margin: 0 auto 28px; padding-left: 1.3rem; max-width: 22rem;
}
.invite-steps li { margin-bottom: 8px; }
.invite-steps strong { color: var(--text); font-weight: 650; }
.button {
  display: block; width: 100%;
  padding: 15px 18px; border-radius: 16px;
  font: inherit; font-weight: 650; text-align: center; text-decoration: none;
  color: var(--text); background: rgba(255, 255, 255, 0.11);
  border: 0; cursor: pointer;
}
.button.primary { background: var(--accent); color: #fff; }
.button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
[hidden] { display: none !important; }

/* The header name is a link. It was styled inline, which the site's own CSP
   (style-src 'self') blocks, so it rendered as a default blue underlined link. */
header.site a.name { color: inherit; text-decoration: none; }
a.inline-link { color: #93a6ef; }
