/**
 * ProTechnologies Base Styles & Typography
 */

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

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color-scheme: dark light;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessible Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--color-primary);
  color: #FFFFFF;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 9999;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--color-secondary);
}

/* Focus Rings */
:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 3px;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--text-4xl); margin-bottom: 1rem; }
h2 { font-size: var(--text-3xl); margin-bottom: 0.875rem; }
h3 { font-size: var(--text-2xl); margin-bottom: 0.75rem; }
h4 { font-size: var(--text-xl); margin-bottom: 0.5rem; }
h5 { font-size: var(--text-lg); margin-bottom: 0.5rem; }
h6 { font-size: var(--text-base); margin-bottom: 0.5rem; }

p {
  color: var(--text-muted);
  font-size: var(--text-base);
  line-height: 1.7;
  margin-bottom: 1rem;
}

p.lead {
  font-size: var(--text-lg);
  color: var(--text-main);
  font-weight: 400;
  line-height: 1.6;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}

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

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

code {
  background: var(--bg-surface-elevated);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--color-secondary);
  border: 1px solid var(--border-subtle);
}

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

/* Containers */
.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1rem, 4vw, 2.5rem);
  padding-right: clamp(1rem, 4vw, 2.5rem);
}

.container-narrow {
  max-width: 860px;
}

.site-main {
  flex: 1 0 auto;
}

.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;
}
