/* ==========================================================================
   In The Details — shared site chrome
   --------------------------------------------------------------------------
   Everything in this file is the furniture that must look and behave the same
   on every page: skip link, navbar, footer, the two floating buttons, and the
   newsletter modal. Page-specific styles stay in each page's own <style> block
   and load after this file, so a page can still override a token if it needs
   to. Nothing here should describe a single page's content.
   ========================================================================== */

:root {
  --blue: #004AAD;
  --navy: #001F4E;
  --purple: #5B279A;
  --purple-dark: #64269F;
  --dark: #121212;
  --gray-bg: #F6F5F8;
  --white: #ffffff;
  --text-dark: #000321;

  --font-heading: 'Space Grotesk', sans-serif;
  --font-sub: 'DM Sans', sans-serif;
  --font-body: 'Noto Sans', sans-serif;

  /* Floating button geometry. The footer reserves this much room so the
     buttons never sit on top of the legal links. */
  --float-size: 60px;
  --float-gap: 22px;
  --float-reserve: 104px;
}

/* ===== ACCESSIBILITY PRIMITIVES ===== */

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

/* One visible focus treatment for the whole site. Anything that overrides it
   must still draw a ring — never remove it. */
:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1100;
  padding: 12px 20px;
  border-radius: 0 0 6px 6px;
  background: var(--purple);
  color: var(--white);
  font-family: var(--font-sub);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.15s ease-out;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--white);
  outline-offset: -6px;
}

/* ===== NAVBAR ===== */

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  padding: 10px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.navbar__logo img {
  display: block;
  height: 60px;
  width: auto;
}

.navbar__links {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
  margin: 0;
  padding: 0;
}

.navbar__links a {
  font-family: var(--font-sub);
  font-size: 16px;
  font-weight: 500;
  color: #111;
  text-decoration: none;
}

.navbar__links a:hover {
  color: var(--purple);
}

/* Set by chrome.js from the current path, so the active page is announced,
   not just colored. */
.navbar__links a[aria-current="page"] {
  color: var(--purple);
  font-weight: 600;
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar__cta,
.navbar__mobile-cta a,
.navbar__mobile-cta button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 2px solid transparent;
  border-radius: 6px;
  background: var(--purple);
  color: var(--white);
  font-family: var(--font-sub);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(91, 39, 154, 0.25);
  transition: background 0.15s, transform 0.15s;
}

.navbar__cta:hover,
.navbar__mobile-cta a:hover,
.navbar__mobile-cta button:hover {
  background: var(--purple-dark);
  color: var(--white);
  transform: translateY(-1px);
}

/* Secondary CTA: white fill, purple border and text. */
.navbar__cta--secondary,
.navbar__mobile-cta--secondary button {
  background: var(--white);
  color: var(--purple);
  border-color: var(--purple);
  box-shadow: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

.navbar__cta--secondary:hover,
.navbar__mobile-cta--secondary button:hover {
  background: var(--purple);
  color: var(--white);
  transform: translateY(-1px);
}

.navbar__mobile-cta {
  display: none;
}

.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  border: 0;
  background: none;
  cursor: pointer;
}

.navbar__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #111;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.navbar__hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar__hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.navbar__hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

.site-footer {
  background: var(--navy);
  padding: 28px 64px calc(28px + var(--float-reserve));
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer__legal ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Hairline between links reads as a single legal index rather than four
   unrelated buttons. */
.site-footer__legal li + li {
  border-left: 1px solid rgba(255, 255, 255, 0.28);
  padding-left: 20px;
}

.site-footer__legal a,
.site-footer__contact a {
  font-family: var(--font-sub);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer__legal a:hover,
.site-footer__contact a:hover {
  color: var(--white);
}

.site-footer__contact {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-footer__copy {
  font-family: var(--font-sub);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

/* ===== FLOATING BUTTONS (exactly two, site-wide) ===== */

.floats {
  position: fixed;
  right: var(--float-gap);
  bottom: var(--float-gap);
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.25s, transform 0.25s;
}

/* Parked once the footer is on screen, so the buttons never cover the legal
   links. chrome.js also drops them from the tab order while parked. */
.floats.parked {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}

.call-bubble,
.back-to-top {
  width: var(--float-size);
  height: var(--float-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
}

.call-bubble {
  position: relative;
  background: var(--purple);
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  animation: bubble-glow 3.5s ease-in-out infinite;
}

.call-bubble:hover {
  background: var(--purple-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(91, 39, 154, 0.55);
}

.call-bubble::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--purple);
  opacity: 0.6;
  animation: bubble-pulse 3.5s ease-out infinite;
}

.call-bubble svg {
  animation: icon-wiggle 6s ease-in-out infinite;
}

.back-to-top {
  background: #1a1a2e;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.2s, box-shadow 0.2s;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

@keyframes bubble-glow {
  0%, 100% { box-shadow: 0 8px 24px rgba(91, 39, 154, 0.45); }
  50%      { box-shadow: 0 8px 32px rgba(91, 39, 154, 0.75), 0 0 0 8px rgba(91, 39, 154, 0.12); }
}

@keyframes bubble-pulse {
  0%        { transform: scale(0.95); opacity: 0.6; }
  70%, 100% { transform: scale(1.3);  opacity: 0; }
}

@keyframes icon-wiggle {
  0%, 60%, 100% { transform: rotate(0deg); }
  63%           { transform: rotate(-18deg); }
  66%           { transform: rotate(18deg); }
  69%           { transform: rotate(-12deg); }
  72%           { transform: rotate(10deg); }
  75%           { transform: rotate(0deg); }
}

/* ===== NEWSLETTER MODAL ===== */

.promo-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 31, 78, 0.72);
  backdrop-filter: blur(4px);
  animation: promo-fade 0.25s ease-out;
}

.promo-modal.open {
  display: flex;
}

.promo-modal__panel {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  animation: promo-pop 0.3s ease-out;
}

.promo-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  color: var(--white);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s;
}

.promo-modal__close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.promo-modal__close:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 2px;
}

.newsletter-modal__body {
  padding: 18px;
}

.newsletter-modal__body #_form_6_ {
  margin: 0 auto !important;
  max-width: none !important;
  box-shadow: none !important;
}

@keyframes promo-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes promo-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== LEGAL PAGES =====
   /policies and the three policy documents share one measure and one heading
   scale so moving between them feels like one document set. */

.legal-page {
  max-width: 760px;
  margin: 56px auto 72px;
  padding: 0 32px;
}

.legal-page--index {
  max-width: 940px;
}

.legal-page__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sub);
  font-size: 13px;
  font-weight: 600;
  color: var(--purple);
  text-decoration: none;
  margin-bottom: 28px;
}

.legal-page__back:hover {
  text-decoration: underline;
}

.legal-page__pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sub);
  font-size: 14px;
  font-weight: 700;
  color: var(--purple);
  text-decoration: underline;
  margin: 16px 0 32px;
}

.legal-page__eyebrow {
  font-family: var(--font-sub);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--purple);
  margin: 0 0 12px;
}

.legal-page h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 16px;
}

.legal-page__intro {
  font-size: 16px;
  line-height: 1.7;
  color: #444;
  max-width: 640px;
  margin: 0 0 44px;
}

.legal-page__body {
  font-size: 15px;
  line-height: 1.8;
  color: #333;
}

.legal-page__body p {
  margin-bottom: 16px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {
  .navbar {
    padding: 10px 24px;
  }

  .navbar__links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 12px 0;
  }

  .navbar__links.open {
    display: flex;
  }

  .navbar__links li a {
    display: block;
    padding: 12px 24px;
  }

  .navbar__mobile-cta {
    display: block;
    padding: 12px 24px 6px;
  }

  .navbar__mobile-cta--secondary {
    padding: 6px 24px 12px;
  }

  .navbar__mobile-cta a,
  .navbar__mobile-cta button {
    width: 100%;
    padding: 13px 18px;
  }

  .navbar__actions {
    display: none;
  }

  .navbar__hamburger {
    display: flex;
  }

  .site-footer {
    padding: 24px 24px calc(24px + var(--float-reserve));
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .navbar {
    padding: 8px 18px;
  }

  .legal-page {
    margin: 36px auto 56px;
    padding: 0 20px;
  }

  .navbar__logo img {
    height: 48px;
  }

  .site-footer__legal ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .site-footer__legal li + li {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 600px) {
  :root {
    --float-size: 54px;
    --float-gap: 16px;
    --float-reserve: 92px;
  }

  .newsletter-modal__body {
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .promo-modal,
  .promo-modal__panel,
  .call-bubble,
  .call-bubble::after,
  .call-bubble svg {
    animation: none;
  }

  .floats,
  .call-bubble,
  .back-to-top,
  .skip-link,
  .navbar__cta,
  .navbar__hamburger span {
    transition: none;
  }
}
