/*
 * theme.css — Viral Referral Loop.
 * Direction: a "drop day" ticket — warm paper, deep indigo ink, a hot coral
 * accent used big (the discount number, the share button). Cards carry a
 * hard offset shadow like a printed stub. Display: Bricolage Grotesque;
 * body: DM Sans; figures: JetBrains Mono.
 */

:root {
  --canvas: #fbf7f0;
  --surface: #ffffff;
  --surface-2: #f3ede3;
  --border: #e3dccf;
  --border-strong: #b9b0a2;
  --ink: #1b1a2e;
  --muted: #5f5a6c;
  --accent: #d63a25;
  --accent-hover: #bb2e1b;
  --accent-ink: #ffffff;
  --accent-text: #b3301d;
  --accent-strong: #9e2716;
  --accent-soft: #fde3dc;
  --accent-border: #f3a898;
  --success: #15803d;
  --success-ink: #ffffff;
  --success-soft: #dcefe2;
  --success-strong: #126b34;
  --warning: #b45309;
  --warning-ink: #ffffff;
  --warning-soft: #f7e7d4;
  --warning-strong: #9a4507;
  --danger: #b91c1c;
  --danger-ink: #ffffff;
  --danger-soft: #f6dddd;
  --danger-strong: #a51818;
  --chart-1: #d63a25;
  --chart-2: #4b45c6;
  --chart-3: #0f8b8d;
  --chart-4: #c98a12;
  --chart-5: #8e3b8c;
  --chart-6: #5a6478;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display-weight: 800;
  --display-tracking: -0.035em;
  --eyebrow-tracking: 0.12em;

  --radius-btn: 12px;
  --radius-card: 18px;
  --radius-input: 10px;
  --border-w: 1px;
  --border-strong-w: 1.5px;
  --shadow-card: 5px 5px 0 #1b1a2e;
  --shadow-raised: 0 18px 40px -12px rgba(0, 0, 0, 0.25);
  --shadow-btn: 3px 3px 0 #1b1a2e;
  --card-pad: 1.5rem;
  --btn-weight: 700;
}

html[data-theme="dark"] {
  --canvas: #13121d;
  --surface: #1c1b2a;
  --surface-2: #252436;
  --border: #33314a;
  --border-strong: #565274;
  --ink: #f4f1fb;
  --muted: #aca8bf;
  --accent: #ff6a4f;
  --accent-hover: #ff8670;
  --accent-ink: #1a0d0a;
  --accent-text: #ff8d78;
  --accent-strong: #ffb7a7;
  --accent-soft: #3b1f20;
  --accent-border: #74342b;
  --success: #2fb36a;
  --success-ink: #07160d;
  --success-soft: #16301f;
  --success-strong: #6fd39a;
  --warning: #e08a2c;
  --warning-ink: #1c0f03;
  --warning-soft: #36260f;
  --warning-strong: #f0b46e;
  --danger: #e5484d;
  --danger-ink: #1c0606;
  --danger-soft: #3a191b;
  --danger-strong: #f19b9b;
  --chart-1: #ff6a4f;
  --chart-2: #8b85ff;
  --chart-3: #3cc6c8;
  --chart-4: #f0b44a;
  --chart-5: #d47ad2;
  --chart-6: #9aa3b8;
  --shadow-card: 5px 5px 0 #000000;
  --shadow-btn: 3px 3px 0 #000000;
}

/*
 * app.css — the parts that make this app itself: the ticket the join form
 * sits on, the discount ladder stubs, the punch card that fills as friends
 * join, and the bands of the landing page. Tokens only.
 */

body { font-family: var(--font-body); }

.display {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: var(--display-tracking);
  line-height: 0.98;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}
.wordmark .icon { color: var(--accent-text); }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--eyebrow-tracking);
  color: var(--accent-text);
}
.caps { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; }

/* ---- the hero ------------------------------------------------------------ */
.hero-ground {
  background:
    radial-gradient(60rem 30rem at 85% -10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    var(--canvas);
}
.hero-photo {
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-card);
}
.burst {
  position: absolute;
  right: 1rem;
  top: 1rem;
  display: grid;
  place-items: center;
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 0.85rem;
  line-height: 1.05;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transform: rotate(-10deg);
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.45);
}
.burst strong { font-size: 2.1rem; letter-spacing: -0.03em; }

/* ---- the ticket: the join form, the share card ---------------------------- */
.ticket {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.75rem;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  top: 4.25rem;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: var(--canvas);
  border: 2px solid var(--ink);
}
.ticket::before { left: -0.7rem; clip-path: inset(0 0 0 50%); }
.ticket::after { right: -0.7rem; clip-path: inset(0 50% 0 0); }
.invite {
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-input);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.95rem;
}

/* ---- the ladder stubs ------------------------------------------------------- */
.stub {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.5rem 1.25rem;
  background: var(--surface);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-card);
}
.stub-count { font-weight: 700; color: var(--muted); }
.stub-pct {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 3.75rem;
  line-height: 1;
  letter-spacing: -0.05em;
  color: var(--ink);
}
.stub-price { font-size: 0.9rem; color: var(--muted); }
.stub-top {
  border-style: solid;
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-card);
}
.stub-top .stub-pct,
.stub-top .stub-count,
.stub-top .stub-price { color: var(--accent-ink); }

.check-dot {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.check-dot .icon { width: 1rem; height: 1rem; }

/* ---- the dark statement band ------------------------------------------------ */
.band-dark { background: var(--ink); color: var(--canvas); }

/* ---- the live dot ------------------------------------------------------------ */
.live-dot { animation: live-pulse 1.6s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: 0.35; } }

/* ---- the dashboard ------------------------------------------------------------ */
.discount-figure { font-size: 6rem; line-height: 0.9; }
@media (min-width: 768px) { .discount-figure { font-size: 9rem; } }
.discount-off { font-size: 0.32em; margin-left: 0.4rem; letter-spacing: -0.01em; }

.punch-card {
  padding: 1.5rem;
  border: 2px solid var(--ink);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  align-self: end;
}
.punch {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  max-width: 3.25rem;
  border-radius: 999px;
  border: 2px dashed var(--border-strong);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
  background: var(--canvas);
}
.punch.is-tier { border-style: solid; border-color: var(--accent-border); }
.punch.is-on {
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.punch .icon { width: 1.1rem; height: 1.1rem; }
.punch-label { font-size: 0.75rem; font-weight: 700; color: var(--accent-text); }

.share-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease;
}
.share-tile:hover { border-color: var(--ink); transform: translateY(-2px); text-decoration: none; }

.code-chip {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 2px dashed var(--accent);
  border-radius: var(--radius-input);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.drop-card { transition: transform 160ms ease; }
.drop-card:hover { transform: translate(-2px, -2px); text-decoration: none; }

html.reduced-motion .live-dot { animation: none; }
html.reduced-motion .share-tile:hover,
html.reduced-motion .drop-card:hover { transform: none; }
