/* DZPay Brand Design System */
:root {
  /* Primary Colors */
  --primary: #6200ee;
  --primary-dark: #3700b3;
  --secondary: #03dac6;
  --android-icon-bg: #8740e6;
  
  /* Background Colors */
  --bg: #FFFFFF;
  --surface: #F5F5F5;
  --card-bg: #FFFFFF;
  
  /* Text Colors */
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-disabled: #999999;
  --text-inverse: #FFFFFF;
  
  /* Border Colors */
  --border: #E0E0E0;
  --border-dark: #CCCCCC;
  --card-border: #E5E5EA;
  
  /* Status Colors */
  --success: #4CAF50;
  --positive: #34C759;
  --warning: #FFC107;
  --error: #B00020;
  --negative: #FF3B30;
  --info: #2196F3;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* Shadows */
  --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.15);
  --shadow-modal: 0 4px 10px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

*:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

*:focus:not(:focus-visible) {
  outline: none;
}

button:focus,
a:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  z-index: 50;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  position: relative;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.logo:hover {
  opacity: 0.8;
  text-decoration: none;
}

.logo img {
  height: 40px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.logo-mark {
  background: var(--primary);
  color: var(--text-inverse);
  padding: 0.25rem 0.45rem;
  border-radius: 8px;
  font-size: 18px;
}

.logo-text {
  color: var(--text-primary);
  font-size: 20px;
}

.footer-logo img {
  height: 32px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  margin-bottom: var(--spacing-md);
}

/* Navigation */
.nav ul {
  display: flex;
  gap: var(--spacing-sm);
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav a {
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  letter-spacing: 0.25px;
  transition: background-color 0.2s ease;
}

.nav a:hover {
  background: var(--surface);
  text-decoration: none;
  color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.25px;
  transition: all 0.2s ease;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(98, 0, 238, 0.1);
  touch-action: manipulation;
}

.btn:hover {
  border-color: var(--primary);
  background: var(--surface);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-inverse);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--text-inverse);
}

.btn-ghost {
  background: transparent;
}

.btn-sm {
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 12px;
}

/* Hero Section */
.hero {
  padding: var(--spacing-xl) 0;
  background: linear-gradient(135deg, rgba(98, 0, 238, 0.05) 0%, rgba(3, 218, 198, 0.05) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.lead {
  color: var(--text-secondary);
  font-size: 16px;
  letter-spacing: 0.5px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: var(--spacing-md);
  margin: var(--spacing-lg) 0;
}

.trust-list {
  display: flex;
  gap: var(--spacing-md);
  padding: 0;
  margin: var(--spacing-lg) 0 0 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: 14px;
}

.hero-art {
  display: flex;
  justify-content: center;
}

.diagram {
  position: relative;
  width: 320px;
  height: 220px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-card);
}

.node {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  font-size: 14px;
  color: var(--text-primary);
}

.node:nth-child(1) { top: 25%; left: 22%; }
.node:nth-child(2) { top: 30%; left: 78%; }
.node:nth-child(3) { top: 70%; left: 22%; }
.node:nth-child(4) { top: 75%; left: 78%; }
.node:nth-child(5) { top: 50%; left: 50%; background: var(--primary); color: var(--text-inverse); }

/* Main Content */
main {
  flex: 1;
  width: 100%;
  overflow-x: hidden;
  min-height: calc(100vh - 200px);
}

/* Sections */
.section {
  padding: var(--spacing-xl) 0;
}

.section.alt {
  background: var(--surface);
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: var(--spacing-md);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  align-items: start;
}

.box {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: var(--spacing-md);
  box-shadow: var(--shadow-card);
}

/* Lists */
.checklist, .bullet {
  padding-left: var(--spacing-lg);
}

.checklist li::marker {
  color: var(--primary);
}

.bullet li {
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

/* Typography */
h1, .h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.25px;
  line-height: 1.2;
  color: var(--text-primary);
  margin: 0 0 var(--spacing-md) 0;
}

h2, .h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.15px;
  line-height: 1.3;
  color: var(--text-primary);
  margin: 0 0 var(--spacing-md) 0;
}

h3, .h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.15px;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0 0 var(--spacing-sm) 0;
}

h4, .h4 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.15px;
  color: var(--text-primary);
  margin: 0 0 var(--spacing-sm) 0;
}

p, .body1 {
  font-size: 16px;
  letter-spacing: 0.5px;
  line-height: 1.6;
  color: var(--text-primary);
  margin: 0 0 var(--spacing-md) 0;
}

.body2 {
  font-size: 14px;
  letter-spacing: 0.25px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.caption {
  font-size: 12px;
  letter-spacing: 0.4px;
  color: var(--text-secondary);
}

.prose h1, .prose h2, .prose h3 {
  line-height: 1.2;
}

.prose h1 {
  font-size: 32px;
  margin-top: 0;
}

.prose p, .prose li {
  color: var(--text-primary);
  font-size: 16px;
  letter-spacing: 0.5px;
}

.prose li {
  margin-bottom: var(--spacing-sm);
}

.note {
  color: var(--text-secondary);
  margin: var(--spacing-sm) 0 var(--spacing-md) 0;
  font-size: 14px;
}

.note-box {
  background: rgba(33, 150, 243, 0.1);
  border: 1px solid rgba(33, 150, 243, 0.3);
  border-radius: 16px;
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

.warning-box {
  background: #FFF3E0;
  border: 2px solid #FFC107;
  border-radius: 16px;
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

.warning-box h2,
.warning-box h3,
.warning-box p,
.warning-box li {
  color: #E65100;
}

.case {
  border-top: 1px solid var(--border);
  padding-top: var(--spacing-md);
  margin-top: var(--spacing-md);
}

/* Forms */
.contact-form {
  display: grid;
  gap: var(--spacing-md);
  max-width: 640px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: var(--spacing-md);
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-primary);
  outline: none;
  font-size: 16px;
  letter-spacing: 0.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(98, 0, 238, 0.1);
}

.checkbox {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: var(--spacing-xl);
  padding: var(--spacing-lg) 0 var(--spacing-xl) 0;
  background: var(--surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--spacing-lg);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--spacing-sm);
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 14px;
  letter-spacing: 0.25px;
}

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

.footer-bottom {
  display: flex;
  gap: var(--spacing-md);
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: var(--spacing-md);
  margin-top: var(--spacing-md);
}

.footer-logo {
  margin-bottom: var(--spacing-md);
}

.muted {
  color: var(--text-secondary);
  font-size: 14px;
  letter-spacing: 0.25px;
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: var(--spacing-md);
  top: var(--spacing-md);
  width: auto;
  height: auto;
  padding: var(--spacing-sm);
  background: var(--primary);
  color: var(--text-inverse);
  border-radius: 8px;
  z-index: 100;
}

/* Mobile Navigation */
.nav-toggle {
  display: none;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.cookie-consent {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 900px) {
  .container {
    padding: 0 var(--spacing-md);
  }
  
  .hero {
    padding: var(--spacing-lg) 0;
  }
  
  .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .section {
    padding: var(--spacing-lg) 0;
  }
  
  .cards {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .two-col {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .nav ul {
    display: none;
    position: fixed;
    right: var(--spacing-md);
    top: 64px;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: var(--spacing-md);
    border-radius: 16px;
    box-shadow: var(--shadow-modal);
    min-width: 200px;
    z-index: 100;
  }
  
  .nav-toggle {
    display: inline-block;
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
    margin-left: auto;
    order: 2;
  }
  
  .header-inner {
    min-height: 64px;
  }
  
  .nav.open ul {
    display: flex;
  }
  
  .nav a {
    padding: var(--spacing-md);
    min-height: 44px;
    display: flex;
    align-items: center;
    touch-action: manipulation;
  }
  
  .logo img {
    height: 28px;
    max-width: 100px;
  }
  
  .footer-logo img {
    height: 24px;
    max-width: 90px;
  }
  
  h1, .h1 {
    font-size: 28px;
    line-height: 1.2;
  }
  
  h2, .h2 {
    font-size: 22px;
    line-height: 1.3;
  }
  
  h3, .h3 {
    font-size: 18px;
  }
  
  .lead {
    font-size: 16px;
    line-height: 1.6;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-md);
  }
  
  .hero-actions .btn {
    width: 100%;
    text-align: center;
    min-height: 48px;
    padding: var(--spacing-md) var(--spacing-lg);
    touch-action: manipulation;
  }
  
  .btn {
    min-height: 44px;
    padding: var(--spacing-md) var(--spacing-lg);
    touch-action: manipulation;
  }
  
  .trust-list {
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
  }
  
  .diagram {
    width: 100%;
    max-width: 320px;
    height: 200px;
  }
  
  .card {
    padding: var(--spacing-md);
  }
  
  .box {
    padding: var(--spacing-md);
  }
  
  .prose {
    padding: 0;
  }
}

/* Mobile-specific improvements */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  h1, .h1 {
    font-size: 24px;
  }
  
  h2, .h2 {
    font-size: 20px;
  }
  
  h3, .h3 {
    font-size: 18px;
  }
  
  .hero {
    padding: var(--spacing-md) 0;
  }
  
  .section {
    padding: var(--spacing-md) 0;
  }
  
  .card, .box {
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
  }
  
  .btn {
    font-size: 16px;
    padding: var(--spacing-md);
  }
  
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }
  
  .cookie-consent {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  
  .cookie-consent p {
    margin-bottom: var(--spacing-sm);
  }
  
  .cookie-consent .btn {
    width: 100%;
  }
  
  .hero-art {
    margin-top: var(--spacing-md);
  }
  
  .diagram {
    margin: 0 auto;
  }
  
  .prose {
    font-size: 16px;
  }
  
  p, .body1 {
    font-size: 16px;
    line-height: 1.6;
  }
  
  ul, ol {
    padding-left: var(--spacing-lg);
  }
  
  .contact-form input,
  .contact-form textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  main {
    min-height: auto;
  }
  
  .section {
    padding: var(--spacing-md) 0;
  }
  
  .hero {
    padding: var(--spacing-md) 0 var(--spacing-lg) 0;
  }
  
  .logo img {
    height: 24px;
    max-width: 90px;
  }
  
  .footer-logo img {
    height: 20px;
    max-width: 80px;
  }
  
  .header-inner {
    min-height: 56px;
  }
  
  .nav ul {
    top: 56px;
  }
  
  .nav-toggle {
    margin-left: auto;
    order: 2;
  }
}
