/*
 * gatherrnd.app — the public landing page and privacy policy (#686).
 * Colours are The Table design system's tokens (packages/ui/src/tokens.ts):
 * daylight is Canvas under Ink, dark mode is the scene, Ink under Surface.
 */
:root {
  color-scheme: light dark;
  --canvas: #f7f4ed;
  --surface: #ffffff;
  --text: #20232a;
  --muted: #3f5f73;
  --border: #b6ada0;
  --primary: #2f5a52;
  --primary-pressed: #284d46;
  --on-primary: #ffffff;
  --focus: #6e5aa7;
  --link: #2f5a52;
  --error: #a84c50;
  --radius: 20px;
  --space: 1rem;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 100%;
  line-height: 1.6;
  color: var(--text);
  background: var(--canvas);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #20232a;
    --surface: #2a2e37;
    --text: #ffffff;
    --muted: #83b9cb;
    --border: #83b9cb;
    --primary: #2f5a52;
    --primary-pressed: #3a6c62;
    --focus: #83b9cb;
    --link: #83b9cb;
    --error: #f0a8aa;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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

body {
  margin: 0;
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--link);
  text-underline-offset: 0.2em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 1rem;
  background: var(--surface);
  color: var(--text);
  border-radius: 12px;
  z-index: 1;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}

/* Header and footer */

.site-header {
  padding-block: 1.25rem;
}

.site-header .wrap,
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.site-footer {
  margin-top: 4rem;
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-block;
  padding-block: 0.5rem;
}

/* Type */

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2.1rem, 1.4rem + 3.2vw, 3.4rem);
}

h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.2rem;
  max-width: 36rem;
}

.muted {
  color: var(--muted);
}

section {
  padding-block: 3rem;
}

.intro {
  max-width: 44rem;
  margin-bottom: 2rem;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--on-primary);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  box-shadow: 0 5px 16px #20232a24;
  cursor: pointer;
}

.button:hover,
.button:active {
  background: var(--primary-pressed);
}

.button[disabled] {
  opacity: 0.7;
  cursor: progress;
}

/* The hero carries the one invite button; the header is for people coming
   back to see where their request stands. */
.header-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.25rem;
  color: var(--link);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Hero */

.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding-block: 2rem 3rem;
}

.hero .button {
  margin-top: 0.5rem;
}

.beta-note {
  margin-top: 1rem;
  font-size: 0.95rem;
}

@media (min-width: 56rem) {
  .hero {
    grid-template-columns: 1.05fr 1fr;
    gap: 3rem;
  }
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.card p {
  margin: 0;
}

/* Two to a row on a phone: five circles should not be five screens. */
.circle-types {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
}

.card img {
  width: 72px;
  height: 72px;
  margin-bottom: 0.75rem;
}

.steps {
  counter-reset: step;
}

.steps .card h3::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-right: 0.6rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 1rem;
}

/* The shared world */

.world {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.characters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

.characters img {
  width: 100%;
  max-width: 120px;
  margin-inline: auto;
}

@media (min-width: 56rem) {
  .world {
    grid-template-columns: 1fr 1fr;
  }
}

/* Request an invite: the account card */

.request {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 56rem) {
  .request {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

[hidden] {
  display: none !important;
}

.account-card {
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

/* Clerk's own card sits inside ours; let it take the width it is given. */
.account-card [data-account-mount] > * {
  max-width: 100%;
}

.account-card [data-account-mount] .cl-rootBox,
.account-card [data-account-mount] .cl-cardBox {
  width: 100%;
  max-width: 100%;
}

.account-card ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.account-card li {
  margin-bottom: 0.5rem;
}

.signed-in {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.link-button {
  display: inline;
  min-height: 44px;
  padding: 0.5rem 0.25rem;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

/* Privacy policy */

.policy {
  max-width: 44rem;
}

.policy h2 {
  margin-top: 2.5rem;
  font-size: 1.5rem;
}

.policy h3 {
  margin-top: 1.5rem;
}

.policy ul {
  padding-left: 1.25rem;
}

.policy li {
  margin-bottom: 0.5rem;
}
