/* Curie layer on top of Encore. Header is the Curie section, not Encore's. */

@font-face {
  font-family: "Garfunkel";
  src: url("garfunkel-regular.woff") format("woff");
  font-display: swap;
}

html {
  background: #aed5e9;
}

.curie-sky-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.curie-cloud {
  position: absolute;
  pointer-events: none;
  user-select: none;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgba(61, 108, 132, 0.1));
}

.curie-cloud--1 { top: -9px; left: 39%; width: 160px; animation: curie-drift-a 34s linear infinite alternate; }
.curie-cloud--2 { top: 52px; left: -40px; width: 150px; animation: curie-drift-b 42s linear infinite alternate; }
.curie-cloud--3 { top: 76px; right: -25px; width: 150px; animation: curie-drift-a 38s linear infinite alternate-reverse; }
.curie-cloud--4 { top: 38%; left: 18%; width: 176px; animation: curie-drift-b 39s linear infinite alternate; }
.curie-cloud--5 { top: 44%; right: 11%; width: 155px; animation: curie-drift-a 45s linear infinite alternate-reverse; }
.curie-cloud--6 { bottom: 8%; left: 8%; width: 140px; animation: curie-drift-b 41s linear infinite alternate-reverse; }
.curie-cloud--7 { top: 22%; left: 62%; width: 170px; animation: curie-drift-b 36s linear infinite alternate; }
.curie-cloud--8 { bottom: 18%; right: -30px; width: 190px; animation: curie-drift-a 48s linear infinite alternate-reverse; }
.curie-cloud--9 { top: 68%; left: -28px; width: 160px; animation: curie-drift-b 43s linear infinite alternate; }

@keyframes curie-drift-a { from { transform: translateX(-6vw); } to { transform: translateX(9vw); } }
@keyframes curie-drift-b { from { transform: translateX(7vw); } to { transform: translateX(-8vw); } }

#encore-theme > .curie-nav,
#encore-theme > main,
#encore-theme > .footer,
#encore-theme > [id^="section-"] {
  position: relative;
  z-index: 1;
}

.curie-nav {
  position: relative;
  z-index: 5;
  box-sizing: border-box;
  margin: 56px auto 0;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--curie-nav-radius, 50px);
  background: rgba(226, 245, 252, 0.51);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.92), 0 5px 14px rgba(85, 128, 149, 0.08);
  backdrop-filter: blur(12px);
  font-family: "Sora", sans-serif;
}

.curie-nav--collapsed {
  width: min(720px, calc(100% - 40px));
}

.curie-nav--standard {
  width: min(1050px, calc(100% - 40px));
}

.curie-nav--wide {
  width: min(1320px, calc(100% - 24px));
}

.curie-nav nav {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 5px 18px;
}

.curie-nav__cluster {
  display: flex;
  align-items: center;
  gap: 2px;
}

.curie-nav__spacer {
  flex: 1 1 auto;
  min-width: 48px;
  height: 1px;
}

.curie-nav a,
.curie-nav button {
  border: 0;
  padding: 8px 12px;
  background: transparent;
  color: #070707;
  font-family: "Sora", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.curie-nav a:hover,
.curie-nav button:hover {
  text-decoration: none;
}

.curie-nav__account {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.curie-nav .curie-nav__consult {
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 1px 4px rgba(58, 85, 99, 0.14);
}

.curie-wordmark {
  position: absolute;
  left: 50%;
  top: auto;
  bottom: calc(100% + 8px);
  z-index: 10;
  padding: 6px 16px 7px;
  background: #143c62;
  box-shadow: 0 8px 16px rgba(20, 60, 98, 0.22);
  color: #fff;
  font-family: "Garfunkel", serif;
  font-size: clamp(12px, 1.5vw, 20px);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  text-shadow: none;
  transform: translateX(-50%);
}

.curie-nav-mark {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0 !important;
  transform: translate(-50%, -50%);
}

.curie-nav-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.curie-nav__toggle {
  display: none;
  width: 34px;
  height: 34px;
  margin-left: auto;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 1px 4px rgba(58, 85, 99, 0.14);
}

.curie-nav__hamburger {
  position: relative;
  display: block;
  width: 14px;
  height: 10px;
  margin: 0 auto;
}

.curie-nav__hamburger i {
  position: absolute;
  left: 0;
  display: block;
  width: 14px;
  height: 2px;
  background: #143c62;
  transition: transform 0.2s ease, opacity 0.2s ease, top 0.2s ease;
}

.curie-nav__hamburger i:nth-child(1) { top: 0; }
.curie-nav__hamburger i:nth-child(2) { top: 4px; }
.curie-nav__hamburger i:nth-child(3) { top: 8px; }

.curie-nav.is-open .curie-nav__hamburger i:nth-child(1) {
  top: 4px;
  transform: rotate(45deg);
}

.curie-nav.is-open .curie-nav__hamburger i:nth-child(2) {
  opacity: 0;
}

.curie-nav.is-open .curie-nav__hamburger i:nth-child(3) {
  top: 4px;
  transform: rotate(-45deg);
}

.curie-nav__dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.curie-nav__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  display: grid;
  min-width: 168px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 16px;
  background: rgba(229, 246, 255, 0.9);
  box-shadow: 0 14px 30px rgba(45, 87, 110, 0.23), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(17px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
}

.curie-nav__menu--wide {
  min-width: 228px;
}

.curie-nav__dropdown:hover .curie-nav__menu,
.curie-nav__dropdown:focus-within .curie-nav__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.curie-nav__menu a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: #153451;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.curie-nav__menu a:hover {
  background: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

@media (max-width: 780px) {
  .curie-nav--collapsed,
  .curie-nav--standard,
  .curie-nav--wide {
    width: max-content;
    max-width: calc(100% - 24px);
    margin: 28px 16px 0 auto;
  }

  .curie-nav nav {
    min-height: 40px;
    padding: 3px 4px 3px 0;
  }

  .curie-wordmark {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    padding: 0 12px 0 16px;
    background: transparent;
    box-shadow: none;
    color: #143c62;
    font-size: 13px;
  }

  .curie-nav-mark,
  .curie-nav__spacer {
    display: none;
  }

  .curie-nav__cluster {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .curie-nav.is-open .curie-nav__cluster {
    display: flex;
  }

  .curie-nav.is-open nav {
    flex-wrap: wrap;
  }

  .curie-nav__toggle {
    display: grid;
    place-items: center;
  }

  .curie-nav.is-open .curie-nav__menu {
    position: static;
    min-width: 0;
    padding: 0 0 0 12px;
    border: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .curie-cloud {
    animation: none;
  }
}
