/* ============================================================
   TaskHub — taskhubreward.online
   Design system: "Clean Light Pro"
   Tokens → base → components → sections → motion
   ============================================================ */

/* ── Tokens ────────────────────────────────────────────────── */
:root {
  /* Color */
  --ground: #FAFAF9;
  --ground-dark: #111114;
  --surface: #FFFFFF;
  --ink: #14141A;
  --ink-2: #56565F;
  --ink-inv: #F5F5F4;
  --ink-inv-2: #A1A1AA;
  --line: #E7E5E4;
  --line-dark: #2A2A30;
  --violet: #7B5EF8;
  --violet-deep: #5B3FD6;
  --violet-soft: rgba(123, 94, 248, 0.08);
  --success: #16A34A;

  /* Type */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, sans-serif;
  --fs-display: clamp(2.75rem, 7vw, 5.5rem);
  --fs-h2: clamp(1.75rem, 3.5vw, 2.75rem);
  --fs-h3: clamp(1.25rem, 2vw, 1.5rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-xs: 0.75rem;

  /* Space scale */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  /* Misc */
  --radius: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 1px 2px rgba(20, 20, 26, 0.04), 0 8px 24px rgba(20, 20, 26, 0.06);
  --shadow-pop: 0 2px 4px rgba(20, 20, 26, 0.06), 0 16px 40px rgba(20, 20, 26, 0.12);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--violet-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--s5);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

/* ── Type ──────────────────────────────────────────────────── */
h1 {
  font-size: var(--fs-display);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
}

h2 {
  font-size: var(--fs-h2);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 700;
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.lede {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 34rem;
}

.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--violet-deep);
  margin-bottom: var(--s4);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: var(--radius);
  padding: 0.875rem 1.75rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 150ms var(--ease-out), box-shadow 150ms var(--ease-out),
              background 150ms var(--ease-out);
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--violet);
  color: #FFFFFF;
  box-shadow: 0 1px 2px rgba(123, 94, 248, 0.3);
}
.btn-primary:hover {
  background: var(--violet-deep);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(123, 94, 248, 0.35);
}
.btn-primary:active { transform: translateY(0) scale(0.97); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink-2); transform: translateY(-2px); }
.btn-ghost:active { transform: scale(0.97); }

.btn-on-dark {
  background: var(--violet);
  color: #FFFFFF;
}
.btn-on-dark:hover {
  background: #8D74FA;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(123, 94, 248, 0.45);
}

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 249, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--violet);
  color: #FFF;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 800;
}
.brand-logo {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero { padding: var(--s9) 0 var(--s8); }
.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 48rem;
}
.hero h1 { margin-bottom: var(--s5); }
.hero .lede { margin-bottom: var(--s6); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s4);
  align-items: center;
}
.hero-note {
  margin-top: var(--s4);
  font-size: var(--fs-small);
  color: var(--ink-2);
}

/* Phone mockup — pure HTML/CSS product render */
.phone {
  width: min(280px, 72vw);
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 36px;
  padding: 14px;
  box-shadow: var(--shadow-pop);
}
.phone-screen {
  background: var(--ground);
  border-radius: 26px;
  overflow: hidden;
  padding: var(--s4);
}
.phone-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s4);
}
.phone-user { display: flex; align-items: center; gap: var(--s2); }
.avatar-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
}
.phone-name { font-size: 0.8125rem; font-weight: 600; }
.phone-id { font-size: 0.6875rem; color: var(--ink-2); }
.balance-chip {
  background: var(--violet-soft);
  color: var(--violet-deep);
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
}
.task-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: var(--s3);
  margin-bottom: var(--s3);
}
.task-card-row { display: flex; align-items: center; gap: var(--s3); }
.task-emoji {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--violet-soft);
  display: grid; place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.task-title { font-size: 0.8125rem; font-weight: 600; }
.task-sub { font-size: 0.6875rem; color: var(--ink-2); }
.task-reward {
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--success);
}
.task-cta {
  margin-top: var(--s3);
  width: 100%;
  background: var(--violet);
  color: #FFF;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  padding: 8px 0;
  border-radius: 9px;
}
.task-card.dim { opacity: 0.55; }

/* ── Trust strip ───────────────────────────────────────────── */
.trust-strip {
  border-block: 1px solid var(--line);
  background: var(--surface);
  padding: var(--s5) 0;
}
.trust-strip .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s5);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink);
}
.trust-item svg { flex-shrink: 0; color: var(--violet-deep); }

/* ── How it works (dark ground) ────────────────────────────── */
.how {
  background: var(--ground-dark);
  color: var(--ink-inv);
  padding: var(--s9) 0;
}
.how h2 { color: var(--ink-inv); }
.how .lede { color: var(--ink-inv-2); }
.how-head { max-width: 40rem; margin-bottom: var(--s8); }
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s6);
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 26px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: var(--line-dark);
  transform: scaleX(var(--line-progress, 0));
  transform-origin: left;
  transition: transform 900ms var(--ease-out);
}
.step { position: relative; padding-top: var(--s7); }
.step-num {
  position: absolute;
  top: 0; left: 0;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--ground-dark);
  border: 2px solid var(--line-dark);
  display: grid;
  place-items: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink-inv);
  transition: border-color 400ms var(--ease-out), background 400ms var(--ease-out);
}
.step.is-visible .step-num {
  border-color: var(--violet);
  background: var(--violet);
}
.step h3 { margin-bottom: var(--s3); color: var(--ink-inv); }
.step p { font-size: var(--fs-small); color: var(--ink-inv-2); max-width: 30ch; }

/* ── Feature deep-dives ────────────────────────────────────── */
.feature {
  padding: var(--s9) 0;
}
.feature:nth-of-type(even) { background: var(--surface); }
.feature .container {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: var(--s8);
  align-items: center;
}
.feature.reverse .container { grid-template-columns: 2fr 3fr; }
.feature .container.solo { grid-template-columns: 1fr; max-width: 48rem; }
.feature.reverse .feature-media { order: -1; }
.feature h2 { margin-bottom: var(--s4); }
.feature p.lede { margin-bottom: var(--s5); }
.feature-list {
  list-style: none;
  display: grid;
  gap: var(--s3);
}
.feature-list li {
  display: flex;
  gap: var(--s3);
  align-items: flex-start;
  font-size: var(--fs-small);
  color: var(--ink);
}
.feature-list svg { flex-shrink: 0; color: var(--success); margin-top: 3px; }

/* Feature media mocks */
.mock {
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s5);
  box-shadow: var(--shadow-card);
}
.mock-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s3) var(--s4);
  margin-bottom: var(--s3);
  font-size: var(--fs-small);
}
.mock-row:last-child { margin-bottom: 0; }
.mock-row .task-reward { font-variant-numeric: tabular-nums; }
.mock-label {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: var(--s3);
}
.pill {
  font-size: var(--fs-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--violet-soft);
  color: var(--violet-deep);
}
.pill.green { background: rgba(22, 163, 74, 0.1); color: var(--success); }

/* ── Trust statement ───────────────────────────────────────── */
.trust { padding: 0 0 var(--s9); }
.trust-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--s8);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--s8);
  align-items: center;
  box-shadow: var(--shadow-card);
}
.trust-card blockquote {
  font-size: var(--fs-h3);
  line-height: 1.4;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.trust-points { display: grid; gap: var(--s4); }
.trust-point { display: flex; gap: var(--s3); font-size: var(--fs-small); }
.trust-point svg { flex-shrink: 0; color: var(--violet-deep); margin-top: 3px; }
.trust-point strong { display: block; margin-bottom: 2px; }
.trust-point span { color: var(--ink-2); }

/* ── FAQ ───────────────────────────────────────────────────── */
.faq { padding: var(--s9) 0; background: var(--surface); }
.faq .container { max-width: 720px; }
.faq h2 { margin-bottom: var(--s6); }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: var(--s4) 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.0625rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s4);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--ink-2);
  transition: transform 200ms var(--ease-out);
  flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  margin-top: var(--s3);
  font-size: var(--fs-small);
  color: var(--ink-2);
  max-width: 60ch;
}

/* ── CTA band ──────────────────────────────────────────────── */
.cta {
  background: var(--ground-dark);
  color: var(--ink-inv);
  padding: var(--s9) 0;
  text-align: center;
}
.cta h2 { color: var(--ink-inv); margin-bottom: var(--s4); }
.cta p { color: var(--ink-inv-2); margin-bottom: var(--s6); }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
  background: var(--ground-dark);
  color: var(--ink-inv-2);
  border-top: 1px solid var(--line-dark);
  padding: var(--s7) 0 var(--s5);
  font-size: var(--fs-small);
}
.site-footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s6);
}
.site-footer h4 {
  color: var(--ink-inv);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--s4);
}
.site-footer ul { list-style: none; display: grid; gap: var(--s3); }
.site-footer a { color: var(--ink-inv-2); }
.site-footer a:hover { color: var(--ink-inv); }
.footer-brand p { margin-top: var(--s3); max-width: 28ch; }
.footer-bottom {
  border-top: 1px solid var(--line-dark);
  margin-top: var(--s6);
  padding-top: var(--s5);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s3);
  font-size: var(--fs-xs);
}

/* ── Legal pages ───────────────────────────────────────────── */
.page-head { padding: var(--s8) 0 var(--s5); }
.page-body {
  padding-bottom: var(--s9);
  max-width: 68ch;
}
.page-body h2 { font-size: 1.375rem; margin: var(--s6) 0 var(--s3); }
.page-body p, .page-body li { font-size: var(--fs-small); color: var(--ink-2); margin-bottom: var(--s3); }
.page-body ul { padding-left: var(--s5); }

/* ── 404 ───────────────────────────────────────────────────── */
.notfound {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: var(--s7);
}
.notfound h1 { margin-bottom: var(--s4); }
.notfound p { color: var(--ink-2); margin-bottom: var(--s6); }

/* ── Motion (reduced-motion opt-out by design) ─────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
  .reveal.is-visible { opacity: 1; transform: none; }

  /* Hero headline: word-by-word rise (words wrapped by main.js) */
  .hero h1 .w {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.6em);
    filter: blur(4px);
    transition:
      opacity 550ms var(--ease-out),
      transform 550ms var(--ease-out),
      filter 550ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 65ms);
  }
  .hero h1.is-revealed .w { opacity: 1; transform: none; filter: none; }

  /* Step line traveling dot */
  .line-dot {
    position: absolute;
    top: 26px;
    left: calc(8% + (84% * var(--dot-pos, 0)));
    width: 10px; height: 10px;
    margin: -4px 0 0 -5px;
    border-radius: 50%;
    background: var(--violet);
    box-shadow: 0 0 12px 2px rgba(124, 92, 255, 0.55);
    opacity: 0;
    transition: left 900ms var(--ease-out), opacity 300ms;
    pointer-events: none;
  }
  .line-dot.is-live { opacity: 1; }

  /* Floating withdraw ping (bottom-left social proof) */
  .wd-ping {
    position: fixed;
    left: var(--s5, 20px);
    bottom: var(--s5, 20px);
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(280px, 80vw);
    padding: 10px 14px;
    background: var(--ground);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    font-size: 0.8125rem;
    color: var(--ink);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
  }
  .wd-ping.in { opacity: 1; transform: none; }
  .wd-ping-emoji { font-size: 1.25rem; }
  .wd-ping-amt {
    margin-left: 6px;
    font-weight: 700;
    color: var(--success);
    font-variant-numeric: tabular-nums;
  }

  /* Live feed rows fade in staggered */
  .feed-row {
    opacity: 0;
    transform: translateY(8px);
    animation: feed-in 450ms var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 120ms);
  }
  @keyframes feed-in { to { opacity: 1; transform: none; } }

  .phone-float { animation: phone-float 6s ease-in-out infinite; }
  @keyframes phone-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
  }
}

/* Reduced-motion / no-JS static states (outside the media query) */
.wd-ping {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  font-size: 0.8125rem;
}
.line-dot { display: none; }
@media (prefers-reduced-motion: no-preference) { .line-dot { display: block; } }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero .container,
  .feature .container,
  .feature.reverse .container,
  .trust-card {
    grid-template-columns: 1fr;
    gap: var(--s7);
  }
  .feature.reverse .feature-media { order: 0; }
  .trust-strip .container { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: var(--s7); }
  .steps::before { display: none; }
  .line-dot { display: none; }
  .site-footer .container { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .hero { padding-top: var(--s7); }
  .trust-strip .container { grid-template-columns: 1fr; gap: var(--s4); }
  .hero-actions .btn { width: 100%; }
  .site-footer .container { grid-template-columns: 1fr; gap: var(--s5); }
  .trust-card { padding: var(--s5); }
}
