/* ============================================================================
   ACF Club - shared design system (reskinned from the ACF Club site:
   Inter · brand blue #2563eb · amber accent · navy headings · slate neutrals ·
   rounded cards · soft shadows · focus rings). Applied to the existing app
   structure - same class names the apps already use, just polished.
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');
@import url('../tokens.css');   /* shared design tokens (light + dark) - same source as the public site */

:root {
  /* The apps' own token names, now ALIASED onto the shared token system so the
     apps and the public site are one brand and both follow light/dark. App
     component rules below are unchanged - they just resolve to themed values. */
  --bg: var(--bg-canvas);
  --card: var(--bg-surface);
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --faint: var(--text-muted);
  --line: var(--border);
  --navy: var(--text-primary);
  --brand: var(--primary);
  --brand-dark: var(--primary-hover);
  --brand-50: var(--blue-50);
  --accent: var(--accent-text);    /* used as text/icon colour → AA-safe amber */
  --accent-50: var(--accent-bg);
  --paid: var(--success);
  --paid-50: #ecfdf5;
  --free: var(--accent-text);
  --free-50: var(--accent-bg);
  --danger: var(--error);
  --danger-50: #fef2f2;
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px;
  --sh-sm: var(--shadow-sm);
  --sh-md: var(--shadow-md);
  --sh-lg: var(--shadow-lg);
}
/* dark variants for the status tints that have no direct site token */
:root[data-theme="dark"] { --paid-50: #11271d; --danger-50: #2a1416; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --paid-50: #11271d; --danger-50: #2a1416; } }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* layout containers */
.app { max-width: 480px; margin: 0 auto; padding: 20px 16px 56px; }
.app--wide { max-width: 1080px; }

/* sticky brand header */
header.bar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 11px;
  margin: -20px -16px 22px; padding: 14px 18px;
  background: color-mix(in srgb, var(--bg-surface) 85%, transparent); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
header.bar .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 19px;
  box-shadow: var(--sh-sm);
}
header.bar h1 { font-size: 17px; margin: 0; font-weight: 700; color: var(--navy); letter-spacing: -.01em; }

/* cards */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; margin-bottom: 16px; box-shadow: var(--sh-sm);
}
h2 { font-size: 18px; margin: 0 0 4px; font-weight: 700; color: var(--navy); letter-spacing: -.01em; }
h3 { font-size: 15px; margin: 0; font-weight: 700; color: var(--navy); }
.sub { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }

/* form fields */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 13px 0 5px; }
input, select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r);
  font-size: 15px; font-family: inherit; background: var(--bg-canvas); color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input::placeholder { color: var(--faint); }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }

/* buttons */
button {
  width: 100%; margin-top: 18px; padding: 11px 16px; border: 1px solid transparent; border-radius: var(--r);
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 600; font-family: inherit;
  cursor: pointer; box-shadow: var(--sh-sm); transition: background .15s, transform .05s, box-shadow .15s;
}
button:hover { background: var(--brand-dark); }
button:active { transform: scale(.985); }
button:disabled { opacity: .6; cursor: progress; }
button.secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
button.secondary:hover { background: var(--bg-surface-2); }
.link { background: none; color: var(--brand-dark); text-decoration: underline; width: auto; padding: 0; margin: 14px 0 0; font-size: 14px; font-weight: 600; box-shadow: none; }
.link:hover { background: none; }

/* messages */
.msg { margin-top: 14px; font-size: 13.5px; padding: 11px 13px; border-radius: var(--r); display: none; border: 1px solid transparent; }
.msg.show { display: block; }
.msg.error { background: var(--danger-50); color: var(--danger); border-color: color-mix(in srgb, var(--error) 32%, transparent); }
.msg.ok { background: var(--paid-50); color: var(--paid); border-color: color-mix(in srgb, var(--success) 35%, transparent); }

/* key/value rows */
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .k { color: var(--muted); }
.row .v { font-weight: 600; color: var(--ink); text-align: right; }

/* status pills */
.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; text-transform: capitalize; letter-spacing: .01em; }
.badge.paid { background: var(--paid-50); color: var(--paid); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--success) 40%, transparent); }
.badge.free { background: var(--free-50); color: var(--free); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }

/* member code + QR */
.code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 20px; font-weight: 700; letter-spacing: 1px; text-align: center; color: var(--navy); margin: 8px 0 14px; }
.qr { display: grid; place-items: center; margin: 8px 0 4px; }
.qr canvas { border: 1px solid var(--line); border-radius: var(--r); padding: 8px; background: #fff; }

.hidden { display: none; }
.center { text-align: center; }

/* ===== hub landing page ===== */
.hero { text-align: center; padding: 30px 12px 8px; }
.hero .eyebrow { color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.hero h1 { font-size: clamp(30px, 6vw, 46px); line-height: 1.08; font-weight: 800; color: var(--navy); letter-spacing: -.02em; margin: 12px 0 0; }
.hero h1 .hl { color: var(--brand); }
.hero p { color: var(--muted); font-size: 16px; max-width: 560px; margin: 16px auto 0; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }
.feature {
  display: block; text-align: left; background: var(--card); border: 1px solid var(--line);
  border-top: 4px solid var(--brand); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-sm);
  transition: box-shadow .18s, transform .18s; color: inherit; text-decoration: none;
}
.feature:hover { box-shadow: var(--sh-md); transform: translateY(-2px); text-decoration: none; }
.feature.amber { border-top-color: var(--accent); }
.feature.navy { border-top-color: var(--navy); }
.feature.emerald { border-top-color: var(--paid); }
.tile { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 14px; }
.tile svg { width: 24px; height: 24px; }
.tile.blue { background: var(--brand-50); color: var(--brand); }
.tile.amber { background: var(--accent-50); color: var(--accent); }
.tile.navy { background: var(--bg-surface-2); color: var(--navy); }
.tile.emerald { background: var(--paid-50); color: var(--paid); }
.feature h3 { font-size: 16px; margin: 0 0 5px; }
.feature p { color: var(--muted); font-size: 13.5px; margin: 0; }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin: 26px 4px 12px; }
.note { color: var(--faint); font-size: 12.5px; text-align: center; margin-top: 22px; }
