/* Header, menu drawer, and footer shared by every page. */

.site-header {
  position: relative;
  z-index: 5;
  height: 110px;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: Manrope, sans-serif;
}
/* Pages that open on electric blue overlay a white header. */
.home .site-header,
.blue-opening .site-header {
  position: absolute;
  inset: 0 0 auto;
  color: white;
}
.home .logo-white,
.blue-opening .logo-white {
  display: block;
}
.home .logo-blue,
.blue-opening .logo-blue {
  display: none;
}
.identity {
  display: flex;
  gap: 16px;
  align-items: center;
  min-height: 48px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.04em;
  outline-offset: 8px;
}
.brand-mark {
  display: block;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.logo-white {
  display: none;
}
.logo-blue {
  display: block;
}
.identity-name-mask {
  display: block;
  overflow: clip;
}
.identity-name {
  display: block;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.045em;
  line-height: 1.3;
  white-space: nowrap;
}
.identity-period {
  opacity: 0.6;
}
/* The wordmark retracts behind the mark and returns on hover or focus. */
@media (hover: hover) and (pointer: fine) {
  .revealing-identity .identity-name {
    transform: translateX(-106%);
    opacity: 0;
    transition:
      transform 700ms cubic-bezier(0.32, 0.72, 0, 1),
      opacity 500ms ease;
  }
  .revealing-identity:hover .identity-name,
  .revealing-identity:focus-visible .identity-name {
    transform: translateX(0);
    opacity: 1;
  }
  .revealing-identity:hover .identity-name {
    transition-duration: 340ms, 180ms;
  }
  .revealing-identity:focus-visible .identity-name {
    transition: none;
  }
  .revealing-identity .brand-mark {
    transition: transform 250ms cubic-bezier(0.23, 1, 0.32, 1);
  }
  .revealing-identity:hover .brand-mark {
    transform: rotate(-7deg);
  }
}
.identity-arrival .revealing-identity .identity-name {
  transform: translateX(0);
  opacity: 1;
}

#menu-toggle {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 48px;
  min-width: 80px;
  font-size: 17px;
  font-weight: 700;
}
.bold-menu-lines {
  width: 25px;
  height: 16px;
  position: relative;
  display: block;
}
.bold-menu-lines:before,
.bold-menu-lines:after {
  content: '';
  position: absolute;
  width: 25px;
  height: 3px;
  background: currentColor;
  left: 0;
}
.bold-menu-lines:before {
  top: 2px;
}
.bold-menu-lines:after {
  bottom: 2px;
  width: 18px;
  left: auto;
  right: 0;
}

/* Scrolling back up brings the header back as a compact bar (scroll.js).
   It slides with `translate`, leaving `transform` to the menu drawer. */
:root {
  --header-transition:
    translate 320ms cubic-bezier(0.32, 0.72, 0, 1), height 300ms ease,
    background-color 250ms ease, color 250ms ease, box-shadow 250ms ease;
}
.site-header {
  transition: var(--header-transition);
}
.site-header.is-pinned {
  position: fixed;
  inset: 0 0 auto;
  height: 76px;
  background: #f0f0ed;
  color: #071124;
  translate: 0 -100%;
}
.site-header.is-pinned.is-shown,
.site-header.is-pinned:has(:focus-visible) {
  translate: 0 0;
  box-shadow: 0 1px 0 #0711241f;
}
.site-header.is-pinned .logo-white {
  display: none;
}
.site-header.is-pinned .logo-blue {
  display: block;
}
.site-header.no-transition {
  transition: none !important;
}

/* Menu drawer */
.index-panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: 94vw;
  max-width: none;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  border: 0;
  overflow-y: auto;
  padding: 22px 28px;
  background: #edf0f7;
  color: #234bff;
  font-family: Manrope, sans-serif;
}
.index-panel[open] {
  display: flex;
  flex-direction: column;
}
.index-panel::backdrop {
  background: #07112499;
}
.index-panel .panel-top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
  color: #62729a;
  font-size: 14px;
}
.panel-top button {
  width: 48px;
  height: 48px;
  padding: 12px;
  color: #101b38;
  display: grid;
  place-items: center;
}
.panel-top button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
}
.index-panel nav {
  display: flex;
  flex-direction: column;
  margin: 15px 0 40px;
}
.index-panel nav > a {
  display: grid;
  grid-template-columns: 34px 1fr 32px;
  column-gap: 12px;
  row-gap: 6px;
  padding: 18px 0;
  border-top: 1px solid #d3d9e8;
  text-align: left;
}
.index-panel nav > a:last-child {
  border-bottom: 1px solid #d3d9e8;
}
.index-panel nav > a:focus-visible {
  outline-offset: 8px;
}
.index-panel nav b {
  grid-row: 1;
  align-self: start;
  padding-top: 0.5em;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #234bff;
}
.index-panel nav span {
  display: block;
  grid-column: 2;
  margin: 0;
  font-size: 29px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.045em;
}
.index-panel nav small {
  display: block;
  grid-column: 2;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: #62729a;
  overflow-wrap: anywhere;
}
.index-panel nav .bold-arrow {
  grid-column: 3;
  grid-row: 1/3;
  align-self: center;
  width: 23px;
  height: 23px;
}
/* Current page: navy label. */
.index-panel nav > a[aria-current] span {
  color: #071124;
}
.index-panel nav > a > span,
.index-panel nav > a > small,
.index-panel nav > a > .bold-arrow,
.menu-latest > *,
.bold-menu-contact > a > .bold-arrow {
  transition:
    color 180ms ease,
    transform 200ms cubic-bezier(0.23, 1, 0.32, 1);
}
.index-panel nav > a:hover .bold-arrow,
.menu-latest:hover .bold-arrow,
.bold-menu-contact > a:hover .bold-arrow {
  transform: translate(3px, -3px);
}
.index-panel nav > a:active .bold-arrow,
.menu-latest:active .bold-arrow,
.bold-menu-contact > a:active .bold-arrow {
  transform: translate(2px, -2px);
}

/* Latest story and direct contact sit at the foot of the drawer. */
.menu-latest {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 24px;
  column-gap: 16px;
  row-gap: 6px;
  padding: 18px 20px;
  background: white;
  color: #071124;
  flex-shrink: 0;
}
.menu-latest small {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #234bff;
}
.menu-latest span {
  grid-column: 1;
  text-wrap: balance;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.menu-latest .bold-arrow {
  grid-column: 2;
  grid-row: 1/3;
  align-self: center;
  width: 20px;
  height: 20px;
  color: #234bff;
}
.bold-menu-contact {
  flex-shrink: 0;
  margin-top: 28px;
}
/* Without the story card, contact takes the foot of the drawer. */
.index-panel nav + .bold-menu-contact {
  margin-top: auto;
}
.bold-menu-contact p {
  font-size: 14px;
  line-height: 1.6;
  color: #445779;
  margin: 0 0 10px;
}
.bold-menu-contact > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid #d3d9e8;
  font-size: 17px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.bold-menu-contact > a .bold-arrow {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}
@media (hover: hover) {
  .index-panel nav > a:hover > span,
  .index-panel nav > a:hover > .bold-arrow,
  .bold-menu-contact > a:hover,
  .menu-latest:hover span {
    color: #071124;
  }
  .index-panel nav > a:hover > small {
    color: #234bff;
  }
  .bold-menu-contact > a {
    transition: color 180ms ease;
  }
}

/* Footer */
.site-footer {
  position: relative;
  overflow: clip;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 45px;
  min-height: 350px;
  padding: 45px 6% 25px;
  background: #234bff;
  color: #fff;
  font-family: Manrope, sans-serif;
}
.site-footer[data-compact] {
  min-height: 0;
}
.closing-content h2 {
  font-size: 11vw;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.06em;
  margin: 0 0 18px;
}
.closing-content .closing-cta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 8px 0;
  font-size: 10vw;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.065em;
  white-space: nowrap;
  color: #071124;
  transition: color 180ms ease;
}
.closing-cta .bold-arrow {
  width: 0.58em;
  height: 0.58em;
  transition: transform 250ms cubic-bezier(0.23, 1, 0.32, 1);
}
.closing-content .closing-cta:hover {
  color: #fff;
}
.closing-cta:hover .bold-arrow {
  transform: translate(5px, -5px);
}
.closing-signature {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  font-size: 13px;
}
.closing-signature > a {
  font-weight: 500;
  letter-spacing: 0;
}

@media (max-width: 700px) {
  .site-header {
    height: 90px;
    padding: 0 6%;
  }
  .site-header.is-pinned {
    height: 64px;
  }
  .identity {
    gap: 11px;
    font-size: 17px;
  }
  .brand-mark {
    width: 34px;
    height: 34px;
  }
  .identity-name {
    font-size: 18px;
  }
  #menu-toggle {
    font-size: 15px;
    gap: 10px;
  }
}

@media (min-width: 701px) {
  .index-panel {
    width: clamp(400px, 40vw, 760px);
    padding: 30px clamp(28px, 3vw, 55px);
  }
  .index-panel::backdrop {
    background: #07112426;
  }
  .index-panel .panel-top {
    font-size: 15px;
  }
  .index-panel nav {
    margin: 25px 0 48px;
  }
  .index-panel nav > a {
    grid-template-columns: 44px 1fr 32px;
    column-gap: 16px;
    row-gap: 8px;
    padding: 22px 0;
  }
  .index-panel nav b {
    font-size: 14px;
  }
  .index-panel nav span {
    font-size: clamp(28px, 2.2vw, 44px);
  }
  .index-panel nav small {
    font-size: clamp(13px, 1vw, 16px);
  }
  .index-panel nav .bold-arrow {
    width: 28px;
    height: 28px;
  }
  .menu-latest {
    padding: 22px 24px;
  }
  .menu-latest span {
    font-size: 20px;
  }
  .bold-menu-contact p {
    font-size: 15px;
    margin-bottom: 12px;
  }
  .bold-menu-contact > a {
    padding: 14px 0;
    font-size: 19px;
  }

  /* Opening the drawer nudges the page aside. */
  body > main,
  body > .site-footer {
    transition: transform 390ms cubic-bezier(0.32, 0.72, 0, 1);
  }
  body > .site-header {
    transition:
      var(--header-transition),
      transform 390ms cubic-bezier(0.32, 0.72, 0, 1);
  }
  .bold-menu-open > .site-header,
  .bold-menu-open > main,
  .bold-menu-open > .site-footer {
    transform: translateX(-18vw);
  }
  .keyboard-motion > main,
  .keyboard-motion > .site-footer {
    transition: none;
  }
  .keyboard-motion > .site-header {
    transition: var(--header-transition);
  }

  .site-footer {
    gap: 55px;
    min-height: 380px;
    padding: 55px 5% 28px;
  }
  .site-footer[data-compact] {
    min-height: 0;
  }
  .closing-content h2 {
    font-size: clamp(42px, 5.4vw, 86px);
  }
  .closing-content .closing-cta {
    gap: 22px;
    font-size: clamp(34px, 4vw, 64px);
    white-space: normal;
  }
  .closing-signature {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .revealing-identity:hover .brand-mark {
    transform: none;
  }
}

/* Address tooltips: links reveal where they lead on hover or keyboard focus. */
.has-url {
  position: relative;
}
.url-tip {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  z-index: 6;
  padding: 9px 14px;
  background: #234bff;
  color: #fff;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
  white-space: nowrap;
  pointer-events: none;
  /* Hidden tips leave layout entirely, so they never widen the page. */
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 160ms ease,
    transform 220ms cubic-bezier(0.23, 1, 0.32, 1),
    display 220ms allow-discrete;
}
.url-tip::after {
  content: '';
  position: absolute;
  left: 18px;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: rotate(45deg);
}
.site-footer .url-tip,
.page-opening .url-tip {
  background: #fff;
  color: #071124;
}
.has-url:focus-visible > .url-tip,
.bold-story:focus-visible .url-tip {
  opacity: 1;
  display: block;
  transform: none;
  transition-delay: 0s;
}
@media (hover: hover) and (pointer: fine) {
  .has-url:hover > .url-tip,
  .bold-story:hover .url-tip {
    opacity: 1;
    display: block;
    transform: none;
    transition-delay: 0s;
  }
}

.url-tip-right {
  left: calc(100% + 16px);
  bottom: auto;
  top: 50%;
  transform: translate(6px, -50%);
}
.url-tip-right::after {
  left: -5px;
  bottom: auto;
  top: calc(50% - 5px);
}
.has-url:focus-visible > .url-tip-right {
  transform: translateY(-50%);
}
@media (hover: hover) and (pointer: fine) {
  .has-url:hover > .url-tip-right {
    transform: translateY(-50%);
  }
}
/* Entry animation from display: none. Repeated classes outrank every
   "shown" selector (hover or focus on a link, card, or row). */
@starting-style {
  .url-tip.url-tip.url-tip.url-tip {
    opacity: 0;
    transform: translateY(6px);
  }
  .url-tip-right.url-tip-right.url-tip-right.url-tip-right {
    transform: translate(6px, -50%);
  }
}
