/* ==========================================================================
   Base — Reset, Layout, Typography
   ========================================================================== */

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

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

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

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

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

ul, ol { list-style: none; }

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

/* Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 640px) { .container { padding-inline: var(--space-6); } }
@media (min-width: 1024px) { .container { padding-inline: var(--space-8); } }

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 640px) { .container-narrow { padding-inline: var(--space-6); } }

.section { padding-block: var(--space-16); }
@media (min-width: 768px) { .section { padding-block: var(--space-20); } }
@media (min-width: 1200px) { .section { padding-block: var(--space-32); } }

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

/* Typography */
.headline-hero {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--foreground);
}
.headline-section {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--foreground);
}
.headline-sub {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--foreground);
}
.subheadline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
}
.label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
}
.muted { font-size: var(--text-sm); color: var(--muted); }
.dimmed { color: var(--dimmed); }

.section-header { text-align: center; margin-bottom: var(--space-4); }
.section-header .label { margin-bottom: var(--space-4); display: block; }
.section-header .headline-section { margin-top: var(--space-4); }
.section-header .subheadline { margin-top: var(--space-4); max-width: 640px; margin-inline: auto; }
