/* ============================================================
   MAGICPAY — styles.css
   Dark/Light theme | Inter font | Mobile-first
   ============================================================ */

/* ---- CSS VARIABLES ---- */
:root {
  /* Dark theme (default) */
  --bg:            #0a0a0a;
  --bg-secondary:  #111111;
  --bg-card:       #141414;
  --bg-card-hover: #1a1a1a;
  --border:        rgba(255,255,255,0.08);
  --border-hover:  rgba(255,255,255,0.18);

  --text-primary:  #f5f5f5;
  --text-secondary:#a0a0a0;
  --text-muted:    #606060;

  --accent:        #ffffff;
  --accent-inv:    #0a0a0a;
  --accent-glow:   rgba(255,255,255,0.06);

  --btn-primary-bg:    #ffffff;
  --btn-primary-text:  #0a0a0a;
  --btn-ghost-text:    #f5f5f5;
  --btn-outline-border:rgba(255,255,255,0.3);
  --btn-outline-text:  #f5f5f5;

  --navbar-bg:     rgba(10,10,10,0.85);
  --shadow-card:   0 1px 3px rgba(0,0,0,0.6), 0 8px 32px rgba(0,0,0,0.4);
  --shadow-btn:    0 4px 20px rgba(255,255,255,0.15);

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;

  --transition: 0.22s ease;
}

[data-theme="light"] {
  --bg:            #ffffff;
  --bg-secondary:  #f7f7f7;
  --bg-card:       #ffffff;
  --bg-card-hover: #f2f2f2;
  --border:        rgba(0,0,0,0.08);
  --border-hover:  rgba(0,0,0,0.18);

  --text-primary:  #111111;
  --text-secondary:#555555;
  --text-muted:    #999999;

  --accent:        #111111;
  --accent-inv:    #ffffff;
  --accent-glow:   rgba(0,0,0,0.04);

  --btn-primary-bg:    #111111;
  --btn-primary-text:  #ffffff;
  --btn-ghost-text:    #111111;
  --btn-outline-border:rgba(0,0,0,0.3);
  --btn-outline-text:  #111111;

  --navbar-bg:     rgba(255,255,255,0.88);
  --shadow-card:   0 1px 3px rgba(0,0,0,0.06), 0 8px 32px rgba(0,0,0,0.08);
  --shadow-btn:    0 4px 20px rgba(0,0,0,0.15);
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---- CONTAINER ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
}
.btn--primary:hover {
  opacity: 0.88;
  box-shadow: var(--shadow-btn);
  transform: translateY(-1px);
}

.btn--ghost {
  color: var(--btn-ghost-text);
  background: transparent;
}
.btn--ghost:hover { opacity: 0.7; }

.btn--outline {
  color: var(--btn-outline-text);
  border: 1px solid var(--btn-outline-border);
  background: transparent;
}
.btn--outline:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.btn--lg { padding: 13px 26px; font-size: 15px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--navbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.navbar__logo-img {
  width: 170px;
  height: 72px;
  object-fit: contain;
}
.navbar__logo-text {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
}

/* Desktop nav */
.navbar__nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: space-between;
  padding-left: 40px;
}
.navbar__nav-group { display: flex; align-items: center; gap: 2px; }

.navbar__item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 450;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.navbar__item:hover { color: var(--text-primary); background: var(--accent-glow); }

.navbar__actions { display: flex; align-items: center; gap: 8px; }

/* Right side (theme toggle + hamburger) */
.navbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 16px;
}

.theme-toggle {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition);
}
.theme-toggle:hover { background: var(--accent-glow); color: var(--text-primary); }

[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px; height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.hamburger:hover { background: var(--accent-glow); }
.hamburger span {
  display: block;
  width: 20px; height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 140px 0 80px;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

/* subtle radial glow behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}
[data-theme="light"] .hero::before {
  background: radial-gradient(circle, rgba(0,0,0,0.03) 0%, transparent 70%);
}

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

.hero__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero__title {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.hero__desc {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 420px;
  margin-bottom: 36px;
}

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

/* Dashboard card */
.hero__dashboard-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--bg-card);
}
.hero__dashboard-img { width: 100%; height: auto; display: block; }

/* ============================================================
   STATS
   ============================================================ */
.stats {
  padding: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

.stats__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 32px 24px;
  border-right: 1px solid var(--border);
  transition: background var(--transition);
}
.stats__item:last-child { border-right: none; }
.stats__item:hover { background: var(--accent-glow); }

.stats__icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-primary);
}

.stats__value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text-primary);
  line-height: 1.1;
}
.stats__value--text { font-size: 20px; }
.stats__label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ============================================================
   SECTION HELPERS
   ============================================================ */
.section-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(26px, 3.5vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  color: var(--text-primary);
}

.section-header { margin-bottom: 52px; }

/* ============================================================
   SOLUTIONS
   ============================================================ */
.solutions {
  padding: 100px 0;
  background: var(--bg);
}

.solutions__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.solution-card {
  background: var(--bg-card);
  padding: 28px 24px;
  transition: background var(--transition);
  position: relative;
}
.solution-card:hover { background: var(--bg-card-hover); }

.solution-card__icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-primary);
  margin-bottom: 16px;
  background: var(--bg-secondary);
  transition: border-color var(--transition);
}
.solution-card:hover .solution-card__icon { border-color: var(--border-hover); }

.solution-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.solution-card__desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================================
   DATA SECTION
   ============================================================ */
.data-section {
  padding: 100px 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.data-section__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.data-section__content .section-title { margin-bottom: 28px; }


.data-section__desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 28px;
  max-width: 480px;
}

.data-section__checklist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 36px;
}

.data-section__checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--text-secondary);
}
.data-section__checklist svg { color: var(--text-primary); flex-shrink: 0; }

.data-section__dashboard-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--bg-card);
}
.data-section__dashboard-img { width: 100%; height: auto; display: block; }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  padding: 72px 0;
  background: var(--bg);
}

.cta-banner__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 48px 52px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  flex-wrap: wrap;
}

.cta-banner__icon {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  color: var(--text-primary);
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.cta-banner__text { flex: 1; min-width: 200px; }
.cta-banner__title {
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.cta-banner__desc { font-size: 14px; color: var(--text-secondary); }

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


/* Rewards nav item badge */
.navbar__item--rewards {
  color: var(--text-primary);
  font-weight: 600;
  position: relative;
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

/* Main centered block: logo + slogan */
.footer__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 24px 48px;
}

.footer__logo-img {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
  margin-bottom: 18px;
}

.footer__slogan {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 300px;
}

.footer__divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

/* Bottom bar */
.footer__bottom { padding: 20px 0; }
.footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer__copy { font-size: 12px; color: var(--text-muted); }
.footer__bottom-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer__bottom-links a {
  font-size: 12px;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer__bottom-links a:hover { color: var(--text-primary); }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-up--delay { transition-delay: 0.15s; }

/* ============================================================
   RESPONSIVE — TABLET (≤ 960px)
   ============================================================ */
@media (max-width: 960px) {
  .navbar__nav { display: none; }
  .hamburger { display: flex; }

  /* Mobile dropdown nav */
  .navbar__nav.nav-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    gap: 4px;
    z-index: 999;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .navbar__nav-group {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
  }
  .navbar__item {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    justify-content: flex-start;
    display: flex;
  }
  .navbar__actions {
    flex-direction: column;
    width: 100%;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    gap: 10px;
  }
  .navbar__actions .btn { width: 100%; justify-content: center; }

  /* Hero */
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero__desc { max-width: 100%; }
  .hero__cta { justify-content: center; }
  .hero__visual { order: -1; }

  /* Stats */
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stats__item:nth-child(2) { border-right: none; }
  .stats__item:nth-child(3) { border-right: 1px solid var(--border); border-top: 1px solid var(--border); }
  .stats__item:nth-child(4) { border-right: none; border-top: 1px solid var(--border); }

  /* Solutions */
  .solutions__grid { grid-template-columns: repeat(2, 1fr); }

  /* Data section */
  .data-section__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* CTA Banner */
  .cta-banner__inner { flex-direction: column; text-align: center; padding: 36px 28px; }
  .cta-banner__actions { justify-content: center; }

  /* Footer */
  /* footer mobile — handled by flex column in base styles */

  /* Navbar centralizada no mobile */
  .navbar__inner {
    position: relative;
    justify-content: center;
  }
  .navbar__logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  .navbar__right {
    position: absolute;
    right: 20px;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (≤ 600px)
   ============================================================ */
@media (max-width: 600px) {
  .hero { padding: 100px 0 60px; }
  .hero__title { letter-spacing: -0.8px; }

  .stats__grid { grid-template-columns: 1fr 1fr; }
  .stats__item { padding: 20px 16px; }
  .stats__value { font-size: 22px; }

  .solutions { padding: 64px 0; }
  .solutions__grid { grid-template-columns: 1fr; }

  .data-section { padding: 64px 0; }

  .cta-banner { padding: 40px 0; }
  .cta-banner__inner { padding: 28px 20px; }
  .cta-banner__actions { flex-direction: column; width: 100%; }
  .cta-banner__actions .btn { width: 100%; justify-content: center; }

  .footer__bottom-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer__bottom-links { justify-content: center; gap: 12px; }

  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; justify-content: center; }
}