/* Wavy cream top bar with a large logo, shared by every page.
   The wave is the hero's bottom wave turned upside down, dipping lowest under the logo.
   Once the page scrolls, nav-wave.js adds .scrolled and the logo and wave shrink. */
header.nav{background:#F3EBE1;backdrop-filter:none;-webkit-backdrop-filter:none;border-bottom:0}
header.nav::after{content:"";position:absolute;left:0;right:0;top:100%;z-index:-1;height:112px;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 90' preserveAspectRatio='none'%3E%3Cpath fill='%23F3EBE1' d='M0 0V50c120 30 260 40 420 20s300-40 480-30 320 45 540 40V0z'/%3E%3C/svg%3E") center/100% 100% no-repeat;
  transition:height .35s ease}
header.nav .nav-inner{padding-top:8px}
header.nav .nav-inner>a:first-child{position:relative;z-index:2;align-self:flex-start;margin-bottom:-84px;transition:margin-bottom .35s ease}
header.nav .nav-inner>a:first-child img{height:136px;width:auto;transition:height .35s ease}

header.nav.scrolled::after{height:40px}
header.nav.scrolled .nav-inner>a:first-child{margin-bottom:-14px}
header.nav.scrolled .nav-inner>a:first-child img{height:64px}

/* keep the slide-out menu (homepage, up to 1080px wide) above the large logo */
@media(max-width:1080px){header.nav .nav-links{z-index:3}}

@media(max-width:640px){
  /* on a narrow screen the full wave gets squeezed and looks sharp, so use one long, soft curve instead */
  header.nav::after{height:66px;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 60' preserveAspectRatio='none'%3E%3Cpath fill='%23F3EBE1' d='M0 0V44C80 60 170 58 260 40S370 18 400 20V0z'/%3E%3C/svg%3E")}
  header.nav .nav-inner>a:first-child{margin-bottom:-52px}
  header.nav .nav-inner>a:first-child img{height:96px}
  header.nav.scrolled::after{height:30px}
  header.nav.scrolled .nav-inner>a:first-child{margin-bottom:-10px}
  header.nav.scrolled .nav-inner>a:first-child img{height:52px}
}
@media(prefers-reduced-motion:reduce){
  header.nav::after,header.nav .nav-inner>a:first-child,header.nav .nav-inner>a:first-child img{transition:none}
}

/* Compact version for pages where content sits right under the bar (the quiz):
   the logo stays inside the bar, and a straight edge with a fine line replaces the wave,
   which gets lost against the quiz's near-cream background */
header.nav.compact{border-bottom:1px solid #d6cdbb}
header.nav.compact::after{display:none}
header.nav.compact .nav-inner{padding-bottom:8px}
header.nav.compact .nav-inner>a:first-child{margin-bottom:0}
header.nav.compact .nav-inner>a:first-child img{height:72px}
@media(max-width:640px){
  header.nav.compact .nav-inner>a:first-child img{height:58px}
}
