/* ═══════════════════════════════════════
   CONTACT US — design taken from the Node site (contact-us.css + main.css tokens).
   Scoped to main.contact-page and the page's own #support-modal, so the global
   .support-modal rules in css/index.css stay as they are everywhere else.
   ═══════════════════════════════════════ */

.contact-page,
#support-modal {
  --white: #fff; --ink: #2a2a2a; --muted: #606060; --border: #e8e8e8;
  --green: #008944; --green-hover: #006432;
  --r: 14px; --r-lg: 20px; --r-xl: 28px;
  --shadow-sm: 0 4px 16px rgba(42, 42, 42, .06);
  --shadow-lg: 0 24px 64px rgba(42, 42, 42, .14);
  --text-h4: 20px; --text-body-lg: 18px; --text-body: 16px; --text-body-lh: 20px; --text-sm: 14px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: var(--text-body);
  line-height: var(--text-body-lh);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.contact-page { background: var(--white); min-height: 0; padding-top: 24px; }
@media (max-width: 767px) { .contact-page { padding-top: 16px; } }
.contact-page h1, .contact-page h2 { text-transform: capitalize; }
.contact-page a { color: inherit; text-decoration: none; }

.contact-page .contact-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ── Hero ── */
.contact-page .contact-hero { position: relative; padding: 72px 0 56px; overflow: hidden; }
.contact-page .contact-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(0, 60, 30, .88), rgba(0, 137, 68, .72)),
    url('../../img/contact.jpg') center / cover no-repeat;
  z-index: 0;
}
.contact-page .contact-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 960px) {
  .contact-page .contact-hero-inner { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
}

.contact-page .contact-hero-copy h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
  color: #fff;
  margin: 0 0 20px;
}
.contact-page .contact-hero-copy h1 span { display: block; }
.contact-page .contact-hero-copy p {
  font-size: var(--text-body-lg);
  line-height: 1.6;
  color: rgba(255, 255, 255, .88);
  max-width: 420px;
  margin: 0;
}

/* ── Office cards ── */
.contact-page .contact-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.contact-page .contact-office-card {
  padding: 20px 22px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(255, 255, 255, .4);
  box-shadow: var(--shadow-sm);
}
.contact-page .contact-office-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.contact-page .contact-office-icon { color: #0890F1; flex-shrink: 0; }
.contact-page .contact-office-card h2 { font-size: var(--text-h4); line-height: 30px; font-weight: 700; margin: 0; color: var(--ink); }
.contact-page .contact-office-detail + .contact-office-detail { margin-top: 10px; }

.contact-page .contact-address { color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.contact-page .contact-address:hover { color: var(--green); }

.contact-page .contact-office-phone-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.contact-page .contact-phone,
.contact-page .contact-email { font-weight: 600; color: var(--green); overflow-wrap: anywhere; }
.contact-page .contact-phone:hover,
.contact-page .contact-email:hover { color: var(--green-hover); }

/* Copy pill: the existing page script toggles .copied on .copy-btn[data-copy] */
.contact-page .contact-copy-btn {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 12px;
  font: inherit;
  font-size: var(--text-sm);
  line-height: 20px;
  cursor: pointer;
  min-width: 64px;
  transition: border-color .2s, color .2s;
}
.contact-page .contact-copy-btn:hover { border-color: var(--green); color: var(--green); }
.contact-page .contact-copy-btn .copied { display: none; }
.contact-page .contact-copy-btn.copied .copy { display: none; }
.contact-page .contact-copy-btn.copied .copied { display: inline; }

.contact-page .contact-query-btn {
  margin-top: 8px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: var(--r);
  background: var(--green);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-transform: capitalize;
  cursor: pointer;
  transition: background .2s;
}
.contact-page .contact-query-btn:hover { background: var(--green-hover); }
.contact-page .contact-query-btn:active { transform: none; }

.contact-page .contact-copy-btn:focus-visible,
.contact-page .contact-query-btn:focus-visible,
.contact-page a:focus-visible { outline: 2px solid #0890F1; outline-offset: 2px; }

@media (max-width: 959px) {
  .contact-page .contact-hero-copy { text-align: center; }
  .contact-page .contact-hero-copy p { margin-left: auto; margin-right: auto; }
  .contact-page .contact-office-header { justify-content: center; }
  .contact-page .contact-office-card { text-align: center; }
  .contact-page .contact-office-phone-row { justify-content: center; }
}

/* ── Map ── */
.contact-page .contact-map { padding: 48px 0 80px; }
@media (max-width: 767px) { .contact-page .contact-map { padding-top: 32px; } }
.contact-page .contact-mapbox {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}
.contact-page .contact-mapbox iframe { display: block; width: 100%; }
.contact-page .contact-map-link {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 10px 16px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, .95);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.contact-page .contact-map-link:hover { color: var(--green); }

/* ── Support modal (Freshdesk form) ──
   The form is Freshdesk's cross-origin embedded widget. It lays itself out to
   fill 100% of the iframe (title on top, its own scrolling body, Submit pinned
   to the bottom), so the iframe must fill the modal exactly. Our wrapper never
   scrolls, so Freshdesk's inner body is the single scroll area. */
/* Background scroll lock while the popup is open (QA: page scrolled behind it).
   stylesheet.css sets overflow-x:hidden on html AND body, so html is the real scroller
   and the existing body.style.overflow='hidden' alone can't stop it. CSS only: applies
   just while #support-modal has .is-open, so nothing changes when it's closed. */
html:has(#support-modal.is-open),
html:has(#support-modal.is-open) body {
  overflow: hidden !important;
}
#support-modal.support-modal-overlay {
  overscroll-behavior: contain; /* no scroll chaining from the popup to the page */
  background: rgba(13, 20, 16, .55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  padding: 24px;
  z-index: 10000;
}
/* Desktop: branded aside (same gradient as the contact hero) + form card */
#support-modal .support-modal {
  position: relative;
  width: min(980px, 100%);
  max-width: none;
  height: min(720px, calc(100vh - 48px));
  height: min(720px, calc(100dvh - 48px));
  max-height: none;
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  overflow: hidden;
  font-family: 'Outfit', system-ui, sans-serif;
  transform: translateY(18px) scale(.98);
  transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}
#support-modal.is-open .support-modal { transform: translateY(0) scale(1); }

/* Round close button (same as .asm-close), pinned to the dialog corner */
#support-modal .support-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  transition: background-color .15s, transform .15s, border-color .15s;
}
#support-modal .support-modal-close:hover { background: #f9f9f9; transform: scale(1.05); }
#support-modal .support-modal-close:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

#support-modal .support-modal-header {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 18px;
  padding: 40px 32px 32px;
  border: 0;
  color: var(--white);
  background:
    radial-gradient(120% 60% at 0% 100%, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(160deg, #003c1e 0%, #006432 55%, var(--green) 100%);
  overflow-y: auto;
}
#support-modal .support-modal-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r);
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  color: var(--white);
}
#support-modal .support-modal-heading { min-width: 0; }
#support-modal .support-modal-eyebrow {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .72);
}
#support-modal .support-modal-header h3 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--white);
  text-transform: capitalize;
}
#support-modal .support-modal-heading p {
  margin: 10px 0 0;
  font-size: var(--text-body);
  line-height: 24px;
  color: rgba(255, 255, 255, .82);
}
#support-modal .support-modal-steps {
  list-style: none;
  margin: auto 0 0;
  padding: 22px 0 0;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, .18);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
#support-modal .support-modal-steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: var(--text-sm);
  line-height: 20px;
  color: rgba(255, 255, 255, .75);
}
#support-modal .support-modal-steps strong {
  display: block;
  font-weight: 600;
  color: var(--white);
}
#support-modal .support-step-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--white);
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

/* Form side: the iframe fills it exactly; only Freshdesk's own form area scrolls */
#support-modal .support-modal-body {
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 28px 32px 12px;
  overflow: hidden;
  position: relative;
  background: var(--white);
}
#support-modal .fw-query-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  padding: 0;
}
/* Loading placeholder (same pattern as .asm-loading) */
#support-modal .support-modal-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--white);
  pointer-events: none;
}
#support-modal .support-modal-loading[hidden] { display: none; }
#support-modal .support-modal-loading span:last-child {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
#support-modal .support-modal-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  animation: support-spin .8s linear infinite;
}
@keyframes support-spin { to { transform: rotate(360deg); } }

/* Thank-you state: covers Freshdesk's unstyled post-submit screen */
#support-modal .support-thanks {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
  overflow-y: auto;
  background:
    radial-gradient(120% 70% at 50% 0%, #f3faf6 0%, rgba(243, 250, 246, 0) 70%),
    var(--white);
  animation: support-thanks-in .35s ease both;
}
#support-modal .support-thanks[hidden] { display: none; }
#support-modal .support-thanks-inner {
  width: 100%;
  max-width: 400px;
  text-align: center;
}
#support-modal .support-thanks-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  box-shadow: 0 0 0 10px #daefe0, 0 12px 32px rgba(0, 137, 68, .28);
  animation: support-thanks-pop .45s cubic-bezier(.34, 1.56, .64, 1) .1s both;
}
#support-modal .support-thanks-title {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--ink);
}
#support-modal .support-thanks-text {
  margin: 0 auto 28px;
  font-size: var(--text-body);
  line-height: 24px;
  color: var(--muted);
}
#support-modal .support-thanks-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
#support-modal .support-thanks-btn {
  width: 100%;
  max-width: 280px;
  padding: 14px 20px;
  border: none;
  border-radius: var(--r);
  background: var(--green);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
#support-modal .support-thanks-btn:hover { background: var(--green-hover); }
#support-modal .support-thanks-link {
  padding: 8px 12px;
  border: none;
  background: none;
  color: var(--green);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
}
#support-modal .support-thanks-link:hover { text-decoration: underline; }
#support-modal .support-thanks-btn:focus-visible,
#support-modal .support-thanks-link:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

@keyframes support-thanks-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes support-thanks-pop { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 767px) {
  #support-modal .support-thanks { padding: 24px 16px; }
  #support-modal .support-thanks-badge { width: 72px; height: 72px; margin-bottom: 20px; box-shadow: 0 0 0 8px #daefe0, 0 10px 24px rgba(0, 137, 68, .25); }
  #support-modal .support-thanks-badge svg { width: 30px; height: 30px; }
  #support-modal .support-thanks-title { font-size: 20px; }
  #support-modal .support-thanks-text { font-size: var(--text-sm); line-height: 21px; margin-bottom: 24px; }
}

/* Tablet + mobile: single column; the aside becomes a compact header */
@media (max-width: 991px) {
  #support-modal .support-modal {
    width: min(640px, 100%);
    height: min(780px, calc(100vh - 48px));
    height: min(780px, calc(100dvh - 48px));
    display: flex;
    flex-direction: column;
  }
  #support-modal .support-modal-header {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    padding: 20px 64px 20px 28px;
    overflow: visible;
  }
  #support-modal .support-modal-eyebrow { margin-bottom: 4px; font-size: 11px; line-height: 14px; }
  #support-modal .support-modal-header h3 { font-size: 22px; line-height: 1.25; }
  #support-modal .support-modal-heading p { margin-top: 2px; font-size: var(--text-sm); line-height: 20px; }
  #support-modal .support-modal-steps { display: none; }
  #support-modal .support-modal-close { top: 26px; right: 18px; }
  #support-modal .support-modal-body { flex: 1 1 auto; padding: 18px 28px 8px; }
}
/* Phone: full-screen sheet (same as .asm-dialog on small screens) */
@media (max-width: 640px) {
  #support-modal.support-modal-overlay { padding: 0; }
  #support-modal .support-modal {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
  }
  #support-modal .support-modal-close { top: max(18px, calc(env(safe-area-inset-top) + 18px)); right: 12px; }
  #support-modal .support-modal-header {
    gap: 12px;
    padding: 16px 60px 16px 16px;
    padding-top: max(16px, env(safe-area-inset-top));
  }
  #support-modal .support-modal-icon { width: 40px; height: 40px; border-radius: 12px; }
  #support-modal .support-modal-eyebrow { display: none; }
  #support-modal .support-modal-header h3 { font-size: 18px; }
  #support-modal .support-modal-heading p { font-size: 12px; line-height: 16px; }
  #support-modal .support-modal-body {
    padding: 12px 16px 4px;
    padding-bottom: max(4px, env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  #support-modal .support-modal { transition: none; transform: none; }
  #support-modal .support-thanks,
  #support-modal .support-thanks-badge,
  #support-modal .support-modal-spinner { animation: none; }
}
