/* AV CREATIVES — Base & Typography Styles */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;600&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

*, *::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;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  width: 100%;
  overflow-x: hidden;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.01em;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(1.45rem, 5.5vw, 3.8rem);
  font-weight: 500;
  line-height: 1.15;
}

h2 {
  font-size: clamp(1.25rem, 4.2vw, 2.9rem);
  font-weight: 500;
  line-height: 1.18;
}

h3 {
  font-size: clamp(1.05rem, 3.2vw, 1.85rem);
  font-weight: 500;
  line-height: 1.22;
}

h4 {
  font-size: clamp(0.925rem, 2.2vw, 1.35rem);
  font-weight: 500;
  line-height: 1.25;
}

p {
  color: var(--text-muted);
  font-size: var(--text-base);
  line-height: 1.62;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

p.lead {
  font-size: clamp(0.925rem, 1.25vw, 1.25rem);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 620px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
  touch-action: manipulation;
}

img, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
  cursor: pointer;
  touch-action: manipulation;
}

input, textarea, select {
  font-family: inherit;
  font-size: 16px; /* 16px prevents iOS Safari auto-zoom */
  color: inherit;
  border: none;
  outline: none;
  background: none;
  touch-action: manipulation;
}

/* Editorial Style Accents */
.serif-italic,
.highlight-serif {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--color-primary);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.85rem;
  display: block;
}

.handwritten {
  font-family: 'Caveat', cursive;
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1.2;
  display: inline-block;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--section-padding-x);
  padding-right: var(--section-padding-x);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--section-padding-x);
  padding-right: var(--section-padding-x);
}

.container-reading {
  width: 100%;
  max-width: var(--container-reading-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--section-padding-x);
  padding-right: var(--section-padding-x);
}

.section {
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
  position: relative;
}

.section-alt {
  background-color: var(--bg-secondary);
}

.section-white {
  background-color: var(--bg-white);
}

/* Accessibility & Selection */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

::selection {
  background-color: var(--color-beige);
  color: var(--color-secondary);
}

@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;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }
  p {
    font-size: 0.885rem;
    line-height: 1.55;
  }
  p.lead {
    font-size: 0.95rem;
    line-height: 1.48;
  }
}