/* ==========================================================================
   ClockwiseCards — "Felt" shared web stylesheet
   One static file, no build step, CSP-safe (works inline or as a file).
   Every value is a LiquidGlass token verbatim (tokens/liquidGlass.ts).
   No web fonts. Target weight: ~6 KB raw.
   ========================================================================== */

:root {
  /* surfaces */
  --cw-grad: linear-gradient(160deg, #0f172a, #1e1b4b 45%, #312e81);
  --cw-sheet: #0f172a;
  /* glass */
  --cw-glass-bg: rgba(255, 255, 255, 0.08);
  --cw-glass-border: rgba(255, 255, 255, 0.14);
  --cw-glass-bg-subtle: rgba(255, 255, 255, 0.05);
  --cw-glass-border-subtle: rgba(255, 255, 255, 0.1);
  /* text */
  --cw-text: #f1f5f9;
  --cw-text-strong: #ffffff;
  --cw-text-secondary: #e4eeff;
  --cw-text-muted: #94a3b8;      /* labels/meta on gradient only */
  --cw-text-body-muted: #ccd5e0; /* AA-safe muted body on glass */
  --cw-placeholder: rgba(255, 255, 255, 0.4);
  --cw-link: #a78bfa;
  --cw-link-hover: #c4b5fd;
  /* actions */
  --cw-cta: linear-gradient(135deg, #7c3aed, #6d28d9);
  --cw-cta-hover: linear-gradient(135deg, #8b5cf6, #7c3aed);
  --cw-focus: rgba(167, 139, 250, 0.6);
  /* status (semantic only — never brand) */
  --cw-success: #22c55e; --cw-success-text: #4ade80;
  --cw-error: #ef4444;   --cw-error-text: #f87171;
  --cw-warning: #f59e0b; --cw-warning-text: #fbbf24;
  --cw-info: #3b82f6;
  /* brand accents */
  --cw-gold: #C9A544;
  --cw-radius-card: 16px;
  --cw-radius-control: 12px;
}

/* ---- base ---------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--cw-sheet);
  background-image: var(--cw-grad);
  background-attachment: fixed;
  color: var(--cw-text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
a { color: var(--cw-link); text-decoration: none; }
a:hover { color: var(--cw-link-hover); text-decoration: underline; }
h1 { font-size: 24px; font-weight: 700; color: var(--cw-text-strong); line-height: 1.25; margin: 0; }
h2 { font-size: 20px; font-weight: 700; color: var(--cw-text-strong); line-height: 1.3; margin: 0; }
:focus-visible { outline: 2px solid var(--cw-focus); outline-offset: 2px; border-radius: 4px; }

/* ---- layout --------------------------------------------------------- */
.cw-page { max-width: 640px; margin: 0 auto; padding: 24px 20px 48px; }
.cw-page--reading { max-width: 720px; }         /* legal long-form */
.cw-measure { max-width: 62ch; }

/* ---- header / footer (identical on all 11 pages) -------------------- */
.cw-header {
  height: 56px; display: flex; align-items: center; gap: 10px;
  padding: 0 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.6);
}
.cw-header__lockup { display: flex; align-items: center; gap: 9px; }
.cw-header__lockup img { height: 28px; width: auto; display: block; }
/* wordmark swap: replace the mark+text pair with ONE
   <img src="/brand/wordmark-lockup.svg" height="24" alt="ClockwiseCards"> */
.cw-footer {
  margin-top: 48px; padding: 20px; border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center;
}
.cw-footer nav { display: flex; gap: 14px 18px; flex-wrap: wrap; justify-content: center; font-size: 13px; }
.cw-footer small { font-size: 12px; color: var(--cw-text-muted); }

/* ---- glass card ------------------------------------------------------ */
.cw-card {
  background: var(--cw-glass-bg);
  border: 1px solid var(--cw-glass-border);
  border-radius: var(--cw-radius-card);
  padding: 20px;
}
.cw-card--subtle { background: var(--cw-glass-bg-subtle); border-color: var(--cw-glass-border-subtle); padding: 16px; border-radius: 12px; }

/* ---- buttons --------------------------------------------------------- */
.cw-btn {
  display: block; width: 100%; min-height: 48px;
  border: 0; border-radius: var(--cw-radius-control); padding: 14px 22px;
  font: 600 16px/1.2 inherit; font-family: inherit; color: var(--cw-text-strong);
  text-align: center; cursor: pointer;
}
.cw-btn--primary { background: var(--cw-cta); }
.cw-btn--primary:hover { background: var(--cw-cta-hover); }
.cw-btn--join { background: rgba(124, 58, 237, 0.22); border: 1px solid rgba(167, 139, 250, 0.5); }
.cw-btn--ghost { background: var(--cw-glass-bg); border: 1px solid rgba(255, 255, 255, 0.18); }
.cw-btn--store { background: rgba(15, 23, 42, 0.7); border: 1px solid rgba(255, 255, 255, 0.18); font-size: 13px; min-height: 42px; padding: 10px; border-radius: 10px; }
.cw-btn:disabled { background: rgba(255, 255, 255, 0.05); color: var(--cw-text-muted); cursor: default; border-color: rgba(255,255,255,0.08); }
.cw-btn-row { display: flex; gap: 10px; }
.cw-btn-row .cw-btn { flex: 1; }

/* ---- forms ----------------------------------------------------------- */
.cw-field { display: flex; flex-direction: column; gap: 6px; }
.cw-field label { font-size: 13px; font-weight: 600; color: var(--cw-text-secondary); }
.cw-input {
  width: 100%; background: var(--cw-glass-bg);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--cw-radius-control); padding: 12px 14px;
  font: 400 16px/1.3 inherit; font-family: inherit; color: var(--cw-text-strong);
}
.cw-input::placeholder { color: var(--cw-placeholder); }
.cw-input:focus { outline: none; border: 2px solid var(--cw-focus); padding: 11px 13px; background: rgba(255, 255, 255, 0.15); }
.cw-input[aria-invalid="true"] { border: 2px solid rgba(239, 68, 68, 0.6); background: rgba(239, 68, 68, 0.1); padding: 11px 13px; }
.cw-hint { font-size: 12px; color: var(--cw-text-muted); }
.cw-error-text { font-size: 12px; font-weight: 500; color: var(--cw-error-text); }

/* ---- labels / pills / banners ---------------------------------------- */
.cw-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--cw-link); }
.cw-label { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--cw-text-muted); }
.cw-pill { display: inline-block; background: rgba(255, 255, 255, 0.12); border-radius: 9999px; padding: 4px 12px; font-size: 12px; font-weight: 600; color: var(--cw-text-strong); }
.cw-banner { border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.5; color: var(--cw-text-secondary); }
.cw-banner--info    { background: rgba(59, 130, 246, 0.14);  border: 1px solid rgba(59, 130, 246, 0.35); }
.cw-banner--pending { background: rgba(245, 158, 11, 0.12);  border: 1px solid rgba(245, 158, 11, 0.35); }
.cw-banner--error   { background: rgba(239, 68, 68, 0.12);   border: 1px solid rgba(239, 68, 68, 0.4); }
.cw-result-icon {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700;
}
.cw-result-icon--ok { background: rgba(34, 197, 94, 0.16); border: 1px solid rgba(34, 197, 94, 0.45); color: var(--cw-success-text); }
.cw-result-icon--err { background: rgba(239, 68, 68, 0.16); border: 1px solid rgba(239, 68, 68, 0.45); color: var(--cw-error-text); }

/* ---- host note (invite) ---------------------------------------------- */
.cw-hostnote { background: var(--cw-glass-bg-subtle); border-left: 3px solid var(--cw-link); border-radius: 0 12px 12px 0; padding: 12px 14px; }

/* ---- divider with text ------------------------------------------------ */
.cw-divider { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--cw-text-muted); }
.cw-divider::before, .cw-divider::after { content: ""; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.1); }

/* ---- long-form reading (privacy / terms / delete-account) ------------- */
.cw-toc { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; font-size: 14px; }
@media (max-width: 480px) { .cw-toc { grid-template-columns: 1fr; } }
.cw-section-head { display: flex; align-items: baseline; gap: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 8px; margin: 32px 0 12px; }
.cw-section-head .num { font-size: 14px; font-weight: 700; color: var(--cw-gold); }
.cw-body { font-size: 15.5px; line-height: 1.7; color: var(--cw-text-secondary); max-width: 62ch; }
.cw-list-x li::marker { content: "✕  "; color: var(--cw-error-text); }
.cw-list-ok li::marker { content: "✓  "; color: var(--cw-success-text); }

/* ---- FAQ (support) ----------------------------------------------------- */
.cw-faq details { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.cw-faq summary { padding: 14px 4px; font-size: 15px; font-weight: 600; color: var(--cw-text-strong); cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.cw-faq summary::-webkit-details-marker { display: none; }
.cw-faq summary::after { content: "+"; color: var(--cw-link); font-size: 18px; transition: transform 0.15s; }
.cw-faq details[open] summary::after { transform: rotate(45deg); }
.cw-faq details > div { padding: 0 4px 16px; font-size: 14.5px; line-height: 1.6; color: var(--cw-text-body-muted); }

/* ---- redirect pages (check-in / approve-phone-change) ------------------ */
@keyframes cw-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.cw-handoff-mark { width: 72px; height: 72px; margin: 0 auto; animation: cw-pulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .cw-handoff-mark { animation: none; } }
