/* ===================================
   Modern Minimal Base Styles
   Clean typography and refined fundamentals
   =================================== */

/* ===================================
   Box Sizing Reset
   =================================== */

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

/* ===================================
   HTML & Body - Clean foundation
   =================================== */

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

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--gray-700);
  background-color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===================================
   Typography - Bold and clear
   =================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  font-weight: var(--font-bold);
  color: var(--navy-900);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-6);
}

h2 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-6);
}

h3 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

h4 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-4);
}

h5 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

h6 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-3);
}

p {
  margin-bottom: var(--space-4);
  line-height: var(--line-height-relaxed);
}

p:last-child {
  margin-bottom: 0;
}

/* ===================================
   Links - Subtle and elegant
   =================================== */

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

a:hover {
  color: var(--accent-500);
}

a:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ===================================
   Lists
   =================================== */

ul, ol {
  list-style: none;
}

ul.list-disc {
  list-style: disc;
  padding-left: var(--space-6);
}

ol.list-decimal {
  list-style: decimal;
  padding-left: var(--space-6);
}

li {
  margin-bottom: var(--space-2);
}

/* ===================================
   Images - Responsive by default
   =================================== */

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

/* ===================================
   Buttons Reset
   =================================== */

button {
  font-family: var(--font-family);
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

button:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 3px;
}

/* ===================================
   Form Elements - Modern defaults
   =================================== */

input,
textarea,
select {
  font-family: var(--font-family);
  font-size: var(--text-base);
  letter-spacing: var(--letter-spacing-normal);
}

/* Focus States - Clear and visible */
input:focus,
textarea:focus,
select:focus,
button:focus {
  outline: 2px solid var(--primary-500);
  outline-offset: 3px;
}

/* ===================================
   Selection - Branded highlight
   =================================== */

::selection {
  background-color: var(--accent-400);
  color: var(--white);
}

::-moz-selection {
  background-color: var(--accent-400);
  color: var(--white);
}

/* ===================================
   Scrollbar - Minimal and clean
   =================================== */

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-full);
  border: 3px solid var(--gray-100);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-600);
}

/* ===================================
   Strong & Em
   =================================== */

strong, b {
  font-weight: var(--font-bold);
  color: var(--navy-900);
}

em, i {
  font-style: italic;
}

/* ===================================
   Code & Pre
   =================================== */

code {
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 0.9em;
  padding: var(--space-1) var(--space-2);
  background-color: var(--gray-100);
  border-radius: var(--radius-sm);
  color: var(--primary-700);
}

pre {
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  padding: var(--space-4);
  background-color: var(--gray-100);
  border-radius: var(--radius-md);
  overflow-x: auto;
  line-height: var(--line-height-normal);
}

pre code {
  padding: 0;
  background: none;
}

/* ===================================
   Blockquote
   =================================== */

blockquote {
  padding-left: var(--space-6);
  border-left: 4px solid var(--primary-600);
  margin: var(--space-6) 0;
  font-style: italic;
  color: var(--gray-600);
}

/* ===================================
   HR - Horizontal Rule
   =================================== */

hr {
  border: none;
  height: var(--border-width);
  background-color: var(--gray-200);
  margin: var(--space-8) 0;
}

/* ===================================
   Utility Classes
   =================================== */

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

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

/* ===================================
   Print Styles
   =================================== */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
