/* ═══════════════════════════════════════════
   LOYALTA — Loyalty Program SaaS
   Design System & Styles
   ═══════════════════════════════════════════ */

/* ---------- CSS Variables ---------- */
:root {
  --bg-primary: #07070e;
  --bg-secondary: #0d0d1a;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --border-subtle: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.15);

  --text-primary: #f0f0f5;
  --text-secondary: rgba(240,240,245,0.6);
  --text-muted: rgba(240,240,245,0.35);

  --accent-1: #7c5cfc;
  --accent-2: #00d4aa;
  --accent-3: #ff6b9d;
  --accent-gradient: linear-gradient(135deg, #7c5cfc 0%, #00d4aa 50%, #ff6b9d 100%);
  --accent-gradient-text: linear-gradient(135deg, #a78bfa, #00d4aa);
  --accent-glow: rgba(124,92,252,0.25);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --transition-fast: .2s cubic-bezier(.4,0,.2,1);
  --transition-base: .35s cubic-bezier(.4,0,.2,1);
  --transition-slow: .6s cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset ---------- */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

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

/* ---------- Section spacing ---------- */
section {
  padding: 100px 0;
  position: relative;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 16px;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(124,92,252,0.1);
  border: 1px solid rgba(124,92,252,0.2);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.03em;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-header .section-subtitle {
  margin: 0 auto;
}

/* ---------- Gradient text ---------- */
.gradient-text {
  background: var(--accent-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-main);
  font-size: .95rem;
  font-weight: 600;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-1);
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:hover {
  background: #6a48e8;
  transform: translateY(-2px);
  box-shadow: 0 8px 40px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 14px 20px;
}
.btn-ghost:hover {
  color: var(--text-primary);
}

/* ---------- HEADER / NAV ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition-base);
}
.header.scrolled {
  background: rgba(7,7,14,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 0;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  padding: 8px 16px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 10px;
  transition: all var(--transition-fast);
}
.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .4;
  animation: orbFloat 8s ease-in-out infinite alternate;
}
.hero-bg .orb-1 {
  width: 500px; height: 500px;
  background: var(--accent-1);
  top: -10%; right: -5%;
  animation-delay: 0s;
}
.hero-bg .orb-2 {
  width: 400px; height: 400px;
  background: var(--accent-2);
  bottom: -15%; left: -10%;
  animation-delay: -3s;
}
.hero-bg .orb-3 {
  width: 300px; height: 300px;
  background: var(--accent-3);
  top: 40%; left: 40%;
  animation-delay: -5s;
  opacity: .2;
}

@keyframes orbFloat {
  to { transform: translate(40px, -30px) scale(1.1); }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-text { max-width: 580px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 16px;
  border-radius: 100px;
  background: rgba(124,92,252,0.1);
  border: 1px solid rgba(124,92,252,0.25);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 28px;
  animation: fadeUp .8s ease-out both;
}
.hero-badge .badge-tag {
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--accent-1);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.04em;
  margin-bottom: 24px;
  animation: fadeUp .8s ease-out .1s both;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 40px;
  animation: fadeUp .8s ease-out .2s both;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeUp .8s ease-out .3s both;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border-subtle);
  animation: fadeUp .8s ease-out .4s both;
}
.hero-stat h3 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -.03em;
}
.hero-stat span {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

/* Hero Visual — Dashboard mockup */
.hero-visual {
  position: relative;
  animation: fadeUp 1s ease-out .3s both;
}

.dashboard-mockup {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px;
  backdrop-filter: blur(20px);
  box-shadow: 0 40px 100px rgba(0,0,0,0.4);
  position: relative;
}

.mockup-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.mockup-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.mockup-dot:nth-child(1) { background: #ff5f57; }
.mockup-dot:nth-child(2) { background: #ffbd2e; }
.mockup-dot:nth-child(3) { background: #28c840; }

.mockup-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mockup-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}
.mockup-card .mc-label {
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.mockup-card .mc-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.mockup-card .mc-change {
  font-size: .8rem;
  color: var(--accent-2);
  margin-top: 4px;
}

.mockup-chart {
  grid-column: 1 / -1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  min-height: 140px;
  position: relative;
  overflow: hidden;
}
.mockup-chart .mc-label {
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 12px;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 90px;
}
.chart-bar {
  flex: 1;
  border-radius: 6px 6px 0 0;
  background: var(--accent-1);
  opacity: .6;
  animation: barGrow 1.2s ease-out both;
  position: relative;
}
.chart-bar:nth-child(even) { background: var(--accent-2); }
.chart-bar:nth-child(1) { height: 40%; animation-delay: .5s; }
.chart-bar:nth-child(2) { height: 60%; animation-delay: .6s; }
.chart-bar:nth-child(3) { height: 45%; animation-delay: .7s; }
.chart-bar:nth-child(4) { height: 80%; animation-delay: .8s; }
.chart-bar:nth-child(5) { height: 55%; animation-delay: .9s; }
.chart-bar:nth-child(6) { height: 90%; animation-delay: 1s; }
.chart-bar:nth-child(7) { height: 70%; animation-delay: 1.1s; }
.chart-bar:nth-child(8) { height: 95%; animation-delay: 1.2s; }
.chart-bar:nth-child(9) { height: 65%; animation-delay: 1.3s; }
.chart-bar:nth-child(10) { height: 85%; animation-delay: 1.4s; }

@keyframes barGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.floating-notification {
  position: absolute;
  right: -30px;
  top: 40px;
  background: rgba(15,15,30,0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
  animation: notifSlide 1s ease-out 1.5s both;
  white-space: nowrap;
}
.floating-notification .notif-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(0,212,170,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.floating-notification .notif-text strong {
  display: block;
  font-size: .82rem;
}
.floating-notification .notif-text span {
  font-size: .75rem;
  color: var(--text-muted);
}

@keyframes notifSlide {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ---------- FEATURES ---------- */
.features { background: var(--bg-secondary); }

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}
.feature-icon.purple { background: rgba(124,92,252,0.12); }
.feature-icon.green { background: rgba(0,212,170,0.12); }
.feature-icon.pink { background: rgba(255,107,157,0.12); }
.feature-icon.blue { background: rgba(56,189,248,0.12); }
.feature-icon.orange { background: rgba(251,146,60,0.12); }
.feature-icon.teal { background: rgba(45,212,191,0.12); }

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -.01em;
}
.feature-card p {
  font-size: .92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ---------- HOW IT WORKS ---------- */
.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
}
.how-it-works-grid::before {
  content: '';
  position: absolute;
  top: 44px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-subtle) 20%, var(--border-subtle) 80%, transparent);
}

.step-card {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step-number {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  margin: 0 auto 24px;
  transition: all var(--transition-base);
}
.step-card:hover .step-number {
  border-color: var(--accent-1);
  box-shadow: 0 0 30px var(--accent-glow);
  background: rgba(124,92,252,0.1);
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.step-card p {
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------- INTEGRATIONS ---------- */
.integrations { background: var(--bg-secondary); }

.integrations-showcase {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.integration-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: default;
}
.integration-item:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.integration-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.integration-item span {
  font-weight: 600;
  font-size: .95rem;
}

/* ---------- PRICING ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
}
.pricing-card.featured {
  border-color: var(--accent-1);
  box-shadow: 0 0 80px rgba(124,92,252,0.12);
  transform: scale(1.04);
}
.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 80px rgba(0,0,0,0.3);
}
.pricing-card.featured:hover {
  transform: scale(1.04) translateY(-6px);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 20px;
  border-radius: 100px;
  background: var(--accent-1);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.pricing-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.pricing-card .pricing-desc {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.price {
  font-size: 2.8rem;
  font-weight: 900;
  letter-spacing: -.04em;
  margin-bottom: 4px;
}
.price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}
.price-note {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.pricing-features {
  text-align: left;
  margin-bottom: 32px;
}
.pricing-features li {
  padding: 10px 0;
  font-size: .9rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.pricing-features li:last-child { border-bottom: none; }
.pricing-features li .check {
  color: var(--accent-2);
  font-weight: 700;
}

.pricing-card .btn { width: 100%; }

/* ---------- CTA SECTION ---------- */
.cta-section {
  background: var(--bg-secondary);
}

.cta-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 72px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%; height: 200%;
  background: conic-gradient(from 0deg at 50% 50%, transparent 0%, rgba(124,92,252,0.05) 25%, transparent 50%, rgba(0,212,170,0.05) 75%, transparent 100%);
  animation: spin 20s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.cta-box > * { position: relative; z-index: 1; }

.cta-box h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin-bottom: 16px;
}
.cta-box p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 36px;
}
.cta-box .cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- FOOTER ---------- */
.footer {
  padding: 60px 0 30px;
  border-top: 1px solid var(--border-subtle);
}

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

.footer-brand p {
  color: var(--text-secondary);
  font-size: .9rem;
  margin-top: 16px;
  max-width: 280px;
  line-height: 1.7;
}

.footer-col h4 {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.footer-col a {
  display: block;
  padding: 6px 0;
  color: var(--text-secondary);
  font-size: .9rem;
  transition: color var(--transition-fast);
}
.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: .82rem;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  gap: 16px;
}
.footer-socials a {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  transition: all var(--transition-fast);
}
.footer-socials a:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-card.featured { transform: scale(1); }
  .pricing-card.featured:hover { transform: translateY(-6px); }
  .how-it-works-grid { grid-template-columns: repeat(2, 1fr); }
  .how-it-works-grid::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  section { padding: 72px 0; }

  .nav-links { display: none; }
  .nav-actions .btn-ghost,
  .nav-actions .btn-secondary { display: none; }
  .mobile-toggle { display: block; }

  /* Mobile nav */
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 16px; right: 16px;
    background: rgba(13,13,26,0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    gap: 4px;
  }
  .nav-links.active a {
    padding: 12px 16px;
    width: 100%;
  }

  .features-grid { grid-template-columns: 1fr; }
  .how-it-works-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }

  .hero-stats { flex-direction: column; gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }

  .cta-box { padding: 48px 24px; }
}
