/* The conference invitation is self-contained; the public offer lives at /ahg. */
@font-face {
  font-family: 'AHG Benton';
  src: url('/assets/ahg/fonts/BentonSans-Regular.ttf') format('truetype');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'AHG Benton';
  src: url('/assets/ahg/fonts/BentonSans-Medium.ttf') format('truetype');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

.ahg-peek {
  --ahg-blue: #0b4fcb;
  position: fixed;
  z-index: 90;
  right: max(1.5rem, calc((100vw - 1200px) / 2 + 1.5rem));
  bottom: 0;
  width: min(27rem, calc(100% - 2rem));
  background: #fbfbfd;
  color: #161617;
  border: 1px solid #dedee3;
  border-bottom: 0;
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -4px 40px rgba(0, 0, 0, .09), 0 2px 12px rgba(0, 0, 0, .05);
  font-family: 'AHG Benton', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.45;
  transform: translateY(.5rem);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.ahg-peek::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 1.5rem;
  width: 2.25rem;
  height: 2px;
  background: var(--ahg-blue);
}

.ahg-peek[hidden],
.ahg-peek__dismiss[hidden] { display: none; }

.ahg-peek__link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .4rem;
  padding: 1.25rem 3.75rem calc(1.75rem + env(safe-area-inset-bottom, 0px)) 1.5rem;
  color: inherit;
  text-decoration: none;
  border-radius: inherit;
}

.ahg-peek__eyebrow {
  color: #55565c;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.ahg-peek__headline {
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.3;
}

.ahg-peek__cta {
  display: inline-flex;
  align-items: baseline;
  gap: .6rem;
  margin-top: .15rem;
  color: var(--ahg-blue);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: rgba(11, 79, 203, .28);
  text-underline-offset: .24em;
}

.ahg-peek__cta span { font-size: 1.05em; }

.ahg-peek__dismiss {
  position: absolute;
  top: .4rem;
  right: .35rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  color: #66666d;
  background: transparent;
  border: 0;
  border-radius: .65rem;
  cursor: pointer;
}

.ahg-peek__dismiss:hover { background: #ededf2; color: #161617; }
.ahg-peek__dismiss svg { width: 1rem; height: 1rem; }

.ahg-peek__link:focus,
.ahg-peek__link:focus-visible {
  outline: 2px solid var(--ahg-blue);
  outline-offset: -5px;
  border-radius: inherit;
}

.ahg-peek__dismiss:focus,
.ahg-peek__dismiss:focus-visible {
  outline: 2px solid var(--ahg-blue);
  outline-offset: -4px;
  border-radius: .65rem;
}

.ahg-peek:focus-within { transform: translateY(0); }
.ahg-peek__link:hover .ahg-peek__cta { text-decoration-color: currentColor; }

/* Leave room at the end of the page and when keyboard focus scrolls a control. */
html.ahg-peek-visible { scroll-padding-bottom: var(--ahg-peek-height, 10rem); }
.ahg-peek-visible .site-footer { padding-bottom: var(--ahg-peek-height, 10rem); }

/* Give the contact form and mobile keyboard the full viewport while typing. */
body:has(.contact-form:focus-within) .ahg-peek { visibility: hidden; }

@media (hover: hover) and (pointer: fine) {
  .ahg-peek:hover { transform: translateY(0); box-shadow: 0 -6px 44px rgba(0, 0, 0, .12); }
}

@media (max-width: 40rem) {
  .ahg-peek { right: 1rem; width: calc(100% - 2rem); border-radius: .875rem .875rem 0 0; }
  .ahg-peek__link { gap: .25rem; padding: 1rem 3.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px)) 1.125rem; }
  .ahg-peek::before { left: 1.125rem; }
  .ahg-peek__headline { display: none; }
  .ahg-peek__cta { margin: 0; font-size: 1rem; letter-spacing: -.015em; }
}

@media (prefers-reduced-motion: no-preference) {
  .js .ahg-peek { animation: ahg-peek-in 650ms cubic-bezier(.22, 1, .36, 1) 650ms backwards; }
  .js .ahg-peek:focus-within { animation: none; }
}

@keyframes ahg-peek-in {
  from { transform: translateY(calc(100% + 1rem)); opacity: 0; }
  to { transform: translateY(.5rem); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .ahg-peek { transition: none; transform: none; }
}

@media print {
  .ahg-peek { display: none; }
  .ahg-peek-visible .site-footer { padding-bottom: var(--ev-space-7); }
}
