/* ─────────────────────────────────────────────────────────────
   Tally — shared design system for doyoutally.com

   Ported from the APP (index.html :root + .btn-primary). The site
   used to invent its own look; it now speaks the app's language, so
   what a visitor sees on the web is what they get when they install.

   THE HOUSE BUTTON is the load-bearing piece: a surface-coloured
   centre, a gradient RING, and gradient TEXT. Never a solid gradient
   fill. Two gradients ride the same component:

     default  → --grad       purple → pink        (Tally)
     .club    → --grad-club  purple → pink → gold (Club Tally)

   Both come from `--g`, so a single `.btn` implementation serves both.
   Scope a subtree with class="club" and every gradient inside re-tints.

   GOTCHA: `.btn` paints its label through `> span`. JS that swaps a
   button's text MUST write the span (see btnLabel() in index.html),
   not `.textContent` on the button — that eats the span and the label
   turns invisible.
   ───────────────────────────────────────────────────────────── */

:root {
  /* brand */
  --purple:    #7B00FF;
  --pink:      #FF006E;
  --gold:      #FFD54A;
  --grad:      linear-gradient(135deg, #7B00FF, #FF006E);
  --grad-club: linear-gradient(135deg, #7B00FF, #FF006E 50%, #FFD54A);
  --g:         var(--grad);          /* the ACTIVE gradient — .club overrides */

  /* surfaces + text — identical to the app's light theme */
  --bg:        #f5f5f5;
  --surface:   #ffffff;
  --raised:    #f8f8f8;
  --muted:     #f0f0f0;
  --border:    #e8e8e8;
  --t1:        #222222;
  --t2:        #666666;
  --t3:        #aaaaaa;
  --accent-bg: #fdf4ff;

  --glow:      rgba(123, 0, 255, 0.30);
}

/* Club Tally: same components, gold-tipped gradient. */
.club {
  --g:    var(--grad-club);
  --glow: rgba(255, 140, 60, 0.30);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--t1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ── Gradient text ─────────────────────────────────────────── */
.grad {
  background: var(--g);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ── The house button ──────────────────────────────────────────
   surface centre (padding-box) + gradient ring (border-box).
   The label is a child <span> so it can carry gradient text. */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 30px;
  font-family: inherit; font-size: 1rem; font-weight: 700;
  color: var(--purple);                       /* fallback if clip fails */
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              var(--g) border-box;
  border: 1.5px solid transparent;
  border-radius: 12px;
  cursor: pointer; text-decoration: none;
  -webkit-appearance: none; appearance: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn > span {
  background: var(--g);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: inherit;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px var(--glow); }
.btn:active {
  transform: none;
  background: linear-gradient(var(--raised), var(--raised)) padding-box,
              var(--g) border-box;
}
.btn:disabled { opacity: 0.55; cursor: default; transform: none; box-shadow: none; }

.btn.lg  { padding: 15px 34px; font-size: 1.02rem; border-radius: 13px; }
.btn.sm  { padding: 9px 20px;  font-size: 0.92rem; border-radius: 11px; }
.btn.block { display: flex; width: 100%; }

/* Quiet sibling — no ring, just gradient text on a bordered surface. */
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 30px; font-size: 1.02rem; font-weight: 700;
  color: var(--purple); background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 13px;
  text-decoration: none; cursor: pointer; font-family: inherit;
  transition: background 0.15s ease;
}
.btn-ghost:hover { background: var(--accent-bg); }

/* Inverse — the ONLY button that sits on a full-bleed gradient.
   Same outline logic, white ink. Its label needs no span. */
.btn-inv {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 34px; font-size: 1.05rem; font-weight: 700;
  color: #fff; background: transparent;
  border: 1.7px solid rgba(255,255,255,0.85); border-radius: 13px;
  text-decoration: none; cursor: pointer; font-family: inherit;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn-inv:hover { background: rgba(255,255,255,0.14); transform: translateY(-1px); }
.btn-inv:active { background: rgba(255,255,255,0.22); transform: none; }

/* ── Surfaces ──────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 30px 26px;
}
/* Informational, never button-shaped: surface + gradient ring + gradient text. */
.house-card {
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              var(--g) border-box;
  border: 1.5px solid transparent; border-radius: 12px;
  padding: 10px 14px; text-align: center;
  font-size: 0.9rem; font-weight: 700;
}
.pill {
  display: inline-block; padding: 6px 15px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.02em;
  color: var(--purple); background: var(--accent-bg);
  border: 1px solid #f0d9ff; border-radius: 999px;
}
.club .pill { border-color: #f4e2c4; }

/* ── Nav / header ──────────────────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245,245,245,0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; display: block; }
.brand-logo.sm { width: 28px; height: 28px; border-radius: 7px; }
.brand span {
  font-size: 1.32rem; font-weight: 800; letter-spacing: -0.02em;
  background: var(--g);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand small {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.10em;
  text-transform: uppercase; color: var(--t3);
  border-left: 1px solid var(--border); padding-left: 11px; margin-left: -2px;
}

/* ── Sections ──────────────────────────────────────────────── */
section.block { padding: 80px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 54px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.section-head p { font-size: 1.08rem; color: var(--t2); }

/* ── Full-bleed gradient banner (the app's splash/paywall surface) ── */
.cta-banner {
  margin: 80px auto; max-width: 920px; border-radius: 28px;
  background: var(--g); padding: 60px 32px; text-align: center; color: #fff;
  box-shadow: 0 24px 60px var(--glow);
}
.cta-banner h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.cta-banner p { font-size: 1.1rem; opacity: 0.92; max-width: 520px; margin: 0 auto 30px; }

/* ── Footer ────────────────────────────────────────────────── */
footer { padding: 44px 0; border-top: 1px solid var(--border); }
.foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.foot .brand span { font-size: 1.1rem; }
.foot .copy { font-size: 0.85rem; color: var(--t3); }
.foot .copy a { color: var(--t2); text-decoration: none; }
.foot .copy a:hover { color: var(--purple); }

@media (max-width: 760px) {
  section.block { padding: 56px 0; }
  .cta-banner { margin: 56px auto; padding: 46px 24px; }
}
