/**
 * ADX Base Styles & CSS Reset
 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
}

body {
  font-family: var(--adx-font-family);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--adx-color-body);
  background-color: var(--adx-color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  width: 100%;
  max-width: 100%;
  position: relative;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: var(--adx-color-heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p {
  margin-bottom: 1rem;
}

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

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

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

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

/* Container */
.adx-container {
  width: 100%;
  max-width: var(--adx-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--adx-space-6);
  padding-right: var(--adx-space-6);
}

@media (max-width: 640px) {
  .adx-container {
    padding-left: var(--adx-space-4);
    padding-right: var(--adx-space-4);
  }
}

/* Accessibility Focus States */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--adx-color-primary);
  outline-offset: 2px;
}

/* Screen Reader Only */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

/* Motion Preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
