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

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text-primary);
}

main {
  flex: 1;
}

/* Typography Scale */
h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 16px;
}

h2 {
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: 16px;
}

h3 {
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 12px;
}

p {
  margin-bottom: 16px;
  color: var(--text-primary);
}

.text-secondary {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}

/* Links */
a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

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

/* Layout Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  width: 100%;
}

/* Section Vertical Padding */
.section {
  padding-top: 64px;
  padding-bottom: 64px;
}

@media (min-width: 768px) {
  .section {
    padding-top: 96px;
    padding-bottom: 96px;
  }
}

/* Focus Ring */
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* Skip to Content */
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--brand);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 20px;
}
