/* ===== Design tokens — matches AdvancePay frontend exactly ===== */
:root {
  /* Backgrounds */
  --bg:          hsl(0 0% 4%);      /* #0a0a0a */
  --bg-card:     hsl(0 0% 8%);      /* #141414 */
  --bg-popover:  hsl(0 0% 10%);     /* #1a1a1a */
  --bg-muted:    hsl(0 0% 12%);     /* #1f1f1f */
  --bg-input:    hsl(0 0% 15%);     /* #262626 */

  /* Text */
  --fg:          hsl(0 0% 95%);     /* #f2f2f2 */
  --fg-muted:    hsl(0 0% 60%);     /* #999 */

  /* Brand */
  --primary:     hsl(0 85% 50%);    /* red */
  --secondary:   hsl(270 60% 45%);  /* purple */
  --accent:      hsl(270 70% 55%);  /* bright purple */

  /* Status */
  --green:       hsl(142 70% 45%);
  --yellow:      hsl(38 92% 50%);
  --orange:      hsl(25 95% 53%);
  --cyan:        hsl(190 80% 50%);

  /* Borders */
  --border:      hsl(0 0% 18%);     /* #2e2e2e */

  /* Derived */
  --radius:      8px;
  --radius-md:   6px;
  --radius-sm:   4px;
  --transition:  0.2s ease;
  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* Scrollbar — red themed */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background: var(--bg-card); }
::-webkit-scrollbar-thumb { background: hsl(0 85% 40% / 0.5); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background: hsl(0 85% 50% / 0.7); }

/* ===== Utilities ===== */
.container { width:100%; max-width:1140px; margin:0 auto; padding:0 24px; }

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

.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Card (matches app Card component) ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ===== Badge ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 hsl(142 70% 45% / 0.4); }
  50%     { box-shadow: 0 0 0 5px hsl(142 70% 45% / 0); }
}

/* ===== Buttons (matches app button variants) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn--primary:hover {
  background: hsl(0 85% 45%);
}

.btn--outline {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn--outline:hover {
  background: var(--bg-muted);
}

.btn--ghost {
  background: transparent;
  color: var(--fg-muted);
  border-color: transparent;
}
.btn--ghost:hover {
  background: var(--bg-muted);
  color: var(--fg);
}

.btn--lg {
  padding: 12px 24px;
  font-size: 14px;
  border-radius: var(--radius);
}

/* ===== Section header ===== */
.section-head { text-align:center; margin-bottom:56px; }

.section-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: hsl(0 85% 50% / 0.1);
  border: 1px solid hsl(0 85% 50% / 0.2);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 15px;
  color: var(--fg-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* =========================================================
   HEADER
   ========================================================= */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 14px 0;
  transition: background var(--transition), border-color var(--transition), padding var(--transition);
}

.header--scrolled {
  background: hsl(0 0% 4% / 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo — matches Sidebar logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo__icon { color: var(--primary); }

.logo__text {
  font-size: 18px;
  font-weight: 700;
}

/* Nav */
.nav { display:flex; gap:28px; }

.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  transition: color var(--transition);
}
.nav__link:hover { color: var(--fg); }

.header__actions { display:flex; gap:10px; align-items:center; }

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.burger span {
  width: 20px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: var(--transition);
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 110px 0 80px;
  overflow: hidden;
}

.hero__bg { position:absolute; inset:0; pointer-events:none; }

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
}
.hero__glow--red {
  width: 500px; height: 500px;
  background: var(--primary);
  top: -180px; right: -80px;
  opacity: 0.12;
}
.hero__glow--purple {
  width: 350px; height: 350px;
  background: var(--accent);
  bottom: -120px; left: -60px;
  opacity: 0.08;
}

.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(hsl(0 85% 50% / 0.03) 1px, transparent 1px),
    linear-gradient(90deg, hsl(0 85% 50% / 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 65%);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero__title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero__subtitle {
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 440px;
}

.hero__actions { display:flex; gap:12px; flex-wrap:wrap; }

/* ===== Hero card (mimics dashboard) ===== */
.hero-card { overflow:hidden; box-shadow: 0 0 40px hsl(0 85% 50% / 0.06), 0 16px 48px hsl(0 0% 0% / 0.3); animation: float 6s ease-in-out infinite; }

@keyframes float {
  0%,100% { transform:translateY(0); }
  50%     { transform:translateY(-8px); }
}

.hero-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-popover);
}

.hero-card__dots { display:flex; gap:5px; }
.hero-card__dots span { width:9px; height:9px; border-radius:50%; }
.hero-card__dots span:nth-child(1) { background:#ef4444; }
.hero-card__dots span:nth-child(2) { background:#eab308; }
.hero-card__dots span:nth-child(3) { background:#22c55e; }

.hero-card__label { font-size:12px; color:var(--fg-muted); font-weight:500; }

.hero-card__body { padding:16px; display:flex; flex-direction:column; gap:12px; }

.hero-card__row { display:flex; gap:10px; }

.hero-card__stat {
  flex: 1;
  background: var(--bg-popover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-card__stat-label {
  font-size: 11px;
  color: var(--fg-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hero-card__stat-value {
  font-size: 17px;
  font-weight: 700;
}

.hero-card__chart {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-popover);
  border: 1px solid var(--border);
  padding: 10px;
  height: 80px;
}
.hero-card__chart svg { width:100%; height:100%; }

.chart-line {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: draw 2s ease forwards 0.4s;
}
.chart-area {
  opacity: 0;
  animation: fadein 0.8s ease forwards 1.6s;
}

@keyframes draw { to { stroke-dashoffset:0; } }
@keyframes fadein { to { opacity:1; } }

.hero-card__footer { display:flex; gap:10px; flex-wrap:wrap; }

.hero-card__tag {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
}
.hero-card__tag--green  { background: hsl(142 70% 45% / 0.12); color: var(--green); }
.hero-card__tag--purple { background: hsl(270 60% 45% / 0.12); color: var(--accent); }
.hero-card__tag--yellow { background: hsl(38 92% 50% / 0.12); color: var(--yellow); }

/* =========================================================
   FEATURES
   ========================================================= */
.features { padding: 100px 0; }

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature { padding:28px; transition: background var(--transition), border-color var(--transition); }
.feature:hover { background: var(--bg-popover); border-color: hsl(0 0% 22%); }

.feature__icon {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature__icon--red    { background: hsl(0 85% 50% / 0.1);   color: var(--primary); }
.feature__icon--purple { background: hsl(270 60% 45% / 0.1); color: var(--accent); }
.feature__icon--green  { background: hsl(142 70% 45% / 0.1); color: var(--green); }
.feature__icon--orange { background: hsl(25 95% 53% / 0.1);  color: var(--orange); }
.feature__icon--cyan   { background: hsl(190 80% 50% / 0.1); color: var(--cyan); }

.feature__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature__desc {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.65;
}

/* =========================================================
   HOW IT WORKS
   ========================================================= */
.how {
  padding: 100px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}

.step {
  text-align: center;
  flex: 1;
  max-width: 280px;
}

.step__num {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.step__title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step__desc {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
}

.step__divider {
  width: 48px;
  height: 2px;
  margin-top: 22px;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0.25;
  border-radius: 2px;
}

/* =========================================================
   STATS
   ========================================================= */
.stats { padding: 80px 0; }

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat { padding:28px 20px; text-align:center; transition: border-color var(--transition), box-shadow var(--transition); }
.stat:hover { border-color: var(--primary); box-shadow: 0 0 20px hsl(0 85% 50% / 0.15); }

.stat__value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.stat__label {
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 500;
}

/* =========================================================
   BENEFITS
   ========================================================= */
.benefits { padding: 100px 0; }

.benefits__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.benefit {
  display: flex;
  gap: 16px;
  padding: 24px;
  transition: background var(--transition), border-color var(--transition);
}
.benefit:hover { background: var(--bg-popover); border-color: hsl(0 0% 22%); }

.benefit__icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(0 85% 50% / 0.1);
  color: var(--primary);
}

.benefit__title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.benefit__desc {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* =========================================================
   CTA
   ========================================================= */
.cta {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.cta__bg { position:absolute; inset:0; pointer-events:none; }

.cta__glow { position:absolute; border-radius:50%; filter:blur(140px); }
.cta__glow--red    { width:400px; height:400px; background:var(--primary); opacity:0.08; top:-160px; left:50%; transform:translateX(-50%); }
.cta__glow--purple { width:250px; height:250px; background:var(--accent); opacity:0.06; bottom:-80px; right:15%; }

.cta__inner { text-align:center; max-width:520px; margin:0 auto; position:relative; }

.cta__title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.cta__desc {
  font-size: 15px;
  color: var(--fg-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

.cta__actions { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  padding: 48px 0 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

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

.footer__about {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin-top: 14px;
  max-width: 260px;
}

.footer__cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer__col-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
  margin-bottom: 14px;
}

.footer__link {
  display: block;
  font-size: 14px;
  color: var(--fg-muted);
  padding: 3px 0;
  transition: color var(--transition);
}
.footer__link:hover { color: var(--fg); }

.footer__bottom {
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer__bottom p { font-size:13px; color:var(--fg-muted); }

/* =========================================================
   TOAST
   ========================================================= */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--fg);
  box-shadow: 0 8px 32px hsl(0 0% 0% / 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 200;
}

.toast svg { color: var(--yellow); flex-shrink: 0; }

.toast.is-active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns:1fr; gap:40px; text-align:center; }
  .hero__subtitle { margin-left:auto; margin-right:auto; }
  .hero__actions { justify-content:center; }
  .hero-card { max-width:480px; margin:0 auto; }
  .features__grid { grid-template-columns: repeat(2,1fr); }
  .stats__grid { grid-template-columns: repeat(2,1fr); }
  .footer__top { grid-template-columns:1fr; gap:32px; }
}

@media (max-width: 768px) {
  .nav, .header__actions { display:none; }
  .burger { display:flex; }

  .nav--open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 56px; left:0; right:0;
    background: hsl(0 0% 4% / 0.95);
    backdrop-filter: blur(16px);
    padding: 20px 24px;
    gap: 14px;
    border-bottom: 1px solid var(--border);
    z-index: 99;
  }

  .hero { min-height:auto; padding:96px 0 56px; }
  .hero__title { font-size:32px; }
  .features__grid { grid-template-columns:1fr; }
  .steps { flex-direction:column; align-items:center; gap:24px; }
  .step__divider { width:2px; height:32px; }
  .stats__grid { grid-template-columns:1fr 1fr; }
  .benefits__grid { grid-template-columns:1fr; }
  .footer__cols { grid-template-columns:1fr; gap:20px; }

  .features, .how, .benefits, .cta { padding:72px 0; }
}

@media (max-width: 480px) {
  .hero-card__row { flex-direction:column; }
  .stat__value { font-size:24px; }

  .btn--lg {
    width: 100%;
    justify-content: center;
  }

  .hero__actions,
  .cta__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .stats__grid { grid-template-columns:1fr; }
}
