/**
 * Base styles, resets, and typography
 */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&display=swap');

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background-color: var(--color-bg-page);
  line-height: 1.5;
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  /* Sticky footer: <main> absorbs the free space so the footer sits at the
     bottom of the viewport on short pages */
  display: flex;
  flex-direction: column;
}

body > main {
  flex: 1 0 auto;
}

body > footer {
  flex-shrink: 0;
}

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

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

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

ul,
ol {
  list-style: none;
}

/* Fluid Typography Utilities */
.heading-display {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(2.1rem, 4.8vw + 0.5rem, 4.25rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  word-break: break-word;
  overflow-wrap: break-word;
}

.heading-display .serif-accent {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 600;
  display: block;
  letter-spacing: -0.025em;
  word-break: break-word;
  overflow-wrap: break-word;
}

.heading-section {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: clamp(1.75rem, 3.2vw + 0.25rem, 3.125rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-text-main);
  word-break: break-word;
  overflow-wrap: break-word;
}

.heading-section .serif-accent {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 600;
  color: var(--color-primary);
  display: block;
  letter-spacing: -0.025em;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Container Utility */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--section-spacing-x);
  padding-right: var(--section-spacing-x);
}

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