/**
 * EvoPay — Base Styles & Better Typography Hierarchy
 * Engineered according to Better-Typography & Better-Colors Standards
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-body);
  line-height: 1.55;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* ==========================================================
   TABULAR NUMERICS & FINANCIAL DATA PRECISION
   ========================================================== */
.tabular-nums, table, .badge, .kpi-value, .pos-card-price, .cart-row-total {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* ==========================================================
   HIGH-END TYPOGRAPHY HIERARCHY
   ========================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.text-display {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.12;
}

h1, .text-h1 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2, .text-h2 {
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

h3, .text-h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h4, .text-h4 {
  font-size: 0.95rem;
  font-weight: 600;
}

p, .text-body {
  font-size: 0.9375rem;
  color: var(--text-body);
  line-height: 1.55;
  text-wrap: pretty;
  max-width: 75ch;
}

.text-small {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
  text-wrap: pretty;
}

.text-caption {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-subtle);
  line-height: 1.2;
}

/* Links & Underline Mechanics */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
  text-underline-position: from-font;
  text-decoration-thickness: from-font;
}

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

/* Focus Ring */
:focus-visible {
  outline: none;
  box-shadow: var(--border-focus-glow);
}

/* Images & Media */
img, svg, picture, video {
  display: block;
  max-width: 100%;
}

/* Icons */
.icon {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-xs { width: 0.875rem; height: 0.875rem; }
.icon-sm { width: 1.05rem; height: 1.05rem; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.icon-xl { width: 2rem; height: 2rem; }

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: oklch(0.85 0.01 250);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: oklch(0.7 0.015 250);
}

/* Selection */
::selection {
  background-color: var(--color-primary-light);
  color: var(--color-primary-hover);
}
