/* ===============================
   BarcodeGuru — Global Styles
   Deep Purple + Dark Navy + Cyan
   =============================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand Colors */
  --color-primary: #7C3AED;
  --color-primary-dark: #6D28D9;
  --color-primary-light: #EDE9FE;
  --color-secondary: #0A0F1E;
  --color-accent: #38BDF8;
  --color-accent-dark: #0EA5E9;

  /* Semantic */
  --color-success: #10B981;
  --color-warning: #F97316;

  /* Neutrals */
  --color-white: #FFFFFF;
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Plus Jakarta Sans', var(--font-body);

  /* Spacing */
  --section-padding: 100px 0;
  --container-max: 1200px;
  --container-padding: 0 24px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);

  /* Semantic Colors */
  --color-heading: var(--color-gray-900);
  --color-text: var(--color-gray-600);
  --color-border: var(--color-gray-200);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
}

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

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

body {
  font-family: var(--font-body);
  color: var(--color-gray-800);
  background-color: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
  animation: pageFadeIn 0.3s ease-out;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ---------- Utility Classes ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
}

.section-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-gray-900);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--color-gray-500);
  max-width: 600px;
  line-height: 1.7;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.btn-sm {
  padding: 10px 22px;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.0625rem;
}

.btn-block {
  display: flex;
  width: 100%;
  justify-content: center;
}

.btn-learn-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
  transition: all var(--transition-fast);
}

.btn-learn-more:hover {
  gap: 12px;
  color: var(--color-primary-dark);
}

.btn-learn-more svg {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

/* ---------- Scroll Reveal ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  padding: 12px 0;
}

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

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-white);
  transition: color var(--transition-fast);
}

.navbar-brand span {
  white-space: nowrap;
}

.navbar-brand img {
  border-radius: 8px;
}

.navbar.scrolled .navbar-brand {
  color: var(--color-gray-900);
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.navbar-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  transition: color var(--transition-fast);
}

.navbar-links a:hover {
  color: var(--color-white);
}

.navbar.scrolled .navbar-links a {
  color: var(--color-gray-600);
}

.navbar.scrolled .navbar-links a:hover {
  color: var(--color-primary);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language Selector */
.lang-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  gap: 6px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm, 8px);
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .2s, background .2s, color .2s;
}

.lang-btn:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.2);
}

.navbar.scrolled .lang-btn {
  background: var(--color-gray-100, #F3F4F6);
  border-color: var(--color-gray-200);
  color: var(--color-gray-700);
}

.navbar.scrolled .lang-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-light, #EDE9FE);
  color: var(--color-primary);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
  padding: 6px 0;
  min-width: 140px;
  z-index: 1100;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.lang-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-dropdown a {
  display: block;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--color-gray-700);
  text-decoration: none;
  transition: background .15s;
}

.lang-dropdown a:hover {
  background: var(--color-gray-100, #F3F4F6);
  color: var(--color-primary);
}

.nav-cta-wrapper {
  position: relative;
}

.nav-store-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 1100;
  min-width: 200px;
}

.nav-store-dropdown.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-store-dropdown .store-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: unset;
  width: 100%;
  border: 1px solid var(--color-gray-200);
  color: var(--color-gray-800);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 500;
  justify-content: flex-start;
  box-sizing: border-box;
}

.nav-store-dropdown .store-badge:hover {
  background: var(--color-gray-100);
  border-color: var(--color-primary);
  color: var(--color-gray-900);
  transform: translateY(-2px);
}

.nav-store-dropdown .store-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
}

.nav-store-dropdown .store-badge-text small {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--color-gray-500);
  opacity: 0.8;
}

.nav-store-dropdown .store-badge-text strong {
  font-size: 0.875rem;
  color: var(--color-gray-900);
}

/* Mobile Store Dropdown */
.mobile-store-dropdown {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.35s ease;
  pointer-events: none;
  margin-top: 8px;
}

.mobile-store-dropdown.show {
  max-height: 200px;
  opacity: 1;
  pointer-events: auto;
}

.mobile-store-dropdown .store-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--color-gray-100);
  border: 1px solid var(--color-gray-200);
  border-radius: 10px;
  color: var(--color-gray-800);
  font-size: 0.875rem;
  min-width: unset;
  width: 100%;
  box-sizing: border-box;
}

.mobile-store-dropdown .store-badge:hover {
  background: var(--color-gray-200);
  transform: none;
}

.mobile-store-dropdown .store-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
}

.mobile-store-dropdown .store-badge-text small {
  font-size: 0.6875rem;
  color: var(--color-gray-500);
}

.mobile-store-dropdown .store-badge-text strong {
  font-size: 0.9375rem;
  color: var(--color-gray-900);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px 8px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.navbar.scrolled .hamburger span {
  background: var(--color-gray-800);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.mobile-nav.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 320px;
  padding: 0 24px;
}

.mobile-nav-link {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-white);
  transition: color var(--transition-fast);
}

.mobile-nav-link:hover {
  color: var(--color-accent);
}

/* Mobile store badges (always visible, no dropdown) */
.mobile-store-badges {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.mobile-store-badges .store-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: #fff;
  text-decoration: none;
  transition: background .2s, border-color .2s;
}

.mobile-store-badges .store-badge:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
}

.mobile-store-badges .store-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.mobile-store-badges .store-badge-text small {
  font-size: 11px;
  opacity: 0.7;
}

.mobile-store-badges .store-badge-text strong {
  font-size: 15px;
  font-weight: 600;
}



/* ---------- FOOTER ---------- */
.footer {
  background: var(--color-secondary);
  color: var(--color-gray-300);
  padding: 80px 0 40px;
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 16px;
}

.footer-logo img {
  border-radius: 8px;
}

.footer-tagline {
  font-size: 0.9375rem;
  color: var(--color-gray-400);
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-store-download {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-store-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.footer-qr-item img {
  width: 112px;
  height: 112px;
  border-radius: var(--radius-sm);
}

.store-badge-sm {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-gray-300);
  transition: all var(--transition-fast);
  min-width: 188px;
  box-sizing: border-box;
}

.store-badge-sm svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.store-badge-sm:hover {
  border-color: var(--color-primary);
  color: var(--color-white);
  background: rgba(255,255,255,0.08);
}

.store-badge-sm-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
}

.store-badge-sm-text small {
  font-size: 0.6875rem;
  color: var(--color-gray-400);
}

.store-badge-sm-text strong {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-white);
}

.footer-links-group h2 {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 20px;
}

.footer-links-group ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-group a {
  font-size: 0.875rem;
  color: var(--color-gray-400);
  transition: color var(--transition-fast);
}

.footer-links-group a:hover {
  color: var(--color-white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 32px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
  margin-bottom: 8px;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--color-gray-600);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---------- Responsive Common ---------- */
@media (max-width: 1024px) {
  .navbar-links {
    display: none;
  }

  .navbar-actions .btn {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .lang-icon {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

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

  .container {
    padding: 0 20px;
  }

  .navbar {
    padding: 12px 0;
  }

  .navbar-inner {
    gap: 12px;
  }

  .navbar-brand {
    gap: 8px;
    font-size: 1.125rem;
  }

  .navbar-brand img {
    width: 28px;
    height: 28px;
  }

  .navbar-actions {
    gap: 10px;
  }

  .lang-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-subtitle {
    font-size: 1rem;
    line-height: 1.65;
  }

  .mobile-nav {
    align-items: flex-start;
    overflow-y: auto;
    padding: 96px 0 32px;
  }

  .mobile-nav-inner {
    max-width: 420px;
    gap: 20px;
  }

  .mobile-nav-link {
    font-size: 1.125rem;
  }

  .footer {
    padding: 64px 0 32px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-store-badges {
    width: 100%;
    align-items: flex-start;
  }

  .footer-store-download {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .navbar-brand {
    font-size: 1rem;
  }

  .lang-btn {
    min-width: 52px;
    justify-content: center;
  }

  .mobile-nav {
    padding-top: 88px;
  }

  .mobile-store-badges .store-badge {
    padding: 12px 14px;
  }

  .footer-store-download {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-store-col {
    align-items: flex-start;
  }

  .footer-qr-item img {
    width: 96px;
    height: 96px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
