/* Cal Your Friends: tokens mirror apps/mobile/src/constants/theme.ts */
:root {
  color-scheme: light dark;
  --ground: #f6f5f1;
  --card: #ffffff;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --ink: #1d1d1f;
  --on-ink: #ffffff;
  --tint: #2f6f3a;
  --green: #4e9a52;
  --green-fill: #cfefcf;
  --on-green: #295a2c;
  --rounded: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  --body: system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #121211;
    --card: #1d1d1b;
    --text: #f5f5f2;
    --text-2: #a1a19c;
    --ink: #f5f5f2;
    --on-ink: #121211;
    --tint: #8fd393;
    --green-fill: #243c25;
    --on-green: #ace1ad;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--text);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--rounded); line-height: 1.2; text-wrap: balance; }
p, li { text-wrap: pretty; }
a { color: var(--tint); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 680px; margin-inline: auto; padding-inline: 20px; }

/* One centred answer: landing and invite */
.center {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: 48px;
}
.mark { width: 112px; height: 112px; }
.center h1 { font-size: clamp(2rem, 8vw, 2.75rem); font-weight: 800; letter-spacing: -0.01em; margin: 20px 0 10px; }
.center h1.invite-title { font-size: clamp(1.5rem, 6vw, 1.9rem); max-width: 18ch; }
.lede { margin: 0; max-width: 24ch; font-size: clamp(1.15rem, 4.5vw, 1.35rem); line-height: 1.45; color: var(--text-2); text-wrap: balance; }
.pill {
  margin: 28px 0 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--green-fill);
  color: var(--on-green);
  font: 600 15px/1.4 var(--rounded);
}
.stack { display: flex; flex-direction: column; align-items: center; width: 100%; }
.code {
  margin: 20px 0 28px;
  padding: 16px 28px;
  border-radius: 18px;
  background: var(--card);
  font: 800 clamp(2.25rem, 12vw, 3.25rem)/1.1 var(--rounded);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  min-height: 52px;
  padding: 15px 18px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--on-ink);
  font: 600 17px/1.2 var(--rounded);
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.3, 1.5, 0.6, 1);
}
.button:active { transform: scale(0.97); }
.note { margin: 16px 0 0; font-size: 15px; color: var(--text-2); }

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  padding-block: 24px 32px;
  font-size: 15px;
}
.foot a { color: var(--text-2); text-decoration: none; }
.foot a:hover, .foot a[aria-current] { color: var(--text); }

/* Legal pages */
.top { padding-block: 20px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 17px/1 var(--rounded); color: var(--text); text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.doc { flex: 1; padding-block: 32px 48px; }
.doc h1 { margin: 0; font-size: clamp(2rem, 7vw, 2.5rem); font-weight: 800; letter-spacing: -0.01em; }
.updated { margin: 6px 0 28px; font-size: 15px; color: var(--text-2); }
.doc h2 { margin: 2.2em 0 0.5em; font-size: 1.3rem; font-weight: 700; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 0.4em; }
.card { padding: 20px 22px; border-radius: 18px; background: var(--card); }
.card h2 { margin-top: 0; font-size: 1.1rem; }
.card p:last-child { margin-bottom: 0; }
.card ul { list-style: none; padding: 0; margin: 0; }
.card li { position: relative; padding-left: 32px; }
.card li::before {
  content: "✓";
  content: "✓" / "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green-fill);
  color: var(--on-green);
  font: 800 12px/22px var(--rounded);
  text-align: center;
}

/* Motion: the mark lands, the words follow. Off with Reduce Motion. */
@media (prefers-reduced-motion: no-preference) {
  .center > * { animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .center > :nth-child(2) { animation-delay: 0.08s; }
  .center > :nth-child(3) { animation-delay: 0.16s; }
  .center > :nth-child(4) { animation-delay: 0.24s; }
  .center > .mark { animation: pop 0.7s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes pop { from { opacity: 0; transform: scale(0.85); } }
