/* ===========================================
   ZeroPDF – Global Styles (Trusted Blue)
   =========================================== */

/* ---------- Reset & Box Sizing ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--color-bg);               /* #F8FAFC – soft light blue‑grey */
  color: var(--color-text);                        /* #0F172A – near‑black */
  font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
  line-height: var(--leading-normal, 1.6);
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Selection ---------- */
::selection {
  background-color: var(--color-accent-light);      /* #EFF6FF – very light blue */
  color: var(--color-text);
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--color-primary);          /* #2563EB */
  outline-offset: 2px;
}

/* ---------- Media ---------- */
img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- Form Elements Inheritance ---------- */
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

/* ---------- Lists ---------- */
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---------- Accessibility ---------- */
.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-link {
  position: absolute;
  top: -40px;
  left: var(--space-4);
  background: var(--color-primary);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  z-index: var(--z-toast);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
}

/* ---------- Headings ---------- */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--color-text);
}

h1 { font-size: var(--text-5xl); letter-spacing: -0.02em; }
h2 { font-size: var(--text-4xl); letter-spacing: -0.01em; }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  margin: 0;
  color: var(--color-text-secondary);
}

/* ---------- Links ---------- */
a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* ---------- Code ---------- */
code {
  font-family: var(--font-mono, 'Courier New', monospace);
  background: var(--color-bg);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
  color: var(--color-text);
}

/* ---------- Custom Scrollbar (Trusted Blue) ---------- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
  background: #94A3B8;
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-secondary);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #94A3B8 var(--color-bg);
}

/* ---------- Placeholder text ---------- */
::placeholder {
  color: var(--color-text-tertiary);
  opacity: 1;
}

/* ---------- HR ---------- */
hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-8) 0;
}

/* ---------- Abbr ---------- */
abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
}

/* ---------- Printing ---------- */
@media print {
  .header,
  .footer,
  .skip-link,
  .btn,
  .mobile-toggle,
  .mobile-nav {
    display: none !important;
  }
  body {
    background: white;
    color: black;
  }
}