/* ============================================
   CHASE MERRITT — Global Styles
   White #FFFFFF | Off-white #E8EDF2
   Dark #242220 | Text #1A1917 / #6B6560
   Blue accent rgb(100,135,165)
   Gold accent rgb(170,130,85)
   ============================================ */

:root {
  --cm-ink: #1A1917;
  --cm-copy: #6B6560;
  --cm-muted: #8A857E;
  --cm-line: rgba(26, 25, 23, 0.08);
  --cm-panel: #F4F2EE;
  --cm-wash: #E8EDF2;
  --cm-accent: rgb(100, 135, 165);
  --cm-gold: rgb(170, 130, 85);
  --cm-dark: #242220;
  --cm-white: #FFFFFF;
  --cm-header-height: 80px;
  /* Base width; below ~2k viewports the max() leg stays 1480px (see second line). */
  --cm-shell-max: max(
    1480px,
    min(1880px, calc(1480px + max(0px, 100vw - 2000px) * 0.3))
  );
  /* Use everywhere layout width is set; UWW block below can widen (halve side margins). */
  --cm-shell-effective: var(--cm-shell-max);
  --cm-gutter: clamp(24px, 3vw, 44px);
}

/* ===== RESET ===== */

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

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

html, body {
  overflow-x: hidden;
}

body {
  background-color: var(--cm-white);
  color: var(--cm-copy);
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.cm-preview-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: var(--cm-dark);
  color: var(--cm-white);
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cm-staging-preview {
  --cm-preview-banner-height: 34px;
}

.cm-staging-preview .cm-header {
  top: var(--cm-preview-banner-height);
}

.cm-staging-preview .cm-page-padding {
  padding-top: calc(var(--cm-header-height) + var(--cm-preview-banner-height));
}

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

a {
  color: var(--cm-ink);
  font-family: 'Raleway', sans-serif;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--cm-ink);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--cm-ink);
  font-family: 'Manrope', sans-serif;
  margin: 0;
}

h1 { font-weight: 700; font-size: 38px; letter-spacing: -0.03em; }
h2 { font-weight: 700; font-size: 36px; letter-spacing: -0.025em; }
h3 { font-weight: 600; font-size: 22px; letter-spacing: -0.02em; }
h4 { font-weight: 600; font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; }

p, li, span, address {
  color: var(--cm-copy);
  font-family: 'Raleway', sans-serif;
  font-weight: 300;
}

ul, ol {
  list-style: none;
}


/* ===== HEADER ===== */

.cm-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cm-line);
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease;
}

.cm-header-inner {
  width: 100%;
  max-width: var(--cm-shell-effective);
  margin: 0 auto;
  padding: 0 var(--cm-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  height: var(--cm-header-height);
}

.cm-header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 12px;
  flex-shrink: 0;
  line-height: 0; /* keep img vertically aligned with nav; avoids link strut / baseline shift */
}

.cm-header-logo-image {
  width: auto;
  height: 58px;
  display: block;
}

.cm-header-logo-text {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--cm-ink);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cm-header-logo-text span {
  color: var(--cm-ink);
  font-family: 'Cinzel', serif;
  font-weight: 500;
}

.cm-header-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: clamp(18px, 1.45vw, 30px);
}

.cm-header-nav a {
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--cm-copy);
  text-decoration: none;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.cm-header-nav a:hover,
.cm-header-nav a.active {
  color: var(--cm-ink);
}

.cm-header-nav a.cm-nav-cta {
  border: 1px solid rgba(26, 25, 23, 0.16);
  padding: 11px 18px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.72);
  transition: all 0.3s ease;
}

button,
.cm-hero-cta,
.cm-tlf-button,
.cm-tlf-page-button,
.cm-contact-success-link,
.cm-tsg-button {
  border-radius: 0 !important;
}

.cm-header-nav a.cm-nav-cta:hover {
  background: var(--cm-ink);
  color: var(--cm-white);
  border-color: var(--cm-ink);
}

/* Mobile nav toggle */
.cm-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.cm-nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--cm-ink);
  transition: all 0.3s ease;
}

@media screen and (max-width: 900px) {
  .cm-header-logo-image {
    height: 52px;
  }

  .cm-nav-toggle {
    display: flex;
  }

  .cm-header-nav {
    position: fixed;
    top: var(--cm-header-height);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--cm-line);
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .cm-header-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .cm-header-nav a {
    font-size: 13px;
  }

  .cm-home .cm-header:not(.is-scrolled) .cm-header-nav {
    background: rgba(18, 20, 23, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.12);
  }
}

.cm-home .cm-header:not(.is-scrolled) {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.cm-home .cm-header:not(.is-scrolled) .cm-header-nav a {
  color: rgba(255, 255, 255, 0.84);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.2);
}

.cm-home .cm-header:not(.is-scrolled) .cm-header-nav a:hover,
.cm-home .cm-header:not(.is-scrolled) .cm-header-nav a.active {
  color: #FFFFFF;
}

.cm-home .cm-header:not(.is-scrolled) .cm-header-nav a.cm-nav-cta {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
}

.cm-home .cm-header:not(.is-scrolled) .cm-header-nav a.cm-nav-cta:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.58);
  color: #FFFFFF;
}

.cm-home .cm-header:not(.is-scrolled) .cm-nav-toggle span {
  background: #FFFFFF;
}


/* ===== FOOTER ===== */

.cm-footer {
  background-color: #FCFBF8;
  padding: 72px 0 34px;
}

.cm-footer-inner {
  width: 100%;
  max-width: var(--cm-shell-effective);
  margin: 0 auto;
  padding: 0 var(--cm-gutter);
}

.cm-footer-top {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, 1.4fr);
  gap: 48px 64px;
  align-items: start;
  padding-bottom: 42px;
  border-bottom: 1px solid rgba(26, 25, 23, 0.07);
}

.cm-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.cm-footer-logo {
  display: inline-flex;
  align-items: center;
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 500;
  color: rgba(26, 25, 23, 0.9);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}

.cm-footer-logo-image {
  width: auto;
  height: 66px;
  display: block;
}

.cm-footer-tagline {
  color: rgba(26, 25, 23, 0.56);
  font-family: 'Raleway', sans-serif;
  font-size: 15px;
  font-weight: 300;
  max-width: 34ch;
  line-height: 1.75;
  text-align: left;
}

.cm-footer-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, auto));
  justify-content: end;
  gap: 36px 52px;
  width: 100%;
}

.cm-footer-column {
  display: grid;
  gap: 12px;
  align-content: start;
}

.cm-footer-eyebrow {
  color: rgba(26, 25, 23, 0.42);
  font-family: 'Raleway', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.cm-footer-nav,
.cm-footer-stack {
  display: grid;
  gap: 10px;
}

.cm-footer-stack p {
  color: rgba(26, 25, 23, 0.62);
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.7;
}

.cm-footer-office-name {
  color: rgba(26, 25, 23, 0.82) !important;
  font-weight: 400 !important;
  letter-spacing: 0.2px;
}

.cm-footer-nav a {
  color: rgba(26, 25, 23, 0.68);
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.3s ease;
  white-space: nowrap;
  text-align: left;
}

.cm-footer-stack a {
  color: rgba(26, 25, 23, 0.68);
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.1px;
  line-height: 1.6;
  text-decoration: none;
  transition: color 0.3s ease;
}

.cm-footer-nav a:hover,
.cm-footer-stack a:hover {
  color: rgba(26, 25, 23, 0.95);
}

.cm-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 24px;
  gap: 18px 24px;
}

.cm-footer-copy {
  color: rgba(26, 25, 23, 0.42);
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.cm-footer-location {
  color: rgba(26, 25, 23, 0.56);
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  font-weight: 400;
  text-align: right;
}

@media screen and (max-width: 767px) {
  .cm-footer {
    padding: 40px 0 24px;
  }

  .cm-footer-logo-image {
    height: 56px;
  }

  .cm-footer-top {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .cm-footer-columns {
    grid-template-columns: 1fr;
    gap: 24px;
    justify-content: stretch;
  }

  .cm-footer-nav {
    gap: 14px;
  }

  .cm-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .cm-footer-location {
    text-align: left;
  }
}

/* True ultrawide only (not 16:10): each side margin is half the centered case — W' = (100vw + W) / 2. */
@media (min-width: 2000px) and (min-aspect-ratio: 2 / 1) {
  :root {
    --cm-shell-effective: min(100vw, calc((100vw + var(--cm-shell-max)) / 2));
  }
}

/* ===== UTILITY ===== */

.cm-page-padding {
  padding-top: var(--cm-header-height); /* offset for fixed header */
}

.cm-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;
}
