/* raffle.quest — Cal.com catalog (gray, charcoal CTA). External port of the
 * design-systems/cal fixture; colors/type/spacing only via tokens.css (no
 * :root here). Primary CTA is charcoal-on-white; the only blue is links. */

/* ─── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}

/* ─── Layout ────────────────────────────────────────────────────── */
.container { max-width: var(--container-max); margin-inline: auto; padding-inline: var(--container-gutter-desktop); }
section { padding-block: var(--section-y-desktop); }
section + section { border-top: 1px solid var(--border); }
@media (max-width: 1023px) {
  .container { padding-inline: var(--container-gutter-tablet); }
  section { padding-block: var(--section-y-tablet); }
}
@media (max-width: 639px) {
  .container { padding-inline: var(--container-gutter-phone); }
  section { padding-block: var(--section-y-phone); }
}

/* ─── Typography — Cal Sans for display (Google Fonts ships 400 only; no faux 600), Inter for body ─── */
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  color: var(--fg);
  margin: 0;
}
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); line-height: 1.3; }
p { margin: 0; }
.lead, .lede {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--muted);
  line-height: var(--leading-body);
  font-weight: 400;
  max-width: 56ch;
}
.lead, .lede { font-size: var(--text-xl); }
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.stack-3 > * + * { margin-block-start: var(--space-3); }
.stack-4 > * + * { margin-block-start: var(--space-4); }
.stack-6 > * + * { margin-block-start: var(--space-6); }

/* ─── Buttons — charcoal-on-white primary, ring-shadow secondary ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  border: none;
  transition:
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    opacity var(--motion-fast) var(--ease-standard);
  text-decoration: none;
}
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.btn-primary { background: var(--fg); color: #ffffff; }
.btn.btn-primary:hover { opacity: 0.85; }
.btn.btn-primary:active { opacity: 0.75; }
.btn-secondary, .btn-ghost {
  background: var(--surface);
  color: var(--fg);
  box-shadow: var(--elev-ring);
}
.btn-secondary:hover, .btn-ghost:hover {
  box-shadow:
    0 0 0 1px rgba(34, 42, 53, 0.12),
    0 1px 2px rgba(34, 42, 53, 0.04);
}

/* ─── Inputs — minimal, ring-on-focus ───────────────────────────── */
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--fg-2);
}
.field input, .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  outline: none;
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}
.field textarea {
  min-height: 220px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-feature-settings: "tnum";
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field input:focus-visible, .field textarea:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

/* ─── Cards — white surface, multi-layer ring-shadow stack ─────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: var(--elev-raised);
  transition: box-shadow var(--motion-base) var(--ease-standard);
}
.card:hover {
  box-shadow:
    0 2px 8px -4px rgba(19, 19, 22, 0.7),
    0 0 0 1px rgba(34, 42, 53, 0.1),
    0 8px 16px rgba(34, 42, 53, 0.06);
}
.card-elevated {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: var(--elev-raised);
}
.card-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  color: var(--fg);
}

/* ─── Badges ────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 3px var(--space-2);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--text-xs); font-weight: 500; line-height: 1.6;
}
.badge-success { color: var(--success); background: color-mix(in oklab, var(--success), transparent 90%); }
.badge-muted { color: var(--muted); background: color-mix(in oklab, var(--muted), transparent 92%); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ─── Links — the only blue in the system ──────────────────────── */
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a { cursor: pointer; }
a:hover { color: var(--accent-hover); }
a.btn { text-decoration: none; }
a.btn.btn-primary, a.btn.btn-primary:hover, a.btn.btn-primary:active { color: #ffffff; }

/* ─── Layout helpers — hero grid also drives .hero-inner ────────── */
.hero-grid, .hero-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-12);
  align-items: end;
}
@media (max-width: 1023px) {
  .hero-grid, .hero-inner { grid-template-columns: 1fr; gap: var(--space-8); }
}
@media (max-width: 767px) {
  .hero-inner { grid-template-columns: 1fr; }
}

/* ─── Page ──────────────────────────────────────────────────────── */
.hero { position: relative; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: var(--space-6);
}
.brand {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.02em;
}
a.brand, a.brand:hover { color: var(--fg); text-decoration: none; }
.brand span { color: var(--muted); }
.toggle {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  min-height: 44px;
  color: var(--fg-2);
  font-size: var(--text-sm);
  cursor: pointer;
}
.toggle input { width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer; }
.toggle input:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.win {
  display: none;
  padding: var(--space-5);
  border-radius: var(--radius-sm);
  background: color-mix(in oklab, var(--success), transparent 90%);
  color: var(--fg);
  font-size: var(--text-xl);
  font-weight: 400;
}
.win.show { display: block; }
.err { color: var(--danger); font-size: var(--text-sm); }
.err:empty { display: none; }
.out { display: none; }
.out.show { display: flex; }
.mono, code {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  font-feature-settings: "tnum";
  color: var(--fg-2);
  word-break: break-all;
}
.nicks { margin: 0; padding-left: var(--space-5); color: var(--fg-2); }
.hint { color: var(--muted); font-size: var(--text-xs); }
.eyebrow, .hint { color: var(--fg-2); }
.qr {
  width: 160px;
  height: 160px;
  background: var(--fg);
  border-radius: var(--radius-sm);
}
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ─── Shared focus-visible ──────────────────────────────────────── */
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ─── Responsive page tweaks ────────────────────────────────────── */
@media (max-width: 639px) {
  h1 { font-size: 36px; }
  .btn-primary { width: 100%; }
}

/* ─── Reduced motion ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .card:hover { box-shadow: var(--elev-raised); }
}
