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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-surface);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-primary);
}

h1 { font-size: var(--font-size-hero); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

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

/* Container */
.container {
  width: min(var(--container-max), 100% - var(--container-padding) * 2);
  margin-inline: auto;
}

.container--wide {
  width: min(1600px, 100% - var(--container-padding));
  margin-inline: auto;
}

.container--full {
  width: 100%;
  padding-inline: var(--container-padding);
}

/* Section */
.section {
  padding-block: var(--section-padding);
  position: relative;
}

.section--dark {
  background: var(--gradient-dark);
  color: var(--color-text-light);
}

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

.section--dark p {
  color: rgba(245, 245, 245, 0.75);
}

.section--ivory {
  background-color: var(--color-surface);
}

.section--alt {
  background-color: var(--color-surface-dark);
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header--left {
  text-align: left;
}

.section-label {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.section-title {
  margin-bottom: var(--space-md);
}

.section-subtitle {
  max-width: 600px;
  margin-inline: auto;
  font-size: var(--font-size-md);
}

.section-header--left .section-subtitle {
  margin-inline: 0;
}

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

.text-accent { color: var(--color-accent); }
.text-center { text-align: center; }

.divider-accent {
  width: 60px;
  height: 3px;
  background: var(--gradient-accent);
  margin-block: var(--space-md);
}

.divider-accent--center {
  margin-inline: auto;
}

/* Icon utility */
.icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.icon--sm { width: 16px; height: 16px; }
.icon--md { width: 24px; height: 24px; }
.icon--lg { width: 32px; height: 32px; }
.icon--filled { fill: currentColor; stroke: none; }

.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--color-accent);
}

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

/* Reduced Motion */
@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;
  }
}

/* Responsive Typography */
@media (max-width: 768px) {
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-lg); }
}
