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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--color-surface-base);
  color: var(--color-text-main);
  font-family: var(--font-sans);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: var(--line-height-normal);
  color: var(--color-text-main);
  background-color: var(--color-surface-base);
  overflow-x: hidden;
}

/* Accessible Focus Ring */
:focus-visible {
  outline: 2px solid var(--color-brand-primary);
  outline-offset: 2px;
}

/* Selection */
::selection {
  background-color: var(--color-brand-primary-subtle);
  color: var(--color-brand-primary-active);
}

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

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

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

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

h4 {
  font-size: var(--font-size-xl);
}

p {
  color: var(--color-text-muted);
  font-size: var(--font-size-base);
  line-height: var(--line-height-relaxed);
}

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
}

button {
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
}

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

.section {
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.section-subtle {
  background-color: var(--color-surface-subtle);
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}

.section-dark {
  background-color: var(--color-surface-dark);
  color: var(--color-text-inverse);
  border-top: 1px solid var(--color-surface-dark-border);
  border-bottom: 1px solid var(--color-surface-dark-border);
}

.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--color-text-inverse);
}

.section-dark p {
  color: var(--color-text-inverse-muted);
}

/* Secondary Brand Blue Section (From Logo Cyan Blue) */
.section-brand-cyan {
  background-color: #008ecc;
  color: #ffffff;
  border-top: 1px solid #007bb5;
  border-bottom: 1px solid #007bb5;
}

.section-brand-cyan h2,
.section-brand-cyan h3,
.section-brand-cyan h4 {
  color: #ffffff;
}

.section-brand-cyan p {
  color: #e0f2fe;
}

.section-brand-cyan .process-step {
  background-color: #ffffff;
  padding: var(--space-6);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.section-brand-cyan .process-step h4 {
  color: var(--color-text-main);
}

.section-brand-cyan .process-step p {
  color: var(--color-text-muted);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--space-6);
}

.section-header .badge {
  margin-bottom: var(--space-3);
  display: inline-flex;
}

.section-header h2 {
  margin-bottom: 0;
}

/* Screenreader Only */
.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;
}

/* Direct Manipulation & Spring Click Feedback */
.pressable {
  transition: transform var(--duration-fast) var(--ease-spring), box-shadow var(--duration-fast) var(--ease-spring), background-color var(--duration-fast) ease;
}

.pressable:active {
  transform: scale(0.985);
}

/* Skeleton Loading Animation */
@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 37%, #e2e8f0 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: var(--radius-xs);
  display: inline-block;
}

.skeleton-text {
  height: 1.1em;
  margin-bottom: 0.5em;
  width: 100%;
}
