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

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

body {
  font-family: var(--font-family-base);
  background-color: var(--color-bg-white);
  color: var(--color-text-main);
  line-height: var(--line-height-normal);
  font-size: var(--font-size-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

main {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

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

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

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-display);
  color: var(--color-text-heading);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2.25rem);
}

h3 {
  font-size: clamp(1.25rem, 1.5vw + 0.5rem, 1.5rem);
}

h4 {
  font-size: 1.125rem;
}

p {
  line-height: var(--line-height-relaxed);
  color: var(--color-text-main);
}

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

.text-blue {
  color: var(--color-primary-blue);
}

.text-bold {
  font-weight: var(--font-weight-bold);
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  box-sizing: border-box;
}

.container-narrow {
  width: 100%;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  box-sizing: border-box;
}

@media (max-width: 560px) {
  .container, .container-narrow {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

.section {
  padding: 4.5rem 0;
  position: relative;
}

.section-sm {
  padding: 2.5rem 0;
}

.section-bg-light {
  background-color: var(--color-bg-light);
}

.section-bg-subtle {
  background-color: var(--color-bg-subtle);
}

.section-bg-deep {
  background-color: var(--color-primary-deep);
  color: var(--color-text-inverse);
}

.section-bg-deep h1,
.section-bg-deep h2,
.section-bg-deep h3,
.section-bg-deep p {
  color: var(--color-text-inverse);
}

.section-bg-soft-blue {
  background-color: var(--color-primary-light);
  border-top: 1px solid var(--color-primary-soft);
  border-bottom: 1px solid var(--color-primary-soft);
}

/* Section Headers */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3rem auto;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background-color: var(--color-primary-light);
  color: var(--color-primary-blue);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  border: 1px solid var(--color-primary-soft);
}

.section-badge-white {
  background-color: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
}

.section-title {
  margin-bottom: 0.75rem;
}

.section-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
}

.section-bg-deep .section-subtitle {
  color: #CBD5E1;
}

/* Grid Utilities */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  .section {
    padding: 3rem 0;
  }
}

/* Flex Utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-center {
  justify-content: center;
}

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Accessibility & Screen Readers */
.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;
}

:focus-visible {
  outline: 2px solid var(--color-primary-blue);
  outline-offset: 2px;
}
