/* =========================================
   RESET & BASE TYPOGRAPHY
   ========================================= */

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

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-off-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

.site-wrapper {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 300;
  line-height: 1.15;
  color: var(--color-graphite);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.75rem, 5.5vw, 5rem);
  font-weight: 200;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 300;
}

h3 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 500;
}

h4 {
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  font-weight: 600;
}

p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

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

ul, ol {
  list-style: none;
}

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Container ── */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.container--wide {
  max-width: var(--container-wide);
}

/* ── Section Spacing ── */
.section {
  padding: var(--space-2xl) 0;
}

@media (min-width: 1024px) {
  .section {
    padding: var(--space-3xl) 0;
  }
}

/* ── Utilities ── */
.text-center { text-align: center; }
.text-gold   { color: var(--color-gold); }
.text-white  { color: var(--color-white); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Selection ── */
::selection {
  background-color: var(--color-gold);
  color: var(--color-white);
}

/* ── Mobile Responsive Overrides ── */
@media (max-width: 767px) {
  html {
    font-size: 15px;
  }

  h1 {
    font-size: clamp(2rem, 8vw, 2.75rem);
  }

  h2 {
    font-size: clamp(1.6rem, 6vw, 2rem);
  }

  h3 {
    font-size: clamp(1.15rem, 4vw, 1.35rem);
  }

  p {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .section {
    padding: var(--space-xl) 0;
  }

  /* Prevent overflow on long words/emails */
  body {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Account for mobile sticky CTA bar */
  .site-footer {
    padding-bottom: 5rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.85rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .section {
    padding: 2.5rem 0;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .section {
    padding: var(--space-2xl) 0;
  }
}
