/* ============================================================
   Shared styles for the purchase / sign-in pages:
   welcome.html, finish-claim.html, invitation.html (Inner Circle
   offer), payment-plan.html (split-pay offer), thank-you.html.

   Matches the joinkalam.com sales page (joinkalam-site/index.html):
   pure white canvas, Apple ink #1d1d1f, warm gray #6e6e73, black
   pill buttons, the same resting/lifted shadows and entrance easing.
   Light-only on purpose, like the sales page.
   ============================================================ */

:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --hair: #d2d2d7;
  --rule: #e8e8ed;
  --soft: #f5f5f7;
  --accent: #0071e3;
  --danger: #b42318;
  --shadow-rest: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-lift: 0 24px 64px rgba(0, 0, 0, 0.12);
  --ease-in: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}

/* ---------- card ---------- */

.card {
  width: 100%;
  max-width: 440px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 20px;
  box-shadow: var(--shadow-rest);
  padding: 44px 36px 40px;
  text-align: center;
  animation: rise 700ms var(--ease-in) both;
}
.card.wide { max-width: 520px; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }
@media (max-width: 480px) { .card { padding: 36px 22px 32px; border-radius: 16px; } body { padding: 24px 14px; } }

/* ---------- type ---------- */

.mark { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 18px; }
h1 {
  font-size: clamp(1.7rem, 5vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 12px;
  text-wrap: balance;
}
p { margin: 0 0 18px; color: var(--muted); font-size: 1rem; line-height: 1.55; }
p.lede { font-size: 1.05rem; margin-bottom: 26px; }
.eyebrow {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- buttons ---------- */

.btn, form button {
  display: block;
  width: 100%;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  padding: 16px 22px;
  border: none;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-rest);
  transition: transform 250ms var(--ease-in), box-shadow 400ms var(--ease-in), opacity 200ms;
}
.btn:hover, form button:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn:active, form button:active { transform: translateY(0) scale(0.98); }
.btn[aria-disabled="true"], form button:disabled { opacity: 0.4; pointer-events: none; box-shadow: none; }

.retry {
  display: none;
  margin: 12px auto 0;
  font: inherit; font-size: 0.88rem; font-weight: 600;
  padding: 10px 18px;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--hair);
  border-radius: 999px;
  cursor: pointer;
}
.retry:hover { background: #fafafa; }
.retry.show { display: inline-block; }

.no {
  display: inline-block;
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.no:hover { color: var(--ink); }

/* ---------- forms ---------- */

form { display: flex; flex-direction: column; gap: 12px; }
input[type="email"], input[type="password"] {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 15px 18px;
  border: 1.5px solid var(--hair);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  transition: border-color 200ms;
}
input[type="email"]:focus, input[type="password"]:focus { border-color: var(--ink); outline: none; }
input[type="email"]::placeholder, input[type="password"]::placeholder { color: #a1a1a6; }
.linkish { background: none; border: none; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }

/* ---------- status / notes ---------- */

.status {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: left;
}
.status.show { display: block; }
.status.error, .status.unavailable { color: var(--danger); }

.hint { margin: 20px 0 0; font-size: 0.82rem; line-height: 1.5; color: var(--muted); }
.footnote { margin: 24px 0 0; font-size: 0.8rem; color: var(--muted); }
.footnote a { color: var(--muted); text-underline-offset: 2px; }
.footnote a:hover { color: var(--ink); }
.fine { margin: 10px 0 0; font-size: 0.78rem; line-height: 1.5; color: var(--muted); }
.err { display: none; margin: 12px 0 0; font-size: 0.85rem; color: var(--danger); }
.err.show { display: block; }

/* ---------- finish-claim ---------- */

.spinner {
  width: 30px; height: 30px; margin: 6px auto 22px;
  border: 3px solid var(--rule); border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- thank-you ---------- */

.check {
  width: 56px; height: 56px; border-radius: 50%;
  margin: 0 auto 20px;
  background: var(--ink); color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700;
}
.next { text-align: left; border-top: 1px solid var(--rule); margin-top: 26px; padding-top: 22px; }
.next .step { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

/* ---------- upsell ---------- */

.almost { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); margin: 0 0 14px; }
.progress { display: flex; gap: 6px; max-width: 300px; margin: 0 auto 10px; }
.progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--rule); }
.progress span.done { background: var(--ink); }
.steps { display: flex; justify-content: space-between; max-width: 300px; margin: 0 auto 10px; font-size: 0.72rem; color: var(--muted); }
.steps b { color: var(--ink); font-weight: 600; }
.paid { font-size: 0.85rem; margin: 0 0 28px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.story {
  text-align: left;
  background: var(--soft);
  border-radius: 14px;
  padding: 16px 18px;
  margin: 0 0 26px;
  font-size: 0.94rem;
  line-height: 1.55;
  color: var(--ink);
}
.story .fine-print { display: block; margin-top: 8px; font-size: 0.75rem; color: var(--muted); }
h2.list-head { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); text-align: left; margin: 0 0 12px; }
ul.incl { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; display: flex; flex-direction: column; gap: 10px; }
ul.incl li { display: flex; gap: 10px; font-size: 0.95rem; line-height: 1.45; color: var(--ink); }
ul.incl li::before { content: "\2713"; font-weight: 700; color: var(--ink); flex: 0 0 auto; }
.notfor { text-align: left; font-size: 0.88rem; margin: -8px 0 24px; }
.deadline {
  font-size: 0.88rem; font-weight: 600; color: var(--ink);
  margin: 0 0 24px; padding: 12px 14px;
  border: 1px solid var(--hair); border-radius: 14px;
}
.price { font-size: 3rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1; color: var(--ink); }
.price-note { font-size: 0.85rem; margin: 8px 0 24px; }

/* ---------- downsell ---------- */

.schedule { border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; margin: 0 0 24px; text-align: left; }
.row { display: flex; justify-content: space-between; padding: 13px 16px; font-size: 0.95rem; color: var(--ink); }
.row + .row { border-top: 1px solid var(--rule); }
.row .amt { font-weight: 600; font-variant-numeric: tabular-nums; }
.row.total { background: var(--soft); font-weight: 700; }
