/* ── CSS Reset & Design System Tokens ────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Plus+Jakarta+Sans:wght@700;800;900&display=swap');

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

:root {
  /* Colors - Dark Theme (Default) */
  --bg-primary: #030712;
  --bg-secondary: #0B0F19;
  --bg-tertiary: #111827;
  --text-primary: #F9FAFB;
  --text-secondary: #9CA3AF;
  --text-muted: #4B5563;
  
  /* Product Accents */
  --pos-color: #10B981;
  --pos-glow: rgba(16, 185, 129, 0.15);
  
  --store-color: #A855F7;
  --store-glow: rgba(168, 85, 247, 0.15);
  
  --kas-color: #06B6D4;
  --kas-glow: rgba(6, 182, 210, 0.15);
  
  --pay-color: #EC4899;
  --pay-glow: rgba(236, 72, 153, 0.15);
  
  /* Universal Gradients */
  --gradient-main: linear-gradient(135deg, #06B6D4 0%, #10B981 100%);
  --gradient-card-border: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Overrides */
html.light {
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F1F5F9;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  
  --gradient-card-border: linear-gradient(180deg, rgba(15, 23, 42, 0.08) 0%, rgba(15, 23, 42, 0.02) 100%);
}

html {
  font-family: 'Inter', sans-serif;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.4s ease, color 0.4s ease;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.02em;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Navbar UI ────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(3, 7, 18, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
}

html.light .navbar {
  background: rgba(248, 250, 252, 0.8);
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.5rem;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition-smooth);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  transition: var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.dark-toggle {
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.15rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

html.light .dark-toggle {
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.dark-toggle:hover {
  transform: scale(1.05);
  background: var(--bg-secondary);
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--gradient-main);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

html.light .btn-outline {
  border: 1px solid rgba(15, 23, 42, 0.15);
}

.btn-outline:hover {
  background: var(--bg-tertiary);
  border-color: var(--text-primary);
}

/* ── Hero Section UI ──────────────────────────────────── */
.hero {
  position: relative;
  padding: 200px 0 120px 0;
  text-align: center;
  overflow: hidden;
  background: radial-gradient(circle at top, rgba(6, 182, 212, 0.05) 0%, transparent 60%);
}

.hero-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 300px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #10B981;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

html.light .hero-badge {
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.hero h1 {
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.75rem;
  background: linear-gradient(180deg, var(--text-primary) 0%, rgba(255,255,255,0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

html.light .hero h1 {
  background: linear-gradient(180deg, var(--text-primary) 0%, #475569 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero h1 span.gradient {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.3rem;
  color: var(--text-secondary);
  max-width: 750px;
  margin: 0 auto 3rem auto;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
}

/* ── Interactive Products Grid ──────────────────────── */
.products-section {
  padding: 100px 0;
  position: relative;
  background: linear-gradient(180deg, transparent 0%, var(--bg-secondary) 100%);
}

.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 5rem auto;
}

.section-header h2 {
  font-size: 2.75rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1.6;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.product-card {
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 440px;
  transition: var(--transition-smooth);
}

html.light .product-card {
  border: 1px solid rgba(15, 23, 42, 0.05);
}

/* Product Accents & Hover Glows */
.product-card.pos { --accent-col: var(--pos-color); --glow-col: var(--pos-glow); }
.product-card.store { --accent-col: var(--store-color); --glow-col: var(--store-glow); }
.product-card.kas { --accent-col: var(--kas-color); --glow-col: var(--kas-glow); }
.product-card.pay { --accent-col: var(--pay-color); --glow-col: var(--pay-glow); }

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 10% 10%, var(--glow-col) 0%, transparent 60%);
  opacity: 0;
  transition: var(--transition-smooth);
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-col);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px var(--glow-col);
}

.product-card:hover::before {
  opacity: 1;
}

.product-badge {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
}

.product-badge.active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--pos-color);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.product-badge.upcoming {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.product-icon {
  font-size: 2.75rem;
  margin-bottom: 2rem;
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition-smooth);
}

.product-card:hover .product-icon {
  transform: scale(1.1) rotate(5deg);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--accent-col);
}

.product-name {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.product-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2.5rem;
  flex-grow: 1;
  line-height: 1.6;
}

/* Feature Section */
.features-section {
  padding: 100px 0;
  background: var(--bg-secondary);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
}

.feature-card {
  padding: 2rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.03);
  transition: var(--transition-smooth);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.08);
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1rem 0;
}

.feature-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ── Footer UI ────────────────────────────────────────── */
.footer {
  background: #020617;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding: 6rem 0 3rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-brand {
  max-width: 360px;
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 1.25rem;
  font-size: 1rem;
  line-height: 1.6;
}

.footer-links-group {
  display: flex;
  gap: 6rem;
}

.footer-links h4 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 1rem;
}

.footer-links ul li a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}

.footer-links ul li a:hover {
  color: var(--text-primary);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.75rem;
  }
  .hero {
    padding: 140px 0 80px 0;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .footer-links-group {
    gap: 3rem;
    width: 100%;
    justify-content: space-between;
  }
}

/* ── Hamburger Button ────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 0;
}

html.light .hamburger {
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 9999px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Animated X when open */
.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Nav Overlay ──────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(3, 7, 18, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.5rem 2rem 2rem 2rem;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

html.light .mobile-nav {
  background: rgba(248, 250, 252, 0.98);
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.mobile-nav.active {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav a {
  display: block;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 500;
  transition: var(--transition-smooth);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

html.light .mobile-nav a {
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.mobile-nav a:last-of-type {
  border-bottom: none;
}

.mobile-nav a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  padding-left: 1.75rem;
}

html.light .mobile-nav a:hover {
  background: rgba(15, 23, 42, 0.04);
}

.mobile-nav .mobile-cta {
  margin-top: 1rem;
  background: var(--gradient-main);
  color: #fff !important;
  text-align: center;
  border-radius: var(--radius-sm);
  font-weight: 700;
  padding: 1rem;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.25);
  border-bottom: none !important;
}

.mobile-nav .mobile-cta:hover {
  padding-left: 1.25rem;
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.4);
  transform: translateY(-2px);
}

/* Hide/show: desktop vs mobile */
@media (max-width: 900px) {
  .nav-links,
  .nav-cta-desktop {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .mobile-nav {
    display: flex;
  }
}

/* ── Scroll-aware Navbar ─────────────────────────────── */
.navbar.scrolled {
  background: rgba(3, 7, 18, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

html.light .navbar.scrolled {
  background: rgba(248, 250, 252, 0.97);
  border-bottom-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ── Scroll-Reveal Animations ────────────────────────── */
.product-card,
.feature-card,
.section-header,
.cta-portal-inner {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card.revealed,
.feature-card.revealed,
.section-header.revealed,
.cta-portal-inner.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── CTA Portal Section ──────────────────────────────── */
.cta-portal {
  padding: 100px 0;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  position: relative;
  overflow: hidden;
}

.cta-portal::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(6, 182, 212, 0.06) 0%, transparent 65%);
  pointer-events: none;
}

.cta-portal-inner {
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  padding: 4rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3rem;
  position: relative;
}

html.light .cta-portal-inner {
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.cta-portal-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 15% 50%, rgba(6, 182, 212, 0.07) 0%, transparent 60%);
  border-radius: var(--radius-xl);
  pointer-events: none;
}

.cta-portal-text h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.cta-portal-text p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 480px;
}

.cta-portal-actions {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .cta-portal-inner {
    flex-direction: column;
    text-align: center;
    padding: 2.5rem 2rem;
  }

  .cta-portal-text p {
    max-width: 100%;
  }

  .cta-portal-actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-portal-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-brand {
    max-width: 100%;
  }

  .footer-links-group {
    flex-wrap: wrap;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

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

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