/* ========================================================================
   Nav — floating pill, cream-on-glass
   ======================================================================== */
.nav {
  position: fixed;
  top: var(--s-16);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - var(--s-32));
  max-width: var(--container);
  z-index: var(--z-nav);
  border-radius: var(--radius-pill);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: rgba(245, 240, 232, 0.72);
  border: 0.5px solid rgba(31, 42, 54, 0.1);
  box-shadow: var(--elev-1);
  transition: background var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.nav:hover { background: rgba(245, 240, 232, 0.85); box-shadow: var(--elev-2); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-24);
  padding: var(--s-8) var(--s-8) var(--s-8) var(--s-24);
  min-height: 56px;
}
.nav-logo {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-24);
  color: var(--text-heading);
  white-space: nowrap;
  letter-spacing: -0.02em;
  line-height: 1;
}
.nav-logo em { color: inherit; font-style: normal; font-weight: inherit; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-32);
}
.nav-links a {
  position: relative;
  font-size: var(--fs-14);
  font-weight: 400;
  color: var(--text-body);
  white-space: nowrap;
  padding: var(--s-8) 0;
  transition: color var(--dur-base) var(--ease-out);
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.nav-links a:hover { color: var(--text-heading); }
.nav-links a:hover::after,
.nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--text-heading); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--s-8);
}
.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-dark);
  color: var(--text-light);
  align-items: center;
  justify-content: center;
  transition: background var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.nav-burger:hover { background: var(--color-navy-700); }
.nav-burger:active { transform: scale(0.96); }
.nav-burger span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  position: relative;
}
.nav-burger span::before, .nav-burger span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  background: currentColor;
}
.nav-burger span::before { top: -5px; }
.nav-burger span::after  { top:  5px; }

/* Mobile menu */
.m-menu {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  color: var(--text-light);
  z-index: var(--z-modal);
  display: none;
  flex-direction: column;
  padding: 96px var(--s-32) var(--s-40);
  overflow-y: auto;
}
.m-menu.open {
  display: flex;
  animation: mMenuIn var(--dur-slow) var(--ease-out) both;
}
@keyframes mMenuIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.m-menu a {
  font-family: var(--font-serif);
  font-size: var(--fs-40);
  font-weight: 400;
  padding: var(--s-16) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-height: 56px;
  display: flex;
  align-items: center;
  transition: color var(--dur-base) var(--ease-out);
}
.m-menu a:hover { color: var(--gold-light); }
.m-menu a em { color: inherit; font-style: normal; }
.m-menu .m-cta { margin-top: var(--s-24); align-self: flex-start; }
.m-close {
  position: absolute;
  top: var(--s-20);
  right: var(--s-20);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  font-size: var(--fs-24);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur-base) var(--ease-out);
}
.m-close:hover { background: rgba(255, 255, 255, 0.2); }

/* ========================================================================
   Buttons — per brief palette
   ======================================================================== */
.btn, .btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-8);
  min-height: 48px;
  padding: var(--s-12) var(--s-24);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans);
  font-size: var(--fs-14);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  transition:
    transform var(--dur-base) var(--ease-out),
    background var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out);
  cursor: pointer;
  border: 1px solid transparent;
}
.btn:hover, .btn-primary:hover, .btn-ghost:hover { transform: translateY(-1px); }
.btn:active, .btn-primary:active, .btn-ghost:active {
  transform: translateY(0) scale(0.98);
  transition-duration: var(--dur-fast);
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--bg-dark);
  color: var(--text-light);
}
.btn-primary:hover { background: var(--color-navy-700); }

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-heading);
}
.btn-ghost:hover { background: var(--bg-dark); color: var(--text-light); border-color: var(--bg-dark); }

.btn-ghost.on-dark {
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text-light);
}
.btn-ghost.on-dark:hover { background: var(--text-light); color: var(--bg-dark); border-color: var(--text-light); }

.btn-gold {
  background: var(--gold);
  color: var(--bg-dark);
}
.btn-gold:hover { background: var(--gold-dark); color: var(--text-light); }

.btn-glass {
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--text-light);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.28); border-color: rgba(255, 255, 255, 0.65); }

.btn .arrow {
  width: var(--icon-sm);
  height: var(--icon-sm);
  transition: transform var(--dur-base) var(--ease-out);
}
.btn:hover .arrow { transform: translateX(3px); }

/* ========================================================================
   Motion button — dark "blob" sits on the left, glides right to fill the
   whole pill on hover. Arrow nudges right, label color inverts.
   Usage:
     <a class="motion-btn" href="...">
       <span class="motion-btn-blob" aria-hidden="true"></span>
       <span class="motion-btn-icon" aria-hidden="true"><svg>...</svg></span>
       <span class="motion-btn-text">Foster Now</span>
     </a>
   ======================================================================== */
.motion-btn {
  position: relative;
  display: inline-block;
  width: auto;
  min-width: 220px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border-light, rgba(31, 42, 54, 0.1));
  outline: none;
  background: var(--bg-soft, #f6f1e7);
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-sans);
  overflow: hidden;
}
.motion-btn-blob {
  display: block;
  height: 48px;
  width: 48px;
  margin: 0;
  border-radius: 999px;
  background: var(--bg-dark, #1f2a36);
  transition: width 500ms cubic-bezier(0.32, 0.72, 0, 1);
}
.motion-btn:hover .motion-btn-blob {
  width: 100%;
}
.motion-btn-icon {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translate(0, -50%);
  transition: left 500ms cubic-bezier(0.32, 0.72, 0, 1);
  display: inline-flex;
  color: #ffffff;
  pointer-events: none;
}
.motion-btn-icon svg { width: 20px; height: 20px; }
/* Arrow travels as the blob expands — anchored to the right edge of the
   pill via calc, so it always lands flush at the end regardless of button
   width. (Was a fixed 150px which fell short on wider buttons.) */
.motion-btn:hover .motion-btn-icon {
  left: calc(100% - 36px);
}
.motion-btn-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text, #1f2a36);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: color 500ms cubic-bezier(0.32, 0.72, 0, 1);
  pointer-events: none;
}
.motion-btn:hover .motion-btn-text {
  color: var(--bg-soft, #f6f1e7);
}
.motion-btn:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
}

/* ========================================================================
   Button-in-Button — circular arrow wrapper inside a primary CTA.
   Usage:
     <a class="btn-primary btn-bib">Foster Now
       <span class="bib-arrow"><svg>...</svg></span>
     </a>
*/
.btn-bib {
  padding-right: 6px;
  gap: var(--s-12);
}
.bib-arrow {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: currentColor;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: background var(--dur-base) var(--ease-out);
  flex: 0 0 auto;
}
.bib-arrow svg {
  width: 14px;
  height: 14px;
  transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
}
/* Arrow exits right + re-enters from left on hover */
.btn-bib:hover .bib-arrow {
  background: rgba(255, 255, 255, 0.22);
}
.btn-bib:hover .bib-arrow svg {
  animation: bibArrowSlide 0.6s cubic-bezier(0.32, 0.72, 0, 1);
}
@keyframes bibArrowSlide {
  0%   { transform: translateX(0);    opacity: 1; }
  40%  { transform: translateX(26px); opacity: 0; }
  41%  { transform: translateX(-26px); opacity: 0; }
  100% { transform: translateX(0);    opacity: 1; }
}
/* On light-bg (btn-gold on navy banner): dark circle inside gold pill */
.btn-gold.btn-bib .bib-arrow {
  background: rgba(31, 42, 54, 0.12);
}
.btn-gold.btn-bib:hover .bib-arrow { background: rgba(31, 42, 54, 0.22); }
/* On ghost on cream: subtle dark circle */
.btn-ghost.btn-bib .bib-arrow {
  background: rgba(31, 42, 54, 0.06);
}
.btn-ghost.btn-bib:hover .bib-arrow { background: rgba(255, 255, 255, 0.18); }

/* ========================================================================
   Marquee (trust bar)
   ======================================================================== */
.marquee {
  overflow: hidden;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: var(--s-20) 0;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee-track span {
  font-family: var(--font-sans);
  font-size: var(--fs-12);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  flex: 0 0 auto;
  /* margin-inline-end (instead of flex `gap`) so the LAST item of the
     duplicated set also has trailing space — keeps translateX(-50%)
     aligned exactly to one set width and prevents the snap after
     "Hague Convention" when the loop seam crosses the viewport. */
  margin-inline-end: var(--s-48);
}
.marquee-track span.dot {
  color: var(--gold);
  font-size: 8px;
  letter-spacing: 0;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ========================================================================
   Accordion (training page)
   ======================================================================== */
.accordion { display: flex; flex-direction: column; gap: var(--s-12); }
.acc-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  transition: border-color var(--dur-base) var(--ease-out);
}
.acc-item:hover { border-color: var(--border-strong); }
.acc-item.open  { border-color: var(--gold); }
.acc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-16);
  width: 100%;
  min-height: 64px;
  padding: var(--s-20) var(--s-24);
  font-family: var(--font-serif);
  font-size: var(--fs-24);
  font-weight: 500;
  color: var(--text-heading);
  background: transparent;
  text-align: left;
  transition: background var(--dur-base) var(--ease-out);
}
.acc-header:hover { background: var(--bg-secondary); }
.acc-header > span:first-child { flex: 1; }
.acc-header .acc-count {
  font-family: var(--font-sans);
  font-size: var(--fs-11);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}
.acc-header .acc-chevron {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-heading);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur-slow) var(--ease-out), background var(--dur-base) var(--ease-out);
  flex: 0 0 auto;
}
.acc-header .acc-chevron svg { width: 16px; height: 16px; }
.acc-item.open .acc-chevron { transform: rotate(180deg); background: var(--gold); color: var(--bg-dark); }
.acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-slow) var(--ease-out);
}
.acc-item.open .acc-body { max-height: 2400px; }
.acc-inner {
  padding: 0 var(--s-24) var(--s-24);
  display: flex;
  flex-direction: column;
  gap: var(--s-12);
}
.acc-course {
  padding: var(--s-16);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.acc-course-title {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--fs-16);
  color: var(--text-heading);
}
.acc-course p { font-size: var(--fs-14); color: var(--text-body); }
.acc-course a {
  align-self: flex-start;
  color: var(--text-heading);
  font-size: var(--fs-14);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: var(--s-4);
  margin-top: var(--s-4);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
}
.acc-course a:hover { color: var(--gold); }

/* ========================================================================
   Footer
   ======================================================================== */
.footer {
  background: var(--bg-dark);
  color: var(--color-slate);
  padding: var(--s-88) 0 var(--s-32);
  position: relative;
  overflow: hidden;
}
.footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(201, 151, 74, 0.08) 0%, transparent 50%);
  pointer-events: none;
}
.footer > * { position: relative; }
.footer a {
  color: var(--color-slate);
  transition: color var(--dur-base) var(--ease-out);
}
.footer a:hover { color: var(--text-light); }
.ft-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--s-48);
  margin-bottom: var(--s-48);
}
.ft-brand .nav-logo {
  color: var(--text-light);
  font-size: var(--fs-32);
  display: inline-block;
  margin-bottom: var(--s-16);
}
.ft-brand p {
  color: var(--color-slate);
  max-width: 320px;
  font-size: var(--fs-14);
  line-height: var(--lh-base);
}
.ft-col h5 {
  font-family: var(--font-sans);
  font-size: var(--fs-11);
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: var(--s-20);
}
.ft-col ul { display: flex; flex-direction: column; gap: var(--s-12); }
.ft-col ul a {
  font-size: var(--fs-14);
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}
.ft-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s-16);
  padding-top: var(--s-24);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: var(--fs-12);
  color: rgba(184, 196, 204, 0.6);
  letter-spacing: 0.02em;
}
.ft-portal-link {
  font-size: var(--fs-11) !important;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  opacity: 0.65;
  display: inline-flex !important;
  align-items: center;
  gap: var(--s-8);
}
.ft-portal-link:hover { opacity: 1; }
.ft-legal {
  display: flex;
  align-items: center;
  gap: var(--s-20);
  flex-wrap: wrap;
}
.ft-legal a {
  font-size: var(--fs-12);
  opacity: 0.6;
}
.ft-legal a:hover { opacity: 1; }

/* ========================================================================
   Responsive
   ======================================================================== */
@media (max-width: 1024px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-cta .btn:not(.btn-primary) { display: none; }
}
@media (max-width: 768px) {
  .section { padding: var(--s-80) 0; }
  .ft-grid { grid-template-columns: 1fr 1fr; gap: var(--s-32); }
  .acc-header { font-size: var(--fs-18); padding: var(--s-16) var(--s-20); gap: var(--s-8); }
  .acc-header > span:first-child { line-height: var(--lh-snug); }
  .acc-header .acc-count { font-size: 10px; }
  .acc-inner { padding: 0 var(--s-20) var(--s-20); }
}
@media (max-width: 520px) {
  .ft-grid { grid-template-columns: 1fr; }
  .nav-inner { padding-left: var(--s-16); gap: var(--s-8); }
  .nav-logo  { font-size: var(--fs-18); }
  .nav-cta .btn-primary { padding: var(--s-12) var(--s-16); font-size: var(--fs-12); }
  .acc-header .acc-count { display: none; }
}
