/* ============================================
   ARLIVRA - Design System (Light default + Dark toggle)
   ============================================ */

:root {
  /* Brand Colors */
  --primary: #00b377;
  --primary-dark: #009963;
  --primary-glow: rgba(0, 179, 119, 0.12);
  --secondary: #f59f00;
  --accent: #5b54e6;

  /* LIGHT THEME (default) */
  --bg: #f7f8fb;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-soft: #eef0f6;
  --border: #e1e5ee;
  --border-soft: #edeff5;

  --text: #0e1320;
  --text-muted: #5a6378;
  --text-dim: #8a92a6;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, .08);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, .12);
  --shadow-glow: 0 0 32px var(--primary-glow);

  --atmosphere-1: rgba(0, 179, 119, .08);
  --atmosphere-2: rgba(91, 84, 230, .06);
  --atmosphere-3: rgba(245, 159, 0, .05);

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Type */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* DARK THEME */
[data-theme="dark"] {
  --primary: #00d68f;
  --primary-dark: #00b377;
  --primary-glow: rgba(0, 214, 143, 0.15);
  --secondary: #ffb547;
  --accent: #6c63ff;

  --bg: #0a0e1a;
  --bg-elevated: #131826;
  --bg-card: #1a2032;
  --bg-soft: #222842;
  --border: #2a3148;
  --border-soft: #1f2538;

  --text: #e8ecf4;
  --text-muted: #9ba3b8;
  --text-dim: #6b7390;

  --shadow-sm: 0 2px 8px rgba(0,0,0,.25);
  --shadow-md: 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.45);

  --atmosphere-1: rgba(0,214,143,.08);
  --atmosphere-2: rgba(108,99,255,.07);
  --atmosphere-3: rgba(255,181,71,.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, var(--atmosphere-1), transparent 45%),
    radial-gradient(circle at 85% 20%, var(--atmosphere-2), transparent 50%),
    radial-gradient(circle at 50% 90%, var(--atmosphere-3), transparent 55%);
  z-index: -1;
  pointer-events: none;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); margin-bottom: .6rem; }

p { color: var(--text-muted); }

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--text-muted);
  max-width: 640px;
}

/* ============================================
   LAYOUT
   ============================================ */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
section { padding: 80px 0; }

/* ============================================
   HEADER / NAV
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-soft);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.logo-text { color: var(--text); }
.logo-text span { color: var(--primary); }

.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: .95rem;
  transition: color .2s;
}
.nav-links a:hover { color: var(--primary); }
.nav-actions { display: flex; gap: 12px; align-items: center; }

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all .25s ease;
  padding: 0;
}
.theme-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: rotate(15deg);
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

@media (max-width: 768px) { .nav-links { display: none; } }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: all .2s ease;
  border: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,179,119,.3);
}
[data-theme="dark"] .btn-primary {
  color: #061018;
  box-shadow: 0 4px 14px rgba(0,214,143,.35);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,179,119,.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-soft);
  border-color: var(--primary);
}

.btn-lg { padding: 16px 32px; font-size: 1.05rem; }

/* ============================================
   HERO
   ============================================ */
.hero { padding: 100px 0 60px; position: relative; text-align: center; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  animation: pulse 2s ease infinite;
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

.hero h1 { margin-bottom: 24px; }

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero .lead { margin: 0 auto 36px; text-align: center; }

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.trust-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 60px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: .9rem;
}

.trust-item svg { color: var(--primary); }

/* ============================================
   SECTIONS
   ============================================ */
.section-alt { background: var(--bg-elevated); }
[data-theme="dark"] .section-alt { background: var(--bg-elevated); }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 60px;
}

.section-head .eyebrow {
  display: inline-block;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .25em;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 16px;
}

/* ============================================
   STEPS / HOW IT WORKS
   ============================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  position: relative;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  transition: all .3s ease;
  box-shadow: var(--shadow-sm);
}

.step:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.step-num {
  position: absolute;
  top: -16px;
  left: 32px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .step-num { color: #061018; }

.step-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--primary-glow);
  display: grid;
  place-items: center;
  margin: 14px 0 20px;
  color: var(--primary);
}

.step h3 { margin-bottom: 8px; }
.step p { font-size: .95rem; }

/* ============================================
   EARNING METHODS
   ============================================ */
.earn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.earn-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all .3s ease;
  box-shadow: var(--shadow-sm);
}

.earn-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.earn-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.earn-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}

.icon-bg-1 { background: rgba(0,179,119,.12); color: var(--primary); }
.icon-bg-2 { background: rgba(245,159,0,.12); color: var(--secondary); }
.icon-bg-3 { background: rgba(91,84,230,.12); color: var(--accent); }
.icon-bg-4 { background: rgba(230,69,69,.12); color: #e64545; }

[data-theme="dark"] .icon-bg-1 { background: rgba(0,214,143,.15); }
[data-theme="dark"] .icon-bg-2 { background: rgba(255,181,71,.15); }
[data-theme="dark"] .icon-bg-3 { background: rgba(108,99,255,.15); }
[data-theme="dark"] .icon-bg-4 { background: rgba(255,99,99,.15); color: #ff6363; }

.earn-pay {
  font-size: .85rem;
  color: var(--primary);
  font-weight: 600;
  background: rgba(0,179,119,.1);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}
[data-theme="dark"] .earn-pay { background: rgba(0,214,143,.1); }

.earn-card h3 { margin-bottom: 10px; }
.earn-card p { font-size: .95rem; margin-bottom: 16px; }

.earn-meta {
  display: flex;
  gap: 16px;
  font-size: .85rem;
  color: var(--text-dim);
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}
.earn-meta span { display: flex; align-items: center; gap: 6px; }

/* ============================================
   STATS
   ============================================ */
.stats {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-muted);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* ============================================
   REWARDS
   ============================================ */
.rewards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

.reward-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  transition: all .25s;
  box-shadow: var(--shadow-sm);
}

.reward-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.reward-icon { font-size: 2.5rem; margin-bottom: 12px; }
.reward-name { font-weight: 600; color: var(--text); margin-bottom: 4px; }
.reward-min { font-size: .8rem; color: var(--text-dim); }

/* ============================================
   FAQ
   ============================================ */
.faq-grid {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-q {
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--text);
  user-select: none;
}

.faq-q::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform .25s;
}

.faq-item.open .faq-q::after { transform: rotate(45deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  padding: 0 24px;
  color: var(--text-muted);
  transition: max-height .3s ease, padding .3s ease;
}

.faq-item.open .faq-a {
  max-height: 400px;
  padding: 0 24px 22px;
}

/* ============================================
   CTA
   ============================================ */
.cta {
  background:
    radial-gradient(circle at 30% 50%, rgba(0,179,119,.12), transparent 60%),
    radial-gradient(circle at 70% 50%, rgba(91,84,230,.08), transparent 60%),
    var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 64px 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .cta {
  background:
    radial-gradient(circle at 30% 50%, rgba(0,214,143,.15), transparent 60%),
    radial-gradient(circle at 70% 50%, rgba(108,99,255,.1), transparent 60%),
    var(--bg-card);
}

.cta h2 { margin-bottom: 16px; }
.cta p { max-width: 540px; margin: 0 auto 28px; }

/* ============================================
   FORMS
   ============================================ */
input, select, textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

input::placeholder, textarea::placeholder { color: var(--text-dim); }

/* Auth card */
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: .9rem;
  max-width: 320px;
}

.footer-col h4 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .15em;
  color: var(--text);
  margin-bottom: 18px;
  font-family: var(--font-body);
  font-weight: 600;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: var(--text-muted);
  font-size: .9rem;
  transition: color .2s;
}
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-dim);
  font-size: .85rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp .6s ease both; }
