/**
 * PharmEtrade — CSS Reset & Base Styles
 */

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

/* Root */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-size: 16px;
}

/* Body */
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Typography resets */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: var(--leading-tight);
}

/* Links */
a {
  color: inherit;
  text-decoration: none;
}

/* Lists */
ul, ol { list-style: none; }

/* Media */
img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
}

img { height: auto; }

/* Forms */
button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

input, textarea, select {
  background: transparent;
}

textarea { resize: vertical; }

/* Table */
table { border-collapse: collapse; }

/* Hr */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
}

/* Code */
code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Focus — Accessibility */
:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* Screen reader only */
.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;
}

/* Skip to content */
.skip-link {
  position: absolute;
  top: -999px;
  left: var(--space-4);
  z-index: var(--z-toast);
  background: var(--color-navy);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-2);
}

/* Selection */
::selection {
  background: rgba(0, 168, 120, 0.2);
  color: var(--color-text-primary);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg-section); }
::-webkit-scrollbar-thumb { background: var(--color-border-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }
